From 37b443e3c0060efa8f3ea1a816773c332e719ab6 Mon Sep 17 00:00:00 2001 From: acelaya Date: Sat, 27 May 2023 08:42:19 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20preview-env=20from=20@=20shlin?= =?UTF-8?q?kio/shlink-web-client@131a7455145fd1244eef100f0241682f9a22d37a?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feature/menus/assets/{index-bf25dd9f.js => index-6b02aaa0.js} | 2 +- feature/menus/index.html | 2 +- feature/menus/service-worker.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename feature/menus/assets/{index-bf25dd9f.js => index-6b02aaa0.js} (92%) diff --git a/feature/menus/assets/index-bf25dd9f.js b/feature/menus/assets/index-6b02aaa0.js similarity index 92% rename from feature/menus/assets/index-bf25dd9f.js rename to feature/menus/assets/index-6b02aaa0.js index 9a4a2239..98a5dbde 100644 --- a/feature/menus/assets/index-bf25dd9f.js +++ b/feature/menus/assets/index-6b02aaa0.js @@ -889,7 +889,7 @@ ${t}`),e(r,i,o,...s)}}const ene=typeof window=="object"&&window.Element||functio The first argument of this function must be DOM node or an array on DOM nodes or NodeList. The second must be a function. The third is a string or an array of strings that represents DOM events - `);return Array.prototype.forEach.call(o,s=>{Array.prototype.forEach.call(i,a=>{a.addEventListener(s,t,r)})}),function(){Array.prototype.forEach.call(o,a=>{Array.prototype.forEach.call(i,l=>{l.removeEventListener(a,t,r)})})}}const JI=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'];C.oneOfType([C.bool,C.string]),C.string,C.object;const sne=["className","cssModule","noGutters","tag","widths"],ane=["xs","sm","md","lg","xl","xxl"],Ml=C.oneOfType([C.number,C.string]),lne={tag:Pe,noGutters:KI(C.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:C.string,cssModule:C.object,xs:Ml,sm:Ml,md:Ml,lg:Ml,xl:Ml,xxl:Ml,widths:C.array},cne={tag:"div",widths:ane};function Qn(e){const{className:t,cssModule:n,noGutters:r,tag:i,widths:o}=e,s=qe(e,sne),a=[];o.forEach((c,f)=>{let h=e[c];if(delete s[c],!h)return;const p=!f;a.push(p?`row-cols-${h}`:`row-cols-${c}-${h}`)});const l=Fe(me(t,r?"gx-0":null,"row",a),n);return U.createElement(i,$e({},s,{className:l}))}Qn.propTypes=lne;Qn.defaultProps=cne;const une=["className","cssModule","widths","tag"],e6=["xs","sm","md","lg","xl","xxl"],p3=C.oneOfType([C.number,C.string]),Rl=C.oneOfType([C.bool,C.number,C.string,C.shape({size:C.oneOfType([C.bool,C.number,C.string]),order:p3,offset:p3})]),fne={tag:Pe,xs:Rl,sm:Rl,md:Rl,lg:Rl,xl:Rl,xxl:Rl,className:C.string,cssModule:C.object,widths:C.array},dne={tag:"div",widths:e6},m3=(e,t,n)=>n===!0||n===""?e?"col":`col-${t}`:n==="auto"?e?"col-auto":`col-${t}-auto`:e?`col-${n}`:`col-${t}-${n}`,hne=(e,t,n=e6)=>{const r=e,i=[];return n.forEach((o,s)=>{let a=r[o];if(delete r[o],!a&&a!=="")return;const l=!s;if(iv(a)){const c=l?"-":`-${o}-`,f=m3(l,o,a.size);i.push(Fe(me({[f]:a.size||a.size==="",[`order${c}${a.order}`]:a.order||a.order===0,[`offset${c}${a.offset}`]:a.offset||a.offset===0}),t))}else{const c=m3(l,o,a);i.push(c)}}),{colClasses:i,modifiedAttributes:r}};function BC(e){const{className:t,cssModule:n,widths:r,tag:i}=e,o=qe(e,une);let{modifiedAttributes:s,colClasses:a}=hne(o,n,r);a.length||a.push("col");const l=Fe(me(t,a),n);return U.createElement(i,$e({},s,{className:l}))}BC.propTypes=fne;BC.defaultProps=dne;const pne=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"],mne={children:C.node,className:C.string,color:C.string,container:C.oneOfType([C.bool,C.string]),cssModule:C.object,dark:C.bool,expand:C.oneOfType([C.bool,C.string]),fixed:C.string,full:C.bool,light:C.bool,role:C.string,sticky:C.string,tag:Pe},gne={tag:"nav",expand:!1,container:"fluid"},vne=e=>e===!1?!1:e===!0||e==="xs"?"navbar-expand":`navbar-expand-${e}`;function zC(e){const{expand:t,className:n,cssModule:r,light:i,dark:o,fixed:s,sticky:a,color:l,container:c,tag:f,children:h}=e,p=qe(e,pne),m=Fe(me(n,"navbar",vne(t),{"navbar-light":i,"navbar-dark":o,[`bg-${l}`]:l,[`fixed-${s}`]:s,[`sticky-${a}`]:a}),r),v=c&&c===!0?"container":`container-${c}`;return U.createElement(f,$e({},p,{className:m}),c?U.createElement("div",{className:v},h):h)}zC.propTypes=mne;zC.defaultProps=gne;const yne=["className","cssModule","tag"],_ne={className:C.string,cssModule:C.object,tag:Pe},bne={tag:"a"};function UC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,yne),o=Fe(me(t,"navbar-brand"),n);return U.createElement(r,$e({},i,{className:o}))}UC.propTypes=_ne;UC.defaultProps=bne;C.string,C.object,C.bool;const wne=["className","cssModule","children","tag"],xne={className:C.string,cssModule:C.object,tag:Pe,type:C.string,children:C.node},Sne={tag:"button",type:"button"};function VC(e){const{className:t,cssModule:n,children:r,tag:i}=e,o=qe(e,wne),s=Fe(me(t,"navbar-toggler"),n);return U.createElement(i,$e({"aria-label":"Toggle navigation"},o,{className:s}),r||U.createElement("span",{className:Fe("navbar-toggler-icon",n)}))}VC.propTypes=xne;VC.defaultProps=Sne;const Cne=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],Ene={card:C.bool,className:C.string,cssModule:C.object,fill:C.bool,horizontal:C.oneOf(["center","end"]),justified:C.bool,navbar:C.bool,pills:C.bool,tabs:C.bool,tag:Pe,vertical:C.oneOfType([C.bool,C.string])},Tne={tag:"ul",vertical:!1},One=e=>e===!1?!1:e===!0||e==="xs"?"flex-column":`flex-${e}-column`;function f_(e){const{className:t,cssModule:n,tabs:r,pills:i,vertical:o,horizontal:s,justified:a,fill:l,navbar:c,card:f,tag:h}=e,p=qe(e,Cne),m=Fe(me(t,c?"navbar-nav":"nav",s?`justify-content-${s}`:!1,One(o),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":a,"nav-fill":l}),n);return U.createElement(h,$e({},p,{className:m}))}f_.propTypes=Ene;f_.defaultProps=Tne;const Pne=["className","cssModule","active","tag"],kne={active:C.bool,className:C.string,cssModule:C.object,tag:Pe},Mne={tag:"li"};function HC(e){const{className:t,cssModule:n,active:r,tag:i}=e,o=qe(e,Pne),s=Fe(me(t,"nav-item",r?"active":!1),n);return U.createElement(i,$e({},o,{className:s}))}HC.propTypes=kne;HC.defaultProps=Mne;const Rne=["className","cssModule","active","tag","innerRef"],Nne={active:C.bool,className:C.string,cssModule:C.object,disabled:C.bool,href:C.any,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,tag:Pe},Lne={tag:"a"};class WC extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled){t.preventDefault();return}this.props.href==="#"&&t.preventDefault(),this.props.onClick&&this.props.onClick(t)}render(){let t=this.props,{className:n,cssModule:r,active:i,tag:o,innerRef:s}=t,a=qe(t,Rne);const l=Fe(me(n,"nav-link",{disabled:a.disabled,active:i}),r);return U.createElement(o,$e({},a,{ref:s,onClick:this.onClick,className:l}))}}WC.propTypes=Nne;WC.defaultProps=Lne;var t6=WC;C.string,C.node,C.string,C.object,C.string;C.bool,C.string,C.object;const Dne=["className","cssModule","variant","innerRef"],Ane={active:C.bool,"aria-label":C.string,onClick:C.func,variant:C.oneOf(["white"]),className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])},jne={"aria-label":"close"};function YC(e){const{className:t,cssModule:n,variant:r,innerRef:i}=e,o=qe(e,Dne),s=Fe(me(t,"btn-close",r&&`btn-close-${r}`));return U.createElement("button",$e({ref:i,type:"button",className:s},o))}YC.propTypes=Ane;YC.defaultProps=jne;const Ine=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"],Fne={active:C.bool,"aria-label":C.string,block:C.bool,children:C.node,className:C.string,cssModule:C.object,close:C.bool,color:C.string,disabled:C.bool,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,outline:C.bool,size:C.string,tag:Pe},$ne={color:"secondary",tag:"button"};function ht(e){const t=V.useCallback(x=>{if(e.disabled){x.preventDefault();return}if(e.onClick)return e.onClick(x)},[e.onClick,e.disabled]);let{active:n,"aria-label":r,block:i,className:o,close:s,cssModule:a,color:l,outline:c,size:f,tag:h,innerRef:p}=e,m=qe(e,Ine);if(s)return U.createElement(YC,m);const v=`btn${c?"-outline":""}-${l}`,y=Fe(me(o,"btn",v,f?`btn-${f}`:!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),a);return m.href&&h==="button"&&(h="a"),U.createElement(h,$e({type:h==="button"&&m.onClick?"button":void 0},m,{className:y,ref:p,onClick:t,"aria-label":r}))}ht.propTypes=Fne;ht.defaultProps=$ne;C.func,C.func,C.func,C.bool,C.string,C.object;const yd=U.createContext({}),n6=U.createContext({}),Bne=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"],zne={a11y:C.bool,disabled:C.bool,direction:C.oneOf(["up","down","start","end","left","right"]),group:C.bool,isOpen:C.bool,nav:C.bool,active:C.bool,size:C.string,tag:Pe,toggle:C.func,children:C.node,className:C.string,cssModule:C.object,dropup:C.bool,inNavbar:C.bool,setActiveFromChild:C.bool,menuRole:C.oneOf(["listbox","menu"])},Une={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},Vne=[mt.space,mt.enter,mt.up,mt.down,mt.end,mt.home];class d_ extends U.Component{constructor(t){super(t),this.addEvents=this.addEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.removeEvents=this.removeEvents.bind(this),this.toggle=this.toggle.bind(this),this.handleMenuRef=this.handleMenuRef.bind(this),this.handleToggleRef=this.handleToggleRef.bind(this),this.containerRef=U.createRef(),this.menuRef=U.createRef(),this.toggleRef=U.createRef()}componentDidMount(){this.handleProps()}componentDidUpdate(t){this.props.isOpen!==t.isOpen&&this.handleProps()}componentWillUnmount(){this.removeEvents()}handleMenuRef(t){this.menuRef.current=t}handleToggleRef(t){this.toggleRef.current=t}handleDocumentClick(t){if(t&&(t.which===3||t.type==="keyup"&&t.which!==mt.tab))return;const n=this.getContainer(),r=this.getMenu(),i=this.getToggle(),o=t.target===i,s=r&&r.contains(t.target)&&r!==t.target;let a=!1;n&&(a=n.classList.contains("input-group")&&n.classList.contains("dropdown")&&t.target.tagName==="INPUT"),!((o&&!a||s)&&(t.type!=="keyup"||t.which===mt.tab))&&this.toggle(t)}handleKeyDown(t){const n=t.target.getAttribute("role")==="menuitem"||t.target.getAttribute("role")==="option",r=this.getMenuCtrl()===t.target,i=mt.tab===t.which;if(!(/input|textarea/i.test(t.target.tagName)||i&&!this.props.a11y||i&&!(n||r))&&((Vne.indexOf(t.which)!==-1||t.which>=48&&t.which<=90)&&t.preventDefault(),!this.props.disabled&&(r&&([mt.space,mt.enter,mt.up,mt.down].indexOf(t.which)>-1?(this.props.isOpen||this.toggle(t),setTimeout(()=>this.getMenuItems()[0].focus())):this.props.isOpen&&i?(t.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&t.which===mt.esc&&this.toggle(t)),this.props.isOpen&&n))){if([mt.tab,mt.esc].indexOf(t.which)>-1)this.toggle(t),this.getMenuCtrl().focus();else if([mt.space,mt.enter].indexOf(t.which)>-1)t.target.click(),this.getMenuCtrl().focus();else if([mt.down,mt.up].indexOf(t.which)>-1||[mt.n,mt.p].indexOf(t.which)>-1&&t.ctrlKey){const o=this.getMenuItems();let s=o.indexOf(t.target);mt.up===t.which||mt.p===t.which&&t.ctrlKey?s=s!==0?s-1:o.length-1:(mt.down===t.which||mt.n===t.which&&t.ctrlKey)&&(s=s===o.length-1?0:s+1),o[s].focus()}else if(mt.end===t.which){const o=this.getMenuItems();o[o.length-1].focus()}else if(mt.home===t.which)this.getMenuItems()[0].focus();else if(t.which>=48&&t.which<=90){const o=this.getMenuItems(),s=String.fromCharCode(t.which).toLowerCase();for(let a=0;adocument.addEventListener(t,this.handleDocumentClick,!0))}removeEvents(){["click","touchstart","keyup"].forEach(t=>document.removeEventListener(t,this.handleDocumentClick,!0))}toggle(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle(t)}render(){const t=Cr(this.props,["toggle","disabled","inNavbar","a11y"]),{className:n,cssModule:r,direction:i,isOpen:o,group:s,size:a,nav:l,setActiveFromChild:c,active:f,tag:h,menuRole:p}=t,m=qe(t,Bne),v=h||(l?"li":"div");let y=!1;c&&U.Children.map(this.props.children[1].props.children,_=>{_&&_.props.active&&(y=!0)});const x=Fe(me(n,l&&f?"active":!1,c&&y?"active":!1,{"btn-group":s,[`btn-group-${a}`]:!!a,dropdown:!s,dropup:i==="up",dropstart:i==="start"||i==="left",dropend:i==="end"||i==="right",show:o,"nav-item":l}),r);return this.context.insideInputGroup?U.createElement(yd.Provider,{value:this.getContextValue()},U.createElement(QM,null,U.Children.map(this.props.children,_=>U.cloneElement(_,{onKeyDown:this.handleKeyDown})))):U.createElement(yd.Provider,{value:this.getContextValue()},U.createElement(QM,null,U.createElement(v,$e({},m,{[typeof v=="string"?"ref":"innerRef"]:this.containerRef,onKeyDown:this.handleKeyDown,className:x}))))}}d_.propTypes=zne;d_.defaultProps=Une;d_.contextType=n6;var eu=d_;const Hne={children:C.node};function qC(e){return U.createElement(eu,$e({group:!0},e))}qC.propTypes=Hne;C.string,C.string,C.object,C.string,C.string,C.bool;C.string,C.string,C.object,C.string;const Wne=["className","cssModule","divider","tag","header","active","text"],Yne={children:C.node,active:C.bool,disabled:C.bool,divider:C.bool,tag:Pe,header:C.bool,onClick:C.func,className:C.string,cssModule:C.object,toggle:C.bool,text:C.bool},qne={tag:"button",toggle:!0};class h_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this),this.getTabIndex=this.getTabIndex.bind(this)}onClick(t){const{disabled:n,header:r,divider:i,text:o}=this.props;if(n||r||i||o){t.preventDefault();return}this.props.onClick&&this.props.onClick(t),this.props.toggle&&this.context.toggle(t)}getRole(){return this.context.menuRole==="listbox"?"option":"menuitem"}getTabIndex(){const{disabled:t,header:n,divider:r,text:i}=this.props;return t||n||r||i?"-1":"0"}render(){const t=this.getTabIndex(),n=t>-1?this.getRole():void 0;let r=Cr(this.props,["toggle"]),{className:i,cssModule:o,divider:s,tag:a,header:l,active:c,text:f}=r,h=qe(r,Wne);const p=Fe(me(i,{disabled:h.disabled,"dropdown-item":!s&&!l&&!f,active:c,"dropdown-header":l,"dropdown-divider":s,"dropdown-item-text":f}),o);return a==="button"&&(l?a="h6":s?a="div":h.href?a="a":f&&(a="span")),U.createElement(a,$e({type:a==="button"&&(h.onClick||this.props.toggle)?"button":void 0},h,{tabIndex:t,role:n,className:p,onClick:this.onClick}))}}h_.propTypes=Yne;h_.defaultProps=qne;h_.contextType=yd;var Ue=h_;const Gne=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"],Zne={tag:Pe,children:C.node.isRequired,dark:C.bool,end:C.bool,flip:C.bool,modifiers:C.array,className:C.string,cssModule:C.object,style:C.object,persist:C.bool,strategy:C.string,container:zs,updateOnSelect:C.bool,right:KI(C.bool,'Please use "end" instead.')},Kne={tag:"div",flip:!0,modifiers:[]},Xne={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"};class p_ extends U.Component{getRole(){return this.context.menuRole==="listbox"?"listbox":"menu"}render(){const t=this.props,{className:n,cssModule:r,dark:i,end:o,right:s,tag:a,flip:l,modifiers:c,persist:f,strategy:h,container:p,updateOnSelect:m}=t,v=qe(t,Gne),y=Fe(me(n,"dropdown-menu",{"dropdown-menu-dark":i,"dropdown-menu-end":o||s,show:this.context.isOpen}),r),x=a;if(f||this.context.isOpen&&!this.context.inNavbar){const T=`${Xne[this.context.direction]||"bottom"}-${o||s?"end":"start"}`,P=[...c,{name:"flip",enabled:!!l}],k=U.createElement(WI,{placement:T,modifiers:P,strategy:h},({ref:N,style:D,placement:z,update:A})=>{let W=We(We({},this.props.style),D);const Y=J=>{N(J);const{onMenuRef:Z}=this.context;Z&&Z(J)};return U.createElement(x,$e({tabIndex:"-1",role:this.getRole(),ref:Y},v,{style:W,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":z,onClick:()=>m&&A()}))});return p?$a.createPortal(k,Ic(p)):k}const{onMenuRef:_}=this.context;return U.createElement(x,$e({tabIndex:"-1",role:this.getRole()},v,{ref:_,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":v.placement}))}}p_.propTypes=Zne;p_.defaultProps=Kne;p_.contextType=yd;var tu=p_;const Qne=["className","color","cssModule","caret","split","nav","tag","innerRef"],Jne={caret:C.bool,color:C.string,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,onClick:C.func,"aria-haspopup":C.bool,split:C.bool,tag:Pe,nav:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func])},ere={color:"secondary","aria-haspopup":!0};class m_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled||this.context.disabled){t.preventDefault();return}this.props.nav&&!this.props.tag&&t.preventDefault(),this.props.onClick&&this.props.onClick(t),this.context.toggle(t)}getRole(){return this.context.menuRole||this.props["aria-haspopup"]}render(){const t=this.props,{className:n,color:r,cssModule:i,caret:o,split:s,nav:a,tag:l,innerRef:c}=t,f=qe(t,Qne),h=f["aria-label"]||"Toggle Dropdown",p=Fe(me(n,{"dropdown-toggle":o||s,"dropdown-toggle-split":s,"nav-link":a}),i),m=typeof f.children<"u"?f.children:U.createElement("span",{className:"visually-hidden"},h);let v;return a&&!l?(v="a",f.href="#"):l?v=l:(v=ht,f.color=r,f.cssModule=i),this.context.inNavbar?U.createElement(v,$e({},f,{className:p,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m})):U.createElement(qte,{innerRef:c},({ref:y})=>{const x=_=>{y(_);const{onToggleRef:w}=this.context;w&&w(_)};return U.createElement(v,$e({},f,{[typeof v=="string"?"ref":"innerRef"]:x,className:p,onClick:this.onClick,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m}))})}}m_.propTypes=Jne;m_.defaultProps=ere;m_.contextType=yd;var Zd=m_;const tre=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"],nre=We(We({},zo.propTypes),{},{children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,baseClass:C.string,baseClassActive:C.string,className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])}),rre=We(We({},zo.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:tl.Fade,appear:!0,enter:!0,exit:!0,in:!0});function Zt(e){const{tag:t,baseClass:n,baseClassActive:r,className:i,cssModule:o,children:s,innerRef:a}=e,l=qe(e,tre),c=ZI(l,rv),f=Cr(l,rv);return U.createElement(zo,c,h=>{const m=Fe(me(i,n,h==="entered"&&r),o);return U.createElement(t,$e({className:m},f,{ref:a}),s)})}Zt.propTypes=nre;Zt.defaultProps=rre;U.createContext({});C.node,C.string,C.object,C.bool,C.oneOfType([C.object,C.string,C.func]),C.oneOfType([C.array,C.string]).isRequired,C.func.isRequired;C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.node,C.oneOfType([C.array,C.string]),C.bool;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.string.isRequired;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]);const ire=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],ore=We(We({},zo.propTypes),{},{horizontal:C.bool,isOpen:C.bool,children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,className:C.node,navbar:C.bool,cssModule:C.object,innerRef:C.shape({current:C.object})}),sre=We(We({},zo.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:tl.Collapse}),are={[go.ENTERING]:"collapsing",[go.ENTERED]:"collapse show",[go.EXITING]:"collapsing",[go.EXITED]:"collapse"};function lre(e){return are[e]||"collapse"}class GC extends V.Component{constructor(t){super(t),this.state={dimension:null},this.nodeRef=t.innerRef||U.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(n=>{this[n]=this[n].bind(this)})}onEntering(t,n){const r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,n)}onEntered(t,n){const r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,n)}onExit(){const t=this.getNode();this.setState({dimension:this.getDimension(t)}),this.props.onExit(t)}onExiting(){const t=this.getNode();this.getDimension(t),this.setState({dimension:0}),this.props.onExiting(t)}onExited(){const t=this.getNode();this.setState({dimension:null}),this.props.onExited(t)}getNode(){return this.nodeRef.current}getDimension(t){return this.props.horizontal?t.scrollWidth:t.scrollHeight}render(){const t=this.props,{tag:n,horizontal:r,isOpen:i,className:o,navbar:s,cssModule:a,children:l,innerRef:c}=t,f=qe(t,ire),{dimension:h}=this.state,p=ZI(f,rv),m=Cr(f,rv);return U.createElement(zo,$e({},p,{in:i,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),v=>{let y=lre(v);const x=Fe(me(o,r&&"collapse-horizontal",y,s&&"navbar-collapse"),a),_=h===null?null:{[r?"width":"height"]:h};return U.createElement(n,$e({},m,{style:We(We({},m.style),_),className:x,ref:this.nodeRef}),l)})}}GC.propTypes=ore;GC.defaultProps=sre;var r6=GC;C.string.isRequired,C.string,C.node,C.object,C.oneOfType([C.object,C.string,C.func]);C.node,C.string,C.string,C.object,C.oneOfType([C.object,C.func,C.string]),C.bool;const cre=["className","cssModule","color","body","inverse","outline","tag","innerRef"],ure={body:C.bool,className:C.string,color:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),inverse:C.bool,outline:C.bool,tag:Pe},fre={tag:"div"};function Sr(e){const{className:t,cssModule:n,color:r,body:i,inverse:o,outline:s,tag:a,innerRef:l}=e,c=qe(e,cre),f=Fe(me(t,"card",o?"text-white":!1,i?"card-body":!1,r?`${s?"border":"bg"}-${r}`:!1),n);return U.createElement(a,$e({},c,{className:f,ref:l}))}Sr.propTypes=ure;Sr.defaultProps=fre;C.string,C.object;C.string,C.object;C.string,C.object;const dre=["className","cssModule","innerRef","tag"],hre={className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),tag:Pe},pre={tag:"div"};function nl(e){const{className:t,cssModule:n,innerRef:r,tag:i}=e,o=qe(e,dre),s=Fe(me(t,"card-body"),n);return U.createElement(i,$e({},o,{className:s,ref:r}))}nl.propTypes=hre;nl.defaultProps=pre;C.oneOfType([C.object,C.func,C.string]),C.string,C.object;const mre=["className","cssModule","tag"],gre={className:C.string,cssModule:C.object,tag:Pe},vre={tag:"div"};function ZC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,mre),o=Fe(me(t,"card-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ZC.propTypes=gre;ZC.defaultProps=vre;const yre=["className","cssModule","tag"],_re={className:C.string,cssModule:C.object,tag:Pe},bre={tag:"div"};function rl(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,yre),o=Fe(me(t,"card-header"),n);return U.createElement(r,$e({},i,{className:o}))}rl.propTypes=_re;rl.defaultProps=bre;C.bool,C.string,C.object,C.bool;C.string,C.object;const dm=U.createContext({}),wre=["in","children","cssModule","slide","tag","className"];class g_ extends U.Component{constructor(t){super(t),this.state={startAnimation:!1},this.onEnter=this.onEnter.bind(this),this.onEntering=this.onEntering.bind(this),this.onExit=this.onExit.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onEnter(t,n){this.setState({startAnimation:!1}),this.props.onEnter(t,n)}onEntering(t,n){const{offsetHeight:r}=t;return this.setState({startAnimation:!0}),this.props.onEntering(t,n),r}onExit(t){this.setState({startAnimation:!1}),this.props.onExit(t)}onExiting(t){this.setState({startAnimation:!0}),t.dispatchEvent(new CustomEvent("slide.bs.carousel")),this.props.onExiting(t)}onExited(t){t.dispatchEvent(new CustomEvent("slid.bs.carousel")),this.props.onExited(t)}render(){const t=this.props,{in:n,children:r,cssModule:i,slide:o,tag:s,className:a}=t,l=qe(t,wre);return U.createElement(zo,$e({},l,{enter:o,exit:o,in:n,onEnter:this.onEnter,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),c=>{const{direction:f}=this.context,h=c===go.ENTERED||c===go.EXITING,p=(c===go.ENTERING||c===go.EXITING)&&this.state.startAnimation&&(f==="end"?"carousel-item-start":"carousel-item-end"),m=c===go.ENTERING&&(f==="end"?"carousel-item-next":"carousel-item-prev"),v=Fe(me(a,"carousel-item",h&&"active",p,m),i);return U.createElement(s,{className:v},r)})}}g_.propTypes=We(We({},zo.propTypes),{},{tag:Pe,in:C.bool,cssModule:C.object,children:C.node,slide:C.bool,className:C.string});g_.defaultProps=We(We({},zo.defaultProps),{},{tag:"div",timeout:tl.Carousel,slide:!0});g_.contextType=dm;var i6=g_;const xre=40,o6={activeIndex:C.number,next:C.func.isRequired,previous:C.func.isRequired,keyboard:C.bool,pause:C.oneOf(["hover",!1]),ride:C.oneOf(["carousel"]),interval:C.oneOfType([C.number,C.string,C.bool]),children:C.array,mouseEnter:C.func,mouseLeave:C.func,slide:C.bool,dark:C.bool,fade:C.bool,cssModule:C.object,className:C.string,enableTouch:C.bool},Sre=Object.keys(o6),Cre={interval:5e3,pause:"hover",keyboard:!0,slide:!0,enableTouch:!0,fade:!1};class KC extends U.Component{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.renderItems=this.renderItems.bind(this),this.hoverStart=this.hoverStart.bind(this),this.hoverEnd=this.hoverEnd.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.touchStartX=0,this.touchStartY=0,this.state={activeIndex:this.props.activeIndex,direction:"end",indicatorClicked:!1}}componentDidMount(){this.props.ride==="carousel"&&this.setInterval(),document.addEventListener("keyup",this.handleKeyPress)}static getDerivedStateFromProps(t,n){let r=null,{activeIndex:i,direction:o,indicatorClicked:s}=n;return t.activeIndex!==i&&(t.activeIndex===i+1?o="end":t.activeIndex===i-1?o="start":t.activeIndex{this.props.next()},parseInt(this.props.interval,10)))}clearInterval(){clearInterval(this.cycleInterval)}hoverStart(...t){this.props.pause==="hover"&&this.clearInterval(),this.props.mouseEnter&&this.props.mouseEnter(...t)}hoverEnd(...t){this.props.pause==="hover"&&this.setInterval(),this.props.mouseLeave&&this.props.mouseLeave(...t)}renderItems(t,n){const{slide:r}=this.props;return U.createElement("div",{className:n},t.map((i,o)=>{const s=o===this.state.activeIndex;return U.cloneElement(i,{in:s,slide:r})}))}render(){const{cssModule:t,slide:n,className:r,dark:i,fade:o}=this.props,s=Cr(this.props,Sre),a=Fe(me(r,"carousel",o&&"carousel-fade",n&&"slide",i&&"carousel-dark"),t),l=Fe(me("carousel-inner"),t),c=this.props.children.filter(_=>_!=null&&typeof _!="boolean");if(c.every(_=>_.type===i6))return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},this.renderItems(c,l)));if(c[0]instanceof Array){const _=c[0],w=c[1],S=c[2];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},this.renderItems(_,l),w,S))}const h=c[0],p=_=>{typeof h.props.onClickHandler=="function"&&this.setState({indicatorClicked:!0},()=>h.props.onClickHandler(_))},m=U.cloneElement(h,{onClickHandler:p}),v=c[1],y=c[2],x=c[3];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},m,this.renderItems(v,l),y,x))}}KC.propTypes=o6;KC.defaultProps=Cre;var Ere=KC;const Tre=["direction","onClickHandler","cssModule","directionText","className"];function Fw(e){const{direction:t,onClickHandler:n,cssModule:r,directionText:i,className:o}=e,s=qe(e,Tre),a=Fe(me(o,`carousel-control-${t}`),r),l=Fe(me(`carousel-control-${t}-icon`),r),c=Fe(me("visually-hidden"),r);return U.createElement("a",$e({},s,{className:a,style:{cursor:"pointer"},role:"button",tabIndex:"0",onClick:f=>{f.preventDefault(),n()}}),U.createElement("span",{className:l,"aria-hidden":"true"}),U.createElement("span",{className:c},i||t))}Fw.propTypes={direction:C.oneOf(["prev","next"]).isRequired,onClickHandler:C.func.isRequired,cssModule:C.object,directionText:C.string,className:C.string};const Ore=["items","activeIndex","cssModule","onClickHandler","className"];function s6(e){const{items:t,activeIndex:n,cssModule:r,onClickHandler:i,className:o}=e,s=qe(e,Ore),a=Fe(me(o,"carousel-indicators"),r),l=t.map((c,f)=>{const h=Fe(me({active:n===f}),r);return U.createElement("button",{"aria-label":c.caption,"data-bs-target":!0,type:"button",key:`${c.key||Object.values(c).join("")}`,onClick:p=>{p.preventDefault(),i(f)},className:h})});return U.createElement("div",$e({className:a},s),l)}s6.propTypes={activeIndex:C.number.isRequired,className:C.string,cssModule:C.object,items:C.array.isRequired,onClickHandler:C.func.isRequired};function a6(e){const{captionHeader:t,captionText:n,cssModule:r,className:i}=e,o=Fe(me(i,"carousel-caption","d-none","d-md-block"),r);return U.createElement("div",{className:o},U.createElement("h3",null,t),U.createElement("p",null,n))}a6.propTypes={captionHeader:C.node,captionText:C.node.isRequired,className:C.string,cssModule:C.object};const Pre=["defaultActiveIndex","autoPlay","indicators","controls","items","goToIndex"],kre={items:C.array.isRequired,indicators:C.bool,controls:C.bool,autoPlay:C.bool,defaultActiveIndex:C.number,activeIndex:C.number,next:C.func,previous:C.func,goToIndex:C.func};class l6 extends V.Component{constructor(t){super(t),this.animating=!1,this.state={activeIndex:t.defaultActiveIndex||0},this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.goToIndex=this.goToIndex.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onExiting(){this.animating=!0}onExited(){this.animating=!1}next(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===this.props.items.length-1?0:t.activeIndex+1}))}previous(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===0?this.props.items.length-1:t.activeIndex-1}))}goToIndex(t){this.animating||this.setState({activeIndex:t})}render(){const t=this.props,{defaultActiveIndex:n,autoPlay:r,indicators:i,controls:o,items:s,goToIndex:a}=t,l=qe(t,Pre),{activeIndex:c}=this.state,f=s.map(h=>{const p=h.key||h.src;return U.createElement(i6,{onExiting:this.onExiting,onExited:this.onExited,key:p},U.createElement("img",{className:"d-block w-100",src:h.src,alt:h.altText}),U.createElement(a6,{captionText:h.caption,captionHeader:h.header||h.caption}))});return U.createElement(Ere,$e({activeIndex:c,next:this.next,previous:this.previous,ride:r?"carousel":void 0},l),i&&U.createElement(s6,{items:s,activeIndex:l.activeIndex||c,onClickHandler:a||this.goToIndex}),f,o&&U.createElement(Fw,{direction:"prev",directionText:"Previous",onClickHandler:l.previous||this.previous}),o&&U.createElement(Fw,{direction:"next",directionText:"Next",onClickHandler:l.next||this.next}))}}l6.propTypes=kre;l6.defaultProps={controls:!0,indicators:!0,autoPlay:!0};C.string,C.object;const Mre=["className","cssModule","tag"],Rre={className:C.string,cssModule:C.object,tag:Pe},Nre={tag:"p"};function XC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Mre),o=Fe(me(t,"card-text"),n);return U.createElement(r,$e({},i,{className:o}))}XC.propTypes=Rre;XC.defaultProps=Nre;const Lre=["className","cssModule","tag"],Dre={className:C.string,cssModule:C.object,tag:Pe},Are={tag:"div"};function QC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Lre),o=Fe(me(t,"card-title"),n);return U.createElement(r,$e({},i,{className:o}))}QC.propTypes=Dre;QC.defaultProps=Are;const jre=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function Ire(){}const Fre={children:C.oneOfType([C.node,C.func]).isRequired,popperClassName:C.string,placement:C.string,placementPrefix:C.string,arrowClassName:C.string,hideArrow:C.bool,tag:Pe,isOpen:C.bool,cssModule:C.object,offset:C.arrayOf(C.number),fallbackPlacements:C.array,flip:C.bool,container:zs,target:zs.isRequired,modifiers:C.array,strategy:C.string,boundariesElement:C.oneOfType([C.string,FC]),onClosed:C.func,fade:C.bool,transition:C.shape(Zt.propTypes)},$re={boundariesElement:"scrollParent",placement:"auto",hideArrow:!1,isOpen:!1,offset:[0,0],flip:!0,container:"body",modifiers:[],onClosed:Ire,fade:!0,transition:We({},Zt.defaultProps)};class JC extends U.Component{constructor(t){super(t),this.setTargetNode=this.setTargetNode.bind(this),this.getTargetNode=this.getTargetNode.bind(this),this.getRef=this.getRef.bind(this),this.onClosed=this.onClosed.bind(this),this.state={isOpen:t.isOpen}}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}componentDidUpdate(){this._element&&this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()}onClosed(){this.props.onClosed(),this.setState({isOpen:!1})}getTargetNode(){return this.targetNode}getContainerNode(){return Ic(this.props.container)}getRef(t){this._element=t}setTargetNode(t){this.targetNode=typeof t=="string"?Ic(t):t}renderChildren(){const t=this.props,{cssModule:n,children:r,isOpen:i,flip:o,target:s,offset:a,fallbackPlacements:l,placementPrefix:c,arrowClassName:f,hideArrow:h,popperClassName:p,tag:m,container:v,modifiers:y,strategy:x,boundariesElement:_,onClosed:w,fade:S,transition:T,placement:P}=t,k=qe(t,jre),N=Fe(me("arrow",f),n),D=Fe(me(p,c?`${c}-auto`:""),this.props.cssModule),z=y.map(J=>J.name),W=[...[{name:"offset",options:{offset:a}},{name:"flip",enabled:o,options:{fallbackPlacements:l}},{name:"preventOverflow",options:{boundary:_}}].filter(J=>!z.includes(J.name)),...y],Y=We(We(We({},Zt.defaultProps),T),{},{baseClass:S?T.baseClass:"",timeout:S?T.timeout:0});return U.createElement(Zt,$e({},Y,k,{in:i,onExited:this.onClosed,tag:m}),U.createElement(WI,{referenceElement:this.targetNode,modifiers:W,placement:P,strategy:x},({ref:J,style:Z,placement:ee,isReferenceHidden:ie,arrowProps:oe,update:G})=>U.createElement("div",{ref:J,style:Z,className:D,"data-popper-placement":ee,"data-popper-reference-hidden":ie?"true":void 0},typeof r=="function"?r({update:G}):r,!h&&U.createElement("span",{ref:oe.ref,className:N,style:oe.style}))))}render(){return this.setTargetNode(this.props.target),this.state.isOpen?this.props.container==="inline"?this.renderChildren():$a.createPortal(U.createElement("div",{ref:this.getRef},this.renderChildren()),this.getContainerNode()):null}}JC.propTypes=Fre;JC.defaultProps=$re;var Bre=JC;C.object.isRequired;zs.isRequired;const v_={children:C.oneOfType([C.node,C.func]),placement:C.oneOf(tne),target:zs.isRequired,container:zs,isOpen:C.bool,disabled:C.bool,hideArrow:C.bool,boundariesElement:C.oneOfType([C.string,FC]),className:C.string,innerClassName:C.string,arrowClassName:C.string,popperClassName:C.string,cssModule:C.object,toggle:C.func,autohide:C.bool,placementPrefix:C.string,delay:C.oneOfType([C.shape({show:C.number,hide:C.number}),C.number]),modifiers:C.array,strategy:C.string,offset:C.arrayOf(C.number),innerRef:C.oneOfType([C.func,C.string,C.object]),trigger:C.string,fade:C.bool,flip:C.bool},c6={show:0,hide:50},zre={isOpen:!1,hideArrow:!1,autohide:!1,delay:c6,toggle:function(){},trigger:"click",fade:!0};function u6(e,t){return t&&(e===t||t.contains(e))}function g3(e,t=[]){return t&&t.length&&t.filter(n=>u6(e,n))[0]}class eE extends U.Component{constructor(t){super(t),this._targets=[],this.currentTargetElement=null,this.addTargetEvents=this.addTargetEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.removeTargetEvents=this.removeTargetEvents.bind(this),this.toggle=this.toggle.bind(this),this.showWithDelay=this.showWithDelay.bind(this),this.hideWithDelay=this.hideWithDelay.bind(this),this.onMouseOverTooltipContent=this.onMouseOverTooltipContent.bind(this),this.onMouseLeaveTooltipContent=this.onMouseLeaveTooltipContent.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.onEscKeyDown=this.onEscKeyDown.bind(this),this.getRef=this.getRef.bind(this),this.state={isOpen:t.isOpen},this._isMounted=!1}componentDidMount(){this._isMounted=!0,this.updateTarget()}componentWillUnmount(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}handleDocumentClick(t){const n=this.props.trigger.split(" ");n.indexOf("legacy")>-1&&(this.props.isOpen||g3(t.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!u6(t.target,this._popover)?this.hideWithDelay(t):this.props.isOpen||this.showWithDelay(t)):n.indexOf("click")>-1&&g3(t.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(t):this.showWithDelay(t))}onMouseOverTooltipContent(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}onMouseLeaveTooltipContent(t){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),t.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide")))}onEscKeyDown(t){t.key==="Escape"&&this.hide(t)}getRef(t){const{innerRef:n}=this.props;n&&(typeof n=="function"?n(t):typeof n=="object"&&(n.current=t)),this._popover=t}getDelay(t){const{delay:n}=this.props;return typeof n=="object"?isNaN(n[t])?c6[t]:n[t]:n}getCurrentTarget(t){if(!t)return null;const n=this._targets.indexOf(t);return n>=0?this._targets[n]:this.getCurrentTarget(t.parentElement)}show(t){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=t?t.currentTarget||this.getCurrentTarget(t.target):null,t&&t.composedPath&&typeof t.composedPath=="function"){const n=t.composedPath();this.currentTargetElement=n&&n[0]||this.currentTargetElement}this.toggle(t)}}showWithDelay(t){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,t),this.getDelay("show"))}hide(t){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(t))}hideWithDelay(t){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide"))}clearShowTimeout(){clearTimeout(this._showTimeout),this._showTimeout=void 0}clearHideTimeout(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}addEventOnTargets(t,n,r){this._targets.forEach(i=>{i.addEventListener(t,n,r)})}removeEventOnTargets(t,n,r){this._targets.forEach(i=>{i.removeEventListener(t,n,r)})}addTargetEvents(){if(this.props.trigger){let t=this.props.trigger.split(" ");t.indexOf("manual")===-1&&((t.indexOf("click")>-1||t.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(t.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),t.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}removeTargetEvents(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}updateTarget(){const t=Ic(this.props.target,!0);t!==this._targets&&(this.removeTargetEvents(),this._targets=t?Array.from(t):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}toggle(t){return this.props.disabled||!this._isMounted?t&&t.preventDefault():this.props.toggle(t)}render(){this.props.isOpen&&this.updateTarget();const t=this.currentTargetElement||this._targets[0];if(!t)return null;const{className:n,cssModule:r,innerClassName:i,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:h,container:p,modifiers:m,strategy:v,offset:y,fade:x,flip:_,children:w}=this.props,S=Cr(this.props,Object.keys(v_)),T=Fe(h,r),P=Fe(i,r);return U.createElement(Bre,{className:n,target:t,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:T,container:p,modifiers:m,strategy:v,offset:y,cssModule:r,fade:x,flip:_},({update:k})=>U.createElement("div",$e({},S,{ref:this.getRef,className:P,role:"tooltip",onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent,onKeyDown:this.onEscKeyDown}),typeof w=="function"?w({update:k}):w))}}eE.propTypes=v_;eE.defaultProps=zre;var f6=eE;const Ure={placement:"right",placementPrefix:"bs-popover",trigger:"click",offset:[0,8]};function Kd(e){const t=me("popover","show",e.popperClassName),n=me("popover-inner",e.innerClassName);return U.createElement(f6,$e({},e,{arrowClassName:"popover-arrow",popperClassName:t,innerClassName:n}))}Kd.propTypes=v_;Kd.defaultProps=Ure;const Vre=["defaultOpen"];class Hre extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Kd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Vre)))}}Hre.propTypes=We({defaultOpen:C.bool},Kd.propTypes);C.string,C.object;C.string,C.object;const Wre=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"],Yre={animated:C.bool,bar:C.bool,barAriaLabelledBy:C.string,barAriaValueText:C.string,barClassName:C.string,barStyle:C.object,children:C.node,className:C.string,cssModule:C.object,color:C.string,max:C.oneOfType([C.string,C.number]),min:C.oneOfType([C.string,C.number]),multi:C.bool,striped:C.bool,style:C.object,tag:Pe,value:C.oneOfType([C.string,C.number])},qre={tag:"div",value:0,min:0,max:100,style:{},barStyle:{}};function tE(e){const{children:t,className:n,barClassName:r,cssModule:i,value:o,min:s,max:a,animated:l,striped:c,color:f,bar:h,multi:p,tag:m,style:v,barStyle:y,barAriaValueText:x,barAriaLabelledBy:_}=e,w=qe(e,Wre),S=h3(o)/h3(a)*100,T=Fe(me(n,"progress"),i),k={className:Fe(me("progress-bar",h&&n||r,l?"progress-bar-animated":null,f?`bg-${f}`:null,c||l?"progress-bar-striped":null),i),style:We(We(We({},h?v:{}),y),{},{width:`${S}%`}),role:"progressbar","aria-valuenow":o,"aria-valuemin":s,"aria-valuemax":a,"aria-valuetext":x,"aria-labelledby":_,children:t};return h?U.createElement(m,$e({},w,k)):U.createElement(m,$e({},w,{style:v,className:T}),p?t:U.createElement("div",k))}tE.propTypes=Yre;tE.defaultProps=qre;const Gre={children:C.node.isRequired,node:C.any};class d6 extends U.Component{componentWillUnmount(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}render(){return $C?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),$a.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}d6.propTypes=Gre;var h6=d6;function sv(){}const v3=C.shape(Zt.propTypes),p6={autoFocus:C.bool,backdrop:C.oneOfType([C.bool,C.oneOf(["static"])]),backdropClassName:C.string,backdropTransition:v3,centered:C.bool,children:C.node,contentClassName:C.string,className:C.string,container:zs,cssModule:C.object,external:C.node,fade:C.bool,fullscreen:C.oneOfType([C.bool,C.oneOf(["sm","md","lg","xl"])]),innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,modalClassName:C.string,modalTransition:v3,onClosed:C.func,onEnter:C.func,onExit:C.func,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,size:C.string,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,wrapClassName:C.string,zIndex:C.oneOfType([C.number,C.string])},Zre=Object.keys(p6),Kre={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:sv,onClosed:sv,modalTransition:{timeout:tl.Modal},backdropTransition:{mountOnEnter:!0,timeout:tl.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class zn extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleStaticBackdropAnimation=this.handleStaticBackdropAnimation.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1,showStaticBackdropAnimation:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._dialog?this._dialog.parentNode:null;if(n&&t.target===n&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.modalIndex{this.setState({showStaticBackdropAnimation:!1})},100)}onOpened(t,n){this.props.onOpened(),(this.props.modalTransition.onEntered||sv)(t,n)}onClosed(t){const{unmountOnClose:n}=this.props;this.props.onClosed(),(this.props.modalTransition.onExited||sv)(t),n&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}setFocus(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}getFocusableChildren(){return this._element.querySelectorAll(JI.join(", "))}getFocusedChild(){let t;const n=this.getFocusableChildren();try{t=document.activeElement}catch{t=n[0]}return t}trapFocus(t){if(!this.props.trapFocus||!this._element||this._dialog&&this._dialog.parentNode===t.target||this.modalIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Ic(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=qI(),zn.openCount<1&&(zn.originalBodyOverflow=window.getComputedStyle(document.body).overflow),GI(),zn.openCount===0&&(document.body.className=me(document.body.className,Fe("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=zn.openCount,zn.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){if(zn.openCount<=1){const t=Fe("modal-open",this.props.cssModule),n=new RegExp(`(^| )${t}( |$)`);document.body.className=document.body.className.replace(n," ").trim(),document.body.style.overflow=zn.originalBodyOverflow}this.manageFocusAfterClose(),zn.openCount=Math.max(0,zn.openCount-1),IC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}renderModalDialog(){const t=Cr(this.props,Zre),n="modal-dialog";return U.createElement("div",$e({},t,{className:Fe(me(n,this.props.className,{[`modal-${this.props.size}`]:this.props.size,[`${n}-centered`]:this.props.centered,[`${n}-scrollable`]:this.props.scrollable,"modal-fullscreen":this.props.fullscreen===!0,[`modal-fullscreen-${this.props.fullscreen}-down`]:typeof this.props.fullscreen=="string"}),this.props.cssModule),role:"document",ref:r=>{this._dialog=r}}),U.createElement("div",{className:Fe(me("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}render(){const{unmountOnClose:t}=this.props;if(this._element&&(this.state.isOpen||!t)){const n=!!this._element&&!this.state.isOpen&&!t;this._element.style.display=n?"none":"block";const{wrapClassName:r,modalClassName:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,external:h,innerRef:p}=this.props,m={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":f,role:c,tabIndex:"-1"},v=this.props.fade,y=We(We(We({},Zt.defaultProps),this.props.modalTransition),{},{baseClass:v?this.props.modalTransition.baseClass:"",timeout:v?this.props.modalTransition.timeout:0}),x=We(We(We({},Zt.defaultProps),this.props.backdropTransition),{},{baseClass:v?this.props.backdropTransition.baseClass:"",timeout:v?this.props.backdropTransition.timeout:0}),_=l&&(v?U.createElement(Zt,$e({},x,{in:a&&!!l,cssModule:s,className:Fe(me("modal-backdrop",o),s)})):U.createElement("div",{className:Fe(me("modal-backdrop","show",o),s)}));return U.createElement(h6,{node:this._element},U.createElement("div",{className:Fe(r)},U.createElement(Zt,$e({},m,y,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("modal",i,this.state.showStaticBackdropAnimation&&"modal-static"),s),innerRef:p}),h,this.renderModalDialog()),_))}return null}}zn.propTypes=p6;zn.defaultProps=Kre;zn.openCount=0;zn.originalBodyOverflow=null;var Uo=zn;const Xre=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"],Qre={children:C.node,className:C.string,close:C.object,closeAriaLabel:C.string,cssModule:C.object,tag:Pe,toggle:C.func,wrapTag:Pe},Jre={tag:"h5",wrapTag:"div",closeAriaLabel:"Close"};function ro(e){let t;const{className:n,cssModule:r,children:i,toggle:o,tag:s,wrapTag:a,closeAriaLabel:l,close:c}=e,f=qe(e,Xre),h=Fe(me(n,"modal-header"),r);return!c&&o&&(t=U.createElement("button",{type:"button",onClick:o,className:Fe("btn-close",r),"aria-label":l})),U.createElement(a,$e({},f,{className:h}),U.createElement(s,{className:Fe("modal-title",r)},i),c||t)}ro.propTypes=Qre;ro.defaultProps=Jre;const eie=["className","cssModule","tag"],tie={className:C.string,cssModule:C.object,tag:Pe},nie={tag:"div"};function ki(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,eie),o=Fe(me(t,"modal-body"),n);return U.createElement(r,$e({},i,{className:o}))}ki.propTypes=tie;ki.defaultProps=nie;const rie=["className","cssModule","tag"],iie={className:C.string,cssModule:C.object,tag:Pe},oie={tag:"div"};function ta(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,rie),o=Fe(me(t,"modal-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ta.propTypes=iie;ta.defaultProps=oie;const sie={placement:"top",autohide:!0,placementPrefix:"bs-tooltip",trigger:"hover focus"};function Xd(e){const t=me("tooltip","show",e.popperClassName),n=me("tooltip-inner",e.innerClassName);return U.createElement(f6,$e({},e,{arrowClassName:"tooltip-arrow",popperClassName:t,innerClassName:n}))}Xd.propTypes=v_;Xd.defaultProps=sie;C.bool,C.bool,C.string,C.object,C.bool,C.bool,C.oneOfType([C.func,C.string,C.object]),C.oneOfType([C.bool,C.string]),C.string,C.bool;const aie=["className","cssModule","tag","flush","horizontal","numbered"],lie={className:C.string,cssModule:C.object,flush:C.bool,horizontal:C.oneOfType([C.bool,C.string]),numbered:C.bool,tag:Pe},cie={tag:"ul",horizontal:!1,numbered:!1},uie=e=>e===!1?!1:e===!0||e==="xs"?"list-group-horizontal":`list-group-horizontal-${e}`;function nE(e){const{className:t,cssModule:n,tag:r,flush:i,horizontal:o,numbered:s}=e,a=qe(e,aie),l=Fe(me(t,"list-group",i?"list-group-flush":uie(o),{"list-group-numbered":s}),n);return U.createElement(r,$e({},a,{className:l}))}nE.propTypes=lie;nE.defaultProps=cie;const fie=["className","cssModule","tag","innerRef"],die={children:C.node,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),className:C.string,cssModule:C.object},hie={tag:"form"};class m6 extends V.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.submit=this.submit.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}submit(){this.ref&&this.ref.submit()}render(){const t=this.props,{className:n,cssModule:r,tag:i,innerRef:o}=t,s=qe(t,fie),a=Fe(n,r);return U.createElement(i,$e({},s,{ref:o,className:a}))}}m6.propTypes=die;m6.defaultProps=hie;C.node,C.string,C.object,C.bool,C.bool;const pie=["className","cssModule","row","disabled","check","inline","floating","tag","switch"],mie={children:C.node,row:C.bool,check:C.bool,switch:C.bool,inline:C.bool,floating:C.bool,disabled:C.bool,tag:Pe,className:C.string,cssModule:C.object},gie={tag:"div"};function vr(e){const{className:t,cssModule:n,row:r,disabled:i,check:o,inline:s,floating:a,tag:l,switch:c}=e,f=qe(e,pie),h=o||c,p=Fe(me(t,r?"row":!1,h?"form-check":"mb-3",c?"form-switch":!1,h&&s?"form-check-inline":!1,h&&i?"disabled":!1,a&&"form-floating"),n);return l==="fieldset"&&(f.disabled=i),U.createElement(l,$e({},f,{className:p}))}vr.propTypes=mie;vr.defaultProps=gie;C.node,C.bool,C.string,C.string,C.object;const vie=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],yie={children:C.node,type:C.string,size:C.oneOfType([C.number,C.string]),bsSize:C.string,valid:C.bool,invalid:C.bool,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),plaintext:C.bool,addon:C.bool,className:C.string,cssModule:C.object},_ie={type:"text"};let rE=class extends U.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.focus=this.focus.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}focus(){this.ref&&this.ref.focus()}render(){let t=this.props,{className:n,cssModule:r,type:i,bsSize:o,valid:s,invalid:a,tag:l,addon:c,plaintext:f,innerRef:h}=t,p=qe(t,vie);const m=["switch","radio","checkbox"].indexOf(i)>-1,v=/\D/g,y=i==="textarea",x=i==="select",_=i==="range";let w=l||(x||y?i:"input"),S="form-control";f?(S=`${S}-plaintext`,w=l||"input"):_?S="form-range":x?S="form-select":m&&(c?S=null:S="form-check-input"),p.size&&v.test(p.size)&&(Iw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),o=p.size,delete p.size);const T=Fe(me(n,a&&"is-invalid",s&&"is-valid",o?x?`form-select-${o}`:`form-control-${o}`:!1,S),r);return(w==="input"||l&&typeof l=="function")&&(p.type=i==="switch"?"checkbox":i),p.children&&!(f||i==="select"||typeof w!="string"||w==="select")&&(Iw(`Input with a type of "${i}" cannot have children. Please use "value"/"defaultValue" instead.`),delete p.children),U.createElement(w,$e({},p,{ref:h,className:T,"aria-invalid":a}))}};rE.propTypes=yie;rE.defaultProps=_ie;var Fc=rE;const bie=["className","cssModule","tag","type","size"],wie={className:C.string,cssModule:C.object,size:C.string,tag:Pe,type:C.string},xie={tag:"div"};function Qd(e){const{className:t,cssModule:n,tag:r,type:i,size:o}=e,s=qe(e,bie),a=Fe(me(t,"input-group",o?`input-group-${o}`:null),n);return e.type==="dropdown"?U.createElement(eu,$e({},s,{className:a})):U.createElement(n6.Provider,{value:{insideInputGroup:!0}},U.createElement(r,$e({},s,{className:a})))}Qd.propTypes=wie;Qd.defaultProps=xie;C.string,C.object;const h1=C.oneOfType([C.number,C.string]),Nl=C.oneOfType([C.bool,C.string,C.number,C.shape({size:h1,order:h1,offset:h1})]);C.node,C.bool,C.bool,C.string,C.string,C.string,C.object,C.array;C.bool,C.bool,C.node,C.string,C.object,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool;function av(){}const y3=C.shape(Zt.propTypes),g6={autoFocus:C.bool,backdrop:C.bool,backdropClassName:C.string,backdropTransition:y3,children:C.node,className:C.string,container:zs,cssModule:C.object,direction:C.oneOf(["start","end","bottom","top"]),fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,offcanvasTransition:y3,onClosed:C.func,onEnter:C.func,onExit:C.func,style:C.object,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,zIndex:C.oneOfType([C.number,C.string])},Sie=Object.keys(g6),Cie={isOpen:!1,autoFocus:!0,direction:"start",scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:av,onClosed:av,offcanvasTransition:{timeout:tl.Offcanvas},backdropTransition:{mountOnEnter:!0,timeout:tl.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class hi extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._backdrop;if(!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.offcanvasIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Ic(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=qI(),GI(),hi.openCount===0&&this.props.backdrop&&!this.props.scrollable&&(document.body.style.overflow="hidden"),this.offcanvasIndex=hi.openCount,hi.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){this.manageFocusAfterClose(),hi.openCount=Math.max(0,hi.openCount-1),document.body.style.overflow=null,IC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}render(){const{direction:t,unmountOnClose:n}=this.props;if(this._element&&(this.state.isOpen||!n)){const r=!!this._element&&!this.state.isOpen&&!n;this._element.style.display=r?"none":"block";const{className:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,style:h}=this.props,p={onKeyUp:this.handleEscape,onKeyDown:this.handleTab,"aria-labelledby":f,role:c,tabIndex:"-1"},m=this.props.fade,v=We(We(We({},Zt.defaultProps),this.props.offcanvasTransition),{},{baseClass:m?this.props.offcanvasTransition.baseClass:"",timeout:m?this.props.offcanvasTransition.timeout:0}),y=We(We(We({},Zt.defaultProps),this.props.backdropTransition),{},{baseClass:m?this.props.backdropTransition.baseClass:"",timeout:m?this.props.backdropTransition.timeout:0}),x=l&&(m?U.createElement(Zt,$e({},y,{in:a&&!!l,innerRef:w=>{this._backdrop=w},cssModule:s,className:Fe(me("offcanvas-backdrop",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})):U.createElement("div",{className:Fe(me("offcanvas-backdrop","show",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})),_=Cr(this.props,Sie);return U.createElement(h6,{node:this._element},U.createElement(Zt,$e({},_,p,v,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("offcanvas",i,`offcanvas-${t}`),s),innerRef:w=>{this._dialog=w},style:We(We({},h),{},{visibility:a?"visible":"hidden"})}),this.props.children),x)}return null}}hi.propTypes=g6;hi.defaultProps=Cie;hi.openCount=0;C.string,C.object;C.node,C.string,C.object,C.string,C.object,C.func;const Eie=["className","listClassName","cssModule","size","tag","listTag","aria-label"],Tie={children:C.node,className:C.string,listClassName:C.string,cssModule:C.object,size:C.string,tag:Pe,listTag:Pe,"aria-label":C.string},Oie={tag:"nav",listTag:"ul","aria-label":"pagination"};function y_(e){const{className:t,listClassName:n,cssModule:r,size:i,tag:o,listTag:s,"aria-label":a}=e,l=qe(e,Eie),c=Fe(me(t),r),f=Fe(me(n,"pagination",{[`pagination-${i}`]:!!i}),r);return U.createElement(o,{className:c,"aria-label":a},U.createElement(s,$e({},l,{className:f})))}y_.propTypes=Tie;y_.defaultProps=Oie;const Pie=["active","className","cssModule","disabled","tag"],kie={active:C.bool,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,tag:Pe},Mie={tag:"li"};function Ms(e){const{active:t,className:n,cssModule:r,disabled:i,tag:o}=e,s=qe(e,Pie),a=Fe(me(n,"page-item",{active:t,disabled:i}),r);return U.createElement(o,$e({},s,{className:a}))}Ms.propTypes=kie;Ms.defaultProps=Mie;const Rie=["className","cssModule","next","previous","first","last","tag"],Nie={"aria-label":C.string,children:C.node,className:C.string,cssModule:C.object,next:C.bool,previous:C.bool,first:C.bool,last:C.bool,tag:Pe},Lie={tag:"a"};function Rs(e){let{className:t,cssModule:n,next:r,previous:i,first:o,last:s,tag:a}=e,l=qe(e,Rie);const c=Fe(me(t,"page-link"),n);let f;i?f="Previous":r?f="Next":o?f="First":s&&(f="Last");const h=e["aria-label"]||f;let p;i?p="‹":r?p="›":o?p="«":s&&(p="»");let{children:m}=e;return m&&Array.isArray(m)&&m.length===0&&(m=null),!l.href&&a==="a"&&(a="button"),(i||r||o||s)&&(m=[U.createElement("span",{"aria-hidden":"true",key:"caret"},m||p),U.createElement("span",{className:"visually-hidden",key:"ariaLabel"},h)]),U.createElement(a,$e({},l,{className:c,"aria-label":h}),m)}Rs.propTypes=Nie;Rs.defaultProps=Lie;const Die=U.createContext({}),v6={tag:Pe,activeTab:C.any,className:C.string,cssModule:C.object},Aie={tag:"div"};class y6 extends V.Component{static getDerivedStateFromProps(t,n){return n.activeTab!==t.activeTab?{activeTab:t.activeTab}:null}constructor(t){super(t),this.state={activeTab:this.props.activeTab}}render(){const{className:t,cssModule:n,tag:r}=this.props,i=Cr(this.props,Object.keys(v6)),o=Fe(me("tab-content",t),n);return U.createElement(Die.Provider,{value:{activeTabId:this.state.activeTab}},U.createElement(r,$e({},i,{className:o})))}}y6.propTypes=v6;y6.defaultProps=Aie;C.string,C.object,C.any;const jie=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"],Iie={children:C.node,className:C.string,closeClassName:C.string,closeAriaLabel:C.string,color:C.string,cssModule:C.object,fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,tag:Pe,toggle:C.func,transition:C.shape(Zt.propTypes)},Fie={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:We(We({},Zt.defaultProps),{},{unmountOnExit:!0})};function iE(e){const{className:t,closeClassName:n,closeAriaLabel:r,cssModule:i,tag:o,color:s,isOpen:a,toggle:l,children:c,transition:f,fade:h,innerRef:p}=e,m=qe(e,jie),v=Fe(me(t,"alert",`alert-${s}`,{"alert-dismissible":l}),i),y=Fe(me("btn-close",n),i),x=We(We(We({},Zt.defaultProps),f),{},{baseClass:h?f.baseClass:"",timeout:h?f.timeout:0});return U.createElement(Zt,$e({},m,x,{tag:o,className:v,in:a,role:"alert",innerRef:p}),l?U.createElement("button",{type:"button",className:y,"aria-label":r,onClick:l}):null,c)}iE.propTypes=Iie;iE.defaultProps=Fie;C.node,C.string,C.object,C.bool,C.bool,C.shape(Zt.propTypes),C.oneOfType([C.object,C.string,C.func]);We(We({},Zt.defaultProps),{},{unmountOnExit:!0});C.string,C.object,C.oneOfType([C.object,C.string,C.func]);C.oneOfType([C.string,C.node]),C.func,C.string,C.object,C.node,C.string,C.oneOfType([C.string,C.number]),C.object,C.string;const $ie=["className","cssModule","tag","active","disabled","action","color"],Bie={action:C.bool,active:C.bool,className:C.string,cssModule:C.object,color:C.string,disabled:C.bool,tag:Pe},zie={tag:"li"},Uie=e=>{e.preventDefault()};function oE(e){const{className:t,cssModule:n,tag:r,active:i,disabled:o,action:s,color:a}=e,l=qe(e,$ie),c=Fe(me(t,i?"active":!1,o?"disabled":!1,s?"list-group-item-action":!1,a?`list-group-item-${a}`:!1,"list-group-item"),n);return o&&(l.onClick=Uie),U.createElement(r,$e({},l,{className:c}))}oE.propTypes=Bie;oE.defaultProps=zie;C.string,C.object;C.string,C.object;const Vie=["className","cssModule","tag","type"],Hie={className:C.string,cssModule:C.object,tag:Pe,type:C.string},Wie={tag:"ul"},sE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i,type:o}=e,s=qe(e,Vie),a=Fe(me(n,o?`list-${o}`:!1),r);return U.createElement(i,$e({},s,{className:a,ref:t}))});sE.name="List";sE.propTypes=Hie;sE.defaultProps=Wie;const Yie=["className","cssModule","tag"],qie={className:C.string,cssModule:C.object,tag:Pe},Gie={tag:"li"},aE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i}=e,o=qe(e,Yie),s=Fe(me(n,"list-inline-item"),r);return U.createElement(i,$e({},o,{className:s,ref:t}))});aE.name="ListInlineItem";aE.propTypes=qie;aE.defaultProps=Gie;const Zie=["defaultOpen"];class Kie extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(qC,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Zie)))}}Kie.propTypes=We({defaultOpen:C.bool},qC.propTypes);const Xie=["toggleEvents","defaultOpen"],Qie={defaultOpen:C.bool,toggler:C.string.isRequired,toggleEvents:C.arrayOf(C.string)},Jie={toggleEvents:ine};class _6 extends V.Component{constructor(t){super(t),this.togglers=null,this.removeEventListeners=null,this.toggle=this.toggle.bind(this),this.state={isOpen:t.defaultOpen||!1}}componentDidMount(){this.togglers=QI(this.props.toggler),this.togglers.length&&(this.removeEventListeners=one(this.togglers,this.toggle,this.props.toggleEvents))}componentWillUnmount(){this.togglers.length&&this.removeEventListeners&&this.removeEventListeners()}toggle(t){this.setState(({isOpen:n})=>({isOpen:!n})),t.preventDefault()}render(){return U.createElement(r6,$e({isOpen:this.state.isOpen},Cr(this.props,Xie)))}}_6.propTypes=Qie;_6.defaultProps=Jie;const eoe=["defaultOpen"];class Jd extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(t){this.setState(n=>({isOpen:!n.isOpen}),()=>{this.props.onToggle&&this.props.onToggle(t,this.state.isOpen)})}render(){return U.createElement(eu,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,eoe)))}}Jd.propTypes=We({defaultOpen:C.bool,onToggle:C.func},eu.propTypes);const toe=["defaultOpen"];class Er extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Xd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,toe)))}}Er.propTypes=We({defaultOpen:C.bool},Xd.propTypes);C.oneOf(["border","grow"]),C.oneOf(["sm"]),C.oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),C.string,C.object,C.string;We(We({},BC.propTypes),{},{color:C.string,tag:Pe,animation:C.oneOf(["glow","wave"]),innerRef:C.oneOfType([C.object,C.func,C.string]),size:C.oneOf(["lg","sm","xs"])});C.string,C.string,C.bool,C.string,C.object;(()=>{if(typeof window!="object"||typeof window.CustomEvent=="function")return;const e=(t,n)=>{n=n||{bubbles:!1,cancelable:!1,detail:null};let r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r};window.CustomEvent=e})();(()=>{if(typeof Object.values=="function")return;Object.values=t=>Object.keys(t).map(n=>t[n])})();const noe="Left",roe="Right",ioe="Up",ooe="Down",nc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},$w={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},_3="mousemove",b3="mouseup",soe="touchend",aoe="touchmove",loe="touchstart";function coe(e,t,n,r){return e>t?n>0?roe:noe:r>0?ooe:ioe}function w3(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function uoe(e,t){const n=f=>{const h="touches"in f;h&&f.touches.length>1||e((p,m)=>{m.trackMouse&&!h&&(document.addEventListener(_3,r),document.addEventListener(b3,s));const{clientX:v,clientY:y}=h?f.touches[0]:f,x=w3([v,y],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),$w),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((h,p)=>{const m="touches"in f;if(m&&f.touches.length>1)return h;if(f.timeStamp-h.start>p.swipeDuration)return h.swiping?Object.assign(Object.assign({},h),{swiping:!1}):h;const{clientX:v,clientY:y}=m?f.touches[0]:f,[x,_]=w3([v,y],p.rotationAngle),w=x-h.xy[0],S=_-h.xy[1],T=Math.abs(w),P=Math.abs(S),k=(f.timeStamp||0)-h.start,N=Math.sqrt(T*T+P*P)/(k||1),D=[w/(k||1),S/(k||1)],z=coe(T,P,w,S),A=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||nc.delta;if(T{e((h,p)=>{let m;if(h.swiping&&h.eventData){if(f.timeStamp-h.start{document.removeEventListener(_3,r),document.removeEventListener(b3,s)},s=f=>{o(),i(f)},a=(f,h)=>{let p=()=>{};if(f&&f.addEventListener){const m=Object.assign(Object.assign({},nc.touchEventOptions),h.touchEventOptions),v=[[loe,n,m],[aoe,r,Object.assign(Object.assign({},m),h.preventScrollOnSwipe?{passive:!1}:{})],[soe,i,m]];v.forEach(([y,x,_])=>f.addEventListener(y,x,_)),p=()=>v.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((h,p)=>{if(h.el===f)return h;const m={};return h.el&&h.el!==f&&h.cleanUpTouch&&(h.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&f&&(m.cleanUpTouch=a(f,p)),Object.assign(Object.assign(Object.assign({},h),{el:f}),m)})}};return t.trackMouse&&(c.onMouseDown=n),[c,a]}function foe(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function doe(e){const{trackMouse:t}=e,n=V.useRef(Object.assign({},$w)),r=V.useRef(Object.assign({},nc)),i=V.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},nc),e);let o;for(o in nc)r.current[o]===void 0&&(r.current[o]=nc[o]);const[s,a]=V.useMemo(()=>uoe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=foe(n.current,r.current,i.current,a),s}var Tp,hoe=new Uint8Array(16);function poe(){if(!Tp&&(Tp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Tp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Tp(hoe)}const moe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function goe(e){return typeof e=="string"&&moe.test(e)}var Fn=[];for(var p1=0;p1<256;++p1)Fn.push((p1+256).toString(16).substr(1));function voe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Fn[e[t+0]]+Fn[e[t+1]]+Fn[e[t+2]]+Fn[e[t+3]]+"-"+Fn[e[t+4]]+Fn[e[t+5]]+"-"+Fn[e[t+6]]+Fn[e[t+7]]+"-"+Fn[e[t+8]]+Fn[e[t+9]]+"-"+Fn[e[t+10]]+Fn[e[t+11]]+Fn[e[t+12]]+Fn[e[t+13]]+Fn[e[t+14]]+Fn[e[t+15]]).toLowerCase();if(!goe(n))throw TypeError("Stringified UUID is invalid");return n}function lE(e,t,n){e=e||{};var r=e.random||(e.rng||poe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return voe(r)}const yoe=2e3,_oe=(e,t)=>(n=!1,r=yoe)=>{const[i,o]=V.useState(n),s=V.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},hn=(e=!1)=>{const[t,n]=V.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},boe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:s})=>s==null?void 0:s.contains("visits-table"))||document.querySelector(".modal")||r()};return doe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},woe=(e,t)=>{const[n,r]=V.useState(t);return[n,o=>{const{location:s,history:a}=window,l=dl(s.search);l[e]=o,a.pushState(null,"",`${s.pathname}?${Vd(l)}`),r(o)}]},xoe=(e,t)=>{const n=V.useRef(!0);V.useEffect(()=>{!n.current&&e(),n.current=!1},t)},na=()=>{const e=Io();return()=>e(-1)},Soe=()=>{const{search:e}=Pn();return dl(e)},__=()=>{const{current:e}=V.useRef(`dom-${lE()}`);return e},hl=()=>V.useRef(null),cn=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Sr,{...r,children:[e&&g.jsx(rl,{role:"heading",children:e}),g.jsx(nl,{className:n,children:t})]});const Coe=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=hn(),o=()=>{i(),n()};return g.jsxs(iE,{className:"app-update-banner",isOpen:e,toggle:t,tag:cn,color:"secondary",children:[g.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),g.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",g.jsxs(ht,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(je,{icon:kQ,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},b6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(cn,{className:"p-4",children:[g.jsx("h2",{children:"Oops! We could not find requested route."}),g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(Lt,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),Eoe=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},cE="#4696e5",Toe="rgba(70, 150, 229, 0.4)",w6="#f77f28",Ooe="rgba(247, 127, 40, 0.4)",Poe="white",koe="#161b22",x6=e=>{var t,n;return(n=(t=document.getElementsByTagName("html"))==null?void 0:t[0])==null?void 0:n.setAttribute("data-theme",e)},Moe=()=>{var e,t;return((t=(e=document.getElementsByTagName("html"))==null?void 0:e[0])==null?void 0:t.getAttribute("data-theme"))==="dark"};const Roe=(e,t,n,r,i,o,s,a)=>({fetchServers:l,servers:c,settings:f,appUpdated:h,resetAppUpdate:p})=>{const v=Pn().pathname==="/";return V.useEffect(()=>{var y;Object.keys(c).length===0&&l(),x6(((y=f.ui)==null?void 0:y.theme)??"light")},[]),g.jsxs("div",{className:"container-fluid app-container",children:[g.jsx(e,{}),g.jsxs("div",{className:"app",children:[g.jsx("div",{className:me("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:g.jsxs(Xy,{children:[g.jsx(gt,{index:!0,element:g.jsx(t,{})}),g.jsx(gt,{path:"/settings/*",element:g.jsx(o,{})}),g.jsx(gt,{path:"/manage-servers",element:g.jsx(s,{})}),g.jsx(gt,{path:"/server/create",element:g.jsx(r,{})}),g.jsx(gt,{path:"/server/:serverId/edit",element:g.jsx(i,{})}),g.jsx(gt,{path:"/server/:serverId/*",element:g.jsx(n,{})}),g.jsx(gt,{path:"*",element:g.jsx(b6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(a,{})})]}),g.jsx(Coe,{isOpen:h,toggle:p,forceUpdate:Eoe})]})};function mi(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:uE(e)?2:fE(e)?3:0}function pc(e,t){return nu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Noe(e,t){return nu(e)===2?e.get(t):e[t]}function S6(e,t,n){var r=nu(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function C6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function uE(e){return Foe&&e instanceof Map}function fE(e){return $oe&&e instanceof Set}function Ta(e){return e.o||e.t}function dE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=T6(e);delete t[At];for(var n=mc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Loe),Object.freeze(e),t&&il(e,function(n,r){return hE(r,!0)},!0)),e}function Loe(){mi(2)}function pE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Xi(e){var t=Vw[e];return t||mi(18,e),t}function Doe(e,t){Vw[e]||(Vw[e]=t)}function Bw(){return _d}function m1(e,t){t&&(Xi("Patches"),e.u=[],e.s=[],e.v=t)}function lv(e){zw(e),e.p.forEach(Aoe),e.p=null}function zw(e){e===_d&&(_d=e.l)}function x3(e){return _d={p:[],l:_d,h:e,m:!0,_:0}}function Aoe(e){var t=e[At];t.i===0||t.i===1?t.j():t.O=!0}function g1(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Xi("ES5").S(t,e,r),r?(n[At].P&&(lv(t),mi(4)),No(e)&&(e=cv(t,e),t.l||uv(t,e)),t.u&&Xi("Patches").M(n[At].t,e,t.u,t.s)):e=cv(t,n,[]),lv(t),t.u&&t.v(t.u,t.s),e!==E6?e:void 0}function cv(e,t,n){if(pE(t))return t;var r=t[At];if(!r)return il(t,function(o,s){return S3(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return uv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=dE(r.k):r.o;il(r.i===3?new Set(i):i,function(o,s){return S3(e,r,i,o,s,n)}),uv(e,i,!1),n&&e.u&&Xi("Patches").R(r,n,e.u,e.s)}return r.o}function S3(e,t,n,r,i,o){if(Us(i)){var s=cv(e,i,o&&t&&t.i!==3&&!pc(t.D,r)?o.concat(r):void 0);if(S6(n,r,s),!Us(s))return;e.m=!1}if(No(i)&&!pE(i)){if(!e.h.F&&e._<1)return;cv(e,i),t&&t.A.l||uv(e,i)}}function uv(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&hE(t,n)}function v1(e,t){var n=e[At];return(n?Ta(n):e)[t]}function C3(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ss(e){e.P||(e.P=!0,e.l&&ss(e.l))}function y1(e){e.o||(e.o=dE(e.t))}function Uw(e,t,n){var r=uE(t)?Xi("MapSet").N(t,n):fE(t)?Xi("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Bw(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=bd;s&&(l=[a],c=Qu);var f=Proxy.revocable(l,c),h=f.revoke,p=f.proxy;return a.k=p,a.j=h,p}(t,n):Xi("ES5").J(t,n);return(n?n.A:Bw()).p.push(r),r}function joe(e){return Us(e)||mi(22,e),function t(n){if(!No(n))return n;var r,i=n[At],o=nu(n);if(i){if(!i.P&&(i.i<4||!Xi("ES5").K(i)))return i.t;i.I=!0,r=E3(n,o),i.I=!1}else r=E3(n,o);return il(r,function(s,a){i&&Noe(i.t,s)===a||S6(r,s,t(a))}),o===3?new Set(r):r}(e)}function E3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dE(e)}function Ioe(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[At];return bd.get(l,o)},set:function(l){var c=this[At];bd.set(c,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][At];if(!a.P)switch(a.i){case 5:r(a)&&ss(a);break;case 4:n(a)&&ss(a)}}}function n(o){for(var s=o.t,a=o.k,l=mc(a),c=l.length-1;c>=0;c--){var f=l[c];if(f!==At){var h=s[f];if(h===void 0&&!pc(s,f))return!0;var p=a[f],m=p&&p[At];if(m?m.t!==h:!C6(p,h))return!0}}var v=!!s[At];return l.length!==mc(s).length+(v?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l1?_-1:0),S=1;S<_;S++)w[S-1]=arguments[S];return l.produce(y,function(T){var P;return(P=o).call.apply(P,[x,T].concat(w))})}}var c;if(typeof o!="function"&&mi(6),s!==void 0&&typeof s!="function"&&mi(7),No(i)){var f=x3(r),h=Uw(r,i,void 0),p=!0;try{c=o(h),p=!1}finally{p?lv(f):zw(f)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return m1(f,s),g1(y,f)},function(y){throw lv(f),y}):(m1(f,s),g1(c,f))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===E6&&(c=void 0),r.F&&hE(c,!0),s){var m=[],v=[];Xi("Patches").M(i,c,m,v),s(m,v)}return c}mi(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var f=arguments.length,h=Array(f>1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Xi("Patches").$;return Us(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ar=new zoe,O6=Ar.produce;Ar.produceWithPatches.bind(Ar);Ar.setAutoFreeze.bind(Ar);Ar.setUseProxies.bind(Ar);Ar.applyPatches.bind(Ar);Ar.createDraft.bind(Ar);Ar.finishDraft.bind(Ar);function Uoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function M3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zn(1));return n(P6)(e,t)}if(typeof e!="function")throw new Error(Zn(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function f(){if(l)throw new Error(Zn(3));return o}function h(y){if(typeof y!="function")throw new Error(Zn(4));if(l)throw new Error(Zn(5));var x=!0;return c(),a.push(y),function(){if(x){if(l)throw new Error(Zn(6));x=!1,c();var w=a.indexOf(y);a.splice(w,1),s=null}}}function p(y){if(!Voe(y))throw new Error(Zn(7));if(typeof y.type>"u")throw new Error(Zn(8));if(l)throw new Error(Zn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=s=a,_=0;_"u")throw new Error(Zn(12));if(typeof n(void 0,{type:fv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zn(13))})}function k6(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Zn(14));h[m]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?h:l}}function dv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)for(var S=m.getState(),T=Array.from(n.values()),P=0,k=T;P!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Lse,resetAppUpdate:Dse}=Rse,Ase=Nse,jse=(e,t)=>{e.serviceFactory("App",Roe,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Lse),e.serviceFactory("resetAppUpdate",()=>Dse)};function pv(e){return t=>{const{resetSelectedServer:n}=t;return V.useEffect(()=>{n()},[]),g.jsx(e,{...t})}}const Ll=({children:e,to:t,className:n,...r})=>g.jsx(nj,{className:({isActive:i})=>me("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Ise=e=>({selectedServer:t,showOnMobile:n=!1})=>{const r=ks(t),i=r?t.id:"",{pathname:o}=Pn(),s=me("aside-menu",{"aside-menu--hidden":!n}),a=l=>`/server/${i}${l}`;return g.jsx("aside",{className:s,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(Ll,{to:a("/overview"),children:[g.jsx(je,{fixedWidth:!0,icon:vQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(Ll,{to:a("/list-short-urls/1"),className:me({"aside-menu__item--selected":o.match("/list-short-urls")!==null}),children:[g.jsx(je,{fixedWidth:!0,icon:qj}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(Ll,{to:a("/create-short-url"),children:[g.jsx(je,{fixedWidth:!0,icon:xQ,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(Ll,{to:a("/manage-tags"),children:[g.jsx(je,{fixedWidth:!0,icon:Zj}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(Ll,{to:a("/manage-domains"),children:[g.jsx(je,{fixedWidth:!0,icon:KX}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),g.jsxs(Ll,{to:a("/edit"),className:"aside-menu__item--push",children:[g.jsx(je,{fixedWidth:!0,icon:oQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),r&&g.jsx(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:t})]})})},Fse=({location:e},{error:t})=>class extends V.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){t(n)}render(){const{hasError:n}=this.state;if(n)return g.jsx("div",{className:"home",children:g.jsxs(cn,{className:"p-4",children:[g.jsx("h1",{children:"Oops! This is awkward :S"}),g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(ht,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}},Si=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});const $se=({id:e,name:t})=>g.jsxs(oE,{tag:Lt,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(je,{icon:OQ,className:"servers-list__server-item-icon"})]}),z6=({servers:e,children:t,embedded:n=!1})=>g.jsxs(g.Fragment,{children:[t&&g.jsx("h5",{className:"mb-md-3",children:t}),e.length>0&&g.jsx(nE,{className:me("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx($se,{id:r,name:i},r))})]}),U6=({color:e=cE,className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})});const Bse=({servers:e})=>{const t=Io(),n=Xc(e),r=!Wn(n);return V.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),g.jsx("div",{className:"home",children:g.jsx(Sr,{className:"home__main-card",children:g.jsxs(Qn,{className:"g-0",children:[g.jsx("div",{className:"col-md-5 d-none d-md-block",children:g.jsx("div",{className:"home__logo-wrapper",children:g.jsx("div",{className:"home__logo",children:g.jsx(U6,{})})})}),g.jsxs("div",{className:"col-md-7 home__servers-container",children:[g.jsx("div",{className:"home__title-wrapper",children:g.jsx("h1",{className:"home__title",children:"Welcome!"})}),g.jsx(z6,{embedded:!0,servers:n,children:!r&&g.jsxs("div",{className:"p-4 text-center",children:[g.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Lt,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(je,{icon:gC})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(Si,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(je,{icon:lQ})]})})})]})})]})]})})})};const zse=e=>()=>{const[t,n,,r]=hn(),i=Pn(),{pathname:o}=i;V.useEffect(r,[i]);const s="/settings",a=me("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(zC,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(UC,{tag:Lt,to:"/",children:[g.jsx(U6,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx(VC,{onClick:n,children:g.jsx(je,{icon:EQ,className:a})}),g.jsx(r6,{navbar:!0,isOpen:t,children:g.jsxs(f_,{navbar:!0,className:"ms-auto",children:[g.jsx(HC,{children:g.jsxs(t6,{tag:Lt,to:s,active:o.startsWith(s),children:[g.jsx(je,{icon:RQ}),"  Settings"]})}),g.jsx(e,{})]})})]})};const ru=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e}),Use=e=>({error:"border-danger",default:""})[e],Vse=e=>({error:"text-danger",default:"text-muted"})[e],So=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=me({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(Qn,{className:me("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Sr,{className:Use(r),body:!0,children:g.jsxs("h3",{className:me("text-center mb-0",Vse(r)),children:[n&&g.jsx(je,{icon:Yj,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})};function V6(e,t){return n=>{const r=Xs(),{selectServer:i,selectedServer:o}=n;return V.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?MZ(o)?g.jsx(t,{}):g.jsx(e,{...n}):g.jsx(ru,{children:g.jsx(So,{loading:!0})})}}const rr=(e,t)=>dse(e,t,{serializeError:QS}),Hse=(e,t)=>{const n=$3(e),r=$3(t),i=n.pop(),o=r.pop(),s=U3(n,r);return s!==0?s:i&&o?U3(i.split("."),o.split(".")):i||o?i?-1:1:0},Yw=(e,t,n)=>{Gse(n);const r=Hse(e,t);return H6[n].includes(r)},Wse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,$3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Wse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},B3=e=>e==="*"||e==="x"||e==="X",z3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Yse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],qse=(e,t)=>{if(B3(e)||B3(t))return 0;const[n,r]=Yse(z3(e),z3(t));return n>r?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},V3=Object.keys(H6),Gse=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(V3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${V3.join("|")}`)},_E=(e,t,n=1)=>nC(n,e+1).map(t),gi=e=>!Fo(e)&&!Wn(e),rh=e=>Dt(t=>t.preventDefault(),e),x1=e=>Wn(e)?null:e,ga=e=>t=>e===t,W6=e=>e?"true":"false",S1=e=>e===void 0?void 0:W6(e),Zse=(e,{maxVersion:t,minVersion:n})=>{if(!gi(e))return!1;const r=!n||Yw(e,n,">=");return(!t||Yw(e,t,"<="))&&r},Y6=Cj(QS,e=>{try{return Yw(e,e,"=")}catch{return!1}}),q6=e=>Y6(e)?`v${e}`:e,G6=(e="latest")=>t=>Y6(t)?t:e,bE="shlink/selectedServer",Kse="1.0.0",Xse="999.999.999",Qse="latest",Jse=Dt(e=>e===Qse?Xse:e,G6(Kse)),eae=Cj(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Jse(n),printableVersion:q6(n)}))),H3=null,wE=yn(`${bE}/resetSelectedServer`),Z6=e=>rr(`${bE}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(wE());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:s}=e(o),{version:a,printableVersion:l}=await eae(o,s);return{...o,version:a,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),tae=(e,t)=>{const n=Mse();return n.startListening({actionCreator:e.fulfilled,effect:({payload:r},{dispatch:i})=>{t_(r)&&i(t())}}),n},nae=e=>Yn({name:bE,initialState:H3,reducers:{},extraReducers:t=>{t.addCase(wE,()=>H3),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Ii=e=>t=>t_(t)&&Zse(t.version,{minVersion:e}),xE={forwardQuery:Ii("2.9.0"),nonRestCors:Ii("2.9.0"),defaultDomainRedirectsEdition:Ii("2.10.0"),nonOrphanVisits:Ii("3.0.0"),allTagsFiltering:Ii("3.0.0"),tagsStats:Ii("3.0.0"),domainVisits:Ii("3.1.0"),excludeBotsOnShortUrls:Ii("3.4.0"),filterDisabledUrls:Ii("3.4.0"),deviceLongUrls:Ii("3.5.0")};Object.freeze(xE);const Pi=(e,t)=>V.useMemo(()=>xE[e](t),[e,Z6]);const rae=(e,t,n,r,i,o,s,a,l,c,f,h,p)=>V6(({selectedServer:m,sidebarNotPresent:v,sidebarPresent:y})=>{const x=Pn(),[_,w,S,T]=hn(),P=t_(m);if(V.useEffect(()=>T(),[x]),V.useEffect(()=>(P&&y(),()=>v()),[]),!P)return g.jsx(c,{});const k=Pi("nonOrphanVisits",m),N=Pi("domainVisits",m),D=me("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),z=boe(S,T);return g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:WX,className:D,onClick:w}),g.jsx("div",{...z,className:"menu-layout__swipeable",children:g.jsxs("div",{className:"menu-layout__swipeable-inner",children:[g.jsx(n,{selectedServer:m,showOnMobile:_}),g.jsx("div",{className:"menu-layout__container",onClick:()=>T(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(Xy,{children:[g.jsx(gt,{index:!0,element:g.jsx(HS,{replace:!0,to:"overview"})}),g.jsx(gt,{path:"/overview",element:g.jsx(f,{})}),g.jsx(gt,{path:"/list-short-urls/:page",element:g.jsx(t,{})}),g.jsx(gt,{path:"/create-short-url",element:g.jsx(r,{})}),g.jsx(gt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(i,{})}),g.jsx(gt,{path:"/short-code/:shortCode/edit",element:g.jsx(h,{})}),g.jsx(gt,{path:"/tag/:tag/visits/*",element:g.jsx(o,{})}),N&&g.jsx(gt,{path:"/domain/:domain/visits/*",element:g.jsx(s,{})}),g.jsx(gt,{path:"/orphan-visits/*",element:g.jsx(a,{})}),k&&g.jsx(gt,{path:"/non-orphan-visits/*",element:g.jsx(l,{})}),g.jsx(gt,{path:"/manage-tags",element:g.jsx(e,{})}),g.jsx(gt,{path:"/manage-domains",element:g.jsx(p,{})}),g.jsx(gt,{path:"*",element:g.jsx(b6,{to:`/server/${m.id}/list-short-urls/1`,children:"List short URLs"})})]})})})]})})]})},c),iae={sidebarPresent:!1},{actions:oae,reducer:sae}=Yn({name:"shlink/sidebar",initialState:iae,reducers:{sidebarPresent:()=>({sidebarPresent:!0}),sidebarNotPresent:()=>({sidebarPresent:!1})}}),{sidebarPresent:aae,sidebarNotPresent:lae}=oae,cae=sae,uae=({children:e})=>{const t=Pn();return V.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},fae="%_VERSION_%",dae=Dt(G6(),q6),W3=({project:e,version:t})=>g.jsx(Si,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),hae=({selectedServer:e,clientVersion:t=fae})=>{const n=dae(t);return g.jsxs("small",{className:"text-muted",children:[t_(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(W3,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(W3,{project:"shlink-web-client",version:n})]})};const pae=({selectedServer:e,sidebar:t})=>{const n=me("text-center",{"shlink-versions-container--with-sidebar":t.sidebarPresent});return g.jsx("div",{className:n,children:g.jsx(hae,{selectedServer:e})})},Y3={"Content-Type":"application/json"},q3=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...Y3}}:{headers:Y3}:e;class mae{constructor(t){xe(this,"fetchJson",(t,n)=>this.fetch(t,q3(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));xe(this,"fetchEmpty",(t,n)=>this.fetch(t,q3(n)).then(async r=>{if(!r.ok)throw await r.json()}));xe(this,"fetchBlob",t=>this.fetch(t).then(n=>n.blob()));this.fetch=t}}const K6=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},X6=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);K6(e,i,n)};class gae{constructor(t,n){this.httpClient=t,this.window=n}async saveImage(t,n){const r=await this.httpClient.fetchBlob(t),i=URL.createObjectURL(r);K6(this.window,i,n)}}class vae{constructor(t,n){xe(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});xe(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});xe(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);X6(this.window,r,t)});this.window=t,this.jsonToCsv=n}}const yae=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",mae,"fetch"),e.service("ImageDownloader",gae,"HttpClient","window"),e.service("ReportExporter",vae,"window","jsonToCsv"),e.serviceFactory("ScrollToTop",()=>uae),e.serviceFactory("MainHeader",zse,"ServersDropdown"),e.serviceFactory("Home",()=>Bse),e.decorator("Home",pv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("MenuLayout",rae,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),e.decorator("MenuLayout",t(["selectedServer"],["selectServer","sidebarPresent","sidebarNotPresent"])),e.serviceFactory("AsideMenu",Ise,"DeleteServerButton"),e.serviceFactory("ShlinkVersionsContainer",()=>pae),e.decorator("ShlinkVersionsContainer",t(["selectedServer","sidebar"])),e.serviceFactory("ErrorHandler",Fse,"window","console"),e.serviceFactory("sidebarPresent",()=>aae),e.serviceFactory("sidebarNotPresent",()=>lae)};const Vo=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:s=!1,minWidth:a,inline:l,outline:c,size:f})=>{const[h,p]=hn(),m=me("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),v={minWidth:a&&`${a}px`};return g.jsxs(eu,{isOpen:h,toggle:p,disabled:t,className:i,children:[g.jsx(Zd,{size:f,outline:c,caret:!o,className:m,color:"primary",children:e}),g.jsx(tu,{className:"w-100",end:s,style:v,children:r})]})};const _ae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,s]=hn(),{domains:a}=n,l=Wn(t),c=()=>r("");return V.useEffect(()=>{e()},[]),i?g.jsxs(Qd,{children:[g.jsx(Fc,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),g.jsx(ht,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Dt(c,s),children:g.jsx(je,{icon:dQ})}),g.jsx(Er,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(Vo,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[a.map(({domain:f,isDefault:h})=>g.jsxs(Ue,{active:(t===f||h)&&l,onClick:()=>r(f),children:[f,h&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:Dt(c,o),children:g.jsx("i",{children:"New domain"})})]})},Lo=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,OX(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Nr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(Qn,{className:n,children:g.jsx("div",{className:me({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(cn,{role:"document",className:me("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:me({"p-2":r}),children:e})})});const bae=500;let Op;const ih=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,s]=V.useState(i),a=()=>{Op&&clearTimeout(Op),Op=null},l=(c,f=bae)=>{s(c),a(),Op=setTimeout(()=>{e(c),a()},f)};return g.jsxs("div",{className:me("search-field",t),children:[g.jsx("input",{type:"text",className:me("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),g.jsx(je,{icon:CQ,className:"search-field__icon"}),g.jsx("div",{className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})},w_=({children:e,minWidth:t})=>g.jsx(Vo,{text:g.jsx(je,{className:"px-1",icon:mQ}),size:"sm",minWidth:t,end:!0,outline:!0,noCaret:!0,inline:!0,children:e}),Tf=(e,t,n)=>Fo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,wae=(e,t)=>!e.domain&&t===E5?!0:e.domain===t,xae=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls,validateUrl:n}:{longUrl:"",validateUrl:n}},Q6="__",Sae=e=>e.replaceAll("/",Q6),hm=e=>e.replaceAll(Q6,"/");function Qe(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pm=function(n){return typeof n}:pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pm(e)}function Me(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||pm(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function pl(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function to(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mm=function(n){return typeof n}:mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mm(e)}function Cae(e,t){if(Oe(2,arguments),!t||mm(t)!=="object")return new Date(NaN);var n=t.years?Qe(t.years):0,r=t.months?Qe(t.months):0,i=t.weeks?Qe(t.weeks):0,o=t.days?Qe(t.days):0,s=t.hours?Qe(t.hours):0,a=t.minutes?Qe(t.minutes):0,l=t.seconds?Qe(t.seconds):0,c=Me(e),f=r||n?to(c,r+n*12):c,h=o||i?pl(f,o+i*7):f,p=a+s*60,m=l+p*60,v=m*1e3,y=new Date(h.getTime()+v);return y}function SE(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Qe(t);return new Date(n+r)}var Eae=36e5;function Tae(e,t){Oe(2,arguments);var n=Qe(t);return SE(e,n*Eae)}var Oae={};function Ho(){return Oae}function J6(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Ho(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function kae(e){Oe(1,arguments);var t=Pae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=xd(n);return r}function $c(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Lr(e){Oe(1,arguments);var t=Me(e);return t.setHours(0,0,0,0),t}var Mae=864e5;function Sd(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t),i=n.getTime()-$c(n),o=r.getTime()-$c(r);return Math.round((i-o)/Mae)}var Rae=6e4;function qw(e,t){Oe(2,arguments);var n=Qe(t);return SE(e,n*Rae)}function CE(e,t){Oe(2,arguments);var n=Qe(t),r=n*7;return pl(e,r)}function Bc(e,t){Oe(2,arguments);var n=Qe(t);return to(e,n*12)}function gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gm=function(n){return typeof n}:gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function G3(e){Oe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(gm(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Me(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function ym(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var EE=6e4,x_=36e5,Nae=1e3;function Lae(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t);return n.getTime()===r.getTime()}function _m(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_m=function(n){return typeof n}:_m=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_m(e)}function TE(e){return Oe(1,arguments),e instanceof Date||_m(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function e5(e){if(Oe(1,arguments),!TE(e)&&typeof e!="number")return!1;var t=Me(e);return!isNaN(Number(t))}function Cd(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Gw(e){Oe(1,arguments);var t=Me(e),n=Math.floor(t.getMonth()/3)+1;return n}function mv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()-r.getFullYear()}function K3(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function OE(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=K3(n,r),o=Math.abs(Sd(n,r));n.setDate(n.getDate()-i*o);var s=+(K3(n,r)===-i),a=i*(o-s);return a===0?0:a}function t5(e,t){return Oe(2,arguments),Me(e).getTime()-Me(t).getTime()}var X3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Dae="trunc";function PE(e){return e?X3[e]:X3[Dae]}function Aae(e,t,n){Oe(2,arguments);var r=t5(e,t)/x_;return PE(n==null?void 0:n.roundingMethod)(r)}function ol(e){Oe(1,arguments);var t=Me(e);return t.setHours(23,59,59,999),t}function jae(e){Oe(1,arguments);var t=Me(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Iae(e){Oe(1,arguments);var t=Me(e);return ol(t).getTime()===jae(t).getTime()}function gv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=ym(n,r),o=Math.abs(Cd(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=ym(n,r)===-i;Iae(Me(e))&&o===1&&ym(e,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function Fae(e,t,n){Oe(2,arguments);var r=t5(e,t)/1e3;return PE(n==null?void 0:n.roundingMethod)(r)}function $ae(e,t,n){Oe(2,arguments);var r=OE(e,t)/7;return PE(n==null?void 0:n.roundingMethod)(r)}function Zw(e){Oe(1,arguments);var t=Me(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Bae(e){Oe(1,arguments);var t=Me(e);return t.setDate(1),t.setHours(0,0,0,0),t}function zae(e){Oe(1,arguments);var t=Me(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Uae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Ho(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Yae(e){Oe(1,arguments);var t=r5(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=zc(n);return r}var qae=6048e5;function i5(e){Oe(1,arguments);var t=Me(e),n=zc(t).getTime()-Yae(t).getTime();return Math.round(n/qae)+1}function sl(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Ho(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getUTCDay(),v=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(h+1,0,m),v.setUTCHours(0,0,0,0);var y=sl(v,t),x=new Date(0);x.setUTCFullYear(h,0,m),x.setUTCHours(0,0,0,0);var _=sl(x,t);return f.getTime()>=y.getTime()?h+1:f.getTime()>=_.getTime()?h:h-1}function Gae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Ho(),h=Qe((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=kE(e,t),m=new Date(0);m.setUTCFullYear(p,0,h),m.setUTCHours(0,0,0,0);var v=sl(m,t);return v}var Zae=6048e5;function o5(e,t){Oe(1,arguments);var n=Me(e),r=sl(n,t).getTime()-Gae(n,t).getTime();return Math.round(r/Zae)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return tt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):tt(r+1,2)},d:function(t,n){return tt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return tt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return tt(t.getUTCHours(),n.length)},m:function(t,n){return tt(t.getUTCMinutes(),n.length)},s:function(t,n){return tt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return tt(o,n.length)}};const Ko=Kae;var Dl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xae={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Ko.y(t,n)},Y:function(t,n,r,i){var o=kE(t,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return tt(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):tt(s,n.length)},R:function(t,n){var r=r5(t);return tt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return tt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return tt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return Ko.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=o5(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=i5(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):tt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ko.d(t,n)},D:function(t,n,r){var i=Wae(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return tt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return tt(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return tt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=Dl.noon:i===0?o=Dl.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=Dl.evening:i>=12?o=Dl.afternoon:i>=4?o=Dl.morning:o=Dl.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Ko.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ko.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ko.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Ko.s(t,n)},S:function(t,n){return Ko.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return J3(s);case"XXXX":case"XX":return Oa(s);case"XXXXX":case"XXX":default:return Oa(s,":")}},x:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"x":return J3(s);case"xxxx":case"xx":return Oa(s);case"xxxxx":case"xxx":default:return Oa(s,":")}},O:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Q3(s,":");case"OOOO":default:return"GMT"+Oa(s,":")}},z:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Q3(s,":");case"zzzz":default:return"GMT"+Oa(s,":")}},t:function(t,n,r,i){var o=i._originalDate||t,s=Math.floor(o.getTime()/1e3);return tt(s,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,s=o.getTime();return tt(s,n.length)}};function Q3(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=t||"";return n+String(i)+s+tt(o,2)}function J3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Oa(e,t)}function Oa(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),s=tt(i%60,2);return r+o+n+s}const Qae=Xae;var eR=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},s5=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Jae=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return eR(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",eR(i,n)).replace("{{time}}",s5(o,n))},ele={p:s5,P:Jae};const Kw=ele;var tle=["D","DD"],nle=["YY","YYYY"];function a5(e){return tle.indexOf(e)!==-1}function l5(e){return nle.indexOf(e)!==-1}function vv(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rle={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ile=function(t,n,r){var i,o=rle[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const ole=ile;function C1(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var sle={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ale={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lle={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cle={date:C1({formats:sle,defaultWidth:"full"}),time:C1({formats:ale,defaultWidth:"full"}),dateTime:C1({formats:lle,defaultWidth:"full"})};const ule=cle;var fle={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dle=function(t,n,r,i){return fle[t]};const hle=dle;function Iu(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var ple={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gle={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vle={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},yle={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_le={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ble=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},wle={ordinalNumber:ble,era:Iu({values:ple,defaultWidth:"wide"}),quarter:Iu({values:mle,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Iu({values:gle,defaultWidth:"wide"}),day:Iu({values:vle,defaultWidth:"wide"}),dayPeriod:Iu({values:yle,defaultWidth:"wide",formattingValues:_le,defaultFormattingWidth:"wide"})};const xle=wle;function Fu(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Cle(a,function(h){return h.test(s)}):Sle(a,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(s.length);return{value:c,rest:f}}}function Sle(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Cle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var Tle=/^(\d+)(th|st|nd|rd)?/i,Ole=/\d+/i,Ple={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kle={any:[/^b/i,/^(a|c)/i]},Mle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rle={any:[/1/i,/2/i,/3/i,/4/i]},Nle={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Lle={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Dle={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ale={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},jle={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ile={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Fle={ordinalNumber:Ele({matchPattern:Tle,parsePattern:Ole,valueCallback:function(t){return parseInt(t,10)}}),era:Fu({matchPatterns:Ple,defaultMatchWidth:"wide",parsePatterns:kle,defaultParseWidth:"any"}),quarter:Fu({matchPatterns:Mle,defaultMatchWidth:"wide",parsePatterns:Rle,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Fu({matchPatterns:Nle,defaultMatchWidth:"wide",parsePatterns:Lle,defaultParseWidth:"any"}),day:Fu({matchPatterns:Dle,defaultMatchWidth:"wide",parsePatterns:Ale,defaultParseWidth:"any"}),dayPeriod:Fu({matchPatterns:jle,defaultMatchWidth:"any",parsePatterns:Ile,defaultParseWidth:"any"})};const $le=Fle;var Ble={code:"en-US",formatDistance:ole,formatLong:ule,formatRelative:hle,localize:xle,match:$le,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ME=Ble;var zle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ule=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vle=/^'([^]*?)'?$/,Hle=/''/g,Wle=/[a-zA-Z]/;function vo(e,t,n){var r,i,o,s,a,l,c,f,h,p,m,v,y,x,_,w,S,T;Oe(2,arguments);var P=String(t),k=Ho(),N=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:ME,D=Qe((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(h=k.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=Qe((m=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(_=n.locale)===null||_===void 0||(w=_.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:k.weekStartsOn)!==null&&v!==void 0?v:(S=k.locale)===null||S===void 0||(T=S.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&m!==void 0?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var A=Me(e);if(!e5(A))throw new RangeError("Invalid time value");var W=$c(A),Y=n5(A,W),J={firstWeekContainsDate:D,weekStartsOn:z,locale:N,_originalDate:A},Z=P.match(Ule).map(function(ee){var ie=ee[0];if(ie==="p"||ie==="P"){var oe=Kw[ie];return oe(ee,N.formatLong)}return ee}).join("").match(zle).map(function(ee){if(ee==="''")return"'";var ie=ee[0];if(ie==="'")return Yle(ee);var oe=Qae[ie];if(oe)return!(n!=null&&n.useAdditionalWeekYearTokens)&&l5(ee)&&vv(ee,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&a5(ee)&&vv(ee,t,String(e)),oe(Y,ee,N.localize,J);if(ie.match(Wle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");return ee}).join("");return Z}function Yle(e){var t=e.match(Vle);return t?t[1].replace(Hle,"'"):e}function RE(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function qle(e){return RE({},e)}var tR=1440,Gle=2520,E1=43200,Zle=86400;function Kle(e,t,n){var r,i;Oe(2,arguments);var o=Ho(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:ME;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=ym(e,t);if(isNaN(a))throw new RangeError("Invalid time value");var l=RE(qle(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),c,f;a>0?(c=Me(t),f=Me(e)):(c=Me(e),f=Me(t));var h=Fae(f,c),p=($c(f)-$c(c))/1e3,m=Math.round((h-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):m===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",m,l);if(m<45)return s.formatDistance("xMinutes",m,l);if(m<90)return s.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Gr(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getTime()"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _v(e){return _v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_v(e)}function NE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}function sR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vce=function(e){hce(n,e);var t=pce(n);function n(){var r;fce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,s=Math.floor(o/100)*100,a=e>=o%100;i=e+s-(a?100:0)}return n?i:1-i}function m5(e){return e%400===0||e%4===0&&e%100!==0}function xm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xm=function(n){return typeof n}:xm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xm(e)}function yce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}function lR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cce=function(e){bce(n,e);var t=wce(n);function n(){var r;yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=p5(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Sm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sm=function(n){return typeof n}:Sm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sm(e)}function Ece(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function uR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rce=function(e){Oce(n,e);var t=Pce(n);function n(){var r;Ece(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var l=kE(i,a);if(s.isTwoDigitYear){var c=p5(s.year,l);return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}var f=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(f,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}}]),n}(pt);function Cm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cm=function(n){return typeof n}:Cm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cm(e)}function Nce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}function dR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fce=function(e){Dce(n,e);var t=Ace(n);function n(){var r;Nce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function pR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wce=function(e){zce(n,e);var t=Uce(n);function n(){var r;$ce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function gR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qce=function(e){Gce(n,e);var t=Zce(n);function n(){var r;Yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Om(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Om=function(n){return typeof n}:Om=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Om(e)}function Jce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ov(e){return Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ov(e)}function yR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oue=function(e){tue(n,e);var t=nue(n);function n(){var r;Jce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pm=function(n){return typeof n}:Pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pm(e)}function sue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _R(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pv(e)}function bR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var due=function(e){lue(n,e);var t=cue(n);function n(){var r;sue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?km=function(n){return typeof n}:km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},km(e)}function hue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function xR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _ue=function(e){mue(n,e);var t=gue(n);function n(){var r;hue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function bue(e,t,n){Oe(2,arguments);var r=Me(e),i=Qe(t),o=o5(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}function Mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mm=function(n){return typeof n}:Mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mm(e)}function wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}function CR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oue=function(e){Sue(n,e);var t=Cue(n);function n(){var r;wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return sl(bue(i,s,a),a)}}]),n}(pt);function Pue(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=i5(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}function Rm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rm=function(n){return typeof n}:Rm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function kue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ER(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}function TR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Aue=function(e){Rue(n,e);var t=Nue(n);function n(){var r;kue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return zc(Pue(i,s))}}]),n}(pt);function Nm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nm=function(n){return typeof n}:Nm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function jue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nv(e){return Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Nv(e)}function T1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uue=[31,28,31,30,31,30,31,31,30,31,30,31],Vue=[31,29,31,30,31,30,31,31,30,31,30,31],Hue=function(e){Fue(n,e);var t=$ue(n);function n(){var r;jue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=Vue[l]:o>=1&&o<=Uue[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Dm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dm=function(n){return typeof n}:Dm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dm(e)}function Wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}function O1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xue=function(e){que(n,e);var t=Gue(n);function n(){var r;Wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function AE(e,t,n){var r,i,o,s,a,l,c,f;Oe(2,arguments);var h=Ho(),p=Qe((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Me(e),v=Qe(t),y=m.getUTCDay(),x=v%7,_=(x+7)%7,w=(_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}function MR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ife=function(e){efe(n,e);var t=tfe(n);function n(){var r;Que(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Im(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Im=function(n){return typeof n}:Im=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Im(e)}function ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function NR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ffe=function(e){afe(n,e);var t=lfe(n);function n(){var r;ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Fm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fm=function(n){return typeof n}:Fm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fm(e)}function dfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function DR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yfe=function(e){pfe(n,e);var t=mfe(n);function n(){var r;dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function _fe(e,t){Oe(2,arguments);var n=Qe(t);n%7===0&&(n=n-7);var r=1,i=Me(e),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}function jR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tfe=function(e){xfe(n,e);var t=Sfe(n);function n(){var r;bfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=7}},{key:"set",value:function(i,o,s){return i=_fe(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Bm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bm=function(n){return typeof n}:Bm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bm(e)}function Ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function FR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lfe=function(e){kfe(n,e);var t=Mfe(n);function n(){var r;Ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $v(e){return $v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$v(e)}function BR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bfe=function(e){jfe(n,e);var t=Ife(n);function n(){var r;Dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function UR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qfe=function(e){Vfe(n,e);var t=Hfe(n);function n(){var r;zfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zv(e){return zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(e)}function HR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ede=function(e){Kfe(n,e);var t=Xfe(n);function n(){var r;Gfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Hm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hm=function(n){return typeof n}:Hm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hm(e)}function tde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function YR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ade=function(e){rde(n,e);var t=ide(n);function n(){var r;tde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Wm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wm=function(n){return typeof n}:Wm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wm(e)}function lde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vv(e)}function GR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pde=function(e){ude(n,e);var t=fde(n);function n(){var r;lde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Ym(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ym=function(n){return typeof n}:Ym=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ym(e)}function mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function KR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wde=function(e){vde(n,e);var t=yde(n);function n(){var r;mde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(pt);function qm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qm=function(n){return typeof n}:qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qm(e)}function xde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function QR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pde=function(e){Cde(n,e);var t=Ede(n);function n(){var r;xde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(pt);function Gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gm=function(n){return typeof n}:Gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gm(e)}function kde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yv(e)}function eN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ade=function(e){Rde(n,e);var t=Nde(n);function n(){var r;kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(pt);function Zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zm=function(n){return typeof n}:Zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zm(e)}function jde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function nN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ude=function(e){Fde(n,e);var t=$de(n);function n(){var r;jde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gv(e){return Gv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function iN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zde=function(e){Wde(n,e);var t=Yde(n);function n(){var r;Vde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}function sN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nhe=function(e){Qde(n,e);var t=Jde(n);function n(){var r;Kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function lN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var che=function(e){ohe(n,e);var t=she(n);function n(){var r;rhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xv(e){return Xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xv(e)}function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ghe=function(e){dhe(n,e);var t=hhe(n);function n(){var r;uhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=yhe(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. + `);return Array.prototype.forEach.call(o,s=>{Array.prototype.forEach.call(i,a=>{a.addEventListener(s,t,r)})}),function(){Array.prototype.forEach.call(o,a=>{Array.prototype.forEach.call(i,l=>{l.removeEventListener(a,t,r)})})}}const JI=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'];C.oneOfType([C.bool,C.string]),C.string,C.object;const sne=["className","cssModule","noGutters","tag","widths"],ane=["xs","sm","md","lg","xl","xxl"],Ml=C.oneOfType([C.number,C.string]),lne={tag:Pe,noGutters:KI(C.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:C.string,cssModule:C.object,xs:Ml,sm:Ml,md:Ml,lg:Ml,xl:Ml,xxl:Ml,widths:C.array},cne={tag:"div",widths:ane};function Qn(e){const{className:t,cssModule:n,noGutters:r,tag:i,widths:o}=e,s=qe(e,sne),a=[];o.forEach((c,f)=>{let h=e[c];if(delete s[c],!h)return;const p=!f;a.push(p?`row-cols-${h}`:`row-cols-${c}-${h}`)});const l=Fe(me(t,r?"gx-0":null,"row",a),n);return U.createElement(i,$e({},s,{className:l}))}Qn.propTypes=lne;Qn.defaultProps=cne;const une=["className","cssModule","widths","tag"],e6=["xs","sm","md","lg","xl","xxl"],p3=C.oneOfType([C.number,C.string]),Rl=C.oneOfType([C.bool,C.number,C.string,C.shape({size:C.oneOfType([C.bool,C.number,C.string]),order:p3,offset:p3})]),fne={tag:Pe,xs:Rl,sm:Rl,md:Rl,lg:Rl,xl:Rl,xxl:Rl,className:C.string,cssModule:C.object,widths:C.array},dne={tag:"div",widths:e6},m3=(e,t,n)=>n===!0||n===""?e?"col":`col-${t}`:n==="auto"?e?"col-auto":`col-${t}-auto`:e?`col-${n}`:`col-${t}-${n}`,hne=(e,t,n=e6)=>{const r=e,i=[];return n.forEach((o,s)=>{let a=r[o];if(delete r[o],!a&&a!=="")return;const l=!s;if(iv(a)){const c=l?"-":`-${o}-`,f=m3(l,o,a.size);i.push(Fe(me({[f]:a.size||a.size==="",[`order${c}${a.order}`]:a.order||a.order===0,[`offset${c}${a.offset}`]:a.offset||a.offset===0}),t))}else{const c=m3(l,o,a);i.push(c)}}),{colClasses:i,modifiedAttributes:r}};function BC(e){const{className:t,cssModule:n,widths:r,tag:i}=e,o=qe(e,une);let{modifiedAttributes:s,colClasses:a}=hne(o,n,r);a.length||a.push("col");const l=Fe(me(t,a),n);return U.createElement(i,$e({},s,{className:l}))}BC.propTypes=fne;BC.defaultProps=dne;const pne=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"],mne={children:C.node,className:C.string,color:C.string,container:C.oneOfType([C.bool,C.string]),cssModule:C.object,dark:C.bool,expand:C.oneOfType([C.bool,C.string]),fixed:C.string,full:C.bool,light:C.bool,role:C.string,sticky:C.string,tag:Pe},gne={tag:"nav",expand:!1,container:"fluid"},vne=e=>e===!1?!1:e===!0||e==="xs"?"navbar-expand":`navbar-expand-${e}`;function zC(e){const{expand:t,className:n,cssModule:r,light:i,dark:o,fixed:s,sticky:a,color:l,container:c,tag:f,children:h}=e,p=qe(e,pne),m=Fe(me(n,"navbar",vne(t),{"navbar-light":i,"navbar-dark":o,[`bg-${l}`]:l,[`fixed-${s}`]:s,[`sticky-${a}`]:a}),r),v=c&&c===!0?"container":`container-${c}`;return U.createElement(f,$e({},p,{className:m}),c?U.createElement("div",{className:v},h):h)}zC.propTypes=mne;zC.defaultProps=gne;const yne=["className","cssModule","tag"],_ne={className:C.string,cssModule:C.object,tag:Pe},bne={tag:"a"};function UC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,yne),o=Fe(me(t,"navbar-brand"),n);return U.createElement(r,$e({},i,{className:o}))}UC.propTypes=_ne;UC.defaultProps=bne;C.string,C.object,C.bool;const wne=["className","cssModule","children","tag"],xne={className:C.string,cssModule:C.object,tag:Pe,type:C.string,children:C.node},Sne={tag:"button",type:"button"};function VC(e){const{className:t,cssModule:n,children:r,tag:i}=e,o=qe(e,wne),s=Fe(me(t,"navbar-toggler"),n);return U.createElement(i,$e({"aria-label":"Toggle navigation"},o,{className:s}),r||U.createElement("span",{className:Fe("navbar-toggler-icon",n)}))}VC.propTypes=xne;VC.defaultProps=Sne;const Cne=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],Ene={card:C.bool,className:C.string,cssModule:C.object,fill:C.bool,horizontal:C.oneOf(["center","end"]),justified:C.bool,navbar:C.bool,pills:C.bool,tabs:C.bool,tag:Pe,vertical:C.oneOfType([C.bool,C.string])},Tne={tag:"ul",vertical:!1},One=e=>e===!1?!1:e===!0||e==="xs"?"flex-column":`flex-${e}-column`;function f_(e){const{className:t,cssModule:n,tabs:r,pills:i,vertical:o,horizontal:s,justified:a,fill:l,navbar:c,card:f,tag:h}=e,p=qe(e,Cne),m=Fe(me(t,c?"navbar-nav":"nav",s?`justify-content-${s}`:!1,One(o),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":a,"nav-fill":l}),n);return U.createElement(h,$e({},p,{className:m}))}f_.propTypes=Ene;f_.defaultProps=Tne;const Pne=["className","cssModule","active","tag"],kne={active:C.bool,className:C.string,cssModule:C.object,tag:Pe},Mne={tag:"li"};function HC(e){const{className:t,cssModule:n,active:r,tag:i}=e,o=qe(e,Pne),s=Fe(me(t,"nav-item",r?"active":!1),n);return U.createElement(i,$e({},o,{className:s}))}HC.propTypes=kne;HC.defaultProps=Mne;const Rne=["className","cssModule","active","tag","innerRef"],Nne={active:C.bool,className:C.string,cssModule:C.object,disabled:C.bool,href:C.any,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,tag:Pe},Lne={tag:"a"};class WC extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled){t.preventDefault();return}this.props.href==="#"&&t.preventDefault(),this.props.onClick&&this.props.onClick(t)}render(){let t=this.props,{className:n,cssModule:r,active:i,tag:o,innerRef:s}=t,a=qe(t,Rne);const l=Fe(me(n,"nav-link",{disabled:a.disabled,active:i}),r);return U.createElement(o,$e({},a,{ref:s,onClick:this.onClick,className:l}))}}WC.propTypes=Nne;WC.defaultProps=Lne;var t6=WC;C.string,C.node,C.string,C.object,C.string;C.bool,C.string,C.object;const Dne=["className","cssModule","variant","innerRef"],Ane={active:C.bool,"aria-label":C.string,onClick:C.func,variant:C.oneOf(["white"]),className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])},jne={"aria-label":"close"};function YC(e){const{className:t,cssModule:n,variant:r,innerRef:i}=e,o=qe(e,Dne),s=Fe(me(t,"btn-close",r&&`btn-close-${r}`));return U.createElement("button",$e({ref:i,type:"button",className:s},o))}YC.propTypes=Ane;YC.defaultProps=jne;const Ine=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"],Fne={active:C.bool,"aria-label":C.string,block:C.bool,children:C.node,className:C.string,cssModule:C.object,close:C.bool,color:C.string,disabled:C.bool,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,outline:C.bool,size:C.string,tag:Pe},$ne={color:"secondary",tag:"button"};function ht(e){const t=V.useCallback(x=>{if(e.disabled){x.preventDefault();return}if(e.onClick)return e.onClick(x)},[e.onClick,e.disabled]);let{active:n,"aria-label":r,block:i,className:o,close:s,cssModule:a,color:l,outline:c,size:f,tag:h,innerRef:p}=e,m=qe(e,Ine);if(s)return U.createElement(YC,m);const v=`btn${c?"-outline":""}-${l}`,y=Fe(me(o,"btn",v,f?`btn-${f}`:!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),a);return m.href&&h==="button"&&(h="a"),U.createElement(h,$e({type:h==="button"&&m.onClick?"button":void 0},m,{className:y,ref:p,onClick:t,"aria-label":r}))}ht.propTypes=Fne;ht.defaultProps=$ne;C.func,C.func,C.func,C.bool,C.string,C.object;const yd=U.createContext({}),n6=U.createContext({}),Bne=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"],zne={a11y:C.bool,disabled:C.bool,direction:C.oneOf(["up","down","start","end","left","right"]),group:C.bool,isOpen:C.bool,nav:C.bool,active:C.bool,size:C.string,tag:Pe,toggle:C.func,children:C.node,className:C.string,cssModule:C.object,dropup:C.bool,inNavbar:C.bool,setActiveFromChild:C.bool,menuRole:C.oneOf(["listbox","menu"])},Une={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},Vne=[mt.space,mt.enter,mt.up,mt.down,mt.end,mt.home];class d_ extends U.Component{constructor(t){super(t),this.addEvents=this.addEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.removeEvents=this.removeEvents.bind(this),this.toggle=this.toggle.bind(this),this.handleMenuRef=this.handleMenuRef.bind(this),this.handleToggleRef=this.handleToggleRef.bind(this),this.containerRef=U.createRef(),this.menuRef=U.createRef(),this.toggleRef=U.createRef()}componentDidMount(){this.handleProps()}componentDidUpdate(t){this.props.isOpen!==t.isOpen&&this.handleProps()}componentWillUnmount(){this.removeEvents()}handleMenuRef(t){this.menuRef.current=t}handleToggleRef(t){this.toggleRef.current=t}handleDocumentClick(t){if(t&&(t.which===3||t.type==="keyup"&&t.which!==mt.tab))return;const n=this.getContainer(),r=this.getMenu(),i=this.getToggle(),o=t.target===i,s=r&&r.contains(t.target)&&r!==t.target;let a=!1;n&&(a=n.classList.contains("input-group")&&n.classList.contains("dropdown")&&t.target.tagName==="INPUT"),!((o&&!a||s)&&(t.type!=="keyup"||t.which===mt.tab))&&this.toggle(t)}handleKeyDown(t){const n=t.target.getAttribute("role")==="menuitem"||t.target.getAttribute("role")==="option",r=this.getMenuCtrl()===t.target,i=mt.tab===t.which;if(!(/input|textarea/i.test(t.target.tagName)||i&&!this.props.a11y||i&&!(n||r))&&((Vne.indexOf(t.which)!==-1||t.which>=48&&t.which<=90)&&t.preventDefault(),!this.props.disabled&&(r&&([mt.space,mt.enter,mt.up,mt.down].indexOf(t.which)>-1?(this.props.isOpen||this.toggle(t),setTimeout(()=>this.getMenuItems()[0].focus())):this.props.isOpen&&i?(t.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&t.which===mt.esc&&this.toggle(t)),this.props.isOpen&&n))){if([mt.tab,mt.esc].indexOf(t.which)>-1)this.toggle(t),this.getMenuCtrl().focus();else if([mt.space,mt.enter].indexOf(t.which)>-1)t.target.click(),this.getMenuCtrl().focus();else if([mt.down,mt.up].indexOf(t.which)>-1||[mt.n,mt.p].indexOf(t.which)>-1&&t.ctrlKey){const o=this.getMenuItems();let s=o.indexOf(t.target);mt.up===t.which||mt.p===t.which&&t.ctrlKey?s=s!==0?s-1:o.length-1:(mt.down===t.which||mt.n===t.which&&t.ctrlKey)&&(s=s===o.length-1?0:s+1),o[s].focus()}else if(mt.end===t.which){const o=this.getMenuItems();o[o.length-1].focus()}else if(mt.home===t.which)this.getMenuItems()[0].focus();else if(t.which>=48&&t.which<=90){const o=this.getMenuItems(),s=String.fromCharCode(t.which).toLowerCase();for(let a=0;adocument.addEventListener(t,this.handleDocumentClick,!0))}removeEvents(){["click","touchstart","keyup"].forEach(t=>document.removeEventListener(t,this.handleDocumentClick,!0))}toggle(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle(t)}render(){const t=Cr(this.props,["toggle","disabled","inNavbar","a11y"]),{className:n,cssModule:r,direction:i,isOpen:o,group:s,size:a,nav:l,setActiveFromChild:c,active:f,tag:h,menuRole:p}=t,m=qe(t,Bne),v=h||(l?"li":"div");let y=!1;c&&U.Children.map(this.props.children[1].props.children,_=>{_&&_.props.active&&(y=!0)});const x=Fe(me(n,l&&f?"active":!1,c&&y?"active":!1,{"btn-group":s,[`btn-group-${a}`]:!!a,dropdown:!s,dropup:i==="up",dropstart:i==="start"||i==="left",dropend:i==="end"||i==="right",show:o,"nav-item":l}),r);return this.context.insideInputGroup?U.createElement(yd.Provider,{value:this.getContextValue()},U.createElement(QM,null,U.Children.map(this.props.children,_=>U.cloneElement(_,{onKeyDown:this.handleKeyDown})))):U.createElement(yd.Provider,{value:this.getContextValue()},U.createElement(QM,null,U.createElement(v,$e({},m,{[typeof v=="string"?"ref":"innerRef"]:this.containerRef,onKeyDown:this.handleKeyDown,className:x}))))}}d_.propTypes=zne;d_.defaultProps=Une;d_.contextType=n6;var eu=d_;const Hne={children:C.node};function qC(e){return U.createElement(eu,$e({group:!0},e))}qC.propTypes=Hne;C.string,C.string,C.object,C.string,C.string,C.bool;C.string,C.string,C.object,C.string;const Wne=["className","cssModule","divider","tag","header","active","text"],Yne={children:C.node,active:C.bool,disabled:C.bool,divider:C.bool,tag:Pe,header:C.bool,onClick:C.func,className:C.string,cssModule:C.object,toggle:C.bool,text:C.bool},qne={tag:"button",toggle:!0};class h_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this),this.getTabIndex=this.getTabIndex.bind(this)}onClick(t){const{disabled:n,header:r,divider:i,text:o}=this.props;if(n||r||i||o){t.preventDefault();return}this.props.onClick&&this.props.onClick(t),this.props.toggle&&this.context.toggle(t)}getRole(){return this.context.menuRole==="listbox"?"option":"menuitem"}getTabIndex(){const{disabled:t,header:n,divider:r,text:i}=this.props;return t||n||r||i?"-1":"0"}render(){const t=this.getTabIndex(),n=t>-1?this.getRole():void 0;let r=Cr(this.props,["toggle"]),{className:i,cssModule:o,divider:s,tag:a,header:l,active:c,text:f}=r,h=qe(r,Wne);const p=Fe(me(i,{disabled:h.disabled,"dropdown-item":!s&&!l&&!f,active:c,"dropdown-header":l,"dropdown-divider":s,"dropdown-item-text":f}),o);return a==="button"&&(l?a="h6":s?a="div":h.href?a="a":f&&(a="span")),U.createElement(a,$e({type:a==="button"&&(h.onClick||this.props.toggle)?"button":void 0},h,{tabIndex:t,role:n,className:p,onClick:this.onClick}))}}h_.propTypes=Yne;h_.defaultProps=qne;h_.contextType=yd;var Ue=h_;const Gne=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"],Zne={tag:Pe,children:C.node.isRequired,dark:C.bool,end:C.bool,flip:C.bool,modifiers:C.array,className:C.string,cssModule:C.object,style:C.object,persist:C.bool,strategy:C.string,container:zs,updateOnSelect:C.bool,right:KI(C.bool,'Please use "end" instead.')},Kne={tag:"div",flip:!0,modifiers:[]},Xne={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"};class p_ extends U.Component{getRole(){return this.context.menuRole==="listbox"?"listbox":"menu"}render(){const t=this.props,{className:n,cssModule:r,dark:i,end:o,right:s,tag:a,flip:l,modifiers:c,persist:f,strategy:h,container:p,updateOnSelect:m}=t,v=qe(t,Gne),y=Fe(me(n,"dropdown-menu",{"dropdown-menu-dark":i,"dropdown-menu-end":o||s,show:this.context.isOpen}),r),x=a;if(f||this.context.isOpen&&!this.context.inNavbar){const T=`${Xne[this.context.direction]||"bottom"}-${o||s?"end":"start"}`,P=[...c,{name:"flip",enabled:!!l}],k=U.createElement(WI,{placement:T,modifiers:P,strategy:h},({ref:N,style:D,placement:z,update:A})=>{let W=We(We({},this.props.style),D);const Y=J=>{N(J);const{onMenuRef:Z}=this.context;Z&&Z(J)};return U.createElement(x,$e({tabIndex:"-1",role:this.getRole(),ref:Y},v,{style:W,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":z,onClick:()=>m&&A()}))});return p?$a.createPortal(k,Ic(p)):k}const{onMenuRef:_}=this.context;return U.createElement(x,$e({tabIndex:"-1",role:this.getRole()},v,{ref:_,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":v.placement}))}}p_.propTypes=Zne;p_.defaultProps=Kne;p_.contextType=yd;var tu=p_;const Qne=["className","color","cssModule","caret","split","nav","tag","innerRef"],Jne={caret:C.bool,color:C.string,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,onClick:C.func,"aria-haspopup":C.bool,split:C.bool,tag:Pe,nav:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func])},ere={color:"secondary","aria-haspopup":!0};class m_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled||this.context.disabled){t.preventDefault();return}this.props.nav&&!this.props.tag&&t.preventDefault(),this.props.onClick&&this.props.onClick(t),this.context.toggle(t)}getRole(){return this.context.menuRole||this.props["aria-haspopup"]}render(){const t=this.props,{className:n,color:r,cssModule:i,caret:o,split:s,nav:a,tag:l,innerRef:c}=t,f=qe(t,Qne),h=f["aria-label"]||"Toggle Dropdown",p=Fe(me(n,{"dropdown-toggle":o||s,"dropdown-toggle-split":s,"nav-link":a}),i),m=typeof f.children<"u"?f.children:U.createElement("span",{className:"visually-hidden"},h);let v;return a&&!l?(v="a",f.href="#"):l?v=l:(v=ht,f.color=r,f.cssModule=i),this.context.inNavbar?U.createElement(v,$e({},f,{className:p,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m})):U.createElement(qte,{innerRef:c},({ref:y})=>{const x=_=>{y(_);const{onToggleRef:w}=this.context;w&&w(_)};return U.createElement(v,$e({},f,{[typeof v=="string"?"ref":"innerRef"]:x,className:p,onClick:this.onClick,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m}))})}}m_.propTypes=Jne;m_.defaultProps=ere;m_.contextType=yd;var Zd=m_;const tre=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"],nre=We(We({},zo.propTypes),{},{children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,baseClass:C.string,baseClassActive:C.string,className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])}),rre=We(We({},zo.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:tl.Fade,appear:!0,enter:!0,exit:!0,in:!0});function Zt(e){const{tag:t,baseClass:n,baseClassActive:r,className:i,cssModule:o,children:s,innerRef:a}=e,l=qe(e,tre),c=ZI(l,rv),f=Cr(l,rv);return U.createElement(zo,c,h=>{const m=Fe(me(i,n,h==="entered"&&r),o);return U.createElement(t,$e({className:m},f,{ref:a}),s)})}Zt.propTypes=nre;Zt.defaultProps=rre;U.createContext({});C.node,C.string,C.object,C.bool,C.oneOfType([C.object,C.string,C.func]),C.oneOfType([C.array,C.string]).isRequired,C.func.isRequired;C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.node,C.oneOfType([C.array,C.string]),C.bool;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.string.isRequired;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]);const ire=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],ore=We(We({},zo.propTypes),{},{horizontal:C.bool,isOpen:C.bool,children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,className:C.node,navbar:C.bool,cssModule:C.object,innerRef:C.shape({current:C.object})}),sre=We(We({},zo.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:tl.Collapse}),are={[go.ENTERING]:"collapsing",[go.ENTERED]:"collapse show",[go.EXITING]:"collapsing",[go.EXITED]:"collapse"};function lre(e){return are[e]||"collapse"}class GC extends V.Component{constructor(t){super(t),this.state={dimension:null},this.nodeRef=t.innerRef||U.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(n=>{this[n]=this[n].bind(this)})}onEntering(t,n){const r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,n)}onEntered(t,n){const r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,n)}onExit(){const t=this.getNode();this.setState({dimension:this.getDimension(t)}),this.props.onExit(t)}onExiting(){const t=this.getNode();this.getDimension(t),this.setState({dimension:0}),this.props.onExiting(t)}onExited(){const t=this.getNode();this.setState({dimension:null}),this.props.onExited(t)}getNode(){return this.nodeRef.current}getDimension(t){return this.props.horizontal?t.scrollWidth:t.scrollHeight}render(){const t=this.props,{tag:n,horizontal:r,isOpen:i,className:o,navbar:s,cssModule:a,children:l,innerRef:c}=t,f=qe(t,ire),{dimension:h}=this.state,p=ZI(f,rv),m=Cr(f,rv);return U.createElement(zo,$e({},p,{in:i,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),v=>{let y=lre(v);const x=Fe(me(o,r&&"collapse-horizontal",y,s&&"navbar-collapse"),a),_=h===null?null:{[r?"width":"height"]:h};return U.createElement(n,$e({},m,{style:We(We({},m.style),_),className:x,ref:this.nodeRef}),l)})}}GC.propTypes=ore;GC.defaultProps=sre;var r6=GC;C.string.isRequired,C.string,C.node,C.object,C.oneOfType([C.object,C.string,C.func]);C.node,C.string,C.string,C.object,C.oneOfType([C.object,C.func,C.string]),C.bool;const cre=["className","cssModule","color","body","inverse","outline","tag","innerRef"],ure={body:C.bool,className:C.string,color:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),inverse:C.bool,outline:C.bool,tag:Pe},fre={tag:"div"};function Sr(e){const{className:t,cssModule:n,color:r,body:i,inverse:o,outline:s,tag:a,innerRef:l}=e,c=qe(e,cre),f=Fe(me(t,"card",o?"text-white":!1,i?"card-body":!1,r?`${s?"border":"bg"}-${r}`:!1),n);return U.createElement(a,$e({},c,{className:f,ref:l}))}Sr.propTypes=ure;Sr.defaultProps=fre;C.string,C.object;C.string,C.object;C.string,C.object;const dre=["className","cssModule","innerRef","tag"],hre={className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),tag:Pe},pre={tag:"div"};function nl(e){const{className:t,cssModule:n,innerRef:r,tag:i}=e,o=qe(e,dre),s=Fe(me(t,"card-body"),n);return U.createElement(i,$e({},o,{className:s,ref:r}))}nl.propTypes=hre;nl.defaultProps=pre;C.oneOfType([C.object,C.func,C.string]),C.string,C.object;const mre=["className","cssModule","tag"],gre={className:C.string,cssModule:C.object,tag:Pe},vre={tag:"div"};function ZC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,mre),o=Fe(me(t,"card-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ZC.propTypes=gre;ZC.defaultProps=vre;const yre=["className","cssModule","tag"],_re={className:C.string,cssModule:C.object,tag:Pe},bre={tag:"div"};function rl(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,yre),o=Fe(me(t,"card-header"),n);return U.createElement(r,$e({},i,{className:o}))}rl.propTypes=_re;rl.defaultProps=bre;C.bool,C.string,C.object,C.bool;C.string,C.object;const dm=U.createContext({}),wre=["in","children","cssModule","slide","tag","className"];class g_ extends U.Component{constructor(t){super(t),this.state={startAnimation:!1},this.onEnter=this.onEnter.bind(this),this.onEntering=this.onEntering.bind(this),this.onExit=this.onExit.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onEnter(t,n){this.setState({startAnimation:!1}),this.props.onEnter(t,n)}onEntering(t,n){const{offsetHeight:r}=t;return this.setState({startAnimation:!0}),this.props.onEntering(t,n),r}onExit(t){this.setState({startAnimation:!1}),this.props.onExit(t)}onExiting(t){this.setState({startAnimation:!0}),t.dispatchEvent(new CustomEvent("slide.bs.carousel")),this.props.onExiting(t)}onExited(t){t.dispatchEvent(new CustomEvent("slid.bs.carousel")),this.props.onExited(t)}render(){const t=this.props,{in:n,children:r,cssModule:i,slide:o,tag:s,className:a}=t,l=qe(t,wre);return U.createElement(zo,$e({},l,{enter:o,exit:o,in:n,onEnter:this.onEnter,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),c=>{const{direction:f}=this.context,h=c===go.ENTERED||c===go.EXITING,p=(c===go.ENTERING||c===go.EXITING)&&this.state.startAnimation&&(f==="end"?"carousel-item-start":"carousel-item-end"),m=c===go.ENTERING&&(f==="end"?"carousel-item-next":"carousel-item-prev"),v=Fe(me(a,"carousel-item",h&&"active",p,m),i);return U.createElement(s,{className:v},r)})}}g_.propTypes=We(We({},zo.propTypes),{},{tag:Pe,in:C.bool,cssModule:C.object,children:C.node,slide:C.bool,className:C.string});g_.defaultProps=We(We({},zo.defaultProps),{},{tag:"div",timeout:tl.Carousel,slide:!0});g_.contextType=dm;var i6=g_;const xre=40,o6={activeIndex:C.number,next:C.func.isRequired,previous:C.func.isRequired,keyboard:C.bool,pause:C.oneOf(["hover",!1]),ride:C.oneOf(["carousel"]),interval:C.oneOfType([C.number,C.string,C.bool]),children:C.array,mouseEnter:C.func,mouseLeave:C.func,slide:C.bool,dark:C.bool,fade:C.bool,cssModule:C.object,className:C.string,enableTouch:C.bool},Sre=Object.keys(o6),Cre={interval:5e3,pause:"hover",keyboard:!0,slide:!0,enableTouch:!0,fade:!1};class KC extends U.Component{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.renderItems=this.renderItems.bind(this),this.hoverStart=this.hoverStart.bind(this),this.hoverEnd=this.hoverEnd.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.touchStartX=0,this.touchStartY=0,this.state={activeIndex:this.props.activeIndex,direction:"end",indicatorClicked:!1}}componentDidMount(){this.props.ride==="carousel"&&this.setInterval(),document.addEventListener("keyup",this.handleKeyPress)}static getDerivedStateFromProps(t,n){let r=null,{activeIndex:i,direction:o,indicatorClicked:s}=n;return t.activeIndex!==i&&(t.activeIndex===i+1?o="end":t.activeIndex===i-1?o="start":t.activeIndex{this.props.next()},parseInt(this.props.interval,10)))}clearInterval(){clearInterval(this.cycleInterval)}hoverStart(...t){this.props.pause==="hover"&&this.clearInterval(),this.props.mouseEnter&&this.props.mouseEnter(...t)}hoverEnd(...t){this.props.pause==="hover"&&this.setInterval(),this.props.mouseLeave&&this.props.mouseLeave(...t)}renderItems(t,n){const{slide:r}=this.props;return U.createElement("div",{className:n},t.map((i,o)=>{const s=o===this.state.activeIndex;return U.cloneElement(i,{in:s,slide:r})}))}render(){const{cssModule:t,slide:n,className:r,dark:i,fade:o}=this.props,s=Cr(this.props,Sre),a=Fe(me(r,"carousel",o&&"carousel-fade",n&&"slide",i&&"carousel-dark"),t),l=Fe(me("carousel-inner"),t),c=this.props.children.filter(_=>_!=null&&typeof _!="boolean");if(c.every(_=>_.type===i6))return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},this.renderItems(c,l)));if(c[0]instanceof Array){const _=c[0],w=c[1],S=c[2];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},this.renderItems(_,l),w,S))}const h=c[0],p=_=>{typeof h.props.onClickHandler=="function"&&this.setState({indicatorClicked:!0},()=>h.props.onClickHandler(_))},m=U.cloneElement(h,{onClickHandler:p}),v=c[1],y=c[2],x=c[3];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},m,this.renderItems(v,l),y,x))}}KC.propTypes=o6;KC.defaultProps=Cre;var Ere=KC;const Tre=["direction","onClickHandler","cssModule","directionText","className"];function Fw(e){const{direction:t,onClickHandler:n,cssModule:r,directionText:i,className:o}=e,s=qe(e,Tre),a=Fe(me(o,`carousel-control-${t}`),r),l=Fe(me(`carousel-control-${t}-icon`),r),c=Fe(me("visually-hidden"),r);return U.createElement("a",$e({},s,{className:a,style:{cursor:"pointer"},role:"button",tabIndex:"0",onClick:f=>{f.preventDefault(),n()}}),U.createElement("span",{className:l,"aria-hidden":"true"}),U.createElement("span",{className:c},i||t))}Fw.propTypes={direction:C.oneOf(["prev","next"]).isRequired,onClickHandler:C.func.isRequired,cssModule:C.object,directionText:C.string,className:C.string};const Ore=["items","activeIndex","cssModule","onClickHandler","className"];function s6(e){const{items:t,activeIndex:n,cssModule:r,onClickHandler:i,className:o}=e,s=qe(e,Ore),a=Fe(me(o,"carousel-indicators"),r),l=t.map((c,f)=>{const h=Fe(me({active:n===f}),r);return U.createElement("button",{"aria-label":c.caption,"data-bs-target":!0,type:"button",key:`${c.key||Object.values(c).join("")}`,onClick:p=>{p.preventDefault(),i(f)},className:h})});return U.createElement("div",$e({className:a},s),l)}s6.propTypes={activeIndex:C.number.isRequired,className:C.string,cssModule:C.object,items:C.array.isRequired,onClickHandler:C.func.isRequired};function a6(e){const{captionHeader:t,captionText:n,cssModule:r,className:i}=e,o=Fe(me(i,"carousel-caption","d-none","d-md-block"),r);return U.createElement("div",{className:o},U.createElement("h3",null,t),U.createElement("p",null,n))}a6.propTypes={captionHeader:C.node,captionText:C.node.isRequired,className:C.string,cssModule:C.object};const Pre=["defaultActiveIndex","autoPlay","indicators","controls","items","goToIndex"],kre={items:C.array.isRequired,indicators:C.bool,controls:C.bool,autoPlay:C.bool,defaultActiveIndex:C.number,activeIndex:C.number,next:C.func,previous:C.func,goToIndex:C.func};class l6 extends V.Component{constructor(t){super(t),this.animating=!1,this.state={activeIndex:t.defaultActiveIndex||0},this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.goToIndex=this.goToIndex.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onExiting(){this.animating=!0}onExited(){this.animating=!1}next(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===this.props.items.length-1?0:t.activeIndex+1}))}previous(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===0?this.props.items.length-1:t.activeIndex-1}))}goToIndex(t){this.animating||this.setState({activeIndex:t})}render(){const t=this.props,{defaultActiveIndex:n,autoPlay:r,indicators:i,controls:o,items:s,goToIndex:a}=t,l=qe(t,Pre),{activeIndex:c}=this.state,f=s.map(h=>{const p=h.key||h.src;return U.createElement(i6,{onExiting:this.onExiting,onExited:this.onExited,key:p},U.createElement("img",{className:"d-block w-100",src:h.src,alt:h.altText}),U.createElement(a6,{captionText:h.caption,captionHeader:h.header||h.caption}))});return U.createElement(Ere,$e({activeIndex:c,next:this.next,previous:this.previous,ride:r?"carousel":void 0},l),i&&U.createElement(s6,{items:s,activeIndex:l.activeIndex||c,onClickHandler:a||this.goToIndex}),f,o&&U.createElement(Fw,{direction:"prev",directionText:"Previous",onClickHandler:l.previous||this.previous}),o&&U.createElement(Fw,{direction:"next",directionText:"Next",onClickHandler:l.next||this.next}))}}l6.propTypes=kre;l6.defaultProps={controls:!0,indicators:!0,autoPlay:!0};C.string,C.object;const Mre=["className","cssModule","tag"],Rre={className:C.string,cssModule:C.object,tag:Pe},Nre={tag:"p"};function XC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Mre),o=Fe(me(t,"card-text"),n);return U.createElement(r,$e({},i,{className:o}))}XC.propTypes=Rre;XC.defaultProps=Nre;const Lre=["className","cssModule","tag"],Dre={className:C.string,cssModule:C.object,tag:Pe},Are={tag:"div"};function QC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Lre),o=Fe(me(t,"card-title"),n);return U.createElement(r,$e({},i,{className:o}))}QC.propTypes=Dre;QC.defaultProps=Are;const jre=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function Ire(){}const Fre={children:C.oneOfType([C.node,C.func]).isRequired,popperClassName:C.string,placement:C.string,placementPrefix:C.string,arrowClassName:C.string,hideArrow:C.bool,tag:Pe,isOpen:C.bool,cssModule:C.object,offset:C.arrayOf(C.number),fallbackPlacements:C.array,flip:C.bool,container:zs,target:zs.isRequired,modifiers:C.array,strategy:C.string,boundariesElement:C.oneOfType([C.string,FC]),onClosed:C.func,fade:C.bool,transition:C.shape(Zt.propTypes)},$re={boundariesElement:"scrollParent",placement:"auto",hideArrow:!1,isOpen:!1,offset:[0,0],flip:!0,container:"body",modifiers:[],onClosed:Ire,fade:!0,transition:We({},Zt.defaultProps)};class JC extends U.Component{constructor(t){super(t),this.setTargetNode=this.setTargetNode.bind(this),this.getTargetNode=this.getTargetNode.bind(this),this.getRef=this.getRef.bind(this),this.onClosed=this.onClosed.bind(this),this.state={isOpen:t.isOpen}}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}componentDidUpdate(){this._element&&this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()}onClosed(){this.props.onClosed(),this.setState({isOpen:!1})}getTargetNode(){return this.targetNode}getContainerNode(){return Ic(this.props.container)}getRef(t){this._element=t}setTargetNode(t){this.targetNode=typeof t=="string"?Ic(t):t}renderChildren(){const t=this.props,{cssModule:n,children:r,isOpen:i,flip:o,target:s,offset:a,fallbackPlacements:l,placementPrefix:c,arrowClassName:f,hideArrow:h,popperClassName:p,tag:m,container:v,modifiers:y,strategy:x,boundariesElement:_,onClosed:w,fade:S,transition:T,placement:P}=t,k=qe(t,jre),N=Fe(me("arrow",f),n),D=Fe(me(p,c?`${c}-auto`:""),this.props.cssModule),z=y.map(J=>J.name),W=[...[{name:"offset",options:{offset:a}},{name:"flip",enabled:o,options:{fallbackPlacements:l}},{name:"preventOverflow",options:{boundary:_}}].filter(J=>!z.includes(J.name)),...y],Y=We(We(We({},Zt.defaultProps),T),{},{baseClass:S?T.baseClass:"",timeout:S?T.timeout:0});return U.createElement(Zt,$e({},Y,k,{in:i,onExited:this.onClosed,tag:m}),U.createElement(WI,{referenceElement:this.targetNode,modifiers:W,placement:P,strategy:x},({ref:J,style:Z,placement:ee,isReferenceHidden:ie,arrowProps:oe,update:G})=>U.createElement("div",{ref:J,style:Z,className:D,"data-popper-placement":ee,"data-popper-reference-hidden":ie?"true":void 0},typeof r=="function"?r({update:G}):r,!h&&U.createElement("span",{ref:oe.ref,className:N,style:oe.style}))))}render(){return this.setTargetNode(this.props.target),this.state.isOpen?this.props.container==="inline"?this.renderChildren():$a.createPortal(U.createElement("div",{ref:this.getRef},this.renderChildren()),this.getContainerNode()):null}}JC.propTypes=Fre;JC.defaultProps=$re;var Bre=JC;C.object.isRequired;zs.isRequired;const v_={children:C.oneOfType([C.node,C.func]),placement:C.oneOf(tne),target:zs.isRequired,container:zs,isOpen:C.bool,disabled:C.bool,hideArrow:C.bool,boundariesElement:C.oneOfType([C.string,FC]),className:C.string,innerClassName:C.string,arrowClassName:C.string,popperClassName:C.string,cssModule:C.object,toggle:C.func,autohide:C.bool,placementPrefix:C.string,delay:C.oneOfType([C.shape({show:C.number,hide:C.number}),C.number]),modifiers:C.array,strategy:C.string,offset:C.arrayOf(C.number),innerRef:C.oneOfType([C.func,C.string,C.object]),trigger:C.string,fade:C.bool,flip:C.bool},c6={show:0,hide:50},zre={isOpen:!1,hideArrow:!1,autohide:!1,delay:c6,toggle:function(){},trigger:"click",fade:!0};function u6(e,t){return t&&(e===t||t.contains(e))}function g3(e,t=[]){return t&&t.length&&t.filter(n=>u6(e,n))[0]}class eE extends U.Component{constructor(t){super(t),this._targets=[],this.currentTargetElement=null,this.addTargetEvents=this.addTargetEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.removeTargetEvents=this.removeTargetEvents.bind(this),this.toggle=this.toggle.bind(this),this.showWithDelay=this.showWithDelay.bind(this),this.hideWithDelay=this.hideWithDelay.bind(this),this.onMouseOverTooltipContent=this.onMouseOverTooltipContent.bind(this),this.onMouseLeaveTooltipContent=this.onMouseLeaveTooltipContent.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.onEscKeyDown=this.onEscKeyDown.bind(this),this.getRef=this.getRef.bind(this),this.state={isOpen:t.isOpen},this._isMounted=!1}componentDidMount(){this._isMounted=!0,this.updateTarget()}componentWillUnmount(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}handleDocumentClick(t){const n=this.props.trigger.split(" ");n.indexOf("legacy")>-1&&(this.props.isOpen||g3(t.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!u6(t.target,this._popover)?this.hideWithDelay(t):this.props.isOpen||this.showWithDelay(t)):n.indexOf("click")>-1&&g3(t.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(t):this.showWithDelay(t))}onMouseOverTooltipContent(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}onMouseLeaveTooltipContent(t){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),t.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide")))}onEscKeyDown(t){t.key==="Escape"&&this.hide(t)}getRef(t){const{innerRef:n}=this.props;n&&(typeof n=="function"?n(t):typeof n=="object"&&(n.current=t)),this._popover=t}getDelay(t){const{delay:n}=this.props;return typeof n=="object"?isNaN(n[t])?c6[t]:n[t]:n}getCurrentTarget(t){if(!t)return null;const n=this._targets.indexOf(t);return n>=0?this._targets[n]:this.getCurrentTarget(t.parentElement)}show(t){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=t?t.currentTarget||this.getCurrentTarget(t.target):null,t&&t.composedPath&&typeof t.composedPath=="function"){const n=t.composedPath();this.currentTargetElement=n&&n[0]||this.currentTargetElement}this.toggle(t)}}showWithDelay(t){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,t),this.getDelay("show"))}hide(t){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(t))}hideWithDelay(t){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide"))}clearShowTimeout(){clearTimeout(this._showTimeout),this._showTimeout=void 0}clearHideTimeout(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}addEventOnTargets(t,n,r){this._targets.forEach(i=>{i.addEventListener(t,n,r)})}removeEventOnTargets(t,n,r){this._targets.forEach(i=>{i.removeEventListener(t,n,r)})}addTargetEvents(){if(this.props.trigger){let t=this.props.trigger.split(" ");t.indexOf("manual")===-1&&((t.indexOf("click")>-1||t.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(t.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),t.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}removeTargetEvents(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}updateTarget(){const t=Ic(this.props.target,!0);t!==this._targets&&(this.removeTargetEvents(),this._targets=t?Array.from(t):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}toggle(t){return this.props.disabled||!this._isMounted?t&&t.preventDefault():this.props.toggle(t)}render(){this.props.isOpen&&this.updateTarget();const t=this.currentTargetElement||this._targets[0];if(!t)return null;const{className:n,cssModule:r,innerClassName:i,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:h,container:p,modifiers:m,strategy:v,offset:y,fade:x,flip:_,children:w}=this.props,S=Cr(this.props,Object.keys(v_)),T=Fe(h,r),P=Fe(i,r);return U.createElement(Bre,{className:n,target:t,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:T,container:p,modifiers:m,strategy:v,offset:y,cssModule:r,fade:x,flip:_},({update:k})=>U.createElement("div",$e({},S,{ref:this.getRef,className:P,role:"tooltip",onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent,onKeyDown:this.onEscKeyDown}),typeof w=="function"?w({update:k}):w))}}eE.propTypes=v_;eE.defaultProps=zre;var f6=eE;const Ure={placement:"right",placementPrefix:"bs-popover",trigger:"click",offset:[0,8]};function Kd(e){const t=me("popover","show",e.popperClassName),n=me("popover-inner",e.innerClassName);return U.createElement(f6,$e({},e,{arrowClassName:"popover-arrow",popperClassName:t,innerClassName:n}))}Kd.propTypes=v_;Kd.defaultProps=Ure;const Vre=["defaultOpen"];class Hre extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Kd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Vre)))}}Hre.propTypes=We({defaultOpen:C.bool},Kd.propTypes);C.string,C.object;C.string,C.object;const Wre=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"],Yre={animated:C.bool,bar:C.bool,barAriaLabelledBy:C.string,barAriaValueText:C.string,barClassName:C.string,barStyle:C.object,children:C.node,className:C.string,cssModule:C.object,color:C.string,max:C.oneOfType([C.string,C.number]),min:C.oneOfType([C.string,C.number]),multi:C.bool,striped:C.bool,style:C.object,tag:Pe,value:C.oneOfType([C.string,C.number])},qre={tag:"div",value:0,min:0,max:100,style:{},barStyle:{}};function tE(e){const{children:t,className:n,barClassName:r,cssModule:i,value:o,min:s,max:a,animated:l,striped:c,color:f,bar:h,multi:p,tag:m,style:v,barStyle:y,barAriaValueText:x,barAriaLabelledBy:_}=e,w=qe(e,Wre),S=h3(o)/h3(a)*100,T=Fe(me(n,"progress"),i),k={className:Fe(me("progress-bar",h&&n||r,l?"progress-bar-animated":null,f?`bg-${f}`:null,c||l?"progress-bar-striped":null),i),style:We(We(We({},h?v:{}),y),{},{width:`${S}%`}),role:"progressbar","aria-valuenow":o,"aria-valuemin":s,"aria-valuemax":a,"aria-valuetext":x,"aria-labelledby":_,children:t};return h?U.createElement(m,$e({},w,k)):U.createElement(m,$e({},w,{style:v,className:T}),p?t:U.createElement("div",k))}tE.propTypes=Yre;tE.defaultProps=qre;const Gre={children:C.node.isRequired,node:C.any};class d6 extends U.Component{componentWillUnmount(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}render(){return $C?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),$a.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}d6.propTypes=Gre;var h6=d6;function sv(){}const v3=C.shape(Zt.propTypes),p6={autoFocus:C.bool,backdrop:C.oneOfType([C.bool,C.oneOf(["static"])]),backdropClassName:C.string,backdropTransition:v3,centered:C.bool,children:C.node,contentClassName:C.string,className:C.string,container:zs,cssModule:C.object,external:C.node,fade:C.bool,fullscreen:C.oneOfType([C.bool,C.oneOf(["sm","md","lg","xl"])]),innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,modalClassName:C.string,modalTransition:v3,onClosed:C.func,onEnter:C.func,onExit:C.func,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,size:C.string,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,wrapClassName:C.string,zIndex:C.oneOfType([C.number,C.string])},Zre=Object.keys(p6),Kre={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:sv,onClosed:sv,modalTransition:{timeout:tl.Modal},backdropTransition:{mountOnEnter:!0,timeout:tl.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class zn extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleStaticBackdropAnimation=this.handleStaticBackdropAnimation.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1,showStaticBackdropAnimation:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._dialog?this._dialog.parentNode:null;if(n&&t.target===n&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.modalIndex{this.setState({showStaticBackdropAnimation:!1})},100)}onOpened(t,n){this.props.onOpened(),(this.props.modalTransition.onEntered||sv)(t,n)}onClosed(t){const{unmountOnClose:n}=this.props;this.props.onClosed(),(this.props.modalTransition.onExited||sv)(t),n&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}setFocus(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}getFocusableChildren(){return this._element.querySelectorAll(JI.join(", "))}getFocusedChild(){let t;const n=this.getFocusableChildren();try{t=document.activeElement}catch{t=n[0]}return t}trapFocus(t){if(!this.props.trapFocus||!this._element||this._dialog&&this._dialog.parentNode===t.target||this.modalIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Ic(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=qI(),zn.openCount<1&&(zn.originalBodyOverflow=window.getComputedStyle(document.body).overflow),GI(),zn.openCount===0&&(document.body.className=me(document.body.className,Fe("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=zn.openCount,zn.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){if(zn.openCount<=1){const t=Fe("modal-open",this.props.cssModule),n=new RegExp(`(^| )${t}( |$)`);document.body.className=document.body.className.replace(n," ").trim(),document.body.style.overflow=zn.originalBodyOverflow}this.manageFocusAfterClose(),zn.openCount=Math.max(0,zn.openCount-1),IC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}renderModalDialog(){const t=Cr(this.props,Zre),n="modal-dialog";return U.createElement("div",$e({},t,{className:Fe(me(n,this.props.className,{[`modal-${this.props.size}`]:this.props.size,[`${n}-centered`]:this.props.centered,[`${n}-scrollable`]:this.props.scrollable,"modal-fullscreen":this.props.fullscreen===!0,[`modal-fullscreen-${this.props.fullscreen}-down`]:typeof this.props.fullscreen=="string"}),this.props.cssModule),role:"document",ref:r=>{this._dialog=r}}),U.createElement("div",{className:Fe(me("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}render(){const{unmountOnClose:t}=this.props;if(this._element&&(this.state.isOpen||!t)){const n=!!this._element&&!this.state.isOpen&&!t;this._element.style.display=n?"none":"block";const{wrapClassName:r,modalClassName:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,external:h,innerRef:p}=this.props,m={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":f,role:c,tabIndex:"-1"},v=this.props.fade,y=We(We(We({},Zt.defaultProps),this.props.modalTransition),{},{baseClass:v?this.props.modalTransition.baseClass:"",timeout:v?this.props.modalTransition.timeout:0}),x=We(We(We({},Zt.defaultProps),this.props.backdropTransition),{},{baseClass:v?this.props.backdropTransition.baseClass:"",timeout:v?this.props.backdropTransition.timeout:0}),_=l&&(v?U.createElement(Zt,$e({},x,{in:a&&!!l,cssModule:s,className:Fe(me("modal-backdrop",o),s)})):U.createElement("div",{className:Fe(me("modal-backdrop","show",o),s)}));return U.createElement(h6,{node:this._element},U.createElement("div",{className:Fe(r)},U.createElement(Zt,$e({},m,y,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("modal",i,this.state.showStaticBackdropAnimation&&"modal-static"),s),innerRef:p}),h,this.renderModalDialog()),_))}return null}}zn.propTypes=p6;zn.defaultProps=Kre;zn.openCount=0;zn.originalBodyOverflow=null;var Uo=zn;const Xre=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"],Qre={children:C.node,className:C.string,close:C.object,closeAriaLabel:C.string,cssModule:C.object,tag:Pe,toggle:C.func,wrapTag:Pe},Jre={tag:"h5",wrapTag:"div",closeAriaLabel:"Close"};function ro(e){let t;const{className:n,cssModule:r,children:i,toggle:o,tag:s,wrapTag:a,closeAriaLabel:l,close:c}=e,f=qe(e,Xre),h=Fe(me(n,"modal-header"),r);return!c&&o&&(t=U.createElement("button",{type:"button",onClick:o,className:Fe("btn-close",r),"aria-label":l})),U.createElement(a,$e({},f,{className:h}),U.createElement(s,{className:Fe("modal-title",r)},i),c||t)}ro.propTypes=Qre;ro.defaultProps=Jre;const eie=["className","cssModule","tag"],tie={className:C.string,cssModule:C.object,tag:Pe},nie={tag:"div"};function ki(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,eie),o=Fe(me(t,"modal-body"),n);return U.createElement(r,$e({},i,{className:o}))}ki.propTypes=tie;ki.defaultProps=nie;const rie=["className","cssModule","tag"],iie={className:C.string,cssModule:C.object,tag:Pe},oie={tag:"div"};function ta(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,rie),o=Fe(me(t,"modal-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ta.propTypes=iie;ta.defaultProps=oie;const sie={placement:"top",autohide:!0,placementPrefix:"bs-tooltip",trigger:"hover focus"};function Xd(e){const t=me("tooltip","show",e.popperClassName),n=me("tooltip-inner",e.innerClassName);return U.createElement(f6,$e({},e,{arrowClassName:"tooltip-arrow",popperClassName:t,innerClassName:n}))}Xd.propTypes=v_;Xd.defaultProps=sie;C.bool,C.bool,C.string,C.object,C.bool,C.bool,C.oneOfType([C.func,C.string,C.object]),C.oneOfType([C.bool,C.string]),C.string,C.bool;const aie=["className","cssModule","tag","flush","horizontal","numbered"],lie={className:C.string,cssModule:C.object,flush:C.bool,horizontal:C.oneOfType([C.bool,C.string]),numbered:C.bool,tag:Pe},cie={tag:"ul",horizontal:!1,numbered:!1},uie=e=>e===!1?!1:e===!0||e==="xs"?"list-group-horizontal":`list-group-horizontal-${e}`;function nE(e){const{className:t,cssModule:n,tag:r,flush:i,horizontal:o,numbered:s}=e,a=qe(e,aie),l=Fe(me(t,"list-group",i?"list-group-flush":uie(o),{"list-group-numbered":s}),n);return U.createElement(r,$e({},a,{className:l}))}nE.propTypes=lie;nE.defaultProps=cie;const fie=["className","cssModule","tag","innerRef"],die={children:C.node,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),className:C.string,cssModule:C.object},hie={tag:"form"};class m6 extends V.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.submit=this.submit.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}submit(){this.ref&&this.ref.submit()}render(){const t=this.props,{className:n,cssModule:r,tag:i,innerRef:o}=t,s=qe(t,fie),a=Fe(n,r);return U.createElement(i,$e({},s,{ref:o,className:a}))}}m6.propTypes=die;m6.defaultProps=hie;C.node,C.string,C.object,C.bool,C.bool;const pie=["className","cssModule","row","disabled","check","inline","floating","tag","switch"],mie={children:C.node,row:C.bool,check:C.bool,switch:C.bool,inline:C.bool,floating:C.bool,disabled:C.bool,tag:Pe,className:C.string,cssModule:C.object},gie={tag:"div"};function vr(e){const{className:t,cssModule:n,row:r,disabled:i,check:o,inline:s,floating:a,tag:l,switch:c}=e,f=qe(e,pie),h=o||c,p=Fe(me(t,r?"row":!1,h?"form-check":"mb-3",c?"form-switch":!1,h&&s?"form-check-inline":!1,h&&i?"disabled":!1,a&&"form-floating"),n);return l==="fieldset"&&(f.disabled=i),U.createElement(l,$e({},f,{className:p}))}vr.propTypes=mie;vr.defaultProps=gie;C.node,C.bool,C.string,C.string,C.object;const vie=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],yie={children:C.node,type:C.string,size:C.oneOfType([C.number,C.string]),bsSize:C.string,valid:C.bool,invalid:C.bool,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),plaintext:C.bool,addon:C.bool,className:C.string,cssModule:C.object},_ie={type:"text"};let rE=class extends U.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.focus=this.focus.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}focus(){this.ref&&this.ref.focus()}render(){let t=this.props,{className:n,cssModule:r,type:i,bsSize:o,valid:s,invalid:a,tag:l,addon:c,plaintext:f,innerRef:h}=t,p=qe(t,vie);const m=["switch","radio","checkbox"].indexOf(i)>-1,v=/\D/g,y=i==="textarea",x=i==="select",_=i==="range";let w=l||(x||y?i:"input"),S="form-control";f?(S=`${S}-plaintext`,w=l||"input"):_?S="form-range":x?S="form-select":m&&(c?S=null:S="form-check-input"),p.size&&v.test(p.size)&&(Iw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),o=p.size,delete p.size);const T=Fe(me(n,a&&"is-invalid",s&&"is-valid",o?x?`form-select-${o}`:`form-control-${o}`:!1,S),r);return(w==="input"||l&&typeof l=="function")&&(p.type=i==="switch"?"checkbox":i),p.children&&!(f||i==="select"||typeof w!="string"||w==="select")&&(Iw(`Input with a type of "${i}" cannot have children. Please use "value"/"defaultValue" instead.`),delete p.children),U.createElement(w,$e({},p,{ref:h,className:T,"aria-invalid":a}))}};rE.propTypes=yie;rE.defaultProps=_ie;var Fc=rE;const bie=["className","cssModule","tag","type","size"],wie={className:C.string,cssModule:C.object,size:C.string,tag:Pe,type:C.string},xie={tag:"div"};function Qd(e){const{className:t,cssModule:n,tag:r,type:i,size:o}=e,s=qe(e,bie),a=Fe(me(t,"input-group",o?`input-group-${o}`:null),n);return e.type==="dropdown"?U.createElement(eu,$e({},s,{className:a})):U.createElement(n6.Provider,{value:{insideInputGroup:!0}},U.createElement(r,$e({},s,{className:a})))}Qd.propTypes=wie;Qd.defaultProps=xie;C.string,C.object;const h1=C.oneOfType([C.number,C.string]),Nl=C.oneOfType([C.bool,C.string,C.number,C.shape({size:h1,order:h1,offset:h1})]);C.node,C.bool,C.bool,C.string,C.string,C.string,C.object,C.array;C.bool,C.bool,C.node,C.string,C.object,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool;function av(){}const y3=C.shape(Zt.propTypes),g6={autoFocus:C.bool,backdrop:C.bool,backdropClassName:C.string,backdropTransition:y3,children:C.node,className:C.string,container:zs,cssModule:C.object,direction:C.oneOf(["start","end","bottom","top"]),fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,offcanvasTransition:y3,onClosed:C.func,onEnter:C.func,onExit:C.func,style:C.object,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,zIndex:C.oneOfType([C.number,C.string])},Sie=Object.keys(g6),Cie={isOpen:!1,autoFocus:!0,direction:"start",scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:av,onClosed:av,offcanvasTransition:{timeout:tl.Offcanvas},backdropTransition:{mountOnEnter:!0,timeout:tl.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class hi extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._backdrop;if(!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.offcanvasIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Ic(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=qI(),GI(),hi.openCount===0&&this.props.backdrop&&!this.props.scrollable&&(document.body.style.overflow="hidden"),this.offcanvasIndex=hi.openCount,hi.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){this.manageFocusAfterClose(),hi.openCount=Math.max(0,hi.openCount-1),document.body.style.overflow=null,IC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}render(){const{direction:t,unmountOnClose:n}=this.props;if(this._element&&(this.state.isOpen||!n)){const r=!!this._element&&!this.state.isOpen&&!n;this._element.style.display=r?"none":"block";const{className:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,style:h}=this.props,p={onKeyUp:this.handleEscape,onKeyDown:this.handleTab,"aria-labelledby":f,role:c,tabIndex:"-1"},m=this.props.fade,v=We(We(We({},Zt.defaultProps),this.props.offcanvasTransition),{},{baseClass:m?this.props.offcanvasTransition.baseClass:"",timeout:m?this.props.offcanvasTransition.timeout:0}),y=We(We(We({},Zt.defaultProps),this.props.backdropTransition),{},{baseClass:m?this.props.backdropTransition.baseClass:"",timeout:m?this.props.backdropTransition.timeout:0}),x=l&&(m?U.createElement(Zt,$e({},y,{in:a&&!!l,innerRef:w=>{this._backdrop=w},cssModule:s,className:Fe(me("offcanvas-backdrop",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})):U.createElement("div",{className:Fe(me("offcanvas-backdrop","show",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})),_=Cr(this.props,Sie);return U.createElement(h6,{node:this._element},U.createElement(Zt,$e({},_,p,v,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("offcanvas",i,`offcanvas-${t}`),s),innerRef:w=>{this._dialog=w},style:We(We({},h),{},{visibility:a?"visible":"hidden"})}),this.props.children),x)}return null}}hi.propTypes=g6;hi.defaultProps=Cie;hi.openCount=0;C.string,C.object;C.node,C.string,C.object,C.string,C.object,C.func;const Eie=["className","listClassName","cssModule","size","tag","listTag","aria-label"],Tie={children:C.node,className:C.string,listClassName:C.string,cssModule:C.object,size:C.string,tag:Pe,listTag:Pe,"aria-label":C.string},Oie={tag:"nav",listTag:"ul","aria-label":"pagination"};function y_(e){const{className:t,listClassName:n,cssModule:r,size:i,tag:o,listTag:s,"aria-label":a}=e,l=qe(e,Eie),c=Fe(me(t),r),f=Fe(me(n,"pagination",{[`pagination-${i}`]:!!i}),r);return U.createElement(o,{className:c,"aria-label":a},U.createElement(s,$e({},l,{className:f})))}y_.propTypes=Tie;y_.defaultProps=Oie;const Pie=["active","className","cssModule","disabled","tag"],kie={active:C.bool,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,tag:Pe},Mie={tag:"li"};function Ms(e){const{active:t,className:n,cssModule:r,disabled:i,tag:o}=e,s=qe(e,Pie),a=Fe(me(n,"page-item",{active:t,disabled:i}),r);return U.createElement(o,$e({},s,{className:a}))}Ms.propTypes=kie;Ms.defaultProps=Mie;const Rie=["className","cssModule","next","previous","first","last","tag"],Nie={"aria-label":C.string,children:C.node,className:C.string,cssModule:C.object,next:C.bool,previous:C.bool,first:C.bool,last:C.bool,tag:Pe},Lie={tag:"a"};function Rs(e){let{className:t,cssModule:n,next:r,previous:i,first:o,last:s,tag:a}=e,l=qe(e,Rie);const c=Fe(me(t,"page-link"),n);let f;i?f="Previous":r?f="Next":o?f="First":s&&(f="Last");const h=e["aria-label"]||f;let p;i?p="‹":r?p="›":o?p="«":s&&(p="»");let{children:m}=e;return m&&Array.isArray(m)&&m.length===0&&(m=null),!l.href&&a==="a"&&(a="button"),(i||r||o||s)&&(m=[U.createElement("span",{"aria-hidden":"true",key:"caret"},m||p),U.createElement("span",{className:"visually-hidden",key:"ariaLabel"},h)]),U.createElement(a,$e({},l,{className:c,"aria-label":h}),m)}Rs.propTypes=Nie;Rs.defaultProps=Lie;const Die=U.createContext({}),v6={tag:Pe,activeTab:C.any,className:C.string,cssModule:C.object},Aie={tag:"div"};class y6 extends V.Component{static getDerivedStateFromProps(t,n){return n.activeTab!==t.activeTab?{activeTab:t.activeTab}:null}constructor(t){super(t),this.state={activeTab:this.props.activeTab}}render(){const{className:t,cssModule:n,tag:r}=this.props,i=Cr(this.props,Object.keys(v6)),o=Fe(me("tab-content",t),n);return U.createElement(Die.Provider,{value:{activeTabId:this.state.activeTab}},U.createElement(r,$e({},i,{className:o})))}}y6.propTypes=v6;y6.defaultProps=Aie;C.string,C.object,C.any;const jie=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"],Iie={children:C.node,className:C.string,closeClassName:C.string,closeAriaLabel:C.string,color:C.string,cssModule:C.object,fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,tag:Pe,toggle:C.func,transition:C.shape(Zt.propTypes)},Fie={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:We(We({},Zt.defaultProps),{},{unmountOnExit:!0})};function iE(e){const{className:t,closeClassName:n,closeAriaLabel:r,cssModule:i,tag:o,color:s,isOpen:a,toggle:l,children:c,transition:f,fade:h,innerRef:p}=e,m=qe(e,jie),v=Fe(me(t,"alert",`alert-${s}`,{"alert-dismissible":l}),i),y=Fe(me("btn-close",n),i),x=We(We(We({},Zt.defaultProps),f),{},{baseClass:h?f.baseClass:"",timeout:h?f.timeout:0});return U.createElement(Zt,$e({},m,x,{tag:o,className:v,in:a,role:"alert",innerRef:p}),l?U.createElement("button",{type:"button",className:y,"aria-label":r,onClick:l}):null,c)}iE.propTypes=Iie;iE.defaultProps=Fie;C.node,C.string,C.object,C.bool,C.bool,C.shape(Zt.propTypes),C.oneOfType([C.object,C.string,C.func]);We(We({},Zt.defaultProps),{},{unmountOnExit:!0});C.string,C.object,C.oneOfType([C.object,C.string,C.func]);C.oneOfType([C.string,C.node]),C.func,C.string,C.object,C.node,C.string,C.oneOfType([C.string,C.number]),C.object,C.string;const $ie=["className","cssModule","tag","active","disabled","action","color"],Bie={action:C.bool,active:C.bool,className:C.string,cssModule:C.object,color:C.string,disabled:C.bool,tag:Pe},zie={tag:"li"},Uie=e=>{e.preventDefault()};function oE(e){const{className:t,cssModule:n,tag:r,active:i,disabled:o,action:s,color:a}=e,l=qe(e,$ie),c=Fe(me(t,i?"active":!1,o?"disabled":!1,s?"list-group-item-action":!1,a?`list-group-item-${a}`:!1,"list-group-item"),n);return o&&(l.onClick=Uie),U.createElement(r,$e({},l,{className:c}))}oE.propTypes=Bie;oE.defaultProps=zie;C.string,C.object;C.string,C.object;const Vie=["className","cssModule","tag","type"],Hie={className:C.string,cssModule:C.object,tag:Pe,type:C.string},Wie={tag:"ul"},sE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i,type:o}=e,s=qe(e,Vie),a=Fe(me(n,o?`list-${o}`:!1),r);return U.createElement(i,$e({},s,{className:a,ref:t}))});sE.name="List";sE.propTypes=Hie;sE.defaultProps=Wie;const Yie=["className","cssModule","tag"],qie={className:C.string,cssModule:C.object,tag:Pe},Gie={tag:"li"},aE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i}=e,o=qe(e,Yie),s=Fe(me(n,"list-inline-item"),r);return U.createElement(i,$e({},o,{className:s,ref:t}))});aE.name="ListInlineItem";aE.propTypes=qie;aE.defaultProps=Gie;const Zie=["defaultOpen"];class Kie extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(qC,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Zie)))}}Kie.propTypes=We({defaultOpen:C.bool},qC.propTypes);const Xie=["toggleEvents","defaultOpen"],Qie={defaultOpen:C.bool,toggler:C.string.isRequired,toggleEvents:C.arrayOf(C.string)},Jie={toggleEvents:ine};class _6 extends V.Component{constructor(t){super(t),this.togglers=null,this.removeEventListeners=null,this.toggle=this.toggle.bind(this),this.state={isOpen:t.defaultOpen||!1}}componentDidMount(){this.togglers=QI(this.props.toggler),this.togglers.length&&(this.removeEventListeners=one(this.togglers,this.toggle,this.props.toggleEvents))}componentWillUnmount(){this.togglers.length&&this.removeEventListeners&&this.removeEventListeners()}toggle(t){this.setState(({isOpen:n})=>({isOpen:!n})),t.preventDefault()}render(){return U.createElement(r6,$e({isOpen:this.state.isOpen},Cr(this.props,Xie)))}}_6.propTypes=Qie;_6.defaultProps=Jie;const eoe=["defaultOpen"];class Jd extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(t){this.setState(n=>({isOpen:!n.isOpen}),()=>{this.props.onToggle&&this.props.onToggle(t,this.state.isOpen)})}render(){return U.createElement(eu,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,eoe)))}}Jd.propTypes=We({defaultOpen:C.bool,onToggle:C.func},eu.propTypes);const toe=["defaultOpen"];class Er extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Xd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,toe)))}}Er.propTypes=We({defaultOpen:C.bool},Xd.propTypes);C.oneOf(["border","grow"]),C.oneOf(["sm"]),C.oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),C.string,C.object,C.string;We(We({},BC.propTypes),{},{color:C.string,tag:Pe,animation:C.oneOf(["glow","wave"]),innerRef:C.oneOfType([C.object,C.func,C.string]),size:C.oneOf(["lg","sm","xs"])});C.string,C.string,C.bool,C.string,C.object;(()=>{if(typeof window!="object"||typeof window.CustomEvent=="function")return;const e=(t,n)=>{n=n||{bubbles:!1,cancelable:!1,detail:null};let r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r};window.CustomEvent=e})();(()=>{if(typeof Object.values=="function")return;Object.values=t=>Object.keys(t).map(n=>t[n])})();const noe="Left",roe="Right",ioe="Up",ooe="Down",nc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},$w={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},_3="mousemove",b3="mouseup",soe="touchend",aoe="touchmove",loe="touchstart";function coe(e,t,n,r){return e>t?n>0?roe:noe:r>0?ooe:ioe}function w3(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function uoe(e,t){const n=f=>{const h="touches"in f;h&&f.touches.length>1||e((p,m)=>{m.trackMouse&&!h&&(document.addEventListener(_3,r),document.addEventListener(b3,s));const{clientX:v,clientY:y}=h?f.touches[0]:f,x=w3([v,y],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),$w),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((h,p)=>{const m="touches"in f;if(m&&f.touches.length>1)return h;if(f.timeStamp-h.start>p.swipeDuration)return h.swiping?Object.assign(Object.assign({},h),{swiping:!1}):h;const{clientX:v,clientY:y}=m?f.touches[0]:f,[x,_]=w3([v,y],p.rotationAngle),w=x-h.xy[0],S=_-h.xy[1],T=Math.abs(w),P=Math.abs(S),k=(f.timeStamp||0)-h.start,N=Math.sqrt(T*T+P*P)/(k||1),D=[w/(k||1),S/(k||1)],z=coe(T,P,w,S),A=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||nc.delta;if(T{e((h,p)=>{let m;if(h.swiping&&h.eventData){if(f.timeStamp-h.start{document.removeEventListener(_3,r),document.removeEventListener(b3,s)},s=f=>{o(),i(f)},a=(f,h)=>{let p=()=>{};if(f&&f.addEventListener){const m=Object.assign(Object.assign({},nc.touchEventOptions),h.touchEventOptions),v=[[loe,n,m],[aoe,r,Object.assign(Object.assign({},m),h.preventScrollOnSwipe?{passive:!1}:{})],[soe,i,m]];v.forEach(([y,x,_])=>f.addEventListener(y,x,_)),p=()=>v.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((h,p)=>{if(h.el===f)return h;const m={};return h.el&&h.el!==f&&h.cleanUpTouch&&(h.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&f&&(m.cleanUpTouch=a(f,p)),Object.assign(Object.assign(Object.assign({},h),{el:f}),m)})}};return t.trackMouse&&(c.onMouseDown=n),[c,a]}function foe(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function doe(e){const{trackMouse:t}=e,n=V.useRef(Object.assign({},$w)),r=V.useRef(Object.assign({},nc)),i=V.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},nc),e);let o;for(o in nc)r.current[o]===void 0&&(r.current[o]=nc[o]);const[s,a]=V.useMemo(()=>uoe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=foe(n.current,r.current,i.current,a),s}var Tp,hoe=new Uint8Array(16);function poe(){if(!Tp&&(Tp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Tp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Tp(hoe)}const moe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function goe(e){return typeof e=="string"&&moe.test(e)}var Fn=[];for(var p1=0;p1<256;++p1)Fn.push((p1+256).toString(16).substr(1));function voe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Fn[e[t+0]]+Fn[e[t+1]]+Fn[e[t+2]]+Fn[e[t+3]]+"-"+Fn[e[t+4]]+Fn[e[t+5]]+"-"+Fn[e[t+6]]+Fn[e[t+7]]+"-"+Fn[e[t+8]]+Fn[e[t+9]]+"-"+Fn[e[t+10]]+Fn[e[t+11]]+Fn[e[t+12]]+Fn[e[t+13]]+Fn[e[t+14]]+Fn[e[t+15]]).toLowerCase();if(!goe(n))throw TypeError("Stringified UUID is invalid");return n}function lE(e,t,n){e=e||{};var r=e.random||(e.rng||poe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return voe(r)}const yoe=2e3,_oe=(e,t)=>(n=!1,r=yoe)=>{const[i,o]=V.useState(n),s=V.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},hn=(e=!1)=>{const[t,n]=V.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},boe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:s})=>s==null?void 0:s.contains("visits-table"))||document.querySelector(".modal")||r()};return doe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},woe=(e,t)=>{const[n,r]=V.useState(t);return[n,o=>{const{location:s,history:a}=window,l=dl(s.search);l[e]=o,a.pushState(null,"",`${s.pathname}?${Vd(l)}`),r(o)}]},xoe=(e,t)=>{const n=V.useRef(!0);V.useEffect(()=>{!n.current&&e(),n.current=!1},t)},na=()=>{const e=Io();return()=>e(-1)},Soe=()=>{const{search:e}=Pn();return dl(e)},__=()=>{const{current:e}=V.useRef(`dom-${lE()}`);return e},hl=()=>V.useRef(null),cn=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Sr,{...r,children:[e&&g.jsx(rl,{role:"heading",children:e}),g.jsx(nl,{className:n,children:t})]});const Coe=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=hn(),o=()=>{i(),n()};return g.jsxs(iE,{className:"app-update-banner",isOpen:e,toggle:t,tag:cn,color:"secondary",children:[g.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),g.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",g.jsxs(ht,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(je,{icon:kQ,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},b6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(cn,{className:"p-4",children:[g.jsx("h2",{children:"Oops! We could not find requested route."}),g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(Lt,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),Eoe=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},cE="#4696e5",Toe="rgba(70, 150, 229, 0.4)",w6="#f77f28",Ooe="rgba(247, 127, 40, 0.4)",Poe="white",koe="#161b22",x6=e=>{var t,n;return(n=(t=document.getElementsByTagName("html"))==null?void 0:t[0])==null?void 0:n.setAttribute("data-theme",e)},Moe=()=>{var e,t;return((t=(e=document.getElementsByTagName("html"))==null?void 0:e[0])==null?void 0:t.getAttribute("data-theme"))==="dark"};const Roe=(e,t,n,r,i,o,s,a)=>({fetchServers:l,servers:c,settings:f,appUpdated:h,resetAppUpdate:p})=>{const v=Pn().pathname==="/";return V.useEffect(()=>{var y;Object.keys(c).length===0&&l(),x6(((y=f.ui)==null?void 0:y.theme)??"light")},[]),g.jsxs("div",{className:"container-fluid app-container",children:[g.jsx(e,{}),g.jsxs("div",{className:"app",children:[g.jsx("div",{className:me("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:g.jsxs(Xy,{children:[g.jsx(gt,{index:!0,element:g.jsx(t,{})}),g.jsx(gt,{path:"/settings/*",element:g.jsx(o,{})}),g.jsx(gt,{path:"/manage-servers",element:g.jsx(s,{})}),g.jsx(gt,{path:"/server/create",element:g.jsx(r,{})}),g.jsx(gt,{path:"/server/:serverId/edit",element:g.jsx(i,{})}),g.jsx(gt,{path:"/server/:serverId/*",element:g.jsx(n,{})}),g.jsx(gt,{path:"*",element:g.jsx(b6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(a,{})})]}),g.jsx(Coe,{isOpen:h,toggle:p,forceUpdate:Eoe})]})};function mi(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:uE(e)?2:fE(e)?3:0}function pc(e,t){return nu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Noe(e,t){return nu(e)===2?e.get(t):e[t]}function S6(e,t,n){var r=nu(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function C6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function uE(e){return Foe&&e instanceof Map}function fE(e){return $oe&&e instanceof Set}function Ta(e){return e.o||e.t}function dE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=T6(e);delete t[At];for(var n=mc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Loe),Object.freeze(e),t&&il(e,function(n,r){return hE(r,!0)},!0)),e}function Loe(){mi(2)}function pE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Xi(e){var t=Vw[e];return t||mi(18,e),t}function Doe(e,t){Vw[e]||(Vw[e]=t)}function Bw(){return _d}function m1(e,t){t&&(Xi("Patches"),e.u=[],e.s=[],e.v=t)}function lv(e){zw(e),e.p.forEach(Aoe),e.p=null}function zw(e){e===_d&&(_d=e.l)}function x3(e){return _d={p:[],l:_d,h:e,m:!0,_:0}}function Aoe(e){var t=e[At];t.i===0||t.i===1?t.j():t.O=!0}function g1(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Xi("ES5").S(t,e,r),r?(n[At].P&&(lv(t),mi(4)),No(e)&&(e=cv(t,e),t.l||uv(t,e)),t.u&&Xi("Patches").M(n[At].t,e,t.u,t.s)):e=cv(t,n,[]),lv(t),t.u&&t.v(t.u,t.s),e!==E6?e:void 0}function cv(e,t,n){if(pE(t))return t;var r=t[At];if(!r)return il(t,function(o,s){return S3(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return uv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=dE(r.k):r.o;il(r.i===3?new Set(i):i,function(o,s){return S3(e,r,i,o,s,n)}),uv(e,i,!1),n&&e.u&&Xi("Patches").R(r,n,e.u,e.s)}return r.o}function S3(e,t,n,r,i,o){if(Us(i)){var s=cv(e,i,o&&t&&t.i!==3&&!pc(t.D,r)?o.concat(r):void 0);if(S6(n,r,s),!Us(s))return;e.m=!1}if(No(i)&&!pE(i)){if(!e.h.F&&e._<1)return;cv(e,i),t&&t.A.l||uv(e,i)}}function uv(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&hE(t,n)}function v1(e,t){var n=e[At];return(n?Ta(n):e)[t]}function C3(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ss(e){e.P||(e.P=!0,e.l&&ss(e.l))}function y1(e){e.o||(e.o=dE(e.t))}function Uw(e,t,n){var r=uE(t)?Xi("MapSet").N(t,n):fE(t)?Xi("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Bw(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=bd;s&&(l=[a],c=Qu);var f=Proxy.revocable(l,c),h=f.revoke,p=f.proxy;return a.k=p,a.j=h,p}(t,n):Xi("ES5").J(t,n);return(n?n.A:Bw()).p.push(r),r}function joe(e){return Us(e)||mi(22,e),function t(n){if(!No(n))return n;var r,i=n[At],o=nu(n);if(i){if(!i.P&&(i.i<4||!Xi("ES5").K(i)))return i.t;i.I=!0,r=E3(n,o),i.I=!1}else r=E3(n,o);return il(r,function(s,a){i&&Noe(i.t,s)===a||S6(r,s,t(a))}),o===3?new Set(r):r}(e)}function E3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dE(e)}function Ioe(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[At];return bd.get(l,o)},set:function(l){var c=this[At];bd.set(c,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][At];if(!a.P)switch(a.i){case 5:r(a)&&ss(a);break;case 4:n(a)&&ss(a)}}}function n(o){for(var s=o.t,a=o.k,l=mc(a),c=l.length-1;c>=0;c--){var f=l[c];if(f!==At){var h=s[f];if(h===void 0&&!pc(s,f))return!0;var p=a[f],m=p&&p[At];if(m?m.t!==h:!C6(p,h))return!0}}var v=!!s[At];return l.length!==mc(s).length+(v?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l1?_-1:0),S=1;S<_;S++)w[S-1]=arguments[S];return l.produce(y,function(T){var P;return(P=o).call.apply(P,[x,T].concat(w))})}}var c;if(typeof o!="function"&&mi(6),s!==void 0&&typeof s!="function"&&mi(7),No(i)){var f=x3(r),h=Uw(r,i,void 0),p=!0;try{c=o(h),p=!1}finally{p?lv(f):zw(f)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return m1(f,s),g1(y,f)},function(y){throw lv(f),y}):(m1(f,s),g1(c,f))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===E6&&(c=void 0),r.F&&hE(c,!0),s){var m=[],v=[];Xi("Patches").M(i,c,m,v),s(m,v)}return c}mi(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var f=arguments.length,h=Array(f>1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Xi("Patches").$;return Us(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ar=new zoe,O6=Ar.produce;Ar.produceWithPatches.bind(Ar);Ar.setAutoFreeze.bind(Ar);Ar.setUseProxies.bind(Ar);Ar.applyPatches.bind(Ar);Ar.createDraft.bind(Ar);Ar.finishDraft.bind(Ar);function Uoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function M3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zn(1));return n(P6)(e,t)}if(typeof e!="function")throw new Error(Zn(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function f(){if(l)throw new Error(Zn(3));return o}function h(y){if(typeof y!="function")throw new Error(Zn(4));if(l)throw new Error(Zn(5));var x=!0;return c(),a.push(y),function(){if(x){if(l)throw new Error(Zn(6));x=!1,c();var w=a.indexOf(y);a.splice(w,1),s=null}}}function p(y){if(!Voe(y))throw new Error(Zn(7));if(typeof y.type>"u")throw new Error(Zn(8));if(l)throw new Error(Zn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=s=a,_=0;_"u")throw new Error(Zn(12));if(typeof n(void 0,{type:fv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zn(13))})}function k6(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Zn(14));h[m]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?h:l}}function dv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)for(var S=m.getState(),T=Array.from(n.values()),P=0,k=T;P!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Lse,resetAppUpdate:Dse}=Rse,Ase=Nse,jse=(e,t)=>{e.serviceFactory("App",Roe,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Lse),e.serviceFactory("resetAppUpdate",()=>Dse)};function pv(e){return t=>{const{resetSelectedServer:n}=t;return V.useEffect(()=>{n()},[]),g.jsx(e,{...t})}}const Ll=({children:e,to:t,className:n,...r})=>g.jsx(nj,{className:({isActive:i})=>me("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Ise=e=>({selectedServer:t,showOnMobile:n=!1})=>{const r=ks(t),i=r?t.id:"",{pathname:o}=Pn(),s=me("aside-menu",{"aside-menu--hidden":!n}),a=l=>`/server/${i}${l}`;return g.jsx("aside",{className:s,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(Ll,{to:a("/overview"),children:[g.jsx(je,{fixedWidth:!0,icon:vQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(Ll,{to:a("/list-short-urls/1"),className:me({"aside-menu__item--selected":o.match("/list-short-urls")!==null}),children:[g.jsx(je,{fixedWidth:!0,icon:qj}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(Ll,{to:a("/create-short-url"),children:[g.jsx(je,{fixedWidth:!0,icon:xQ,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(Ll,{to:a("/manage-tags"),children:[g.jsx(je,{fixedWidth:!0,icon:Zj}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(Ll,{to:a("/manage-domains"),children:[g.jsx(je,{fixedWidth:!0,icon:KX}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),g.jsxs(Ll,{to:a("/edit"),className:"aside-menu__item--push",children:[g.jsx(je,{fixedWidth:!0,icon:oQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),r&&g.jsx(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:t})]})})},Fse=({location:e},{error:t})=>class extends V.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){t(n)}render(){const{hasError:n}=this.state;if(n)return g.jsx("div",{className:"home",children:g.jsxs(cn,{className:"p-4",children:[g.jsx("h1",{children:"Oops! This is awkward :S"}),g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(ht,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}},Si=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});const $se=({id:e,name:t})=>g.jsxs(oE,{tag:Lt,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(je,{icon:OQ,className:"servers-list__server-item-icon"})]}),z6=({servers:e,children:t,embedded:n=!1})=>g.jsxs(g.Fragment,{children:[t&&g.jsx("h5",{className:"mb-md-3",children:t}),e.length>0&&g.jsx(nE,{className:me("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx($se,{id:r,name:i},r))})]}),U6=({color:e=cE,className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})});const Bse=({servers:e})=>{const t=Io(),n=Xc(e),r=!Wn(n);return V.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),g.jsx("div",{className:"home",children:g.jsx(Sr,{className:"home__main-card",children:g.jsxs(Qn,{className:"g-0",children:[g.jsx("div",{className:"col-md-5 d-none d-md-block",children:g.jsx("div",{className:"home__logo-wrapper",children:g.jsx("div",{className:"home__logo",children:g.jsx(U6,{})})})}),g.jsxs("div",{className:"col-md-7 home__servers-container",children:[g.jsx("div",{className:"home__title-wrapper",children:g.jsx("h1",{className:"home__title",children:"Welcome!"})}),g.jsx(z6,{embedded:!0,servers:n,children:!r&&g.jsxs("div",{className:"p-4 text-center",children:[g.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Lt,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(je,{icon:gC})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(Si,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(je,{icon:lQ})]})})})]})})]})]})})})};const zse=e=>()=>{const[t,n,,r]=hn(),i=Pn(),{pathname:o}=i;V.useEffect(r,[i]);const s="/settings",a=me("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(zC,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(UC,{tag:Lt,to:"/",children:[g.jsx(U6,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx(VC,{onClick:n,children:g.jsx(je,{icon:EQ,className:a})}),g.jsx(r6,{navbar:!0,isOpen:t,children:g.jsxs(f_,{navbar:!0,className:"ms-auto",children:[g.jsx(HC,{children:g.jsxs(t6,{tag:Lt,to:s,active:o.startsWith(s),children:[g.jsx(je,{icon:RQ}),"  Settings"]})}),g.jsx(e,{})]})})]})};const ru=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e}),Use=e=>({error:"border-danger",default:""})[e],Vse=e=>({error:"text-danger",default:"text-muted"})[e],So=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=me({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(Qn,{className:me("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Sr,{className:Use(r),body:!0,children:g.jsxs("h3",{className:me("text-center mb-0",Vse(r)),children:[n&&g.jsx(je,{icon:Yj,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})};function V6(e,t){return n=>{const r=Xs(),{selectServer:i,selectedServer:o}=n;return V.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?MZ(o)?g.jsx(t,{}):g.jsx(e,{...n}):g.jsx(ru,{children:g.jsx(So,{loading:!0})})}}const rr=(e,t)=>dse(e,t,{serializeError:QS}),Hse=(e,t)=>{const n=$3(e),r=$3(t),i=n.pop(),o=r.pop(),s=U3(n,r);return s!==0?s:i&&o?U3(i.split("."),o.split(".")):i||o?i?-1:1:0},Yw=(e,t,n)=>{Gse(n);const r=Hse(e,t);return H6[n].includes(r)},Wse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,$3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Wse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},B3=e=>e==="*"||e==="x"||e==="X",z3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Yse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],qse=(e,t)=>{if(B3(e)||B3(t))return 0;const[n,r]=Yse(z3(e),z3(t));return n>r?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},V3=Object.keys(H6),Gse=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(V3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${V3.join("|")}`)},_E=(e,t,n=1)=>nC(n,e+1).map(t),gi=e=>!Fo(e)&&!Wn(e),rh=e=>Dt(t=>t.preventDefault(),e),x1=e=>Wn(e)?null:e,ga=e=>t=>e===t,W6=e=>e?"true":"false",S1=e=>e===void 0?void 0:W6(e),Zse=(e,{maxVersion:t,minVersion:n})=>{if(!gi(e))return!1;const r=!n||Yw(e,n,">=");return(!t||Yw(e,t,"<="))&&r},Y6=Cj(QS,e=>{try{return Yw(e,e,"=")}catch{return!1}}),q6=e=>Y6(e)?`v${e}`:e,G6=(e="latest")=>t=>Y6(t)?t:e,bE="shlink/selectedServer",Kse="1.0.0",Xse="999.999.999",Qse="latest",Jse=Dt(e=>e===Qse?Xse:e,G6(Kse)),eae=Cj(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Jse(n),printableVersion:q6(n)}))),H3=null,wE=yn(`${bE}/resetSelectedServer`),Z6=e=>rr(`${bE}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(wE());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:s}=e(o),{version:a,printableVersion:l}=await eae(o,s);return{...o,version:a,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),tae=(e,t)=>{const n=Mse();return n.startListening({actionCreator:e.fulfilled,effect:({payload:r},{dispatch:i})=>{t_(r)&&i(t())}}),n},nae=e=>Yn({name:bE,initialState:H3,reducers:{},extraReducers:t=>{t.addCase(wE,()=>H3),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Ii=e=>t=>t_(t)&&Zse(t.version,{minVersion:e}),xE={forwardQuery:Ii("2.9.0"),nonRestCors:Ii("2.9.0"),defaultDomainRedirectsEdition:Ii("2.10.0"),nonOrphanVisits:Ii("3.0.0"),allTagsFiltering:Ii("3.0.0"),tagsStats:Ii("3.0.0"),domainVisits:Ii("3.1.0"),excludeBotsOnShortUrls:Ii("3.4.0"),filterDisabledUrls:Ii("3.4.0"),deviceLongUrls:Ii("3.5.0")};Object.freeze(xE);const Pi=(e,t)=>V.useMemo(()=>xE[e](t),[e,Z6]);const rae=(e,t,n,r,i,o,s,a,l,c,f,h,p)=>V6(({selectedServer:m,sidebarNotPresent:v,sidebarPresent:y})=>{const x=Pn(),[_,w,S,T]=hn(),P=t_(m);if(V.useEffect(()=>T(),[x]),V.useEffect(()=>(P&&y(),()=>v()),[]),!P)return g.jsx(c,{});const k=Pi("nonOrphanVisits",m),N=Pi("domainVisits",m),D=me("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),z=boe(S,T);return g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:WX,className:D,onClick:w}),g.jsx("div",{...z,className:"menu-layout__swipeable",children:g.jsxs("div",{className:"menu-layout__swipeable-inner",children:[g.jsx(n,{selectedServer:m,showOnMobile:_}),g.jsx("div",{className:"menu-layout__container",onClick:()=>T(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(Xy,{children:[g.jsx(gt,{index:!0,element:g.jsx(HS,{replace:!0,to:"overview"})}),g.jsx(gt,{path:"/overview",element:g.jsx(f,{})}),g.jsx(gt,{path:"/list-short-urls/:page",element:g.jsx(t,{})}),g.jsx(gt,{path:"/create-short-url",element:g.jsx(r,{})}),g.jsx(gt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(i,{})}),g.jsx(gt,{path:"/short-code/:shortCode/edit",element:g.jsx(h,{})}),g.jsx(gt,{path:"/tag/:tag/visits/*",element:g.jsx(o,{})}),N&&g.jsx(gt,{path:"/domain/:domain/visits/*",element:g.jsx(s,{})}),g.jsx(gt,{path:"/orphan-visits/*",element:g.jsx(a,{})}),k&&g.jsx(gt,{path:"/non-orphan-visits/*",element:g.jsx(l,{})}),g.jsx(gt,{path:"/manage-tags",element:g.jsx(e,{})}),g.jsx(gt,{path:"/manage-domains",element:g.jsx(p,{})}),g.jsx(gt,{path:"*",element:g.jsx(b6,{to:`/server/${m.id}/list-short-urls/1`,children:"List short URLs"})})]})})})]})})]})},c),iae={sidebarPresent:!1},{actions:oae,reducer:sae}=Yn({name:"shlink/sidebar",initialState:iae,reducers:{sidebarPresent:()=>({sidebarPresent:!0}),sidebarNotPresent:()=>({sidebarPresent:!1})}}),{sidebarPresent:aae,sidebarNotPresent:lae}=oae,cae=sae,uae=({children:e})=>{const t=Pn();return V.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},fae="%_VERSION_%",dae=Dt(G6(),q6),W3=({project:e,version:t})=>g.jsx(Si,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),hae=({selectedServer:e,clientVersion:t=fae})=>{const n=dae(t);return g.jsxs("small",{className:"text-muted",children:[t_(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(W3,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(W3,{project:"shlink-web-client",version:n})]})};const pae=({selectedServer:e,sidebar:t})=>{const n=me("text-center",{"shlink-versions-container--with-sidebar":t.sidebarPresent});return g.jsx("div",{className:n,children:g.jsx(hae,{selectedServer:e})})},Y3={"Content-Type":"application/json"},q3=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...Y3}}:{headers:Y3}:e;class mae{constructor(t){xe(this,"fetchJson",(t,n)=>this.fetch(t,q3(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));xe(this,"fetchEmpty",(t,n)=>this.fetch(t,q3(n)).then(async r=>{if(!r.ok)throw await r.json()}));xe(this,"fetchBlob",t=>this.fetch(t).then(n=>n.blob()));this.fetch=t}}const K6=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},X6=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);K6(e,i,n)};class gae{constructor(t,n){this.httpClient=t,this.window=n}async saveImage(t,n){const r=await this.httpClient.fetchBlob(t),i=URL.createObjectURL(r);K6(this.window,i,n)}}class vae{constructor(t,n){xe(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});xe(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});xe(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);X6(this.window,r,t)});this.window=t,this.jsonToCsv=n}}const yae=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",mae,"fetch"),e.service("ImageDownloader",gae,"HttpClient","window"),e.service("ReportExporter",vae,"window","jsonToCsv"),e.serviceFactory("ScrollToTop",()=>uae),e.serviceFactory("MainHeader",zse,"ServersDropdown"),e.serviceFactory("Home",()=>Bse),e.decorator("Home",pv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("MenuLayout",rae,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),e.decorator("MenuLayout",t(["selectedServer"],["selectServer","sidebarPresent","sidebarNotPresent"])),e.serviceFactory("AsideMenu",Ise,"DeleteServerButton"),e.serviceFactory("ShlinkVersionsContainer",()=>pae),e.decorator("ShlinkVersionsContainer",t(["selectedServer","sidebar"])),e.serviceFactory("ErrorHandler",Fse,"window","console"),e.serviceFactory("sidebarPresent",()=>aae),e.serviceFactory("sidebarNotPresent",()=>lae)};const Vo=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:s=!1,minWidth:a,inline:l,size:c})=>{const[f,h]=hn(),p=me("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),m={minWidth:a&&`${a}px`};return g.jsxs(eu,{isOpen:f,toggle:h,disabled:t,className:i,children:[g.jsx(Zd,{size:c,caret:!o,className:p,color:"primary",children:e}),g.jsx(tu,{className:"w-100",end:s,style:m,children:r})]})};const _ae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,s]=hn(),{domains:a}=n,l=Wn(t),c=()=>r("");return V.useEffect(()=>{e()},[]),i?g.jsxs(Qd,{children:[g.jsx(Fc,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),g.jsx(ht,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Dt(c,s),children:g.jsx(je,{icon:dQ})}),g.jsx(Er,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(Vo,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[a.map(({domain:f,isDefault:h})=>g.jsxs(Ue,{active:(t===f||h)&&l,onClick:()=>r(f),children:[f,h&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:Dt(c,o),children:g.jsx("i",{children:"New domain"})})]})},Lo=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,OX(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Nr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(Qn,{className:n,children:g.jsx("div",{className:me({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(cn,{role:"document",className:me("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:me({"p-2":r}),children:e})})});const bae=500;let Op;const ih=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,s]=V.useState(i),a=()=>{Op&&clearTimeout(Op),Op=null},l=(c,f=bae)=>{s(c),a(),Op=setTimeout(()=>{e(c),a()},f)};return g.jsxs("div",{className:me("search-field",t),children:[g.jsx("input",{type:"text",className:me("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),g.jsx(je,{icon:CQ,className:"search-field__icon"}),g.jsx("div",{className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})},w_=({children:e,minWidth:t})=>g.jsx(Vo,{text:g.jsx(je,{className:"px-1",icon:mQ}),size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),Tf=(e,t,n)=>Fo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,wae=(e,t)=>!e.domain&&t===E5?!0:e.domain===t,xae=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls,validateUrl:n}:{longUrl:"",validateUrl:n}},Q6="__",Sae=e=>e.replaceAll("/",Q6),hm=e=>e.replaceAll(Q6,"/");function Qe(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pm=function(n){return typeof n}:pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pm(e)}function Me(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||pm(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function pl(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function to(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mm=function(n){return typeof n}:mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mm(e)}function Cae(e,t){if(Oe(2,arguments),!t||mm(t)!=="object")return new Date(NaN);var n=t.years?Qe(t.years):0,r=t.months?Qe(t.months):0,i=t.weeks?Qe(t.weeks):0,o=t.days?Qe(t.days):0,s=t.hours?Qe(t.hours):0,a=t.minutes?Qe(t.minutes):0,l=t.seconds?Qe(t.seconds):0,c=Me(e),f=r||n?to(c,r+n*12):c,h=o||i?pl(f,o+i*7):f,p=a+s*60,m=l+p*60,v=m*1e3,y=new Date(h.getTime()+v);return y}function SE(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Qe(t);return new Date(n+r)}var Eae=36e5;function Tae(e,t){Oe(2,arguments);var n=Qe(t);return SE(e,n*Eae)}var Oae={};function Ho(){return Oae}function J6(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Ho(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function kae(e){Oe(1,arguments);var t=Pae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=xd(n);return r}function $c(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Lr(e){Oe(1,arguments);var t=Me(e);return t.setHours(0,0,0,0),t}var Mae=864e5;function Sd(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t),i=n.getTime()-$c(n),o=r.getTime()-$c(r);return Math.round((i-o)/Mae)}var Rae=6e4;function qw(e,t){Oe(2,arguments);var n=Qe(t);return SE(e,n*Rae)}function CE(e,t){Oe(2,arguments);var n=Qe(t),r=n*7;return pl(e,r)}function Bc(e,t){Oe(2,arguments);var n=Qe(t);return to(e,n*12)}function gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gm=function(n){return typeof n}:gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function G3(e){Oe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(gm(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Me(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function ym(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var EE=6e4,x_=36e5,Nae=1e3;function Lae(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t);return n.getTime()===r.getTime()}function _m(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_m=function(n){return typeof n}:_m=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_m(e)}function TE(e){return Oe(1,arguments),e instanceof Date||_m(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function e5(e){if(Oe(1,arguments),!TE(e)&&typeof e!="number")return!1;var t=Me(e);return!isNaN(Number(t))}function Cd(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Gw(e){Oe(1,arguments);var t=Me(e),n=Math.floor(t.getMonth()/3)+1;return n}function mv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()-r.getFullYear()}function K3(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function OE(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=K3(n,r),o=Math.abs(Sd(n,r));n.setDate(n.getDate()-i*o);var s=+(K3(n,r)===-i),a=i*(o-s);return a===0?0:a}function t5(e,t){return Oe(2,arguments),Me(e).getTime()-Me(t).getTime()}var X3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Dae="trunc";function PE(e){return e?X3[e]:X3[Dae]}function Aae(e,t,n){Oe(2,arguments);var r=t5(e,t)/x_;return PE(n==null?void 0:n.roundingMethod)(r)}function ol(e){Oe(1,arguments);var t=Me(e);return t.setHours(23,59,59,999),t}function jae(e){Oe(1,arguments);var t=Me(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Iae(e){Oe(1,arguments);var t=Me(e);return ol(t).getTime()===jae(t).getTime()}function gv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=ym(n,r),o=Math.abs(Cd(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=ym(n,r)===-i;Iae(Me(e))&&o===1&&ym(e,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function Fae(e,t,n){Oe(2,arguments);var r=t5(e,t)/1e3;return PE(n==null?void 0:n.roundingMethod)(r)}function $ae(e,t,n){Oe(2,arguments);var r=OE(e,t)/7;return PE(n==null?void 0:n.roundingMethod)(r)}function Zw(e){Oe(1,arguments);var t=Me(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Bae(e){Oe(1,arguments);var t=Me(e);return t.setDate(1),t.setHours(0,0,0,0),t}function zae(e){Oe(1,arguments);var t=Me(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Uae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Ho(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Yae(e){Oe(1,arguments);var t=r5(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=zc(n);return r}var qae=6048e5;function i5(e){Oe(1,arguments);var t=Me(e),n=zc(t).getTime()-Yae(t).getTime();return Math.round(n/qae)+1}function sl(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Ho(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getUTCDay(),v=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(h+1,0,m),v.setUTCHours(0,0,0,0);var y=sl(v,t),x=new Date(0);x.setUTCFullYear(h,0,m),x.setUTCHours(0,0,0,0);var _=sl(x,t);return f.getTime()>=y.getTime()?h+1:f.getTime()>=_.getTime()?h:h-1}function Gae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Ho(),h=Qe((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=kE(e,t),m=new Date(0);m.setUTCFullYear(p,0,h),m.setUTCHours(0,0,0,0);var v=sl(m,t);return v}var Zae=6048e5;function o5(e,t){Oe(1,arguments);var n=Me(e),r=sl(n,t).getTime()-Gae(n,t).getTime();return Math.round(r/Zae)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return tt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):tt(r+1,2)},d:function(t,n){return tt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return tt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return tt(t.getUTCHours(),n.length)},m:function(t,n){return tt(t.getUTCMinutes(),n.length)},s:function(t,n){return tt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return tt(o,n.length)}};const Ko=Kae;var Dl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xae={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Ko.y(t,n)},Y:function(t,n,r,i){var o=kE(t,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return tt(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):tt(s,n.length)},R:function(t,n){var r=r5(t);return tt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return tt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return tt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return Ko.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=o5(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=i5(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):tt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ko.d(t,n)},D:function(t,n,r){var i=Wae(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return tt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return tt(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return tt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=Dl.noon:i===0?o=Dl.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=Dl.evening:i>=12?o=Dl.afternoon:i>=4?o=Dl.morning:o=Dl.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Ko.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ko.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ko.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Ko.s(t,n)},S:function(t,n){return Ko.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return J3(s);case"XXXX":case"XX":return Oa(s);case"XXXXX":case"XXX":default:return Oa(s,":")}},x:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"x":return J3(s);case"xxxx":case"xx":return Oa(s);case"xxxxx":case"xxx":default:return Oa(s,":")}},O:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Q3(s,":");case"OOOO":default:return"GMT"+Oa(s,":")}},z:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Q3(s,":");case"zzzz":default:return"GMT"+Oa(s,":")}},t:function(t,n,r,i){var o=i._originalDate||t,s=Math.floor(o.getTime()/1e3);return tt(s,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,s=o.getTime();return tt(s,n.length)}};function Q3(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=t||"";return n+String(i)+s+tt(o,2)}function J3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Oa(e,t)}function Oa(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),s=tt(i%60,2);return r+o+n+s}const Qae=Xae;var eR=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},s5=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Jae=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return eR(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",eR(i,n)).replace("{{time}}",s5(o,n))},ele={p:s5,P:Jae};const Kw=ele;var tle=["D","DD"],nle=["YY","YYYY"];function a5(e){return tle.indexOf(e)!==-1}function l5(e){return nle.indexOf(e)!==-1}function vv(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rle={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ile=function(t,n,r){var i,o=rle[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const ole=ile;function C1(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var sle={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ale={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lle={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cle={date:C1({formats:sle,defaultWidth:"full"}),time:C1({formats:ale,defaultWidth:"full"}),dateTime:C1({formats:lle,defaultWidth:"full"})};const ule=cle;var fle={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dle=function(t,n,r,i){return fle[t]};const hle=dle;function Iu(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var ple={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gle={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vle={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},yle={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_le={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ble=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},wle={ordinalNumber:ble,era:Iu({values:ple,defaultWidth:"wide"}),quarter:Iu({values:mle,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Iu({values:gle,defaultWidth:"wide"}),day:Iu({values:vle,defaultWidth:"wide"}),dayPeriod:Iu({values:yle,defaultWidth:"wide",formattingValues:_le,defaultFormattingWidth:"wide"})};const xle=wle;function Fu(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Cle(a,function(h){return h.test(s)}):Sle(a,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(s.length);return{value:c,rest:f}}}function Sle(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Cle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var Tle=/^(\d+)(th|st|nd|rd)?/i,Ole=/\d+/i,Ple={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kle={any:[/^b/i,/^(a|c)/i]},Mle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rle={any:[/1/i,/2/i,/3/i,/4/i]},Nle={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Lle={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Dle={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ale={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},jle={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ile={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Fle={ordinalNumber:Ele({matchPattern:Tle,parsePattern:Ole,valueCallback:function(t){return parseInt(t,10)}}),era:Fu({matchPatterns:Ple,defaultMatchWidth:"wide",parsePatterns:kle,defaultParseWidth:"any"}),quarter:Fu({matchPatterns:Mle,defaultMatchWidth:"wide",parsePatterns:Rle,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Fu({matchPatterns:Nle,defaultMatchWidth:"wide",parsePatterns:Lle,defaultParseWidth:"any"}),day:Fu({matchPatterns:Dle,defaultMatchWidth:"wide",parsePatterns:Ale,defaultParseWidth:"any"}),dayPeriod:Fu({matchPatterns:jle,defaultMatchWidth:"any",parsePatterns:Ile,defaultParseWidth:"any"})};const $le=Fle;var Ble={code:"en-US",formatDistance:ole,formatLong:ule,formatRelative:hle,localize:xle,match:$le,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ME=Ble;var zle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ule=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vle=/^'([^]*?)'?$/,Hle=/''/g,Wle=/[a-zA-Z]/;function vo(e,t,n){var r,i,o,s,a,l,c,f,h,p,m,v,y,x,_,w,S,T;Oe(2,arguments);var P=String(t),k=Ho(),N=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:ME,D=Qe((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(h=k.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=Qe((m=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(_=n.locale)===null||_===void 0||(w=_.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:k.weekStartsOn)!==null&&v!==void 0?v:(S=k.locale)===null||S===void 0||(T=S.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&m!==void 0?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var A=Me(e);if(!e5(A))throw new RangeError("Invalid time value");var W=$c(A),Y=n5(A,W),J={firstWeekContainsDate:D,weekStartsOn:z,locale:N,_originalDate:A},Z=P.match(Ule).map(function(ee){var ie=ee[0];if(ie==="p"||ie==="P"){var oe=Kw[ie];return oe(ee,N.formatLong)}return ee}).join("").match(zle).map(function(ee){if(ee==="''")return"'";var ie=ee[0];if(ie==="'")return Yle(ee);var oe=Qae[ie];if(oe)return!(n!=null&&n.useAdditionalWeekYearTokens)&&l5(ee)&&vv(ee,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&a5(ee)&&vv(ee,t,String(e)),oe(Y,ee,N.localize,J);if(ie.match(Wle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");return ee}).join("");return Z}function Yle(e){var t=e.match(Vle);return t?t[1].replace(Hle,"'"):e}function RE(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function qle(e){return RE({},e)}var tR=1440,Gle=2520,E1=43200,Zle=86400;function Kle(e,t,n){var r,i;Oe(2,arguments);var o=Ho(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:ME;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=ym(e,t);if(isNaN(a))throw new RangeError("Invalid time value");var l=RE(qle(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),c,f;a>0?(c=Me(t),f=Me(e)):(c=Me(e),f=Me(t));var h=Fae(f,c),p=($c(f)-$c(c))/1e3,m=Math.round((h-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):m===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",m,l);if(m<45)return s.formatDistance("xMinutes",m,l);if(m<90)return s.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Gr(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getTime()"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _v(e){return _v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_v(e)}function NE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}function sR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vce=function(e){hce(n,e);var t=pce(n);function n(){var r;fce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,s=Math.floor(o/100)*100,a=e>=o%100;i=e+s-(a?100:0)}return n?i:1-i}function m5(e){return e%400===0||e%4===0&&e%100!==0}function xm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xm=function(n){return typeof n}:xm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xm(e)}function yce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}function lR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cce=function(e){bce(n,e);var t=wce(n);function n(){var r;yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=p5(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Sm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sm=function(n){return typeof n}:Sm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sm(e)}function Ece(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function uR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rce=function(e){Oce(n,e);var t=Pce(n);function n(){var r;Ece(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var l=kE(i,a);if(s.isTwoDigitYear){var c=p5(s.year,l);return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}var f=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(f,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}}]),n}(pt);function Cm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cm=function(n){return typeof n}:Cm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cm(e)}function Nce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}function dR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fce=function(e){Dce(n,e);var t=Ace(n);function n(){var r;Nce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function pR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wce=function(e){zce(n,e);var t=Uce(n);function n(){var r;$ce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function gR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qce=function(e){Gce(n,e);var t=Zce(n);function n(){var r;Yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Om(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Om=function(n){return typeof n}:Om=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Om(e)}function Jce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ov(e){return Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ov(e)}function yR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oue=function(e){tue(n,e);var t=nue(n);function n(){var r;Jce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pm=function(n){return typeof n}:Pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pm(e)}function sue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _R(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pv(e)}function bR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var due=function(e){lue(n,e);var t=cue(n);function n(){var r;sue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?km=function(n){return typeof n}:km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},km(e)}function hue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function xR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _ue=function(e){mue(n,e);var t=gue(n);function n(){var r;hue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function bue(e,t,n){Oe(2,arguments);var r=Me(e),i=Qe(t),o=o5(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}function Mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mm=function(n){return typeof n}:Mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mm(e)}function wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}function CR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oue=function(e){Sue(n,e);var t=Cue(n);function n(){var r;wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return sl(bue(i,s,a),a)}}]),n}(pt);function Pue(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=i5(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}function Rm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rm=function(n){return typeof n}:Rm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function kue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ER(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}function TR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Aue=function(e){Rue(n,e);var t=Nue(n);function n(){var r;kue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return zc(Pue(i,s))}}]),n}(pt);function Nm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nm=function(n){return typeof n}:Nm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function jue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nv(e){return Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Nv(e)}function T1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uue=[31,28,31,30,31,30,31,31,30,31,30,31],Vue=[31,29,31,30,31,30,31,31,30,31,30,31],Hue=function(e){Fue(n,e);var t=$ue(n);function n(){var r;jue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=Vue[l]:o>=1&&o<=Uue[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Dm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dm=function(n){return typeof n}:Dm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dm(e)}function Wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}function O1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xue=function(e){que(n,e);var t=Gue(n);function n(){var r;Wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function AE(e,t,n){var r,i,o,s,a,l,c,f;Oe(2,arguments);var h=Ho(),p=Qe((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Me(e),v=Qe(t),y=m.getUTCDay(),x=v%7,_=(x+7)%7,w=(_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}function MR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ife=function(e){efe(n,e);var t=tfe(n);function n(){var r;Que(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Im(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Im=function(n){return typeof n}:Im=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Im(e)}function ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function NR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ffe=function(e){afe(n,e);var t=lfe(n);function n(){var r;ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Fm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fm=function(n){return typeof n}:Fm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fm(e)}function dfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function DR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yfe=function(e){pfe(n,e);var t=mfe(n);function n(){var r;dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function _fe(e,t){Oe(2,arguments);var n=Qe(t);n%7===0&&(n=n-7);var r=1,i=Me(e),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}function jR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tfe=function(e){xfe(n,e);var t=Sfe(n);function n(){var r;bfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=7}},{key:"set",value:function(i,o,s){return i=_fe(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Bm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bm=function(n){return typeof n}:Bm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bm(e)}function Ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function FR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lfe=function(e){kfe(n,e);var t=Mfe(n);function n(){var r;Ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $v(e){return $v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$v(e)}function BR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bfe=function(e){jfe(n,e);var t=Ife(n);function n(){var r;Dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function UR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qfe=function(e){Vfe(n,e);var t=Hfe(n);function n(){var r;zfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zv(e){return zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(e)}function HR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ede=function(e){Kfe(n,e);var t=Xfe(n);function n(){var r;Gfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Hm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hm=function(n){return typeof n}:Hm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hm(e)}function tde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function YR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ade=function(e){rde(n,e);var t=ide(n);function n(){var r;tde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Wm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wm=function(n){return typeof n}:Wm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wm(e)}function lde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vv(e)}function GR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pde=function(e){ude(n,e);var t=fde(n);function n(){var r;lde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Ym(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ym=function(n){return typeof n}:Ym=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ym(e)}function mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function KR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wde=function(e){vde(n,e);var t=yde(n);function n(){var r;mde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(pt);function qm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qm=function(n){return typeof n}:qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qm(e)}function xde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function QR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pde=function(e){Cde(n,e);var t=Ede(n);function n(){var r;xde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(pt);function Gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gm=function(n){return typeof n}:Gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gm(e)}function kde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yv(e)}function eN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ade=function(e){Rde(n,e);var t=Nde(n);function n(){var r;kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(pt);function Zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zm=function(n){return typeof n}:Zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zm(e)}function jde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function nN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ude=function(e){Fde(n,e);var t=$de(n);function n(){var r;jde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gv(e){return Gv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function iN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zde=function(e){Wde(n,e);var t=Yde(n);function n(){var r;Vde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}function sN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nhe=function(e){Qde(n,e);var t=Jde(n);function n(){var r;Kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function lN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var che=function(e){ohe(n,e);var t=she(n);function n(){var r;rhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xv(e){return Xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xv(e)}function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ghe=function(e){dhe(n,e);var t=hhe(n);function n(){var r;uhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=yhe(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function yhe(e,t){if(e){if(typeof e=="string")return dN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dN(e,t)}}function dN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=Qe((v=(y=(x=(_=r==null?void 0:r.weekStartsOn)!==null&&_!==void 0?_:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:D.weekStartsOn)!==null&&y!==void 0?y:(T=D.locale)===null||T===void 0||(P=T.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&v!==void 0?v:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(N==="")return k===""?Me(n):new Date(NaN);var Y={firstWeekContainsDate:A,weekStartsOn:W,locale:z},J=[new lce],Z=N.match(bhe).map(function(O){var R=O[0];if(R in Kw){var I=Kw[R];return I(O,z.formatLong)}return O}).join("").match(_he),ee=[],ie=fN(Z),oe;try{var G=function(){var R=oe.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&l5(R)&&vv(R,N,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&a5(R)&&vv(R,N,e);var I=R[0],X=vhe[I];if(X){var K=X.incompatibleTokens;if(Array.isArray(K)){var ae=ee.find(function(Le){return K.includes(Le.token)||Le.token===I});if(ae)throw new RangeError("The format string mustn't contain `".concat(ae.fullToken,"` and `").concat(R,"` at the same time"))}else if(X.incompatibleTokens==="*"&&ee.length>0)throw new RangeError("The format string mustn't contain `".concat(R,"` and any other token at the same time"));ee.push({token:I,fullToken:R});var ge=X.run(k,R,z.match,Y);if(!ge)return{v:new Date(NaN)};J.push(ge.setter),k=ge.rest}else{if(I.match(Che))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(R==="''"?R="'":I==="'"&&(R=Ehe(R)),k.indexOf(R)===0)k=k.slice(R.length);else return{v:new Date(NaN)}}};for(ie.s();!(oe=ie.n()).done;){var F=G();if(eg(F)==="object")return F.v}}catch(O){ie.e(O)}finally{ie.f()}if(k.length>0&&She.test(k))return new Date(NaN);var j=J.map(function(O){return O.priority}).sort(function(O,R){return R-O}).filter(function(O,R,I){return I.indexOf(O)===R}).map(function(O){return J.filter(function(R){return R.priority===O}).sort(function(R,I){return I.subPriority-R.subPriority})}).map(function(O){return O[0]}),B=Me(n);if(isNaN(B.getTime()))return new Date(NaN);var ne=n5(B,$c(B)),H={},q=fN(j),te;try{for(q.s();!(te=q.n()).done;){var se=te.value;if(!se.validate(ne,Y))return new Date(NaN);var pe=se.set(ne,H,Y);Array.isArray(pe)?(ne=pe[0],RE(H,pe[1])):ne=pe}}catch(O){q.e(O)}finally{q.f()}return ne}function Ehe(e){return e.match(whe)[1].replace(xhe,"'")}function The(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Ohe(e,t){Oe(2,arguments);var n=Zw(e),r=Zw(t);return n.getTime()===r.getTime()}function Phe(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()===r.getFullYear()}function Uc(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Me(t.start).getTime(),i=Me(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function jE(e,t){Oe(2,arguments);var n=Qe(t);return pl(e,-n)}function Do(e,t){var n;Oe(1,arguments);var r=Qe((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=Nhe(e),o;if(i.date){var s=Lhe(i.date,r);o=Dhe(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,c;if(i.time&&(l=Ahe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=jhe(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(a+l),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(a+l+c)}var Pp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},khe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Mhe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Rhe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Nhe(e){var t={},n=e.split(Pp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Pp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Pp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Pp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Lhe(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function Dhe(e,t){if(t===null)return new Date(NaN);var n=e.match(khe);if(!n)return new Date(NaN);var r=!!n[4],i=$u(n[1]),o=$u(n[2])-1,s=$u(n[3]),a=$u(n[4]),l=$u(n[5])-1;if(r)return zhe(t,a,l)?Ihe(t,a,l):new Date(NaN);var c=new Date(0);return!$he(t,o,s)||!Bhe(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,s)),c)}function $u(e){return e?parseInt(e):1}function Ahe(e){var t=e.match(Mhe);if(!t)return NaN;var n=k1(t[1]),r=k1(t[2]),i=k1(t[3]);return Uhe(n,r,i)?n*x_+r*EE+i*1e3:NaN}function k1(e){return e&&parseFloat(e.replace(",","."))||0}function jhe(e){if(e==="Z")return 0;var t=e.match(Rhe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Vhe(r,i)?n*(r*x_+i*EE):NaN}function Ihe(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var Fhe=[31,null,31,30,31,30,31,31,30,31,30,31];function g5(e){return e%400===0||e%4===0&&e%100!==0}function $he(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Fhe[t]||(g5(e)?29:28))}function Bhe(e,t){return t>=1&&t<=(g5(e)?366:365)}function zhe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Uhe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Vhe(e,t){return t>=0&&t<=59}function Wi(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=Jle(s);return n.setMonth(r,Math.min(o,a)),n}function Of(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setHours(r),n}function Pf(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setMinutes(r),n}function Ju(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return Wi(n,n.getMonth()+o*3)}function Hhe(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setSeconds(r),n}function Qv(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function Ed(e,t){Oe(2,arguments);var n=Qe(t);return to(e,-n)}function Whe(e,t){Oe(2,arguments);var n=Qe(t);return CE(e,-n)}function Td(e,t){Oe(2,arguments);var n=Qe(t);return Bc(e,-n)}const kf="yyyy-MM-dd",IE="yyyy-MM-dd HH:mm",Hs=()=>new Date,FE=e=>typeof e!="string",v5=(e,t)=>!e||!FE(e)?e:t?vo(e,t):Xle(e),y5=(e=kf)=>t=>v5(t,e),Ws=e=>v5(e,void 0),kp=y5(),Jv=y5(IE),_i=e=>FE(e)?e:Do(e),hN=e=>e?_i(e):null,oh=(e,t,n)=>{try{return Uc(_i(e),{start:_i(t??e),end:_i(n??e)})}catch{return!1}},va=(e,t)=>c5(e,t)||Gr(e,t),sh="all",_5={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[sh]:void 0},b5=Object.keys(_5),w5=e=>e===void 0||Wn(bj(Boolean,e)),ey=e=>typeof e=="string"&&b5.includes(e),Yhe=b5.filter(e=>e!==sh),x5=(e,t)=>({startDate:hN(e),endDate:hN(t)}),qhe=e=>{if(!(!e||w5(e)))return e.startDate&&!e.endDate?`Since ${kp(e.startDate)}`:!e.startDate&&e.endDate?`Until ${kp(e.endDate)}`:`${kp(e.startDate)} - ${kp(e.endDate)}`},$E=e=>{if(!(!e||e===sh))return ey(e)?_5[e]:qhe(e)},Yr=e=>Lr(jE(Hs(),e)),Al=e=>({startDate:e,endDate:ol(Hs())}),S5=tC([[ga("today"),()=>Al(Lr(Hs()))],[ga("yesterday"),()=>({startDate:Yr(1),endDate:ol(jE(Hs(),1))})],[ga("last7Days"),()=>Al(Yr(7))],[ga("last30Days"),()=>Al(Yr(30))],[ga("last90Days"),()=>Al(Yr(90))],[ga("last180Days"),()=>Al(Yr(180))],[ga("last365Days"),()=>Al(Yr(365))],[hj,()=>({})]]),Ghe=e=>{const t=_i(e);return tC([[()=>va(Lr(Hs()),t),()=>"today"],[()=>va(Yr(1),t),()=>"yesterday"],[()=>va(Yr(7),t),()=>"last7Days"],[()=>va(Yr(30),t),()=>"last30Days"],[()=>va(Yr(90),t),()=>"last90Days"],[()=>va(Yr(180),t),()=>"last180Days"],[()=>va(Yr(365),t),()=>"last365Days"],[hj,()=>sh]])()},Zhe=e=>ey(e)?S5(e):e,ah=yn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),pN=5e3,mN=4,gN=2,Khe=({currentPage:e,pagesCount:t})=>e>=t,Xhe=(e,t)=>t*100/e,lh=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=yn(`${e}/progressChanged`),o=yn(`${e}/large`),s=yn(`${e}/fallbackToInterval`),a=rr(e,async(l,{getState:c,dispatch:f})=>{var w;const[h,p]=t(l,c),m=async S=>Promise.all(S.map(async T=>h(T,pN).then(at("data")))).then(XG),v=async(S,T=0)=>{if(r(c))return[];const P=await m(S[T]);return f(i(Xhe(S.length,T+gN))),T{const{pagination:T,data:P}=await h(S,pN);if(!T||Khe(T))return P;const k=nC(gN,T.pagesCount+1),N=ld(mN,k);return T.pagesCount-1>mN&&f(o()),P.concat(await v(N))},[x,_]=await Promise.all([y(),p((w=l.query)==null?void 0:w.excludeBots)]);return!x.length&&_&&f(s(Ghe(_.date))),{...n(l),visits:x}});return Object.assign(a,{progressChanged:i,large:o,fallbackToInterval:s})},ch=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),uh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:s,large:a,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:h}=Yn({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:no(y)})),m.addCase(s,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),m.addCase(a,v=>({...v,loadingLarge:!0})),m.addCase(l,(v,{payload:y})=>({...v,progress:y})),m.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),m.addCase(ah,(v,{payload:y})=>{const{visits:x}=v,_=r(v,y.createdVisits).map(({visit:w})=>w);return _.length?{...v,visits:[..._,...x]}:v})}}),{cancelGetVisits:p}=h;return{reducer:f,cancelGetVisits:p}},C5="shlink/domainVisits",E5="DEFAULT",Qhe={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Jhe=e=>lh({typePrefix:`${C5}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getDomainVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),epe=e=>uh({name:C5,initialState:Qhe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>s&&wae(s,t)&&oh(a.date,i,o))}}),iu=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>g.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[g.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),tg=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:s,labelClassName:a})=>{const l=__();return g.jsx(iu,{label:g.jsxs(g.Fragment,{children:[e,":"]}),className:s??"",labelClassName:a,id:l,children:g.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},ng=({className:e="",placement:t,children:n})=>{const r=hl();return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,ref:r,children:g.jsx(je,{icon:mC})}),g.jsx(Er,{target:r,placement:t,children:n})]})},M1=({isLast:e,...t})=>g.jsx(tg,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),tpe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var h,p,m;const[i,o]=V.useState(((h=n.redirects)==null?void 0:h.baseUrlRedirect)??""),[s,a]=V.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=V.useState(((m=n.redirects)==null?void 0:m.invalidShortUrlRedirect)??""),f=rh(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:x1(i),regular404Redirect:x1(s),invalidShortUrlRedirect:x1(l)}}).then(t));return g.jsx(Uo,{isOpen:e,toggle:t,centered:!0,children:g.jsxs("form",{name:"domainRedirectsModal",onSubmit:f,children:[g.jsxs(ro,{toggle:t,children:["Edit redirects for ",g.jsx("b",{children:n.domain})]}),g.jsxs(ki,{children:[g.jsxs(M1,{value:i,onChange:o,children:[g.jsxs(ng,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",g.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),g.jsxs(M1,{value:s,onChange:a,children:[g.jsxs(ng,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",g.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),g.jsxs(M1,{value:l,isLast:!0,onChange:c,children:[g.jsx(ng,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),g.jsxs(ta,{children:[g.jsx(ht,{color:"link",type:"button",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"primary",children:"Save"})]})]})})},npe=({domain:e,editDomainRedirects:t,selectedServer:n})=>{const[r,i]=hn(),{isDefault:o}=e,s=!o||Pi("defaultDomainRedirectsEdition",n),a=Pi("domainVisits",n),l=Ud(n);return g.jsxs(w_,{children:[a&&g.jsxs(Ue,{tag:Lt,to:`/server/${l}/domain/${e.domain}${e.isDefault?`_${E5}`:""}/visits`,children:[g.jsx(je,{icon:pC,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{disabled:!s,onClick:s?i:void 0,children:[g.jsx(je,{fixedWidth:!0,icon:hC})," Edit redirects"]}),g.jsx(tpe,{domain:e,isOpen:r,toggle:i,editDomainRedirects:t})]})},rpe=({status:e,matchMedia:t=window.matchMedia})=>{const n=hl(),r=()=>t("(max-width: 991px)").matches,[i,o]=V.useState(r());return V.useEffect(()=>{const s=()=>o(r());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e==="validating"?g.jsx(je,{fixedWidth:!0,icon:Yj,spin:!0}):g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:n,children:e==="valid"?g.jsx(je,{fixedWidth:!0,icon:ud,className:"text-muted"}):g.jsx(je,{fixedWidth:!0,icon:vw,className:"text-danger"})}),g.jsx(Er,{target:n,placement:i?"top-start":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":g.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",g.jsx("br",{}),"Check the ",g.jsx(Si,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},R1=({fallback:e})=>g.jsxs("span",{className:"text-muted",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),ipe=()=>g.jsxs(g.Fragment,{children:[g.jsx(je,{fixedWidth:!0,icon:qX,className:"text-primary",id:"defaultDomainIcon"}),g.jsx(Er,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),ope=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r,selectedServer:i})=>{const{domain:o,isDefault:s,redirects:a,status:l}=e;return V.useEffect(()=>{n(e.domain)},[]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:s&&g.jsx(ipe,{})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:o}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??g.jsx(R1,{fallback:r==null?void 0:r.baseUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??g.jsx(R1,{fallback:r==null?void 0:r.regular404Redirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??g.jsx(R1,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:g.jsx(rpe,{status:l})}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(npe,{domain:e,editDomainRedirects:t,selectedServer:i})})]})},vN=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],spe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i,selectedServer:o})=>{var m;const{filteredDomains:s,defaultRedirects:a,loading:l,error:c,errorData:f}=t,h=a??((m=s.find(({isDefault:v})=>v))==null?void 0:m.redirects);if(V.useEffect(()=>{e()},[]),l)return g.jsx(So,{loading:!0});const p=()=>c?g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:f,fallbackMessage:"Error loading domains :("})}):g.jsx(cn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsx("tr",{children:vN.map((v,y)=>g.jsx("th",{children:v},y))})}),g.jsxs("tbody",{children:[s.length<1&&g.jsx("tr",{children:g.jsx("td",{colSpan:vN.length,className:"text-center",children:"No results found"})}),s.map(v=>g.jsx(ope,{domain:v,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:h,selectedServer:o},v.domain))]})]})});return g.jsxs(g.Fragment,{children:[g.jsx(ih,{className:"mb-3",onChange:n}),p()]})},ape="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",lpe=e=>rr(ape,async({domain:t,redirects:n},{getState:r})=>{const{editDomainRedirects:i}=e(r),o=await i({domain:t,...n});return{domain:t,redirects:o}}),cpe=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Mp="shlink/domainsList",Rp={domains:[],filteredDomains:[],loading:!1,error:!1},yN=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},_N=(e,t)=>n=>n.domain!==e?n:{...n,status:t},upe=(e,t)=>{const n=rr(`${Mp}/listDomains`,async(s,{getState:a})=>{const{listDomains:l}=e(a),{data:c,defaultRedirects:f}=await l();return{domains:c.map(h=>({...h,status:"validating"})),defaultRedirects:f}}),r=rr(`${Mp}/checkDomainHealth`,async(s,{getState:a})=>{const{selectedServer:l}=a();if(!rC(l))return{domain:s,status:"invalid"};try{const{url:c,...f}=l,{health:h}=e({...f,url:cpe(c,s)}),{status:p}=await h();return{domain:s,status:p==="pass"?"valid":"invalid"}}catch{return{domain:s,status:"invalid"}}}),i=yn(`${Mp}/filterDomains`),{reducer:o}=Yn({name:Mp,initialState:Rp,reducers:{},extraReducers:s=>{s.addCase(n.pending,()=>({...Rp,loading:!0})),s.addCase(n.rejected,(a,{error:l})=>({...Rp,error:!0,errorData:no(l)})),s.addCase(n.fulfilled,(a,{payload:l})=>({...Rp,...l,filteredDomains:l.domains})),s.addCase(r.fulfilled,({domains:a,filteredDomains:l,...c},{payload:f})=>({...c,domains:a.map(_N(f.domain,f.status)),filteredDomains:l.map(_N(f.domain,f.status))})),s.addCase(i,(a,{payload:l})=>({...a,filteredDomains:a.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),s.addCase(t.fulfilled,(a,{payload:l})=>({...a,domains:a.domains.map(yN(l)),filteredDomains:a.filteredDomains.map(yN(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},fpe=(e,t)=>{e.serviceFactory("DomainSelector",()=>_ae),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>spe),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",upe,"buildShlinkApiClient","editDomainRedirects"),e.serviceFactory("domainsListReducer",at("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",at("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",at("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",lpe,"buildShlinkApiClient"),e.serviceFactory("checkDomainHealth",at("checkDomainHealth"),"domainsListReducerCreator")},bN="shlink/mercure",dpe={loading:!0,error:!1},hpe=e=>{const t=rr(`${bN}/loadMercureInfo`,(r,{getState:i})=>{const{settings:o}=i();if(!o.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e(i).mercureInfo()}),{reducer:n}=Yn({name:bN,initialState:dpe,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},ppe=e=>{e.serviceFactory("mercureInfoReducerCreator",hpe,"buildShlinkApiClient"),e.serviceFactory("mercureInfoReducer",at("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",at("loadMercureInfo"),"mercureInfoReducerCreator")},T5=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return g.jsxs(Uo,{centered:!0,isOpen:e,children:[g.jsxs(ro,{children:["Duplicated server",i&&"s"]}),g.jsxs(ki,{children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{children:t.map(({url:o,apiKey:s},a)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:s})]},a):g.jsxs(V.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:s})]})]},a))}),g.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),g.jsxs(ta,{children:[g.jsx(ht,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),g.jsx(ht,{color:"primary",onClick:r,children:"Save anyway"})]})]})},O5=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=V.useState(""),[s,a]=V.useState(""),[l,c]=V.useState(""),f=rh(()=>e({name:i,url:s,apiKey:l}));return V.useEffect(()=>{t&&o(t.name),t&&a(t.url),t&&c(t.apiKey)},[t]),g.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[g.jsxs(cn,{className:"mb-3",title:r,children:[g.jsx(tg,{value:i,onChange:o,children:"Name"}),g.jsx(tg,{type:"url",value:s,onChange:a,children:"URL"}),g.jsx(tg,{value:l,onChange:c,children:"API key"})]}),g.jsx("div",{className:"text-end",children:n})]})},wN=4e3,xN=({type:e})=>g.jsx("div",{className:"mt-3",children:g.jsxs(Nr,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),mpe=(e,t)=>({servers:n,createServers:r})=>{const i=Io(),o=na(),s=!!Object.keys(n).length,[a,l]=t(!1,wN),[c,f]=t(!1,wN),[h,p]=hn(),[m,v]=V.useState(),y=()=>{if(!m)return;const x=lE();r([{...m,id:x}]),i(`/server/${x}`)};return V.useEffect(()=>{Object.values(n).some(({url:_,apiKey:w})=>(m==null?void 0:m.url)===_&&(m==null?void 0:m.apiKey)===w)?p():y()},[m]),g.jsxs(ru,{children:[g.jsxs(O5,{title:g.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!s&&g.jsx(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),s&&g.jsx(ht,{outline:!0,onClick:o,children:"Cancel"}),g.jsx(ht,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),a&&g.jsx(xN,{type:"success"}),c&&g.jsx(xN,{type:"error"}),g.jsx(T5,{isOpen:h,duplicatedServers:m?[m]:[],onDiscard:o,onSave:y})]})},gpe=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,s,a]=hn();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:n,onClick:s,children:[!r&&g.jsx(je,{fixedWidth:!0,icon:dC}),g.jsx("span",{className:i,children:r??"Remove this server"})]}),g.jsx(e,{server:t,isOpen:o,toggle:a})]})},vpe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=Io(),s=V.useRef(!1),a=()=>{s.current=!0,t()},l=()=>{s.current&&(r(e),i&&o("/"))};return g.jsxs(Uo,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[g.jsx(ro,{toggle:t,className:"text-danger",children:"Remove server"}),g.jsxs(ki,{children:[g.jsxs("p",{children:["Are you sure you want to remove ",g.jsx("b",{children:e?e.name:""}),"?"]}),g.jsx("p",{children:g.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),g.jsxs(ta,{children:[g.jsx(ht,{color:"link",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"danger",onClick:a,children:"Delete"})]})]})},ype=e=>V6(({editServer:t,selectedServer:n,selectServer:r})=>{const i=na(),{reconnect:o}=Soe();if(!ks(n))return null;const s=a=>{t(n.id,a),o==="true"&&r(n.id),i()};return g.jsx(ru,{children:g.jsxs(O5,{title:g.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:s,children:[g.jsx(ht,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),g.jsx(ht,{outline:!0,color:"primary",children:"Save"})]})})},e);const SN=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),_pe=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:s="bottom",className:a=""})=>{const l=hl(),[c,f]=V.useState(),[h,p]=V.useState([]),[m,,v,y]=hn(),x=Dt(t,i),_=Dt(()=>x(c??[]),y),w=Dt(()=>x((c??[]).filter(pG(SN(h)))),y),S=async({target:T})=>{var P;return e((P=T.files)==null?void 0:P[0]).then(f).then(()=>{T.value=null}).catch(o)};return V.useEffect(()=>{if(!c)return;const T=Object.values(n),P=c.filter(SN(T)),k=!!P.length;k?p(P):x(c),k&&v()},[c]),g.jsxs(g.Fragment,{children:[g.jsxs(ht,{outline:!0,id:"importBtn",className:a,onClick:()=>{var T;return(T=l.current)==null?void 0:T.click()},children:[g.jsx(je,{icon:JX,fixedWidth:!0})," ",r??"Import from file"]}),g.jsxs(Er,{placement:s,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",g.jsx("b",{children:"name"}),", ",g.jsx("b",{children:"apiKey"})," and ",g.jsx("b",{children:"url"}),"."]}),g.jsx("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:S}),g.jsx(T5,{isOpen:m,duplicatedServers:h,onDiscard:w,onSave:_})]})};const bpe=e=>({servers:t,selectedServer:n})=>g.jsx(ru,{children:g.jsxs("div",{className:"server-error__container flex-column",children:[g.jsxs(So,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!ks(n)&&"Could not find this Shlink server.",ks(n)&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),g.jsxs(z6,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(Lt,{to:"/server/create",children:"add a new one"}),"."]}),ks(n)&&g.jsx("div",{className:"container mt-3 mt-md-5",children:g.jsxs("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",g.jsx(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",g.jsx(Lt,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),wpe=4e3,xpe=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[s,a]=V.useState(o),l=p=>a(o.filter(({name:m,url:v})=>`${m} ${v}`.toLowerCase().match(p.toLowerCase()))),c=s.some(({autoConnect:p})=>!!p),[f,h]=n(!1,wpe);return V.useEffect(()=>{a(Object.values(i))},[i]),g.jsxs(ru,{children:[g.jsx(ih,{className:"mb-3",onChange:l}),g.jsxs(Qn,{className:"mb-3",children:[g.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[g.jsx(t,{className:"flex-fill",onImportError:h,children:"Import servers"}),o.length>0&&g.jsxs(ht,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[g.jsx(je,{icon:Xj,fixedWidth:!0})," Export servers"]})]}),g.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:g.jsxs(ht,{outline:!0,color:"primary",className:"flex-fill",tag:Lt,to:"/server/create",children:[g.jsx(je,{icon:gC,fixedWidth:!0})," Add a server"]})})]}),g.jsx(cn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsxs("tr",{children:[c&&g.jsx("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),g.jsx("th",{children:"Name"}),g.jsx("th",{children:"Base URL"}),g.jsx("th",{"aria-label":"Options"})]})}),g.jsxs("tbody",{children:[!s.length&&g.jsx("tr",{className:"text-center",children:g.jsx("td",{colSpan:4,children:"No servers found."})}),s.map(p=>g.jsx(r,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&g.jsx("div",{className:"mt-3",children:g.jsx(Nr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Spe=e=>({server:t,hasAutoConnect:n})=>g.jsxs("tr",{className:"responsive-table__row",children:[n&&g.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:ud,className:"text-primary",id:"autoConnectIcon"}),g.jsx(Er,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:g.jsx(Lt,{to:`/server/${t.id}`,children:t.name})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(e,{server:t})})]});var Cpe={prefix:"far",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"]},Epe=Cpe,Tpe={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 135.1c-4.2-4.5-10.1-7.1-16.3-7.1C266 128 256 138 256 150.3V208H160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32h96v57.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.3-7.1l99.9-107.1c3.5-3.8 5.5-8.7 5.5-13.8s-2-10.1-5.5-13.8L294.6 135.1z"]},Ope=Tpe,Ppe={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"]},P5={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]};const kpe=e=>({server:t,setAutoConnect:n})=>{const[r,,i,o]=hn(),s=`/server/${t.id}`,{autoConnect:a}=t,l=a?XX:Ppe;return g.jsxs(w_,{minWidth:170,children:[g.jsxs(Ue,{tag:Lt,to:s,children:[g.jsx(je,{icon:ZX,fixedWidth:!0})," Connect"]}),g.jsxs(Ue,{tag:Lt,to:`${s}/edit`,children:[g.jsx(je,{icon:hC,fixedWidth:!0})," Edit server"]}),g.jsxs(Ue,{onClick:()=>n(t,!a),children:[g.jsx(je,{icon:l,fixedWidth:!0})," ",a?"Do not a":"A","uto-connect"]}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:i,children:[g.jsx(je,{icon:dC,fixedWidth:!0})," Remove server"]}),g.jsx(e,{redirectHome:!1,server:t,isOpen:r,toggle:o})]})};var ty={},Mpe={get exports(){return ty},set exports(e){ty=e}};/** @license * eventsource.js * Available under MIT License (MIT) diff --git a/feature/menus/index.html b/feature/menus/index.html index faae603c..5b9fd5a6 100644 --- a/feature/menus/index.html +++ b/feature/menus/index.html @@ -79,7 +79,7 @@ Shlink — The URL shortener - + diff --git a/feature/menus/service-worker.js b/feature/menus/service-worker.js index 4803e979..3f997787 100644 --- a/feature/menus/service-worker.js +++ b/feature/menus/service-worker.js @@ -1,2 +1,2 @@ try{self["workbox:core:6.5.3"]&&_()}catch{}const z=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},G=z;class h extends Error{constructor(e,t){const n=G(e,t);super(n),this.name=e,this.details=t}}const B=new Set;function Q(s){B.add(s)}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},E=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),J=s=>{for(const e of Object.keys(d))s(e)},x={updateDetails:s=>{J(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||E(d.googleAnalytics),getPrecacheName:s=>s||E(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||E(d.runtime),getSuffix:()=>d.suffix};function N(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function X(s,e,t,n){const r=N(e.url,t);if(e.url===r)return s.match(e,n);const a=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,a);for(const c of i){const o=N(c.url,t);if(r===o)return s.match(c,n)}}let m;function Y(){if(m===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),m=!0}catch{m=!1}m=!1}return m}function q(s){s.then(()=>{})}class Z{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}async function ee(){for(const s of B)await s()}const te=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function se(s){return new Promise(e=>setTimeout(e,s))}function K(s,e){const t=e();return s.waitUntil(t),t}async function ne(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new h("cross-origin-copy-response",{origin:t});const n=s.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},a=e?e(r):r,i=Y()?n.body:await n.blob();return new Response(i,a)}function re(){self.addEventListener("activate",()=>self.clients.claim())}const ae=(s,e)=>e.some(t=>s instanceof t);let A,O;function ie(){return A||(A=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ce(){return O||(O=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const F=new WeakMap,U=new WeakMap,H=new WeakMap,k=new WeakMap,P=new WeakMap;function oe(s){const e=new Promise((t,n)=>{const r=()=>{s.removeEventListener("success",a),s.removeEventListener("error",i)},a=()=>{t(f(s.result)),r()},i=()=>{n(s.error),r()};s.addEventListener("success",a),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&F.set(t,s)}).catch(()=>{}),P.set(e,s),e}function le(s){if(U.has(s))return;const e=new Promise((t,n)=>{const r=()=>{s.removeEventListener("complete",a),s.removeEventListener("error",i),s.removeEventListener("abort",i)},a=()=>{t(),r()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),r()};s.addEventListener("complete",a),s.addEventListener("error",i),s.addEventListener("abort",i)});U.set(s,e)}let T={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return U.get(s);if(e==="objectStoreNames")return s.objectStoreNames||H.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function he(s){T=s(T)}function ue(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(v(this),e,...t);return H.set(n,e.sort?e.sort():[e]),f(n)}:ce().includes(s)?function(...e){return s.apply(v(this),e),f(F.get(this))}:function(...e){return f(s.apply(v(this),e))}}function de(s){return typeof s=="function"?ue(s):(s instanceof IDBTransaction&&le(s),ae(s,ie())?new Proxy(s,T):s)}function f(s){if(s instanceof IDBRequest)return oe(s);if(k.has(s))return k.get(s);const e=de(s);return e!==s&&(k.set(s,e),P.set(e,s)),e}const v=s=>P.get(s);function fe(s,e,{blocked:t,upgrade:n,blocking:r,terminated:a}={}){const i=indexedDB.open(s,e),c=f(i);return n&&i.addEventListener("upgradeneeded",o=>{n(f(i.result),o.oldVersion,o.newVersion,f(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{a&&o.addEventListener("close",()=>a()),r&&o.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function pe(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const ge=["get","getKey","getAll","getAllKeys","count"],me=["put","add","delete","clear"],D=new Map;function S(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(D.get(e))return D.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,r=me.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(r||ge.includes(t)))return;const a=async function(i,...c){const o=this.transaction(i,r?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),r&&o.done]))[0]};return D.set(e,a),a}he(s=>({...s,get:(e,t,n)=>S(e,t)||s.get(e,t,n),has:(e,t)=>!!S(e,t)||s.has(e,t)}));try{self["workbox:expiration:6.5.3"]&&_()}catch{}const ye="workbox-expiration",y="cache-entries",W=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class we{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(y,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&pe(this._cacheName)}async setTimestamp(e,t){e=W(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},a=(await this.getDb()).transaction(y,"readwrite",{durability:"relaxed"});await a.store.put(n),await a.done}async getTimestamp(e){const n=await(await this.getDb()).get(y,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let r=await n.transaction(y).store.index("timestamp").openCursor(null,"prev");const a=[];let i=0;for(;r;){const o=r.value;o.cacheName===this._cacheName&&(e&&o.timestamp=t?a.push(r.value):i++),r=await r.continue()}const c=[];for(const o of a)await n.delete(y,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+W(e)}async getDb(){return this._db||(this._db=await fe(ye,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class be{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new we(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const r of t)await n.delete(r,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,q(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t{if(!a)return null;const i=this._isResponseDateFresh(a),c=this._getCacheExpiration(r);q(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?a:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const r=this._getCacheExpiration(t);await r.updateTimestamp(n.url),await r.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&Q(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===x.getRuntimeName())throw new h("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new be(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),r=new Date(t).getTime();return isNaN(r)?null:r}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}try{self["workbox:precaching:6.5.3"]&&_()}catch{}const Re="__WB_REVISION__";function Ce(s){if(!s)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const a=new URL(s,location.href);return{cacheKey:a.href,url:a.href}}const{revision:e,url:t}=s;if(!t)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(!e){const a=new URL(t,location.href);return{cacheKey:a.href,url:a.href}}const n=new URL(t,location.href),r=new URL(t,location.href);return n.searchParams.set(Re,e),{cacheKey:n.href,url:r.href}}class xe{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const r=t.originalRequest.url;n?this.notUpdatedURLs.push(r):this.updatedURLs.push(r)}return n}}}class Ee{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const r=(n==null?void 0:n.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return r?new Request(r,{headers:t.headers}):t},this._precacheController=e}}try{self["workbox:strategies:6.5.3"]&&_()}catch{}function R(s){return typeof s=="string"?new Request(s):s}class ke{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new Z,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=R(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new h("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const a=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:a,response:i});return i}catch(i){throw r&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:r.clone(),request:a.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=R(e);let n;const{cacheName:r,matchOptions:a}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},a),{cacheName:r});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:r,matchOptions:a,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=R(e);await se(0);const r=await this.getCacheKey(n,"write");if(!t)throw new h("cache-put-with-no-response",{url:te(r.url)});const a=await this._ensureResponseSafeToCache(t);if(!a)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),l=this.hasCallback("cacheDidUpdate"),g=l?await X(o,r.clone(),["__WB_REVISION__"],c):null;try{await o.put(r,l?a.clone():a)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await ee(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:i,oldResponse:g,newResponse:a.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(const a of this.iterateCallbacks("cacheKeyWillBeUsed"))r=R(await a({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield a=>{const i=Object.assign(Object.assign({},a),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const r of this.iterateCallbacks("cacheWillUpdate"))if(t=await r({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=x.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n=typeof e.request=="string"?new Request(e.request):e.request,r="params"in e?e.params:void 0,a=new ke(this,{event:t,request:n,params:r}),i=this._getResponse(a,n,t),c=this._awaitComplete(i,a,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let r;try{if(r=await this._handle(t,e),!r||r.type==="error")throw new h("no-response",{url:t.url})}catch(a){if(a instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(r=await i({error:a,event:n,request:t}),r)break}if(!r)throw a}for(const a of e.iterateCallbacks("handlerWillRespond"))r=await a({event:n,request:t,response:r});return r}async _awaitComplete(e,t,n,r){let a,i;try{a=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:r,request:n,response:a}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:r,request:n,response:a,error:i}),t.destroy(),i)throw i}}class p extends V{constructor(e={}){e.cacheName=x.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(p.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const r=t.params||{};if(this._fallbackToNetwork){const a=r.integrity,i=e.integrity,c=!i||i===a;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?i||a:void 0})),a&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new h("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new h("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,r]of this.plugins.entries())r!==p.copyRedirectedCacheableResponsesPlugin&&(r===p.defaultPrecacheCacheabilityPlugin&&(e=n),r.cacheWillUpdate&&t++);t===0?this.plugins.push(p.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}p.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};p.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await ne(s):s}};class ve{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new p({cacheName:x.getPrecacheName(e),plugins:[...t,new Ee({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:r,url:a}=Ce(n),i=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==r)throw new h("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:r});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(r)&&this._cacheKeysToIntegrities.get(r)!==n.integrity)throw new h("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(r,n.integrity)}if(this._urlsToCacheKeys.set(a,r),this._urlsToCacheModes.set(a,i),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")} -This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return K(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[a,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return K(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),r=new Set(this._urlsToCacheKeys.values()),a=[];for(const i of n)r.has(i.url)||(await t.delete(i),a.push(i.url));return{deletedURLs:a}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let L;const I=()=>(L||(L=new ve),L);try{self["workbox:routing:6.5.3"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class b{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class De extends b{constructor(e,t,n){const r=({url:a})=>{const i=e.exec(a.href);if(i&&!(a.origin!==location.origin&&i.index!==0))return i.slice(1)};super(r,t,n)}}class Le{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(r=>{typeof r=="string"&&(r=[r]);const a=new Request(...r);return this.handleRequest({request:a,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const r=n.origin===location.origin,{params:a,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:a})}catch(u){l=Promise.reject(u)}const g=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:a})}catch(j){j instanceof Error&&(u=j)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){const a=this._routes.get(n.method)||[];for(const i of a){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:r});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=$){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let w;const Ue=()=>(w||(w=new Le,w.addFetchListener(),w.addCacheListener()),w);function M(s,e,t){let n;if(typeof s=="string"){const a=new URL(s,location.href),i=({url:c})=>c.href===a.href;n=new b(i,e,t)}else if(s instanceof RegExp)n=new De(s,e,t);else if(typeof s=="function")n=new b(s,e,t);else if(s instanceof b)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Ue().registerRoute(n),n}function Te(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Pe(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const a=new URL(s,location.href);a.hash="",yield a.href;const i=Te(a,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(r){const c=r({url:a});for(const o of c)yield o.href}}class Ie extends b{constructor(e,t){const n=({request:r})=>{const a=e.getURLsToCacheKeys();for(const i of Pe(r.url,t)){const c=a.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function Me(s){const e=I(),t=new Ie(e,s);M(t)}function je(s){return I().createHandlerBoundToURL(s)}function Ne(s){I().precache(s)}function Ke(s,e){Ne(s),Me(e)}const Ae={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Oe extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Ae)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let r=await t.cacheMatch(e),a;if(!r)try{r=await n}catch(i){i instanceof Error&&(a=i)}if(!r)throw new h("no-response",{url:e.url,error:a});return r}}const Se="shlink-web-client",We="A React-based progressive web application for shlink",Be="/shlink-web-client/feature/menus",qe="https://github.com/shlinkio/shlink-web-client",Fe="MIT",He={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"jest --env=jsdom --colors","test:coverage":"npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary","test:ci":"npm run test:coverage -- --coverageReporters=clover --ci","test:pretty":"npm run test:coverage -- --coverageReporters=html","test:verbose":"npm run test -- --verbose"},Ve={"@babel/preset-env":"^7.20.2","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.0","@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},$e={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/jest":"^29.2.4","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","adm-zip":"^0.5.10","babel-jest":"^29.5.0",chalk:"^5.2.0",eslint:"^8.30.0","identity-obj-proxy":"^3.0.0",jest:"^29.3.1","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^29.3.1","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0",typescript:"^5.0.2",vite:"^4.3.1","vite-plugin-pwa":"^0.14.4"},ze=[">0.2%","not dead","not ie <= 11","not op_mini all"];var Ge={name:Se,description:We,private:!1,homepage:Be,repository:qe,license:Fe,scripts:He,dependencies:Ve,devDependencies:$e,browserslist:ze};re();Ke([{"revision":null,"url":"assets/index-14f07603.css"},{"revision":null,"url":"assets/index-bf25dd9f.js"},{"revision":"39730931f4aac65941f117cf22df56ef","url":"index.html"},{"revision":"3e8169a112865ef0d76bba4e2dfd3a89","url":"./icons/icon-16x16.png"},{"revision":"20f0b51945ae3c973420e31d6b4d43c1","url":"./icons/icon-24x24.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"./icons/icon-32x32.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"./icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"./icons/icon-48x48.png"},{"revision":"40209a194f29b21882571c77bd2bd906","url":"./icons/icon-60x60.png"},{"revision":"c8ba5a8c1da76d74c7bb21827fcf975c","url":"./icons/icon-64x64.png"},{"revision":"ae3435baceb494f9c966e2c2c736ea35","url":"./icons/icon-72x72.png"},{"revision":"850aa5b026fd1452af6c1ddd9d71850f","url":"./icons/icon-76x76.png"},{"revision":"8c62535e6b7a498ece1f6c6ae62ede59","url":"./icons/icon-96x96.png"},{"revision":"2dff586aaefa4c8d17f4c0bcbdef8b53","url":"./icons/icon-114x114.png"},{"revision":"8e28257a68ef1c55bc68bfff80e1a310","url":"./icons/icon-120x120.png"},{"revision":"0059b6f0c97fa871a5c29643b2857585","url":"./icons/icon-128x128.png"},{"revision":"41478c2456281f61e54d714718743ecc","url":"./icons/icon-144x144.png"},{"revision":"625251910295f33a578ae6d8117711c9","url":"./icons/icon-150x150.png"},{"revision":"19b71508b1d05defe32cf16a7d453001","url":"./icons/icon-152x152.png"},{"revision":"9d029a32a54ba3084c67acd5d74f8ac4","url":"./icons/icon-160x160.png"},{"revision":"6ec104aeaf745f003ecdaef2edddce97","url":"./icons/icon-167x167.png"},{"revision":"871d67907434ed0ddf5d2a6c220e09af","url":"./icons/icon-180x180.png"},{"revision":"cee2529402074d73b2135e2ddee25f6b","url":"./icons/icon-192x192.png"},{"revision":"85055b452284c0193142936dee7d2cd1","url":"./icons/icon-196x196.png"},{"revision":"f471155dd70b99924422dd9dd87ea94d","url":"./icons/icon-228x228.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"./icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"./icons/icon-310x310.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"./icons/icon-384x384.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"./icons/icon-512x512.png"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"./icons/icon-1024x1024.png"},{"revision":"b698d7b42d30d6cd8c0764a516ef59c2","url":"manifest.json"}]);const Qe=new RegExp("/[^/?]+\\.[^/]+$");M(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(Qe)),je(`${Ge.homepage}/index.html`));M(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Oe({cacheName:"images",plugins:[new _e({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()}); +This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return K(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[a,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return K(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),r=new Set(this._urlsToCacheKeys.values()),a=[];for(const i of n)r.has(i.url)||(await t.delete(i),a.push(i.url));return{deletedURLs:a}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let L;const I=()=>(L||(L=new ve),L);try{self["workbox:routing:6.5.3"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class b{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class De extends b{constructor(e,t,n){const r=({url:a})=>{const i=e.exec(a.href);if(i&&!(a.origin!==location.origin&&i.index!==0))return i.slice(1)};super(r,t,n)}}class Le{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(r=>{typeof r=="string"&&(r=[r]);const a=new Request(...r);return this.handleRequest({request:a,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const r=n.origin===location.origin,{params:a,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:a})}catch(u){l=Promise.reject(u)}const g=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:a})}catch(j){j instanceof Error&&(u=j)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){const a=this._routes.get(n.method)||[];for(const i of a){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:r});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=$){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let w;const Ue=()=>(w||(w=new Le,w.addFetchListener(),w.addCacheListener()),w);function M(s,e,t){let n;if(typeof s=="string"){const a=new URL(s,location.href),i=({url:c})=>c.href===a.href;n=new b(i,e,t)}else if(s instanceof RegExp)n=new De(s,e,t);else if(typeof s=="function")n=new b(s,e,t);else if(s instanceof b)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Ue().registerRoute(n),n}function Te(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Pe(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const a=new URL(s,location.href);a.hash="",yield a.href;const i=Te(a,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(r){const c=r({url:a});for(const o of c)yield o.href}}class Ie extends b{constructor(e,t){const n=({request:r})=>{const a=e.getURLsToCacheKeys();for(const i of Pe(r.url,t)){const c=a.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function Me(s){const e=I(),t=new Ie(e,s);M(t)}function je(s){return I().createHandlerBoundToURL(s)}function Ne(s){I().precache(s)}function Ke(s,e){Ne(s),Me(e)}const Ae={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Oe extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Ae)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let r=await t.cacheMatch(e),a;if(!r)try{r=await n}catch(i){i instanceof Error&&(a=i)}if(!r)throw new h("no-response",{url:e.url,error:a});return r}}const Se="shlink-web-client",We="A React-based progressive web application for shlink",Be="/shlink-web-client/feature/menus",qe="https://github.com/shlinkio/shlink-web-client",Fe="MIT",He={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"jest --env=jsdom --colors","test:coverage":"npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary","test:ci":"npm run test:coverage -- --coverageReporters=clover --ci","test:pretty":"npm run test:coverage -- --coverageReporters=html","test:verbose":"npm run test -- --verbose"},Ve={"@babel/preset-env":"^7.20.2","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.0","@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},$e={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/jest":"^29.2.4","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","adm-zip":"^0.5.10","babel-jest":"^29.5.0",chalk:"^5.2.0",eslint:"^8.30.0","identity-obj-proxy":"^3.0.0",jest:"^29.3.1","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^29.3.1","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0",typescript:"^5.0.2",vite:"^4.3.1","vite-plugin-pwa":"^0.14.4"},ze=[">0.2%","not dead","not ie <= 11","not op_mini all"];var Ge={name:Se,description:We,private:!1,homepage:Be,repository:qe,license:Fe,scripts:He,dependencies:Ve,devDependencies:$e,browserslist:ze};re();Ke([{"revision":null,"url":"assets/index-14f07603.css"},{"revision":null,"url":"assets/index-6b02aaa0.js"},{"revision":"e3409ae9513c176514c35e61bb782e6a","url":"index.html"},{"revision":"3e8169a112865ef0d76bba4e2dfd3a89","url":"./icons/icon-16x16.png"},{"revision":"20f0b51945ae3c973420e31d6b4d43c1","url":"./icons/icon-24x24.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"./icons/icon-32x32.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"./icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"./icons/icon-48x48.png"},{"revision":"40209a194f29b21882571c77bd2bd906","url":"./icons/icon-60x60.png"},{"revision":"c8ba5a8c1da76d74c7bb21827fcf975c","url":"./icons/icon-64x64.png"},{"revision":"ae3435baceb494f9c966e2c2c736ea35","url":"./icons/icon-72x72.png"},{"revision":"850aa5b026fd1452af6c1ddd9d71850f","url":"./icons/icon-76x76.png"},{"revision":"8c62535e6b7a498ece1f6c6ae62ede59","url":"./icons/icon-96x96.png"},{"revision":"2dff586aaefa4c8d17f4c0bcbdef8b53","url":"./icons/icon-114x114.png"},{"revision":"8e28257a68ef1c55bc68bfff80e1a310","url":"./icons/icon-120x120.png"},{"revision":"0059b6f0c97fa871a5c29643b2857585","url":"./icons/icon-128x128.png"},{"revision":"41478c2456281f61e54d714718743ecc","url":"./icons/icon-144x144.png"},{"revision":"625251910295f33a578ae6d8117711c9","url":"./icons/icon-150x150.png"},{"revision":"19b71508b1d05defe32cf16a7d453001","url":"./icons/icon-152x152.png"},{"revision":"9d029a32a54ba3084c67acd5d74f8ac4","url":"./icons/icon-160x160.png"},{"revision":"6ec104aeaf745f003ecdaef2edddce97","url":"./icons/icon-167x167.png"},{"revision":"871d67907434ed0ddf5d2a6c220e09af","url":"./icons/icon-180x180.png"},{"revision":"cee2529402074d73b2135e2ddee25f6b","url":"./icons/icon-192x192.png"},{"revision":"85055b452284c0193142936dee7d2cd1","url":"./icons/icon-196x196.png"},{"revision":"f471155dd70b99924422dd9dd87ea94d","url":"./icons/icon-228x228.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"./icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"./icons/icon-310x310.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"./icons/icon-384x384.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"./icons/icon-512x512.png"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"./icons/icon-1024x1024.png"},{"revision":"b698d7b42d30d6cd8c0764a516ef59c2","url":"manifest.json"}]);const Qe=new RegExp("/[^/?]+\\.[^/]+$");M(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(Qe)),je(`${Ge.homepage}/index.html`));M(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Oe({cacheName:"images",plugins:[new _e({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()});