From 8a170cb265536e4c9c54e6ac146fbcece03bb604 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Sat, 7 Feb 2026 12:26:49 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20preview-env=20from=20@=20shlin?= =?UTF-8?q?kio/shlink-web-client@5f3a4373656887cb09f4baa2037dbb9cad5372f7?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/{index-BUyuhTRP.js => index-DYw_jskz.js} | 2 +- dependabot/npm_and_yarn/react-945e18fcf3/index.html | 2 +- dependabot/npm_and_yarn/react-945e18fcf3/service-worker.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename dependabot/npm_and_yarn/react-945e18fcf3/assets/{index-BUyuhTRP.js => index-DYw_jskz.js} (99%) diff --git a/dependabot/npm_and_yarn/react-945e18fcf3/assets/index-BUyuhTRP.js b/dependabot/npm_and_yarn/react-945e18fcf3/assets/index-DYw_jskz.js similarity index 99% rename from dependabot/npm_and_yarn/react-945e18fcf3/assets/index-BUyuhTRP.js rename to dependabot/npm_and_yarn/react-945e18fcf3/assets/index-DYw_jskz.js index 976dee36..ac1d6a6d 100644 --- a/dependabot/npm_and_yarn/react-945e18fcf3/assets/index-BUyuhTRP.js +++ b/dependabot/npm_and_yarn/react-945e18fcf3/assets/index-DYw_jskz.js @@ -564,7 +564,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }`;function QR(){var e=HR,t=qR,n=Xe.cssPrefix,r=Xe.replacementClass,i=NW;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),l=new RegExp("\\--".concat(e,"\\-"),"g"),u=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(l,"--".concat(n,"-")).replace(u,".".concat(r))}return i}var PT=!1;function Lx(){Xe.autoAddCss&&!PT&&(OW(QR()),PT=!0)}var LW={mixout:function(){return{dom:{css:QR,insertCss:Lx}}},hooks:function(){return{beforeDOMElementCreation:function(){Lx()},beforeI2svg:function(){Lx()}}}},qo=pl||{};qo[Ho]||(qo[Ho]={});qo[Ho].styles||(qo[Ho].styles={});qo[Ho].hooks||(qo[Ho].hooks={});qo[Ho].shims||(qo[Ho].shims=[]);var pa=qo[Ho],JR=[],eD=function(){an.removeEventListener("DOMContentLoaded",eD),Iv=1,JR.map(function(t){return t()})},Iv=!1;ts&&(Iv=(an.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(an.readyState),Iv||an.addEventListener("DOMContentLoaded",eD));function RW(e){ts&&(Iv?setTimeout(e,0):JR.push(e))}function wm(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?XR(e):"<".concat(t," ").concat(jW(r),">").concat(o.map(wm).join(""),"")}function NT(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var Rx=function(t,n,r,i){var o=Object.keys(t),l=o.length,u=n,f,h,m;for(r===void 0?(f=1,m=t[o[0]]):(f=0,m=r);f2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=LT(t);typeof pa.hooks.addPack=="function"&&!i?pa.hooks.addPack(e,LT(t)):pa.styles[e]=Ie(Ie({},pa.styles[e]||{}),o),e==="fas"&&Y_("fa",t)}var Gh=pa.styles,DW=pa.shims,nD=Object.keys(BS),kW=nD.reduce(function(e,t){return e[t]=Object.keys(BS[t]),e},{}),FS=null,rD={},iD={},aD={},oD={},sD={};function IW(e){return~wW.indexOf(e)}function zW(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!IW(i)?i:null}var lD=function(){var t=function(o){return Rx(Gh,function(l,u,f){return l[f]=Rx(u,o,{}),l},{})};rD=t(function(i,o,l){if(o[3]&&(i[o[3]]=l),o[2]){var u=o[2].filter(function(f){return typeof f=="number"});u.forEach(function(f){i[f.toString(16)]=l})}return i}),iD=t(function(i,o,l){if(i[l]=l,o[2]){var u=o[2].filter(function(f){return typeof f=="string"});u.forEach(function(f){i[f]=l})}return i}),sD=t(function(i,o,l){var u=o[2];return i[l]=l,u.forEach(function(f){i[f]=l}),i});var n="far"in Gh||Xe.autoFetchSvg,r=Rx(DW,function(i,o){var l=o[0],u=o[1],f=o[2];return u==="far"&&!n&&(u="fas"),typeof l=="string"&&(i.names[l]={prefix:u,iconName:f}),typeof l=="number"&&(i.unicodes[l.toString(16)]={prefix:u,iconName:f}),i},{names:{},unicodes:{}});aD=r.names,oD=r.unicodes,FS=a0(Xe.styleDefault,{family:Xe.familyDefault})};AW(function(e){FS=a0(e.styleDefault,{family:Xe.familyDefault})});lD();function VS(e,t){return(rD[e]||{})[t]}function BW(e,t){return(iD[e]||{})[t]}function Au(e,t){return(sD[e]||{})[t]}function uD(e){return aD[e]||{prefix:null,iconName:null}}function UW(e){var t=oD[e],n=VS("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function gl(){return FS}var cD=function(){return{prefix:null,iconName:null,rest:[]}};function $W(e){var t=wr,n=nD.reduce(function(r,i){return r[i]="".concat(Xe.cssPrefix,"-").concat(i),r},{});return UR.forEach(function(r){(e.includes(n[r])||e.some(function(i){return kW[r].includes(i)}))&&(t=r)}),t}function a0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?wr:n,i=vW[r][e];if(r===xm&&!e)return"fad";var o=jT[r][e]||jT[r][i],l=e in pa.styles?e:null,u=o||l||null;return u}function FW(e){var t=[],n=null;return e.forEach(function(r){var i=zW(Xe.cssPrefix,r);i?n=i:r&&t.push(r)}),{iconName:n,rest:t}}function RT(e){return e.sort().filter(function(t,n,r){return r.indexOf(t)===n})}var DT=FR.concat($R);function o0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.skipLookups,r=n===void 0?!1:n,i=null,o=RT(e.filter(function(_){return DT.includes(_)})),l=RT(e.filter(function(_){return!DT.includes(_)})),u=o.filter(function(_){return i=_,!SR.includes(_)}),f=r0(u,1),h=f[0],m=h===void 0?null:h,p=$W(o),b=Ie(Ie({},FW(l)),{},{prefix:a0(m,{family:p})});return Ie(Ie(Ie({},b),GW({values:e,family:p,styles:Gh,config:Xe,canonical:b,givenPrefix:i})),VW(r,i,b))}function VW(e,t,n){var r=n.prefix,i=n.iconName;if(e||!r||!i)return{prefix:r,iconName:i};var o=t==="fa"?uD(i):{},l=Au(r,i);return i=o.iconName||l||i,r=o.prefix||r,r==="far"&&!Gh.far&&Gh.fas&&!Xe.autoFetchSvg&&(r="fas"),{prefix:r,iconName:i}}var HW=UR.filter(function(e){return e!==wr||e!==xm}),qW=Object.keys(F_).filter(function(e){return e!==wr}).map(function(e){return Object.keys(F_[e])}).flat();function GW(e){var t=e.values,n=e.family,r=e.canonical,i=e.givenPrefix,o=i===void 0?"":i,l=e.styles,u=l===void 0?{}:l,f=e.config,h=f===void 0?{}:f,m=n===xm,p=t.includes("fa-duotone")||t.includes("fad"),b=h.familyDefault==="duotone",_=r.prefix==="fad"||r.prefix==="fa-duotone";if(!m&&(p||b||_)&&(r.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab"),!r.prefix&&HW.includes(n)){var w=Object.keys(u).find(function(A){return qW.includes(A)});if(w||h.autoFetchSvg){var S=uG.get(n).defaultShortPrefixId;r.prefix=S,r.iconName=Au(r.prefix,r.iconName)||r.iconName}}return(r.prefix==="fa"||o==="fa")&&(r.prefix=gl()||"fas"),r}var WW=(function(){function e(){Pq(this,e),this.definitions={}}return Lq(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&m.forEach(function(p){typeof p=="string"&&(n[u][p]=h)}),n[u][f]=h}),n}}])})(),kT=[],ff={},pf={},YW=Object.keys(pf);function KW(e,t){var n=t.mixoutsTo;return kT=e,ff={},Object.keys(pf).forEach(function(r){YW.indexOf(r)===-1&&delete pf[r]}),kT.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(l){typeof i[l]=="function"&&(n[l]=i[l]),kv(i[l])==="object"&&Object.keys(i[l]).forEach(function(u){n[l]||(n[l]={}),n[l][u]=i[l][u]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(l){ff[l]||(ff[l]=[]),ff[l].push(o[l])})}r.provides&&r.provides(pf)}),n}function K_(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return ts?(Bu("beforeI2svg",t),vl("pseudoElements2svg",t),vl("i2svg",t)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;Xe.autoReplaceSvg===!1&&(Xe.autoReplaceSvg=!0),Xe.observeMutations=!0,RW(function(){JW({autoReplaceSvgRoot:n}),Bu("watch",t)})}},QW={icon:function(t){if(t===null)return null;if(kv(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Au(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=a0(t[0]);return{prefix:r,iconName:Au(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Xe.cssPrefix,"-"))>-1||t.match(yW))){var i=o0(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||gl(),iconName:Au(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=gl();return{prefix:o,iconName:Au(o,t)||t}}}},Pi={noAuto:ZW,config:Xe,dom:XW,parse:QW,library:fD,findIconDefinition:Z_,toHtml:wm},JW=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?an:n;(Object.keys(pa.styles).length>0||Xe.autoFetchSvg)&&ts&&Xe.autoReplaceSvg&&Pi.dom.i2svg({node:r})};function s0(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return wm(r)})}}),Object.defineProperty(e,"node",{get:function(){if(ts){var r=an.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function eY(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,l=e.transform;if($S(l)&&n.found&&!r.found){var u=n.width,f=n.height,h={x:u/f/2,y:.5};i.style=i0(Ie(Ie({},o),{},{"transform-origin":"".concat(h.x+l.x/16,"em ").concat(h.y+l.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function tY(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,l=o===!0?"".concat(t,"-").concat(Xe.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Ie(Ie({},i),{},{id:l}),children:r}]}]}function nY(e){var t=["aria-label","aria-labelledby","title","role"];return t.some(function(n){return n in e})}function HS(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,l=e.transform,u=e.symbol,f=e.maskId,h=e.extra,m=e.watchable,p=m===void 0?!1:m,b=r.found?r:n,_=b.width,w=b.height,S=[Xe.replacementClass,o?"".concat(Xe.cssPrefix,"-").concat(o):""].filter(function($){return h.classes.indexOf($)===-1}).filter(function($){return $!==""||!!$}).concat(h.classes).join(" "),A={children:[],attributes:Ie(Ie({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:S,role:h.attributes.role||"img",viewBox:"0 0 ".concat(_," ").concat(w)})};!nY(h.attributes)&&!h.attributes["aria-hidden"]&&(A.attributes["aria-hidden"]="true"),p&&(A.attributes[zu]="");var T=Ie(Ie({},A),{},{prefix:i,iconName:o,main:n,mask:r,maskId:f,transform:l,symbol:u,styles:Ie({},h.styles)}),P=r.found&&n.found?vl("generateAbstractMask",T)||{children:[],attributes:{}}:vl("generateAbstractIcon",T)||{children:[],attributes:{}},N=P.children,B=P.attributes;return T.children=N,T.attributes=B,u?tY(T):eY(T)}function IT(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.extra,l=e.watchable,u=l===void 0?!1:l,f=Ie(Ie({},o.attributes),{},{class:o.classes.join(" ")});u&&(f[zu]="");var h=Ie({},o.styles);$S(i)&&(h.transform=PW({transform:i,width:n,height:r}),h["-webkit-transform"]=h.transform);var m=i0(h);m.length>0&&(f.style=m);var p=[];return p.push({tag:"span",attributes:f,children:[t]}),p}function rY(e){var t=e.content,n=e.extra,r=Ie(Ie({},n.attributes),{},{class:n.classes.join(" ")}),i=i0(n.styles);i.length>0&&(r.style=i);var o=[];return o.push({tag:"span",attributes:r,children:[t]}),o}var Dx=pa.styles;function X_(e){var t=e[0],n=e[1],r=e.slice(4),i=r0(r,1),o=i[0],l=null;return Array.isArray(o)?l={tag:"g",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(Nx.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(Nx.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(Nx.PRIMARY),fill:"currentColor",d:o[1]}}]}:l={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:l}}var iY={found:!1,width:512,height:512};function aY(e,t){!WR&&!Xe.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Q_(e,t){var n=t;return t==="fa"&&Xe.styleDefault!==null&&(t=gl()),new Promise(function(r,i){if(n==="fa"){var o=uD(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&Dx[t]&&Dx[t][e]){var l=Dx[t][e];return r(X_(l))}aY(e,t),r(Ie(Ie({},iY),{},{icon:Xe.showMissingIcons&&e?vl("missingIconAbstract")||{}:{}}))})}var zT=function(){},J_=Xe.measurePerformance&&Mg&&Mg.mark&&Mg.measure?Mg:{mark:zT,measure:zT},Eh='FA "7.1.0"',oY=function(t){return J_.mark("".concat(Eh," ").concat(t," begins")),function(){return dD(t)}},dD=function(t){J_.mark("".concat(Eh," ").concat(t," ends")),J_.measure("".concat(Eh," ").concat(t),"".concat(Eh," ").concat(t," begins"),"".concat(Eh," ").concat(t," ends"))},qS={begin:oY,end:dD},lv=function(){};function BT(e){var t=e.getAttribute?e.getAttribute(zu):null;return typeof t=="string"}function sY(e){var t=e.getAttribute?e.getAttribute(IS):null,n=e.getAttribute?e.getAttribute(zS):null;return t&&n}function lY(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Xe.replacementClass)}function uY(){if(Xe.autoReplaceSvg===!0)return uv.replace;var e=uv[Xe.autoReplaceSvg];return e||uv.replace}function cY(e){return an.createElementNS("http://www.w3.org/2000/svg",e)}function fY(e){return an.createElement(e)}function hD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?cY:fY:n;if(typeof e=="string")return an.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(l){i.setAttribute(l,e.attributes[l])});var o=e.children||[];return o.forEach(function(l){i.appendChild(hD(l,{ceFn:r}))}),i}function dY(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var uv={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(hD(i),n)}),n.getAttribute(zu)===null&&Xe.keepOriginalSource){var r=an.createComment(dY(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~US(n).indexOf(Xe.replacementClass))return uv.replace(t);var i=new RegExp("".concat(Xe.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(u,f){return f===Xe.replacementClass||f.match(i)?u.toSvg.push(f):u.toNode.push(f),u},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var l=r.map(function(u){return wm(u)}).join(` `);n.setAttribute(zu,""),n.innerHTML=l}};function UT(e){e()}function mD(e,t){var n=typeof t=="function"?t:lv;if(e.length===0)n();else{var r=UT;Xe.mutateApproach===pW&&(r=pl.requestAnimationFrame||UT),r(function(){var i=uY(),o=qS.begin("mutate");e.map(i),o(),n()})}}var GS=!1;function pD(){GS=!0}function ew(){GS=!1}var zv=null;function $T(e){if(ET&&Xe.observeMutations){var t=e.treeCallback,n=t===void 0?lv:t,r=e.nodeCallback,i=r===void 0?lv:r,o=e.pseudoElementsCallback,l=o===void 0?lv:o,u=e.observeMutationsRoot,f=u===void 0?an:u;zv=new ET(function(h){if(!GS){var m=gl();Uf(h).forEach(function(p){if(p.type==="childList"&&p.addedNodes.length>0&&!BT(p.addedNodes[0])&&(Xe.searchPseudoElements&&l(p.target),n(p.target)),p.type==="attributes"&&p.target.parentNode&&Xe.searchPseudoElements&&l([p.target],!0),p.type==="attributes"&&BT(p.target)&&~_W.indexOf(p.attributeName))if(p.attributeName==="class"&&sY(p.target)){var b=o0(US(p.target)),_=b.prefix,w=b.iconName;p.target.setAttribute(IS,_||m),w&&p.target.setAttribute(zS,w)}else lY(p.target)&&i(p.target)})}}),ts&&zv.observe(f,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function hY(){zv&&zv.disconnect()}function mY(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),l=o[0],u=o.slice(1);return l&&u.length>0&&(r[l]=u.join(":").trim()),r},{})),n}function pY(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=o0(US(e));return i.prefix||(i.prefix=gl()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=BW(i.prefix,e.innerText)||VS(i.prefix,tD(e.innerText))),!i.iconName&&Xe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function gY(e){var t=Uf(e.attributes).reduce(function(n,r){return n.name!=="class"&&n.name!=="style"&&(n[r.name]=r.value),n},{});return t}function vY(){return{iconName:null,prefix:null,transform:Ga,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function FT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=pY(e),r=n.iconName,i=n.prefix,o=n.rest,l=gY(e),u=K_("parseNodeAttributes",{},e),f=t.styleParser?mY(e):[];return Ie({iconName:r,prefix:i,transform:Ga,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:f,attributes:l}},u)}var yY=pa.styles;function gD(e){var t=Xe.autoReplaceSvg==="nest"?FT(e,{styleParser:!1}):FT(e);return~t.extra.classes.indexOf(KR)?vl("generateLayersText",e,t):vl("generateSvgReplacementMutation",e,t)}function bY(){return[].concat(ya($R),ya(FR))}function VT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ts)return Promise.resolve();var n=an.documentElement.classList,r=function(p){return n.add("".concat(TT,"-").concat(p))},i=function(p){return n.remove("".concat(TT,"-").concat(p))},o=Xe.autoFetchSvg?bY():SR.concat(Object.keys(yY));o.includes("fa")||o.push("fa");var l=[".".concat(KR,":not([").concat(zu,"])")].concat(o.map(function(m){return".".concat(m,":not([").concat(zu,"])")})).join(", ");if(l.length===0)return Promise.resolve();var u=[];try{u=Uf(e.querySelectorAll(l))}catch{}if(u.length>0)r("pending"),i("complete");else return Promise.resolve();var f=qS.begin("onTree"),h=u.reduce(function(m,p){try{var b=gD(p);b&&m.push(b)}catch(_){WR||_.name==="MissingIcon"&&console.error(_)}return m},[]);return new Promise(function(m,p){Promise.all(h).then(function(b){mD(b,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),f(),m()})}).catch(function(b){f(),p(b)})})}function xY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;gD(e).then(function(n){n&&mD([n],t)})}function _Y(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Z_(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Z_(i||{})),e(r,Ie(Ie({},n),{},{mask:i}))}}var wY=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Ga:r,o=n.symbol,l=o===void 0?!1:o,u=n.mask,f=u===void 0?null:u,h=n.maskId,m=h===void 0?null:h,p=n.classes,b=p===void 0?[]:p,_=n.attributes,w=_===void 0?{}:_,S=n.styles,A=S===void 0?{}:S;if(t){var T=t.prefix,P=t.iconName,N=t.icon;return s0(Ie({type:"icon"},t),function(){return Bu("beforeDOMElementCreation",{iconDefinition:t,params:n}),HS({icons:{main:X_(N),mask:f?X_(f.icon):{found:!1,width:null,height:null,icon:{}}},prefix:T,iconName:P,transform:Ie(Ie({},Ga),i),symbol:l,maskId:m,extra:{attributes:w,styles:A,classes:b}})})}},SY={mixout:function(){return{icon:_Y(wY)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=VT,n.nodeCallback=xY,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?an:r,o=n.callback,l=o===void 0?function(){}:o;return VT(i,l)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.prefix,l=r.transform,u=r.symbol,f=r.mask,h=r.maskId,m=r.extra;return new Promise(function(p,b){Promise.all([Q_(i,o),f.iconName?Q_(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(_){var w=r0(_,2),S=w[0],A=w[1];p([n,HS({icons:{main:S,mask:A},prefix:o,iconName:i,transform:l,symbol:u,maskId:h,extra:m,watchable:!0})])}).catch(b)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,l=n.transform,u=n.styles,f=i0(u);f.length>0&&(i.style=f);var h;return $S(l)&&(h=vl("generateAbstractTransformGrouping",{main:o,transform:l,containerWidth:o.width,iconWidth:o.width})),r.push(h||o.icon),{children:r,attributes:i}}}},CY={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return s0({type:"layer"},function(){Bu("beforeDOMElementCreation",{assembler:n,params:r});var l=[];return n(function(u){Array.isArray(u)?u.map(function(f){l=l.concat(f.abstract)}):l=l.concat(u.abstract)}),[{tag:"span",attributes:{class:["".concat(Xe.cssPrefix,"-layers")].concat(ya(o)).join(" ")},children:l}]})}}}},EY={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r.title;var i=r.classes,o=i===void 0?[]:i,l=r.attributes,u=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return s0({type:"counter",content:n},function(){return Bu("beforeDOMElementCreation",{content:n,params:r}),rY({content:n.toString(),extra:{attributes:u,styles:h,classes:["".concat(Xe.cssPrefix,"-layers-counter")].concat(ya(o))}})})}}}},AY={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Ga:i,l=r.classes,u=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,m=r.styles,p=m===void 0?{}:m;return s0({type:"text",content:n},function(){return Bu("beforeDOMElementCreation",{content:n,params:r}),IT({content:n,transform:Ie(Ie({},Ga),o),extra:{attributes:h,styles:p,classes:["".concat(Xe.cssPrefix,"-layers-text")].concat(ya(u))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.transform,o=r.extra,l=null,u=null;if(_R){var f=parseInt(getComputedStyle(n).fontSize,10),h=n.getBoundingClientRect();l=h.width/f,u=h.height/f}return Promise.resolve([n,IT({content:n.innerHTML,width:l,height:u,transform:i,extra:o,watchable:!0})])}}},vD=new RegExp('"',"ug"),HT=[1105920,1112319],qT=Ie(Ie(Ie(Ie({},{FontAwesome:{normal:"fas",400:"fas"}}),lG),hW),vG),tw=Object.keys(qT).reduce(function(e,t){return e[t.toLowerCase()]=qT[t],e},{}),OY=Object.keys(tw).reduce(function(e,t){var n=tw[t];return e[t]=n[900]||ya(Object.entries(n))[0][1],e},{});function TY(e){var t=e.replace(vD,"");return tD(ya(t)[0]||"")}function jY(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content"),r=n.replace(vD,""),i=r.codePointAt(0),o=i>=HT[0]&&i<=HT[1],l=r.length===2?r[0]===r[1]:!1;return o||l||t}function MY(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),i=isNaN(r)?"normal":r;return(tw[n]||{})[i]||OY[n]}function GT(e,t){var n="".concat(mW).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=Uf(e.children),l=o.filter(function(G){return G.getAttribute(H_)===t})[0],u=pl.getComputedStyle(e,t),f=u.getPropertyValue("font-family"),h=f.match(bW),m=u.getPropertyValue("font-weight"),p=u.getPropertyValue("content");if(l&&!h)return e.removeChild(l),r();if(h&&p!=="none"&&p!==""){var b=u.getPropertyValue("content"),_=MY(f,m),w=TY(b),S=h[0].startsWith("FontAwesome"),A=jY(u),T=VS(_,w),P=T;if(S){var N=UW(w);N.iconName&&N.prefix&&(T=N.iconName,_=N.prefix)}if(T&&!A&&(!l||l.getAttribute(IS)!==_||l.getAttribute(zS)!==P)){e.setAttribute(n,P),l&&e.removeChild(l);var B=vY(),$=B.extra;$.attributes[H_]=t,Q_(T,_).then(function(G){var Z=HS(Ie(Ie({},B),{},{icons:{main:G,mask:cD()},prefix:_,iconName:P,extra:$,watchable:!0})),ee=an.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(ee,e.firstChild):e.appendChild(ee),ee.outerHTML=Z.map(function(le){return wm(le)}).join(` `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function PY(e){return Promise.all([GT(e,"::before"),GT(e,"::after")])}function NY(e){return e.parentNode!==document.head&&!~gW.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(H_)&&(!e.parentNode||e.parentNode.tagName!=="svg")}var LY=function(t){return!!t&&GR.some(function(n){return t.includes(n)})},RY=function(t){if(!t)return[];var n=new Set,r=t.split(/,(?![^()]*\))/).map(function(f){return f.trim()});r=r.flatMap(function(f){return f.includes("(")?f:f.split(",").map(function(h){return h.trim()})});var i=sv(r),o;try{for(i.s();!(o=i.n()).done;){var l=o.value;if(LY(l)){var u=GR.reduce(function(f,h){return f.replace(h,"")},l);u!==""&&u!=="*"&&n.add(u)}}}catch(f){i.e(f)}finally{i.f()}return n};function WT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(ts){var n;if(t)n=e;else if(Xe.searchPseudoElementsFullScan)n=e.querySelectorAll("*");else{var r=new Set,i=sv(document.styleSheets),o;try{for(i.s();!(o=i.n()).done;){var l=o.value;try{var u=sv(l.cssRules),f;try{for(u.s();!(f=u.n()).done;){var h=f.value,m=RY(h.selectorText),p=sv(m),b;try{for(p.s();!(b=p.n()).done;){var _=b.value;r.add(_)}}catch(S){p.e(S)}finally{p.f()}}}catch(S){u.e(S)}finally{u.f()}}catch(S){Xe.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(l.href," (").concat(S.message,`) -If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the , enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(S){i.e(S)}finally{i.f()}if(!r.size)return;var w=Array.from(r).join(", ");try{n=e.querySelectorAll(w)}catch{}}return new Promise(function(S,A){var T=Uf(n).filter(NY).map(PY),P=qS.begin("searchPseudoElements");pD(),Promise.all(T).then(function(){P(),ew(),S()}).catch(function(){P(),ew(),A()})})}}var DY={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=WT,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?an:r;Xe.searchPseudoElements&&WT(i)}}},YT=!1,kY={mixout:function(){return{dom:{unwatch:function(){pD(),YT=!0}}}},hooks:function(){return{bootstrap:function(){$T(K_("mutationObserverCallbacks",{}))},noAuto:function(){hY()},watch:function(n){var r=n.observeMutationsRoot;YT?ew():$T(K_("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},KT=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),l=o[0],u=o.slice(1).join("-");if(l&&u==="h")return r.flipX=!0,r;if(l&&u==="v")return r.flipY=!0,r;if(u=parseFloat(u),isNaN(u))return r;switch(l){case"grow":r.size=r.size+u;break;case"shrink":r.size=r.size-u;break;case"left":r.x=r.x-u;break;case"right":r.x=r.x+u;break;case"up":r.y=r.y-u;break;case"down":r.y=r.y+u;break;case"rotate":r.rotate=r.rotate+u;break}return r},n)},IY={mixout:function(){return{parse:{transform:function(n){return KT(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=KT(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,l=n.iconWidth,u={transform:"translate(".concat(o/2," 256)")},f="translate(".concat(i.x*32,", ").concat(i.y*32,") "),h="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),m="rotate(".concat(i.rotate," 0 0)"),p={transform:"".concat(f," ").concat(h," ").concat(m)},b={transform:"translate(".concat(l/2*-1," -256)")},_={outer:u,inner:p,path:b};return{tag:"g",attributes:Ie({},_.outer),children:[{tag:"g",attributes:Ie({},_.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Ie(Ie({},r.icon.attributes),_.path)}]}]}}}},kx={x:0,y:0,width:"100%",height:"100%"};function ZT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function zY(e){return e.tag==="g"?e.children:[e]}var BY={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?o0(i.split(" ").map(function(l){return l.trim()})):cD();return o.prefix||(o.prefix=gl()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,l=n.mask,u=n.maskId,f=n.transform,h=o.width,m=o.icon,p=l.width,b=l.icon,_=MW({transform:f,containerWidth:p,iconWidth:h}),w={tag:"rect",attributes:Ie(Ie({},kx),{},{fill:"white"})},S=m.children?{children:m.children.map(ZT)}:{},A={tag:"g",attributes:Ie({},_.inner),children:[ZT(Ie({tag:m.tag,attributes:Ie(Ie({},m.attributes),_.path)},S))]},T={tag:"g",attributes:Ie({},_.outer),children:[A]},P="mask-".concat(u||MT()),N="clip-".concat(u||MT()),B={tag:"mask",attributes:Ie(Ie({},kx),{},{id:P,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[w,T]},$={tag:"defs",children:[{tag:"clipPath",attributes:{id:N},children:zY(b)},B]};return r.push($,{tag:"rect",attributes:Ie({fill:"currentColor","clip-path":"url(#".concat(N,")"),mask:"url(#".concat(P,")")},kx)}),{children:r,attributes:i}}}},UY={provides:function(t){var n=!1;pl.matchMedia&&(n=pl.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Ie(Ie({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var l=Ie(Ie({},o),{},{attributeName:"opacity"}),u={tag:"circle",attributes:Ie(Ie({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||u.children.push({tag:"animate",attributes:Ie(Ie({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Ie(Ie({},l),{},{values:"1;0;1;1;0;1;"})}),r.push(u),r.push({tag:"path",attributes:Ie(Ie({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Ie(Ie({},l),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Ie(Ie({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Ie(Ie({},l),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},$Y={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},FY=[LW,SY,CY,EY,AY,DY,kY,IY,BY,UY,$Y];KW(FY,{mixoutsTo:Pi});Pi.noAuto;var Wh=Pi.config;Pi.library;Pi.dom;var yD=Pi.parse;Pi.findIconDefinition;Pi.toHtml;var VY=Pi.icon;Pi.layer;Pi.text;Pi.counter;function HY(e){return e=e-0,e===e}function bD(e){return HY(e)?e:(e=e.replace(/[_-]+(.)?/g,(t,n)=>n?n.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function qY(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ef=new Map,GY=1e3;function WY(e){if(ef.has(e))return ef.get(e);const t={};let n=0;const r=e.length;for(;n0){const f=l.slice(0,u).trim(),h=l.slice(u+1).trim();if(f&&h){const m=bD(f);t[m.startsWith("webkit")?qY(m):m]=h}}}n=o+1}if(ef.size===GY){const i=ef.keys().next().value;i&&ef.delete(i)}return ef.set(e,t),t}function xD(e,t,n={}){if(typeof t=="string")return t;const r=(t.children||[]).map(m=>xD(e,m)),i=t.attributes||{},o={};for(const[m,p]of Object.entries(i))switch(!0){case m==="class":{o.className=p;break}case m==="style":{o.style=WY(String(p));break}case m.startsWith("aria-"):case m.startsWith("data-"):{o[m.toLowerCase()]=p;break}default:o[bD(m)]=p}const{style:l,role:u,"aria-label":f,...h}=n;return l&&(o.style=o.style?{...o.style,...l}:l),u&&(o.role=u),f&&(o["aria-label"]=f,o["aria-hidden"]="false"),e(t.tag,{...h,...o},...r)}var YY=xD.bind(null,wf.createElement),XT=(e,t)=>{const n=x.useId();return e||(t?n:void 0)},KY=class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t=typeof process<"u"&&!1}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}},ZY="searchPseudoElementsFullScan"in Wh?"7.0.0":"6.0.0",XY=Number.parseInt(ZY)>=7,kh="fa",Lo={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},QY={left:"fa-pull-left",right:"fa-pull-right"},JY={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},eK={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Ro={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function tK(e){const t=Wh.cssPrefix||Wh.familyPrefix||kh;return t===kh?e:e.replace(new RegExp(String.raw`(?<=^|\s)${kh}-`,"g"),`${t}-`)}function nK(e){const{beat:t,fade:n,beatFade:r,bounce:i,shake:o,spin:l,spinPulse:u,spinReverse:f,pulse:h,fixedWidth:m,inverse:p,border:b,flip:_,size:w,rotation:S,pull:A,swapOpacity:T,rotateBy:P,widthAuto:N,className:B}=e,$=[];return B&&$.push(...B.split(" ")),t&&$.push(Lo.beat),n&&$.push(Lo.fade),r&&$.push(Lo.beatFade),i&&$.push(Lo.bounce),o&&$.push(Lo.shake),l&&$.push(Lo.spin),f&&$.push(Lo.spinReverse),u&&$.push(Lo.spinPulse),h&&$.push(Lo.pulse),m&&$.push(Ro.fixedWidth),p&&$.push(Ro.inverse),b&&$.push(Ro.border),_===!0&&$.push(Ro.flip),(_==="horizontal"||_==="both")&&$.push(Ro.flipHorizontal),(_==="vertical"||_==="both")&&$.push(Ro.flipVertical),w!=null&&$.push(eK[w]),S!=null&&S!==0&&$.push(JY[S]),A!=null&&$.push(QY[A]),T&&$.push(Ro.swapOpacity),XY?(P&&$.push(Ro.rotateBy),N&&$.push(Ro.widthAuto),(Wh.cssPrefix||Wh.familyPrefix||kh)===kh?$:$.map(tK)):$}var rK=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function QT(e){if(e)return rK(e)?e:yD.icon(e)}function iK(e){return Object.keys(e)}var JT=new KY("FontAwesomeIcon"),_D={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},aK=new Set(Object.keys(_D)),De=wf.forwardRef((e,t)=>{const n={..._D,...e},{icon:r,mask:i,symbol:o,title:l,titleId:u,maskId:f,transform:h}=n,m=XT(f,!!i),p=XT(u,!!l),b=QT(r);if(!b)return JT.error("Icon lookup is undefined",r),null;const _=nK(n),w=typeof h=="string"?yD.transform(h):h,S=QT(i),A=VY(b,{..._.length>0&&{classes:_},...w&&{transform:w},...S&&{mask:S},symbol:o,title:l,titleId:p,maskId:m});if(!A)return JT.error("Could not find icon",b),null;const{abstract:T}=A,P={ref:t};for(const N of iK(n))aK.has(N)||(P[N]=n[N]);return YY(T[0],P)});De.displayName="FontAwesomeIcon";function l0(){return typeof window<"u"}function $f(e){return wD(e)?(e.nodeName||"").toLowerCase():"#document"}function Si(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ns(e){var t;return(t=(wD(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wD(e){return l0()?e instanceof Node||e instanceof Si(e).Node:!1}function _r(e){return l0()?e instanceof Element||e instanceof Si(e).Element:!1}function Ai(e){return l0()?e instanceof HTMLElement||e instanceof Si(e).HTMLElement:!1}function nw(e){return!l0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Si(e).ShadowRoot}const oK=new Set(["inline","contents"]);function Sm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ba(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!oK.has(i)}const sK=new Set(["table","td","th"]);function lK(e){return sK.has($f(e))}const uK=[":popover-open",":modal"];function u0(e){return uK.some(t=>{try{return e.matches(t)}catch{return!1}})}const cK=["transform","translate","scale","rotate","perspective"],fK=["transform","translate","scale","rotate","perspective","filter"],dK=["paint","layout","strict","content"];function WS(e){const t=YS(),n=_r(e)?ba(e):e;return cK.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fK.some(r=>(n.willChange||"").includes(r))||dK.some(r=>(n.contain||"").includes(r))}function hK(e){let t=yl(e);for(;Ai(t)&&!Cf(t);){if(WS(t))return t;if(u0(t))return null;t=yl(t)}return null}function YS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const mK=new Set(["html","body","#document"]);function Cf(e){return mK.has($f(e))}function ba(e){return Si(e).getComputedStyle(e)}function c0(e){return _r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yl(e){if($f(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nw(e)&&e.host||ns(e);return nw(t)?t.host:t}function SD(e){const t=yl(e);return Cf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ai(t)&&Sm(t)?t:SD(t)}function CD(e,t,n){var r;t===void 0&&(t=[]);const i=SD(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Si(i);return o?(rw(l),t.concat(l,l.visualViewport||[],Sm(i)?i:[],[])):t.concat(i,CD(i,[]))}function rw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const pK=["top","right","bottom","left"],ej=["start","end"],tj=pK.reduce((e,t)=>e.concat(t,t+"-"+ej[0],t+"-"+ej[1]),[]),Yh=Math.min,gf=Math.max,Bv=Math.round,Ka=e=>({x:e,y:e}),gK={left:"right",right:"left",bottom:"top",top:"bottom"},vK={start:"end",end:"start"};function yK(e,t,n){return gf(e,Yh(t,n))}function Cm(e,t){return typeof e=="function"?e(t):e}function bl(e){return e.split("-")[0]}function Za(e){return e.split("-")[1]}function bK(e){return e==="x"?"y":"x"}function KS(e){return e==="y"?"height":"width"}const xK=new Set(["top","bottom"]);function Ou(e){return xK.has(bl(e))?"y":"x"}function ZS(e){return bK(Ou(e))}function ED(e,t,n){n===void 0&&(n=!1);const r=Za(e),i=ZS(e),o=KS(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=$v(l)),[l,$v(l)]}function _K(e){const t=$v(e);return[Uv(e),t,Uv(t)]}function Uv(e){return e.replace(/start|end/g,t=>vK[t])}const nj=["left","right"],rj=["right","left"],wK=["top","bottom"],SK=["bottom","top"];function CK(e,t,n){switch(e){case"top":case"bottom":return n?t?rj:nj:t?nj:rj;case"left":case"right":return t?wK:SK;default:return[]}}function EK(e,t,n,r){const i=Za(e);let o=CK(bl(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Uv)))),o}function $v(e){return e.replace(/left|right|bottom|top/g,t=>gK[t])}function AK(e){return{top:0,right:0,bottom:0,left:0,...e}}function AD(e){return typeof e!="number"?AK(e):{top:e,right:e,bottom:e,left:e}}function Fv(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const OK="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function TK(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&nw(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ng(e){return e?.ownerDocument||document}function jK(e){return Ai(e)&&e.matches(OK)}function Kh(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var MK=typeof document<"u",PK=function(){},xl=MK?x.useLayoutEffect:PK;const NK={...bS};function ol(e){const t=x.useRef(e);return xl(()=>{t.current=e}),t}const LK=NK.useInsertionEffect,RK=LK||(e=>e());function Ah(e){const t=x.useRef(()=>{});return RK(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:p}=ij(h,r,f),b=r,_={},w=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:u,middlewareData:f}=t,{element:h,padding:m=0}=Cm(e,t)||{};if(h==null)return{};const p=AD(m),b={x:n,y:r},_=ZS(i),w=KS(_),S=await l.getDimensions(h),A=_==="y",T=A?"top":"left",P=A?"bottom":"right",N=A?"clientHeight":"clientWidth",B=o.reference[w]+o.reference[_]-b[_]-o.floating[w],$=b[_]-o.reference[_],G=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let Z=G?G[N]:0;(!Z||!await(l.isElement==null?void 0:l.isElement(G)))&&(Z=u.floating[N]||o.floating[w]);const ee=B/2-$/2,le=Z/2-S[w]/2-1,oe=Yh(p[T],le),re=Yh(p[P],le),ne=oe,be=Z-S[w]-re,ie=Z/2-S[w]/2+ee,ue=yK(ne,ie,be),Y=!f.arrow&&Za(i)!=null&&ie!==ue&&o.reference[w]/2-(ieZa(i)===e),...n.filter(i=>Za(i)!==e)]:n.filter(i=>bl(i)===i)).filter(i=>e?Za(i)===e||(t?Uv(i)!==i:!1):!0)}const zK=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:o,middlewareData:l,placement:u,platform:f,elements:h}=t,{crossAxis:m=!1,alignment:p,allowedPlacements:b=tj,autoAlignment:_=!0,...w}=Cm(e,t),S=p!==void 0||b===tj?IK(p||null,_,b):b,A=await OD(t,w),T=((n=l.autoPlacement)==null?void 0:n.index)||0,P=S[T];if(P==null)return{};const N=ED(P,o,await(f.isRTL==null?void 0:f.isRTL(h.floating)));if(u!==P)return{reset:{placement:S[0]}};const B=[A[bl(P)],A[N[0]],A[N[1]]],$=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:P,overflows:B}],G=S[T+1];if(G)return{data:{index:T+1,overflows:$},reset:{placement:G}};const Z=$.map(oe=>{const re=Za(oe.placement);return[oe.placement,re&&m?oe.overflows.slice(0,2).reduce((ne,be)=>ne+be,0):oe.overflows[0],oe.overflows]}).sort((oe,re)=>oe[1]-re[1]),le=((i=Z.filter(oe=>oe[2].slice(0,Za(oe[0])?2:3).every(re=>re<=0))[0])==null?void 0:i[0])||Z[0][0];return le!==u?{data:{index:T+1,overflows:$},reset:{placement:le}}:{}}}},BK=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...A}=Cm(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const T=bl(i),P=Ou(u),N=bl(u)===u,B=await(f.isRTL==null?void 0:f.isRTL(h.floating)),$=b||(N||!S?[$v(u)]:_K(u)),G=w!=="none";!b&&G&&$.push(...EK(u,S,w,B));const Z=[u,...$],ee=await OD(t,A),le=[];let oe=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&le.push(ee[T]),p){const ie=ED(i,l,B);le.push(ee[ie[0]],ee[ie[1]])}if(oe=[...oe,{placement:i,overflows:le}],!le.every(ie=>ie<=0)){var re,ne;const ie=(((re=o.flip)==null?void 0:re.index)||0)+1,ue=Z[ie];if(ue&&(!(p==="alignment"?P!==Ou(ue):!1)||oe.every(I=>Ou(I.placement)===P?I.overflows[0]>0:!0)))return{data:{index:ie,overflows:oe},reset:{placement:ue}};let Y=(ne=oe.filter(z=>z.overflows[0]<=0).sort((z,I)=>z.overflows[1]-I.overflows[1])[0])==null?void 0:ne.placement;if(!Y)switch(_){case"bestFit":{var be;const z=(be=oe.filter(I=>{if(G){const H=Ou(I.placement);return H===P||H==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(H=>H>0).reduce((H,k)=>H+k,0)]).sort((I,H)=>I[1]-H[1])[0])==null?void 0:be[0];z&&(Y=z);break}case"initialPlacement":Y=u;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}},UK=new Set(["left","top"]);async function $K(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=bl(n),u=Za(n),f=Ou(n)==="y",h=UK.has(l)?-1:1,m=o&&f?-1:1,p=Cm(t,e);let{mainAxis:b,crossAxis:_,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(_=u==="end"?w*-1:w),f?{x:_*m,y:b*h}:{x:b*h,y:_*m}}const FK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:u}=t,f=await $K(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}};function TD(e){const t=ba(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ai(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=Bv(n)!==o||Bv(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function jD(e){return _r(e)?e:e.contextElement}function vf(e){const t=jD(e);if(!Ai(t))return Ka(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=TD(t);let l=(o?Bv(n.width):n.width)/r,u=(o?Bv(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const VK=Ka(0);function MD(e){const t=Si(e);return!YS()||!t.visualViewport?VK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function HK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Si(e)?!1:t}function Zh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=jD(e);let l=Ka(1);t&&(r?_r(r)&&(l=vf(r)):l=vf(e));const u=HK(o,n,r)?MD(o):Ka(0);let f=(i.left+u.x)/l.x,h=(i.top+u.y)/l.y,m=i.width/l.x,p=i.height/l.y;if(o){const b=Si(o),_=r&&_r(r)?Si(r):r;let w=b,S=rw(w);for(;S&&r&&_!==w;){const A=vf(S),T=S.getBoundingClientRect(),P=ba(S),N=T.left+(S.clientLeft+parseFloat(P.paddingLeft))*A.x,B=T.top+(S.clientTop+parseFloat(P.paddingTop))*A.y;f*=A.x,h*=A.y,m*=A.x,p*=A.y,f+=N,h+=B,w=Si(S),S=rw(w)}}return Fv({width:m,height:p,x:f,y:h})}function f0(e,t){const n=c0(e).scrollLeft;return t?t.left+n:Zh(ns(e)).left+n}function PD(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-f0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function qK(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=ns(r),u=t?u0(t.floating):!1;if(r===l||u&&o)return n;let f={scrollLeft:0,scrollTop:0},h=Ka(1);const m=Ka(0),p=Ai(r);if((p||!p&&!o)&&(($f(r)!=="body"||Sm(l))&&(f=c0(r)),Ai(r))){const _=Zh(r);h=vf(r),m.x=_.x+r.clientLeft,m.y=_.y+r.clientTop}const b=l&&!p&&!o?PD(l,f):Ka(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+b.x,y:n.y*h.y-f.scrollTop*h.y+m.y+b.y}}function GK(e){return Array.from(e.getClientRects())}function WK(e){const t=ns(e),n=c0(e),r=e.ownerDocument.body,i=gf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=gf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+f0(e);const u=-n.scrollTop;return ba(r).direction==="rtl"&&(l+=gf(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:u}}const aj=25;function YK(e,t){const n=Si(e),r=ns(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,f=0;if(i){o=i.width,l=i.height;const m=YS();(!m||m&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}const h=f0(r);if(h<=0){const m=r.ownerDocument,p=m.body,b=getComputedStyle(p),_=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-_);w<=aj&&(o-=w)}else h<=aj&&(o+=h);return{width:o,height:l,x:u,y:f}}const KK=new Set(["absolute","fixed"]);function ZK(e,t){const n=Zh(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ai(e)?vf(e):Ka(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,f=i*o.x,h=r*o.y;return{width:l,height:u,x:f,y:h}}function oj(e,t,n){let r;if(t==="viewport")r=YK(e,n);else if(t==="document")r=WK(ns(e));else if(_r(t))r=ZK(t,n);else{const i=MD(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fv(r)}function ND(e,t){const n=yl(e);return n===t||!_r(n)||Cf(n)?!1:ba(n).position==="fixed"||ND(n,t)}function XK(e,t){const n=t.get(e);if(n)return n;let r=CD(e,[]).filter(u=>_r(u)&&$f(u)!=="body"),i=null;const o=ba(e).position==="fixed";let l=o?yl(e):e;for(;_r(l)&&!Cf(l);){const u=ba(l),f=WS(l);!f&&u.position==="fixed"&&(i=null),(o?!f&&!i:!f&&u.position==="static"&&!!i&&KK.has(i.position)||Sm(l)&&!f&&ND(e,l))?r=r.filter(m=>m!==l):i=u,l=yl(l)}return t.set(e,r),r}function QK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?u0(t)?[]:XK(t,this._c):[].concat(n),r],u=l[0],f=l.reduce((h,m)=>{const p=oj(t,m,i);return h.top=gf(p.top,h.top),h.right=Yh(p.right,h.right),h.bottom=Yh(p.bottom,h.bottom),h.left=gf(p.left,h.left),h},oj(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function JK(e){const{width:t,height:n}=TD(e);return{width:t,height:n}}function eZ(e,t,n){const r=Ai(t),i=ns(t),o=n==="fixed",l=Zh(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const f=Ka(0);function h(){f.x=f0(i)}if(r||!r&&!o)if(($f(t)!=="body"||Sm(i))&&(u=c0(t)),r){const _=Zh(t,!0,o,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else i&&h();o&&!r&&i&&h();const m=i&&!r&&!o?PD(i,u):Ka(0),p=l.left+u.scrollLeft-f.x-m.x,b=l.top+u.scrollTop-f.y-m.y;return{x:p,y:b,width:l.width,height:l.height}}function Ix(e){return ba(e).position==="static"}function sj(e,t){if(!Ai(e)||ba(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ns(e)===n&&(n=n.ownerDocument.body),n}function LD(e,t){const n=Si(e);if(u0(e))return n;if(!Ai(e)){let i=yl(e);for(;i&&!Cf(i);){if(_r(i)&&!Ix(i))return i;i=yl(i)}return n}let r=sj(e,t);for(;r&&lK(r)&&Ix(r);)r=sj(r,t);return r&&Cf(r)&&Ix(r)&&!WS(r)?n:r||hK(e)||n}const tZ=async function(e){const t=this.getOffsetParent||LD,n=this.getDimensions,r=await n(e.floating);return{reference:eZ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nZ(e){return ba(e).direction==="rtl"}const rZ={convertOffsetParentRelativeRectToViewportRelativeRect:qK,getDocumentElement:ns,getClippingRect:QK,getOffsetParent:LD,getElementRects:tZ,getClientRects:GK,getDimensions:JK,getScale:vf,isElement:_r,isRTL:nZ},iZ=FK,aZ=zK,oZ=BK,lj=kK,sZ=(e,t,n)=>{const r=new Map,i={platform:rZ,...n},o={...i.platform,_c:r};return DK(e,t,{...i,platform:o})};var lZ=typeof document<"u",uZ=function(){},cv=lZ?x.useLayoutEffect:uZ;function Vv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vv(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Vv(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function RD(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uj(e,t){const n=RD(e);return Math.round(t*n)/n}function zx(e){const t=x.useRef(e);return cv(()=>{t.current=e}),t}function cZ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:f,open:h}=e,[m,p]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,_]=x.useState(r);Vv(b,r)||_(r);const[w,S]=x.useState(null),[A,T]=x.useState(null),P=x.useCallback(I=>{I!==G.current&&(G.current=I,S(I))},[]),N=x.useCallback(I=>{I!==Z.current&&(Z.current=I,T(I))},[]),B=o||w,$=l||A,G=x.useRef(null),Z=x.useRef(null),ee=x.useRef(m),le=f!=null,oe=zx(f),re=zx(i),ne=zx(h),be=x.useCallback(()=>{if(!G.current||!Z.current)return;const I={placement:t,strategy:n,middleware:b};re.current&&(I.platform=re.current),sZ(G.current,Z.current,I).then(H=>{const k={...H,isPositioned:ne.current!==!1};ie.current&&!Vv(ee.current,k)&&(ee.current=k,Ff.flushSync(()=>{p(k)}))})},[b,t,n,re,ne]);cv(()=>{h===!1&&ee.current.isPositioned&&(ee.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[h]);const ie=x.useRef(!1);cv(()=>(ie.current=!0,()=>{ie.current=!1}),[]),cv(()=>{if(B&&(G.current=B),$&&(Z.current=$),B&&$){if(oe.current)return oe.current(B,$,be);be()}},[B,$,be,oe,le]);const ue=x.useMemo(()=>({reference:G,floating:Z,setReference:P,setFloating:N}),[P,N]),Y=x.useMemo(()=>({reference:B,floating:$}),[B,$]),z=x.useMemo(()=>{const I={position:n,left:0,top:0};if(!Y.floating)return I;const H=uj(Y.floating,m.x),k=uj(Y.floating,m.y);return u?{...I,transform:"translate("+H+"px, "+k+"px)",...RD(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:k}},[n,u,Y.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:be,refs:ue,elements:Y,floatingStyles:z}),[m,be,ue,Y,z])}const fZ=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?lj({element:r.current,padding:i}).fn(n):{}:r?lj({element:r,padding:i}).fn(n):{}}}},dZ=(e,t)=>({...iZ(e),options:[e,t]}),hZ=(e,t)=>({...oZ(e),options:[e,t]}),mZ=(e,t)=>({...aZ(e),options:[e,t]}),pZ=(e,t)=>({...fZ(e),options:[e,t]}),gZ="data-floating-ui-focusable",cj="active",fj="selected",vZ={...bS};let dj=!1,yZ=0;const hj=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+yZ++;function bZ(){const[e,t]=x.useState(()=>dj?hj():void 0);return xl(()=>{e==null&&t(hj())},[]),x.useEffect(()=>{dj=!0},[]),e}const xZ=vZ.useId,_Z=xZ||bZ;function wZ(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const SZ=x.createContext(null),CZ=x.createContext(null),DD=()=>{var e;return((e=x.useContext(SZ))==null?void 0:e.id)||null},kD=()=>x.useContext(CZ);function EZ(e){return"data-floating-ui-"+e}function ca(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const mj=EZ("safe-polygon");function Bx(e,t,n){if(n&&!Kh(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Ux(e){return typeof e=="function"?e():e}function AZ(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:u=!0,delay:f=0,handleClose:h=null,mouseOnly:m=!1,restMs:p=0,move:b=!0}=t,_=kD(),w=DD(),S=ol(h),A=ol(f),T=ol(n),P=ol(p),N=x.useRef(),B=x.useRef(-1),$=x.useRef(),G=x.useRef(-1),Z=x.useRef(!0),ee=x.useRef(!1),le=x.useRef(()=>{}),oe=x.useRef(!1),re=Ah(()=>{var z;const I=(z=i.current.openEvent)==null?void 0:z.type;return I?.includes("mouse")&&I!=="mousedown"});x.useEffect(()=>{if(!u)return;function z(I){let{open:H}=I;H||(ca(B),ca(G),Z.current=!0,oe.current=!1)}return o.on("openchange",z),()=>{o.off("openchange",z)}},[u,o]),x.useEffect(()=>{if(!u||!S.current||!n)return;function z(H){re()&&r(!1,H,"hover")}const I=Ng(l.floating).documentElement;return I.addEventListener("mouseleave",z),()=>{I.removeEventListener("mouseleave",z)}},[l.floating,n,r,u,S,re]);const ne=x.useCallback(function(z,I,H){I===void 0&&(I=!0),H===void 0&&(H="hover");const k=Bx(A.current,"close",N.current);k&&!$.current?(ca(B),B.current=window.setTimeout(()=>r(!1,z,H),k)):I&&(ca(B),r(!1,z,H))},[A,r]),be=Ah(()=>{le.current(),$.current=void 0}),ie=Ah(()=>{if(ee.current){const z=Ng(l.floating).body;z.style.pointerEvents="",z.removeAttribute(mj),ee.current=!1}}),ue=Ah(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);x.useEffect(()=>{if(!u)return;function z(q){if(ca(B),Z.current=!1,m&&!Kh(N.current)||Ux(P.current)>0&&!Bx(A.current,"open"))return;const J=Bx(A.current,"open",N.current);J?B.current=window.setTimeout(()=>{T.current||r(!0,q,"hover")},J):n||r(!0,q,"hover")}function I(q){if(ue()){ie();return}le.current();const J=Ng(l.floating);if(ca(G),oe.current=!1,S.current&&i.current.floatingContext){n||ca(B),$.current=S.current({...i.current.floatingContext,tree:_,x:q.clientX,y:q.clientY,onClose(){ie(),be(),ue()||ne(q,!0,"safe-polygon")}});const me=$.current;J.addEventListener("mousemove",me),le.current=()=>{J.removeEventListener("mousemove",me)};return}(N.current!=="touch"||!TK(l.floating,q.relatedTarget))&&ne(q)}function H(q){ue()||i.current.floatingContext&&(S.current==null||S.current({...i.current.floatingContext,tree:_,x:q.clientX,y:q.clientY,onClose(){ie(),be(),ue()||ne(q)}})(q))}function k(){ca(B)}function j(q){ue()||ne(q,!1)}if(_r(l.domReference)){const q=l.domReference,J=l.floating;return n&&q.addEventListener("mouseleave",H),b&&q.addEventListener("mousemove",z,{once:!0}),q.addEventListener("mouseenter",z),q.addEventListener("mouseleave",I),J&&(J.addEventListener("mouseleave",H),J.addEventListener("mouseenter",k),J.addEventListener("mouseleave",j)),()=>{n&&q.removeEventListener("mouseleave",H),b&&q.removeEventListener("mousemove",z),q.removeEventListener("mouseenter",z),q.removeEventListener("mouseleave",I),J&&(J.removeEventListener("mouseleave",H),J.removeEventListener("mouseenter",k),J.removeEventListener("mouseleave",j))}}},[l,u,e,m,b,ne,be,ie,r,n,T,_,A,S,i,ue,P]),xl(()=>{var z;if(u&&n&&(z=S.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&re()){ee.current=!0;const H=l.floating;if(_r(l.domReference)&&H){var I;const k=Ng(l.floating).body;k.setAttribute(mj,"");const j=l.domReference,q=_==null||(I=_.nodesRef.current.find(J=>J.id===w))==null||(I=I.context)==null?void 0:I.elements.floating;return q&&(q.style.pointerEvents=""),k.style.pointerEvents="none",j.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{k.style.pointerEvents="",j.style.pointerEvents="",H.style.pointerEvents=""}}}},[u,n,w,l,_,S,re]),xl(()=>{n||(N.current=void 0,oe.current=!1,be(),ie())},[n,be,ie]),x.useEffect(()=>()=>{be(),ca(B),ca(G),ie()},[u,l.domReference,be,ie]);const Y=x.useMemo(()=>{function z(I){N.current=I.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(I){const{nativeEvent:H}=I;function k(){!Z.current&&!T.current&&r(!0,H,"hover")}m&&!Kh(N.current)||n||Ux(P.current)===0||oe.current&&I.movementX**2+I.movementY**2<2||(ca(G),N.current==="touch"?k():(oe.current=!0,G.current=window.setTimeout(k,Ux(P.current))))}}},[m,r,n,T,P]);return x.useMemo(()=>u?{reference:Y}:{},[u,Y])}function pj(e){return Ai(e.target)&&e.target.tagName==="BUTTON"}function OZ(e){return Ai(e.target)&&e.target.tagName==="A"}function gj(e){return jK(e)}function TZ(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:u="click",toggle:f=!0,ignoreMouse:h=!1,keyboardHandlers:m=!0,stickIfOpen:p=!0}=t,b=x.useRef(),_=x.useRef(!1),w=x.useMemo(()=>({onPointerDown(S){b.current=S.pointerType},onMouseDown(S){const A=b.current;S.button===0&&u!=="click"&&(Kh(A,!0)&&h||(n&&f&&(!(i.current.openEvent&&p)||i.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const A=b.current;if(u==="mousedown"&&b.current){b.current=void 0;return}Kh(A,!0)&&h||(n&&f&&(!(i.current.openEvent&&p)||i.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){b.current=void 0,!(S.defaultPrevented||!m||pj(S))&&(S.key===" "&&!gj(o)&&(S.preventDefault(),_.current=!0),!OZ(S)&&S.key==="Enter"&&r(!(n&&f),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!m||pj(S)||gj(o)||S.key===" "&&_.current&&(_.current=!1,r(!(n&&f),S.nativeEvent,"click"))}}),[i,o,u,h,m,r,n,p,f]);return x.useMemo(()=>l?{reference:w}:{},[l,w])}function jZ(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=_Z(),o=x.useRef({}),[l]=x.useState(()=>wZ()),u=DD()!=null,[f,h]=x.useState(r.reference),m=Ah((_,w,S)=>{o.current.openEvent=_?w:void 0,l.emit("openchange",{open:_,event:w,reason:S,nested:u}),n?.(_,w,S)}),p=x.useMemo(()=>({setPositionReference:h}),[]),b=x.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,r.reference,r.floating]);return x.useMemo(()=>({dataRef:o,open:t,onOpenChange:m,elements:b,events:l,floatingId:i,refs:p}),[t,m,b,l,i,p])}function ID(e){e===void 0&&(e={});const{nodeId:t}=e,n=jZ({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,l]=x.useState(null),[u,f]=x.useState(null),m=i?.domReference||o,p=x.useRef(null),b=kD();xl(()=>{m&&(p.current=m)},[m]);const _=cZ({...e,elements:{...i,...u&&{reference:u}}}),w=x.useCallback(N=>{const B=_r(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),getClientRects:()=>N.getClientRects(),contextElement:N}:N;f(B),_.refs.setReference(B)},[_.refs]),S=x.useCallback(N=>{(_r(N)||N===null)&&(p.current=N,l(N)),(_r(_.refs.reference.current)||_.refs.reference.current===null||N!==null&&!_r(N))&&_.refs.setReference(N)},[_.refs]),A=x.useMemo(()=>({..._.refs,setReference:S,setPositionReference:w,domReference:p}),[_.refs,S,w]),T=x.useMemo(()=>({..._.elements,domReference:m}),[_.elements,m]),P=x.useMemo(()=>({..._,...r,refs:A,elements:T,nodeId:t}),[_,A,T,t,r]);return xl(()=>{r.dataRef.current.floatingContext=P;const N=b?.nodesRef.current.find(B=>B.id===t);N&&(N.context=P)}),x.useMemo(()=>({..._,context:P,refs:A,elements:T}),[_,A,T,P])}function $x(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[cj]:l,[fj]:u,...f}=e;o=f}return{...n==="floating"&&{tabIndex:-1,[gZ]:""},...o,...t.map(l=>{const u=l?l[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((l,u)=>(u&&Object.entries(u).forEach(f=>{let[h,m]=f;if(!(i&&[cj,fj].includes(h)))if(h.indexOf("on")===0){if(r.has(h)||r.set(h,[]),typeof m=="function"){var p;(p=r.get(h))==null||p.push(m),l[h]=function(){for(var b,_=arguments.length,w=new Array(_),S=0;S<_;S++)w[S]=arguments[S];return(b=r.get(h))==null?void 0:b.map(A=>A(...w)).find(A=>A!==void 0)}}}else l[h]=m}),l),{})}}function zD(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),i=x.useCallback(u=>$x(u,e,"reference"),t),o=x.useCallback(u=>$x(u,e,"floating"),n),l=x.useCallback(u=>$x(u,e,"item"),r);return x.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])}const vj=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function tf(e,t){return typeof e=="function"?e(t):e}function MZ(e,t){const[n,r]=x.useState(e);return e&&!n&&r(!0),x.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function PZ(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,l=(typeof i=="number"?i:i.close)||0,[u,f]=x.useState("unmounted"),h=MZ(n,l);return!h&&u==="close"&&f("unmounted"),xl(()=>{if(r){if(n){f("initial");const m=requestAnimationFrame(()=>{Ff.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(m)}}f("close")}},[n,r]),{isMounted:h,status:u}}function NZ(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:o,duration:l=250}=t,u=e.placement,f=u.split("-")[0],h=x.useMemo(()=>({side:f,placement:u}),[f,u]),m=typeof l=="number",p=(m?l:l.open)||0,b=(m?l:l.close)||0,[_,w]=x.useState(()=>({...tf(o,h),...tf(n,h)})),{isMounted:S,status:A}=PZ(e,{duration:l}),T=ol(n),P=ol(r),N=ol(i),B=ol(o);return xl(()=>{const $=tf(T.current,h),G=tf(N.current,h),Z=tf(B.current,h),ee=tf(P.current,h)||Object.keys($).reduce((le,oe)=>(le[oe]="",le),{});if(A==="initial"&&w(le=>({transitionProperty:le.transitionProperty,...Z,...$})),A==="open"&&w({transitionProperty:Object.keys(ee).map(vj).join(","),transitionDuration:p+"ms",...Z,...ee}),A==="close"){const le=G||$;w({transitionProperty:Object.keys(le).map(vj).join(","),transitionDuration:b+"ms",...Z,...le})}},[b,N,T,P,B,p,A,h]),{isMounted:S,styles:_}}var BD={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M288 464L64 464c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l48 0 0-48-48 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-48-48 0 0 48c0 8.8-7.2 16-16 16zM224 304c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-224 0zm-64-16c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224z"]},LZ={prefix:"far",iconName:"image",icon:[448,512,[],"f03e","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm128 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm136 72c8.5 0 16.4 4.5 20.7 11.8l80 136c4.4 7.4 4.4 16.6 .1 24.1S352.6 384 344 384l-240 0c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l17.2 24.6 46.5-79c4.3-7.3 12.2-11.8 20.7-11.8z"]},RZ={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256a208 208 0 1 0 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},DZ={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zm387.3 11.3c6.2-6.2 6.2-16.4 0-22.6l-104-104c-4.6-4.6-11.5-5.9-17.4-3.5S256 145.5 256 152l0 72-104 0c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24l104 0 0 72c0 6.5 3.9 12.3 9.9 14.8s12.9 1.1 17.4-3.5l104-104z"]},kZ=DZ;const IZ=({children:e,summary:t,summaryClasses:n,...r})=>{const i=x.useRef(null),[o,l]=x.useState(!1);return x.useEffect(()=>{const u=i.current,f=()=>l(!!u?.open);return u?.addEventListener("toggle",f),()=>u?.removeEventListener("toggle",f)},[]),v.jsxs("details",{ref:i,...r,children:[v.jsx("summary",{className:Oe("focus-ring px-1 -mx-1 rounded-sm",n),children:t}),o&&v.jsx("div",{className:"mt-3 flex flex-col gap-y-3",children:e})]})},zZ=({className:e,...t})=>v.jsx("div",{className:Oe("px-4 py-3 rounded-t-md","bg-lm-primary dark:bg-dm-primary border-b border-lm-border dark:border-dm-border",e),...t}),BZ=({className:e,...t})=>v.jsx("div",{className:Oe("p-4 bg-lm-primary dark:bg-dm-primary first:rounded-t-md","first:rounded-t-md last:rounded-b-md",e),...t}),UZ=({className:e,...t})=>v.jsx("div",{className:Oe("px-4 py-3 rounded-b-md","bg-lm-primary dark:bg-dm-primary border-t border-lm-border dark:border-dm-border",e),...t}),$Z=({className:e,...t})=>v.jsx("div",{className:Oe("group/card rounded-md shadow-md","border border-lm-border dark:border-dm-border bg-lm-primary dark:bg-dm-primary",e),...t}),on=Object.assign($Z,{Body:BZ,Header:zZ,Footer:UZ}),Ot=({bodyClassName:e,children:t,...n})=>{const{title:r,titleSize:i="md",...o}="title"in n?n:{...n,title:void 0,titleSize:void 0};return v.jsxs(on,{...o,children:[r&&v.jsxs(on.Header,{children:[i==="lg"&&v.jsx("h4",{children:r}),i==="md"&&v.jsx("h5",{children:r}),i==="sm"&&v.jsx("h6",{children:r})]}),v.jsx(on.Body,{className:e,children:t})]})};function FZ({id:e,items:t,onSelectItem:n,onActiveItemChange:r,renderItem:i,className:o,noItemsMessage:l="No items",anchor:u,"aria-label":f="Items",...h}){const[m,p]=x.useState(0),b=x.useCallback(_=>{if(p(_),r){const[w,S]=[...t.entries()][_];r(w,S)}},[t,r]);return x.useEffect(()=>{const _=u?.current;if(!_)return;const w=S=>{["Enter","ArrowUp","ArrowDown"].includes(S.key)&&S.preventDefault(),S.key==="ArrowDown"?b(Math.min(m+1,t.size-1)):S.key==="ArrowUp"?b(Math.max(m-1,0)):S.key==="Enter"&&n([...t.values()][m])};return _.addEventListener("keydown",w),()=>_.removeEventListener("keydown",w)},[m,u,b,t,n]),v.jsxs(on,{id:e,className:Oe("py-1 flex flex-col",o),role:"listbox","aria-orientation":"vertical","aria-label":f,...h,children:[t.size===0&&v.jsx("i",{role:"option","aria-disabled":!0,"aria-selected":!1,"data-testid":"no-items",className:"px-2 py-1",children:l}),[...t.entries()].map(([_,w],S)=>v.jsx("button",{id:`${e}_${_}`,type:"button",role:"option","aria-selected":S===m,className:Oe("px-2 py-1 text-left truncate",{"bg-lm-secondary dark:bg-dm-secondary":S===m}),tabIndex:-1,onClick:()=>n(w),onMouseOver:()=>b(S),children:i(w)},_))]})}const Em=x.createContext(void 0),Vf=x.createContext({responsive:!0,size:"md"}),VZ=({children:e,className:t})=>{const{responsive:n}=x.useContext(Vf);return v.jsx(Em.Provider,{value:{section:"head"},children:v.jsx("thead",{className:Oe({"hidden lg:table-header-group":n},t),children:e})})},HZ=({children:e,className:t})=>{const{responsive:n}=x.useContext(Vf);return v.jsx(Em.Provider,{value:{section:"body"},children:v.jsx("tbody",{className:Oe({"lg:table-row-group flex flex-col gap-y-3":n},t),children:e})})},qZ=({children:e,className:t})=>{const{responsive:n}=x.useContext(Vf);return v.jsx(Em.Provider,{value:{section:"footer"},children:v.jsx("tfoot",{className:Oe({"lg:table-row-group flex flex-col gap-y-3 mt-4":n},t),children:e})})},GZ=({children:e,className:t,...n})=>{const r=x.useContext(Em)?.section==="body",{responsive:i}=x.useContext(Vf);return v.jsx("tr",{className:Oe("group",{"lg:table-row flex flex-col":i,"lg:border-0 border-y-2 border-lm-border dark:border-dm-border":i,"hover:bg-lm-primary dark:hover:bg-dm-primary":r,"group-[&]/card:hover:bg-lm-secondary dark:group-[&]/card:hover:bg-dm-secondary":r},t),...n,children:e})},WZ=({children:e,className:t,columnName:n,type:r,...i})=>{const o=x.useContext(Em),l=r??(o?.section!=="body"?"th":"td"),{responsive:u,size:f}=x.useContext(Vf);return v.jsx(l,{"data-column":u?n:void 0,className:Oe("border-lm-border dark:border-dm-border",{"p-1":f==="sm","p-2":f==="md","p-3":f==="lg","border-b-1":!u,"block lg:table-cell not-last:border-b-1 lg:border-b-1":u,"text-left":l==="th","before:lg:hidden before:content-[attr(data-column)] before:font-bold before:mr-1":u&&l==="td"},t),...i,children:e})},YZ=({header:e,footer:t,children:n,responsive:r=!0,size:i="md",...o})=>v.jsx(Vf.Provider,{value:{responsive:r,size:i},children:v.jsxs("table",{className:"w-full",...o,children:[v.jsx(VZ,{children:e}),v.jsx(HZ,{children:n}),t&&v.jsx(qZ,{children:t})]})}),ze=Object.assign(YZ,{Row:GZ,Cell:WZ}),Ct=({className:e,disabled:t,variant:n="primary",size:r="md",inline:i=!1,solid:o=!1,type:l="button",ref:u,...f})=>{const h="to"in f&&typeof f.to=="string",m=h?Rr:"button",p=h?void 0:l;return v.jsx(m,{ref:u,className:Oe({"inline-flex":i,flex:!i},"gap-2 items-center justify-center","border rounded-md no-underline","transition-colors",{"focus-ring":n==="primary","focus-ring-secondary":n==="secondary","focus-ring-danger":n==="danger"},{"px-1.5 py-1 text-sm":r==="sm","px-3 py-1.5":r==="md","px-4 py-2 text-lg":r==="lg"},{"border-lm-brand dark:border-dm-brand":n==="primary","text-lm-brand dark:text-dm-brand":n==="primary"&&!o,"border-zinc-500":n==="secondary","text-zinc-500":n==="secondary"&&!o,"border-danger":n==="danger","text-danger":n==="danger"&&!o},o&&{"text-white":!0,"bg-lm-brand dark:bg-dm-brand":n==="primary","highlight:bg-lm-brand-dark dark:highlight:bg-dm-brand-dark":n==="primary","highlight:border-lm-brand-dark dark:highlight:border-dm-brand-dark":n==="primary","bg-zinc-500":n==="secondary","highlight:bg-zinc-600 highlight:border-zinc-600":n==="secondary","bg-danger":n==="danger","highlight:bg-danger-dark highlight:border-danger-dark":n==="danger"},!t&&{"highlight:text-white":!o,"highlight:bg-lm-brand dark:highlight:bg-dm-brand":n==="primary","highlight:bg-zinc-500":n==="secondary","highlight:bg-danger":n==="danger"},{"cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:h?void 0:t,"aria-disabled":h?t:void 0,type:p,...f})},UD=({className:e,onChange:t,ref:n,...r})=>{const i=x.useCallback(o=>t?.(o.target.checked,o),[t]);return v.jsx("input",{ref:n,type:"checkbox",className:Oe("appearance-none focus-ring cursor-[inherit]","border-1 border-lm-input-border dark:border-dm-input-border","bg-lm-primary dark:bg-dm-primary checked:bg-lm-brand dark:checked:bg-dm-brand bg-no-repeat","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input",e),onChange:i,...r})},XS=({className:e,...t})=>v.jsx(UD,{className:Oe("rounded-sm min-w-4 w-4 h-4 checked:bg-(image:--tick) bg-center",e),...t}),Uu=({onClick:e,className:t,label:n="Close",size:r="lg",solid:i,ref:o})=>v.jsx("button",{ref:o,type:"button",onClick:e,className:Oe("rounded-md focus-ring cursor-pointer",{"opacity-50 highlight:opacity-80 transition-opacity":!i},t),"aria-label":n,children:v.jsx(De,{icon:t0,size:r==="lg"?"xl":r==="md"?"lg":void 0})}),bi=({borderless:e=!1,size:t="md",feedback:n,variant:r="default",className:i,disabled:o,ref:l,...u})=>v.jsx("input",{ref:l,className:Oe("outline-none",r==="default"&&["w-full",{"focus-ring":!n,"focus-ring-danger":n==="error","px-2 py-1 text-sm":t==="sm","px-3 py-1.5":t==="md","px-4 py-2 text-xl":t==="lg","rounded-md border":!e,"border-lm-input-border dark:border-dm-input-border":!e&&!n,"border-danger":!e&&n==="error","bg-lm-disabled-input dark:bg-dm-disabled-input":o,"bg-lm-primary dark:bg-dm-primary":!o,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!o}],i),disabled:o,...u}),Sa=({required:e,children:t,className:n,...r})=>v.jsxs("label",{className:Oe("cursor-pointer",n),...r,children:[t,e&&v.jsx("span",{className:"text-danger ml-1","data-testid":"required-indicator",children:"*"})]}),QS=({children:e,helpText:t,error:n,"data-testid":r})=>v.jsxs("div",{className:"flex flex-col gap-1","data-testid":r,children:[e,t&&v.jsx("small",{"data-testid":r?`${r}-help-text`:"help-text",className:"text-gray-500 dark:text-gray-400",children:t}),n&&v.jsx("span",{"data-testid":r?`${r}-error`:"error",className:"text-danger",children:n})]}),si=({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...u})=>{const f=x.useId();return v.jsxs(QS,{error:i,helpText:o,"data-testid":l,children:[v.jsx(Sa,{htmlFor:f,required:n,children:e}),v.jsx(bi,{id:f,className:t,required:n||r,feedback:i?"error":void 0,...u})]})},KZ=({containerClassName:e,className:t,size:n,...r})=>{const{flag:i,toggle:o,setToFalse:l}=yn(),u=x.useRef(null),f=x.useCallback(({relatedTarget:h})=>{u.current?.contains(h)||l()},[u,l]);return v.jsxs("div",{className:Oe("group relative",e),ref:u,onBlurCapture:f,children:[v.jsx(bi,{type:i?"text":"password",className:Oe({"pr-10":n!=="sm","pr-8":n==="sm"},t),size:n,"data-testid":"input",...r}),v.jsx("button",{type:"button",onClick:o,title:i?"Hide password":"Show password","aria-label":i?"Hide password":"Show password",className:Oe("absolute top-[50%] translate-y-[-50%] px-1 cursor-pointer","text-placeholder hover:text-lm-text hover:dark:text-dm-text transition-colors",{"right-1.5":n!=="sm","scale-85 right-1":n==="sm"}),tabIndex:-1,children:v.jsx(De,{icon:i?yq:BH})})]})},ZZ=({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...u})=>{const f=x.useId();return v.jsxs(QS,{error:i,helpText:o,"data-testid":l,children:[v.jsx(Sa,{htmlFor:f,required:n,children:e}),v.jsx(KZ,{id:f,className:t,required:n||r,feedback:i?"error":void 0,...u})]})},XZ=({className:e,size:t="md",feedback:n,disabled:r,...i})=>v.jsx("select",{className:Oe("w-full rounded-md border appearance-none pr-9","bg-(image:--chevron-down) bg-no-repeat bg-position-[right_0.75rem_center] bg-size-[16px_12px]",{"focus-ring":!n,"focus-ring-danger":n==="error","border-lm-input-border dark:border-dm-input-border":!n,"border-danger":n==="error","pl-2 py-1 text-sm":t==="sm","pl-3 py-1.5":t==="md","pl-4 py-2 text-xl":t==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":r,"bg-lm-primary dark:bg-dm-primary group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!r},e),disabled:r,...i}),JS=({selectClassName:e,label:t,error:n,helpText:r,required:i,hiddenRequired:o,"data-testid":l,...u})=>{const f=x.useId();return v.jsxs(QS,{error:n,helpText:r,"data-testid":l,children:[v.jsx(Sa,{htmlFor:f,required:i,children:t}),v.jsx(XZ,{id:f,className:e,required:i||o,feedback:n?"error":void 0,...u})]})},Hf=({onChange:e,containerClassName:t,inputClassName:n,size:r="lg",loading:i=!1,variant:o="default",immediate:l=!1,...u})=>{const{setTimeout:f,clearCurrentTimeout:h}=GD(500),m=x.useCallback(p=>{!p||l?(h(),e(p)):f(()=>e(p))},[h,l,e,f]);return v.jsxs("div",{className:Oe("group relative focus-within:z-10",t),children:[o==="default"&&v.jsx(De,{icon:i?PS:kH,spin:i,className:Oe("absolute top-[50%] translate-y-[-50%] transition-colors","text-placeholder group-focus-within:text-lm-text dark:group-focus-within:text-dm-text",{"left-3":r!=="sm","scale-85 left-2":r==="sm"})}),v.jsx(bi,{variant:o,type:"search",className:Oe(o==="default"&&{"pl-9":r!=="sm","pl-7":r==="sm"},n),placeholder:"Search...",onChange:p=>m(p.target.value),size:r,...u})]})};function $D({searchResults:e,onSearch:t,onSelectSearchResult:n,renderSearchResult:r,size:i="md",listboxSpan:o="full",onFocus:l,containerClassName:u,listboxClassName:f,ref:h,...m}){const p=x.useId(),[b,_]=x.useState(),w=x.useRef(null);x.useImperativeHandle(h,()=>w.current);const S=x.useMemo(()=>e?b??[...e.keys()][0]:void 0,[b,e]),A=x.useCallback(T=>{n(T),t(""),w.current.value=""},[t,n,w]);return v.jsxs("div",{className:Oe("relative",u),onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||t("")},children:[v.jsx(Hf,{onChange:t,size:i,ref:w,role:"combobox","aria-autocomplete":"list","aria-expanded":!!e,"aria-controls":p,"aria-activedescendant":S?`${p}_${S}`:void 0,autoComplete:"off",autoCorrect:"off",onFocus:T=>{l?.(T),t(T.target.value)},...m}),e&&v.jsx(FZ,{id:p,items:e,anchor:w,onSelectItem:A,onActiveItemChange:_,renderItem:r,className:Oe("absolute top-full mt-1 z-10",{"min-w-60":o==="auto","w-full":o==="full"},f),"aria-label":"Matching items",noItemsMessage:"No results found matching search"})]})}const QZ=({name:e,color:t})=>v.jsxs("div",{className:"inline-flex items-center gap-2",children:[v.jsx("div",{"aria-hidden":!0,className:"w-4 h-4 rounded-full",style:{backgroundColor:t}}),e]}),JZ=({tag:e,color:t,size:n,onRemove:r})=>v.jsxs("li",{className:Oe("inline-flex items-center gap-1 font-bold [&]:rounded-md",{"px-1 text-sm":n==="sm","py-0.25 px-1.5":n==="md","py-0.5 px-1.5":n==="lg"}),style:{backgroundColor:t,color:eC(t)?"#000":"#fff"},onClick:i=>i.stopPropagation(),children:[e,v.jsx(Uu,{label:`Remove ${e}`,solid:!0,size:"sm",onClick:()=>r(e)})]}),yj="#99a1af",eX=({tags:e,selectedTags:t=[],onTagsChange:n,getColorForTag:r,searchMode:i="startsWith",immutable:o=!1,size:l="md",disabled:u,containerClassName:f,...h})=>{const{searchResults:m,onSearch:p}=qD({tags:e,selectedTags:t,searchMode:i,allowAdding:!o}),b=x.useCallback(S=>{const A=(S.match(/Add\s+"([^"]+)"\s+tag/)?.[1]??S).split(",").map(nC);n?.([...new Set([...t,...A])])},[n,t]),_=x.useCallback(S=>n?.(t.filter(A=>A!==S)),[n,t]),w=x.useRef(null);return v.jsxs("div",{className:Oe("rounded-md flex flex-wrap gap-1","border border-lm-input-border dark:border-dm-input-border","cursor-text focus-within:focus-within-ring",{"p-0.5":l==="sm","p-1.25":l==="md","p-2":l==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":u,"bg-lm-primary dark:bg-dm-primary":!u,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!u},f),onClick:S=>{S.target!==w.current&&w.current?.focus()},children:[v.jsx("ul",{className:"m-0 p-0 flex flex-wrap gap-1",children:t.map((S,A)=>{const T=r?.(S)??yj;return v.jsx(JZ,{tag:S,color:T,onRemove:_,size:l},`${S}${A}`)})}),v.jsx($D,{variant:"unstyled",listboxSpan:"auto",containerClassName:"flex items-center",listboxClassName:"whitespace-nowrap",inputClassName:Oe("no-clear-button",{"px-1 text-sm":l==="sm","px-2 h-[26px]":l==="md","px-3 text-xl":l==="lg"}),searchResults:m,onSearch:p,onSelectSearchResult:b,renderSearchResult:S=>S.match(/Add\s+"([^"]+)"\s+tag/)?S:v.jsx(QZ,{name:S,color:r?.(S)??yj}),onKeyDown:S=>{S.key==="Backspace"&&!m&&_(t[t.length-1])},size:l,disabled:u,ref:w,immediate:!0,...h})]})},tX=({className:e,...t})=>v.jsx(UD,{className:Oe("rounded-full min-w-8 w-8 h-4","bg-(image:--circle-grey-dark) dark:bg-(image:--circle-grey-light) checked:bg-(image:--circle-white)","focus-visible:not-checked:bg-(image:--circle-blue-light)","checked:bg-right transition-[background-position]",e),...t});function FD(e,{elementsSelector:t,focusFirstItem:n=!1,vertical:r=!0,horizontal:i=!0}){const o=x.useMemo(()=>{const f=[];return r&&f.push("ArrowDown"),i&&f.push("ArrowRight"),f},[i,r]),l=x.useMemo(()=>{const f=[];return r&&f.push("ArrowUp"),i&&f.push("ArrowLeft"),f},[i,r]),u=x.useMemo(()=>[...o,...l],[o,l]);x.useEffect(()=>{const f=e.current;if(!f)return()=>{};const h=new AbortController,m=()=>[...f.querySelectorAll(t)],p=m(),b=Math.max(p.findIndex(_=>_.dataset.selected==="true"),0);return p.forEach((_,w)=>{_.tabIndex=w===b?0:-1,n&&w===b&&_.focus()}),f.addEventListener("keydown",_=>{if(!u.includes(_.key))return;_.preventDefault();const w=m(),S=w.findIndex(T=>T.tabIndex===0),A=o.includes(_.key)?w[S+1]??w[0]:w[S-1]??w[w.length-1];w.forEach(T=>{T.tabIndex=-1}),A.tabIndex=0,A.focus()},{signal:h.signal}),()=>h.abort()},[u,e,t,n,o])}const nX=()=>{const e=io();return x.useCallback(()=>e(-1),[e])},rX=128;function eC(e){const[t,n,r]=(e.match(/../g)??[]).map(i=>parseInt(i,16)||0);return Math.round(Math.sqrt(.299*t**2+.587*n**2+.114*r**2))>=rX}const VD=({text:e,className:t,size:n="lg",initialCopied:r=!1,navigator_:i=globalThis.navigator,...o})=>{const[l,u]=d0({initialValue:r}),f=x.useCallback(()=>i.clipboard.writeText(e).then(u),[i.clipboard,e,u]);return v.jsx("button",{type:"button",className:Oe("focus-ring rounded-sm cursor-pointer",{"text-md":n==="sm","text-lg":n==="md","text-xl":n==="lg"},t),"aria-label":`Copy ${e} to clipboard`,title:"Copy to clipboard",onClick:f,...o,children:v.jsx(De,{icon:l?Iu:BD})})},HD=e=>{const t=new URLSearchParams(e),n={};return t.forEach((r,i)=>{if(i.endsWith("[]")){const o=i.slice(0,-2);n[o]??=[],n[o].push(r)}else n[i]=r}),n},tC=e=>{const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!==void 0&&(Array.isArray(r)?r.forEach(i=>t.append(`${n}[]`,`${i}`)):t.append(n,`${r}`));return t.toString()},nc=()=>{const{search:e}=Cr();return x.useMemo(()=>HD(e),[e])},iX=/\s+/g,nC=e=>e.trim().toLowerCase().replace(iX,"-"),aX=new Intl.NumberFormat("en-US"),kn=e=>aX.format(Number(e)),bj=10,oX=e=>Math.ceil(e/bj)*bj,nf=2,Hv="...",sX=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),lX=(e,t)=>{const n=sX(Math.max(nf,e-nf),Math.min(t-1,e+nf)+1);return e-nf>nf&&n.unshift(Hv),e+nfe===Hv,uX=e=>Ih(e)?e:kn(e),cX=(e,t)=>Ih(e)?`${e}_${t}`:`${e}`;function qD({tags:e,selectedTags:t,searchMode:n,searchLimit:r=5,allowAdding:i=!1}){const[o,l]=x.useState(),u=x.useCallback(f=>{const h=f.toLowerCase().trim();if(!h){l(void 0);return}const m=e.filter(p=>t.includes(p)?!1:p.toLowerCase()[n](h)).slice(0,r);i&&m.push(`Add "${h.split(",").map(nC).join(",")}" tag`),l(new Map(m.map(p=>[p,p])))},[i,r,n,t,e]);return{searchResults:o,onSearch:u}}function GD(e,t=globalThis.setTimeout,n=globalThis.clearTimeout){const r=x.useRef(null),i=x.useCallback(()=>{r.current&&n(r.current)},[n]),o=x.useCallback((l,u)=>{i(),r.current=t(()=>{l(),r.current=null},u??e)},[i,e,t]);return x.useEffect(()=>i,[i]),x.useMemo(()=>({setTimeout:o,clearCurrentTimeout:i}),[i,o])}const fX=2e3,d0=({initialValue:e=!1,delay:t=fX}={},n=globalThis.setTimeout,r=globalThis.clearTimeout)=>{const{setTimeout:i}=GD(t,n,r),[o,l]=x.useState(e),u=x.useRef(e),f=x.useCallback(()=>{l(!u.current),i(()=>l(u.current))},[i]);return[o,f]};function yn(e=!1){const[t,n]=x.useState(e),r=x.useCallback(()=>n(l=>!l),[]),i=x.useCallback(()=>n(!0),[]),o=x.useCallback(()=>n(!1),[]);return{flag:t,toggle:r,setToTrue:i,setToFalse:o}}const WD=x.createContext({}),dX=({className:e,selected:t,disabled:n,onClick:r,...i})=>{const o="to"in i&&typeof i.to=="string",l=o?Rr:"button",{onItemClick:u}=x.useContext(WD);return v.jsx(l,{role:"menuitem","data-selected":t,className:Oe("flex items-center gap-2","w-full px-3 py-1.5 focus-ring","no-underline text-inherit",{"cursor-pointer":!n,"pointer-events-none opacity-50":n,"bg-lm-secondary dark:bg-dm-secondary":t&&!n,"highlight:bg-lm-secondary dark:highlight:bg-dm-secondary highlight:z-1 relative":!t&&!n},e),tabIndex:-1,disabled:o?void 0:n,"aria-disabled":o?n:void 0,type:o?void 0:"button",onClick:f=>{r?.(f),u?.()},...i})},hX=()=>v.jsx("div",{role:"separator","aria-hidden":!0,className:"border-b border-lm-border dark:border-dm-border my-2"}),mX=({children:e})=>v.jsx("div",{role:"heading","aria-level":6,"aria-hidden":!0,className:Oe("flex items-center w-full px-3 py-1.5","text-gray-500 text-sm font-semibold"),onClick:t=>t.stopPropagation(),children:e}),pX=({className:e,...t})=>v.jsx("div",{className:Oe("px-3 py-1.5",e),...t}),gX=({children:e,className:t,focusableElementsSelector:n='[role="menuitem"]:not([disabled]):not([aria-disabled])',focusFirstItem:r=!1,onItemClick:i,...o})=>{const l=x.useRef(null);return FD(l,{elementsSelector:n,focusFirstItem:r}),v.jsx(on,{ref:l,role:"menu",className:Oe("py-2 whitespace-nowrap",t),...o,children:v.jsx(WD.Provider,{value:{onItemClick:i},children:e})})},Oh=Object.assign(gX,{Item:dX,Separator:hX,Title:mX,Misc:pX}),vX=({children:e,menuAlignment:t="left",buttonVariant:n="button",buttonContent:r,buttonClassName:i,buttonSize:o="md",buttonDisabled:l=!1,containerClassName:u,menuClassName:f,caretless:h,buttonLabel:m,menuOffset:p=3})=>{const[b,_]=x.useState(!1),w=x.useRef(null),S=x.useCallback(({focusButton:ee=!0}={})=>{_(!1),ee&&w.current?.focus()},[]),{refs:A,floatingStyles:T,context:P}=ID({open:b,onOpenChange:_,placement:t==="right"?"bottom-end":"bottom-start",middleware:[hZ(),dZ(p)],elements:{reference:w.current}}),N=TZ(P),{getReferenceProps:B,getFloatingProps:$}=zD([N]),G=x.useId(),Z=x.useRef(null);return x.useEffect(()=>{const ee=Z.current;if(!ee||!b)return()=>{};const le=new AbortController;return document.body.addEventListener("click",oe=>{oe.composedPath().includes(ee)||S()},{signal:le.signal}),()=>le.abort()},[S,b]),v.jsxs("div",{ref:Z,className:Oe("relative inline-block",u),onKeyDown:ee=>{ee.key==="Escape"&&S()},onBlur:ee=>{ee.relatedTarget&&!Z.current.contains(ee.relatedTarget)&&S({focusButton:!1})},children:[v.jsxs("button",{ref:w,...B(),type:"button","aria-haspopup":!0,"aria-expanded":b,"aria-controls":G,"aria-label":m,disabled:l,className:Oe("flex items-center rounded-md focus-ring",{"justify-between":!h,"cursor-pointer":!l,"pointer-events-none opacity-50":l,"border border-lm-border dark:border-dm-border":n==="button","bg-lm-primary dark:bg-dm-primary":n==="button","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":n==="button","text-lm-brand dark:text-dm-brand":n==="link","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline":n==="link","px-1.5 py-1 text-sm":n!=="text"&&o==="sm","px-3 py-1.5":n!=="text"&&o==="md","px-4 py-2 text-lg":n!=="text"&&o==="lg","gap-x-1.5":o==="sm","gap-x-2":o!=="sm"},i),onKeyDown:ee=>{ee.key==="ArrowDown"&&(ee.preventDefault(),_(!0))},children:[r,!h&&v.jsx(De,{icon:pR,size:"xs",widthAuto:!0})]}),b&&v.jsx("div",{ref:A.setFloating,style:T,className:"min-w-full z-500",...$(),children:v.jsx(Oh,{className:f,id:G,focusableElementsSelector:'[role="menuitem"]:not([disabled]):not([aria-disabled]),input:not([disabled]),select:not([disabled])',focusFirstItem:!0,onItemClick:S,children:e})})]})},Ue=Object.assign(vX,{Item:Oh.Item,Separator:Oh.Separator,Title:Oh.Title,Misc:Oh.Misc}),h0=({className:e,disabled:t,size:n="md",type:r="button",...i})=>v.jsx("button",{className:Oe("inline-flex rounded-md focus-ring","text-lm-brand dark:text-dm-brand","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline",{"px-1.5 py-1 text-sm":n==="sm","px-3 py-1.5":n==="md","px-4 py-2 text-lg":n==="lg","cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:t,type:r,...i}),yX=({className:e,active:t,...n})=>v.jsx("li",{role:"menuitem",className:"w-full flex","data-active":t,children:v.jsx(Rr,{className:Oe("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white no-underline highlight:opacity-100 transition-opacity",{"opacity-60":!t,"opacity-100":t},e),...n})}),bX=({containerClassName:e,buttonClassName:t,menuClassName:n,active:r,...i})=>v.jsx("li",{role:"menuitem","aria-haspopup":!0,className:"w-full flex","data-active":r,children:v.jsx(Ue,{containerClassName:Oe("max-md:w-full",e),buttonVariant:"text",buttonClassName:Oe("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white highlight:opacity-100 transition-opacity",{"opacity-60":!r,"opacity-100":r},t),menuAlignment:"right",menuOffset:-3,menuClassName:Oe("mx-2",n),...i})}),xX=({className:e,brand:t,children:n})=>{const{flag:r,toggle:i,setToFalse:o}=yn(),l=x.useId(),u=x.useId(),{pathname:f}=Cr();return x.useEffect(()=>o(),[f,o]),v.jsxs("nav",{className:Oe("w-full relative","bg-lm-main dark:bg-dm-main","flex max-md:flex-col items-center justify-between",e),children:[v.jsxs("div",{className:"w-full relative",children:[v.jsx("h4",{className:Oe("text-white px-4 py-3","max-md:w-full max-md:flex max-md:flex-col items-center"),children:t}),v.jsx(Ct,{id:u,variant:"secondary",className:Oe("absolute right-0 top-[50%] translate-y-[-50%]","md:hidden mx-2 [&]:px-2","opacity-60 highlight:opacity-100 transition-opacity","[&]:text-white [&]:border-white [&]:highlight:bg-transparent"),onClick:i,"aria-label":`${r?"Hide":"Show"} menu`,"aria-controls":l,children:v.jsx(De,{icon:r?$H:aq})})]}),v.jsx("ul",{id:l,"aria-labelledby":u,role:"menu",className:Oe("m-0 p-0","max-md:w-full md:mr-2 max-md:absolute max-md:top-full z-2000","flex max-md:flex-col items-center","bg-lm-main dark:bg-dm-main",{"max-md:hidden":!r}),children:n})]})},iw=Object.assign(xX,{MenuItem:yX,Dropdown:bX}),YD=x.createContext(null),_X=({className:e,to:t,...n})=>{const r=x.useContext(YD);return v.jsx(MS,{role:"menuitem",to:t,className:({isActive:i})=>Oe("px-4 pt-2 pb-[calc(0.5rem-3px)] border-b-3","highlight:text-lm-brand dark:highlight:text-dm-brand","font-bold text-center no-underline transition-colors","rounded-none outline-none focus-visible:inset-ring-2","focus-visible:inset-ring-lm-brand/50 dark:focus-visible:inset-ring-dm-brand/50",{"text-lm-brand dark:text-dm-brand":i,"border-b-lm-brand dark:border-b-dm-brand active":i,"border-b-transparent text-gray-500":!i,"flex-grow":r?.fill},e),...n})},wX=({children:e,className:t,fill:n})=>v.jsx(YD.Provider,{value:{fill:n},children:v.jsx(on,{role:"menubar",className:Oe("flex overflow-hidden",t),children:e})}),nl=Object.assign(wX,{Pill:_X}),KD=["border border-r-0 last:border-r border-lm-border dark:border-dm-border","rounded-none first:rounded-l last:rounded-r"],ZD=(e=!1)=>Oe(KD,"px-3 py-2 cursor-pointer no-underline","focus-ring focus-visible:z-1",!e&&["text-lm-brand dark:text-dm-brand","bg-lm-primary dark:bg-dm-primary","highlight:bg-lm-secondary dark:highlight:bg-dm-secondary"],e&&"bg-lm-main dark:bg-dm-main text-white"),aw=({children:e})=>v.jsx("span",{"aria-hidden":!0,className:Oe(KD,"px-3 py-2 text-gray-400"),children:e}),XD=()=>v.jsx(aw,{children:Hv});function SX({children:e,active:t,isEllipsis:n,href:r,...i}){const o=x.useMemo(()=>ZD(t),[t]);return n?v.jsx(XD,{}):v.jsx(Rr,{className:o,to:r,...i,"data-active":t,children:e})}function CX({children:e,active:t,isEllipsis:n,...r}){const i=x.useMemo(()=>ZD(t),[t]);return n?v.jsx(XD,{}):v.jsx("button",{type:"button",className:i,...r,"data-active":t,children:e})}const m0=({currentPage:e,pagesCount:t,...n})=>{const r="urlForPage"in n,i=r?SX:CX,o=x.useCallback(u=>r?{href:Ih(u)?void 0:n.urlForPage(u)}:{onClick:()=>!Ih(u)&&n.onPageChange(u)},[r,n]),l=x.useRef(null);return FD(l,{elementsSelector:"button,a",vertical:!1}),t<2?null:v.jsxs("div",{className:"select-none flex","data-testid":"paginator",ref:l,children:[e===1?v.jsx(aw,{children:v.jsx(De,{size:"xs",icon:xT})}):v.jsx(i,{...o(Math.max(1,e-1)),"aria-label":"Previous",children:v.jsx(De,{size:"xs",icon:xT})}),lX(e,t).map((u,f)=>v.jsx(i,{active:u===e,isEllipsis:Ih(u),...o(u),children:uX(u)},cX(u,f))),e===t?v.jsx(aw,{children:v.jsx(De,{size:"xs",icon:Dv})}):v.jsx(i,{...o(Math.min(t,e+1)),"aria-label":"Next",children:v.jsx(De,{size:"xs",icon:Dv})})]})},EX=({buttonLabel:e="Options",buttonSize:t="md",...n})=>v.jsx(Ue,{buttonContent:v.jsx(De,{icon:VH,widthAuto:!0,className:Oe({"px-1":t==="sm"})}),caretless:!0,buttonLabel:e,buttonSize:t,...n}),Jt=Object.assign(EX,{Item:Ue.Item,Separator:Ue.Separator,Title:Ue.Title,Misc:Ue.Misc}),AX=({open:e,children:t,className:n,onClose:r,...i})=>{const o=x.useRef(null);return x.useEffect(()=>{const l=document.body,u=l.style.overflow,f=l.style.paddingRight;if(e){const h=window.outerWidth-l.clientWidth,m=l.scrollHeight>l.clientHeight;l.style.overflow="hidden",m&&(l.style.paddingRight=`${h}px`),o.current?.showModal()}else o.current?.close();return()=>{l.style.overflow=u,l.style.paddingRight=f}},[e]),Ff.createPortal(v.jsx("dialog",{ref:o,className:Oe("bg-transparent backdrop:bg-black/50",n),onCancel:l=>{l.preventDefault(),r()},...i,children:e&&t}),document.body)},ao=({open:e,onClose:t,variant:n="default",title:r,children:i,className:o,...l})=>{const{size:u="md",confirmText:f="Confirm",cancelText:h="Cancel",confirmDisabled:m,onConfirm:p,onClosed:b,..._}="onConfirm"in l?l:{...l},[w,S]=x.useState(e),A=x.useRef(null),T=x.useRef("cancel"),P=x.useCallback(N=>{N.preventDefault(),N.stopPropagation(),T.current="confirm",p?.()},[p]);return x.useEffect(()=>{if(e){T.current="cancel",S(!0);return}const N=A.current;if(N){delete A.current.dataset.open;let B=!1;const $=G=>{B||G.target!==N||(B=!0,S(!1),b?.(T.current))};return N.addEventListener("transitionend",$),()=>{N.removeEventListener("transitionend",$)}}},[b,e]),x.useEffect(()=>{const N=A.current;w&&N&&(N.dataset.open="")},[w]),v.jsx(AX,{open:w,onClose:t,className:Oe({"flex w-screen h-screen max-w-screen max-h-screen":w,"overflow-hidden":n==="cover"},o),..._,children:v.jsx("form",{"data-testid":"transition-container",ref:A,className:Oe("w-full m-auto p-4 sm:p-6","-translate-y-4 data-open:translate-y-0 opacity-0 data-open:opacity-100","transition-[opacity_,_translate] duration-300",n!=="cover"&&{"sm:w-sm":u==="sm","md:w-lg":u==="md","md:w-4xl":u==="lg","md:w-6xl":u==="xl"},{"h-full":n==="cover"}),onSubmit:P,children:v.jsx(on,{className:Oe("w-full",{"h-full relative overflow-auto":n==="cover"}),children:n==="cover"?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:Oe("px-4 py-3 absolute top-0 left-0 right-0 z-3000","flex items-center justify-between","text-white bg-linear-to-b from-black/70 to-black/10","[text-shadow:_0_2px_4px_rgb(0_0_0/_0.8)]"),children:[v.jsx("h5",{children:r}),v.jsx(Uu,{onClick:t,label:"Close dialog"})]}),i]}):v.jsxs(v.Fragment,{children:[v.jsxs(on.Header,{className:Oe("sticky top-0","flex items-center justify-between gap-x-2"),children:[v.jsx("h5",{className:Oe({"text-danger":n==="danger"}),children:r}),v.jsx(Uu,{onClick:t,label:"Close dialog"})]}),v.jsx(on.Body,{children:i}),p&&v.jsxs(on.Footer,{"data-testid":"footer",className:Oe("flex justify-end items-center gap-x-2","[&]:px-3 sticky bottom-0"),children:[v.jsx(h0,{onClick:t,children:h}),v.jsx(Ct,{solid:!0,variant:n==="danger"?"danger":"primary",disabled:m,type:"submit",children:f})]})]})})})})},Go=({className:e,children:t,loading:n=!1,variant:r="default"})=>v.jsx(Ot,{className:Oe({"[&]:border-danger":r==="error"},e),children:v.jsxs("h3",{className:Oe("text-center",{"text-gray-500 dark:text-gray-400":r==="default","text-danger":r==="error"}),children:[n&&v.jsxs(v.Fragment,{children:[v.jsx(De,{icon:PS,spin:!0}),v.jsx("span",{className:"ml-2",children:t??"Loading..."})]}),!n&&t]})}),$r=({variant:e,className:t,size:n="md",children:r})=>v.jsx("div",{className:Oe("rounded-md text-center",{"p-2":n==="sm","p-4":n==="md","p-6":n==="lg","[&]:text-white":e!=="warning","bg-lm-brand dark:bg-dm-brand":e==="success","bg-danger":e==="error","bg-warning text-black":e==="warning"},t),children:r}),rs=({placement:e="auto"}={})=>{const t=x.useRef(null),n=(()=>{const S=[];return e==="auto"&&S.push(mZ()),S.push(pZ({element:t})),S})(),[r,i]=x.useState(!1),{refs:o,floatingStyles:l,context:u,middlewareData:f}=ID({placement:e==="auto"?void 0:e,open:r,onOpenChange:i,middleware:n}),h=AZ(u,{delay:{open:300},move:!0}),{getFloatingProps:m,getReferenceProps:p}=zD([h]),{isMounted:b,styles:_}=NZ(u,{duration:200}),w=x.useMemo(()=>{const S=u.placement.split("-")[0];return{top:"bottom",right:"left",bottom:"top",left:"right"}[S]??""},[u.placement]);return{anchor:{...p(),ref:o.setReference},tooltip:{...m(),refSetter:o.setFloating,isMounted:b,styles:{...l,..._},arrowPos:f.arrow,arrowRef:t,arrowSide:w}}},is=({children:e,isMounted:t,styles:n,refSetter:r,arrowRef:i,arrowPos:o,arrowSide:l,...u})=>t&&v.jsx("div",{role:"tooltip","aria-live":"polite",className:Oe("z-500 max-w-64",{"pt-2.5":l==="top","pb-2.5":l==="bottom","pr-2.5":l==="right","pl-2.5":l==="left"}),ref:r,style:n,...u,children:v.jsxs("div",{className:"relative px-1.5 py-1 rounded bg-black/90 text-white text-center",children:[v.jsx("span",{className:"sr-only",children:"Tooltip: "}),e,v.jsx("div",{ref:i,className:Oe("absolute","border-l-6 border-r-6 border-b-6 border-l-transparent border-r-transparent border-b-black/90",{"rotate-180":l==="bottom","rotate-90 mr-[-3px]":l==="right","rotate-270 ml-[-3px]":l==="left"}),style:{left:o?.x,top:o?.y,[l]:`${-(i.current?.offsetWidth??0)/2}px`},"data-testid":"arrow"})]})});function QD(e){if(e.currentField!==e.newField)return"ASC";const t={ASC:"DESC",DESC:void 0};return e.currentOrderDir?t[e.currentOrderDir]:"ASC"}function rC(e){const t=QD(e);return{field:t?e.newField:void 0,dir:t}}const JD=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,l=n==="ASC"?-1:1;return r[t]>i[t]?o:l}),OX=e=>e.dir?`${e.field}-${e.dir}`:void 0,TX=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function Am({items:e,order:t,onChange:n,prefixed:r=!0,buttonVariant:i="button",...o}){const l=x.useCallback(f=>{const h=rC({currentOrderDir:t.dir,currentField:t.field,newField:f});n(h)},[n,t.dir,t.field]),u=i==="button";return v.jsxs(Ue,{buttonContent:v.jsxs(v.Fragment,{children:[!u&&"Order by",u&&!t.field&&v.jsx("i",{children:"Order by..."}),u&&t.field&&v.jsxs(v.Fragment,{children:[r&&"Order by: ",e[t.field]," - ",t.dir??"DESC"]})]}),buttonVariant:i,...o,children:[Object.entries(e).map(([f,h])=>v.jsxs(Ue.Item,{selected:t.field===f,onClick:()=>l(f),className:"flex items-center justify-between gap-2",children:[h,t.field===f&&v.jsx(De,{icon:t.dir==="ASC"?YH:vq})]},f)),v.jsx(Ue.Separator,{}),v.jsx(Ue.Item,{disabled:!t.field,onClick:()=>n({}),children:v.jsx("i",{children:"Clear selection"})})]})}const jX="#4696e5",MX="rgba(70, 150, 229, 0.4)",PX="#2078CF",NX="rgba(32, 120, 207, 0.4)",Xh=()=>as()?jX:PX,LX=()=>as()?MX:NX,ow="#f77f28",RX="rgba(247, 127, 40, 0.4)",DX="white",kX="#161b22",IX=e=>document.querySelector("html")?.setAttribute("data-theme",e),as=()=>document.querySelector("html")?.getAttribute("data-theme")==="dark",iC=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",zX=({isOpen:e,onClose:t,forceUpdate:n})=>{const{flag:r,setToTrue:i}=yn(),o=x.useCallback(()=>{i(),n()},[n,i]);return e?v.jsxs(on,{role:"alert",className:Oe("w-[700px] max-w-[calc(100%-30px)]","fixed top-[35px] left-[50%] translate-x-[-50%] z-[1040]"),children:[v.jsxs(on.Header,{className:"flex items-center justify-between",children:[v.jsx("h5",{children:"This app has just been updated!"}),v.jsx(Uu,{onClick:t})]}),v.jsxs(on.Body,{className:"flex gap-4 items-center justify-between max-md:flex-col",children:["Restart it to enjoy the new features.",v.jsxs(Ct,{disabled:r,variant:"secondary",solid:!0,onClick:o,children:[!r&&v.jsxs(v.Fragment,{children:["Restart now ",v.jsx(De,{icon:OH})]}),r&&v.jsx(v.Fragment,{children:"Restarting..."})]})]})]}):null},Ci=({href:e,children:t,rel:n,...r})=>v.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});function br(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var BX=typeof Symbol=="function"&&Symbol.observable||"@@observable",xj=BX,Fx=()=>Math.random().toString(36).substring(7).split("").join("."),UX={INIT:`@@redux/INIT${Fx()}`,REPLACE:`@@redux/REPLACE${Fx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fx()}`},qv=UX;function aC(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ek(e,t,n){if(typeof e!="function")throw new Error(br(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(br(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(br(1));return n(ek)(e,t)}let r=e,i=t,o=new Map,l=o,u=0,f=!1;function h(){l===o&&(l=new Map,o.forEach((A,T)=>{l.set(T,A)}))}function m(){if(f)throw new Error(br(3));return i}function p(A){if(typeof A!="function")throw new Error(br(4));if(f)throw new Error(br(5));let T=!0;h();const P=u++;return l.set(P,A),function(){if(T){if(f)throw new Error(br(6));T=!1,h(),l.delete(P),o=null}}}function b(A){if(!aC(A))throw new Error(br(7));if(typeof A.type>"u")throw new Error(br(8));if(typeof A.type!="string")throw new Error(br(17));if(f)throw new Error(br(9));try{f=!0,i=r(i,A)}finally{f=!1}return(o=l).forEach(P=>{P()}),A}function _(A){if(typeof A!="function")throw new Error(br(10));r=A,b({type:qv.REPLACE})}function w(){const A=p;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(br(11));function P(){const B=T;B.next&&B.next(m())}return P(),{unsubscribe:A(P)}},[xj](){return this}}}return b({type:qv.INIT}),{dispatch:b,subscribe:p,getState:m,replaceReducer:_,[xj]:w}}function $X(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:qv.INIT})>"u")throw new Error(br(12));if(typeof n(void 0,{type:qv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(br(13))})}function p0(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw u&&u.type,new Error(br(14));h[p]=w,f=f||w!==_}return f=f||r.length!==Object.keys(l).length,f?h:l}}function Gv(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function FX(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(br(15))};const l={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},u=e.map(f=>f(l));return o=Gv(...u)(i.dispatch),{...i,dispatch:o}}}function tk(e){return aC(e)&&"type"in e&&typeof e.type=="string"}var nk=Symbol.for("immer-nothing"),_j=Symbol.for("immer-draftable"),Fr=Symbol.for("immer-state");function da(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _i=Object,Ef=_i.getPrototypeOf,Wv="constructor",g0="prototype",sw="configurable",Yv="enumerable",fv="writable",Qh="value",Wo=e=>!!e&&!!e[Fr];function xa(e){return e?rk(e)||v0(e)||!!e[_j]||!!e[Wv]?.[_j]||y0(e)||b0(e):!1}var VX=_i[g0][Wv].toString(),wj=new WeakMap;function rk(e){if(!e||!oC(e))return!1;const t=Ef(e);if(t===null||t===_i[g0])return!0;const n=_i.hasOwnProperty.call(t,Wv)&&t[Wv];if(n===Object)return!0;if(!cf(n))return!1;let r=wj.get(n);return r===void 0&&(r=Function.toString.call(n),wj.set(n,r)),r===VX}function Om(e,t,n=!0){Tm(e)===0?(n?Reflect.ownKeys(e):_i.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Tm(e){const t=e[Fr];return t?t.type_:v0(e)?1:y0(e)?2:b0(e)?3:0}var Sj=(e,t,n=Tm(e))=>n===2?e.has(t):_i[g0].hasOwnProperty.call(e,t),lw=(e,t,n=Tm(e))=>n===2?e.get(t):e[t],Kv=(e,t,n,r=Tm(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function HX(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var v0=Array.isArray,y0=e=>e instanceof Map,b0=e=>e instanceof Set,oC=e=>typeof e=="object",cf=e=>typeof e=="function",Vx=e=>typeof e=="boolean",Do=e=>e.copy_||e.base_,sC=e=>e.modified_?e.copy_:e.base_;function uw(e,t){if(y0(e))return new Map(e);if(b0(e))return new Set(e);if(v0(e))return Array[g0].slice.call(e);const n=rk(e);if(t===!0||t==="class_only"&&!n){const r=_i.getOwnPropertyDescriptors(e);delete r[Fr];let i=Reflect.ownKeys(r);for(let o=0;o1&&_i.defineProperties(e,{set:Lg,add:Lg,clear:Lg,delete:Lg}),_i.freeze(e),t&&Om(e,(n,r)=>{lC(r,!0)},!1)),e}function qX(){da(2)}var Lg={[Qh]:qX};function x0(e){return e===null||!oC(e)?!0:_i.isFrozen(e)}var Zv="MapSet",cw="Patches",ik={};function Af(e){const t=ik[e];return t||da(0,e),t}var GX=e=>!!ik[e],Jh,ak=()=>Jh,WX=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:GX(Zv)?Af(Zv):void 0});function Cj(e,t){t&&(e.patchPlugin_=Af(cw),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fw(e){dw(e),e.drafts_.forEach(YX),e.drafts_=null}function dw(e){e===Jh&&(Jh=e.parent_)}var Ej=e=>Jh=WX(Jh,e);function YX(e){const t=e[Fr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Aj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Fr].modified_&&(fw(t),da(4)),xa(e)&&(e=Oj(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Fr].base_,e,t)}else e=Oj(t,n);return KX(t,e,!0),fw(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nk?e:void 0}function Oj(e,t){if(x0(t))return t;const n=t[Fr];if(!n)return uC(t,e.handledSet_,e);if(!_0(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);lk(n,e)}return n.copy_}function KX(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lC(t,n)}function ok(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var _0=(e,t)=>e.scope_===t,ZX=[];function sk(e,t,n,r){const i=Do(e),o=e.type_;if(r!==void 0&&lw(i,r,o)===t){Kv(i,r,n,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Om(i,(f,h)=>{if(Wo(h)){const m=u.get(h)||[];m.push(f),u.set(h,m)}})}const l=e.draftLocations_.get(t)??ZX;for(const u of l)Kv(i,u,n,o)}function XX(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!_0(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const l=sC(o);sk(e,o.draft_??o,l,n),lk(o,i)})}function lk(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}ok(e)}}function QX(e,t,n){const{scope_:r}=e;if(Wo(n)){const i=n[Fr];_0(i,r)&&i.callbacks_.push(function(){dv(e);const l=sC(i);sk(e,n,l,t)})}else xa(n)&&e.callbacks_.push(function(){const o=Do(e);lw(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&uC(lw(e.copy_,t,e.type_),r.handledSet_,r)})}function uC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Wo(e)||t.has(e)||!xa(e)||x0(e)||(t.add(e),Om(e,(r,i)=>{if(Wo(i)){const o=i[Fr];if(_0(o,n)){const l=sC(o);Kv(e,r,l,e.type_),ok(o)}}else xa(i)&&uC(i,t,n)})),e}function JX(e,t){const n=v0(e),r={type_:n?1:0,scope_:t?t.scope_:ak(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=cC;n&&(i=[r],o=em);const{revoke:l,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=l,[u,r]}var cC={get(e,t){if(t===Fr)return e;const n=Do(e);if(!Sj(n,t,e.type_))return eQ(e,n,t);const r=n[t];if(e.finalized_||!xa(r))return r;if(r===Hx(e.base_,t)){dv(e);const i=e.type_===1?+t:t,o=mw(e.scope_,r,e,i);return e.copy_[i]=o}return r},has(e,t){return t in Do(e)},ownKeys(e){return Reflect.ownKeys(Do(e))},set(e,t,n){const r=uk(Do(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Hx(Do(e),t),o=i?.[Fr];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(HX(n,i)&&(n!==void 0||Sj(e.base_,t,e.type_)))return!0;dv(e),hw(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),QX(e,t,n)),!0},deleteProperty(e,t){return dv(e),Hx(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),hw(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Do(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[fv]:!0,[sw]:e.type_!==1||t!=="length",[Yv]:r[Yv],[Qh]:n[t]}},defineProperty(){da(11)},getPrototypeOf(e){return Ef(e.base_)},setPrototypeOf(){da(12)}},em={};Om(cC,(e,t)=>{em[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}});em.deleteProperty=function(e,t){return em.set.call(this,e,t,void 0)};em.set=function(e,t,n){return cC.set.call(this,e[0],t,n,e[0])};function Hx(e,t){const n=e[Fr];return(n?Do(n):e)[t]}function eQ(e,t,n){const r=uk(t,n);return r?Qh in r?r[Qh]:r.get?.call(e.draft_):void 0}function uk(e,t){if(!(t in e))return;let n=Ef(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ef(n)}}function hw(e){e.modified_||(e.modified_=!0,e.parent_&&hw(e.parent_))}function dv(e){e.copy_||(e.assigned_=new Map,e.copy_=uw(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tQ=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(cf(n)&&!cf(r)){const l=r;r=n;const u=this;return function(h=l,...m){return u.produce(h,p=>r.call(this,p,...m))}}cf(r)||da(6),i!==void 0&&!cf(i)&&da(7);let o;if(xa(n)){const l=Ej(this),u=mw(l,n,void 0);let f=!0;try{o=r(u),f=!1}finally{f?fw(l):dw(l)}return Cj(l,i),Aj(o,l)}else if(!n||!oC(n)){if(o=r(n),o===void 0&&(o=n),o===nk&&(o=void 0),this.autoFreeze_&&lC(o,!0),i){const l=[],u=[];Af(cw).generateReplacementPatches_(n,o,{patches_:l,inversePatches_:u}),i(l,u)}return o}else da(1,n)},this.produceWithPatches=(n,r)=>{if(cf(n))return(u,...f)=>this.produceWithPatches(u,h=>n(h,...f));let i,o;return[this.produce(n,r,(u,f)=>{i=u,o=f}),i,o]},Vx(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Vx(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Vx(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){xa(t)||da(8),Wo(t)&&(t=ga(t));const n=Ej(this),r=mw(n,t,void 0);return r[Fr].isManual_=!0,dw(n),r}finishDraft(t,n){const r=t&&t[Fr];(!r||!r.isManual_)&&da(9);const{scope_:i}=r;return Cj(i,n),Aj(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const i=Af(cw).applyPatches_;return Wo(t)?i(t,n):this.produce(t,o=>i(o,n))}};function mw(e,t,n,r){const[i,o]=y0(t)?Af(Zv).proxyMap_(t,n):b0(t)?Af(Zv).proxySet_(t,n):JX(t,n);return(n?.scope_??ak()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?XX(n,o,r):o.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function ga(e){return Wo(e)||da(10,e),ck(e)}function ck(e){if(!xa(e)||x0(e))return e;const t=e[Fr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=uw(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=uw(e,!0);return Om(n,(i,o)=>{Kv(n,i,ck(o))},r),t&&(t.finalized_=!1),n}var nQ=new tQ,fk=nQ.produce;function rQ(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function iQ(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function aQ(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Tj=e=>Array.isArray(e)?e:[e];function oQ(e){const t=Array.isArray(e[0])?e[0]:e;return aQ(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function sQ(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Rg(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function fQ(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,l=0,u,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),rQ(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...n,...f},{memoize:p,memoizeOptions:b=[],argsMemoize:_=dk,argsMemoizeOptions:w=[]}=m,S=Tj(b),A=Tj(w),T=oQ(i),P=p(function(){return o++,h.apply(null,arguments)},...S),N=_(function(){l++;const $=sQ(T,arguments);return u=P.apply(null,$),u},...A);return Object.assign(N,{resultFunc:h,memoizedResultFunc:P,dependencies:T,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:_})};return Object.assign(r,{withTypes:()=>r}),r}var _e=fQ(dk),dQ=Object.assign((e,t=_e)=>{iQ(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((l,u,f)=>(l[n[f]]=u,l),{}))},{withTypes:()=>dQ});function hk(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var hQ=hk(),mQ=hk,pQ=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gv:Gv.apply(null,arguments)},gQ=e=>e&&typeof e.match=="function";function sn(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Ei(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>tk(r)&&r.type===e,n}var mk=class Th extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Th.prototype)}static get[Symbol.species](){return Th}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Th(...t[0].concat(this)):new Th(...t.concat(this))}};function Mj(e){return xa(e)?fk(e,()=>{}):e}function Dg(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function vQ(e){return typeof e=="boolean"}var yQ=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new mk;return n&&(vQ(n)?l.push(hQ):l.push(mQ(n.extraArgument))),l},pk="RTK_autoBatch",dn=()=>e=>({payload:e,meta:{[pk]:!0}}),Pj=e=>t=>{setTimeout(t,e)},gk=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,l=!1;const u=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Pj(10):e.type==="callback"?e.queueNotification:Pj(e.timeout),h=()=>{l=!1,o&&(o=!1,u.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const p=()=>i&&m(),b=r.subscribe(p);return u.add(m),()=>{b(),u.delete(m)}},dispatch(m){try{return i=!m?.meta?.[pk],o=!i,o&&(l||(l=!0,f(h))),r.dispatch(m)}finally{i=!0}}})},bQ=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new mk(e);return r&&i.push(gk(typeof r=="object"?r:void 0)),i};function fC(e){const t=yQ(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:l=void 0,enhancers:u=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(aC(n))f=p0(n);else throw new Error(Ei(1));let h;typeof r=="function"?h=r(t):h=t();let m=Gv;i&&(m=pQ({trace:!1,...typeof i=="object"&&i}));const p=FX(...h),b=bQ(p);let _=typeof u=="function"?u(b):b();const w=m(..._);return ek(f,l,w)}function vk(e){const t={},n=[];let r;const i={addCase(o,l){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Ei(28));if(u in t)throw new Error(Ei(29));return t[u]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&n.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return n.push({matcher:o,reducer:l}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function xQ(e){return typeof e=="function"}function _Q(e,t){let[n,r,i]=vk(t),o;if(xQ(e))o=()=>Mj(e());else{const u=Mj(e);o=()=>u}function l(u=o(),f){let h=[n[f.type],...r.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,p)=>{if(p)if(Wo(m)){const _=p(m,f);return _===void 0?m:_}else{if(xa(m))return fk(m,b=>p(b,f));{const b=p(m,f);if(b===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return m},u)}return l.getInitialState=o,l}var wQ=(e,t)=>gQ(e)?e.match(t):e(t);function SQ(...e){return t=>e.some(n=>wQ(n,t))}var CQ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",yk=(e=21)=>{let t="",n=e;for(;n--;)t+=CQ[Math.random()*64|0];return t},EQ=["name","message","stack","code"],qx=class{constructor(e,t){this.payload=e,this.meta=t}_type},Nj=class{constructor(e,t){this.payload=e,this.meta=t}_type},AQ=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of EQ)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Lj="External signal was aborted",bk=(()=>{function e(t,n,r){const i=sn(t+"/fulfilled",(f,h,m,p)=>({payload:f,meta:{...p||{},arg:m,requestId:h,requestStatus:"fulfilled"}})),o=sn(t+"/pending",(f,h,m)=>({payload:void 0,meta:{...m||{},arg:h,requestId:f,requestStatus:"pending"}})),l=sn(t+"/rejected",(f,h,m,p,b)=>({payload:p,error:(r&&r.serializeError||AQ)(f||"Rejected"),meta:{...b||{},arg:m,requestId:h,rejectedWithValue:!!p,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function u(f,{signal:h}={}){return(m,p,b)=>{const _=r?.idGenerator?r.idGenerator(f):yk(),w=new AbortController;let S,A;function T(N){A=N,w.abort()}h&&(h.aborted?T(Lj):h.addEventListener("abort",()=>T(Lj),{once:!0}));const P=(async function(){let N;try{let $=r?.condition?.(f,{getState:p,extra:b});if(TQ($)&&($=await $),$===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const G=new Promise((Z,ee)=>{S=()=>{ee({name:"AbortError",message:A||"Aborted"})},w.signal.addEventListener("abort",S,{once:!0})});m(o(_,f,r?.getPendingMeta?.({requestId:_,arg:f},{getState:p,extra:b}))),N=await Promise.race([G,Promise.resolve(n(f,{dispatch:m,getState:p,extra:b,requestId:_,signal:w.signal,abort:T,rejectWithValue:(Z,ee)=>new qx(Z,ee),fulfillWithValue:(Z,ee)=>new Nj(Z,ee)})).then(Z=>{if(Z instanceof qx)throw Z;return Z instanceof Nj?i(Z.payload,_,f,Z.meta):i(Z,_,f)})])}catch($){N=$ instanceof qx?l(null,_,f,$.payload,$.meta):l($,_,f)}finally{S&&w.signal.removeEventListener("abort",S)}return r&&!r.dispatchConditionRejection&&l.match(N)&&N.meta.condition||m(N),N})();return Object.assign(P,{abort:T,requestId:_,arg:f,unwrap(){return P.then(OQ)}})}}return Object.assign(u,{pending:o,rejected:l,fulfilled:i,settled:SQ(l,i),typePrefix:t})}return e.withTypes=()=>e,e})();function OQ(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function TQ(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var jQ=Symbol.for("rtk-slice-createasyncthunk");function MQ(e,t){return`${e}/${t}`}function PQ({creators:e}={}){const t=e?.asyncThunk?.[jQ];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(Ei(11));const l=(typeof r.reducers=="function"?r.reducers(LQ()):r.reducers)||{},u=Object.keys(l),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(N,B){const $=typeof N=="string"?N:N.type;if(!$)throw new Error(Ei(12));if($ in f.sliceCaseReducersByType)throw new Error(Ei(13));return f.sliceCaseReducersByType[$]=B,h},addMatcher(N,B){return f.sliceMatchers.push({matcher:N,reducer:B}),h},exposeAction(N,B){return f.actionCreators[N]=B,h},exposeCaseReducer(N,B){return f.sliceCaseReducersByName[N]=B,h}};u.forEach(N=>{const B=l[N],$={reducerName:N,type:MQ(i,N),createNotation:typeof r.reducers=="function"};DQ(B)?IQ($,B,h,t):RQ($,B,h)});function m(){const[N={},B=[],$=void 0]=typeof r.extraReducers=="function"?vk(r.extraReducers):[r.extraReducers],G={...N,...f.sliceCaseReducersByType};return _Q(r.initialState,Z=>{for(let ee in G)Z.addCase(ee,G[ee]);for(let ee of f.sliceMatchers)Z.addMatcher(ee.matcher,ee.reducer);for(let ee of B)Z.addMatcher(ee.matcher,ee.reducer);$&&Z.addDefaultCase($)})}const p=N=>N,b=new Map,_=new WeakMap;let w;function S(N,B){return w||(w=m()),w(N,B)}function A(){return w||(w=m()),w.getInitialState()}function T(N,B=!1){function $(Z){let ee=Z[N];return typeof ee>"u"&&B&&(ee=Dg(_,$,A)),ee}function G(Z=p){const ee=Dg(b,B,()=>new WeakMap);return Dg(ee,Z,()=>{const le={};for(const[oe,re]of Object.entries(r.selectors??{}))le[oe]=NQ(re,Z,()=>Dg(_,Z,A),B);return le})}return{reducerPath:N,getSelectors:G,get selectors(){return G($)},selectSlice:$}}const P={name:i,reducer:S,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:A,...T(o),injectInto(N,{reducerPath:B,...$}={}){const G=B??o;return N.inject({reducerPath:G,reducer:S},$),{...P,...T(G,!0)}}};return P}}function NQ(e,t,n,r){function i(o,...l){let u=t(o);return typeof u>"u"&&r&&(u=n()),e(u,...l)}return i.unwrapped=e,i}var At=PQ();function LQ(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function RQ({type:e,reducerName:t,createNotation:n},r,i){let o,l;if("reducer"in r){if(n&&!kQ(r))throw new Error(Ei(17));o=r.reducer,l=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?sn(e,l):sn(e))}function DQ(e){return e._reducerDefinitionType==="asyncThunk"}function kQ(e){return e._reducerDefinitionType==="reducerWithPrepare"}function IQ({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Ei(18));const{payloadCreator:o,fulfilled:l,pending:u,rejected:f,settled:h,options:m}=n,p=i(e,o,m);r.exposeAction(t,p),l&&r.addCase(p.fulfilled,l),u&&r.addCase(p.pending,u),f&&r.addCase(p.rejected,f),h&&r.addMatcher(p.settled,h),r.exposeCaseReducer(t,{fulfilled:l||kg,pending:u||kg,rejected:f||kg,settled:h||kg})}function kg(){}var zQ="task",xk="listener",_k="completed",dC="cancelled",BQ=`task-${dC}`,UQ=`task-${_k}`,pw=`${xk}-${dC}`,$Q=`${xk}-${_k}`,w0=class{constructor(e){this.code=e,this.message=`${zQ} ${dC} (reason: ${e})`}name="TaskAbortError";message},hC=(e,t)=>{if(typeof e!="function")throw new TypeError(Ei(32))},Xv=()=>{},wk=(e,t=Xv)=>(e.catch(t),e),Sk=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Nu=e=>{if(e.aborted)throw new w0(e.reason)};function Ck(e,t){let n=Xv;return new Promise((r,i)=>{const o=()=>i(new w0(e.reason));if(e.aborted){o();return}n=Sk(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Xv})}var FQ=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof w0?"cancelled":"rejected",error:n}}finally{t?.()}},Qv=e=>t=>wk(Ck(e,t).then(n=>(Nu(e),n))),Ek=e=>{const t=Qv(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:yf}=Object,Rj={},S0="listenerMiddleware",VQ=(e,t)=>{const n=r=>Sk(e,()=>r.abort(e.reason));return(r,i)=>{hC(r);const o=new AbortController;n(o);const l=FQ(async()=>{Nu(e),Nu(o.signal);const u=await r({pause:Qv(o.signal),delay:Ek(o.signal),signal:o.signal});return Nu(o.signal),u},()=>o.abort(UQ));return i?.autoJoin&&t.push(l.catch(Xv)),{result:Qv(e)(l),cancel(){o.abort(BQ)}}}},HQ=(e,t)=>{const n=async(r,i)=>{Nu(t);let o=()=>{};const u=[new Promise((f,h)=>{let m=e({predicate:r,effect:(p,b)=>{b.unsubscribe(),f([p,b.getState(),b.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&u.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await Ck(t,Promise.race(u));return Nu(t),f}finally{o()}};return(r,i)=>wk(n(r,i))},Ak=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=sn(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Ei(21));return hC(o),{predicate:i,type:t,effect:o}},Ok=yf(e=>{const{type:t,predicate:n,effect:r}=Ak(e);return{id:yk(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ei(22))}}},{withTypes:()=>Ok}),Dj=(e,t)=>{const{type:n,effect:r,predicate:i}=Ak(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},gw=e=>{e.pending.forEach(t=>{t.abort(pw)})},qQ=(e,t)=>()=>{for(const n of t.keys())gw(n);e.clear()},kj=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},Tk=yf(sn(`${S0}/add`),{withTypes:()=>Tk}),GQ=sn(`${S0}/removeAll`),jk=yf(sn(`${S0}/remove`),{withTypes:()=>jk}),WQ=(...e)=>{console.error(`${S0}/error`,...e)},jm=(e={})=>{const t=new Map,n=new Map,r=_=>{const w=n.get(_)??0;n.set(_,w+1)},i=_=>{const w=n.get(_)??1;w===1?n.delete(_):n.set(_,w-1)},{extra:o,onError:l=WQ}=e;hC(l);const u=_=>(_.unsubscribe=()=>t.delete(_.id),t.set(_.id,_),w=>{_.unsubscribe(),w?.cancelActive&&gw(_)}),f=_=>{const w=Dj(t,_)??Ok(_);return u(w)};yf(f,{withTypes:()=>f});const h=_=>{const w=Dj(t,_);return w&&(w.unsubscribe(),_.cancelActive&&gw(w)),!!w};yf(h,{withTypes:()=>h});const m=async(_,w,S,A)=>{const T=new AbortController,P=HQ(f,T.signal),N=[];try{_.pending.add(T),r(_),await Promise.resolve(_.effect(w,yf({},S,{getOriginalState:A,condition:(B,$)=>P(B,$).then(Boolean),take:P,delay:Ek(T.signal),pause:Qv(T.signal),extra:o,signal:T.signal,fork:VQ(T.signal,N),unsubscribe:_.unsubscribe,subscribe:()=>{t.set(_.id,_)},cancelActiveListeners:()=>{_.pending.forEach((B,$,G)=>{B!==T&&(B.abort(pw),G.delete(B))})},cancel:()=>{T.abort(pw),_.pending.delete(T)},throwIfCancelled:()=>{Nu(T.signal)}})))}catch(B){B instanceof w0||kj(l,B,{raisedBy:"effect"})}finally{await Promise.all(N),T.abort($Q),i(_),_.pending.delete(T)}},p=qQ(t,n);return{middleware:_=>w=>S=>{if(!tk(S))return w(S);if(Tk.match(S))return f(S.payload);if(GQ.match(S)){p();return}if(jk.match(S))return h(S.payload);let A=_.getState();const T=()=>{if(A===Rj)throw new Error(Ei(23));return A};let P;try{if(P=w(S),t.size>0){const N=_.getState(),B=Array.from(t.values());for(const $ of B){let G=!1;try{G=$.predicate(S,N,A)}catch(Z){G=!1,kj(l,Z,{raisedBy:"predicate"})}G&&m($,S,_,T)}}}finally{A=Rj}return P},startListening:f,stopListening:h,clearListeners:p}};function Ei(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Mk=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),Pk=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),Gx=e=>Object.prototype.toString.call(e)==="[object Object]",Nk=(e,t)=>{const n={};return((...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o})},qf=(e,t)=>{const n={...e};return!Gx(e)||!Gx(t)||Object.keys(t).forEach(r=>{Gx(t[r])?n[r]=r in e&&e[r]!==void 0?qf(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},Lk=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),YQ=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i{const n=[];for(let r=0;rObject.fromEntries(e.map((n,r)=>[n,t[r]])),mC=x.createContext(null),KQ=mC.Provider,ZQ=e=>{const t=x.useContext(mC);if(!t)throw new Error(`You cannot use "${e}" outside of a ContainerProvider`);return t},Rk=(...e)=>{const t=ZQ("useDependencies");return e.map(n=>{const r=t[n];if(!r)throw new Error(`Dependency with name "${n}" not found in container`);return r})};function C0(e,t){function n(r){const i=x.useContext(mC),o={};for(const u of t)u in r||(o[u]=i?.[u]);const l={...o,...r};return v.jsx(e,{...l})}return n}var Wx={},Ig={exports:{}},zj;function XQ(){return zj||(zj=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var h=[],m=0;m, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(S){i.e(S)}finally{i.f()}if(!r.size)return;var w=Array.from(r).join(", ");try{n=e.querySelectorAll(w)}catch{}}return new Promise(function(S,A){var T=Uf(n).filter(NY).map(PY),P=qS.begin("searchPseudoElements");pD(),Promise.all(T).then(function(){P(),ew(),S()}).catch(function(){P(),ew(),A()})})}}var DY={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=WT,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?an:r;Xe.searchPseudoElements&&WT(i)}}},YT=!1,kY={mixout:function(){return{dom:{unwatch:function(){pD(),YT=!0}}}},hooks:function(){return{bootstrap:function(){$T(K_("mutationObserverCallbacks",{}))},noAuto:function(){hY()},watch:function(n){var r=n.observeMutationsRoot;YT?ew():$T(K_("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},KT=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),l=o[0],u=o.slice(1).join("-");if(l&&u==="h")return r.flipX=!0,r;if(l&&u==="v")return r.flipY=!0,r;if(u=parseFloat(u),isNaN(u))return r;switch(l){case"grow":r.size=r.size+u;break;case"shrink":r.size=r.size-u;break;case"left":r.x=r.x-u;break;case"right":r.x=r.x+u;break;case"up":r.y=r.y-u;break;case"down":r.y=r.y+u;break;case"rotate":r.rotate=r.rotate+u;break}return r},n)},IY={mixout:function(){return{parse:{transform:function(n){return KT(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=KT(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,l=n.iconWidth,u={transform:"translate(".concat(o/2," 256)")},f="translate(".concat(i.x*32,", ").concat(i.y*32,") "),h="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),m="rotate(".concat(i.rotate," 0 0)"),p={transform:"".concat(f," ").concat(h," ").concat(m)},b={transform:"translate(".concat(l/2*-1," -256)")},_={outer:u,inner:p,path:b};return{tag:"g",attributes:Ie({},_.outer),children:[{tag:"g",attributes:Ie({},_.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Ie(Ie({},r.icon.attributes),_.path)}]}]}}}},kx={x:0,y:0,width:"100%",height:"100%"};function ZT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function zY(e){return e.tag==="g"?e.children:[e]}var BY={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?o0(i.split(" ").map(function(l){return l.trim()})):cD();return o.prefix||(o.prefix=gl()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,l=n.mask,u=n.maskId,f=n.transform,h=o.width,m=o.icon,p=l.width,b=l.icon,_=MW({transform:f,containerWidth:p,iconWidth:h}),w={tag:"rect",attributes:Ie(Ie({},kx),{},{fill:"white"})},S=m.children?{children:m.children.map(ZT)}:{},A={tag:"g",attributes:Ie({},_.inner),children:[ZT(Ie({tag:m.tag,attributes:Ie(Ie({},m.attributes),_.path)},S))]},T={tag:"g",attributes:Ie({},_.outer),children:[A]},P="mask-".concat(u||MT()),N="clip-".concat(u||MT()),B={tag:"mask",attributes:Ie(Ie({},kx),{},{id:P,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[w,T]},$={tag:"defs",children:[{tag:"clipPath",attributes:{id:N},children:zY(b)},B]};return r.push($,{tag:"rect",attributes:Ie({fill:"currentColor","clip-path":"url(#".concat(N,")"),mask:"url(#".concat(P,")")},kx)}),{children:r,attributes:i}}}},UY={provides:function(t){var n=!1;pl.matchMedia&&(n=pl.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Ie(Ie({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var l=Ie(Ie({},o),{},{attributeName:"opacity"}),u={tag:"circle",attributes:Ie(Ie({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||u.children.push({tag:"animate",attributes:Ie(Ie({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Ie(Ie({},l),{},{values:"1;0;1;1;0;1;"})}),r.push(u),r.push({tag:"path",attributes:Ie(Ie({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Ie(Ie({},l),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Ie(Ie({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Ie(Ie({},l),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},$Y={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},FY=[LW,SY,CY,EY,AY,DY,kY,IY,BY,UY,$Y];KW(FY,{mixoutsTo:Pi});Pi.noAuto;var Wh=Pi.config;Pi.library;Pi.dom;var yD=Pi.parse;Pi.findIconDefinition;Pi.toHtml;var VY=Pi.icon;Pi.layer;Pi.text;Pi.counter;function HY(e){return e=e-0,e===e}function bD(e){return HY(e)?e:(e=e.replace(/[_-]+(.)?/g,(t,n)=>n?n.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function qY(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ef=new Map,GY=1e3;function WY(e){if(ef.has(e))return ef.get(e);const t={};let n=0;const r=e.length;for(;n0){const f=l.slice(0,u).trim(),h=l.slice(u+1).trim();if(f&&h){const m=bD(f);t[m.startsWith("webkit")?qY(m):m]=h}}}n=o+1}if(ef.size===GY){const i=ef.keys().next().value;i&&ef.delete(i)}return ef.set(e,t),t}function xD(e,t,n={}){if(typeof t=="string")return t;const r=(t.children||[]).map(m=>xD(e,m)),i=t.attributes||{},o={};for(const[m,p]of Object.entries(i))switch(!0){case m==="class":{o.className=p;break}case m==="style":{o.style=WY(String(p));break}case m.startsWith("aria-"):case m.startsWith("data-"):{o[m.toLowerCase()]=p;break}default:o[bD(m)]=p}const{style:l,role:u,"aria-label":f,...h}=n;return l&&(o.style=o.style?{...o.style,...l}:l),u&&(o.role=u),f&&(o["aria-label"]=f,o["aria-hidden"]="false"),e(t.tag,{...o,...h},...r)}var YY=xD.bind(null,wf.createElement),XT=(e,t)=>{const n=x.useId();return e||(t?n:void 0)},KY=class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t=typeof process<"u"&&!1}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}},ZY="searchPseudoElementsFullScan"in Wh?"7.0.0":"6.0.0",XY=Number.parseInt(ZY)>=7,kh="fa",Lo={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},QY={left:"fa-pull-left",right:"fa-pull-right"},JY={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},eK={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Ro={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function tK(e){const t=Wh.cssPrefix||Wh.familyPrefix||kh;return t===kh?e:e.replace(new RegExp(String.raw`(?<=^|\s)${kh}-`,"g"),`${t}-`)}function nK(e){const{beat:t,fade:n,beatFade:r,bounce:i,shake:o,spin:l,spinPulse:u,spinReverse:f,pulse:h,fixedWidth:m,inverse:p,border:b,flip:_,size:w,rotation:S,pull:A,swapOpacity:T,rotateBy:P,widthAuto:N,className:B}=e,$=[];return B&&$.push(...B.split(" ")),t&&$.push(Lo.beat),n&&$.push(Lo.fade),r&&$.push(Lo.beatFade),i&&$.push(Lo.bounce),o&&$.push(Lo.shake),l&&$.push(Lo.spin),f&&$.push(Lo.spinReverse),u&&$.push(Lo.spinPulse),h&&$.push(Lo.pulse),m&&$.push(Ro.fixedWidth),p&&$.push(Ro.inverse),b&&$.push(Ro.border),_===!0&&$.push(Ro.flip),(_==="horizontal"||_==="both")&&$.push(Ro.flipHorizontal),(_==="vertical"||_==="both")&&$.push(Ro.flipVertical),w!=null&&$.push(eK[w]),S!=null&&S!==0&&$.push(JY[S]),A!=null&&$.push(QY[A]),T&&$.push(Ro.swapOpacity),XY?(P&&$.push(Ro.rotateBy),N&&$.push(Ro.widthAuto),(Wh.cssPrefix||Wh.familyPrefix||kh)===kh?$:$.map(tK)):$}var rK=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function QT(e){if(e)return rK(e)?e:yD.icon(e)}function iK(e){return Object.keys(e)}var JT=new KY("FontAwesomeIcon"),_D={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},aK=new Set(Object.keys(_D)),De=wf.forwardRef((e,t)=>{const n={..._D,...e},{icon:r,mask:i,symbol:o,title:l,titleId:u,maskId:f,transform:h}=n,m=XT(f,!!i),p=XT(u,!!l),b=QT(r);if(!b)return JT.error("Icon lookup is undefined",r),null;const _=nK(n),w=typeof h=="string"?yD.transform(h):h,S=QT(i),A=VY(b,{..._.length>0&&{classes:_},...w&&{transform:w},...S&&{mask:S},symbol:o,title:l,titleId:p,maskId:m});if(!A)return JT.error("Could not find icon",b),null;const{abstract:T}=A,P={ref:t};for(const N of iK(n))aK.has(N)||(P[N]=n[N]);return YY(T[0],P)});De.displayName="FontAwesomeIcon";function l0(){return typeof window<"u"}function $f(e){return wD(e)?(e.nodeName||"").toLowerCase():"#document"}function Si(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ns(e){var t;return(t=(wD(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wD(e){return l0()?e instanceof Node||e instanceof Si(e).Node:!1}function _r(e){return l0()?e instanceof Element||e instanceof Si(e).Element:!1}function Ai(e){return l0()?e instanceof HTMLElement||e instanceof Si(e).HTMLElement:!1}function nw(e){return!l0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Si(e).ShadowRoot}const oK=new Set(["inline","contents"]);function Sm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ba(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!oK.has(i)}const sK=new Set(["table","td","th"]);function lK(e){return sK.has($f(e))}const uK=[":popover-open",":modal"];function u0(e){return uK.some(t=>{try{return e.matches(t)}catch{return!1}})}const cK=["transform","translate","scale","rotate","perspective"],fK=["transform","translate","scale","rotate","perspective","filter"],dK=["paint","layout","strict","content"];function WS(e){const t=YS(),n=_r(e)?ba(e):e;return cK.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fK.some(r=>(n.willChange||"").includes(r))||dK.some(r=>(n.contain||"").includes(r))}function hK(e){let t=yl(e);for(;Ai(t)&&!Cf(t);){if(WS(t))return t;if(u0(t))return null;t=yl(t)}return null}function YS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const mK=new Set(["html","body","#document"]);function Cf(e){return mK.has($f(e))}function ba(e){return Si(e).getComputedStyle(e)}function c0(e){return _r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yl(e){if($f(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nw(e)&&e.host||ns(e);return nw(t)?t.host:t}function SD(e){const t=yl(e);return Cf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ai(t)&&Sm(t)?t:SD(t)}function CD(e,t,n){var r;t===void 0&&(t=[]);const i=SD(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Si(i);return o?(rw(l),t.concat(l,l.visualViewport||[],Sm(i)?i:[],[])):t.concat(i,CD(i,[]))}function rw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const pK=["top","right","bottom","left"],ej=["start","end"],tj=pK.reduce((e,t)=>e.concat(t,t+"-"+ej[0],t+"-"+ej[1]),[]),Yh=Math.min,gf=Math.max,Bv=Math.round,Ka=e=>({x:e,y:e}),gK={left:"right",right:"left",bottom:"top",top:"bottom"},vK={start:"end",end:"start"};function yK(e,t,n){return gf(e,Yh(t,n))}function Cm(e,t){return typeof e=="function"?e(t):e}function bl(e){return e.split("-")[0]}function Za(e){return e.split("-")[1]}function bK(e){return e==="x"?"y":"x"}function KS(e){return e==="y"?"height":"width"}const xK=new Set(["top","bottom"]);function Ou(e){return xK.has(bl(e))?"y":"x"}function ZS(e){return bK(Ou(e))}function ED(e,t,n){n===void 0&&(n=!1);const r=Za(e),i=ZS(e),o=KS(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=$v(l)),[l,$v(l)]}function _K(e){const t=$v(e);return[Uv(e),t,Uv(t)]}function Uv(e){return e.replace(/start|end/g,t=>vK[t])}const nj=["left","right"],rj=["right","left"],wK=["top","bottom"],SK=["bottom","top"];function CK(e,t,n){switch(e){case"top":case"bottom":return n?t?rj:nj:t?nj:rj;case"left":case"right":return t?wK:SK;default:return[]}}function EK(e,t,n,r){const i=Za(e);let o=CK(bl(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Uv)))),o}function $v(e){return e.replace(/left|right|bottom|top/g,t=>gK[t])}function AK(e){return{top:0,right:0,bottom:0,left:0,...e}}function AD(e){return typeof e!="number"?AK(e):{top:e,right:e,bottom:e,left:e}}function Fv(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const OK="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function TK(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&nw(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ng(e){return e?.ownerDocument||document}function jK(e){return Ai(e)&&e.matches(OK)}function Kh(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var MK=typeof document<"u",PK=function(){},xl=MK?x.useLayoutEffect:PK;const NK={...bS};function ol(e){const t=x.useRef(e);return xl(()=>{t.current=e}),t}const LK=NK.useInsertionEffect,RK=LK||(e=>e());function Ah(e){const t=x.useRef(()=>{});return RK(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:p}=ij(h,r,f),b=r,_={},w=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:u,middlewareData:f}=t,{element:h,padding:m=0}=Cm(e,t)||{};if(h==null)return{};const p=AD(m),b={x:n,y:r},_=ZS(i),w=KS(_),S=await l.getDimensions(h),A=_==="y",T=A?"top":"left",P=A?"bottom":"right",N=A?"clientHeight":"clientWidth",B=o.reference[w]+o.reference[_]-b[_]-o.floating[w],$=b[_]-o.reference[_],G=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let Z=G?G[N]:0;(!Z||!await(l.isElement==null?void 0:l.isElement(G)))&&(Z=u.floating[N]||o.floating[w]);const ee=B/2-$/2,le=Z/2-S[w]/2-1,oe=Yh(p[T],le),re=Yh(p[P],le),ne=oe,be=Z-S[w]-re,ie=Z/2-S[w]/2+ee,ue=yK(ne,ie,be),Y=!f.arrow&&Za(i)!=null&&ie!==ue&&o.reference[w]/2-(ieZa(i)===e),...n.filter(i=>Za(i)!==e)]:n.filter(i=>bl(i)===i)).filter(i=>e?Za(i)===e||(t?Uv(i)!==i:!1):!0)}const zK=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:o,middlewareData:l,placement:u,platform:f,elements:h}=t,{crossAxis:m=!1,alignment:p,allowedPlacements:b=tj,autoAlignment:_=!0,...w}=Cm(e,t),S=p!==void 0||b===tj?IK(p||null,_,b):b,A=await OD(t,w),T=((n=l.autoPlacement)==null?void 0:n.index)||0,P=S[T];if(P==null)return{};const N=ED(P,o,await(f.isRTL==null?void 0:f.isRTL(h.floating)));if(u!==P)return{reset:{placement:S[0]}};const B=[A[bl(P)],A[N[0]],A[N[1]]],$=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:P,overflows:B}],G=S[T+1];if(G)return{data:{index:T+1,overflows:$},reset:{placement:G}};const Z=$.map(oe=>{const re=Za(oe.placement);return[oe.placement,re&&m?oe.overflows.slice(0,2).reduce((ne,be)=>ne+be,0):oe.overflows[0],oe.overflows]}).sort((oe,re)=>oe[1]-re[1]),le=((i=Z.filter(oe=>oe[2].slice(0,Za(oe[0])?2:3).every(re=>re<=0))[0])==null?void 0:i[0])||Z[0][0];return le!==u?{data:{index:T+1,overflows:$},reset:{placement:le}}:{}}}},BK=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...A}=Cm(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const T=bl(i),P=Ou(u),N=bl(u)===u,B=await(f.isRTL==null?void 0:f.isRTL(h.floating)),$=b||(N||!S?[$v(u)]:_K(u)),G=w!=="none";!b&&G&&$.push(...EK(u,S,w,B));const Z=[u,...$],ee=await OD(t,A),le=[];let oe=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&le.push(ee[T]),p){const ie=ED(i,l,B);le.push(ee[ie[0]],ee[ie[1]])}if(oe=[...oe,{placement:i,overflows:le}],!le.every(ie=>ie<=0)){var re,ne;const ie=(((re=o.flip)==null?void 0:re.index)||0)+1,ue=Z[ie];if(ue&&(!(p==="alignment"?P!==Ou(ue):!1)||oe.every(I=>Ou(I.placement)===P?I.overflows[0]>0:!0)))return{data:{index:ie,overflows:oe},reset:{placement:ue}};let Y=(ne=oe.filter(z=>z.overflows[0]<=0).sort((z,I)=>z.overflows[1]-I.overflows[1])[0])==null?void 0:ne.placement;if(!Y)switch(_){case"bestFit":{var be;const z=(be=oe.filter(I=>{if(G){const H=Ou(I.placement);return H===P||H==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(H=>H>0).reduce((H,k)=>H+k,0)]).sort((I,H)=>I[1]-H[1])[0])==null?void 0:be[0];z&&(Y=z);break}case"initialPlacement":Y=u;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}},UK=new Set(["left","top"]);async function $K(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=bl(n),u=Za(n),f=Ou(n)==="y",h=UK.has(l)?-1:1,m=o&&f?-1:1,p=Cm(t,e);let{mainAxis:b,crossAxis:_,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(_=u==="end"?w*-1:w),f?{x:_*m,y:b*h}:{x:b*h,y:_*m}}const FK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:u}=t,f=await $K(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}};function TD(e){const t=ba(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ai(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=Bv(n)!==o||Bv(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function jD(e){return _r(e)?e:e.contextElement}function vf(e){const t=jD(e);if(!Ai(t))return Ka(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=TD(t);let l=(o?Bv(n.width):n.width)/r,u=(o?Bv(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const VK=Ka(0);function MD(e){const t=Si(e);return!YS()||!t.visualViewport?VK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function HK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Si(e)?!1:t}function Zh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=jD(e);let l=Ka(1);t&&(r?_r(r)&&(l=vf(r)):l=vf(e));const u=HK(o,n,r)?MD(o):Ka(0);let f=(i.left+u.x)/l.x,h=(i.top+u.y)/l.y,m=i.width/l.x,p=i.height/l.y;if(o){const b=Si(o),_=r&&_r(r)?Si(r):r;let w=b,S=rw(w);for(;S&&r&&_!==w;){const A=vf(S),T=S.getBoundingClientRect(),P=ba(S),N=T.left+(S.clientLeft+parseFloat(P.paddingLeft))*A.x,B=T.top+(S.clientTop+parseFloat(P.paddingTop))*A.y;f*=A.x,h*=A.y,m*=A.x,p*=A.y,f+=N,h+=B,w=Si(S),S=rw(w)}}return Fv({width:m,height:p,x:f,y:h})}function f0(e,t){const n=c0(e).scrollLeft;return t?t.left+n:Zh(ns(e)).left+n}function PD(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-f0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function qK(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=ns(r),u=t?u0(t.floating):!1;if(r===l||u&&o)return n;let f={scrollLeft:0,scrollTop:0},h=Ka(1);const m=Ka(0),p=Ai(r);if((p||!p&&!o)&&(($f(r)!=="body"||Sm(l))&&(f=c0(r)),Ai(r))){const _=Zh(r);h=vf(r),m.x=_.x+r.clientLeft,m.y=_.y+r.clientTop}const b=l&&!p&&!o?PD(l,f):Ka(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+b.x,y:n.y*h.y-f.scrollTop*h.y+m.y+b.y}}function GK(e){return Array.from(e.getClientRects())}function WK(e){const t=ns(e),n=c0(e),r=e.ownerDocument.body,i=gf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=gf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+f0(e);const u=-n.scrollTop;return ba(r).direction==="rtl"&&(l+=gf(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:u}}const aj=25;function YK(e,t){const n=Si(e),r=ns(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,f=0;if(i){o=i.width,l=i.height;const m=YS();(!m||m&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}const h=f0(r);if(h<=0){const m=r.ownerDocument,p=m.body,b=getComputedStyle(p),_=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-_);w<=aj&&(o-=w)}else h<=aj&&(o+=h);return{width:o,height:l,x:u,y:f}}const KK=new Set(["absolute","fixed"]);function ZK(e,t){const n=Zh(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ai(e)?vf(e):Ka(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,f=i*o.x,h=r*o.y;return{width:l,height:u,x:f,y:h}}function oj(e,t,n){let r;if(t==="viewport")r=YK(e,n);else if(t==="document")r=WK(ns(e));else if(_r(t))r=ZK(t,n);else{const i=MD(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fv(r)}function ND(e,t){const n=yl(e);return n===t||!_r(n)||Cf(n)?!1:ba(n).position==="fixed"||ND(n,t)}function XK(e,t){const n=t.get(e);if(n)return n;let r=CD(e,[]).filter(u=>_r(u)&&$f(u)!=="body"),i=null;const o=ba(e).position==="fixed";let l=o?yl(e):e;for(;_r(l)&&!Cf(l);){const u=ba(l),f=WS(l);!f&&u.position==="fixed"&&(i=null),(o?!f&&!i:!f&&u.position==="static"&&!!i&&KK.has(i.position)||Sm(l)&&!f&&ND(e,l))?r=r.filter(m=>m!==l):i=u,l=yl(l)}return t.set(e,r),r}function QK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?u0(t)?[]:XK(t,this._c):[].concat(n),r],u=l[0],f=l.reduce((h,m)=>{const p=oj(t,m,i);return h.top=gf(p.top,h.top),h.right=Yh(p.right,h.right),h.bottom=Yh(p.bottom,h.bottom),h.left=gf(p.left,h.left),h},oj(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function JK(e){const{width:t,height:n}=TD(e);return{width:t,height:n}}function eZ(e,t,n){const r=Ai(t),i=ns(t),o=n==="fixed",l=Zh(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const f=Ka(0);function h(){f.x=f0(i)}if(r||!r&&!o)if(($f(t)!=="body"||Sm(i))&&(u=c0(t)),r){const _=Zh(t,!0,o,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else i&&h();o&&!r&&i&&h();const m=i&&!r&&!o?PD(i,u):Ka(0),p=l.left+u.scrollLeft-f.x-m.x,b=l.top+u.scrollTop-f.y-m.y;return{x:p,y:b,width:l.width,height:l.height}}function Ix(e){return ba(e).position==="static"}function sj(e,t){if(!Ai(e)||ba(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ns(e)===n&&(n=n.ownerDocument.body),n}function LD(e,t){const n=Si(e);if(u0(e))return n;if(!Ai(e)){let i=yl(e);for(;i&&!Cf(i);){if(_r(i)&&!Ix(i))return i;i=yl(i)}return n}let r=sj(e,t);for(;r&&lK(r)&&Ix(r);)r=sj(r,t);return r&&Cf(r)&&Ix(r)&&!WS(r)?n:r||hK(e)||n}const tZ=async function(e){const t=this.getOffsetParent||LD,n=this.getDimensions,r=await n(e.floating);return{reference:eZ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nZ(e){return ba(e).direction==="rtl"}const rZ={convertOffsetParentRelativeRectToViewportRelativeRect:qK,getDocumentElement:ns,getClippingRect:QK,getOffsetParent:LD,getElementRects:tZ,getClientRects:GK,getDimensions:JK,getScale:vf,isElement:_r,isRTL:nZ},iZ=FK,aZ=zK,oZ=BK,lj=kK,sZ=(e,t,n)=>{const r=new Map,i={platform:rZ,...n},o={...i.platform,_c:r};return DK(e,t,{...i,platform:o})};var lZ=typeof document<"u",uZ=function(){},cv=lZ?x.useLayoutEffect:uZ;function Vv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vv(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Vv(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function RD(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uj(e,t){const n=RD(e);return Math.round(t*n)/n}function zx(e){const t=x.useRef(e);return cv(()=>{t.current=e}),t}function cZ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:f,open:h}=e,[m,p]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,_]=x.useState(r);Vv(b,r)||_(r);const[w,S]=x.useState(null),[A,T]=x.useState(null),P=x.useCallback(I=>{I!==G.current&&(G.current=I,S(I))},[]),N=x.useCallback(I=>{I!==Z.current&&(Z.current=I,T(I))},[]),B=o||w,$=l||A,G=x.useRef(null),Z=x.useRef(null),ee=x.useRef(m),le=f!=null,oe=zx(f),re=zx(i),ne=zx(h),be=x.useCallback(()=>{if(!G.current||!Z.current)return;const I={placement:t,strategy:n,middleware:b};re.current&&(I.platform=re.current),sZ(G.current,Z.current,I).then(H=>{const k={...H,isPositioned:ne.current!==!1};ie.current&&!Vv(ee.current,k)&&(ee.current=k,Ff.flushSync(()=>{p(k)}))})},[b,t,n,re,ne]);cv(()=>{h===!1&&ee.current.isPositioned&&(ee.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[h]);const ie=x.useRef(!1);cv(()=>(ie.current=!0,()=>{ie.current=!1}),[]),cv(()=>{if(B&&(G.current=B),$&&(Z.current=$),B&&$){if(oe.current)return oe.current(B,$,be);be()}},[B,$,be,oe,le]);const ue=x.useMemo(()=>({reference:G,floating:Z,setReference:P,setFloating:N}),[P,N]),Y=x.useMemo(()=>({reference:B,floating:$}),[B,$]),z=x.useMemo(()=>{const I={position:n,left:0,top:0};if(!Y.floating)return I;const H=uj(Y.floating,m.x),k=uj(Y.floating,m.y);return u?{...I,transform:"translate("+H+"px, "+k+"px)",...RD(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:k}},[n,u,Y.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:be,refs:ue,elements:Y,floatingStyles:z}),[m,be,ue,Y,z])}const fZ=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?lj({element:r.current,padding:i}).fn(n):{}:r?lj({element:r,padding:i}).fn(n):{}}}},dZ=(e,t)=>({...iZ(e),options:[e,t]}),hZ=(e,t)=>({...oZ(e),options:[e,t]}),mZ=(e,t)=>({...aZ(e),options:[e,t]}),pZ=(e,t)=>({...fZ(e),options:[e,t]}),gZ="data-floating-ui-focusable",cj="active",fj="selected",vZ={...bS};let dj=!1,yZ=0;const hj=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+yZ++;function bZ(){const[e,t]=x.useState(()=>dj?hj():void 0);return xl(()=>{e==null&&t(hj())},[]),x.useEffect(()=>{dj=!0},[]),e}const xZ=vZ.useId,_Z=xZ||bZ;function wZ(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const SZ=x.createContext(null),CZ=x.createContext(null),DD=()=>{var e;return((e=x.useContext(SZ))==null?void 0:e.id)||null},kD=()=>x.useContext(CZ);function EZ(e){return"data-floating-ui-"+e}function ca(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const mj=EZ("safe-polygon");function Bx(e,t,n){if(n&&!Kh(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Ux(e){return typeof e=="function"?e():e}function AZ(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:u=!0,delay:f=0,handleClose:h=null,mouseOnly:m=!1,restMs:p=0,move:b=!0}=t,_=kD(),w=DD(),S=ol(h),A=ol(f),T=ol(n),P=ol(p),N=x.useRef(),B=x.useRef(-1),$=x.useRef(),G=x.useRef(-1),Z=x.useRef(!0),ee=x.useRef(!1),le=x.useRef(()=>{}),oe=x.useRef(!1),re=Ah(()=>{var z;const I=(z=i.current.openEvent)==null?void 0:z.type;return I?.includes("mouse")&&I!=="mousedown"});x.useEffect(()=>{if(!u)return;function z(I){let{open:H}=I;H||(ca(B),ca(G),Z.current=!0,oe.current=!1)}return o.on("openchange",z),()=>{o.off("openchange",z)}},[u,o]),x.useEffect(()=>{if(!u||!S.current||!n)return;function z(H){re()&&r(!1,H,"hover")}const I=Ng(l.floating).documentElement;return I.addEventListener("mouseleave",z),()=>{I.removeEventListener("mouseleave",z)}},[l.floating,n,r,u,S,re]);const ne=x.useCallback(function(z,I,H){I===void 0&&(I=!0),H===void 0&&(H="hover");const k=Bx(A.current,"close",N.current);k&&!$.current?(ca(B),B.current=window.setTimeout(()=>r(!1,z,H),k)):I&&(ca(B),r(!1,z,H))},[A,r]),be=Ah(()=>{le.current(),$.current=void 0}),ie=Ah(()=>{if(ee.current){const z=Ng(l.floating).body;z.style.pointerEvents="",z.removeAttribute(mj),ee.current=!1}}),ue=Ah(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);x.useEffect(()=>{if(!u)return;function z(q){if(ca(B),Z.current=!1,m&&!Kh(N.current)||Ux(P.current)>0&&!Bx(A.current,"open"))return;const J=Bx(A.current,"open",N.current);J?B.current=window.setTimeout(()=>{T.current||r(!0,q,"hover")},J):n||r(!0,q,"hover")}function I(q){if(ue()){ie();return}le.current();const J=Ng(l.floating);if(ca(G),oe.current=!1,S.current&&i.current.floatingContext){n||ca(B),$.current=S.current({...i.current.floatingContext,tree:_,x:q.clientX,y:q.clientY,onClose(){ie(),be(),ue()||ne(q,!0,"safe-polygon")}});const me=$.current;J.addEventListener("mousemove",me),le.current=()=>{J.removeEventListener("mousemove",me)};return}(N.current!=="touch"||!TK(l.floating,q.relatedTarget))&&ne(q)}function H(q){ue()||i.current.floatingContext&&(S.current==null||S.current({...i.current.floatingContext,tree:_,x:q.clientX,y:q.clientY,onClose(){ie(),be(),ue()||ne(q)}})(q))}function k(){ca(B)}function j(q){ue()||ne(q,!1)}if(_r(l.domReference)){const q=l.domReference,J=l.floating;return n&&q.addEventListener("mouseleave",H),b&&q.addEventListener("mousemove",z,{once:!0}),q.addEventListener("mouseenter",z),q.addEventListener("mouseleave",I),J&&(J.addEventListener("mouseleave",H),J.addEventListener("mouseenter",k),J.addEventListener("mouseleave",j)),()=>{n&&q.removeEventListener("mouseleave",H),b&&q.removeEventListener("mousemove",z),q.removeEventListener("mouseenter",z),q.removeEventListener("mouseleave",I),J&&(J.removeEventListener("mouseleave",H),J.removeEventListener("mouseenter",k),J.removeEventListener("mouseleave",j))}}},[l,u,e,m,b,ne,be,ie,r,n,T,_,A,S,i,ue,P]),xl(()=>{var z;if(u&&n&&(z=S.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&re()){ee.current=!0;const H=l.floating;if(_r(l.domReference)&&H){var I;const k=Ng(l.floating).body;k.setAttribute(mj,"");const j=l.domReference,q=_==null||(I=_.nodesRef.current.find(J=>J.id===w))==null||(I=I.context)==null?void 0:I.elements.floating;return q&&(q.style.pointerEvents=""),k.style.pointerEvents="none",j.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{k.style.pointerEvents="",j.style.pointerEvents="",H.style.pointerEvents=""}}}},[u,n,w,l,_,S,re]),xl(()=>{n||(N.current=void 0,oe.current=!1,be(),ie())},[n,be,ie]),x.useEffect(()=>()=>{be(),ca(B),ca(G),ie()},[u,l.domReference,be,ie]);const Y=x.useMemo(()=>{function z(I){N.current=I.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(I){const{nativeEvent:H}=I;function k(){!Z.current&&!T.current&&r(!0,H,"hover")}m&&!Kh(N.current)||n||Ux(P.current)===0||oe.current&&I.movementX**2+I.movementY**2<2||(ca(G),N.current==="touch"?k():(oe.current=!0,G.current=window.setTimeout(k,Ux(P.current))))}}},[m,r,n,T,P]);return x.useMemo(()=>u?{reference:Y}:{},[u,Y])}function pj(e){return Ai(e.target)&&e.target.tagName==="BUTTON"}function OZ(e){return Ai(e.target)&&e.target.tagName==="A"}function gj(e){return jK(e)}function TZ(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:u="click",toggle:f=!0,ignoreMouse:h=!1,keyboardHandlers:m=!0,stickIfOpen:p=!0}=t,b=x.useRef(),_=x.useRef(!1),w=x.useMemo(()=>({onPointerDown(S){b.current=S.pointerType},onMouseDown(S){const A=b.current;S.button===0&&u!=="click"&&(Kh(A,!0)&&h||(n&&f&&(!(i.current.openEvent&&p)||i.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const A=b.current;if(u==="mousedown"&&b.current){b.current=void 0;return}Kh(A,!0)&&h||(n&&f&&(!(i.current.openEvent&&p)||i.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){b.current=void 0,!(S.defaultPrevented||!m||pj(S))&&(S.key===" "&&!gj(o)&&(S.preventDefault(),_.current=!0),!OZ(S)&&S.key==="Enter"&&r(!(n&&f),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!m||pj(S)||gj(o)||S.key===" "&&_.current&&(_.current=!1,r(!(n&&f),S.nativeEvent,"click"))}}),[i,o,u,h,m,r,n,p,f]);return x.useMemo(()=>l?{reference:w}:{},[l,w])}function jZ(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=_Z(),o=x.useRef({}),[l]=x.useState(()=>wZ()),u=DD()!=null,[f,h]=x.useState(r.reference),m=Ah((_,w,S)=>{o.current.openEvent=_?w:void 0,l.emit("openchange",{open:_,event:w,reason:S,nested:u}),n?.(_,w,S)}),p=x.useMemo(()=>({setPositionReference:h}),[]),b=x.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,r.reference,r.floating]);return x.useMemo(()=>({dataRef:o,open:t,onOpenChange:m,elements:b,events:l,floatingId:i,refs:p}),[t,m,b,l,i,p])}function ID(e){e===void 0&&(e={});const{nodeId:t}=e,n=jZ({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,l]=x.useState(null),[u,f]=x.useState(null),m=i?.domReference||o,p=x.useRef(null),b=kD();xl(()=>{m&&(p.current=m)},[m]);const _=cZ({...e,elements:{...i,...u&&{reference:u}}}),w=x.useCallback(N=>{const B=_r(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),getClientRects:()=>N.getClientRects(),contextElement:N}:N;f(B),_.refs.setReference(B)},[_.refs]),S=x.useCallback(N=>{(_r(N)||N===null)&&(p.current=N,l(N)),(_r(_.refs.reference.current)||_.refs.reference.current===null||N!==null&&!_r(N))&&_.refs.setReference(N)},[_.refs]),A=x.useMemo(()=>({..._.refs,setReference:S,setPositionReference:w,domReference:p}),[_.refs,S,w]),T=x.useMemo(()=>({..._.elements,domReference:m}),[_.elements,m]),P=x.useMemo(()=>({..._,...r,refs:A,elements:T,nodeId:t}),[_,A,T,t,r]);return xl(()=>{r.dataRef.current.floatingContext=P;const N=b?.nodesRef.current.find(B=>B.id===t);N&&(N.context=P)}),x.useMemo(()=>({..._,context:P,refs:A,elements:T}),[_,A,T,P])}function $x(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[cj]:l,[fj]:u,...f}=e;o=f}return{...n==="floating"&&{tabIndex:-1,[gZ]:""},...o,...t.map(l=>{const u=l?l[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((l,u)=>(u&&Object.entries(u).forEach(f=>{let[h,m]=f;if(!(i&&[cj,fj].includes(h)))if(h.indexOf("on")===0){if(r.has(h)||r.set(h,[]),typeof m=="function"){var p;(p=r.get(h))==null||p.push(m),l[h]=function(){for(var b,_=arguments.length,w=new Array(_),S=0;S<_;S++)w[S]=arguments[S];return(b=r.get(h))==null?void 0:b.map(A=>A(...w)).find(A=>A!==void 0)}}}else l[h]=m}),l),{})}}function zD(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),i=x.useCallback(u=>$x(u,e,"reference"),t),o=x.useCallback(u=>$x(u,e,"floating"),n),l=x.useCallback(u=>$x(u,e,"item"),r);return x.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])}const vj=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function tf(e,t){return typeof e=="function"?e(t):e}function MZ(e,t){const[n,r]=x.useState(e);return e&&!n&&r(!0),x.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function PZ(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,l=(typeof i=="number"?i:i.close)||0,[u,f]=x.useState("unmounted"),h=MZ(n,l);return!h&&u==="close"&&f("unmounted"),xl(()=>{if(r){if(n){f("initial");const m=requestAnimationFrame(()=>{Ff.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(m)}}f("close")}},[n,r]),{isMounted:h,status:u}}function NZ(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:o,duration:l=250}=t,u=e.placement,f=u.split("-")[0],h=x.useMemo(()=>({side:f,placement:u}),[f,u]),m=typeof l=="number",p=(m?l:l.open)||0,b=(m?l:l.close)||0,[_,w]=x.useState(()=>({...tf(o,h),...tf(n,h)})),{isMounted:S,status:A}=PZ(e,{duration:l}),T=ol(n),P=ol(r),N=ol(i),B=ol(o);return xl(()=>{const $=tf(T.current,h),G=tf(N.current,h),Z=tf(B.current,h),ee=tf(P.current,h)||Object.keys($).reduce((le,oe)=>(le[oe]="",le),{});if(A==="initial"&&w(le=>({transitionProperty:le.transitionProperty,...Z,...$})),A==="open"&&w({transitionProperty:Object.keys(ee).map(vj).join(","),transitionDuration:p+"ms",...Z,...ee}),A==="close"){const le=G||$;w({transitionProperty:Object.keys(le).map(vj).join(","),transitionDuration:b+"ms",...Z,...le})}},[b,N,T,P,B,p,A,h]),{isMounted:S,styles:_}}var BD={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M288 464L64 464c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l48 0 0-48-48 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-48-48 0 0 48c0 8.8-7.2 16-16 16zM224 304c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-224 0zm-64-16c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224z"]},LZ={prefix:"far",iconName:"image",icon:[448,512,[],"f03e","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm128 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm136 72c8.5 0 16.4 4.5 20.7 11.8l80 136c4.4 7.4 4.4 16.6 .1 24.1S352.6 384 344 384l-240 0c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l17.2 24.6 46.5-79c4.3-7.3 12.2-11.8 20.7-11.8z"]},RZ={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256a208 208 0 1 0 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},DZ={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zm387.3 11.3c6.2-6.2 6.2-16.4 0-22.6l-104-104c-4.6-4.6-11.5-5.9-17.4-3.5S256 145.5 256 152l0 72-104 0c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24l104 0 0 72c0 6.5 3.9 12.3 9.9 14.8s12.9 1.1 17.4-3.5l104-104z"]},kZ=DZ;const IZ=({children:e,summary:t,summaryClasses:n,...r})=>{const i=x.useRef(null),[o,l]=x.useState(!1);return x.useEffect(()=>{const u=i.current,f=()=>l(!!u?.open);return u?.addEventListener("toggle",f),()=>u?.removeEventListener("toggle",f)},[]),v.jsxs("details",{ref:i,...r,children:[v.jsx("summary",{className:Oe("focus-ring px-1 -mx-1 rounded-sm",n),children:t}),o&&v.jsx("div",{className:"mt-3 flex flex-col gap-y-3",children:e})]})},zZ=({className:e,...t})=>v.jsx("div",{className:Oe("px-4 py-3 rounded-t-md","bg-lm-primary dark:bg-dm-primary border-b border-lm-border dark:border-dm-border",e),...t}),BZ=({className:e,...t})=>v.jsx("div",{className:Oe("p-4 bg-lm-primary dark:bg-dm-primary first:rounded-t-md","first:rounded-t-md last:rounded-b-md",e),...t}),UZ=({className:e,...t})=>v.jsx("div",{className:Oe("px-4 py-3 rounded-b-md","bg-lm-primary dark:bg-dm-primary border-t border-lm-border dark:border-dm-border",e),...t}),$Z=({className:e,...t})=>v.jsx("div",{className:Oe("group/card rounded-md shadow-md","border border-lm-border dark:border-dm-border bg-lm-primary dark:bg-dm-primary",e),...t}),on=Object.assign($Z,{Body:BZ,Header:zZ,Footer:UZ}),Ot=({bodyClassName:e,children:t,...n})=>{const{title:r,titleSize:i="md",...o}="title"in n?n:{...n,title:void 0,titleSize:void 0};return v.jsxs(on,{...o,children:[r&&v.jsxs(on.Header,{children:[i==="lg"&&v.jsx("h4",{children:r}),i==="md"&&v.jsx("h5",{children:r}),i==="sm"&&v.jsx("h6",{children:r})]}),v.jsx(on.Body,{className:e,children:t})]})};function FZ({id:e,items:t,onSelectItem:n,onActiveItemChange:r,renderItem:i,className:o,noItemsMessage:l="No items",anchor:u,"aria-label":f="Items",...h}){const[m,p]=x.useState(0),b=x.useCallback(_=>{if(p(_),r){const[w,S]=[...t.entries()][_];r(w,S)}},[t,r]);return x.useEffect(()=>{const _=u?.current;if(!_)return;const w=S=>{["Enter","ArrowUp","ArrowDown"].includes(S.key)&&S.preventDefault(),S.key==="ArrowDown"?b(Math.min(m+1,t.size-1)):S.key==="ArrowUp"?b(Math.max(m-1,0)):S.key==="Enter"&&n([...t.values()][m])};return _.addEventListener("keydown",w),()=>_.removeEventListener("keydown",w)},[m,u,b,t,n]),v.jsxs(on,{id:e,className:Oe("py-1 flex flex-col",o),role:"listbox","aria-orientation":"vertical","aria-label":f,...h,children:[t.size===0&&v.jsx("i",{role:"option","aria-disabled":!0,"aria-selected":!1,"data-testid":"no-items",className:"px-2 py-1",children:l}),[...t.entries()].map(([_,w],S)=>v.jsx("button",{id:`${e}_${_}`,type:"button",role:"option","aria-selected":S===m,className:Oe("px-2 py-1 text-left truncate",{"bg-lm-secondary dark:bg-dm-secondary":S===m}),tabIndex:-1,onClick:()=>n(w),onMouseOver:()=>b(S),children:i(w)},_))]})}const Em=x.createContext(void 0),Vf=x.createContext({responsive:!0,size:"md"}),VZ=({children:e,className:t})=>{const{responsive:n}=x.useContext(Vf);return v.jsx(Em.Provider,{value:{section:"head"},children:v.jsx("thead",{className:Oe({"hidden lg:table-header-group":n},t),children:e})})},HZ=({children:e,className:t})=>{const{responsive:n}=x.useContext(Vf);return v.jsx(Em.Provider,{value:{section:"body"},children:v.jsx("tbody",{className:Oe({"lg:table-row-group flex flex-col gap-y-3":n},t),children:e})})},qZ=({children:e,className:t})=>{const{responsive:n}=x.useContext(Vf);return v.jsx(Em.Provider,{value:{section:"footer"},children:v.jsx("tfoot",{className:Oe({"lg:table-row-group flex flex-col gap-y-3 mt-4":n},t),children:e})})},GZ=({children:e,className:t,...n})=>{const r=x.useContext(Em)?.section==="body",{responsive:i}=x.useContext(Vf);return v.jsx("tr",{className:Oe("group",{"lg:table-row flex flex-col":i,"lg:border-0 border-y-2 border-lm-border dark:border-dm-border":i,"hover:bg-lm-primary dark:hover:bg-dm-primary":r,"group-[&]/card:hover:bg-lm-secondary dark:group-[&]/card:hover:bg-dm-secondary":r},t),...n,children:e})},WZ=({children:e,className:t,columnName:n,type:r,...i})=>{const o=x.useContext(Em),l=r??(o?.section!=="body"?"th":"td"),{responsive:u,size:f}=x.useContext(Vf);return v.jsx(l,{"data-column":u?n:void 0,className:Oe("border-lm-border dark:border-dm-border",{"p-1":f==="sm","p-2":f==="md","p-3":f==="lg","border-b-1":!u,"block lg:table-cell not-last:border-b-1 lg:border-b-1":u,"text-left":l==="th","before:lg:hidden before:content-[attr(data-column)] before:font-bold before:mr-1":u&&l==="td"},t),...i,children:e})},YZ=({header:e,footer:t,children:n,responsive:r=!0,size:i="md",...o})=>v.jsx(Vf.Provider,{value:{responsive:r,size:i},children:v.jsxs("table",{className:"w-full",...o,children:[v.jsx(VZ,{children:e}),v.jsx(HZ,{children:n}),t&&v.jsx(qZ,{children:t})]})}),ze=Object.assign(YZ,{Row:GZ,Cell:WZ}),Ct=({className:e,disabled:t,variant:n="primary",size:r="md",inline:i=!1,solid:o=!1,type:l="button",ref:u,...f})=>{const h="to"in f&&typeof f.to=="string",m=h?Rr:"button",p=h?void 0:l;return v.jsx(m,{ref:u,className:Oe({"inline-flex":i,flex:!i},"gap-2 items-center justify-center","border rounded-md no-underline","transition-colors",{"focus-ring":n==="primary","focus-ring-secondary":n==="secondary","focus-ring-danger":n==="danger"},{"px-1.5 py-1 text-sm":r==="sm","px-3 py-1.5":r==="md","px-4 py-2 text-lg":r==="lg"},{"border-lm-brand dark:border-dm-brand":n==="primary","text-lm-brand dark:text-dm-brand":n==="primary"&&!o,"border-zinc-500":n==="secondary","text-zinc-500":n==="secondary"&&!o,"border-danger":n==="danger","text-danger":n==="danger"&&!o},o&&{"text-white":!0,"bg-lm-brand dark:bg-dm-brand":n==="primary","highlight:bg-lm-brand-dark dark:highlight:bg-dm-brand-dark":n==="primary","highlight:border-lm-brand-dark dark:highlight:border-dm-brand-dark":n==="primary","bg-zinc-500":n==="secondary","highlight:bg-zinc-600 highlight:border-zinc-600":n==="secondary","bg-danger":n==="danger","highlight:bg-danger-dark highlight:border-danger-dark":n==="danger"},!t&&{"highlight:text-white":!o,"highlight:bg-lm-brand dark:highlight:bg-dm-brand":n==="primary","highlight:bg-zinc-500":n==="secondary","highlight:bg-danger":n==="danger"},{"cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:h?void 0:t,"aria-disabled":h?t:void 0,type:p,...f})},UD=({className:e,onChange:t,ref:n,...r})=>{const i=x.useCallback(o=>t?.(o.target.checked,o),[t]);return v.jsx("input",{ref:n,type:"checkbox",className:Oe("appearance-none focus-ring cursor-[inherit]","border-1 border-lm-input-border dark:border-dm-input-border","bg-lm-primary dark:bg-dm-primary checked:bg-lm-brand dark:checked:bg-dm-brand bg-no-repeat","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input",e),onChange:i,...r})},XS=({className:e,...t})=>v.jsx(UD,{className:Oe("rounded-sm min-w-4 w-4 h-4 checked:bg-(image:--tick) bg-center",e),...t}),Uu=({onClick:e,className:t,label:n="Close",size:r="lg",solid:i,ref:o})=>v.jsx("button",{ref:o,type:"button",onClick:e,className:Oe("rounded-md focus-ring cursor-pointer",{"opacity-50 highlight:opacity-80 transition-opacity":!i},t),"aria-label":n,children:v.jsx(De,{icon:t0,size:r==="lg"?"xl":r==="md"?"lg":void 0})}),bi=({borderless:e=!1,size:t="md",feedback:n,variant:r="default",className:i,disabled:o,ref:l,...u})=>v.jsx("input",{ref:l,className:Oe("outline-none",r==="default"&&["w-full",{"focus-ring":!n,"focus-ring-danger":n==="error","px-2 py-1 text-sm":t==="sm","px-3 py-1.5":t==="md","px-4 py-2 text-xl":t==="lg","rounded-md border":!e,"border-lm-input-border dark:border-dm-input-border":!e&&!n,"border-danger":!e&&n==="error","bg-lm-disabled-input dark:bg-dm-disabled-input":o,"bg-lm-primary dark:bg-dm-primary":!o,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!o}],i),disabled:o,...u}),Sa=({required:e,children:t,className:n,...r})=>v.jsxs("label",{className:Oe("cursor-pointer",n),...r,children:[t,e&&v.jsx("span",{className:"text-danger ml-1","data-testid":"required-indicator",children:"*"})]}),QS=({children:e,helpText:t,error:n,"data-testid":r})=>v.jsxs("div",{className:"flex flex-col gap-1","data-testid":r,children:[e,t&&v.jsx("small",{"data-testid":r?`${r}-help-text`:"help-text",className:"text-gray-500 dark:text-gray-400",children:t}),n&&v.jsx("span",{"data-testid":r?`${r}-error`:"error",className:"text-danger",children:n})]}),si=({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...u})=>{const f=x.useId();return v.jsxs(QS,{error:i,helpText:o,"data-testid":l,children:[v.jsx(Sa,{htmlFor:f,required:n,children:e}),v.jsx(bi,{id:f,className:t,required:n||r,feedback:i?"error":void 0,...u})]})},KZ=({containerClassName:e,className:t,size:n,...r})=>{const{flag:i,toggle:o,setToFalse:l}=yn(),u=x.useRef(null),f=x.useCallback(({relatedTarget:h})=>{u.current?.contains(h)||l()},[u,l]);return v.jsxs("div",{className:Oe("group relative",e),ref:u,onBlurCapture:f,children:[v.jsx(bi,{type:i?"text":"password",className:Oe({"pr-10":n!=="sm","pr-8":n==="sm"},t),size:n,"data-testid":"input",...r}),v.jsx("button",{type:"button",onClick:o,title:i?"Hide password":"Show password","aria-label":i?"Hide password":"Show password",className:Oe("absolute top-[50%] translate-y-[-50%] px-1 cursor-pointer","text-placeholder hover:text-lm-text hover:dark:text-dm-text transition-colors",{"right-1.5":n!=="sm","scale-85 right-1":n==="sm"}),tabIndex:-1,children:v.jsx(De,{icon:i?yq:BH})})]})},ZZ=({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...u})=>{const f=x.useId();return v.jsxs(QS,{error:i,helpText:o,"data-testid":l,children:[v.jsx(Sa,{htmlFor:f,required:n,children:e}),v.jsx(KZ,{id:f,className:t,required:n||r,feedback:i?"error":void 0,...u})]})},XZ=({className:e,size:t="md",feedback:n,disabled:r,...i})=>v.jsx("select",{className:Oe("w-full rounded-md border appearance-none pr-9","bg-(image:--chevron-down) bg-no-repeat bg-position-[right_0.75rem_center] bg-size-[16px_12px]",{"focus-ring":!n,"focus-ring-danger":n==="error","border-lm-input-border dark:border-dm-input-border":!n,"border-danger":n==="error","pl-2 py-1 text-sm":t==="sm","pl-3 py-1.5":t==="md","pl-4 py-2 text-xl":t==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":r,"bg-lm-primary dark:bg-dm-primary group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!r},e),disabled:r,...i}),JS=({selectClassName:e,label:t,error:n,helpText:r,required:i,hiddenRequired:o,"data-testid":l,...u})=>{const f=x.useId();return v.jsxs(QS,{error:n,helpText:r,"data-testid":l,children:[v.jsx(Sa,{htmlFor:f,required:i,children:t}),v.jsx(XZ,{id:f,className:e,required:i||o,feedback:n?"error":void 0,...u})]})},Hf=({onChange:e,containerClassName:t,inputClassName:n,size:r="lg",loading:i=!1,variant:o="default",immediate:l=!1,...u})=>{const{setTimeout:f,clearCurrentTimeout:h}=GD(500),m=x.useCallback(p=>{!p||l?(h(),e(p)):f(()=>e(p))},[h,l,e,f]);return v.jsxs("div",{className:Oe("group relative focus-within:z-10",t),children:[o==="default"&&v.jsx(De,{icon:i?PS:kH,spin:i,className:Oe("absolute top-[50%] translate-y-[-50%] transition-colors","text-placeholder group-focus-within:text-lm-text dark:group-focus-within:text-dm-text",{"left-3":r!=="sm","scale-85 left-2":r==="sm"})}),v.jsx(bi,{variant:o,type:"search",className:Oe(o==="default"&&{"pl-9":r!=="sm","pl-7":r==="sm"},n),placeholder:"Search...",onChange:p=>m(p.target.value),size:r,...u})]})};function $D({searchResults:e,onSearch:t,onSelectSearchResult:n,renderSearchResult:r,size:i="md",listboxSpan:o="full",onFocus:l,containerClassName:u,listboxClassName:f,ref:h,...m}){const p=x.useId(),[b,_]=x.useState(),w=x.useRef(null);x.useImperativeHandle(h,()=>w.current);const S=x.useMemo(()=>e?b??[...e.keys()][0]:void 0,[b,e]),A=x.useCallback(T=>{n(T),t(""),w.current.value=""},[t,n,w]);return v.jsxs("div",{className:Oe("relative",u),onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||t("")},children:[v.jsx(Hf,{onChange:t,size:i,ref:w,role:"combobox","aria-autocomplete":"list","aria-expanded":!!e,"aria-controls":p,"aria-activedescendant":S?`${p}_${S}`:void 0,autoComplete:"off",autoCorrect:"off",onFocus:T=>{l?.(T),t(T.target.value)},...m}),e&&v.jsx(FZ,{id:p,items:e,anchor:w,onSelectItem:A,onActiveItemChange:_,renderItem:r,className:Oe("absolute top-full mt-1 z-10",{"min-w-60":o==="auto","w-full":o==="full"},f),"aria-label":"Matching items",noItemsMessage:"No results found matching search"})]})}const QZ=({name:e,color:t})=>v.jsxs("div",{className:"inline-flex items-center gap-2",children:[v.jsx("div",{"aria-hidden":!0,className:"w-4 h-4 rounded-full",style:{backgroundColor:t}}),e]}),JZ=({tag:e,color:t,size:n,onRemove:r})=>v.jsxs("li",{className:Oe("inline-flex items-center gap-1 font-bold [&]:rounded-md",{"px-1 text-sm":n==="sm","py-0.25 px-1.5":n==="md","py-0.5 px-1.5":n==="lg"}),style:{backgroundColor:t,color:eC(t)?"#000":"#fff"},onClick:i=>i.stopPropagation(),children:[e,v.jsx(Uu,{label:`Remove ${e}`,solid:!0,size:"sm",onClick:()=>r(e)})]}),yj="#99a1af",eX=({tags:e,selectedTags:t=[],onTagsChange:n,getColorForTag:r,searchMode:i="startsWith",immutable:o=!1,size:l="md",disabled:u,containerClassName:f,...h})=>{const{searchResults:m,onSearch:p}=qD({tags:e,selectedTags:t,searchMode:i,allowAdding:!o}),b=x.useCallback(S=>{const A=(S.match(/Add\s+"([^"]+)"\s+tag/)?.[1]??S).split(",").map(nC);n?.([...new Set([...t,...A])])},[n,t]),_=x.useCallback(S=>n?.(t.filter(A=>A!==S)),[n,t]),w=x.useRef(null);return v.jsxs("div",{className:Oe("rounded-md flex flex-wrap gap-1","border border-lm-input-border dark:border-dm-input-border","cursor-text focus-within:focus-within-ring",{"p-0.5":l==="sm","p-1.25":l==="md","p-2":l==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":u,"bg-lm-primary dark:bg-dm-primary":!u,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!u},f),onClick:S=>{S.target!==w.current&&w.current?.focus()},children:[v.jsx("ul",{className:"m-0 p-0 flex flex-wrap gap-1",children:t.map((S,A)=>{const T=r?.(S)??yj;return v.jsx(JZ,{tag:S,color:T,onRemove:_,size:l},`${S}${A}`)})}),v.jsx($D,{variant:"unstyled",listboxSpan:"auto",containerClassName:"flex items-center",listboxClassName:"whitespace-nowrap",inputClassName:Oe("no-clear-button",{"px-1 text-sm":l==="sm","px-2 h-[26px]":l==="md","px-3 text-xl":l==="lg"}),searchResults:m,onSearch:p,onSelectSearchResult:b,renderSearchResult:S=>S.match(/Add\s+"([^"]+)"\s+tag/)?S:v.jsx(QZ,{name:S,color:r?.(S)??yj}),onKeyDown:S=>{S.key==="Backspace"&&!m&&_(t[t.length-1])},size:l,disabled:u,ref:w,immediate:!0,...h})]})},tX=({className:e,...t})=>v.jsx(UD,{className:Oe("rounded-full min-w-8 w-8 h-4","bg-(image:--circle-grey-dark) dark:bg-(image:--circle-grey-light) checked:bg-(image:--circle-white)","focus-visible:not-checked:bg-(image:--circle-blue-light)","checked:bg-right transition-[background-position]",e),...t});function FD(e,{elementsSelector:t,focusFirstItem:n=!1,vertical:r=!0,horizontal:i=!0}){const o=x.useMemo(()=>{const f=[];return r&&f.push("ArrowDown"),i&&f.push("ArrowRight"),f},[i,r]),l=x.useMemo(()=>{const f=[];return r&&f.push("ArrowUp"),i&&f.push("ArrowLeft"),f},[i,r]),u=x.useMemo(()=>[...o,...l],[o,l]);x.useEffect(()=>{const f=e.current;if(!f)return()=>{};const h=new AbortController,m=()=>[...f.querySelectorAll(t)],p=m(),b=Math.max(p.findIndex(_=>_.dataset.selected==="true"),0);return p.forEach((_,w)=>{_.tabIndex=w===b?0:-1,n&&w===b&&_.focus()}),f.addEventListener("keydown",_=>{if(!u.includes(_.key))return;_.preventDefault();const w=m(),S=w.findIndex(T=>T.tabIndex===0),A=o.includes(_.key)?w[S+1]??w[0]:w[S-1]??w[w.length-1];w.forEach(T=>{T.tabIndex=-1}),A.tabIndex=0,A.focus()},{signal:h.signal}),()=>h.abort()},[u,e,t,n,o])}const nX=()=>{const e=io();return x.useCallback(()=>e(-1),[e])},rX=128;function eC(e){const[t,n,r]=(e.match(/../g)??[]).map(i=>parseInt(i,16)||0);return Math.round(Math.sqrt(.299*t**2+.587*n**2+.114*r**2))>=rX}const VD=({text:e,className:t,size:n="lg",initialCopied:r=!1,navigator_:i=globalThis.navigator,...o})=>{const[l,u]=d0({initialValue:r}),f=x.useCallback(()=>i.clipboard.writeText(e).then(u),[i.clipboard,e,u]);return v.jsx("button",{type:"button",className:Oe("focus-ring rounded-sm cursor-pointer",{"text-md":n==="sm","text-lg":n==="md","text-xl":n==="lg"},t),"aria-label":`Copy ${e} to clipboard`,title:"Copy to clipboard",onClick:f,...o,children:v.jsx(De,{icon:l?Iu:BD})})},HD=e=>{const t=new URLSearchParams(e),n={};return t.forEach((r,i)=>{if(i.endsWith("[]")){const o=i.slice(0,-2);n[o]??=[],n[o].push(r)}else n[i]=r}),n},tC=e=>{const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!==void 0&&(Array.isArray(r)?r.forEach(i=>t.append(`${n}[]`,`${i}`)):t.append(n,`${r}`));return t.toString()},nc=()=>{const{search:e}=Cr();return x.useMemo(()=>HD(e),[e])},iX=/\s+/g,nC=e=>e.trim().toLowerCase().replace(iX,"-"),aX=new Intl.NumberFormat("en-US"),kn=e=>aX.format(Number(e)),bj=10,oX=e=>Math.ceil(e/bj)*bj,nf=2,Hv="...",sX=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),lX=(e,t)=>{const n=sX(Math.max(nf,e-nf),Math.min(t-1,e+nf)+1);return e-nf>nf&&n.unshift(Hv),e+nfe===Hv,uX=e=>Ih(e)?e:kn(e),cX=(e,t)=>Ih(e)?`${e}_${t}`:`${e}`;function qD({tags:e,selectedTags:t,searchMode:n,searchLimit:r=5,allowAdding:i=!1}){const[o,l]=x.useState(),u=x.useCallback(f=>{const h=f.toLowerCase().trim();if(!h){l(void 0);return}const m=e.filter(p=>t.includes(p)?!1:p.toLowerCase()[n](h)).slice(0,r);i&&m.push(`Add "${h.split(",").map(nC).join(",")}" tag`),l(new Map(m.map(p=>[p,p])))},[i,r,n,t,e]);return{searchResults:o,onSearch:u}}function GD(e,t=globalThis.setTimeout,n=globalThis.clearTimeout){const r=x.useRef(null),i=x.useCallback(()=>{r.current&&n(r.current)},[n]),o=x.useCallback((l,u)=>{i(),r.current=t(()=>{l(),r.current=null},u??e)},[i,e,t]);return x.useEffect(()=>i,[i]),x.useMemo(()=>({setTimeout:o,clearCurrentTimeout:i}),[i,o])}const fX=2e3,d0=({initialValue:e=!1,delay:t=fX}={},n=globalThis.setTimeout,r=globalThis.clearTimeout)=>{const{setTimeout:i}=GD(t,n,r),[o,l]=x.useState(e),u=x.useRef(e),f=x.useCallback(()=>{l(!u.current),i(()=>l(u.current))},[i]);return[o,f]};function yn(e=!1){const[t,n]=x.useState(e),r=x.useCallback(()=>n(l=>!l),[]),i=x.useCallback(()=>n(!0),[]),o=x.useCallback(()=>n(!1),[]);return{flag:t,toggle:r,setToTrue:i,setToFalse:o}}const WD=x.createContext({}),dX=({className:e,selected:t,disabled:n,onClick:r,...i})=>{const o="to"in i&&typeof i.to=="string",l=o?Rr:"button",{onItemClick:u}=x.useContext(WD);return v.jsx(l,{role:"menuitem","data-selected":t,className:Oe("flex items-center gap-2","w-full px-3 py-1.5 focus-ring","no-underline text-inherit",{"cursor-pointer":!n,"pointer-events-none opacity-50":n,"bg-lm-secondary dark:bg-dm-secondary":t&&!n,"highlight:bg-lm-secondary dark:highlight:bg-dm-secondary highlight:z-1 relative":!t&&!n},e),tabIndex:-1,disabled:o?void 0:n,"aria-disabled":o?n:void 0,type:o?void 0:"button",onClick:f=>{r?.(f),u?.()},...i})},hX=()=>v.jsx("div",{role:"separator","aria-hidden":!0,className:"border-b border-lm-border dark:border-dm-border my-2"}),mX=({children:e})=>v.jsx("div",{role:"heading","aria-level":6,"aria-hidden":!0,className:Oe("flex items-center w-full px-3 py-1.5","text-gray-500 text-sm font-semibold"),onClick:t=>t.stopPropagation(),children:e}),pX=({className:e,...t})=>v.jsx("div",{className:Oe("px-3 py-1.5",e),...t}),gX=({children:e,className:t,focusableElementsSelector:n='[role="menuitem"]:not([disabled]):not([aria-disabled])',focusFirstItem:r=!1,onItemClick:i,...o})=>{const l=x.useRef(null);return FD(l,{elementsSelector:n,focusFirstItem:r}),v.jsx(on,{ref:l,role:"menu",className:Oe("py-2 whitespace-nowrap",t),...o,children:v.jsx(WD.Provider,{value:{onItemClick:i},children:e})})},Oh=Object.assign(gX,{Item:dX,Separator:hX,Title:mX,Misc:pX}),vX=({children:e,menuAlignment:t="left",buttonVariant:n="button",buttonContent:r,buttonClassName:i,buttonSize:o="md",buttonDisabled:l=!1,containerClassName:u,menuClassName:f,caretless:h,buttonLabel:m,menuOffset:p=3})=>{const[b,_]=x.useState(!1),w=x.useRef(null),S=x.useCallback(({focusButton:ee=!0}={})=>{_(!1),ee&&w.current?.focus()},[]),{refs:A,floatingStyles:T,context:P}=ID({open:b,onOpenChange:_,placement:t==="right"?"bottom-end":"bottom-start",middleware:[hZ(),dZ(p)],elements:{reference:w.current}}),N=TZ(P),{getReferenceProps:B,getFloatingProps:$}=zD([N]),G=x.useId(),Z=x.useRef(null);return x.useEffect(()=>{const ee=Z.current;if(!ee||!b)return()=>{};const le=new AbortController;return document.body.addEventListener("click",oe=>{oe.composedPath().includes(ee)||S()},{signal:le.signal}),()=>le.abort()},[S,b]),v.jsxs("div",{ref:Z,className:Oe("relative inline-block",u),onKeyDown:ee=>{ee.key==="Escape"&&S()},onBlur:ee=>{ee.relatedTarget&&!Z.current.contains(ee.relatedTarget)&&S({focusButton:!1})},children:[v.jsxs("button",{ref:w,...B(),type:"button","aria-haspopup":!0,"aria-expanded":b,"aria-controls":G,"aria-label":m,disabled:l,className:Oe("flex items-center rounded-md focus-ring",{"justify-between":!h,"cursor-pointer":!l,"pointer-events-none opacity-50":l,"border border-lm-border dark:border-dm-border":n==="button","bg-lm-primary dark:bg-dm-primary":n==="button","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":n==="button","text-lm-brand dark:text-dm-brand":n==="link","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline":n==="link","px-1.5 py-1 text-sm":n!=="text"&&o==="sm","px-3 py-1.5":n!=="text"&&o==="md","px-4 py-2 text-lg":n!=="text"&&o==="lg","gap-x-1.5":o==="sm","gap-x-2":o!=="sm"},i),onKeyDown:ee=>{ee.key==="ArrowDown"&&(ee.preventDefault(),_(!0))},children:[r,!h&&v.jsx(De,{icon:pR,size:"xs",widthAuto:!0})]}),b&&v.jsx("div",{ref:A.setFloating,style:T,className:"min-w-full z-500",...$(),children:v.jsx(Oh,{className:f,id:G,focusableElementsSelector:'[role="menuitem"]:not([disabled]):not([aria-disabled]),input:not([disabled]),select:not([disabled])',focusFirstItem:!0,onItemClick:S,children:e})})]})},Ue=Object.assign(vX,{Item:Oh.Item,Separator:Oh.Separator,Title:Oh.Title,Misc:Oh.Misc}),h0=({className:e,disabled:t,size:n="md",type:r="button",...i})=>v.jsx("button",{className:Oe("inline-flex rounded-md focus-ring","text-lm-brand dark:text-dm-brand","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline",{"px-1.5 py-1 text-sm":n==="sm","px-3 py-1.5":n==="md","px-4 py-2 text-lg":n==="lg","cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:t,type:r,...i}),yX=({className:e,active:t,...n})=>v.jsx("li",{role:"menuitem",className:"w-full flex","data-active":t,children:v.jsx(Rr,{className:Oe("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white no-underline highlight:opacity-100 transition-opacity",{"opacity-60":!t,"opacity-100":t},e),...n})}),bX=({containerClassName:e,buttonClassName:t,menuClassName:n,active:r,...i})=>v.jsx("li",{role:"menuitem","aria-haspopup":!0,className:"w-full flex","data-active":r,children:v.jsx(Ue,{containerClassName:Oe("max-md:w-full",e),buttonVariant:"text",buttonClassName:Oe("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white highlight:opacity-100 transition-opacity",{"opacity-60":!r,"opacity-100":r},t),menuAlignment:"right",menuOffset:-3,menuClassName:Oe("mx-2",n),...i})}),xX=({className:e,brand:t,children:n})=>{const{flag:r,toggle:i,setToFalse:o}=yn(),l=x.useId(),u=x.useId(),{pathname:f}=Cr();return x.useEffect(()=>o(),[f,o]),v.jsxs("nav",{className:Oe("w-full relative","bg-lm-main dark:bg-dm-main","flex max-md:flex-col items-center justify-between",e),children:[v.jsxs("div",{className:"w-full relative",children:[v.jsx("h4",{className:Oe("text-white px-4 py-3","max-md:w-full max-md:flex max-md:flex-col items-center"),children:t}),v.jsx(Ct,{id:u,variant:"secondary",className:Oe("absolute right-0 top-[50%] translate-y-[-50%]","md:hidden mx-2 [&]:px-2","opacity-60 highlight:opacity-100 transition-opacity","[&]:text-white [&]:border-white [&]:highlight:bg-transparent"),onClick:i,"aria-label":`${r?"Hide":"Show"} menu`,"aria-controls":l,children:v.jsx(De,{icon:r?$H:aq})})]}),v.jsx("ul",{id:l,"aria-labelledby":u,role:"menu",className:Oe("m-0 p-0","max-md:w-full md:mr-2 max-md:absolute max-md:top-full z-2000","flex max-md:flex-col items-center","bg-lm-main dark:bg-dm-main",{"max-md:hidden":!r}),children:n})]})},iw=Object.assign(xX,{MenuItem:yX,Dropdown:bX}),YD=x.createContext(null),_X=({className:e,to:t,...n})=>{const r=x.useContext(YD);return v.jsx(MS,{role:"menuitem",to:t,className:({isActive:i})=>Oe("px-4 pt-2 pb-[calc(0.5rem-3px)] border-b-3","highlight:text-lm-brand dark:highlight:text-dm-brand","font-bold text-center no-underline transition-colors","rounded-none outline-none focus-visible:inset-ring-2","focus-visible:inset-ring-lm-brand/50 dark:focus-visible:inset-ring-dm-brand/50",{"text-lm-brand dark:text-dm-brand":i,"border-b-lm-brand dark:border-b-dm-brand active":i,"border-b-transparent text-gray-500":!i,"flex-grow":r?.fill},e),...n})},wX=({children:e,className:t,fill:n})=>v.jsx(YD.Provider,{value:{fill:n},children:v.jsx(on,{role:"menubar",className:Oe("flex overflow-hidden",t),children:e})}),nl=Object.assign(wX,{Pill:_X}),KD=["border border-r-0 last:border-r border-lm-border dark:border-dm-border","rounded-none first:rounded-l last:rounded-r"],ZD=(e=!1)=>Oe(KD,"px-3 py-2 cursor-pointer no-underline","focus-ring focus-visible:z-1",!e&&["text-lm-brand dark:text-dm-brand","bg-lm-primary dark:bg-dm-primary","highlight:bg-lm-secondary dark:highlight:bg-dm-secondary"],e&&"bg-lm-main dark:bg-dm-main text-white"),aw=({children:e})=>v.jsx("span",{"aria-hidden":!0,className:Oe(KD,"px-3 py-2 text-gray-400"),children:e}),XD=()=>v.jsx(aw,{children:Hv});function SX({children:e,active:t,isEllipsis:n,href:r,...i}){const o=x.useMemo(()=>ZD(t),[t]);return n?v.jsx(XD,{}):v.jsx(Rr,{className:o,to:r,...i,"data-active":t,children:e})}function CX({children:e,active:t,isEllipsis:n,...r}){const i=x.useMemo(()=>ZD(t),[t]);return n?v.jsx(XD,{}):v.jsx("button",{type:"button",className:i,...r,"data-active":t,children:e})}const m0=({currentPage:e,pagesCount:t,...n})=>{const r="urlForPage"in n,i=r?SX:CX,o=x.useCallback(u=>r?{href:Ih(u)?void 0:n.urlForPage(u)}:{onClick:()=>!Ih(u)&&n.onPageChange(u)},[r,n]),l=x.useRef(null);return FD(l,{elementsSelector:"button,a",vertical:!1}),t<2?null:v.jsxs("div",{className:"select-none flex","data-testid":"paginator",ref:l,children:[e===1?v.jsx(aw,{children:v.jsx(De,{size:"xs",icon:xT})}):v.jsx(i,{...o(Math.max(1,e-1)),"aria-label":"Previous",children:v.jsx(De,{size:"xs",icon:xT})}),lX(e,t).map((u,f)=>v.jsx(i,{active:u===e,isEllipsis:Ih(u),...o(u),children:uX(u)},cX(u,f))),e===t?v.jsx(aw,{children:v.jsx(De,{size:"xs",icon:Dv})}):v.jsx(i,{...o(Math.min(t,e+1)),"aria-label":"Next",children:v.jsx(De,{size:"xs",icon:Dv})})]})},EX=({buttonLabel:e="Options",buttonSize:t="md",...n})=>v.jsx(Ue,{buttonContent:v.jsx(De,{icon:VH,widthAuto:!0,className:Oe({"px-1":t==="sm"})}),caretless:!0,buttonLabel:e,buttonSize:t,...n}),Jt=Object.assign(EX,{Item:Ue.Item,Separator:Ue.Separator,Title:Ue.Title,Misc:Ue.Misc}),AX=({open:e,children:t,className:n,onClose:r,...i})=>{const o=x.useRef(null);return x.useEffect(()=>{const l=document.body,u=l.style.overflow,f=l.style.paddingRight;if(e){const h=window.outerWidth-l.clientWidth,m=l.scrollHeight>l.clientHeight;l.style.overflow="hidden",m&&(l.style.paddingRight=`${h}px`),o.current?.showModal()}else o.current?.close();return()=>{l.style.overflow=u,l.style.paddingRight=f}},[e]),Ff.createPortal(v.jsx("dialog",{ref:o,className:Oe("bg-transparent backdrop:bg-black/50",n),onCancel:l=>{l.preventDefault(),r()},...i,children:e&&t}),document.body)},ao=({open:e,onClose:t,variant:n="default",title:r,children:i,className:o,...l})=>{const{size:u="md",confirmText:f="Confirm",cancelText:h="Cancel",confirmDisabled:m,onConfirm:p,onClosed:b,..._}="onConfirm"in l?l:{...l},[w,S]=x.useState(e),A=x.useRef(null),T=x.useRef("cancel"),P=x.useCallback(N=>{N.preventDefault(),N.stopPropagation(),T.current="confirm",p?.()},[p]);return x.useEffect(()=>{if(e){T.current="cancel",S(!0);return}const N=A.current;if(N){delete A.current.dataset.open;let B=!1;const $=G=>{B||G.target!==N||(B=!0,S(!1),b?.(T.current))};return N.addEventListener("transitionend",$),()=>{N.removeEventListener("transitionend",$)}}},[b,e]),x.useEffect(()=>{const N=A.current;w&&N&&(N.dataset.open="")},[w]),v.jsx(AX,{open:w,onClose:t,className:Oe({"flex w-screen h-screen max-w-screen max-h-screen":w,"overflow-hidden":n==="cover"},o),..._,children:v.jsx("form",{"data-testid":"transition-container",ref:A,className:Oe("w-full m-auto p-4 sm:p-6","-translate-y-4 data-open:translate-y-0 opacity-0 data-open:opacity-100","transition-[opacity_,_translate] duration-300",n!=="cover"&&{"sm:w-sm":u==="sm","md:w-lg":u==="md","md:w-4xl":u==="lg","md:w-6xl":u==="xl"},{"h-full":n==="cover"}),onSubmit:P,children:v.jsx(on,{className:Oe("w-full",{"h-full relative overflow-auto":n==="cover"}),children:n==="cover"?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:Oe("px-4 py-3 absolute top-0 left-0 right-0 z-3000","flex items-center justify-between","text-white bg-linear-to-b from-black/70 to-black/10","[text-shadow:_0_2px_4px_rgb(0_0_0/_0.8)]"),children:[v.jsx("h5",{children:r}),v.jsx(Uu,{onClick:t,label:"Close dialog"})]}),i]}):v.jsxs(v.Fragment,{children:[v.jsxs(on.Header,{className:Oe("sticky top-0","flex items-center justify-between gap-x-2"),children:[v.jsx("h5",{className:Oe({"text-danger":n==="danger"}),children:r}),v.jsx(Uu,{onClick:t,label:"Close dialog"})]}),v.jsx(on.Body,{children:i}),p&&v.jsxs(on.Footer,{"data-testid":"footer",className:Oe("flex justify-end items-center gap-x-2","[&]:px-3 sticky bottom-0"),children:[v.jsx(h0,{onClick:t,children:h}),v.jsx(Ct,{solid:!0,variant:n==="danger"?"danger":"primary",disabled:m,type:"submit",children:f})]})]})})})})},Go=({className:e,children:t,loading:n=!1,variant:r="default"})=>v.jsx(Ot,{className:Oe({"[&]:border-danger":r==="error"},e),children:v.jsxs("h3",{className:Oe("text-center",{"text-gray-500 dark:text-gray-400":r==="default","text-danger":r==="error"}),children:[n&&v.jsxs(v.Fragment,{children:[v.jsx(De,{icon:PS,spin:!0}),v.jsx("span",{className:"ml-2",children:t??"Loading..."})]}),!n&&t]})}),$r=({variant:e,className:t,size:n="md",children:r})=>v.jsx("div",{className:Oe("rounded-md text-center",{"p-2":n==="sm","p-4":n==="md","p-6":n==="lg","[&]:text-white":e!=="warning","bg-lm-brand dark:bg-dm-brand":e==="success","bg-danger":e==="error","bg-warning text-black":e==="warning"},t),children:r}),rs=({placement:e="auto"}={})=>{const t=x.useRef(null),n=(()=>{const S=[];return e==="auto"&&S.push(mZ()),S.push(pZ({element:t})),S})(),[r,i]=x.useState(!1),{refs:o,floatingStyles:l,context:u,middlewareData:f}=ID({placement:e==="auto"?void 0:e,open:r,onOpenChange:i,middleware:n}),h=AZ(u,{delay:{open:300},move:!0}),{getFloatingProps:m,getReferenceProps:p}=zD([h]),{isMounted:b,styles:_}=NZ(u,{duration:200}),w=x.useMemo(()=>{const S=u.placement.split("-")[0];return{top:"bottom",right:"left",bottom:"top",left:"right"}[S]??""},[u.placement]);return{anchor:{...p(),ref:o.setReference},tooltip:{...m(),refSetter:o.setFloating,isMounted:b,styles:{...l,..._},arrowPos:f.arrow,arrowRef:t,arrowSide:w}}},is=({children:e,isMounted:t,styles:n,refSetter:r,arrowRef:i,arrowPos:o,arrowSide:l,...u})=>t&&v.jsx("div",{role:"tooltip","aria-live":"polite",className:Oe("z-500 max-w-64",{"pt-2.5":l==="top","pb-2.5":l==="bottom","pr-2.5":l==="right","pl-2.5":l==="left"}),ref:r,style:n,...u,children:v.jsxs("div",{className:"relative px-1.5 py-1 rounded bg-black/90 text-white text-center",children:[v.jsx("span",{className:"sr-only",children:"Tooltip: "}),e,v.jsx("div",{ref:i,className:Oe("absolute","border-l-6 border-r-6 border-b-6 border-l-transparent border-r-transparent border-b-black/90",{"rotate-180":l==="bottom","rotate-90 mr-[-3px]":l==="right","rotate-270 ml-[-3px]":l==="left"}),style:{left:o?.x,top:o?.y,[l]:`${-(i.current?.offsetWidth??0)/2}px`},"data-testid":"arrow"})]})});function QD(e){if(e.currentField!==e.newField)return"ASC";const t={ASC:"DESC",DESC:void 0};return e.currentOrderDir?t[e.currentOrderDir]:"ASC"}function rC(e){const t=QD(e);return{field:t?e.newField:void 0,dir:t}}const JD=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,l=n==="ASC"?-1:1;return r[t]>i[t]?o:l}),OX=e=>e.dir?`${e.field}-${e.dir}`:void 0,TX=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function Am({items:e,order:t,onChange:n,prefixed:r=!0,buttonVariant:i="button",...o}){const l=x.useCallback(f=>{const h=rC({currentOrderDir:t.dir,currentField:t.field,newField:f});n(h)},[n,t.dir,t.field]),u=i==="button";return v.jsxs(Ue,{buttonContent:v.jsxs(v.Fragment,{children:[!u&&"Order by",u&&!t.field&&v.jsx("i",{children:"Order by..."}),u&&t.field&&v.jsxs(v.Fragment,{children:[r&&"Order by: ",e[t.field]," - ",t.dir??"DESC"]})]}),buttonVariant:i,...o,children:[Object.entries(e).map(([f,h])=>v.jsxs(Ue.Item,{selected:t.field===f,onClick:()=>l(f),className:"flex items-center justify-between gap-2",children:[h,t.field===f&&v.jsx(De,{icon:t.dir==="ASC"?YH:vq})]},f)),v.jsx(Ue.Separator,{}),v.jsx(Ue.Item,{disabled:!t.field,onClick:()=>n({}),children:v.jsx("i",{children:"Clear selection"})})]})}const jX="#4696e5",MX="rgba(70, 150, 229, 0.4)",PX="#2078CF",NX="rgba(32, 120, 207, 0.4)",Xh=()=>as()?jX:PX,LX=()=>as()?MX:NX,ow="#f77f28",RX="rgba(247, 127, 40, 0.4)",DX="white",kX="#161b22",IX=e=>document.querySelector("html")?.setAttribute("data-theme",e),as=()=>document.querySelector("html")?.getAttribute("data-theme")==="dark",iC=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",zX=({isOpen:e,onClose:t,forceUpdate:n})=>{const{flag:r,setToTrue:i}=yn(),o=x.useCallback(()=>{i(),n()},[n,i]);return e?v.jsxs(on,{role:"alert",className:Oe("w-[700px] max-w-[calc(100%-30px)]","fixed top-[35px] left-[50%] translate-x-[-50%] z-[1040]"),children:[v.jsxs(on.Header,{className:"flex items-center justify-between",children:[v.jsx("h5",{children:"This app has just been updated!"}),v.jsx(Uu,{onClick:t})]}),v.jsxs(on.Body,{className:"flex gap-4 items-center justify-between max-md:flex-col",children:["Restart it to enjoy the new features.",v.jsxs(Ct,{disabled:r,variant:"secondary",solid:!0,onClick:o,children:[!r&&v.jsxs(v.Fragment,{children:["Restart now ",v.jsx(De,{icon:OH})]}),r&&v.jsx(v.Fragment,{children:"Restarting..."})]})]})]}):null},Ci=({href:e,children:t,rel:n,...r})=>v.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});function br(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var BX=typeof Symbol=="function"&&Symbol.observable||"@@observable",xj=BX,Fx=()=>Math.random().toString(36).substring(7).split("").join("."),UX={INIT:`@@redux/INIT${Fx()}`,REPLACE:`@@redux/REPLACE${Fx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fx()}`},qv=UX;function aC(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ek(e,t,n){if(typeof e!="function")throw new Error(br(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(br(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(br(1));return n(ek)(e,t)}let r=e,i=t,o=new Map,l=o,u=0,f=!1;function h(){l===o&&(l=new Map,o.forEach((A,T)=>{l.set(T,A)}))}function m(){if(f)throw new Error(br(3));return i}function p(A){if(typeof A!="function")throw new Error(br(4));if(f)throw new Error(br(5));let T=!0;h();const P=u++;return l.set(P,A),function(){if(T){if(f)throw new Error(br(6));T=!1,h(),l.delete(P),o=null}}}function b(A){if(!aC(A))throw new Error(br(7));if(typeof A.type>"u")throw new Error(br(8));if(typeof A.type!="string")throw new Error(br(17));if(f)throw new Error(br(9));try{f=!0,i=r(i,A)}finally{f=!1}return(o=l).forEach(P=>{P()}),A}function _(A){if(typeof A!="function")throw new Error(br(10));r=A,b({type:qv.REPLACE})}function w(){const A=p;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(br(11));function P(){const B=T;B.next&&B.next(m())}return P(),{unsubscribe:A(P)}},[xj](){return this}}}return b({type:qv.INIT}),{dispatch:b,subscribe:p,getState:m,replaceReducer:_,[xj]:w}}function $X(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:qv.INIT})>"u")throw new Error(br(12));if(typeof n(void 0,{type:qv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(br(13))})}function p0(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw u&&u.type,new Error(br(14));h[p]=w,f=f||w!==_}return f=f||r.length!==Object.keys(l).length,f?h:l}}function Gv(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function FX(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(br(15))};const l={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},u=e.map(f=>f(l));return o=Gv(...u)(i.dispatch),{...i,dispatch:o}}}function tk(e){return aC(e)&&"type"in e&&typeof e.type=="string"}var nk=Symbol.for("immer-nothing"),_j=Symbol.for("immer-draftable"),Fr=Symbol.for("immer-state");function da(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _i=Object,Ef=_i.getPrototypeOf,Wv="constructor",g0="prototype",sw="configurable",Yv="enumerable",fv="writable",Qh="value",Wo=e=>!!e&&!!e[Fr];function xa(e){return e?rk(e)||v0(e)||!!e[_j]||!!e[Wv]?.[_j]||y0(e)||b0(e):!1}var VX=_i[g0][Wv].toString(),wj=new WeakMap;function rk(e){if(!e||!oC(e))return!1;const t=Ef(e);if(t===null||t===_i[g0])return!0;const n=_i.hasOwnProperty.call(t,Wv)&&t[Wv];if(n===Object)return!0;if(!cf(n))return!1;let r=wj.get(n);return r===void 0&&(r=Function.toString.call(n),wj.set(n,r)),r===VX}function Om(e,t,n=!0){Tm(e)===0?(n?Reflect.ownKeys(e):_i.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Tm(e){const t=e[Fr];return t?t.type_:v0(e)?1:y0(e)?2:b0(e)?3:0}var Sj=(e,t,n=Tm(e))=>n===2?e.has(t):_i[g0].hasOwnProperty.call(e,t),lw=(e,t,n=Tm(e))=>n===2?e.get(t):e[t],Kv=(e,t,n,r=Tm(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function HX(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var v0=Array.isArray,y0=e=>e instanceof Map,b0=e=>e instanceof Set,oC=e=>typeof e=="object",cf=e=>typeof e=="function",Vx=e=>typeof e=="boolean",Do=e=>e.copy_||e.base_,sC=e=>e.modified_?e.copy_:e.base_;function uw(e,t){if(y0(e))return new Map(e);if(b0(e))return new Set(e);if(v0(e))return Array[g0].slice.call(e);const n=rk(e);if(t===!0||t==="class_only"&&!n){const r=_i.getOwnPropertyDescriptors(e);delete r[Fr];let i=Reflect.ownKeys(r);for(let o=0;o1&&_i.defineProperties(e,{set:Lg,add:Lg,clear:Lg,delete:Lg}),_i.freeze(e),t&&Om(e,(n,r)=>{lC(r,!0)},!1)),e}function qX(){da(2)}var Lg={[Qh]:qX};function x0(e){return e===null||!oC(e)?!0:_i.isFrozen(e)}var Zv="MapSet",cw="Patches",ik={};function Af(e){const t=ik[e];return t||da(0,e),t}var GX=e=>!!ik[e],Jh,ak=()=>Jh,WX=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:GX(Zv)?Af(Zv):void 0});function Cj(e,t){t&&(e.patchPlugin_=Af(cw),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fw(e){dw(e),e.drafts_.forEach(YX),e.drafts_=null}function dw(e){e===Jh&&(Jh=e.parent_)}var Ej=e=>Jh=WX(Jh,e);function YX(e){const t=e[Fr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Aj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Fr].modified_&&(fw(t),da(4)),xa(e)&&(e=Oj(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Fr].base_,e,t)}else e=Oj(t,n);return KX(t,e,!0),fw(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nk?e:void 0}function Oj(e,t){if(x0(t))return t;const n=t[Fr];if(!n)return uC(t,e.handledSet_,e);if(!_0(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);lk(n,e)}return n.copy_}function KX(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lC(t,n)}function ok(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var _0=(e,t)=>e.scope_===t,ZX=[];function sk(e,t,n,r){const i=Do(e),o=e.type_;if(r!==void 0&&lw(i,r,o)===t){Kv(i,r,n,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Om(i,(f,h)=>{if(Wo(h)){const m=u.get(h)||[];m.push(f),u.set(h,m)}})}const l=e.draftLocations_.get(t)??ZX;for(const u of l)Kv(i,u,n,o)}function XX(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!_0(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const l=sC(o);sk(e,o.draft_??o,l,n),lk(o,i)})}function lk(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}ok(e)}}function QX(e,t,n){const{scope_:r}=e;if(Wo(n)){const i=n[Fr];_0(i,r)&&i.callbacks_.push(function(){dv(e);const l=sC(i);sk(e,n,l,t)})}else xa(n)&&e.callbacks_.push(function(){const o=Do(e);lw(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&uC(lw(e.copy_,t,e.type_),r.handledSet_,r)})}function uC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Wo(e)||t.has(e)||!xa(e)||x0(e)||(t.add(e),Om(e,(r,i)=>{if(Wo(i)){const o=i[Fr];if(_0(o,n)){const l=sC(o);Kv(e,r,l,e.type_),ok(o)}}else xa(i)&&uC(i,t,n)})),e}function JX(e,t){const n=v0(e),r={type_:n?1:0,scope_:t?t.scope_:ak(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=cC;n&&(i=[r],o=em);const{revoke:l,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=l,[u,r]}var cC={get(e,t){if(t===Fr)return e;const n=Do(e);if(!Sj(n,t,e.type_))return eQ(e,n,t);const r=n[t];if(e.finalized_||!xa(r))return r;if(r===Hx(e.base_,t)){dv(e);const i=e.type_===1?+t:t,o=mw(e.scope_,r,e,i);return e.copy_[i]=o}return r},has(e,t){return t in Do(e)},ownKeys(e){return Reflect.ownKeys(Do(e))},set(e,t,n){const r=uk(Do(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Hx(Do(e),t),o=i?.[Fr];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(HX(n,i)&&(n!==void 0||Sj(e.base_,t,e.type_)))return!0;dv(e),hw(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),QX(e,t,n)),!0},deleteProperty(e,t){return dv(e),Hx(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),hw(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Do(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[fv]:!0,[sw]:e.type_!==1||t!=="length",[Yv]:r[Yv],[Qh]:n[t]}},defineProperty(){da(11)},getPrototypeOf(e){return Ef(e.base_)},setPrototypeOf(){da(12)}},em={};Om(cC,(e,t)=>{em[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}});em.deleteProperty=function(e,t){return em.set.call(this,e,t,void 0)};em.set=function(e,t,n){return cC.set.call(this,e[0],t,n,e[0])};function Hx(e,t){const n=e[Fr];return(n?Do(n):e)[t]}function eQ(e,t,n){const r=uk(t,n);return r?Qh in r?r[Qh]:r.get?.call(e.draft_):void 0}function uk(e,t){if(!(t in e))return;let n=Ef(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ef(n)}}function hw(e){e.modified_||(e.modified_=!0,e.parent_&&hw(e.parent_))}function dv(e){e.copy_||(e.assigned_=new Map,e.copy_=uw(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tQ=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(cf(n)&&!cf(r)){const l=r;r=n;const u=this;return function(h=l,...m){return u.produce(h,p=>r.call(this,p,...m))}}cf(r)||da(6),i!==void 0&&!cf(i)&&da(7);let o;if(xa(n)){const l=Ej(this),u=mw(l,n,void 0);let f=!0;try{o=r(u),f=!1}finally{f?fw(l):dw(l)}return Cj(l,i),Aj(o,l)}else if(!n||!oC(n)){if(o=r(n),o===void 0&&(o=n),o===nk&&(o=void 0),this.autoFreeze_&&lC(o,!0),i){const l=[],u=[];Af(cw).generateReplacementPatches_(n,o,{patches_:l,inversePatches_:u}),i(l,u)}return o}else da(1,n)},this.produceWithPatches=(n,r)=>{if(cf(n))return(u,...f)=>this.produceWithPatches(u,h=>n(h,...f));let i,o;return[this.produce(n,r,(u,f)=>{i=u,o=f}),i,o]},Vx(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Vx(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Vx(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){xa(t)||da(8),Wo(t)&&(t=ga(t));const n=Ej(this),r=mw(n,t,void 0);return r[Fr].isManual_=!0,dw(n),r}finishDraft(t,n){const r=t&&t[Fr];(!r||!r.isManual_)&&da(9);const{scope_:i}=r;return Cj(i,n),Aj(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const i=Af(cw).applyPatches_;return Wo(t)?i(t,n):this.produce(t,o=>i(o,n))}};function mw(e,t,n,r){const[i,o]=y0(t)?Af(Zv).proxyMap_(t,n):b0(t)?Af(Zv).proxySet_(t,n):JX(t,n);return(n?.scope_??ak()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?XX(n,o,r):o.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function ga(e){return Wo(e)||da(10,e),ck(e)}function ck(e){if(!xa(e)||x0(e))return e;const t=e[Fr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=uw(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=uw(e,!0);return Om(n,(i,o)=>{Kv(n,i,ck(o))},r),t&&(t.finalized_=!1),n}var nQ=new tQ,fk=nQ.produce;function rQ(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function iQ(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function aQ(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Tj=e=>Array.isArray(e)?e:[e];function oQ(e){const t=Array.isArray(e[0])?e[0]:e;return aQ(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function sQ(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Rg(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function fQ(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,l=0,u,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),rQ(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...n,...f},{memoize:p,memoizeOptions:b=[],argsMemoize:_=dk,argsMemoizeOptions:w=[]}=m,S=Tj(b),A=Tj(w),T=oQ(i),P=p(function(){return o++,h.apply(null,arguments)},...S),N=_(function(){l++;const $=sQ(T,arguments);return u=P.apply(null,$),u},...A);return Object.assign(N,{resultFunc:h,memoizedResultFunc:P,dependencies:T,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:_})};return Object.assign(r,{withTypes:()=>r}),r}var _e=fQ(dk),dQ=Object.assign((e,t=_e)=>{iQ(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((l,u,f)=>(l[n[f]]=u,l),{}))},{withTypes:()=>dQ});function hk(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var hQ=hk(),mQ=hk,pQ=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gv:Gv.apply(null,arguments)},gQ=e=>e&&typeof e.match=="function";function sn(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Ei(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>tk(r)&&r.type===e,n}var mk=class Th extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Th.prototype)}static get[Symbol.species](){return Th}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Th(...t[0].concat(this)):new Th(...t.concat(this))}};function Mj(e){return xa(e)?fk(e,()=>{}):e}function Dg(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function vQ(e){return typeof e=="boolean"}var yQ=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new mk;return n&&(vQ(n)?l.push(hQ):l.push(mQ(n.extraArgument))),l},pk="RTK_autoBatch",dn=()=>e=>({payload:e,meta:{[pk]:!0}}),Pj=e=>t=>{setTimeout(t,e)},gk=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,l=!1;const u=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Pj(10):e.type==="callback"?e.queueNotification:Pj(e.timeout),h=()=>{l=!1,o&&(o=!1,u.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const p=()=>i&&m(),b=r.subscribe(p);return u.add(m),()=>{b(),u.delete(m)}},dispatch(m){try{return i=!m?.meta?.[pk],o=!i,o&&(l||(l=!0,f(h))),r.dispatch(m)}finally{i=!0}}})},bQ=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new mk(e);return r&&i.push(gk(typeof r=="object"?r:void 0)),i};function fC(e){const t=yQ(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:l=void 0,enhancers:u=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(aC(n))f=p0(n);else throw new Error(Ei(1));let h;typeof r=="function"?h=r(t):h=t();let m=Gv;i&&(m=pQ({trace:!1,...typeof i=="object"&&i}));const p=FX(...h),b=bQ(p);let _=typeof u=="function"?u(b):b();const w=m(..._);return ek(f,l,w)}function vk(e){const t={},n=[];let r;const i={addCase(o,l){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Ei(28));if(u in t)throw new Error(Ei(29));return t[u]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&n.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return n.push({matcher:o,reducer:l}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function xQ(e){return typeof e=="function"}function _Q(e,t){let[n,r,i]=vk(t),o;if(xQ(e))o=()=>Mj(e());else{const u=Mj(e);o=()=>u}function l(u=o(),f){let h=[n[f.type],...r.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,p)=>{if(p)if(Wo(m)){const _=p(m,f);return _===void 0?m:_}else{if(xa(m))return fk(m,b=>p(b,f));{const b=p(m,f);if(b===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return m},u)}return l.getInitialState=o,l}var wQ=(e,t)=>gQ(e)?e.match(t):e(t);function SQ(...e){return t=>e.some(n=>wQ(n,t))}var CQ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",yk=(e=21)=>{let t="",n=e;for(;n--;)t+=CQ[Math.random()*64|0];return t},EQ=["name","message","stack","code"],qx=class{constructor(e,t){this.payload=e,this.meta=t}_type},Nj=class{constructor(e,t){this.payload=e,this.meta=t}_type},AQ=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of EQ)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Lj="External signal was aborted",bk=(()=>{function e(t,n,r){const i=sn(t+"/fulfilled",(f,h,m,p)=>({payload:f,meta:{...p||{},arg:m,requestId:h,requestStatus:"fulfilled"}})),o=sn(t+"/pending",(f,h,m)=>({payload:void 0,meta:{...m||{},arg:h,requestId:f,requestStatus:"pending"}})),l=sn(t+"/rejected",(f,h,m,p,b)=>({payload:p,error:(r&&r.serializeError||AQ)(f||"Rejected"),meta:{...b||{},arg:m,requestId:h,rejectedWithValue:!!p,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function u(f,{signal:h}={}){return(m,p,b)=>{const _=r?.idGenerator?r.idGenerator(f):yk(),w=new AbortController;let S,A;function T(N){A=N,w.abort()}h&&(h.aborted?T(Lj):h.addEventListener("abort",()=>T(Lj),{once:!0}));const P=(async function(){let N;try{let $=r?.condition?.(f,{getState:p,extra:b});if(TQ($)&&($=await $),$===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const G=new Promise((Z,ee)=>{S=()=>{ee({name:"AbortError",message:A||"Aborted"})},w.signal.addEventListener("abort",S,{once:!0})});m(o(_,f,r?.getPendingMeta?.({requestId:_,arg:f},{getState:p,extra:b}))),N=await Promise.race([G,Promise.resolve(n(f,{dispatch:m,getState:p,extra:b,requestId:_,signal:w.signal,abort:T,rejectWithValue:(Z,ee)=>new qx(Z,ee),fulfillWithValue:(Z,ee)=>new Nj(Z,ee)})).then(Z=>{if(Z instanceof qx)throw Z;return Z instanceof Nj?i(Z.payload,_,f,Z.meta):i(Z,_,f)})])}catch($){N=$ instanceof qx?l(null,_,f,$.payload,$.meta):l($,_,f)}finally{S&&w.signal.removeEventListener("abort",S)}return r&&!r.dispatchConditionRejection&&l.match(N)&&N.meta.condition||m(N),N})();return Object.assign(P,{abort:T,requestId:_,arg:f,unwrap(){return P.then(OQ)}})}}return Object.assign(u,{pending:o,rejected:l,fulfilled:i,settled:SQ(l,i),typePrefix:t})}return e.withTypes=()=>e,e})();function OQ(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function TQ(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var jQ=Symbol.for("rtk-slice-createasyncthunk");function MQ(e,t){return`${e}/${t}`}function PQ({creators:e}={}){const t=e?.asyncThunk?.[jQ];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(Ei(11));const l=(typeof r.reducers=="function"?r.reducers(LQ()):r.reducers)||{},u=Object.keys(l),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(N,B){const $=typeof N=="string"?N:N.type;if(!$)throw new Error(Ei(12));if($ in f.sliceCaseReducersByType)throw new Error(Ei(13));return f.sliceCaseReducersByType[$]=B,h},addMatcher(N,B){return f.sliceMatchers.push({matcher:N,reducer:B}),h},exposeAction(N,B){return f.actionCreators[N]=B,h},exposeCaseReducer(N,B){return f.sliceCaseReducersByName[N]=B,h}};u.forEach(N=>{const B=l[N],$={reducerName:N,type:MQ(i,N),createNotation:typeof r.reducers=="function"};DQ(B)?IQ($,B,h,t):RQ($,B,h)});function m(){const[N={},B=[],$=void 0]=typeof r.extraReducers=="function"?vk(r.extraReducers):[r.extraReducers],G={...N,...f.sliceCaseReducersByType};return _Q(r.initialState,Z=>{for(let ee in G)Z.addCase(ee,G[ee]);for(let ee of f.sliceMatchers)Z.addMatcher(ee.matcher,ee.reducer);for(let ee of B)Z.addMatcher(ee.matcher,ee.reducer);$&&Z.addDefaultCase($)})}const p=N=>N,b=new Map,_=new WeakMap;let w;function S(N,B){return w||(w=m()),w(N,B)}function A(){return w||(w=m()),w.getInitialState()}function T(N,B=!1){function $(Z){let ee=Z[N];return typeof ee>"u"&&B&&(ee=Dg(_,$,A)),ee}function G(Z=p){const ee=Dg(b,B,()=>new WeakMap);return Dg(ee,Z,()=>{const le={};for(const[oe,re]of Object.entries(r.selectors??{}))le[oe]=NQ(re,Z,()=>Dg(_,Z,A),B);return le})}return{reducerPath:N,getSelectors:G,get selectors(){return G($)},selectSlice:$}}const P={name:i,reducer:S,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:A,...T(o),injectInto(N,{reducerPath:B,...$}={}){const G=B??o;return N.inject({reducerPath:G,reducer:S},$),{...P,...T(G,!0)}}};return P}}function NQ(e,t,n,r){function i(o,...l){let u=t(o);return typeof u>"u"&&r&&(u=n()),e(u,...l)}return i.unwrapped=e,i}var At=PQ();function LQ(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function RQ({type:e,reducerName:t,createNotation:n},r,i){let o,l;if("reducer"in r){if(n&&!kQ(r))throw new Error(Ei(17));o=r.reducer,l=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?sn(e,l):sn(e))}function DQ(e){return e._reducerDefinitionType==="asyncThunk"}function kQ(e){return e._reducerDefinitionType==="reducerWithPrepare"}function IQ({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Ei(18));const{payloadCreator:o,fulfilled:l,pending:u,rejected:f,settled:h,options:m}=n,p=i(e,o,m);r.exposeAction(t,p),l&&r.addCase(p.fulfilled,l),u&&r.addCase(p.pending,u),f&&r.addCase(p.rejected,f),h&&r.addMatcher(p.settled,h),r.exposeCaseReducer(t,{fulfilled:l||kg,pending:u||kg,rejected:f||kg,settled:h||kg})}function kg(){}var zQ="task",xk="listener",_k="completed",dC="cancelled",BQ=`task-${dC}`,UQ=`task-${_k}`,pw=`${xk}-${dC}`,$Q=`${xk}-${_k}`,w0=class{constructor(e){this.code=e,this.message=`${zQ} ${dC} (reason: ${e})`}name="TaskAbortError";message},hC=(e,t)=>{if(typeof e!="function")throw new TypeError(Ei(32))},Xv=()=>{},wk=(e,t=Xv)=>(e.catch(t),e),Sk=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Nu=e=>{if(e.aborted)throw new w0(e.reason)};function Ck(e,t){let n=Xv;return new Promise((r,i)=>{const o=()=>i(new w0(e.reason));if(e.aborted){o();return}n=Sk(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Xv})}var FQ=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof w0?"cancelled":"rejected",error:n}}finally{t?.()}},Qv=e=>t=>wk(Ck(e,t).then(n=>(Nu(e),n))),Ek=e=>{const t=Qv(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:yf}=Object,Rj={},S0="listenerMiddleware",VQ=(e,t)=>{const n=r=>Sk(e,()=>r.abort(e.reason));return(r,i)=>{hC(r);const o=new AbortController;n(o);const l=FQ(async()=>{Nu(e),Nu(o.signal);const u=await r({pause:Qv(o.signal),delay:Ek(o.signal),signal:o.signal});return Nu(o.signal),u},()=>o.abort(UQ));return i?.autoJoin&&t.push(l.catch(Xv)),{result:Qv(e)(l),cancel(){o.abort(BQ)}}}},HQ=(e,t)=>{const n=async(r,i)=>{Nu(t);let o=()=>{};const u=[new Promise((f,h)=>{let m=e({predicate:r,effect:(p,b)=>{b.unsubscribe(),f([p,b.getState(),b.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&u.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await Ck(t,Promise.race(u));return Nu(t),f}finally{o()}};return(r,i)=>wk(n(r,i))},Ak=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=sn(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Ei(21));return hC(o),{predicate:i,type:t,effect:o}},Ok=yf(e=>{const{type:t,predicate:n,effect:r}=Ak(e);return{id:yk(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ei(22))}}},{withTypes:()=>Ok}),Dj=(e,t)=>{const{type:n,effect:r,predicate:i}=Ak(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},gw=e=>{e.pending.forEach(t=>{t.abort(pw)})},qQ=(e,t)=>()=>{for(const n of t.keys())gw(n);e.clear()},kj=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},Tk=yf(sn(`${S0}/add`),{withTypes:()=>Tk}),GQ=sn(`${S0}/removeAll`),jk=yf(sn(`${S0}/remove`),{withTypes:()=>jk}),WQ=(...e)=>{console.error(`${S0}/error`,...e)},jm=(e={})=>{const t=new Map,n=new Map,r=_=>{const w=n.get(_)??0;n.set(_,w+1)},i=_=>{const w=n.get(_)??1;w===1?n.delete(_):n.set(_,w-1)},{extra:o,onError:l=WQ}=e;hC(l);const u=_=>(_.unsubscribe=()=>t.delete(_.id),t.set(_.id,_),w=>{_.unsubscribe(),w?.cancelActive&&gw(_)}),f=_=>{const w=Dj(t,_)??Ok(_);return u(w)};yf(f,{withTypes:()=>f});const h=_=>{const w=Dj(t,_);return w&&(w.unsubscribe(),_.cancelActive&&gw(w)),!!w};yf(h,{withTypes:()=>h});const m=async(_,w,S,A)=>{const T=new AbortController,P=HQ(f,T.signal),N=[];try{_.pending.add(T),r(_),await Promise.resolve(_.effect(w,yf({},S,{getOriginalState:A,condition:(B,$)=>P(B,$).then(Boolean),take:P,delay:Ek(T.signal),pause:Qv(T.signal),extra:o,signal:T.signal,fork:VQ(T.signal,N),unsubscribe:_.unsubscribe,subscribe:()=>{t.set(_.id,_)},cancelActiveListeners:()=>{_.pending.forEach((B,$,G)=>{B!==T&&(B.abort(pw),G.delete(B))})},cancel:()=>{T.abort(pw),_.pending.delete(T)},throwIfCancelled:()=>{Nu(T.signal)}})))}catch(B){B instanceof w0||kj(l,B,{raisedBy:"effect"})}finally{await Promise.all(N),T.abort($Q),i(_),_.pending.delete(T)}},p=qQ(t,n);return{middleware:_=>w=>S=>{if(!tk(S))return w(S);if(Tk.match(S))return f(S.payload);if(GQ.match(S)){p();return}if(jk.match(S))return h(S.payload);let A=_.getState();const T=()=>{if(A===Rj)throw new Error(Ei(23));return A};let P;try{if(P=w(S),t.size>0){const N=_.getState(),B=Array.from(t.values());for(const $ of B){let G=!1;try{G=$.predicate(S,N,A)}catch(Z){G=!1,kj(l,Z,{raisedBy:"predicate"})}G&&m($,S,_,T)}}}finally{A=Rj}return P},startListening:f,stopListening:h,clearListeners:p}};function Ei(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Mk=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),Pk=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),Gx=e=>Object.prototype.toString.call(e)==="[object Object]",Nk=(e,t)=>{const n={};return((...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o})},qf=(e,t)=>{const n={...e};return!Gx(e)||!Gx(t)||Object.keys(t).forEach(r=>{Gx(t[r])?n[r]=r in e&&e[r]!==void 0?qf(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},Lk=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),YQ=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i{const n=[];for(let r=0;rObject.fromEntries(e.map((n,r)=>[n,t[r]])),mC=x.createContext(null),KQ=mC.Provider,ZQ=e=>{const t=x.useContext(mC);if(!t)throw new Error(`You cannot use "${e}" outside of a ContainerProvider`);return t},Rk=(...e)=>{const t=ZQ("useDependencies");return e.map(n=>{const r=t[n];if(!r)throw new Error(`Dependency with name "${n}" not found in container`);return r})};function C0(e,t){function n(r){const i=x.useContext(mC),o={};for(const u of t)u in r||(o[u]=i?.[u]);const l={...o,...r};return v.jsx(e,{...l})}return n}var Wx={},Ig={exports:{}},zj;function XQ(){return zj||(zj=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var h=[],m=0;mH.length)&&(k=H.length);for(var j=0,q=Array(k);j(e.settings?.visits?.defaultInterval==="last180days"&&(e.settings.visits.defaultInterval="last180Days"),e),{actions:vw,reducer:eJ}=At({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:tJ,resetAppUpdate:vCe}=vw,nJ=eJ,rJ=()=>{const e=Mm(),t=x.useCallback(()=>e(vw.appUpdateAvailable()),[e]),n=x.useCallback(()=>e(vw.resetAppUpdate()),[e]);return{appUpdated:E0(i=>i.appUpdated),appUpdateAvailable:t,resetAppUpdate:n}};function iJ(e){let t=e.url;try{const{host:n,pathname:r}=new URL(t);t=n;const i=r.substring(1);i.length>0&&(t=`${t} ${i}`)}catch{}return`${e.name} ${t}`.toLowerCase().replace(/[^a-zA-Z0-9-_.~]/g,"-")}function aJ(e){const t={};return e.forEach(n=>{t[n.id]=n}),t}const oJ=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n);function sJ(e,t){const n=Object.values(e),{duplicatedServers:r=[],newServers:i=[]}=Pk(t,o=>oJ(n,o)?"duplicatedServers":"newServers");return{duplicatedServers:r,newServers:i}}function Jv(e,t){const n=new Set(Object.keys(e)),r=[];return t.forEach(i=>{const o=iJ(i);let l=o,u=1;for(;n.has(l);)l=`${o}-${u}`,u++;r.push({...i,id:l}),n.add(l)}),r}const lJ={},{actions:jh,reducer:uJ}=At({name:"shlink/servers",initialState:lJ,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>(delete e[t.id],e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Object.fromEntries(Object.entries(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:aJ(e)}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:yCe,deleteServer:bCe,setAutoConnect:xCe,createServers:cJ}=jh,oo=()=>{const e=Mm(),t=E0(l=>l.servers),n=x.useCallback((l,u)=>e(jh.editServer(l,u)),[e]),r=x.useCallback(l=>e(jh.deleteServer(l)),[e]),i=x.useCallback((l,u)=>e(jh.setAutoConnect(l,u)),[e]),o=x.useCallback(l=>e(jh.createServers(l)),[e]);return{servers:t,editServer:n,deleteServer:r,setAutoConnect:i,createServers:o}},kk={field:"dateCreated",dir:"DESC"},fJ={realTimeUpdates:{enabled:!0},shortUrlCreation:{},ui:{theme:iC()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:kk}},{reducer:dJ,actions:Ik}=At({name:"shlink/settings",initialState:fJ,reducers:{setSettings:(e,{payload:t})=>qf(e,t)}}),{setSettings:_Ce}=Ik,hJ=dJ,pC=()=>{const e=Mm(),t=x.useCallback(r=>e(Ik.setSettings(r)),[e]);return{settings:E0(r=>r.settings),setSettings:t}},mJ=()=>p0({appUpdated:nJ,servers:uJ,selectedServer:OJ,settings:hJ}),zk={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},pJ=()=>JQ(Dk.load(zk)),gJ=(e=pJ())=>fC({devTools:!1,reducer:mJ(),preloadedState:e,middleware:t=>t().concat(Dk.save(zk))}),Mm=F6.withTypes(),E0=V6.withTypes(),Bk=(e,t)=>bk(e,t,{serializeError:n=>n}),vJ=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Uj=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(vJ);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},$j=e=>e==="*"||e==="x"||e==="X",Fj=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},yJ=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],bJ=(e,t)=>{if($j(e)||$j(t))return 0;const[n,r]=yJ(Fj(e),Fj(t));return n>r?1:n{for(let n=0;n{const n=Uj(e),r=Uj(t),i=n.pop(),o=r.pop(),l=Vj(n,r);return l!==0?l:i&&o?Vj(i.split("."),o.split(".")):i||o?i?-1:1:0},yw=(e,t,n)=>{_J(n);const r=xJ(e,t);return Uk[n].includes(r)},Uk={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Hj=Object.keys(Uk),_J=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Hj.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Hj.join("|")}`)},$k=Nk(e=>e,e=>{try{return yw(e,e,"=")}catch{return!1}}),Fk=e=>$k(e)?`v${e}`:e,Vk=(e,t="latest")=>$k(e)?e:t,gC="shlink/selectedServer",wJ="1.0.0",SJ="999.999.999",CJ="latest",EJ=e=>Vk(e===CJ?SJ:e,wJ),AJ=Nk(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:EJ(n),printableVersion:Fk(n)}))),qj=null,vC=sn(`${gC}/resetSelectedServer`),Hk=Bk(`${gC}/selectServer`,async({serverId:e,buildShlinkApiClient:t},{dispatch:n,getState:r})=>{n(vC());const{servers:i}=r(),o=i[e];if(!o)return{serverNotFound:!0};try{const l=t(o),{version:u,printableVersion:f}=await AJ(o,()=>l.health());return{...o,version:u,printableVersion:f}}catch{return{...o,serverNotReachable:!0}}}),{reducer:OJ}=At({name:gC,initialState:qj,reducers:{},extraReducers:e=>{e.addCase(vC,()=>qj),e.addCase(Hk.fulfilled,(t,{payload:n})=>n)}}),rc=()=>{const e=Mm(),[t]=Rk("buildShlinkApiClient"),n=x.useCallback(()=>e(vC()),[e]),r=x.useCallback(o=>e(Hk({serverId:o,buildShlinkApiClient:t})),[t,e]);return{selectedServer:E0(({selectedServer:o})=>o),resetSelectedServer:n,selectServer:r}};function yC(e){return t=>{const{resetSelectedServer:n}=rc();return x.useEffect(()=>{n()},[n]),v.jsx(e,{...t})}}const TJ=({id:e,name:t})=>v.jsxs(Rr,{to:`/server/${e}`,className:Oe("servers-list__server-item","flex items-center justify-between gap-x-2 px-4 py-3","rounded-none hover:bg-lm-secondary hover:dark:bg-dm-secondary","border-b last:border-0 border-lm-border dark:border-dm-border"),children:[v.jsx("span",{className:"truncate",children:t}),v.jsx(De,{icon:Dv})]}),qk=({servers:e,borderless:t})=>e.length>0&&v.jsx("div",{"data-testid":"list",className:Oe("w-full border-lm-border dark:border-dm-border","md:max-h-56 md:overflow-y-auto -mb-1 scroll-thin",{"border-y":!t}),children:e.map(({id:n,name:r})=>v.jsx(TJ,{id:n,name:r},n))}),Gk=({color:e=Xh(),className:t})=>v.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:v.jsxs("g",{fill:e,children:[v.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"}),v.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"}),v.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"}),v.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"})]})}),jJ=yC(()=>{const e=io(),{servers:t}=oo(),n=Object.values(t),r=n.length>0;return x.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&e(`/server/${i.id}`)},[n,e]),v.jsx("div",{className:"px-3 w-full",children:v.jsx(on,{className:"mx-auto max-w-[720px] overflow-hidden",children:v.jsxs("div",{className:"flex flex-col md:flex-row",children:[v.jsx("div",{className:"p-6 hidden md:flex items-center w-[40%]",children:v.jsx("div",{className:"w-full",children:v.jsx(Gk,{})})}),v.jsxs("div",{className:"md:border-l border-lm-border dark:border-dm-border flex-grow",children:[v.jsx("h1",{className:Oe("p-4 text-center border-lm-border dark:border-dm-border",{"border-b":!r}),children:"Welcome!"}),r?v.jsx(qk,{servers:n}):v.jsxs("div",{className:"p-6 text-center flex flex-col gap-12 text-xl",children:[v.jsx("p",{children:"This application will help you manage your Shlink servers."}),v.jsx("p",{children:v.jsxs(Ct,{to:"/server/create",size:"lg",inline:!0,children:[v.jsx(De,{icon:bm,widthAuto:!0})," Add a server"]})}),v.jsx("p",{children:v.jsx(Ci,{href:"https://shlink.io/documentation",children:v.jsxs("small",{children:[v.jsx("span",{className:"mr-2",children:"Learn more about Shlink"}),v.jsx(De,{icon:LH})]})})})]})]})]})})})}),Wk=e=>!!e?.url&&!!e?.apiKey,zh=e=>!!e?.id,bC=e=>!!e?.version,MJ=e=>!!e?.serverNotFound,PJ=e=>zh(e)?e.id:"",NJ=({name:e,url:t,apiKey:n,forwardCredentials:r})=>({name:e,url:t,apiKey:n,forwardCredentials:r?"true":"false"}),LJ=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",RJ=e=>{const{forwardCredentials:t,...n}=e;if(!LJ(n))throw new Error('Server is missing required "url", "apiKey" and/or "name" properties');return{...n,forwardCredentials:t==="true"}},DJ=()=>{const{servers:e}=oo(),t=Object.values(e),{selectedServer:n}=rc();return v.jsx(iw.Dropdown,{buttonContent:v.jsxs("span",{className:"flex items-center gap-1.5",children:[v.jsx(De,{icon:yT})," Servers"]}),children:t.length===0?v.jsxs(Ue.Item,{to:"/server/create",children:[v.jsx(De,{icon:bm})," Add a server"]}):v.jsxs(v.Fragment,{children:[t.map(({name:r,id:i})=>v.jsx(Ue.Item,{to:`/server/${i}`,selected:PJ(n)===i,children:r},i)),v.jsx(Ue.Separator,{}),v.jsxs(Ue.Item,{to:"/manage-servers",children:[v.jsx(De,{icon:yT})," Manage servers"]})]})})},kJ=()=>{const{pathname:e}=Cr(),t="/settings";return v.jsxs(iw,{className:"[&]:fixed top-0 z-900",brand:v.jsxs(Rr,{to:"/",className:"[&]:text-white no-underline flex items-center gap-2",children:[v.jsx(Gk,{className:"w-7",color:"white"})," ",v.jsx("small",{className:"font-normal",children:"Shlink"})]}),children:[v.jsxs(iw.MenuItem,{to:t,active:e.startsWith(t),className:"flex items-center gap-1.5",children:[v.jsx(De,{icon:TH})," Settings"]}),v.jsx(DJ,{})]})},Yk=({children:e,title:t})=>v.jsx("div",{className:"pt-4",children:v.jsxs(Ot,{className:"p-4 w-full lg:w-[65%] m-auto",children:[v.jsx("h2",{children:t}),e]})}),Kk=({to:e="/",children:t="Home"})=>v.jsxs(Yk,{title:"Oops! We could not find requested route.",children:[v.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),v.jsx("br",{}),v.jsx(Ct,{inline:!0,to:e,size:"lg",children:t})]}),IJ="%_VERSION_%",zJ=e=>Fk(Vk(e)),Gj=({project:e,version:t})=>v.jsx(Ci,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-gray-500",children:v.jsx("b",{children:t})}),BJ=({selectedServer:e,clientVersion:t=IJ})=>{const n=zJ(t);return v.jsxs("small",{className:"text-gray-500",children:[bC(e)&&v.jsxs(v.Fragment,{children:["Server: ",v.jsx(Gj,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",v.jsx(Gj,{project:"shlink-web-client",version:n})]})},UJ=()=>{const{selectedServer:e}=rc();return v.jsx("div",{className:Oe("text-center",{"md:ml-(--aside-menu-width)":bC(e)}),children:v.jsx(BJ,{selectedServer:e})})};var _a,Qa=".",Zk="function",Xk="string",Qk="__global__",xC="Provider",$J=0,_C=Array.prototype.slice,FJ=function(t,n){var r=t[n];if(r===void 0&&_a.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},A0=function(t){var n;return this.nested[t]||(n=_a.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},Jk=function(t){return t.split(Qa).reduce(FJ,this)},VJ=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var u=0,f=function(m){if(m)throw m;t[u]&&t[u++](r,f)};return f(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},HJ=function(t,n){var r,i;return typeof t===Zk&&(n=t,t=Qk),r=t.split(Qa),i=r.shift(),r.length?A0.call(this,i).middleware(r.join(Qa),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},qJ=function(t,n){return n(t)},Wj=function(t,n){return(t[n]||[]).concat(t.__global__||[])},GJ=function(t,n){var r,i,o,l,u;return this.id,o=this.container,l=this.decorators,u=this.middlewares,r=t+xC,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var h=new n;return delete o[r],o[r]=h,h}},i[t]={configurable:!0,enumerable:!0,get:function(){var h=o[r],m;return h&&(m=Wj(l,t).reduce(qJ,h.$get(o)),delete o[r],delete o[t]),m===void 0?m:VJ(Wj(u,t),t,m,o)}},Object.defineProperties(o,i),this},e8=function(t,n){var r,i;return r=t.split(Qa),this.providerMap[t]&&r.length===1&&!this.container[t+xC]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(A0.call(this,i).provider(r.join(Qa),n),this):GJ.call(this,i,n))},wC=function(t,n){return e8.call(this,t,function(){this.$get=n})},t8=function(t,n,r){var i=arguments.length>3?_C.call(arguments,3):[],o=this;return wC.call(this,t,function(){var u=n,f=i.map(Jk,o.container);return r?new(n.bind.apply(n,[null].concat(f))):u.apply(null,f)})},WJ=function(t,n){return t8.apply(this,[t,n,!0].concat(_C.call(arguments,2)))},YJ=function(t,n){return t8.apply(this,[t,n,!1].concat(_C.call(arguments,2)))},n8=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},r8=function(t,n){var r=t[n];return r||(r={},n8.call(t,n,r)),r},KJ=function(t,n){var r;return r=t.split(Qa),t=r.pop(),n8.call(r.reduce(r8,this.container),t,n),this},ZJ=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},XJ=function(t,n){var r=t.split(Qa);return t=r.pop(),ZJ.call(r.reduce(r8,this.container),t,n),this},i8=function(t,n){var r,i;return typeof t===Zk&&(n=t,t=Qk),r=t.split(Qa),i=r.shift(),r.length?A0.call(this,i).decorator(r.join(Qa),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},QJ=function(t){return this.deferred.push(t),this},JJ=function(t){return(t||[]).map(Jk,this.container)},eee=function(t,n){return wC.call(this,t,function(i){return{instance:n.bind(n,i)}})},tee=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},SC=function(t){return Object.keys(t||this.container||{}).filter(tee)},ey={},nee=function(t){var n;return typeof t===Xk?(n=ey[t],n||(ey[t]=n=new _a,n.constant("BOTTLE_NAME",t)),n):new _a},ree=function(t){typeof t===Xk?delete ey[t]:ey={}},a8=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Yj=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+xC]},iee=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var l=o.split(Qa);l.length>1&&l.forEach(Yj,A0.call(this,l[0])),Yj.call(this,o),this.provider(o,n[o])}},this)},aee=function(t){return this.deferred.forEach(function(r){r(t)}),this};_a=function e(t){if(!(this instanceof e))return e.pop(t);this.id=$J++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:i8.bind(this),$register:a8.bind(this),$list:SC.bind(this)}};_a.prototype={constant:XJ,decorator:i8,defer:QJ,digest:JJ,factory:wC,instanceFactory:eee,list:SC,middleware:HJ,provider:e8,resetProviders:iee,register:a8,resolve:aee,service:WJ,serviceFactory:YJ,value:KJ};_a.pop=nee;_a.clear=ree;_a.list=SC;_a.config={strict:!1};const o8=_a;function Yx(e){return e==null?"":`${e}`}function oee(e={}){const{separator:t,decimals:n}=e;return t?n?r=>r.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function CC(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;if(!t||t===n)return i=>i;const r=new RegExp(t,"g");return i=>(i.includes(t)&&(i=i.replace(r,n)),`${t}${i}${t}`)}function see(e={stringFormatter:CC()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function lee(e={stringFormatter:CC()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}const uee=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function cee(e){var t,n,r;const i=[];let o;for(;o=uee.exec(e);)i.push((r=(t=o[3])!==null&&t!==void 0?t:(n=o[1])===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:o[0]);return i}function Kj(e,t,n){if(t in e){const o=e[t];return o===void 0?n:o}const r=Array.isArray(t)?t:cee(t);let i=e;for(const o of r)if(i=i?.[o],i===void 0)return n;return i}function s8(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function bw(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var Zj;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(Zj||(Zj={}));class fee{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||CC(),i=lee({stringFormatter:r}),o={header:r,undefined:Yx,boolean:Yx,number:oee(),bigint:Yx,string:r,symbol:see({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` `,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:i=>Kj(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:l=>Kj(l,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",l={label:o,default:i},u=r.value;return{label:o,value(f){const h=u(f,l);return h===void 0?i:h}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return bw(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(s8,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return bw(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class l8 extends fee{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((l,u)=>(Object.keys(u).forEach(f=>{l.includes(f)||l.push(f)}),l),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(s8,[])}processData(t){return bw(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var sr;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(sr||(sr={}));sr.QUOTATION_MARK+"",sr.QUOTATION_MARK,sr.REVERSE_SOLIDUS+"",sr.REVERSE_SOLIDUS,sr.SOLIDUS+"",sr.SOLIDUS,sr.LATIN_SMALL_LETTER_B+"",sr.BACKSPACE,sr.LATIN_SMALL_LETTER_F+"",sr.FORM_FEED,sr.LATIN_SMALL_LETTER_N+"",sr.NEWLINE,sr.LATIN_SMALL_LETTER_R+"",sr.CARRIAGE_RETURN,sr.LATIN_SMALL_LETTER_T+"",sr.TAB;var Xj;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(Xj||(Xj={}));var Qj;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"})(Qj||(Qj={}));var Jj;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(Jj||(Jj={}));var eM;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(eM||(eM={}));const EC=(e,t,n=1)=>Lk(n,e+1).map(t),dee=e=>Array.isArray(e)&&e.length===0||typeof e=="string"&&e===""||typeof e=="object"&&Object.keys(e).length===0,Eu=e=>e!=null&&!dee(e),Kx=e=>e||null,xw=e=>e?"true":"false",Zx=e=>e===void 0?void 0:xw(e),hee=e=>{if(e.length<2)return e[0]??"";const[t,...n]=e.reverse();return`${n.reverse().join(", ")} and ${t}`},AC=e=>typeof e=="string"||typeof e=="number"?kn(e):void 0,tM="[&]:p-0 [&]:md:w-1/4 [&]:rounded-none",mee=({onChange:e,className:t})=>{const n=Pn("qrCodes",Gf),{color:r,bgColor:i}=n;return v.jsxs(Ot,{title:"Colors",className:t,bodyClassName:"flex flex-col gap-4",children:[v.jsx(si,{label:"Default color:",helpText:v.jsxs(v.Fragment,{children:["QR codes will initially use ",v.jsx("b",{"data-testid":"color",children:r})," color."]}),type:"color",value:r,onChange:o=>e({...n,color:o.target.value}),inputClassName:tM}),v.jsx(si,{label:"Default background color:",helpText:v.jsxs(v.Fragment,{children:["QR codes will initially use ",v.jsx("b",{"data-testid":"bg-color",children:i})," background color."]}),type:"color",value:i,onChange:o=>e({...n,bgColor:o.target.value}),inputClassName:tM})]})},u8=({errorCorrection:e,onChange:t})=>v.jsxs(Ue,{buttonContent:e?`Error correction (${e})`:v.jsx("i",{children:"Default error correction"}),buttonClassName:"w-full",children:[v.jsxs(Ue.Item,{selected:e==="L",onClick:()=>t("L"),children:[v.jsx("b",{children:"L"}),"ow"]}),v.jsxs(Ue.Item,{selected:e==="M",onClick:()=>t("M"),children:[v.jsx("b",{children:"M"}),"edium"]}),v.jsxs(Ue.Item,{selected:e==="Q",onClick:()=>t("Q"),children:[v.jsx("b",{children:"Q"}),"uartile"]}),v.jsxs(Ue.Item,{selected:e==="H",onClick:()=>t("H"),children:[v.jsx("b",{children:"H"}),"igh"]})]}),pee=["png","svg","webp","jpeg"],c8=({format:e,onChange:t})=>v.jsx(Ue,{buttonContent:`Format (${e})`,buttonClassName:"w-full",children:pee.map(n=>v.jsx(Ue.Item,{selected:e===n,onClick:()=>t(n),children:n},n))}),Yo=({className:e,size:t,...n})=>v.jsx("span",{className:Oe("text-gray-500 dark:text-gray-400",{"text-sm":t==="sm","text-lg":t==="lg"},e),...n}),gee=({onChange:e})=>{const t=Pn("qrCodes",Gf),{format:n,errorCorrection:r}=t;return v.jsxs(Ot,{title:"Format",className:"card",bodyClassName:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(c8,{format:n,onChange:i=>e({...t,format:i})}),v.jsxs(Yo,{size:"sm",children:["When downloading a QR code, it will use ",v.jsx("b",{"data-testid":"format",children:n})," format by default."]})]}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(u8,{errorCorrection:r,onChange:i=>e({...t,errorCorrection:i})}),v.jsxs(Yo,{size:"sm",children:["QR codes will initially have a ",v.jsx("b",{"data-testid":"error-correction",children:r})," error correction."]})]})]})},vee=({onChange:e,className:t})=>{const n=Pn("qrCodes",Gf),{size:r,margin:i}=n;return v.jsxs(Ot,{title:"Size",className:t,bodyClassName:"flex flex-col gap-4",children:[v.jsx(si,{label:"Default dimensions:",helpText:v.jsxs(v.Fragment,{children:["QR codes will be initially generated with ",v.jsxs("b",{"data-testid":"size",children:[r,"x",r,"px"]}),"."]}),type:"range",value:r,step:10,min:50,max:1e3,onChange:o=>e({...n,size:Number(o.target.value)}),inputClassName:"[&]:p-0"}),v.jsx(si,{label:"Default margin:",helpText:v.jsxs(v.Fragment,{children:["QR codes will be initially generated with a ",v.jsxs("b",{"data-testid":"margin",children:[i,"px"]})," margin."]}),type:"range",value:i,step:1,min:0,max:100,onChange:o=>e({...n,margin:Number(o.target.value)}),inputClassName:"[&]:p-0"})]})},_l=({children:e,helpText:t,"data-testid":n,...r})=>v.jsxs("div",{"data-testid":n,children:[v.jsxs(Sa,{className:"flex items-center gap-x-2",children:[v.jsx(tX,{...r}),e]}),t&&v.jsx(Yo,{size:"sm","data-testid":n?`${n}-help-text`:"help-text",className:"pl-10",children:t})]}),yee=({toggleRealTimeUpdates:e,onIntervalChange:t})=>{const{enabled:n,interval:r}=Pn("realTimeUpdates",{enabled:!0});return v.jsxs(Ot,{title:"Real-time updates",className:"h-full",bodyClassName:"flex flex-col gap-y-4",children:[v.jsx(_l,{checked:n,onChange:e,helpText:v.jsxs(v.Fragment,{children:["Real-time updates are currently being ",v.jsx("b",{children:n?"processed":"ignored"}),"."]}),children:"Enable or disable real-time updates."}),v.jsxs("div",{children:[v.jsx(si,{label:v.jsx("span",{className:Oe({"dark:text-gray-400":!n}),children:"Real-time updates frequency (in minutes):"}),type:"number",min:0,placeholder:"Immediate",disabled:!n,value:`${r??""}`,onChange:({target:i})=>t(Number(i.value))}),n&&v.jsx(Yo,{size:"sm",children:r?v.jsxs("span",{children:["Updates will be reflected in the UI every ",v.jsx("b",{children:r})," minute",r>1&&"s","."]}):"Updates will be reflected in the UI as soon as they happen."})]})]})},Xx=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",bee=e=>e==="includes"?v.jsxs(v.Fragment,{children:["The list of suggested tags will contain those ",v.jsx("b",{children:"including"})," provided input."]}):v.jsxs(v.Fragment,{children:["The list of suggested tags will contain those ",v.jsx("b",{children:"starting with"})," provided input."]}),xee=({onChange:e})=>{const t=Pn("shortUrlCreation"),n=r=>()=>e({...t,tagFilteringMode:r});return v.jsxs(Ot,{title:"Short URLs form",className:"card",bodyClassName:"flex flex-col gap-4",children:[v.jsx(_l,{"data-testid":"forward-query",checked:t?.forwardQuery??!0,onChange:r=>e({...t,forwardQuery:r}),helpText:v.jsxs(v.Fragment,{children:["The initial state of the ",v.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",v.jsx("b",{children:t?.forwardQuery??!0?"checked":"unchecked"}),"."]}),children:"Make all new short URLs forward their query params to the long URL."}),v.jsxs("div",{className:"flex flex-col",children:[v.jsx(Sa,{className:"mb-1.5",children:"Tag suggestions search mode:"}),v.jsxs(Ue,{buttonContent:Xx(t?.tagFilteringMode),buttonClassName:"w-full",children:[v.jsx(Ue.Item,{selected:!t?.tagFilteringMode||t.tagFilteringMode==="startsWith",onClick:n("startsWith"),children:Xx("startsWith")}),v.jsx(Ue.Item,{selected:t?.tagFilteringMode==="includes",onClick:n("includes"),children:Xx("includes")})]}),v.jsx(Yo,{size:"sm",className:"mt-0.5",children:bee(t?.tagFilteringMode)})]})]})},_ee={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},wee=({onChange:e,defaultOrdering:t})=>{const n=Pn("shortUrlsList"),r=n?.confirmDeletions??!0;return v.jsxs(Ot,{title:"Short URLs list",className:"card",bodyClassName:"flex flex-col gap-4",children:[v.jsx(_l,{checked:r,onChange:i=>e({...n,confirmDeletions:i}),helpText:v.jsxs(v.Fragment,{children:["When deleting a short URL, confirmation ",v.jsx("b",{children:r?"will":"won't"})," be required."]}),children:"Request confirmation before deleting a short URL."}),v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Sa,{children:"Default ordering for short URLs list:"}),v.jsx(Am,{buttonClassName:"w-full",items:_ee,order:n?.defaultOrdering??t,onChange:i=>e({defaultOrdering:!i.dir&&!i.field?void 0:i})})]})]})},See={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Cee=({onChange:e})=>{const t=Pn("tags",{});return v.jsx(Ot,{title:"Tags",className:"card",children:v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Sa,{children:"Default ordering for tags list:"}),v.jsx(Am,{buttonClassName:"w-full",items:See,order:t.defaultOrdering??{},onChange:n=>e({...t,defaultOrdering:!n.field&&!n.dir?void 0:n})})]})})},Eee=({onChange:e,_matchMedia:t})=>{const n=Pn("ui"),r=x.useMemo(()=>n?.theme??iC(t),[n?.theme,t]);return v.jsxs(Ot,{title:"User interface",bodyClassName:"flex justify-between items-center",children:[v.jsx(_l,{checked:r==="dark",onChange:i=>e({...n,theme:i?"dark":"light"}),children:"Use dark theme."}),v.jsx(De,{icon:r==="dark"?iq:KH})]})},nM={potentialBot:"Potential bot",date:"Date",country:"Country",region:"Region",city:"City",browser:"Browser",os:"OS",userAgent:"User agent",referer:"Referrer",visitedUrl:"Visited URL"},hv={browser:["userAgent"],os:["userAgent"],userAgent:["browser","os"]};Object.freeze(hv);const Aee=({onChange:e})=>{const t=Pn("visitsList"),n=x.useMemo(()=>qf(O0,t?.columns??{}),[t?.columns]),r=x.useCallback((i,o)=>{const l={...n,[i]:o};o&&hv[i]?.forEach(u=>{l[u]=!1}),e({columns:l})},[n,e]);return v.jsxs(Ot,{title:"Visits list",children:[v.jsx("p",{className:"mb-2",children:"Columns to show in visits table:"}),v.jsx("ul",{className:"flex flex-col gap-y-1",children:Object.entries(nM).map(([i,o])=>v.jsx("li",{children:v.jsx(_l,{checked:n[i],onChange:l=>r(i,l),children:v.jsxs("span",{className:"inline-flex gap-2",children:[o,hv[i]&&v.jsxs(Yo,{children:["(excludes ",hee(hv[i].map(l=>nM[l])),")"]})]})})},i))})]})},f8={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},Oee=(e,t)=>!e||e==="all"?t:f8[e],Tee=({onChange:e,active:t,allText:n})=>v.jsxs(Ue,{buttonContent:Oee(t,n),buttonClassName:"w-full",children:[v.jsx(Ue.Item,{selected:t==="all",onClick:()=>e("all"),children:n}),v.jsx(Ue.Separator,{}),Object.entries(f8).map(([r,i])=>v.jsx(Ue.Item,{selected:t===r,onClick:()=>e(r),children:i},r))]}),rM=e=>e?.defaultInterval??"last30Days",jee=({onChange:e})=>{const t=Pn("visits"),n=x.useCallback(({defaultInterval:r,...i})=>e({defaultInterval:r??rM(t),...i}),[e,t]);return v.jsxs(Ot,{title:"Visits",className:"card",bodyClassName:"flex flex-col gap-4",children:[v.jsx(_l,{"data-testid":"exclude-bots",checked:!!t?.excludeBots,onChange:r=>n({excludeBots:r}),helpText:v.jsxs(v.Fragment,{children:["The visits coming from potential bots will be ",v.jsx("b",{children:t?.excludeBots?"excluded":"included"}),"."]}),children:"Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version)."}),v.jsx(_l,{"data-testid":"compare-visits",checked:!!t?.loadPrevInterval,onChange:r=>n({loadPrevInterval:r}),helpText:v.jsxs(v.Fragment,{children:["When loading visits, previous period ",v.jsx("b",{children:t?.loadPrevInterval?"will":"won't"})," be loaded by default."]}),children:"Compare visits with previous period."}),v.jsxs("div",{className:"flex flex-col",children:[v.jsx(Sa,{className:"mb-1.5",children:"Default interval to load on visits sections:"}),v.jsx(Tee,{allText:"All visits",active:rM(t),onChange:r=>n({defaultInterval:r})})]})]})},fh=({children:e,className:t})=>v.jsx("div",{className:Oe("flex flex-col gap-4",t),children:e}),Mee=({settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:n})=>{const r=x.useCallback(f=>t?.(qf(e,f)),[e,t]),i=x.useCallback(f=>r({realTimeUpdates:{enabled:f}}),[r]),o=x.useCallback(f=>r({realTimeUpdates:{interval:f}}),[r]),l=x.useCallback((f,h)=>r({[f]:h}),[r]),u=x.useCallback(f=>l("qrCodes",f),[l]);return v.jsxs(m8,{value:e,children:[v.jsxs(nl,{className:"mb-4 sticky top-(--header-height) z-2",children:[v.jsx(nl.Pill,{to:"../general",children:"General"}),v.jsx(nl.Pill,{to:"../short-urls",children:"Short URLs"}),v.jsx(nl.Pill,{to:"../visits",children:"Visits"}),v.jsx(nl.Pill,{to:"../tags",children:"Tags"}),v.jsx(nl.Pill,{to:"../qr-codes",children:"QR codes"})]}),v.jsxs(Xy,{children:[v.jsx(lt,{path:"general",element:v.jsxs(fh,{children:[v.jsx(Eee,{onChange:f=>l("ui",f)}),v.jsx(yee,{toggleRealTimeUpdates:i,onIntervalChange:o})]})}),v.jsx(lt,{path:"short-urls",element:v.jsxs(fh,{children:[v.jsx(xee,{onChange:f=>l("shortUrlCreation",f)}),v.jsx(wee,{defaultOrdering:n,onChange:f=>l("shortUrlsList",f)})]})}),v.jsx(lt,{path:"visits",element:v.jsxs(fh,{children:[v.jsx(jee,{onChange:f=>l("visits",f)}),v.jsx(Aee,{onChange:f=>l("visitsList",f)})]})}),v.jsx(lt,{path:"tags",element:v.jsx(fh,{children:v.jsx(Cee,{onChange:f=>l("tags",f)})})}),v.jsx(lt,{path:"qr-codes",element:v.jsxs(fh,{children:[v.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[v.jsx(vee,{onChange:u,className:"w-full"}),v.jsx(mee,{onChange:u,className:"w-full"})]}),v.jsx(gee,{onChange:u})]})}),v.jsx(lt,{path:"*",element:v.jsx(OS,{replace:!0,to:"../general"})})]})]})},Gf={size:300,margin:0,color:"#000000",bgColor:"#ffffff",errorCorrection:"L",format:"png"};Object.freeze(Gf);const O0={potentialBot:!0,date:!0,country:!0,region:!1,city:!0,browser:!0,os:!0,userAgent:!1,referer:!0,visitedUrl:!0};Object.freeze(O0);const d8={realTimeUpdates:{enabled:!0},shortUrlCreation:{},visits:{defaultInterval:"last30Days"},visitsList:{columns:O0},shortUrlsList:{defaultOrdering:{field:"dateCreated",dir:"DESC"}},qrCodes:Gf},h8=x.createContext(d8),{Provider:m8}=h8,OC=()=>x.useContext(h8)??d8;function Pn(e,t){return OC()[e]??t}const TC=6048e5,Pee=864e5,p8=6e4,jC=36e5,zg=43200,iM=1440,aM=Symbol.for("constructDateFrom");function Sr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&aM in e?e[aM](t):e instanceof Date?new e.constructor(t):new Date(t)}function ut(e,t){return Sr(t||e,e)}function MC(e,t,n){const r=ut(e,n?.in);return isNaN(t)?Sr(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Nee(e,t,n){const r=ut(e,n?.in);if(isNaN(t))return Sr(e,NaN);if(!t)return r;const i=r.getDate(),o=Sr(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const l=o.getDate();return i>=l?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function Lee(e,t,n){const{years:r=0,months:i=0,weeks:o=0,days:l=0,hours:u=0,minutes:f=0,seconds:h=0}=t,m=ut(e,n?.in),p=i||r?Nee(m,i+r*12):m,b=l||o?MC(p,l+o*7):p,_=f+u*60,S=(h+_*60)*1e3;return Sr(e,+b+S)}let Ree={};function Pm(){return Ree}function $u(e,t){const n=Pm(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ut(e,t?.in),o=i.getDay(),l=(o=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Of(e){const t=ut(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ic(e,...t){const n=Sr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function Fu(e,t){const n=ut(e,t?.in);return n.setHours(0,0,0,0),n}function T0(e,t,n){const[r,i]=ic(n?.in,e,t),o=Fu(r),l=Fu(i),u=+o-Of(o),f=+l-Of(l);return Math.round((u-f)/Pee)}function Dee(e,t){const n=g8(e,t),r=Sr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),tm(r)}function v8(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Sr.bind(null,i));const o=ut(i,r);(!n||n{!r&&typeof i=="object"&&(r=Sr.bind(null,i));const o=ut(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),Sr(r,n||NaN)}function mv(e,t){const n=+ut(e)-+ut(t);return n<0?-1:n>0?1:n}function Iee(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zee(e){return!(!Iee(e)&&typeof e!="number"||isNaN(+ut(e)))}function ty(e,t,n){const[r,i]=ic(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),l=r.getMonth()-i.getMonth();return o*12+l}function Bee(e,t,n){const[r,i]=ic(n?.in,e,t),o=$u(r,n),l=$u(i,n),u=+o-Of(o),f=+l-Of(l);return Math.round((u-f)/TC)}function y8(e,t,n){const[r,i]=ic(n?.in,e,t),o=oM(r,i),l=Math.abs(T0(r,i));r.setDate(r.getDate()-o*l);const u=+(oM(r,i)===-o),f=o*(l-u);return f===0?0:f}function oM(e,t){const 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 b8(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function Uee(e,t,n){const[r,i]=ic(n?.in,e,t),o=(+r-+i)/jC;return b8(n?.roundingMethod)(o)}function $ee(e,t){return+ut(e)-+ut(t)}function Tf(e,t){const n=ut(e,t?.in);return n.setHours(23,59,59,999),n}function Fee(e,t){const n=ut(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Vee(e,t){const n=ut(e,t?.in);return+Tf(n,t)==+Fee(n,t)}function Hee(e,t,n){const[r,i,o]=ic(n?.in,e,e,t),l=mv(i,o),u=Math.abs(ty(i,o));if(u<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-l*u);let f=mv(i,o)===-l;Vee(r)&&u===1&&mv(r,o)===1&&(f=!1);const h=l*(u-+f);return h===0?0:h}function qee(e,t,n){const r=$ee(e,t)/1e3;return b8(n?.roundingMethod)(r)}function Gee(e,t){const n=ut(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Wee(e,t){const n=t?.weekStartsOn,r=ut(e,t?.in),i=r.getDay(),o=(i{let r;const i=Kee[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Qx(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Xee={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qee={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Jee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ete={date:Qx({formats:Xee,defaultWidth:"full"}),time:Qx({formats:Qee,defaultWidth:"full"}),dateTime:Qx({formats:Jee,defaultWidth:"full"})},tte={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nte=(e,t,n,r)=>tte[e];function dh(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):l;i=e.formattingValues[u]||e.formattingValues[l]}else{const l=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const rte={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ite={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ate={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"]},ote={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"]},ste={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"}},lte={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"}},ute=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},cte={ordinalNumber:ute,era:dh({values:rte,defaultWidth:"wide"}),quarter:dh({values:ite,defaultWidth:"wide",argumentCallback:e=>e-1}),month:dh({values:ate,defaultWidth:"wide"}),day:dh({values:ote,defaultWidth:"wide"}),dayPeriod:dh({values:ste,defaultWidth:"wide",formattingValues:lte,defaultFormattingWidth:"wide"})};function hh(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const l=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(u)?dte(u,p=>p.test(l)):fte(u,p=>p.test(l));let h;h=e.valueCallback?e.valueCallback(f):f,h=n.valueCallback?n.valueCallback(h):h;const m=t.slice(l.length);return{value:h,rest:m}}}function fte(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dte(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(i.length);return{value:l,rest:u}}}const mte=/^(\d+)(th|st|nd|rd)?/i,pte=/\d+/i,gte={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},vte={any:[/^b/i,/^(a|c)/i]},yte={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bte={any:[/1/i,/2/i,/3/i,/4/i]},xte={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},_te={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]},wte={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},Ste={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]},Cte={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},Ete={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}},Ate={ordinalNumber:hte({matchPattern:mte,parsePattern:pte,valueCallback:e=>parseInt(e,10)}),era:hh({matchPatterns:gte,defaultMatchWidth:"wide",parsePatterns:vte,defaultParseWidth:"any"}),quarter:hh({matchPatterns:yte,defaultMatchWidth:"wide",parsePatterns:bte,defaultParseWidth:"any",valueCallback:e=>e+1}),month:hh({matchPatterns:xte,defaultMatchWidth:"wide",parsePatterns:_te,defaultParseWidth:"any"}),day:hh({matchPatterns:wte,defaultMatchWidth:"wide",parsePatterns:Ste,defaultParseWidth:"any"}),dayPeriod:hh({matchPatterns:Cte,defaultMatchWidth:"any",parsePatterns:Ete,defaultParseWidth:"any"})},x8={code:"en-US",formatDistance:Zee,formatLong:ete,formatRelative:nte,localize:cte,match:Ate,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ote(e,t){const n=ut(e,t?.in);return T0(n,Gee(n))+1}function Tte(e,t){const n=ut(e,t?.in),r=+tm(n)-+Dee(n);return Math.round(r/TC)+1}function _8(e,t){const n=ut(e,t?.in),r=n.getFullYear(),i=Pm(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=Sr(t?.in||e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const u=$u(l,t),f=Sr(t?.in||e,0);f.setFullYear(r,0,o),f.setHours(0,0,0,0);const h=$u(f,t);return+n>=+u?r+1:+n>=+h?r:r-1}function jte(e,t){const n=Pm(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=_8(e,t),o=Sr(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),$u(o,t)}function Mte(e,t){const n=ut(e,t?.in),r=+$u(n,t)-+jte(n,t);return Math.round(r/TC)+1}function xt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Qs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return xt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):xt(n+1,2)},d(e,t){return xt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return xt(e.getHours()%12||12,t.length)},H(e,t){return xt(e.getHours(),t.length)},m(e,t){return xt(e.getMinutes(),t.length)},s(e,t){return xt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return xt(i,t.length)}},rf={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sM={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Qs.y(e,t)},Y:function(e,t,n,r){const i=_8(e,r),o=i>0?i:1-i;if(t==="YY"){const l=o%100;return xt(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):xt(o,t.length)},R:function(e,t){const n=g8(e);return xt(n,t.length)},u:function(e,t){const n=e.getFullYear();return xt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return xt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return xt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Qs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return xt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Mte(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):xt(i,t.length)},I:function(e,t,n){const r=Tte(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):xt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Qs.d(e,t)},D:function(e,t,n){const r=Ote(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):xt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return xt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return xt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return xt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=rf.noon:r===0?i=rf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=rf.evening:r>=12?i=rf.afternoon:r>=4?i=rf.morning:i=rf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Qs.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Qs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):xt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):xt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Qs.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Qs.s(e,t)},S:function(e,t){return Qs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return uM(r);case"XXXX":case"XX":return _u(r);default:return _u(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return uM(r);case"xxxx":case"xx":return _u(r);default:return _u(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+lM(r,":");default:return"GMT"+_u(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+lM(r,":");default:return"GMT"+_u(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return xt(r,t.length)},T:function(e,t,n){return xt(+e,t.length)}};function lM(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+xt(o,2)}function uM(e,t){return e%60===0?(e>0?"-":"+")+xt(Math.abs(e)/60,2):_u(e,t)}function _u(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=xt(Math.trunc(r/60),2),o=xt(r%60,2);return n+i+t+o}const cM=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},w8=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Pte=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return cM(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",cM(r,t)).replace("{{time}}",w8(i,t))},Nte={p:w8,P:Pte},Lte=/^D+$/,Rte=/^Y+$/,Dte=["D","DD","YY","YYYY"];function kte(e){return Lte.test(e)}function Ite(e){return Rte.test(e)}function zte(e,t,n){const r=Bte(e,t,n);if(console.warn(r),Dte.includes(e))throw new RangeError(r)}function Bte(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ute=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$te=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fte=/^'([^]*?)'?$/,Vte=/''/g,Hte=/[a-zA-Z]/;function ny(e,t,n){const r=Pm(),i=r.locale??x8,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=ut(e,n?.in);if(!zee(u))throw new RangeError("Invalid time value");let f=t.match($te).map(m=>{const p=m[0];if(p==="p"||p==="P"){const b=Nte[p];return b(m,i.formatLong)}return m}).join("").match(Ute).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const p=m[0];if(p==="'")return{isToken:!1,value:qte(m)};if(sM[p])return{isToken:!0,value:m};if(p.match(Hte))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(f=i.localize.preprocessor(u,f));const h={firstWeekContainsDate:o,weekStartsOn:l,locale:i};return f.map(m=>{if(!m.isToken)return m.value;const p=m.value;(Ite(p)||kte(p))&&zte(p,t,String(e));const b=sM[p[0]];return b(u,p,i.localize,h)}).join("")}function qte(e){const t=e.match(Fte);return t?t[1].replace(Vte,"'"):e}function Gte(e,t,n){const r=Pm(),i=n?.locale??r.locale??x8,o=2520,l=mv(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const u=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:l}),[f,h]=ic(n?.in,...l>0?[t,e]:[e,t]),m=qee(h,f),p=(Of(h)-Of(f))/1e3,b=Math.round((m-p)/60);let _;if(b<2)return b===0?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",b,u);if(b<45)return i.formatDistance("xMinutes",b,u);if(b<90)return i.formatDistance("aboutXHours",1,u);if(b+ut(t)}function ry(e,t){return+ut(e)<+ut(t)}function _w(e,t){return+ut(e)==+ut(t)}function Kte(e,t,n){const r=+ut(e,n?.in),[i,o]=[+ut(t.start,n?.in),+ut(t.end,n?.in)].sort((l,u)=>l-u);return r>=i&&r<=o}function iy(e,t,n){return MC(e,-t,n)}function Vu(e,t){const n=()=>Sr(t?.in,NaN),i=Jte(e);let o;if(i.date){const h=ene(i.date,2);o=tne(h.restDateString,h.year)}if(!o||isNaN(+o))return n();const l=+o;let u=0,f;if(i.time&&(u=nne(i.time),isNaN(u)))return n();if(i.timezone){if(f=rne(i.timezone),isNaN(f))return n()}else{const h=new Date(l+u),m=ut(0,t?.in);return m.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),m.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),m}return ut(l+u+f,t?.in)}const Bg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Zte=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Xte=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Qte=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Jte(e){const t={},n=e.split(Bg.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Bg.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Bg.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=Bg.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function ene(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const 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 tne(e,t){if(t===null)return new Date(NaN);const n=e.match(Zte);if(!n)return new Date(NaN);const r=!!n[4],i=mh(n[1]),o=mh(n[2])-1,l=mh(n[3]),u=mh(n[4]),f=mh(n[5])-1;if(r)return lne(t,u,f)?ine(t,u,f):new Date(NaN);{const h=new Date(0);return!one(t,o,l)||!sne(t,i)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(i,l)),h)}}function mh(e){return e?parseInt(e):1}function nne(e){const t=e.match(Xte);if(!t)return NaN;const n=Jx(t[1]),r=Jx(t[2]),i=Jx(t[3]);return une(n,r,i)?n*jC+r*p8+i*1e3:NaN}function Jx(e){return e&&parseFloat(e.replace(",","."))||0}function rne(e){if(e==="Z")return 0;const t=e.match(Qte);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return cne(r,i)?n*(r*jC+i*p8):NaN}function ine(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const ane=[31,null,31,30,31,30,31,31,30,31,30,31];function C8(e){return e%400===0||e%4===0&&e%100!==0}function one(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(ane[t]||(C8(e)?29:28))}function sne(e,t){return t>=1&&t<=(C8(e)?366:365)}function lne(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function une(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function cne(e,t){return t>=0&&t<=59}const fne={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},E8={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},it={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},jr={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},el={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"};class Ae{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(o=>parseInt(o,10)||0);n.push(0);const r=n[0],i=n[1];if(r===10)switch(i){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(r){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=Ae.getVersionPrecision(t),o=Ae.getVersionPrecision(n);let l=Math.max(i,o),u=0;const f=Ae.map([t,n],h=>{const m=l-Ae.getVersionPrecision(h),p=h+new Array(m+1).join(".0");return Ae.map(p.split("."),b=>new Array(20-b.length).join("0")+b).reverse()});for(r&&(u=l-Math.min(i,o)),l-=1;l>=u;){if(f[0][l]>f[1][l])return 1;if(f[0][l]===f[1][l]){if(l===u)return 0;l-=1}else if(f[0][l]{r[f]=l[f]})}return t}static getBrowserAlias(t){return fne[t]}static getBrowserTypeByAlias(t){return E8[t]||""}}const rt=/version\/(\d+(\.?_?\d+)+)/i,dne=[{test:[/gptbot/i],describe(e){const t={name:"GPTBot"},n=Ae.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){const t={name:"ChatGPT-User"},n=Ae.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){const t={name:"OAI-SearchBot"},n=Ae.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(e){const t={name:"ClaudeBot"},n=Ae.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){const t={name:"Omgilibot"},n=Ae.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){const t={name:"Diffbot"},n=Ae.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){const t={name:"PerplexityBot"},n=Ae.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){const t={name:"Perplexity-User"},n=Ae.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){const t={name:"YouBot"},n=Ae.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){const t={name:"Meta-WebIndexer"},n=Ae.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){const t={name:"Meta-ExternalAds"},n=Ae.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){const t={name:"Meta-ExternalAgent"},n=Ae.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){const t={name:"Meta-ExternalFetcher"},n=Ae.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=Ae.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){const t={name:"AmazonBot"},n=Ae.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){const t={name:"BingCrawler"},n=Ae.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){const t={name:"BaiduSpider"},n=Ae.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){const t={name:"DuckDuckBot"},n=Ae.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){const t={name:"InternetArchiveCrawler"},n=Ae.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe(){return{name:"FacebookExternalHit"}}},{test:[/yahoo!?[\s/]*slurp/i],describe(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe(){return{name:"PingdomBot"}}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=Ae.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=Ae.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=Ae.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=Ae.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=Ae.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=Ae.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=Ae.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Ae.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=Ae.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=Ae.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=Ae.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=Ae.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=Ae.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=Ae.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=Ae.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=Ae.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=Ae.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=Ae.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=Ae.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=Ae.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){const t={name:"LibreWolf"},n=Ae.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=Ae.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=Ae.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(e){const t={name:"Sogou Browser"},n=Ae.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=Ae.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=Ae.getFirstMatch(/se ([\d.]+)x/i,e),o=n||r||i;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=Ae.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=Ae.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=Ae.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=Ae.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:Ae.getFirstMatch(i,e),version:Ae.getSecondMatch(i,e)}}}],hne=[{test:[/Roku\/DVP/],describe(e){const t=Ae.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:jr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=Ae.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:jr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=Ae.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Ae.getWindowsVersionName(t);return{name:jr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:jr.iOS},n=Ae.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=Ae.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Ae.getMacOSVersionName(t),r={name:jr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=Ae.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:jr.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){const t=Ae.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:jr.HarmonyOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=Ae.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Ae.getAndroidVersionName(t),r={name:jr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=Ae.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:jr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=Ae.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Ae.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Ae.getFirstMatch(/\bbb(\d+)/i,e);return{name:jr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=Ae.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:jr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=Ae.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:jr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:jr.Linux}}},{test:[/CrOS/],describe(){return{name:jr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=Ae.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:jr.PlayStation4,version:t}}}],mne=[{test:[/googlebot/i],describe(){return{type:it.bot,vendor:"Google"}}},{test:[/amazonbot/i],describe(){return{type:it.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe(){return{type:it.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe(){return{type:it.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe(){return{type:it.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe(){return{type:it.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe(){return{type:it.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe(){return{type:it.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(){return{type:it.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe(){return{type:it.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe(){return{type:it.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe(){return{type:it.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe(){return{type:it.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe(){return{type:it.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe(){return{type:it.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/yahoo/i],describe(){return{type:it.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe(){return{type:it.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe(){return{type:it.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe(e){const t=Ae.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:it.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:it.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:it.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:it.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:it.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:it.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:it.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=Ae.getFirstMatch(/(ipod|iphone)/i,e);return{type:it.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:it.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=Ae.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:it.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:it.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:it.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:it.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:it.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:it.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:it.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:it.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:it.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:it.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:it.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:it.tv}}}],pne=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:el.Blink};const n=Ae.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:el.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:el.Trident},n=Ae.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:el.Presto},n=Ae.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:el.Gecko},n=Ae.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:el.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:el.WebKit},n=Ae.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class fM{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=Ae.find(dne,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=Ae.find(hne,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=Ae.find(mne,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=Ae.find(pne,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Ae.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(u=>{const f=t[u];typeof f=="string"?(i[u]=f,o+=1):typeof f=="object"&&(n[u]=f,r+=1)}),r>0){const u=Object.keys(n),f=Ae.find(u,m=>this.isOS(m));if(f){const m=this.satisfies(n[f]);if(m!==void 0)return m}const h=Ae.find(u,m=>this.isPlatform(m));if(h){const m=this.satisfies(n[h]);if(m!==void 0)return m}}if(o>0){const u=Object.keys(i),f=Ae.find(u,h=>this.isBrowser(h,!0));if(f!==void 0)return this.compareVersion(i[f])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=Ae.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(Ae.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}class gne{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new fM(t,n)}static parse(t){return new fM(t).getResult()}static get BROWSER_MAP(){return E8}static get ENGINE_MAP(){return el}static get OS_MAP(){return jr}static get PLATFORMS_MAP(){return it}}const PC={INVALID_ARGUMENT:"https://shlink.io/api/error/invalid-data",INVALID_SHORT_URL_DELETION:"https://shlink.io/api/error/invalid-short-url-deletion",DOMAIN_NOT_FOUND:"https://shlink.io/api/error/domain-not-found",FORBIDDEN_OPERATION:"https://shlink.io/api/error/forbidden-tag-operation",INVALID_SLUG:"https://shlink.io/api/error/non-unique-slug",INVALID_SHORTCODE:"https://shlink.io/api/error/short-url-not-found",TAG_CONFLICT:"https://shlink.io/api/error/tag-conflict",TAG_NOT_FOUND:"https://shlink.io/api/error/tag-not-found",MERCURE_NOT_CONFIGURED:"https://shlink.io/api/error/mercure-not-configured",INVALID_AUTHORIZATION:"https://shlink.io/api/error/missing-authentication",INVALID_API_KEY:"https://shlink.io/api/error/invalid-api-key",NOT_FOUND:"https://shlink.io/api/error/not-found",INVALID_URL:"https://shlink.io/api/error/invalid-url"};Object.freeze(PC);var pv={exports:{}},vne=pv.exports,dM;function yne(){return dM||(dM=1,(function(e,t){(function(n,r){e.exports=r()})(vne,(()=>(()=>{var n={873:(l,u)=>{var f,h,m=(function(){var p=function(ie,ue){var Y=ie,z=T[ue],I=null,H=0,k=null,j=[],q={},J=function(V,Q){I=(function(te){for(var he=new Array(te),xe=0;xe=7&&ye(V),k==null&&(k=W(Y,z,j)),R(k,Q)},se=function(V,Q){for(var te=-1;te<=7;te+=1)if(!(V+te<=-1||H<=V+te))for(var he=-1;he<=7;he+=1)Q+he<=-1||H<=Q+he||(I[V+te][Q+he]=0<=te&&te<=6&&(he==0||he==6)||0<=he&&he<=6&&(te==0||te==6)||2<=te&&te<=4&&2<=he&&he<=4)},me=function(){for(var V=8;V>te&1)==1;I[Math.floor(te/3)][te%3+H-8-3]=he}for(te=0;te<18;te+=1)he=!V&&(Q>>te&1)==1,I[te%3+H-8-3][Math.floor(te/3)]=he},D=function(V,Q){for(var te=z<<3|Q,he=P.getBCHTypeInfo(te),xe=0;xe<15;xe+=1){var Le=!V&&(he>>xe&1)==1;xe<6?I[xe][8]=Le:xe<8?I[xe+1][8]=Le:I[H-15+xe][8]=Le}for(xe=0;xe<15;xe+=1)Le=!V&&(he>>xe&1)==1,xe<8?I[8][H-xe-1]=Le:xe<9?I[8][15-xe-1+1]=Le:I[8][15-xe-1]=Le;I[H-8][8]=!V},R=function(V,Q){for(var te=-1,he=H-1,xe=7,Le=0,ke=P.getMaskFunction(Q),Ye=H-1;Ye>0;Ye-=2)for(Ye==6&&(Ye-=1);;){for(var Je=0;Je<2;Je+=1)if(I[he][Ye-Je]==null){var Ke=!1;Le>>xe&1)==1),ke(he,Ye-Je)&&(Ke=!Ke),I[he][Ye-Je]=Ke,(xe-=1)==-1&&(Le+=1,xe=7)}if((he+=te)<0||H<=he){he-=te,te=-te;break}}},W=function(V,Q,te){for(var he=$.getRSBlocks(V,Q),xe=G(),Le=0;Le8*Ye)throw"code length overflow. ("+xe.getLengthInBits()+">"+8*Ye+")";for(xe.getLengthInBits()+4<=8*Ye&&xe.put(0,4);xe.getLengthInBits()%8!=0;)xe.putBit(!1);for(;!(xe.getLengthInBits()>=8*Ye||(xe.put(236,8),xe.getLengthInBits()>=8*Ye));)xe.put(17,8);return(function(Je,Ke){for(var at=0,Bt=0,pt=0,Rt=new Array(Ke.length),mt=new Array(Ke.length),Qe=0;Qe=0?Gn.getAt(en):0}}var Sn=0;for(nt=0;ntKe)&&(ke=Ke,Ye=Je)}return Ye})())},q.createTableTag=function(V,Q){V=V||2;var te="";te+='";for(var xe=0;xe';te+=""}return(te+="")+"
"},q.createSvgTag=function(V,Q,te,he){var xe={};typeof arguments[0]=="object"&&(V=(xe=arguments[0]).cellSize,Q=xe.margin,te=xe.alt,he=xe.title),V=V||2,Q=Q===void 0?4*V:Q,(te=typeof te=="string"?{text:te}:te||{}).text=te.text||null,te.id=te.text?te.id||"qrcode-description":null,(he=typeof he=="string"?{text:he}:he||{}).text=he.text||null,he.id=he.text?he.id||"qrcode-title":null;var Le,ke,Ye,Je,Ke=q.getModuleCount()*V+2*Q,at="";for(Je="l"+V+",0 0,"+V+" -"+V+",0 0,-"+V+"z ",at+=''+ae(he.text)+"":"",at+=te.text?''+ae(te.text)+"":"",at+='',at+='"},q.createDataURL=function(V,Q){V=V||2,Q=Q===void 0?4*V:Q;var te=q.getModuleCount()*V+2*Q,he=Q,xe=te-Q;return be(te,te,(function(Le,ke){if(he<=Le&&Le"};var ae=function(V){for(var Q="",te=0;te":Q+=">";break;case"&":Q+="&";break;case'"':Q+=""";break;default:Q+=he}}return Q};return q.createASCII=function(V,Q){if((V=V||1)<2)return(function(Rt){Rt=Rt===void 0?2:Rt;var mt,Qe,Dt,gn,nt,qn=1*q.getModuleCount()+2*Rt,Gn=Rt,en=qn-Rt,Sn={"██":"█","█ ":"▀"," █":"▄"," ":" "},mr={"██":"▀","█ ":"▀"," █":" "," ":" "},Yt="";for(mt=0;mt=en?mr[nt]:Sn[nt];Yt+=` `}return qn%2&&Rt>0?Yt.substring(0,Yt.length-qn-1)+Array(qn+1).join("▀"):Yt.substring(0,Yt.length-1)})(Q);V-=1,Q=Q===void 0?2*V:Q;var te,he,xe,Le,ke=q.getModuleCount()*V+2*Q,Ye=Q,Je=ke-Q,Ke=Array(V+1).join("██"),at=Array(V+1).join(" "),Bt="",pt="";for(te=0;te Shlink — The URL shortener - + diff --git a/dependabot/npm_and_yarn/react-945e18fcf3/service-worker.js b/dependabot/npm_and_yarn/react-945e18fcf3/service-worker.js index e2c8ce32..fcab08e0 100644 --- a/dependabot/npm_and_yarn/react-945e18fcf3/service-worker.js +++ b/dependabot/npm_and_yarn/react-945e18fcf3/service-worker.js @@ -1,2 +1,2 @@ try{self["workbox:core:7.3.0"]&&_()}catch{}const G=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},Q=G;class l extends Error{constructor(e,t){const n=Q(e,t);super(n),this.name=e,this.details=t}}const j=new Set;function z(s){j.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 K(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 a=K(e.url,t);if(e.url===a)return s.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,r);for(const c of i){const o=K(c.url,t);if(a===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 j)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 A(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 l("cross-origin-copy-response",{origin:t});const n=s.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=Y()?n.body:await n.blob();return new Response(i,r)}function ae(){self.addEventListener("activate",()=>self.clients.claim())}const re=(s,e)=>e.some(t=>s instanceof t);let O,S;function ie(){return O||(O=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ce(){return S||(S=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const F=new WeakMap,P=new WeakMap,H=new WeakMap,L=new WeakMap,I=new WeakMap;function oe(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",r),s.removeEventListener("error",i)},r=()=>{t(f(s.result)),a()},i=()=>{n(s.error),a()};s.addEventListener("success",r),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&F.set(t,s)}).catch(()=>{}),I.set(e,s),e}function he(s){if(P.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",r),s.removeEventListener("error",i),s.removeEventListener("abort",i)},r=()=>{t(),a()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",r),s.addEventListener("error",i),s.addEventListener("abort",i)});P.set(s,e)}let k={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return P.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 le(s){k=s(k)}function ue(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(D(this),e,...t);return H.set(n,e.sort?e.sort():[e]),f(n)}:ce().includes(s)?function(...e){return s.apply(D(this),e),f(F.get(this))}:function(...e){return f(s.apply(D(this),e))}}function de(s){return typeof s=="function"?ue(s):(s instanceof IDBTransaction&&he(s),re(s,ie())?new Proxy(s,k):s)}function f(s){if(s instanceof IDBRequest)return oe(s);if(L.has(s))return L.get(s);const e=de(s);return e!==s&&(L.set(s,e),I.set(e,s)),e}const D=s=>I.get(s);function fe(s,e,{blocked:t,upgrade:n,blocking:a,terminated:r}={}){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=>{r&&o.addEventListener("close",()=>r()),a&&o.addEventListener("versionchange",h=>a(h.oldVersion,h.newVersion,h))}).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"],U=new Map;function W(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(U.get(e))return U.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=me.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||ge.includes(t)))return;const r=async function(i,...c){const o=this.transaction(i,a?"readwrite":"readonly");let h=o.store;return n&&(h=h.index(c.shift())),(await Promise.all([h[t](...c),a&&o.done]))[0]};return U.set(e,r),r}le(s=>({...s,get:(e,t,n)=>W(e,t)||s.get(e,t,n),has:(e,t)=>!!W(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.3.0"]&&_()}catch{}const we="workbox-expiration",w="cache-entries",B=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class ye{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(w,{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=B(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(w,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const n=await(await this.getDb()).get(w,this._getId(e));return n?.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(w).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp=t?r.push(a.value):i++),a=await a.continue()}const c=[];for(const o of r)await n.delete(w,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+B(e)}async getDb(){return this._db||(this._db=await fe(we,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class _e{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 ye(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 a of t)await n.delete(a,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(!r)return null;const i=this._isResponseDateFresh(r),c=this._getCacheExpiration(a);q(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&z(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===x.getRuntimeName())throw new l("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new _e(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"),a=new Date(t).getTime();return isNaN(a)?null:a}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:7.3.0"]&&_()}catch{}const be="__WB_REVISION__";function Ce(s){if(!s)throw new l("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const r=new URL(s,location.href);return{cacheKey:r.href,url:r.href}}const{revision:e,url:t}=s;if(!t)throw new l("add-to-cache-list-unexpected-type",{entry:s});if(!e){const r=new URL(t,location.href);return{cacheKey:r.href,url:r.href}}const n=new URL(t,location.href),a=new URL(t,location.href);return n.searchParams.set(be,e),{cacheKey:n.href,url:a.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 a=t.originalRequest.url;n?this.notUpdatedURLs.push(a):this.updatedURLs.push(a)}return n}}}class Ee{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const a=n?.cacheKey||this._precacheController.getCacheKeyForURL(t.url);return a?new Request(a,{headers:t.headers}):t},this._precacheController=e}}try{self["workbox:strategies:7.3.0"]&&_()}catch{}function b(s){return typeof s=="string"?new Request(s):s}class Le{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=b(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const a=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 l("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=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:r,response:i});return i}catch(i){throw a&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:a.clone(),request:r.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=b(e);let n;const{cacheName:a,matchOptions:r}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},r),{cacheName:a});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:r,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=b(e);await se(0);const a=await this.getCacheKey(n,"write");if(!t)throw new l("cache-put-with-no-response",{url:te(a.url)});const r=await this._ensureResponseSafeToCache(t);if(!r)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),h=this.hasCallback("cacheDidUpdate"),g=h?await X(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,h?r.clone():r)}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:r.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const r of this.iterateCallbacks("cacheKeyWillBeUsed"))a=b(await r({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}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 r=>{const i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){const e=this._extendLifetimePromises.splice(0),n=(await Promise.allSettled(e)).find(a=>a.status==="rejected");if(n)throw n.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({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,a="params"in e?e.params:void 0,r=new Le(this,{event:t,request:n,params:a}),i=this._getResponse(r,n,t),c=this._awaitComplete(i,r,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new l("no-response",{url:t.url})}catch(r){if(r instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(a=await i({error:r,event:n,request:t}),a)break}if(!a)throw r}for(const r of e.iterateCallbacks("handlerWillRespond"))a=await r({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let r,i;try{r=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:r}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:r,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 a=t.params||{};if(this._fallbackToNetwork){const r=a.integrity,i=e.integrity,c=!i||i===r;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?i||r:void 0})),r&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new l("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 l("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,a]of this.plugins.entries())a!==p.copyRedirectedCacheableResponsesPlugin&&(a===p.defaultPrecacheCacheabilityPlugin&&(e=n),a.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 De{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:a,url:r}=Ce(n),i=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(r)&&this._urlsToCacheKeys.get(r)!==a)throw new l("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(r),secondEntry:a});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==n.integrity)throw new l("add-to-cache-list-conflicting-integrities",{url:r});this._cacheKeysToIntegrities.set(a,n.integrity)}if(this._urlsToCacheKeys.set(r,a),this._urlsToCacheModes.set(r,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 A(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),h=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:h,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}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 l("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 T;const M=()=>(T||(T=new De),T);try{self["workbox:routing:7.3.0"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class R{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class Ue extends R{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class Te{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(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,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 a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,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 h;try{h=c.handle({url:n,request:e,event:t,params:r})}catch(u){h=Promise.reject(u)}const g=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||g)&&(h=h.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:r})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});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 l("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 l("unregister-route-route-not-registered")}}let y;const Pe=()=>(y||(y=new Te,y.addFetchListener(),y.addCacheListener()),y);function v(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new R(i,e,t)}else if(s instanceof RegExp)n=new Ue(s,e,t);else if(typeof s=="function")n=new R(s,e,t);else if(s instanceof R)n=s;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Pe().registerRoute(n),n}function ke(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Ie(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=ke(r,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(a){const c=a({url:r});for(const o of c)yield o.href}}class Me extends R{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of Ie(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ve(s){const e=M(),t=new Me(e,s);v(t)}function Ne(s){return M().createHandlerBoundToURL(s)}function Ke(s){M().precache(s)}function Ae(s,e){Ke(s),ve(e)}const Oe={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Se extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Oe)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new l("no-response",{url:e.url,error:r});return a}}const We="/shlink-web-client/dependabot/npm_and_yarn/react-945e18fcf3",Be={homepage:We};ae();Ae([{"revision":"4638ef86ace4de43867dd1ae23f0fa99","url":"index.html"},{"revision":null,"url":"assets/index-BZszQhq6.css"},{"revision":null,"url":"assets/index-BUyuhTRP.js"},{"revision":"f3e729bb644bebe1dcffadcbba68f1ff","url":"icons/icon-1024x1024.png"},{"revision":"cd508d134aa805268381ead58279489b","url":"icons/icon-114x114.png"},{"revision":"0812cd0c539ec3bc3880201497ef5439","url":"icons/icon-120x120.png"},{"revision":"db11b5c2a48fbba615b39792e40f4c87","url":"icons/icon-128x128.png"},{"revision":"eb6d6cdd19cac779b6d7ac97463b888e","url":"icons/icon-144x144.png"},{"revision":"6088b31c860949672f7df75fccf9a9ba","url":"icons/icon-150x150.png"},{"revision":"e6f72b1eaa19a7c204b01f5d432b8d12","url":"icons/icon-152x152.png"},{"revision":"0e45616d9a2ada37a8cc9f27a670ca31","url":"icons/icon-160x160.png"},{"revision":"d1006b686a7ab98a5620b415792a33a6","url":"icons/icon-167x167.png"},{"revision":"d42b11e07581fa319271ae71f7093811","url":"icons/icon-16x16.png"},{"revision":"78f75b82e4ce73706359d19cb87c3b00","url":"icons/icon-180x180.png"},{"revision":"a536b5cee1e4a64fd54fc4be7b77efcf","url":"icons/icon-192x192.png"},{"revision":"9e994d55a0485b6bbaad7e63b13a0ef5","url":"icons/icon-196x196.png"},{"revision":"786e390718d25939056e8ef85e264d8a","url":"icons/icon-228x228.png"},{"revision":"556d9b9e027c4411745496790753cd73","url":"icons/icon-24x24.png"},{"revision":"7642a0a1530b73e8818bceceb3d3e7e2","url":"icons/icon-256x256.png"},{"revision":"06d7a4a92102470e88880d42920c7549","url":"icons/icon-310x310.png"},{"revision":"7fcbe3894492fb7f62a317ddd99a28d5","url":"icons/icon-32x32.png"},{"revision":"5a8a86ced62f17062326ae85d5ff352f","url":"icons/icon-384x384.png"},{"revision":"45146cbf5554683533638cb5d8b017ae","url":"icons/icon-40x40.png"},{"revision":"903d05ccefb480c98cd4cf2e484bd663","url":"icons/icon-48x48.png"},{"revision":"f25bdd85d754463f79f8ef441a035933","url":"icons/icon-512x512.png"},{"revision":"60f05c206db3360a51bef6105de2b995","url":"icons/icon-60x60.png"},{"revision":"492762bfada55a219fc687f2549ed05a","url":"icons/icon-64x64.png"},{"revision":"faa08e0d1df851afc410e939cc7bcbc4","url":"icons/icon-72x72.png"},{"revision":"6ae3db0007861108aa3db4e35450fe16","url":"icons/icon-76x76.png"},{"revision":"a5602a4acdef243f27b9acc94f49e9c2","url":"icons/icon-96x96.png"},{"revision":"5c3533a0e4d12b7885a0adcca4ee0078","url":"manifest.json"}]);const je=new RegExp("/[^/?]+\\.[^/]+$");v(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(je)),Ne(`${Be.homepage}/index.html`));v(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Se({cacheName:"images",plugins:[new Re({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 A(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),h=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:h,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}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 l("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 T;const M=()=>(T||(T=new De),T);try{self["workbox:routing:7.3.0"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class R{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class Ue extends R{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class Te{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(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,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 a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,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 h;try{h=c.handle({url:n,request:e,event:t,params:r})}catch(u){h=Promise.reject(u)}const g=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||g)&&(h=h.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:r})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});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 l("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 l("unregister-route-route-not-registered")}}let y;const Pe=()=>(y||(y=new Te,y.addFetchListener(),y.addCacheListener()),y);function v(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new R(i,e,t)}else if(s instanceof RegExp)n=new Ue(s,e,t);else if(typeof s=="function")n=new R(s,e,t);else if(s instanceof R)n=s;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Pe().registerRoute(n),n}function ke(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Ie(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=ke(r,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(a){const c=a({url:r});for(const o of c)yield o.href}}class Me extends R{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of Ie(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ve(s){const e=M(),t=new Me(e,s);v(t)}function Ne(s){return M().createHandlerBoundToURL(s)}function Ke(s){M().precache(s)}function Ae(s,e){Ke(s),ve(e)}const Oe={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Se extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Oe)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new l("no-response",{url:e.url,error:r});return a}}const We="/shlink-web-client/dependabot/npm_and_yarn/react-945e18fcf3",Be={homepage:We};ae();Ae([{"revision":"dcb87cdea20dc8d38186388b9fceb522","url":"index.html"},{"revision":null,"url":"assets/index-DYw_jskz.js"},{"revision":null,"url":"assets/index-BZszQhq6.css"},{"revision":"f3e729bb644bebe1dcffadcbba68f1ff","url":"icons/icon-1024x1024.png"},{"revision":"cd508d134aa805268381ead58279489b","url":"icons/icon-114x114.png"},{"revision":"0812cd0c539ec3bc3880201497ef5439","url":"icons/icon-120x120.png"},{"revision":"db11b5c2a48fbba615b39792e40f4c87","url":"icons/icon-128x128.png"},{"revision":"eb6d6cdd19cac779b6d7ac97463b888e","url":"icons/icon-144x144.png"},{"revision":"6088b31c860949672f7df75fccf9a9ba","url":"icons/icon-150x150.png"},{"revision":"e6f72b1eaa19a7c204b01f5d432b8d12","url":"icons/icon-152x152.png"},{"revision":"0e45616d9a2ada37a8cc9f27a670ca31","url":"icons/icon-160x160.png"},{"revision":"d1006b686a7ab98a5620b415792a33a6","url":"icons/icon-167x167.png"},{"revision":"d42b11e07581fa319271ae71f7093811","url":"icons/icon-16x16.png"},{"revision":"78f75b82e4ce73706359d19cb87c3b00","url":"icons/icon-180x180.png"},{"revision":"a536b5cee1e4a64fd54fc4be7b77efcf","url":"icons/icon-192x192.png"},{"revision":"9e994d55a0485b6bbaad7e63b13a0ef5","url":"icons/icon-196x196.png"},{"revision":"786e390718d25939056e8ef85e264d8a","url":"icons/icon-228x228.png"},{"revision":"556d9b9e027c4411745496790753cd73","url":"icons/icon-24x24.png"},{"revision":"7642a0a1530b73e8818bceceb3d3e7e2","url":"icons/icon-256x256.png"},{"revision":"06d7a4a92102470e88880d42920c7549","url":"icons/icon-310x310.png"},{"revision":"7fcbe3894492fb7f62a317ddd99a28d5","url":"icons/icon-32x32.png"},{"revision":"5a8a86ced62f17062326ae85d5ff352f","url":"icons/icon-384x384.png"},{"revision":"45146cbf5554683533638cb5d8b017ae","url":"icons/icon-40x40.png"},{"revision":"903d05ccefb480c98cd4cf2e484bd663","url":"icons/icon-48x48.png"},{"revision":"f25bdd85d754463f79f8ef441a035933","url":"icons/icon-512x512.png"},{"revision":"60f05c206db3360a51bef6105de2b995","url":"icons/icon-60x60.png"},{"revision":"492762bfada55a219fc687f2549ed05a","url":"icons/icon-64x64.png"},{"revision":"faa08e0d1df851afc410e939cc7bcbc4","url":"icons/icon-72x72.png"},{"revision":"6ae3db0007861108aa3db4e35450fe16","url":"icons/icon-76x76.png"},{"revision":"a5602a4acdef243f27b9acc94f49e9c2","url":"icons/icon-96x96.png"},{"revision":"5c3533a0e4d12b7885a0adcca4ee0078","url":"manifest.json"}]);const je=new RegExp("/[^/?]+\\.[^/]+$");v(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(je)),Ne(`${Be.homepage}/index.html`));v(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Se({cacheName:"images",plugins:[new Re({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()});