@qikbar/qikbar 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/qikbar.es.js CHANGED
@@ -3530,7 +3530,7 @@ function xs({
3530
3530
  );
3531
3531
  E(xe), Y == null || Y.focus();
3532
3532
  }
3533
- u && T.key !== "ArrowUp" && T.key !== "ArrowDown" && T.key !== "Enter" && !T.metaKey && (E(0), (me = D.current) == null || me.focus()), T.metaKey && T.key === "k" && !t && (u && (s(""), w(""), E(0), o([]), c([])), m((Y) => !Y)), u && T.key === "Enter" && w("");
3533
+ u && T.key !== "ArrowUp" && T.key !== "ArrowDown" && T.key !== "Enter" && !T.metaKey && !t && (E(0), (me = D.current) == null || me.focus()), T.metaKey && T.key === "k" && !t && (u && (s(""), w(""), E(0), o([]), c([])), m((Y) => !Y)), u && T.key === "Enter" && w("");
3534
3534
  };
3535
3535
  return document.addEventListener("keydown", O), () => {
3536
3536
  document.removeEventListener("keydown", O);
@@ -4043,7 +4043,7 @@ function En({
4043
4043
  const b = i ? "a" : Ar, w = (D) => {
4044
4044
  var C;
4045
4045
  m != null && m.router && ((C = m == null ? void 0 : m.router) == null || C.call(m, i), !u && c(!1), D.preventDefault());
4046
- }, S = r || (s == null ? void 0 : s.path), _ = i ? {
4046
+ }, S = r || (s == null ? void 0 : s.path) || "/", _ = i ? {
4047
4047
  ...pu(i) ? {
4048
4048
  rel: "noopener",
4049
4049
  target: "_blank",
@@ -86,7 +86,7 @@ Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(
86
86
  * LICENSE.md file in the root directory of this source tree.
87
87
  *
88
88
  * @license MIT
89
- */function ht(){return ht=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ht.apply(this,arguments)}function an(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}const gr="get",on="application/x-www-form-urlencoded";function yr(t){return t!=null&&typeof t.tagName=="string"}function Bo(t){return yr(t)&&t.tagName.toLowerCase()==="button"}function Ho(t){return yr(t)&&t.tagName.toLowerCase()==="form"}function Qo(t){return yr(t)&&t.tagName.toLowerCase()==="input"}function zo(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Wo(t,e){return t.button===0&&(!e||e==="_self")&&!zo(t)}function Ko(t,e,r){let n,i,s,a;if(Ho(t)){let d=r.submissionTrigger;n=r.method||t.getAttribute("method")||gr,i=r.action||t.getAttribute("action")||e,s=r.encType||t.getAttribute("enctype")||on,a=new FormData(t),d&&d.name&&a.append(d.name,d.value)}else if(Bo(t)||Qo(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');n=r.method||t.getAttribute("formmethod")||d.getAttribute("method")||gr,i=r.action||t.getAttribute("formaction")||d.getAttribute("action")||e,s=r.encType||t.getAttribute("formenctype")||d.getAttribute("enctype")||on,a=new FormData(d),t.name&&a.append(t.name,t.value)}else{if(yr(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(n=r.method||gr,i=r.action||e,s=r.encType||on,t instanceof FormData)a=t;else if(a=new FormData,t instanceof URLSearchParams)for(let[d,f]of t)a.append(d,f);else if(t!=null)for(let d of Object.keys(t))a.append(d,t[d])}let{protocol:o,host:l}=window.location;return{url:new URL(i,o+"//"+l),method:n.toLowerCase(),encType:s,formData:a}}const Yo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Go=["aria-current","caseSensitive","className","end","style","to","children"],Zo=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];process.env.NODE_ENV;const Jo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vr=p.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:c,preventScrollReset:d}=e,f=an(e,Yo),u=typeof c=="string"?c:je(c),m=/^[a-z+]+:\/\//i.test(u)||u.startsWith("//"),b=u,w=!1;if(Jo&&m){let C=new URL(window.location.href),E=u.startsWith("//")?new URL(C.protocol+u):new URL(u);E.origin===C.origin?b=E.pathname+E.search+E.hash:w=!0}let S=Oo(b,{relative:i}),_=nl(b,{replace:a,state:o,target:l,preventScrollReset:d,relative:i});function D(C){n&&n(C),C.defaultPrevented||_(C)}return p.createElement("a",ht({},f,{href:m?u:S,onClick:w||s?n:D,ref:r,target:l}))});process.env.NODE_ENV!=="production"&&(vr.displayName="Link");const Xo=p.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:a=!1,style:o,to:l,children:c}=e,d=an(e,Go),f=pr(l,{relative:d.relative}),u=dt(),m=p.useContext(Yt),{navigator:b}=p.useContext(ct),w=b.encodeLocation?b.encodeLocation(f).pathname:f.pathname,S=u.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(S=S.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase());let D=S===w||!a&&S.startsWith(w)&&S.charAt(w.length)==="/",C=_!=null&&(_===w||!a&&_.startsWith(w)&&_.charAt(w.length)==="/"),E=D?n:void 0,F;typeof s=="function"?F=s({isActive:D,isPending:C}):F=[s,D?"active":null,C?"pending":null].filter(Boolean).join(" ");let O=typeof o=="function"?o({isActive:D,isPending:C}):o;return p.createElement(vr,ht({},d,{"aria-current":E,className:F,ref:r,style:O,to:l}),typeof c=="function"?c({isActive:D,isPending:C}):c)});process.env.NODE_ENV!=="production"&&(Xo.displayName="NavLink");const el=p.forwardRef((t,e)=>p.createElement(Ni,ht({},t,{ref:e})));process.env.NODE_ENV!=="production"&&(el.displayName="Form");const Ni=p.forwardRef((t,e)=>{let{reloadDocument:r,replace:n,method:i=gr,action:s,onSubmit:a,fetcherKey:o,routeId:l,relative:c,preventScrollReset:d}=t,f=an(t,Zo),u=il(o,l),m=i.toLowerCase()==="get"?"get":"post",b=qi(s,{relative:c}),w=S=>{if(a&&a(S),S.defaultPrevented)return;S.preventDefault();let _=S.nativeEvent.submitter,D=(_==null?void 0:_.getAttribute("formmethod"))||i;u(_||S.currentTarget,{method:D,replace:n,relative:c,preventScrollReset:d})};return p.createElement("form",ht({ref:e,method:m,action:b,onSubmit:r?a:w},f))});process.env.NODE_ENV!=="production"&&(Ni.displayName="FormImpl"),process.env.NODE_ENV;var ln;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(ln||(ln={}));var Ai;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ai||(Ai={}));function tl(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function rl(t){let e=p.useContext(Kt);return e||(process.env.NODE_ENV!=="production"?j(!1,tl(t)):j(!1)),e}function nl(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a}=e===void 0?{}:e,o=_i(),l=dt(),c=pr(t,{relative:a});return p.useCallback(d=>{if(Wo(d,r)){d.preventDefault();let f=n!==void 0?n:je(l)===je(c);o(t,{replace:f,state:i,preventScrollReset:s,relative:a})}},[l,o,c,n,i,r,t,s,a])}function il(t,e){let{router:r}=rl(ln.UseSubmitImpl),n=qi();return p.useCallback(function(i,s){if(s===void 0&&(s={}),typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:a,encType:o,formData:l,url:c}=Ko(i,n,s),d=c.pathname+c.search,f={replace:s.replace,preventScrollReset:s.preventScrollReset,formData:l,formMethod:a,formEncType:o};t?(e==null&&(process.env.NODE_ENV!=="production"?j(!1,"No routeId available for useFetcher()"):j(!1)),r.fetch(t,e,d,f)):r.navigate(d,f)},[n,r,t,e])}function qi(t,e){let{relative:r}=e===void 0?{}:e,{basename:n}=p.useContext(ct),i=p.useContext(Ie);i||(process.env.NODE_ENV!=="production"?j(!1,"useFormAction must be used inside a RouteContext"):j(!1));let[s]=i.matches.slice(-1),a=ht({},pr(t||".",{relative:r})),o=dt();if(t==null&&(a.search=o.search,a.hash=o.hash,s.route.index)){let l=new URLSearchParams(a.search);l.delete("index"),a.search=l.toString()?"?"+l.toString():""}return(!t||t===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:qe([n,a.pathname])),je(a)}function sl(){const{actions:t,showActions:e,setShowActions:r,navigateTo:n}=N.useContext(et),i=N.useRef();return N.useEffect(()=>{const s=a=>{a.metaKey&&a.key==="Enter"&&(a.preventDefault(),a.stopPropagation(),t.length>0&&r(o=>!o)),e&&a.key!=="ArrowUp"&&a.key!=="ArrowDown"&&a.key!=="Enter"&&r(!1),e&&a.key==="ArrowDown"&&a.target.className==="qikbar-action"&&a.target.nextElementSibling&&a.target.nextElementSibling.focus(),e&&a.key==="ArrowUp"&&a.target.className==="qikbar-action"&&a.target.previousElementSibling&&a.target.previousElementSibling.focus()};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e,t]),N.useEffect(()=>{var s,a;e&&((a=(s=i==null?void 0:i.current)==null?void 0:s.firstChild)==null||a.focus())},[e]),y.jsxs("div",{className:"qikbar-command-footer",children:[y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})}),t.length>0&&y.jsxs("div",{className:"qikbar-actions-wrapper",children:[e&&y.jsx("div",{className:"qikbar-actions-panel",children:y.jsx("ul",{className:"qikbar-actions-list",ref:i,children:t.filter(s=>!s.disabled).map(s=>y.jsx("button",{onClick:()=>n(s.click.href,s.click.title,s.click.target),className:"qikbar-action",children:s.title},s.id))})}),y.jsxs("button",{onClick:()=>r(s=>!s),className:"qikbar-actions",children:[y.jsx("span",{className:"qikbar-actions-action",children:"Actions"}),y.jsxs("span",{className:"qikbar-keys",children:[y.jsx("kbd",{className:"qikbar-kbd",children:"Cmd"})," +"," ",y.jsx("kbd",{className:"qikbar-kbd",children:"Enter"})]})]})]})]})}function al(){const{search:t,setSearch:e,searchRef:r,placeholder:n}=N.useContext(et);return y.jsx("input",{"data-testid":"qikbar-search",placeholder:n,className:"qikbar-search",ref:r,autoFocus:!0,value:t,onChange:i=>e(i.target.value),name:"search",type:"text"})}function ol({crumbs:t}){const{setCrumbs:e}=N.useContext(et);return t.length===0?null:y.jsx("ul",{className:"qikbar-crumbs",children:t.map((r,n)=>{const i=t.length-1===n;return y.jsx("li",{className:"qikbar-crumb",children:y.jsxs(vr,{to:r.to,onClick:()=>e(s=>i?s:s.slice(0,n+1)),children:[r.title," ",!i&&y.jsx("span",{className:"qikbar-crumb-divider",children:">"})]})},n)})})}const et=N.createContext(null);function Ii({demo:t=!1,wrapperClass:e="qikbar-command-wrapper",defaultOpen:r=!1}){const n=N.useRef(null),i=dt(),s=_i(),[a,o]=N.useState([]),[l,c]=N.useState([]),[d,f]=N.useState(!1),[u,m]=N.useState(r),[b,w]=N.useState(""),[S,_]=N.useState("Search for resources"),D=N.useRef(),[C,E]=N.useState(0),F=Se();return N.useEffect(()=>{var O;u&&((O=D.current)==null||O.focus(),E(0),document.body.style.overflow="hidden"),u||(s(""),f(!1),o([]),c([]),document.body.style.overflow="unset")},[u,i.pathname]),N.useEffect(()=>{const O=T=>{var P,B,Z,J,de,se,ve;if(u&&["Space","ArrowUp","ArrowDown"].indexOf(T.key)>-1&&T.preventDefault(),T.metaKey&&T.key==="Enter"){T.preventDefault(),T.stopPropagation();return}if(u&&T.key==="ArrowDown"&&T.target.localName==="input"&&((P=n.current)!=null&&P.getElementsByClassName("qikbar-item")[1])&&(E(1),n.current.getElementsByClassName("qikbar-item")[1].focus()),u&&T.target.localName==="input"&&b===""&&T.key==="Backspace"&&(s(-1),c(G=>G.slice(0,-1))),u&&T.key==="Escape"&&!t&&(w(""),s(""),m(!1),o([])),u&&T.key==="Enter"&&T.target.localName==="input"&&((B=n.current)!=null&&B.getElementsByClassName("qikbar-item")[0])&&(n.current.getElementsByClassName("qikbar-item")[0].click(),w("")),u&&T.key==="ArrowDown"&&T.target.getAttribute("data-testid")==="qikbar-item"&&T.target.nextElementSibling){let G;T.target.nextElementSibling.className==="qikbar-category-wrapper"?G=T.target.nextElementSibling.nextElementSibling:G=T.target.nextElementSibling;const Te=Array.prototype.indexOf.call((J=(Z=T.target)==null?void 0:Z.parentNode)==null?void 0:J.getElementsByClassName("qikbar-item"),G);E(Te),G==null||G.focus()}if(u&&T.key==="ArrowUp"&&T.target.getAttribute("data-testid")==="qikbar-item"&&T.target.previousElementSibling){let G;if(T.target.previousElementSibling.className==="qikbar-category-wrapper"?G=T.target.previousElementSibling.previousElementSibling:G=T.target.previousElementSibling,!G)return;const Te=Array.prototype.indexOf.call((se=(de=T.target)==null?void 0:de.parentNode)==null?void 0:se.getElementsByClassName("qikbar-item"),G);E(Te),G==null||G.focus()}u&&T.key!=="ArrowUp"&&T.key!=="ArrowDown"&&T.key!=="Enter"&&!T.metaKey&&(E(0),(ve=D.current)==null||ve.focus()),T.metaKey&&T.key==="k"&&!t&&(u&&(s(""),w(""),E(0),o([]),c([])),m(G=>!G)),u&&T.key==="Enter"&&w("")};return document.addEventListener("keydown",O),()=>{document.removeEventListener("keydown",O)}},[u,b]),u?y.jsx("div",{className:e,"data-testid":"command-bar-container",children:y.jsx(et.Provider,{value:{demo:t,search:b,searchRef:D,setIsOpen:m,setSearch:w,activeIndex:C,placeholder:S,setPlaceholder:_,setActions:o,setCrumbs:c,crumbs:l,actions:a,showActions:d,setShowActions:f,navigateTo:(O,T,P="self")=>{var B,Z;switch(f(!1),w(""),P){case"self":E(0),s(O),(B=D.current)==null||B.focus(),O!==(i==null?void 0:i.pathname)&&o([]),n.current.getElementsByClassName("qikbar-list")[0].scrollTo(0,0),c(J=>[...J,{title:T,to:O}]);break;case"internal":s(""),m(!1),c([]),o([]),F!=null&&F.router?(Z=F==null?void 0:F.router)==null||Z.call(F,O):window.location=O;break;case"external":s(""),m(!1),c([]),o([]),window.open(O,"_blank");break;default:s(O),c(J=>[...J,{title:T,to:O}])}}},children:y.jsxs("div",{className:"qikbar-command-bar",ref:n,children:[y.jsxs("div",{className:"qikbar-search-wrapper",children:[y.jsx(ol,{crumbs:l}),y.jsx(al,{})]}),y.jsx("div",{className:"qikbar-command-content",children:y.jsx(Io,{})}),y.jsx(sl,{})]})})}):null}function ll({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0M3.124 7.5A8.969 8.969 0 015.292 3m13.416 0a8.969 8.969 0 012.168 4.5"}))}const ul=p.forwardRef(ll);function cl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"}))}const dl=p.forwardRef(cl);function hl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"}))}const fl=p.forwardRef(hl);function pl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"}))}const ml=p.forwardRef(pl);function gl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"}))}const yl=p.forwardRef(gl);function vl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"}))}const bl=p.forwardRef(vl);function wl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 110-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 01-1.44-4.282m3.102.069a18.03 18.03 0 01-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 018.835 2.535M10.34 6.66a23.847 23.847 0 008.835-2.535m0 0A23.74 23.74 0 0018.795 3m.38 1.125a23.91 23.91 0 011.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 001.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 010 3.46"}))}const Cl=p.forwardRef(wl);function El({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const Rl=p.forwardRef(El);function Sl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"}))}const xl=p.forwardRef(Sl);function Ol({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const _l=p.forwardRef(Ol);function Tl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"}))}const kl=p.forwardRef(Tl);function Dl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 019 14.437V9.564z"}))}const Ll=p.forwardRef(Dl);function Pl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"}))}const Fl=p.forwardRef(Pl);function Ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"}))}const jl=p.forwardRef(Ml);function Nl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"}))}const Al=p.forwardRef(Nl);function ql({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75a4.5 4.5 0 01-4.884 4.484c-1.076-.091-2.264.071-2.95.904l-7.152 8.684a2.548 2.548 0 11-3.586-3.586l8.684-7.152c.833-.686.995-1.874.904-2.95a4.5 4.5 0 016.336-4.486l-3.276 3.276a3.004 3.004 0 002.25 2.25l3.276-3.276c.256.565.398 1.192.398 1.852z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.867 19.125h.008v.008h-.008v-.008z"}))}const Il=p.forwardRef(ql);function Vl({iconName:t}){switch(t){case"CalendarIcon":return y.jsx(fl,{});case"CalendarDaysIcon":return y.jsx(dl,{});case"FireIcon":return y.jsx(ml,{});case"MegaphoneIcon":return y.jsx(Cl,{});case"WrenchIcon":return y.jsx(Il,{});case"WrenchScrewdriverIcon":return y.jsx(Al,{});case"ShareIcon":return y.jsx(Rl,{});case"ShoppingBagIcon":return y.jsx(xl,{});case"ShoppingCartIcon":return y.jsx(_l,{});case"StarIcon":return y.jsx(kl,{});case"StopCircleIcon":return y.jsx(Ll,{});case"StopIcon":return y.jsx(Fl,{});case"LockClosedIcon":return y.jsx(bl,{});case"LinkIcon":return y.jsx(yl,{});case"UserGroupIcon":return y.jsx(jl,{});case"BellAlertIcon":return y.jsx(ul,{});default:return null}}function Jt({children:t}){return y.jsx("div",{className:"qikbar-details-container",children:t})}function Vi({children:t}){return y.jsx("ul",{className:"qikbar-list",children:t})}function Ui({item:{name:t,children:e,Icon:r}}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"qikbar-category-wrapper",children:[r&&y.jsx(r,{}),y.jsx("p",{className:"qikbar-category",children:t})]}),e.map(n=>n.children?y.jsx(Ui,{item:n},n.id):y.jsx(un,{item:n},n.id))]})}var $i=function(t){return t.indexOf("//")===0&&(t=location.protocol+t),t.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]},Ul=function(t){if(t)return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&$i(location.href)!==$i(t)};function un({item:{iconName:t,title:e,to:r,description:n,href:i,route:s,action:a,children:o,tag:l}}){const{setIsOpen:c,setCrumbs:d,setActions:f,demo:u}=N.useContext(et),m=Se();if(o)return null;const b=i?"a":vr,w=D=>{var C;m!=null&&m.router&&((C=m==null?void 0:m.router)==null||C.call(m,i),!u&&c(!1),D.preventDefault())},S=r||(s==null?void 0:s.path),_=i?{...Ul(i)?{rel:"noopener",target:"_blank",href:i,onClick:()=>!u&&c(!1)}:{href:i,onClick:w}}:{to:S,onClick:()=>{f([]),d(D=>[...D,{title:e,to:S}])}};return y.jsxs(b,{"data-testid":"qikbar-item",className:"qikbar-item",..._,onClick:a||(_==null?void 0:_.onClick),children:[y.jsxs("li",{children:[t&&y.jsx(Vl,{iconName:t}),y.jsxs("div",{children:[y.jsx("p",{className:"qikbar-item-title",children:e}),y.jsx("p",{className:"qikbar-item-description",children:n})]})]}),l&&y.jsx("p",{className:"qikbar-item-type",children:l})]})}function Bi({placeholder:t}){const{setPlaceholder:e}=N.useContext(et);return N.useEffect(()=>{e(t)},[e,t]),null}function Hi({fields:t}){return y.jsx("div",{className:"qikbar-details-wrapper",children:y.jsx("div",{className:"qikbar-details",children:t.map((e,r)=>y.jsx("div",{className:"qikbar-fieldset",children:e.map(({label:n,value:i,html:s},a)=>y.jsxs("div",{className:"qikbar-field",children:[n&&y.jsxs("span",{className:"qikbar-field-label",children:[n,":"]}),s?y.jsx("p",{dangerouslySetInnerHTML:{__html:i},className:"qikbar-field-value"}):y.jsx("p",{className:"qikbar-field-value",children:i})]},a))},r))})})}function Qi({categories:t,placeholderText:e}){var d;const{activeIndex:r,search:n,setActions:i,navigateTo:s}=N.useContext(et),a=t.map(f=>({...f,children:f.commands.filter(u=>u.title.toLowerCase().includes(n.toLowerCase()))})).filter(f=>f.children.length>0),l=a.reduce((f,u)=>[...f,...u.children],[])[r],c=l==null?void 0:l.actions;return l==null||l.fields,N.useEffect(()=>{i(l&&c?c:[])},[l,n,r]),a.length===0?y.jsx(Jt,{children:y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})}):y.jsxs(y.Fragment,{children:[y.jsx(Bi,{placeholder:e}),y.jsxs(Jt,{children:[y.jsx(Vi,{children:a.map(f=>f.children?y.jsx(Ui,{item:f},f.name):y.jsx(un,{item:f},f.id))}),l&&((d=l==null?void 0:l.details)==null?void 0:d.length)>0&&y.jsx(Hi,{fields:l.details})]})]})}class Xt{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const er=typeof window>"u"||"Deno"in window;function _e(){}function $l(t,e){return typeof t=="function"?t(e):t}function cn(t){return typeof t=="number"&&t>=0&&t!==1/0}function zi(t,e){return Math.max(t+(e||0)-Date.now(),0)}function tr(t,e,r){return br(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function tt(t,e,r){return br(t)?[{...e,queryKey:t},r]:[t||{},e]}function Wi(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:o}=t;if(br(a)){if(n){if(e.queryHash!==dn(a,e.options))return!1}else if(!_t(e.queryKey,a))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function Ki(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(br(s)){if(!e.options.mutationKey)return!1;if(r){if(ft(e.options.mutationKey)!==ft(s))return!1}else if(!_t(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function dn(t,e){return((e==null?void 0:e.queryKeyHashFn)||ft)(t)}function ft(t){return JSON.stringify(t,(e,r)=>hn(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function _t(t,e){return Yi(t,e)}function Yi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!Yi(t[r],e[r])):!1}function Gi(t,e){if(t===e)return t;const r=Ji(t)&&Ji(e);if(r||hn(t)&&hn(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,a=r?[]:{};let o=0;for(let l=0;l<s;l++){const c=r?l:i[l];a[c]=Gi(t[c],e[c]),a[c]===t[c]&&o++}return n===s&&o===n?t:a}return e}function Zi(t,e){if(t&&!e||e&&!t)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Ji(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function hn(t){if(!Xi(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!Xi(r)||!r.hasOwnProperty("isPrototypeOf"))}function Xi(t){return Object.prototype.toString.call(t)==="[object Object]"}function br(t){return Array.isArray(t)}function es(t){return new Promise(e=>{setTimeout(e,t)})}function ts(t){es(0).then(t)}function Bl(){if(typeof AbortController=="function")return new AbortController}function fn(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Gi(t,e):e}class Hl extends Xt{constructor(){super(),this.setup=e=>{if(!er&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const wr=new Hl;class Ql extends Xt{constructor(){super(),this.setup=e=>{if(!er&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Cr=new Ql;function zl(t){return Math.min(1e3*2**t,3e4)}function Er(t){return(t??"online")==="online"?Cr.isOnline():!0}class rs{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Rr(t){return t instanceof rs}function ns(t){let e=!1,r=0,n=!1,i,s,a;const o=new Promise((S,_)=>{s=S,a=_}),l=S=>{n||(m(new rs(S)),t.abort==null||t.abort())},c=()=>{e=!0},d=()=>{e=!1},f=()=>!wr.isFocused()||t.networkMode!=="always"&&!Cr.isOnline(),u=S=>{n||(n=!0,t.onSuccess==null||t.onSuccess(S),i==null||i(),s(S))},m=S=>{n||(n=!0,t.onError==null||t.onError(S),i==null||i(),a(S))},b=()=>new Promise(S=>{i=_=>{if(n||!f())return S(_)},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),w=()=>{if(n)return;let S;try{S=t.fn()}catch(_){S=Promise.reject(_)}Promise.resolve(S).then(u).catch(_=>{var D,C;if(n)return;const E=(D=t.retry)!=null?D:3,F=(C=t.retryDelay)!=null?C:zl,O=typeof F=="function"?F(r,_):F,T=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,_);if(e||!T){m(_);return}r++,t.onFail==null||t.onFail(r,_),es(O).then(()=>{if(f())return b()}).then(()=>{e?m(_):w()})})};return Er(t.networkMode)?w():b().then(w),{promise:o,cancel:l,continue:()=>{i==null||i()},cancelRetry:c,continueRetry:d}}const pn=console;function Wl(){let t=[],e=0,r=d=>{d()},n=d=>{d()};const i=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},s=d=>{e?t.push(d):ts(()=>{r(d)})},a=d=>(...f)=>{s(()=>{d(...f)})},o=()=>{const d=t;t=[],d.length&&ts(()=>{n(()=>{d.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:a,schedule:s,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{n=d}}}const le=Wl();class is{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cn(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(er?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Kl extends is{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||pn,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Yl(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=fn(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(_e).catch(_e):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!zi(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(b=>b.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||process.env.NODE_ENV!=="production"&&this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const a=Bl(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(o);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn"),d={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(d),(n=this.options.behavior)==null||n.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=d.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta})}const u=m=>{if(Rr(m)&&m.silent||this.dispatch({type:"error",error:m}),!Rr(m)){var b,w;(b=(w=this.cache.config).onError)==null||b.call(w,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=ns({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var b,w;if(typeof m>"u"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),u(new Error("undefined"));return}this.setData(m),(b=(w=this.cache.config).onSuccess)==null||b.call(w,m,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:u,onFail:(m,b)=>{this.dispatch({type:"failed",failureCount:m,error:b})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:Er(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return Rr(a)&&a.revert&&this.revertState?{...this.revertState}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),le.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function Yl(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Gl extends Xt{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,a=(i=r.queryHash)!=null?i:dn(s,r);let o=this.get(a);return o||(o=new Kl({cache:this,logger:e.getLogger(),queryKey:s,queryHash:a,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){le.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=tt(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>Wi(n,i))}findAll(e,r){const[n]=tt(e,r);return Object.keys(n).length>0?this.queries.filter(i=>Wi(n,i)):this.queries}notify(e){le.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){le.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){le.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class Zl extends is{constructor(e){super(),this.options={...e.defaultOptions,...e.options},this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||pn,this.observers=[],this.state=e.state||Jl(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const e=()=>{var C;return this.retryer=ns({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(E,F)=>{this.dispatch({type:"failed",failureCount:E,error:F})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,a,o,l;if(!r){var c,d,f,u;this.dispatch({type:"loading",variables:this.options.variables}),await((c=(d=this.mutationCache.config).onMutate)==null?void 0:c.call(d,this.state.variables,this));const E=await((f=(u=this.options).onMutate)==null?void 0:f.call(u,this.state.variables));E!==this.state.context&&this.dispatch({type:"loading",context:E,variables:this.state.variables})}const C=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,C,this.state.variables,this.state.context,this)),await((s=(a=this.options).onSuccess)==null?void 0:s.call(a,C,this.state.variables,this.state.context)),await((o=(l=this.options).onSettled)==null?void 0:o.call(l,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var m,b,w,S,_,D;throw await((m=(b=this.mutationCache.config).onError)==null?void 0:m.call(b,C,this.state.variables,this.state.context,this)),process.env.NODE_ENV!=="production"&&this.logger.error(C),await((w=(S=this.options).onError)==null?void 0:w.call(S,C,this.state.variables,this.state.context)),await((_=(D=this.options).onSettled)==null?void 0:_.call(D,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Er(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),le.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function Jl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Xl extends Xt{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new Zl({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){le.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>Ki(e,r))}findAll(e){return this.mutations.filter(r=>Ki(e,r))}notify(e){le.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.mutations.filter(r=>r.state.isPaused);return le.batch(()=>e.reduce((r,n)=>r.then(()=>n.continue().catch(_e)),Promise.resolve()))}}function eu(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,a;const o=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,c=l==null?void 0:l.pageParam,d=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",u=((s=t.state.data)==null?void 0:s.pages)||[],m=((a=t.state.data)==null?void 0:a.pageParams)||[];let b=m,w=!1;const S=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>{var T;if((T=t.signal)!=null&&T.aborted)w=!0;else{var P;(P=t.signal)==null||P.addEventListener("abort",()=>{w=!0})}return t.signal}})},_=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),D=(O,T,P,B)=>(b=B?[T,...b]:[...b,T],B?[P,...O]:[...O,P]),C=(O,T,P,B)=>{if(w)return Promise.reject("Cancelled");if(typeof P>"u"&&!T&&O.length)return Promise.resolve(O);const Z={queryKey:t.queryKey,pageParam:P,meta:t.options.meta};S(Z);const J=_(Z);return Promise.resolve(J).then(se=>D(O,P,se,B))};let E;if(!u.length)E=C([]);else if(d){const O=typeof c<"u",T=O?c:ss(t.options,u);E=C(u,O,T)}else if(f){const O=typeof c<"u",T=O?c:tu(t.options,u);E=C(u,O,T,!0)}else{b=[];const O=typeof t.options.getNextPageParam>"u";E=(o&&u[0]?o(u[0],0,u):!0)?C([],O,m[0]):Promise.resolve(D([],m[0],u[0]));for(let P=1;P<u.length;P++)E=E.then(B=>{if(o&&u[P]?o(u[P],P,u):!0){const J=O?m[P]:ss(t.options,B);return C(B,O,J)}return Promise.resolve(D(B,m[P],u[P]))})}return E.then(O=>({pages:O,pageParams:b}))}}}}function ss(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function tu(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}class ru{constructor(e={}){this.queryCache=e.queryCache||new Gl,this.mutationCache=e.mutationCache||new Xl,this.logger=e.logger||pn,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=wr.subscribe(()=>{wr.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Cr.subscribe(()=>{Cr.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=tt(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=tr(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,a=$l(r,s);if(typeof a>"u")return;const o=tr(e),l=this.defaultQueryOptions(o);return this.queryCache.build(this,l).setData(a,{...n,manual:!0})}setQueriesData(e,r,n){return le.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=tt(e,r),i=this.queryCache;le.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=tt(e,r,n),a=this.queryCache,o={type:"active",...i};return le.batch(()=>(a.findAll(i).forEach(l=>{l.reset()}),this.refetchQueries(o,s)))}cancelQueries(e,r,n){const[i,s={}]=tt(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const a=le.batch(()=>this.queryCache.findAll(i).map(o=>o.cancel(s)));return Promise.all(a).then(_e).catch(_e)}invalidateQueries(e,r,n){const[i,s]=tt(e,r,n);return le.batch(()=>{var a,o;if(this.queryCache.findAll(i).forEach(c=>{c.invalidate()}),i.refetchType==="none")return Promise.resolve();const l={...i,type:(a=(o=i.refetchType)!=null?o:i.type)!=null?a:"active"};return this.refetchQueries(l,s)})}refetchQueries(e,r,n){const[i,s]=tt(e,r,n),a=le.batch(()=>this.queryCache.findAll(i).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...s,cancelRefetch:(c=s==null?void 0:s.cancelRefetch)!=null?c:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(a).then(_e);return s!=null&&s.throwOnError||(o=o.catch(_e)),o}fetchQuery(e,r,n){const i=tr(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const a=this.queryCache.build(this,s);return a.isStaleByTime(s.staleTime)?a.fetch(s):Promise.resolve(a.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(_e).catch(_e)}fetchInfiniteQuery(e,r,n){const i=tr(e,r,n);return i.behavior=eu(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(_e).catch(_e)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>ft(e)===ft(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>_t(e,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>_t(e,i.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>ft(e)===ft(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>_t(e,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>_t(e,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=dn(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class nu extends Xt{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),as(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return mn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),process.env.NODE_ENV!=="production"&&typeof(e==null?void 0:e.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),Zi(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&os(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(_e)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),er||this.currentResult.isStale||!cn(this.options.staleTime))return;const r=zi(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(er||this.options.enabled===!1||!cn(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||wr.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,a=this.currentResultState,o=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:u,error:m,errorUpdatedAt:b,fetchStatus:w,status:S}=f,_=!1,D=!1,C;if(r._optimisticResults){const P=this.hasListeners(),B=!P&&as(e,r),Z=P&&os(e,n,r,i);(B||Z)&&(w=Er(e.options.networkMode)?"fetching":"paused",u||(S="loading")),r._optimisticResults==="isRestoring"&&(w="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&S!=="error")C=d.data,u=d.dataUpdatedAt,S=d.status,_=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(a==null?void 0:a.data)&&r.select===this.selectFn)C=this.selectResult;else try{this.selectFn=r.select,C=r.select(f.data),C=fn(s==null?void 0:s.data,C,r),this.selectResult=C,this.selectError=null}catch(P){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(P),this.selectError=P}else C=f.data;if(typeof r.placeholderData<"u"&&typeof C>"u"&&S==="loading"){let P;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData))P=s.data;else if(P=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof P<"u")try{P=r.select(P),this.selectError=null}catch(B){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(B),this.selectError=B}typeof P<"u"&&(S="success",C=fn(s==null?void 0:s.data,P,r),D=!0)}this.selectError&&(m=this.selectError,C=this.selectResult,b=Date.now(),S="error");const E=w==="fetching",F=S==="loading",O=S==="error";return{status:S,fetchStatus:w,isLoading:F,isSuccess:S==="success",isError:O,isInitialLoading:F&&E,data:C,dataUpdatedAt:u,error:m,errorUpdatedAt:b,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!F,isLoadingError:O&&f.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:D,isPreviousData:_,isRefetchError:O&&f.dataUpdatedAt!==0,isStale:gn(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Zi(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options;if(a==="all"||!a&&!this.trackedProps.size)return!0;const o=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&o.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==r[c]&&o.has(c)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!Rr(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){le.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var a,o,l,c;(a=(o=this.options).onError)==null||a.call(o,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(d=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function iu(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function as(t,e){return iu(t,e)||t.state.dataUpdatedAt>0&&mn(t,e,e.refetchOnMount)}function mn(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&gn(t,e)}return!1}function os(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&gn(t,r)}function gn(t,e){return t.isStaleByTime(e.staleTime)}var su=Gr();const au=su.useSyncExternalStore,ls=p.createContext(void 0),us=p.createContext(!1);function cs(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ls),window.ReactQueryClientContext):ls)}const ou=({context:t}={})=>{const e=p.useContext(cs(t,p.useContext(us)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},lu=({client:t,children:e,context:r,contextSharing:n=!1})=>{p.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),process.env.NODE_ENV!=="production"&&n&&t.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=cs(r,n);return p.createElement(us.Provider,{value:!r&&n},p.createElement(i.Provider,{value:t},e))},ds=p.createContext(!1),uu=()=>p.useContext(ds);ds.Provider;function cu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const du=p.createContext(cu()),hu=()=>p.useContext(du);function fu(t,e){return typeof t=="function"?t(...e):!!t}const pu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},mu=t=>{p.useEffect(()=>{t.clearReset()},[t])},gu=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&fu(r,[t.error,n]),yu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},vu=(t,e)=>t.isLoading&&t.isFetching&&!e,bu=(t,e,r)=>(t==null?void 0:t.suspense)&&vu(e,r),wu=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function Cu(t,e){const r=ou({context:t.context}),n=uu(),i=hu(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=le.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=le.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=le.batchCalls(s.onSettled)),yu(s),pu(s,i),mu(i);const[a]=p.useState(()=>new e(r,s)),o=a.getOptimisticResult(s);if(au(p.useCallback(l=>n?()=>{}:a.subscribe(le.batchCalls(l)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),bu(s,o,n))throw wu(s,a,i);if(gu({result:o,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw o.error;return s.notifyOnChangeProps?o:a.trackResult(o)}function Eu(t,e,r){const n=tr(t,e,r);return Cu(n,nu)}function Ru(t,e){const[r,n]=N.useState(t);return N.useEffect(()=>{const i=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(i)}},[t,e]),r}var Su="Expected a function",hs="__lodash_hash_undefined__",fs=1/0,xu="[object Function]",Ou="[object GeneratorFunction]",_u="[object Symbol]",Tu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ku=/^\w*$/,Du=/^\./,Lu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pu=/[\\^$.*+?()[\]{}|]/g,Fu=/\\(\\)?/g,Mu=/^\[object .+?Constructor\]$/,ju=typeof ur=="object"&&ur&&ur.Object===Object&&ur,Nu=typeof self=="object"&&self&&self.Object===Object&&self,yn=ju||Nu||Function("return this")();function Au(t,e){return t==null?void 0:t[e]}function qu(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Iu=Array.prototype,Vu=Function.prototype,ps=Object.prototype,vn=yn["__core-js_shared__"],ms=function(){var t=/[^.]+$/.exec(vn&&vn.keys&&vn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),gs=Vu.toString,bn=ps.hasOwnProperty,ys=ps.toString,Uu=RegExp("^"+gs.call(bn).replace(Pu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vs=yn.Symbol,$u=Iu.splice,Bu=Cs(yn,"Map"),rr=Cs(Object,"create"),bs=vs?vs.prototype:void 0,ws=bs?bs.toString:void 0;function pt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hu(){this.__data__=rr?rr(null):{}}function Qu(t){return this.has(t)&&delete this.__data__[t]}function zu(t){var e=this.__data__;if(rr){var r=e[t];return r===hs?void 0:r}return bn.call(e,t)?e[t]:void 0}function Wu(t){var e=this.__data__;return rr?e[t]!==void 0:bn.call(e,t)}function Ku(t,e){var r=this.__data__;return r[t]=rr&&e===void 0?hs:e,this}pt.prototype.clear=Hu,pt.prototype.delete=Qu,pt.prototype.get=zu,pt.prototype.has=Wu,pt.prototype.set=Ku;function Tt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Yu(){this.__data__=[]}function Gu(t){var e=this.__data__,r=Sr(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():$u.call(e,r,1),!0}function Zu(t){var e=this.__data__,r=Sr(e,t);return r<0?void 0:e[r][1]}function Ju(t){return Sr(this.__data__,t)>-1}function Xu(t,e){var r=this.__data__,n=Sr(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Tt.prototype.clear=Yu,Tt.prototype.delete=Gu,Tt.prototype.get=Zu,Tt.prototype.has=Ju,Tt.prototype.set=Xu;function mt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ec(){this.__data__={hash:new pt,map:new(Bu||Tt),string:new pt}}function tc(t){return xr(this,t).delete(t)}function rc(t){return xr(this,t).get(t)}function nc(t){return xr(this,t).has(t)}function ic(t,e){return xr(this,t).set(t,e),this}mt.prototype.clear=ec,mt.prototype.delete=tc,mt.prototype.get=rc,mt.prototype.has=nc,mt.prototype.set=ic;function Sr(t,e){for(var r=t.length;r--;)if(mc(t[r][0],e))return r;return-1}function sc(t,e){e=uc(e,t)?[e]:lc(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[fc(e[r++])];return r&&r==n?t:void 0}function ac(t){if(!Rs(t)||dc(t))return!1;var e=gc(t)||qu(t)?Uu:Mu;return e.test(pc(t))}function oc(t){if(typeof t=="string")return t;if(Cn(t))return ws?ws.call(t):"";var e=t+"";return e=="0"&&1/t==-fs?"-0":e}function lc(t){return Es(t)?t:hc(t)}function xr(t,e){var r=t.__data__;return cc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Cs(t,e){var r=Au(t,e);return ac(r)?r:void 0}function uc(t,e){if(Es(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Cn(t)?!0:ku.test(t)||!Tu.test(t)||e!=null&&t in Object(e)}function cc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function dc(t){return!!ms&&ms in t}var hc=wn(function(t){t=vc(t);var e=[];return Du.test(t)&&e.push(""),t.replace(Lu,function(r,n,i,s){e.push(i?s.replace(Fu,"$1"):n||r)}),e});function fc(t){if(typeof t=="string"||Cn(t))return t;var e=t+"";return e=="0"&&1/t==-fs?"-0":e}function pc(t){if(t!=null){try{return gs.call(t)}catch{}try{return t+""}catch{}}return""}function wn(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Su);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a),a};return r.cache=new(wn.Cache||mt),r}wn.Cache=mt;function mc(t,e){return t===e||t!==t&&e!==e}var Es=Array.isArray;function gc(t){var e=Rs(t)?ys.call(t):"";return e==xu||e==Ou}function Rs(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function yc(t){return!!t&&typeof t=="object"}function Cn(t){return typeof t=="symbol"||yc(t)&&ys.call(t)==_u}function vc(t){return t==null?"":oc(t)}function bc(t,e,r){var n=t==null?void 0:sc(t,e);return n===void 0?r:n}var wc=bc;class Le{constructor(e,r,n,i,s){this.kind=e,this.input=r,this.begin=n,this.end=i,this.file=s}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,r]=[1,1];for(let n=0;n<this.begin;n++)this.input[n]===`
89
+ */function ht(){return ht=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ht.apply(this,arguments)}function an(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}const gr="get",on="application/x-www-form-urlencoded";function yr(t){return t!=null&&typeof t.tagName=="string"}function Bo(t){return yr(t)&&t.tagName.toLowerCase()==="button"}function Ho(t){return yr(t)&&t.tagName.toLowerCase()==="form"}function Qo(t){return yr(t)&&t.tagName.toLowerCase()==="input"}function zo(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Wo(t,e){return t.button===0&&(!e||e==="_self")&&!zo(t)}function Ko(t,e,r){let n,i,s,a;if(Ho(t)){let d=r.submissionTrigger;n=r.method||t.getAttribute("method")||gr,i=r.action||t.getAttribute("action")||e,s=r.encType||t.getAttribute("enctype")||on,a=new FormData(t),d&&d.name&&a.append(d.name,d.value)}else if(Bo(t)||Qo(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');n=r.method||t.getAttribute("formmethod")||d.getAttribute("method")||gr,i=r.action||t.getAttribute("formaction")||d.getAttribute("action")||e,s=r.encType||t.getAttribute("formenctype")||d.getAttribute("enctype")||on,a=new FormData(d),t.name&&a.append(t.name,t.value)}else{if(yr(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(n=r.method||gr,i=r.action||e,s=r.encType||on,t instanceof FormData)a=t;else if(a=new FormData,t instanceof URLSearchParams)for(let[d,f]of t)a.append(d,f);else if(t!=null)for(let d of Object.keys(t))a.append(d,t[d])}let{protocol:o,host:l}=window.location;return{url:new URL(i,o+"//"+l),method:n.toLowerCase(),encType:s,formData:a}}const Yo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Go=["aria-current","caseSensitive","className","end","style","to","children"],Zo=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];process.env.NODE_ENV;const Jo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vr=p.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:c,preventScrollReset:d}=e,f=an(e,Yo),u=typeof c=="string"?c:je(c),m=/^[a-z+]+:\/\//i.test(u)||u.startsWith("//"),b=u,w=!1;if(Jo&&m){let C=new URL(window.location.href),E=u.startsWith("//")?new URL(C.protocol+u):new URL(u);E.origin===C.origin?b=E.pathname+E.search+E.hash:w=!0}let S=Oo(b,{relative:i}),_=nl(b,{replace:a,state:o,target:l,preventScrollReset:d,relative:i});function D(C){n&&n(C),C.defaultPrevented||_(C)}return p.createElement("a",ht({},f,{href:m?u:S,onClick:w||s?n:D,ref:r,target:l}))});process.env.NODE_ENV!=="production"&&(vr.displayName="Link");const Xo=p.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:a=!1,style:o,to:l,children:c}=e,d=an(e,Go),f=pr(l,{relative:d.relative}),u=dt(),m=p.useContext(Yt),{navigator:b}=p.useContext(ct),w=b.encodeLocation?b.encodeLocation(f).pathname:f.pathname,S=u.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(S=S.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase());let D=S===w||!a&&S.startsWith(w)&&S.charAt(w.length)==="/",C=_!=null&&(_===w||!a&&_.startsWith(w)&&_.charAt(w.length)==="/"),E=D?n:void 0,F;typeof s=="function"?F=s({isActive:D,isPending:C}):F=[s,D?"active":null,C?"pending":null].filter(Boolean).join(" ");let O=typeof o=="function"?o({isActive:D,isPending:C}):o;return p.createElement(vr,ht({},d,{"aria-current":E,className:F,ref:r,style:O,to:l}),typeof c=="function"?c({isActive:D,isPending:C}):c)});process.env.NODE_ENV!=="production"&&(Xo.displayName="NavLink");const el=p.forwardRef((t,e)=>p.createElement(Ni,ht({},t,{ref:e})));process.env.NODE_ENV!=="production"&&(el.displayName="Form");const Ni=p.forwardRef((t,e)=>{let{reloadDocument:r,replace:n,method:i=gr,action:s,onSubmit:a,fetcherKey:o,routeId:l,relative:c,preventScrollReset:d}=t,f=an(t,Zo),u=il(o,l),m=i.toLowerCase()==="get"?"get":"post",b=qi(s,{relative:c}),w=S=>{if(a&&a(S),S.defaultPrevented)return;S.preventDefault();let _=S.nativeEvent.submitter,D=(_==null?void 0:_.getAttribute("formmethod"))||i;u(_||S.currentTarget,{method:D,replace:n,relative:c,preventScrollReset:d})};return p.createElement("form",ht({ref:e,method:m,action:b,onSubmit:r?a:w},f))});process.env.NODE_ENV!=="production"&&(Ni.displayName="FormImpl"),process.env.NODE_ENV;var ln;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(ln||(ln={}));var Ai;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ai||(Ai={}));function tl(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function rl(t){let e=p.useContext(Kt);return e||(process.env.NODE_ENV!=="production"?j(!1,tl(t)):j(!1)),e}function nl(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a}=e===void 0?{}:e,o=_i(),l=dt(),c=pr(t,{relative:a});return p.useCallback(d=>{if(Wo(d,r)){d.preventDefault();let f=n!==void 0?n:je(l)===je(c);o(t,{replace:f,state:i,preventScrollReset:s,relative:a})}},[l,o,c,n,i,r,t,s,a])}function il(t,e){let{router:r}=rl(ln.UseSubmitImpl),n=qi();return p.useCallback(function(i,s){if(s===void 0&&(s={}),typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:a,encType:o,formData:l,url:c}=Ko(i,n,s),d=c.pathname+c.search,f={replace:s.replace,preventScrollReset:s.preventScrollReset,formData:l,formMethod:a,formEncType:o};t?(e==null&&(process.env.NODE_ENV!=="production"?j(!1,"No routeId available for useFetcher()"):j(!1)),r.fetch(t,e,d,f)):r.navigate(d,f)},[n,r,t,e])}function qi(t,e){let{relative:r}=e===void 0?{}:e,{basename:n}=p.useContext(ct),i=p.useContext(Ie);i||(process.env.NODE_ENV!=="production"?j(!1,"useFormAction must be used inside a RouteContext"):j(!1));let[s]=i.matches.slice(-1),a=ht({},pr(t||".",{relative:r})),o=dt();if(t==null&&(a.search=o.search,a.hash=o.hash,s.route.index)){let l=new URLSearchParams(a.search);l.delete("index"),a.search=l.toString()?"?"+l.toString():""}return(!t||t===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:qe([n,a.pathname])),je(a)}function sl(){const{actions:t,showActions:e,setShowActions:r,navigateTo:n}=N.useContext(et),i=N.useRef();return N.useEffect(()=>{const s=a=>{a.metaKey&&a.key==="Enter"&&(a.preventDefault(),a.stopPropagation(),t.length>0&&r(o=>!o)),e&&a.key!=="ArrowUp"&&a.key!=="ArrowDown"&&a.key!=="Enter"&&r(!1),e&&a.key==="ArrowDown"&&a.target.className==="qikbar-action"&&a.target.nextElementSibling&&a.target.nextElementSibling.focus(),e&&a.key==="ArrowUp"&&a.target.className==="qikbar-action"&&a.target.previousElementSibling&&a.target.previousElementSibling.focus()};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e,t]),N.useEffect(()=>{var s,a;e&&((a=(s=i==null?void 0:i.current)==null?void 0:s.firstChild)==null||a.focus())},[e]),y.jsxs("div",{className:"qikbar-command-footer",children:[y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})}),t.length>0&&y.jsxs("div",{className:"qikbar-actions-wrapper",children:[e&&y.jsx("div",{className:"qikbar-actions-panel",children:y.jsx("ul",{className:"qikbar-actions-list",ref:i,children:t.filter(s=>!s.disabled).map(s=>y.jsx("button",{onClick:()=>n(s.click.href,s.click.title,s.click.target),className:"qikbar-action",children:s.title},s.id))})}),y.jsxs("button",{onClick:()=>r(s=>!s),className:"qikbar-actions",children:[y.jsx("span",{className:"qikbar-actions-action",children:"Actions"}),y.jsxs("span",{className:"qikbar-keys",children:[y.jsx("kbd",{className:"qikbar-kbd",children:"Cmd"})," +"," ",y.jsx("kbd",{className:"qikbar-kbd",children:"Enter"})]})]})]})]})}function al(){const{search:t,setSearch:e,searchRef:r,placeholder:n}=N.useContext(et);return y.jsx("input",{"data-testid":"qikbar-search",placeholder:n,className:"qikbar-search",ref:r,autoFocus:!0,value:t,onChange:i=>e(i.target.value),name:"search",type:"text"})}function ol({crumbs:t}){const{setCrumbs:e}=N.useContext(et);return t.length===0?null:y.jsx("ul",{className:"qikbar-crumbs",children:t.map((r,n)=>{const i=t.length-1===n;return y.jsx("li",{className:"qikbar-crumb",children:y.jsxs(vr,{to:r.to,onClick:()=>e(s=>i?s:s.slice(0,n+1)),children:[r.title," ",!i&&y.jsx("span",{className:"qikbar-crumb-divider",children:">"})]})},n)})})}const et=N.createContext(null);function Ii({demo:t=!1,wrapperClass:e="qikbar-command-wrapper",defaultOpen:r=!1}){const n=N.useRef(null),i=dt(),s=_i(),[a,o]=N.useState([]),[l,c]=N.useState([]),[d,f]=N.useState(!1),[u,m]=N.useState(r),[b,w]=N.useState(""),[S,_]=N.useState("Search for resources"),D=N.useRef(),[C,E]=N.useState(0),F=Se();return N.useEffect(()=>{var O;u&&((O=D.current)==null||O.focus(),E(0),document.body.style.overflow="hidden"),u||(s(""),f(!1),o([]),c([]),document.body.style.overflow="unset")},[u,i.pathname]),N.useEffect(()=>{const O=T=>{var P,B,Z,J,de,se,ve;if(u&&["Space","ArrowUp","ArrowDown"].indexOf(T.key)>-1&&T.preventDefault(),T.metaKey&&T.key==="Enter"){T.preventDefault(),T.stopPropagation();return}if(u&&T.key==="ArrowDown"&&T.target.localName==="input"&&((P=n.current)!=null&&P.getElementsByClassName("qikbar-item")[1])&&(E(1),n.current.getElementsByClassName("qikbar-item")[1].focus()),u&&T.target.localName==="input"&&b===""&&T.key==="Backspace"&&(s(-1),c(G=>G.slice(0,-1))),u&&T.key==="Escape"&&!t&&(w(""),s(""),m(!1),o([])),u&&T.key==="Enter"&&T.target.localName==="input"&&((B=n.current)!=null&&B.getElementsByClassName("qikbar-item")[0])&&(n.current.getElementsByClassName("qikbar-item")[0].click(),w("")),u&&T.key==="ArrowDown"&&T.target.getAttribute("data-testid")==="qikbar-item"&&T.target.nextElementSibling){let G;T.target.nextElementSibling.className==="qikbar-category-wrapper"?G=T.target.nextElementSibling.nextElementSibling:G=T.target.nextElementSibling;const Te=Array.prototype.indexOf.call((J=(Z=T.target)==null?void 0:Z.parentNode)==null?void 0:J.getElementsByClassName("qikbar-item"),G);E(Te),G==null||G.focus()}if(u&&T.key==="ArrowUp"&&T.target.getAttribute("data-testid")==="qikbar-item"&&T.target.previousElementSibling){let G;if(T.target.previousElementSibling.className==="qikbar-category-wrapper"?G=T.target.previousElementSibling.previousElementSibling:G=T.target.previousElementSibling,!G)return;const Te=Array.prototype.indexOf.call((se=(de=T.target)==null?void 0:de.parentNode)==null?void 0:se.getElementsByClassName("qikbar-item"),G);E(Te),G==null||G.focus()}u&&T.key!=="ArrowUp"&&T.key!=="ArrowDown"&&T.key!=="Enter"&&!T.metaKey&&!t&&(E(0),(ve=D.current)==null||ve.focus()),T.metaKey&&T.key==="k"&&!t&&(u&&(s(""),w(""),E(0),o([]),c([])),m(G=>!G)),u&&T.key==="Enter"&&w("")};return document.addEventListener("keydown",O),()=>{document.removeEventListener("keydown",O)}},[u,b]),u?y.jsx("div",{className:e,"data-testid":"command-bar-container",children:y.jsx(et.Provider,{value:{demo:t,search:b,searchRef:D,setIsOpen:m,setSearch:w,activeIndex:C,placeholder:S,setPlaceholder:_,setActions:o,setCrumbs:c,crumbs:l,actions:a,showActions:d,setShowActions:f,navigateTo:(O,T,P="self")=>{var B,Z;switch(f(!1),w(""),P){case"self":E(0),s(O),(B=D.current)==null||B.focus(),O!==(i==null?void 0:i.pathname)&&o([]),n.current.getElementsByClassName("qikbar-list")[0].scrollTo(0,0),c(J=>[...J,{title:T,to:O}]);break;case"internal":s(""),m(!1),c([]),o([]),F!=null&&F.router?(Z=F==null?void 0:F.router)==null||Z.call(F,O):window.location=O;break;case"external":s(""),m(!1),c([]),o([]),window.open(O,"_blank");break;default:s(O),c(J=>[...J,{title:T,to:O}])}}},children:y.jsxs("div",{className:"qikbar-command-bar",ref:n,children:[y.jsxs("div",{className:"qikbar-search-wrapper",children:[y.jsx(ol,{crumbs:l}),y.jsx(al,{})]}),y.jsx("div",{className:"qikbar-command-content",children:y.jsx(Io,{})}),y.jsx(sl,{})]})})}):null}function ll({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0M3.124 7.5A8.969 8.969 0 015.292 3m13.416 0a8.969 8.969 0 012.168 4.5"}))}const ul=p.forwardRef(ll);function cl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"}))}const dl=p.forwardRef(cl);function hl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"}))}const fl=p.forwardRef(hl);function pl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"}))}const ml=p.forwardRef(pl);function gl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"}))}const yl=p.forwardRef(gl);function vl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"}))}const bl=p.forwardRef(vl);function wl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 110-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 01-1.44-4.282m3.102.069a18.03 18.03 0 01-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 018.835 2.535M10.34 6.66a23.847 23.847 0 008.835-2.535m0 0A23.74 23.74 0 0018.795 3m.38 1.125a23.91 23.91 0 011.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 001.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 010 3.46"}))}const Cl=p.forwardRef(wl);function El({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const Rl=p.forwardRef(El);function Sl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"}))}const xl=p.forwardRef(Sl);function Ol({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const _l=p.forwardRef(Ol);function Tl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"}))}const kl=p.forwardRef(Tl);function Dl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 019 14.437V9.564z"}))}const Ll=p.forwardRef(Dl);function Pl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"}))}const Fl=p.forwardRef(Pl);function Ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"}))}const jl=p.forwardRef(Ml);function Nl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"}))}const Al=p.forwardRef(Nl);function ql({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75a4.5 4.5 0 01-4.884 4.484c-1.076-.091-2.264.071-2.95.904l-7.152 8.684a2.548 2.548 0 11-3.586-3.586l8.684-7.152c.833-.686.995-1.874.904-2.95a4.5 4.5 0 016.336-4.486l-3.276 3.276a3.004 3.004 0 002.25 2.25l3.276-3.276c.256.565.398 1.192.398 1.852z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.867 19.125h.008v.008h-.008v-.008z"}))}const Il=p.forwardRef(ql);function Vl({iconName:t}){switch(t){case"CalendarIcon":return y.jsx(fl,{});case"CalendarDaysIcon":return y.jsx(dl,{});case"FireIcon":return y.jsx(ml,{});case"MegaphoneIcon":return y.jsx(Cl,{});case"WrenchIcon":return y.jsx(Il,{});case"WrenchScrewdriverIcon":return y.jsx(Al,{});case"ShareIcon":return y.jsx(Rl,{});case"ShoppingBagIcon":return y.jsx(xl,{});case"ShoppingCartIcon":return y.jsx(_l,{});case"StarIcon":return y.jsx(kl,{});case"StopCircleIcon":return y.jsx(Ll,{});case"StopIcon":return y.jsx(Fl,{});case"LockClosedIcon":return y.jsx(bl,{});case"LinkIcon":return y.jsx(yl,{});case"UserGroupIcon":return y.jsx(jl,{});case"BellAlertIcon":return y.jsx(ul,{});default:return null}}function Jt({children:t}){return y.jsx("div",{className:"qikbar-details-container",children:t})}function Vi({children:t}){return y.jsx("ul",{className:"qikbar-list",children:t})}function Ui({item:{name:t,children:e,Icon:r}}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"qikbar-category-wrapper",children:[r&&y.jsx(r,{}),y.jsx("p",{className:"qikbar-category",children:t})]}),e.map(n=>n.children?y.jsx(Ui,{item:n},n.id):y.jsx(un,{item:n},n.id))]})}var $i=function(t){return t.indexOf("//")===0&&(t=location.protocol+t),t.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]},Ul=function(t){if(t)return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&$i(location.href)!==$i(t)};function un({item:{iconName:t,title:e,to:r,description:n,href:i,route:s,action:a,children:o,tag:l}}){const{setIsOpen:c,setCrumbs:d,setActions:f,demo:u}=N.useContext(et),m=Se();if(o)return null;const b=i?"a":vr,w=D=>{var C;m!=null&&m.router&&((C=m==null?void 0:m.router)==null||C.call(m,i),!u&&c(!1),D.preventDefault())},S=r||(s==null?void 0:s.path)||"/",_=i?{...Ul(i)?{rel:"noopener",target:"_blank",href:i,onClick:()=>!u&&c(!1)}:{href:i,onClick:w}}:{to:S,onClick:()=>{f([]),d(D=>[...D,{title:e,to:S}])}};return y.jsxs(b,{"data-testid":"qikbar-item",className:"qikbar-item",..._,onClick:a||(_==null?void 0:_.onClick),children:[y.jsxs("li",{children:[t&&y.jsx(Vl,{iconName:t}),y.jsxs("div",{children:[y.jsx("p",{className:"qikbar-item-title",children:e}),y.jsx("p",{className:"qikbar-item-description",children:n})]})]}),l&&y.jsx("p",{className:"qikbar-item-type",children:l})]})}function Bi({placeholder:t}){const{setPlaceholder:e}=N.useContext(et);return N.useEffect(()=>{e(t)},[e,t]),null}function Hi({fields:t}){return y.jsx("div",{className:"qikbar-details-wrapper",children:y.jsx("div",{className:"qikbar-details",children:t.map((e,r)=>y.jsx("div",{className:"qikbar-fieldset",children:e.map(({label:n,value:i,html:s},a)=>y.jsxs("div",{className:"qikbar-field",children:[n&&y.jsxs("span",{className:"qikbar-field-label",children:[n,":"]}),s?y.jsx("p",{dangerouslySetInnerHTML:{__html:i},className:"qikbar-field-value"}):y.jsx("p",{className:"qikbar-field-value",children:i})]},a))},r))})})}function Qi({categories:t,placeholderText:e}){var d;const{activeIndex:r,search:n,setActions:i,navigateTo:s}=N.useContext(et),a=t.map(f=>({...f,children:f.commands.filter(u=>u.title.toLowerCase().includes(n.toLowerCase()))})).filter(f=>f.children.length>0),l=a.reduce((f,u)=>[...f,...u.children],[])[r],c=l==null?void 0:l.actions;return l==null||l.fields,N.useEffect(()=>{i(l&&c?c:[])},[l,n,r]),a.length===0?y.jsx(Jt,{children:y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})}):y.jsxs(y.Fragment,{children:[y.jsx(Bi,{placeholder:e}),y.jsxs(Jt,{children:[y.jsx(Vi,{children:a.map(f=>f.children?y.jsx(Ui,{item:f},f.name):y.jsx(un,{item:f},f.id))}),l&&((d=l==null?void 0:l.details)==null?void 0:d.length)>0&&y.jsx(Hi,{fields:l.details})]})]})}class Xt{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const er=typeof window>"u"||"Deno"in window;function _e(){}function $l(t,e){return typeof t=="function"?t(e):t}function cn(t){return typeof t=="number"&&t>=0&&t!==1/0}function zi(t,e){return Math.max(t+(e||0)-Date.now(),0)}function tr(t,e,r){return br(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function tt(t,e,r){return br(t)?[{...e,queryKey:t},r]:[t||{},e]}function Wi(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:o}=t;if(br(a)){if(n){if(e.queryHash!==dn(a,e.options))return!1}else if(!_t(e.queryKey,a))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function Ki(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(br(s)){if(!e.options.mutationKey)return!1;if(r){if(ft(e.options.mutationKey)!==ft(s))return!1}else if(!_t(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function dn(t,e){return((e==null?void 0:e.queryKeyHashFn)||ft)(t)}function ft(t){return JSON.stringify(t,(e,r)=>hn(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function _t(t,e){return Yi(t,e)}function Yi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!Yi(t[r],e[r])):!1}function Gi(t,e){if(t===e)return t;const r=Ji(t)&&Ji(e);if(r||hn(t)&&hn(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,a=r?[]:{};let o=0;for(let l=0;l<s;l++){const c=r?l:i[l];a[c]=Gi(t[c],e[c]),a[c]===t[c]&&o++}return n===s&&o===n?t:a}return e}function Zi(t,e){if(t&&!e||e&&!t)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Ji(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function hn(t){if(!Xi(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!Xi(r)||!r.hasOwnProperty("isPrototypeOf"))}function Xi(t){return Object.prototype.toString.call(t)==="[object Object]"}function br(t){return Array.isArray(t)}function es(t){return new Promise(e=>{setTimeout(e,t)})}function ts(t){es(0).then(t)}function Bl(){if(typeof AbortController=="function")return new AbortController}function fn(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Gi(t,e):e}class Hl extends Xt{constructor(){super(),this.setup=e=>{if(!er&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const wr=new Hl;class Ql extends Xt{constructor(){super(),this.setup=e=>{if(!er&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Cr=new Ql;function zl(t){return Math.min(1e3*2**t,3e4)}function Er(t){return(t??"online")==="online"?Cr.isOnline():!0}class rs{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Rr(t){return t instanceof rs}function ns(t){let e=!1,r=0,n=!1,i,s,a;const o=new Promise((S,_)=>{s=S,a=_}),l=S=>{n||(m(new rs(S)),t.abort==null||t.abort())},c=()=>{e=!0},d=()=>{e=!1},f=()=>!wr.isFocused()||t.networkMode!=="always"&&!Cr.isOnline(),u=S=>{n||(n=!0,t.onSuccess==null||t.onSuccess(S),i==null||i(),s(S))},m=S=>{n||(n=!0,t.onError==null||t.onError(S),i==null||i(),a(S))},b=()=>new Promise(S=>{i=_=>{if(n||!f())return S(_)},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),w=()=>{if(n)return;let S;try{S=t.fn()}catch(_){S=Promise.reject(_)}Promise.resolve(S).then(u).catch(_=>{var D,C;if(n)return;const E=(D=t.retry)!=null?D:3,F=(C=t.retryDelay)!=null?C:zl,O=typeof F=="function"?F(r,_):F,T=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,_);if(e||!T){m(_);return}r++,t.onFail==null||t.onFail(r,_),es(O).then(()=>{if(f())return b()}).then(()=>{e?m(_):w()})})};return Er(t.networkMode)?w():b().then(w),{promise:o,cancel:l,continue:()=>{i==null||i()},cancelRetry:c,continueRetry:d}}const pn=console;function Wl(){let t=[],e=0,r=d=>{d()},n=d=>{d()};const i=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},s=d=>{e?t.push(d):ts(()=>{r(d)})},a=d=>(...f)=>{s(()=>{d(...f)})},o=()=>{const d=t;t=[],d.length&&ts(()=>{n(()=>{d.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:a,schedule:s,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{n=d}}}const le=Wl();class is{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cn(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(er?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Kl extends is{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||pn,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Yl(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=fn(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(_e).catch(_e):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!zi(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(b=>b.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||process.env.NODE_ENV!=="production"&&this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const a=Bl(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(o);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn"),d={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(d),(n=this.options.behavior)==null||n.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=d.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta})}const u=m=>{if(Rr(m)&&m.silent||this.dispatch({type:"error",error:m}),!Rr(m)){var b,w;(b=(w=this.cache.config).onError)==null||b.call(w,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=ns({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var b,w;if(typeof m>"u"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),u(new Error("undefined"));return}this.setData(m),(b=(w=this.cache.config).onSuccess)==null||b.call(w,m,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:u,onFail:(m,b)=>{this.dispatch({type:"failed",failureCount:m,error:b})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:Er(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return Rr(a)&&a.revert&&this.revertState?{...this.revertState}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),le.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function Yl(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Gl extends Xt{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,a=(i=r.queryHash)!=null?i:dn(s,r);let o=this.get(a);return o||(o=new Kl({cache:this,logger:e.getLogger(),queryKey:s,queryHash:a,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){le.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=tt(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>Wi(n,i))}findAll(e,r){const[n]=tt(e,r);return Object.keys(n).length>0?this.queries.filter(i=>Wi(n,i)):this.queries}notify(e){le.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){le.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){le.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class Zl extends is{constructor(e){super(),this.options={...e.defaultOptions,...e.options},this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||pn,this.observers=[],this.state=e.state||Jl(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const e=()=>{var C;return this.retryer=ns({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(E,F)=>{this.dispatch({type:"failed",failureCount:E,error:F})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,a,o,l;if(!r){var c,d,f,u;this.dispatch({type:"loading",variables:this.options.variables}),await((c=(d=this.mutationCache.config).onMutate)==null?void 0:c.call(d,this.state.variables,this));const E=await((f=(u=this.options).onMutate)==null?void 0:f.call(u,this.state.variables));E!==this.state.context&&this.dispatch({type:"loading",context:E,variables:this.state.variables})}const C=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,C,this.state.variables,this.state.context,this)),await((s=(a=this.options).onSuccess)==null?void 0:s.call(a,C,this.state.variables,this.state.context)),await((o=(l=this.options).onSettled)==null?void 0:o.call(l,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var m,b,w,S,_,D;throw await((m=(b=this.mutationCache.config).onError)==null?void 0:m.call(b,C,this.state.variables,this.state.context,this)),process.env.NODE_ENV!=="production"&&this.logger.error(C),await((w=(S=this.options).onError)==null?void 0:w.call(S,C,this.state.variables,this.state.context)),await((_=(D=this.options).onSettled)==null?void 0:_.call(D,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Er(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),le.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function Jl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Xl extends Xt{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new Zl({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){le.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>Ki(e,r))}findAll(e){return this.mutations.filter(r=>Ki(e,r))}notify(e){le.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.mutations.filter(r=>r.state.isPaused);return le.batch(()=>e.reduce((r,n)=>r.then(()=>n.continue().catch(_e)),Promise.resolve()))}}function eu(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,a;const o=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,c=l==null?void 0:l.pageParam,d=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",u=((s=t.state.data)==null?void 0:s.pages)||[],m=((a=t.state.data)==null?void 0:a.pageParams)||[];let b=m,w=!1;const S=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>{var T;if((T=t.signal)!=null&&T.aborted)w=!0;else{var P;(P=t.signal)==null||P.addEventListener("abort",()=>{w=!0})}return t.signal}})},_=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),D=(O,T,P,B)=>(b=B?[T,...b]:[...b,T],B?[P,...O]:[...O,P]),C=(O,T,P,B)=>{if(w)return Promise.reject("Cancelled");if(typeof P>"u"&&!T&&O.length)return Promise.resolve(O);const Z={queryKey:t.queryKey,pageParam:P,meta:t.options.meta};S(Z);const J=_(Z);return Promise.resolve(J).then(se=>D(O,P,se,B))};let E;if(!u.length)E=C([]);else if(d){const O=typeof c<"u",T=O?c:ss(t.options,u);E=C(u,O,T)}else if(f){const O=typeof c<"u",T=O?c:tu(t.options,u);E=C(u,O,T,!0)}else{b=[];const O=typeof t.options.getNextPageParam>"u";E=(o&&u[0]?o(u[0],0,u):!0)?C([],O,m[0]):Promise.resolve(D([],m[0],u[0]));for(let P=1;P<u.length;P++)E=E.then(B=>{if(o&&u[P]?o(u[P],P,u):!0){const J=O?m[P]:ss(t.options,B);return C(B,O,J)}return Promise.resolve(D(B,m[P],u[P]))})}return E.then(O=>({pages:O,pageParams:b}))}}}}function ss(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function tu(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}class ru{constructor(e={}){this.queryCache=e.queryCache||new Gl,this.mutationCache=e.mutationCache||new Xl,this.logger=e.logger||pn,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=wr.subscribe(()=>{wr.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Cr.subscribe(()=>{Cr.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=tt(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=tr(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,a=$l(r,s);if(typeof a>"u")return;const o=tr(e),l=this.defaultQueryOptions(o);return this.queryCache.build(this,l).setData(a,{...n,manual:!0})}setQueriesData(e,r,n){return le.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=tt(e,r),i=this.queryCache;le.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=tt(e,r,n),a=this.queryCache,o={type:"active",...i};return le.batch(()=>(a.findAll(i).forEach(l=>{l.reset()}),this.refetchQueries(o,s)))}cancelQueries(e,r,n){const[i,s={}]=tt(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const a=le.batch(()=>this.queryCache.findAll(i).map(o=>o.cancel(s)));return Promise.all(a).then(_e).catch(_e)}invalidateQueries(e,r,n){const[i,s]=tt(e,r,n);return le.batch(()=>{var a,o;if(this.queryCache.findAll(i).forEach(c=>{c.invalidate()}),i.refetchType==="none")return Promise.resolve();const l={...i,type:(a=(o=i.refetchType)!=null?o:i.type)!=null?a:"active"};return this.refetchQueries(l,s)})}refetchQueries(e,r,n){const[i,s]=tt(e,r,n),a=le.batch(()=>this.queryCache.findAll(i).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...s,cancelRefetch:(c=s==null?void 0:s.cancelRefetch)!=null?c:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(a).then(_e);return s!=null&&s.throwOnError||(o=o.catch(_e)),o}fetchQuery(e,r,n){const i=tr(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const a=this.queryCache.build(this,s);return a.isStaleByTime(s.staleTime)?a.fetch(s):Promise.resolve(a.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(_e).catch(_e)}fetchInfiniteQuery(e,r,n){const i=tr(e,r,n);return i.behavior=eu(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(_e).catch(_e)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>ft(e)===ft(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>_t(e,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>_t(e,i.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>ft(e)===ft(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>_t(e,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>_t(e,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=dn(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class nu extends Xt{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),as(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return mn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),process.env.NODE_ENV!=="production"&&typeof(e==null?void 0:e.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),Zi(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&os(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(_e)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),er||this.currentResult.isStale||!cn(this.options.staleTime))return;const r=zi(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(er||this.options.enabled===!1||!cn(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||wr.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,a=this.currentResultState,o=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:u,error:m,errorUpdatedAt:b,fetchStatus:w,status:S}=f,_=!1,D=!1,C;if(r._optimisticResults){const P=this.hasListeners(),B=!P&&as(e,r),Z=P&&os(e,n,r,i);(B||Z)&&(w=Er(e.options.networkMode)?"fetching":"paused",u||(S="loading")),r._optimisticResults==="isRestoring"&&(w="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&S!=="error")C=d.data,u=d.dataUpdatedAt,S=d.status,_=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(a==null?void 0:a.data)&&r.select===this.selectFn)C=this.selectResult;else try{this.selectFn=r.select,C=r.select(f.data),C=fn(s==null?void 0:s.data,C,r),this.selectResult=C,this.selectError=null}catch(P){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(P),this.selectError=P}else C=f.data;if(typeof r.placeholderData<"u"&&typeof C>"u"&&S==="loading"){let P;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData))P=s.data;else if(P=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof P<"u")try{P=r.select(P),this.selectError=null}catch(B){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(B),this.selectError=B}typeof P<"u"&&(S="success",C=fn(s==null?void 0:s.data,P,r),D=!0)}this.selectError&&(m=this.selectError,C=this.selectResult,b=Date.now(),S="error");const E=w==="fetching",F=S==="loading",O=S==="error";return{status:S,fetchStatus:w,isLoading:F,isSuccess:S==="success",isError:O,isInitialLoading:F&&E,data:C,dataUpdatedAt:u,error:m,errorUpdatedAt:b,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!F,isLoadingError:O&&f.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:D,isPreviousData:_,isRefetchError:O&&f.dataUpdatedAt!==0,isStale:gn(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Zi(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options;if(a==="all"||!a&&!this.trackedProps.size)return!0;const o=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&o.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==r[c]&&o.has(c)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!Rr(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){le.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var a,o,l,c;(a=(o=this.options).onError)==null||a.call(o,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(d=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function iu(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function as(t,e){return iu(t,e)||t.state.dataUpdatedAt>0&&mn(t,e,e.refetchOnMount)}function mn(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&gn(t,e)}return!1}function os(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&gn(t,r)}function gn(t,e){return t.isStaleByTime(e.staleTime)}var su=Gr();const au=su.useSyncExternalStore,ls=p.createContext(void 0),us=p.createContext(!1);function cs(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ls),window.ReactQueryClientContext):ls)}const ou=({context:t}={})=>{const e=p.useContext(cs(t,p.useContext(us)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},lu=({client:t,children:e,context:r,contextSharing:n=!1})=>{p.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),process.env.NODE_ENV!=="production"&&n&&t.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=cs(r,n);return p.createElement(us.Provider,{value:!r&&n},p.createElement(i.Provider,{value:t},e))},ds=p.createContext(!1),uu=()=>p.useContext(ds);ds.Provider;function cu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const du=p.createContext(cu()),hu=()=>p.useContext(du);function fu(t,e){return typeof t=="function"?t(...e):!!t}const pu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},mu=t=>{p.useEffect(()=>{t.clearReset()},[t])},gu=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&fu(r,[t.error,n]),yu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},vu=(t,e)=>t.isLoading&&t.isFetching&&!e,bu=(t,e,r)=>(t==null?void 0:t.suspense)&&vu(e,r),wu=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function Cu(t,e){const r=ou({context:t.context}),n=uu(),i=hu(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=le.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=le.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=le.batchCalls(s.onSettled)),yu(s),pu(s,i),mu(i);const[a]=p.useState(()=>new e(r,s)),o=a.getOptimisticResult(s);if(au(p.useCallback(l=>n?()=>{}:a.subscribe(le.batchCalls(l)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),bu(s,o,n))throw wu(s,a,i);if(gu({result:o,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw o.error;return s.notifyOnChangeProps?o:a.trackResult(o)}function Eu(t,e,r){const n=tr(t,e,r);return Cu(n,nu)}function Ru(t,e){const[r,n]=N.useState(t);return N.useEffect(()=>{const i=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(i)}},[t,e]),r}var Su="Expected a function",hs="__lodash_hash_undefined__",fs=1/0,xu="[object Function]",Ou="[object GeneratorFunction]",_u="[object Symbol]",Tu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ku=/^\w*$/,Du=/^\./,Lu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pu=/[\\^$.*+?()[\]{}|]/g,Fu=/\\(\\)?/g,Mu=/^\[object .+?Constructor\]$/,ju=typeof ur=="object"&&ur&&ur.Object===Object&&ur,Nu=typeof self=="object"&&self&&self.Object===Object&&self,yn=ju||Nu||Function("return this")();function Au(t,e){return t==null?void 0:t[e]}function qu(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Iu=Array.prototype,Vu=Function.prototype,ps=Object.prototype,vn=yn["__core-js_shared__"],ms=function(){var t=/[^.]+$/.exec(vn&&vn.keys&&vn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),gs=Vu.toString,bn=ps.hasOwnProperty,ys=ps.toString,Uu=RegExp("^"+gs.call(bn).replace(Pu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vs=yn.Symbol,$u=Iu.splice,Bu=Cs(yn,"Map"),rr=Cs(Object,"create"),bs=vs?vs.prototype:void 0,ws=bs?bs.toString:void 0;function pt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hu(){this.__data__=rr?rr(null):{}}function Qu(t){return this.has(t)&&delete this.__data__[t]}function zu(t){var e=this.__data__;if(rr){var r=e[t];return r===hs?void 0:r}return bn.call(e,t)?e[t]:void 0}function Wu(t){var e=this.__data__;return rr?e[t]!==void 0:bn.call(e,t)}function Ku(t,e){var r=this.__data__;return r[t]=rr&&e===void 0?hs:e,this}pt.prototype.clear=Hu,pt.prototype.delete=Qu,pt.prototype.get=zu,pt.prototype.has=Wu,pt.prototype.set=Ku;function Tt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Yu(){this.__data__=[]}function Gu(t){var e=this.__data__,r=Sr(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():$u.call(e,r,1),!0}function Zu(t){var e=this.__data__,r=Sr(e,t);return r<0?void 0:e[r][1]}function Ju(t){return Sr(this.__data__,t)>-1}function Xu(t,e){var r=this.__data__,n=Sr(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Tt.prototype.clear=Yu,Tt.prototype.delete=Gu,Tt.prototype.get=Zu,Tt.prototype.has=Ju,Tt.prototype.set=Xu;function mt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ec(){this.__data__={hash:new pt,map:new(Bu||Tt),string:new pt}}function tc(t){return xr(this,t).delete(t)}function rc(t){return xr(this,t).get(t)}function nc(t){return xr(this,t).has(t)}function ic(t,e){return xr(this,t).set(t,e),this}mt.prototype.clear=ec,mt.prototype.delete=tc,mt.prototype.get=rc,mt.prototype.has=nc,mt.prototype.set=ic;function Sr(t,e){for(var r=t.length;r--;)if(mc(t[r][0],e))return r;return-1}function sc(t,e){e=uc(e,t)?[e]:lc(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[fc(e[r++])];return r&&r==n?t:void 0}function ac(t){if(!Rs(t)||dc(t))return!1;var e=gc(t)||qu(t)?Uu:Mu;return e.test(pc(t))}function oc(t){if(typeof t=="string")return t;if(Cn(t))return ws?ws.call(t):"";var e=t+"";return e=="0"&&1/t==-fs?"-0":e}function lc(t){return Es(t)?t:hc(t)}function xr(t,e){var r=t.__data__;return cc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Cs(t,e){var r=Au(t,e);return ac(r)?r:void 0}function uc(t,e){if(Es(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Cn(t)?!0:ku.test(t)||!Tu.test(t)||e!=null&&t in Object(e)}function cc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function dc(t){return!!ms&&ms in t}var hc=wn(function(t){t=vc(t);var e=[];return Du.test(t)&&e.push(""),t.replace(Lu,function(r,n,i,s){e.push(i?s.replace(Fu,"$1"):n||r)}),e});function fc(t){if(typeof t=="string"||Cn(t))return t;var e=t+"";return e=="0"&&1/t==-fs?"-0":e}function pc(t){if(t!=null){try{return gs.call(t)}catch{}try{return t+""}catch{}}return""}function wn(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Su);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a),a};return r.cache=new(wn.Cache||mt),r}wn.Cache=mt;function mc(t,e){return t===e||t!==t&&e!==e}var Es=Array.isArray;function gc(t){var e=Rs(t)?ys.call(t):"";return e==xu||e==Ou}function Rs(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function yc(t){return!!t&&typeof t=="object"}function Cn(t){return typeof t=="symbol"||yc(t)&&ys.call(t)==_u}function vc(t){return t==null?"":oc(t)}function bc(t,e,r){var n=t==null?void 0:sc(t,e);return n===void 0?r:n}var wc=bc;class Le{constructor(e,r,n,i,s){this.kind=e,this.input=r,this.begin=n,this.end=i,this.file=s}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,r]=[1,1];for(let n=0;n<this.begin;n++)this.input[n]===`
90
90
  `?(e++,r=1):r++;return[e,r]}size(){return this.end-this.begin}}class gt{liquidMethodMissing(e){}}const Cc=Object.prototype.toString,Ss=String.prototype.toLowerCase,xs=Object.hasOwnProperty;function Qe(t){return typeof t=="string"}function be(t){return typeof t=="function"}function Ec(t){return t&&be(t.then)}function Or(t){return t&&be(t.next)&&be(t.throw)&&be(t.return)}function Rc(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t){return t=$(t),Qe(t)?t:ze(t)?"":Ce(t)?t.map(e=>U(e)).join(""):String(t)}function $(t){return t instanceof gt&&be(t.valueOf)?t.valueOf():t}function _r(t){return typeof t=="number"}function Os(t){return t&&be(t.toLiquid)?Os(t.toLiquid()):t}function ze(t){return t==null}function Ce(t){return Cc.call(t)==="[object Array]"}function Sc(t){return Rn(t)&&Symbol.iterator in t}function _s(t,e){t=t||{};for(const r in t)if(xs.call(t,r)&&e(t[r],r,t)===!1)break;return t}function En(t){return t[t.length-1]}function Rn(t){const e=typeof t;return t!==null&&(e==="object"||e==="function")}function Ts(t,e,r=1){const n=[];for(let i=t;i<e;i+=r)n.push(i);return n}function Tr(t,e,r=" "){return ks(t,e,r,(n,i)=>i+n)}function xc(t,e,r=" "){return ks(t,e,r,(n,i)=>n+i)}function ks(t,e,r,n){t=String(t);let i=e-t.length;for(;i-- >0;)t=n(t,r);return t}function Ds(t){return t}function Oc(t){return[...t].some(r=>r>="a"&&r<="z")?t.toUpperCase():t.toLowerCase()}function _c(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Ls(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=Ss.call(t),e=Ss.call(e),t<e)?-1:t>e?1:0}function Ee(t){return(...e)=>t(...e.map($))}function Sn(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}class kr extends Error{constructor(e,r){super(e.message),this.originalError=e,this.token=r,this.context=""}update(){const e=this.originalError;this.context=Pc(this.token),this.message=Fc(e.message,this.token),this.stack=this.message+`
91
91
  `+this.context+`
92
92
  `+this.stack+`
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@qikbar/qikbar",
3
3
  "private": false,
4
4
  "author": "Josh Hamilton",
5
- "version": "0.0.15",
5
+ "version": "0.0.16",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist/"