@qikbar/qikbar 0.0.14
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 +8643 -0
- package/dist/qikbar.umd.js +113 -0
- package/dist/types/boot.d.ts +60 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/init.d.ts +2 -0
- package/dist/types/main.d.ts +3 -0
- package/dist/types/shared/AsyncRoot.d.ts +5 -0
- package/dist/types/shared/CommandFooter.d.ts +1 -0
- package/dist/types/shared/Crumbs.d.ts +6 -0
- package/dist/types/shared/Details.d.ts +3 -0
- package/dist/types/shared/ErrorBoundary.d.ts +15 -0
- package/dist/types/shared/Icon.d.ts +4 -0
- package/dist/types/shared/List.d.ts +30 -0
- package/dist/types/shared/Qikbar.d.ts +5 -0
- package/dist/types/shared/Root.d.ts +4 -0
- package/dist/types/shared/Search.d.ts +1 -0
- package/dist/types/shared/commandContext.d.ts +4 -0
- package/dist/types/shared/useDebounce.d.ts +1 -0
- package/dist/types/utils/liquid.d.ts +4 -0
- package/dist/types/vite-env.d.ts +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap";#qikbar{--bg-color: rgba(6, 2, 13, .95);--border-color: rgba(105, 106, 108, 1);--category-color: rgb(196, 196, 196);--placeholder-color: rgb(205, 205, 205);--item-hover: rgba(53, 53, 55, .6);--item-focus: rgba(53, 53, 55, .7);--bg-color: #0f172a;--border-color: #1e293b;--category-color: #cbd5e1;--placeholder-color: #475569;--item-color: white;--item-hover: #334155;--item-focus: #475569;--logo-secondary: #ffffff;--bg-color: #f8fafc;--border-color: #e2e8f0;--category-color: #334155;--placeholder-color: #cbd5e1;--item-color: #0f172a;--item-hover: #cbd5e1;--item-focus: #e2e8f0;--logo-primary: #ef4444;--logo-secondary: #0f172a}#qikbar *:not(svg,path){all:unset;box-sizing:border-box}#qikbar .qikbar-command-wrapper{z-index:10000;position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:140px 30px 30px;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#qikbar .qikbar-command-wrapper p{margin:0}#qikbar .qikbar-command-bar{width:100%;margin:0 30px;max-width:800px;min-width:200px;background-color:var(--bg-color);border-radius:10px;border:2px solid var(--border-color);display:flex;flex-direction:column;max-height:600px;overflow:scroll}#qikbar .qikbar-command-content{position:relative;display:flex;height:100%;min-height:0}#qikbar .qikbar-command-error{padding:20px;font-size:18px;color:var(--item-color);display:block}#qikbar .qikbar-command-error a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-command-footer{border-top:1px solid var(--border-color);padding:8px 6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color)}#qikbar .qikbar-details-container{display:flex;position:relative;flex:1}#qikbar .qikbar-details-wrapper{flex:1;border-left:1px solid var(--border-color);max-width:100%;overflow:scroll}#qikbar .qikbar-details{padding:8px;font-size:14px;max-height:100%;display:block;position:relative}#qikbar .qikbar-fieldset{display:flex;margin-bottom:10px}#qikbar .qikbar-field{color:var(--item-color);flex:1;display:block}#qikbar .qikbar-field-label{font-weight:700}#qikbar .qikbar-field-value a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-field-value img{width:100%}#qikbar .qikbar-crumbs{width:100%;padding:0 10px}#qikbar .qikbar-crumb{font-size:12px;cursor:pointer;color:var(--category-color)}#qikbar .qikbar-crumb:last-child{font-weight:bolder}#qikbar .qikbar-crumb-divider{margin:0 6px}#qikbar .qikbar-search-wrapper{display:flex;flex-direction:column}#qikbar .qikbar-search{font-weight:500;background-color:var(--bg-color);font-size:20px;border:none;border-radius:10px 10px 0 0;width:100%;padding:14px 10px;color:var(--item-color);outline:none;border-bottom:1px solid var(--border-color)}#qikbar .qikbar-search::-moz-placeholder{color:var(--placeholder-color)}#qikbar .qikbar-search::placeholder{color:var(--placeholder-color)}#qikbar .qikbar-list{flex:1;list-style:none;padding:0;margin:4px 0;overflow:scroll}#qikbar .qikbar-item-empty{margin:2px 4px;padding:6px;color:var(--item-color);display:flex;font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item{margin:2px 4px;padding:6px;display:flex;cursor:pointer;justify-content:space-between;align-items:center;color:var(--item-color);font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item li{display:flex;align-items:flex-start}#qikbar .qikbar-item li div{display:flex;flex-direction:column}#qikbar .qikbar-item li svg{min-width:24px;width:24px;height:24px;margin-right:4px}#qikbar .qikbar-item-description{font-size:11px;line-height:1.2;color:var(--category-color)}#qikbar .qikbar-item-type{font-size:12px;color:var(--category-color)}#qikbar .qikbar-category-wrapper{display:flex;padding:2px 10px;font-size:14px;align-items:center}#qikbar .qikbar-category-icon{width:16px;height:16px;color:var(--category-color);margin-right:2px}#qikbar .qikbar-category{color:var(--category-color);margin-left:4px}#qikbar .qikbar-search-wrapper:has(> .qikbar-search:focus)+.qikbar-command-content .qikbar-list .qikbar-item:first-of-type{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-logo{width:89px;height:30px;cursor:pointer}#qikbar .qikbar-logo .qikbar-logo-primary-fill{fill:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-primary-stroke{stroke:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-secondary{fill:var(--logo-secondary)}#qikbar .qikbar-actions-wrapper{position:relative}#qikbar .qikbar-actions-panel{position:absolute;bottom:35px;right:0;min-width:200px;background-color:var(--bg-color);border-radius:5px;border:1px solid var(--border-color)}#qikbar .qikbar-actions-list{list-style:none;padding:2px;margin:0;display:flex;flex-direction:column}#qikbar .qikbar-action{width:100%;font-size:14px;border:none;padding:6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color);text-decoration:none;font-weight:500;border-radius:5px;cursor:pointer}#qikbar .qikbar-action:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-action:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-actions{font-size:14px;background-color:var(--bg-color);border:1px solid var(--border-color);border-radius:5px;color:var(--item-color);cursor:pointer;padding:2px;display:flex}#qikbar .qikbar-actions:hover{background-color:var(--item-hover)}#qikbar .qikbar-actions:focus{background-color:var(--item-focus);color:var(--item-color)}#qikbar .qikbar-actions-action{margin-left:2px}#qikbar .qikbar-keys{font-size:12px;margin-left:4px}#qikbar .qikbar-kbd{padding:.2rem .4rem;font-size:87.5%;color:var(--item-color);background-color:var(--border-color);border-radius:.25rem;box-shadow:inset 0 -.1rem #00000040}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
(function(ge,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],N):(ge=typeof globalThis<"u"?globalThis:ge||self,N(ge.qikbar={},ge.React,ge.ReactDOM))})(this,function(ge,N,lt){"use strict";var $f=Object.defineProperty;var Bf=(ge,N,lt)=>N in ge?$f(ge,N,{enumerable:!0,configurable:!0,writable:!0,value:lt}):ge[N]=lt;var sa=(ge,N,lt)=>(Bf(ge,typeof N!="symbol"?N+"":N,lt),lt);function aa(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const p=aa(N);var ur=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var w={},la={get exports(){return w},set exports(t){w=t}},Vt={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var Bn;function ua(){if(Bn)return Vt;Bn=1;var t=N,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(o,l,u){var d,f={},c=null,m=null;u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),l.ref!==void 0&&(m=l.ref);for(d in l)n.call(l,d)&&!s.hasOwnProperty(d)&&(f[d]=l[d]);if(o&&o.defaultProps)for(d in l=o.defaultProps,l)f[d]===void 0&&(f[d]=l[d]);return{$$typeof:e,type:o,key:c,ref:m,props:f,_owner:i.current}}return Vt.Fragment=r,Vt.jsx=a,Vt.jsxs=a,Vt}var Ut={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.development.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var Hn;function ca(){return Hn||(Hn=1,process.env.NODE_ENV!=="production"&&function(){var t=N,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),C=Symbol.iterator,E="@@iterator";function R(h){if(h===null||typeof h!="object")return null;var x=C&&h[C]||h[E];return typeof x=="function"?x:null}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(h){{for(var x=arguments.length,k=new Array(x>1?x-1:0),V=1;V<x;V++)k[V-1]=arguments[V];b("error",h,k)}}function b(h,x,k){{var V=O.ReactDebugCurrentFrame,Y=V.getStackAddendum();Y!==""&&(x+="%s",k=k.concat([Y]));var Z=k.map(function(K){return String(K)});Z.unshift("Warning: "+x),Function.prototype.apply.call(console[h],console,Z)}}var g=!1,M=!1,_=!1,j=!1,L=!1,B;B=Symbol.for("react.module.reference");function ee(h){return!!(typeof h=="string"||typeof h=="function"||h===n||h===s||L||h===i||h===u||h===d||j||h===m||g||M||_||typeof h=="object"&&h!==null&&(h.$$typeof===c||h.$$typeof===f||h.$$typeof===a||h.$$typeof===o||h.$$typeof===l||h.$$typeof===B||h.getModuleId!==void 0))}function re(h,x,k){var V=h.displayName;if(V)return V;var Y=x.displayName||x.name||"";return Y!==""?k+"("+Y+")":k}function W(h){return h.displayName||"Context"}function ne(h){if(h==null)return null;if(typeof h.tag=="number"&&T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case o:var x=h;return W(x)+".Consumer";case a:var k=h;return W(k._context)+".Provider";case l:return re(h,h.render,"ForwardRef");case f:var V=h.displayName||null;return V!==null?V:ne(h.type)||"Memo";case c:{var Y=h,Z=Y._payload,K=Y._init;try{return ne(K(Z))}catch{return null}}}return null}var Ee=Object.assign,Ke=0,it,ie,st,nr,jr,qe,Ar;function qr(){}qr.__reactDisabledLog=!0;function Ir(){{if(Ke===0){it=console.log,ie=console.info,st=console.warn,nr=console.error,jr=console.group,qe=console.groupCollapsed,Ar=console.groupEnd;var h={configurable:!0,enumerable:!0,value:qr,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}Ke++}}function In(){{if(Ke--,Ke===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ee({},h,{value:it}),info:Ee({},h,{value:ie}),warn:Ee({},h,{value:st}),error:Ee({},h,{value:nr}),group:Ee({},h,{value:jr}),groupCollapsed:Ee({},h,{value:qe}),groupEnd:Ee({},h,{value:Ar})})}Ke<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ir=O.ReactCurrentDispatcher,sr;function Ie(h,x,k){{if(sr===void 0)try{throw Error()}catch(Y){var V=Y.stack.trim().match(/\n( *(at )?)/);sr=V&&V[1]||""}return`
|
|
19
|
+
`+sr+h}}var Pt=!1,at;{var ar=typeof WeakMap=="function"?WeakMap:Map;at=new ar}function Ft(h,x){if(!h||Pt)return"";{var k=at.get(h);if(k!==void 0)return k}var V;Pt=!0;var Y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Z;Z=ir.current,ir.current=null,Ir();try{if(x){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(Ze){V=Ze}Reflect.construct(h,[],K)}else{try{K.call()}catch(Ze){V=Ze}h.call(K.prototype)}}else{try{throw Error()}catch(Ze){V=Ze}h()}}catch(Ze){if(Ze&&V&&typeof Ze.stack=="string"){for(var z=Ze.stack.split(`
|
|
20
|
+
`),ve=V.stack.split(`
|
|
21
|
+
`),ae=z.length-1,ue=ve.length-1;ae>=1&&ue>=0&&z[ae]!==ve[ue];)ue--;for(;ae>=1&&ue>=0;ae--,ue--)if(z[ae]!==ve[ue]){if(ae!==1||ue!==1)do if(ae--,ue--,ue<0||z[ae]!==ve[ue]){var _e=`
|
|
22
|
+
`+z[ae].replace(" at new "," at ");return h.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",h.displayName)),typeof h=="function"&&at.set(h,_e),_e}while(ae>=1&&ue>=0);break}}}finally{Pt=!1,ir.current=Z,In(),Error.prepareStackTrace=Y}var It=h?h.displayName||h.name:"",ia=It?Ie(It):"";return typeof h=="function"&&at.set(h,ia),ia}function Mt(h,x,k){return Ft(h,!1)}function Vr(h){var x=h.prototype;return!!(x&&x.isReactComponent)}function Nt(h,x,k){if(h==null)return"";if(typeof h=="function")return Ft(h,Vr(h));if(typeof h=="string")return Ie(h);switch(h){case u:return Ie("Suspense");case d:return Ie("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return Mt(h.render);case f:return Nt(h.type,x,k);case c:{var V=h,Y=V._payload,Z=V._init;try{return Nt(Z(Y),x,k)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,Ur={},ot=O.ReactDebugCurrentFrame;function Ye(h){if(h){var x=h._owner,k=Nt(h.type,h._source,x?x.type:null);ot.setExtraStackFrame(k)}else ot.setExtraStackFrame(null)}function $r(h,x,k,V,Y){{var Z=Function.call.bind(Et);for(var K in h)if(Z(h,K)){var z=void 0;try{if(typeof h[K]!="function"){var ve=Error((V||"React class")+": "+k+" type `"+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[K]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ve.name="Invariant Violation",ve}z=h[K](x,K,V,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ae){z=ae}z&&!(z instanceof Error)&&(Ye(Y),T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",V||"React class",k,K,typeof z),Ye(null)),z instanceof Error&&!(z.message in Ur)&&(Ur[z.message]=!0,Ye(Y),T("Failed %s type: %s",k,z.message),Ye(null))}}}var or=Array.isArray;function lr(h){return or(h)}function Vn(h){{var x=typeof Symbol=="function"&&Symbol.toStringTag,k=x&&h[Symbol.toStringTag]||h.constructor.name||"Object";return k}}function Br(h){try{return y(h),!1}catch{return!0}}function y(h){return""+h}function v(h){if(Br(h))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Vn(h)),y(h)}var S=O.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0},D,I,q;q={};function Q(h){if(Et.call(h,"ref")){var x=Object.getOwnPropertyDescriptor(h,"ref").get;if(x&&x.isReactWarning)return!1}return h.ref!==void 0}function A(h){if(Et.call(h,"key")){var x=Object.getOwnPropertyDescriptor(h,"key").get;if(x&&x.isReactWarning)return!1}return h.key!==void 0}function pe(h,x){if(typeof h.ref=="string"&&S.current&&x&&S.current.stateNode!==x){var k=ne(S.current.type);q[k]||(T('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ne(S.current.type),h.ref),q[k]=!0)}}function H(h,x){{var k=function(){D||(D=!0,T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};k.isReactWarning=!0,Object.defineProperty(h,"key",{get:k,configurable:!0})}}function te(h,x){{var k=function(){I||(I=!0,T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};k.isReactWarning=!0,Object.defineProperty(h,"ref",{get:k,configurable:!0})}}var Re=function(h,x,k,V,Y,Z,K){var z={$$typeof:e,type:h,key:x,ref:k,props:K,_owner:Z};return z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z};function Se(h,x,k,V,Y){{var Z,K={},z=null,ve=null;k!==void 0&&(v(k),z=""+k),A(x)&&(v(x.key),z=""+x.key),Q(x)&&(ve=x.ref,pe(x,Y));for(Z in x)Et.call(x,Z)&&!P.hasOwnProperty(Z)&&(K[Z]=x[Z]);if(h&&h.defaultProps){var ae=h.defaultProps;for(Z in ae)K[Z]===void 0&&(K[Z]=ae[Z])}if(z||ve){var ue=typeof h=="function"?h.displayName||h.name||"Unknown":h;z&&H(K,ue),ve&&te(K,ue)}return Re(h,z,ve,Y,V,S.current,K)}}var Ge=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function De(h){if(h){var x=h._owner,k=Nt(h.type,h._source,x?x.type:null);Rt.setExtraStackFrame(k)}else Rt.setExtraStackFrame(null)}var Ve;Ve=!1;function St(h){return typeof h=="object"&&h!==null&&h.$$typeof===e}function ce(){{if(Ge.current){var h=ne(Ge.current.type);if(h)return`
|
|
23
|
+
|
|
24
|
+
Check the render method of \``+h+"`."}return""}}function Oe(h){{if(h!==void 0){var x=h.fileName.replace(/^.*[\\\/]/,""),k=h.lineNumber;return`
|
|
25
|
+
|
|
26
|
+
Check your code at `+x+":"+k+"."}return""}}var Ue={};function jt(h){{var x=ce();if(!x){var k=typeof h=="string"?h:h.displayName||h.name;k&&(x=`
|
|
27
|
+
|
|
28
|
+
Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var k=jt(x);if(Ue[k])return;Ue[k]=!0;var V="";h&&h._owner&&h._owner!==Ge.current&&(V=" It was passed a child from "+ne(h._owner.type)+"."),De(h),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,V),De(null)}}function Hr(h,x){{if(typeof h!="object")return;if(lr(h))for(var k=0;k<h.length;k++){var V=h[k];St(V)&&At(V,x)}else if(St(h))h._store&&(h._store.validated=!0);else if(h){var Y=R(h);if(typeof Y=="function"&&Y!==h.entries)for(var Z=Y.call(h),K;!(K=Z.next()).done;)St(K.value)&&At(K.value,x)}}}function Un(h){{var x=h.type;if(x==null||typeof x=="string")return;var k;if(typeof x=="function")k=x.propTypes;else if(typeof x=="object"&&(x.$$typeof===l||x.$$typeof===f))k=x.propTypes;else return;if(k){var V=ne(x);$r(k,h.props,"prop",V,h)}else if(x.PropTypes!==void 0&&!Ve){Ve=!0;var Y=ne(x);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Y||"Unknown")}typeof x.getDefaultProps=="function"&&!x.getDefaultProps.isReactClassApproved&&T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Le(h){{for(var x=Object.keys(h.props),k=0;k<x.length;k++){var V=x[k];if(V!=="children"&&V!=="key"){De(h),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),De(null);break}}h.ref!==null&&(De(h),T("Invalid attribute `ref` supplied to `React.Fragment`."),De(null))}}function qt(h,x,k,V,Y,Z){{var K=ee(h);if(!K){var z="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ve=Oe(Y);ve?z+=ve:z+=ce();var ae;h===null?ae="null":lr(h)?ae="array":h!==void 0&&h.$$typeof===e?(ae="<"+(ne(h.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof h,T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,z)}var ue=Se(h,x,k,Y,Z);if(ue==null)return ue;if(K){var _e=x.children;if(_e!==void 0)if(V)if(lr(_e)){for(var It=0;It<_e.length;It++)Hr(_e[It],h);Object.freeze&&Object.freeze(_e)}else T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Hr(_e,h)}return h===n?Le(ue):Un(ue),ue}}function Qr(h,x,k){return qt(h,x,k,!0)}function $n(h,x,k){return qt(h,x,k,!1)}var Vf=$n,Uf=Qr;Ut.Fragment=n,Ut.jsx=Vf,Ut.jsxs=Uf}()),Ut}(function(t){process.env.NODE_ENV==="production"?t.exports=ua():t.exports=ca()})(la);var $t={},Bt=lt;if(process.env.NODE_ENV==="production")$t.createRoot=Bt.createRoot,$t.hydrateRoot=Bt.hydrateRoot;else{var cr=Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;$t.createRoot=function(t,e){cr.usingClientEntryPoint=!0;try{return Bt.createRoot(t,e)}finally{cr.usingClientEntryPoint=!1}},$t.hydrateRoot=function(t,e,r){cr.usingClientEntryPoint=!0;try{return Bt.hydrateRoot(t,e,r)}finally{cr.usingClientEntryPoint=!1}}}const Qn=t=>{let e;const r=new Set,n=(l,u)=>{const d=typeof l=="function"?l(e):l;if(!Object.is(d,e)){const f=e;e=u??typeof d!="object"?d:Object.assign({},e,d),r.forEach(c=>c(e,f))}},i=()=>e,o={setState:n,getState:i,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()}};return e=t(n,i,o),o},da=t=>t?Qn(t):Qn;var zr={},ha={get exports(){return zr},set exports(t){zr=t}},Wr={},dr={},fa={get exports(){return dr},set exports(t){dr=t}},Kr={};/**
|
|
29
|
+
* @license React
|
|
30
|
+
* use-sync-external-store-shim.production.min.js
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the MIT license found in the
|
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/var zn;function pa(){if(zn)return Kr;zn=1;var t=N;function e(f,c){return f===c&&(f!==0||1/f===1/c)||f!==f&&c!==c}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function o(f,c){var m=c(),C=n({inst:{value:m,getSnapshot:c}}),E=C[0].inst,R=C[1];return s(function(){E.value=m,E.getSnapshot=c,l(E)&&R({inst:E})},[f,m,c]),i(function(){return l(E)&&R({inst:E}),f(function(){l(E)&&R({inst:E})})},[f]),a(m),m}function l(f){var c=f.getSnapshot;f=f.value;try{var m=c();return!r(f,m)}catch{return!0}}function u(f,c){return c()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return Kr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Kr}var Yr={};/**
|
|
37
|
+
* @license React
|
|
38
|
+
* use-sync-external-store-shim.development.js
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the MIT license found in the
|
|
43
|
+
* LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/var Wn;function ma(){return Wn||(Wn=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=N,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(b){{for(var g=arguments.length,M=new Array(g>1?g-1:0),_=1;_<g;_++)M[_-1]=arguments[_];n("error",b,M)}}function n(b,g,M){{var _=e.ReactDebugCurrentFrame,j=_.getStackAddendum();j!==""&&(g+="%s",M=M.concat([j]));var L=M.map(function(B){return String(B)});L.unshift("Warning: "+g),Function.prototype.apply.call(console[b],console,L)}}function i(b,g){return b===g&&(b!==0||1/b===1/g)||b!==b&&g!==g}var s=typeof Object.is=="function"?Object.is:i,a=t.useState,o=t.useEffect,l=t.useLayoutEffect,u=t.useDebugValue,d=!1,f=!1;function c(b,g,M){d||t.startTransition!==void 0&&(d=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var _=g();if(!f){var j=g();s(_,j)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var L=a({inst:{value:_,getSnapshot:g}}),B=L[0].inst,ee=L[1];return l(function(){B.value=_,B.getSnapshot=g,m(B)&&ee({inst:B})},[b,_,g]),o(function(){m(B)&&ee({inst:B});var re=function(){m(B)&&ee({inst:B})};return b(re)},[b]),u(_),_}function m(b){var g=b.getSnapshot,M=b.value;try{var _=g();return!s(M,_)}catch{return!0}}function C(b,g,M){return g()}var E=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",R=!E,O=R?C:c,T=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:O;Yr.useSyncExternalStore=T,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yr}var Kn;function Gr(){return Kn||(Kn=1,function(t){process.env.NODE_ENV==="production"?t.exports=pa():t.exports=ma()}(fa)),dr}/**
|
|
45
|
+
* @license React
|
|
46
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
47
|
+
*
|
|
48
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the MIT license found in the
|
|
51
|
+
* LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/var Yn;function ga(){if(Yn)return Wr;Yn=1;var t=N,e=Gr();function r(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,o=t.useMemo,l=t.useDebugValue;return Wr.useSyncExternalStoreWithSelector=function(u,d,f,c,m){var C=s(null);if(C.current===null){var E={hasValue:!1,value:null};C.current=E}else E=C.current;C=o(function(){function O(_){if(!T){if(T=!0,b=_,_=c(_),m!==void 0&&E.hasValue){var j=E.value;if(m(j,_))return g=j}return g=_}if(j=g,n(b,_))return j;var L=c(_);return m!==void 0&&m(j,L)?j:(b=_,g=L)}var T=!1,b,g,M=f===void 0?null:f;return[function(){return O(d())},M===null?void 0:function(){return O(M())}]},[d,f,c,m]);var R=i(u,C[0],C[1]);return a(function(){E.hasValue=!0,E.value=R},[R]),l(R),R},Wr}var Zr={};/**
|
|
53
|
+
* @license React
|
|
54
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
55
|
+
*
|
|
56
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/var Gn;function ya(){return Gn||(Gn=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=N,e=Gr();function r(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,o=t.useMemo,l=t.useDebugValue;function u(d,f,c,m,C){var E=s(null),R;E.current===null?(R={hasValue:!1,value:null},E.current=R):R=E.current;var O=o(function(){var M=!1,_,j,L=function(W){if(!M){M=!0,_=W;var ne=m(W);if(C!==void 0&&R.hasValue){var Ee=R.value;if(C(Ee,ne))return j=Ee,Ee}return j=ne,ne}var Ke=_,it=j;if(n(Ke,W))return it;var ie=m(W);return C!==void 0&&C(it,ie)?it:(_=W,j=ie,ie)},B=c===void 0?null:c,ee=function(){return L(f())},re=B===null?void 0:function(){return L(B())};return[ee,re]},[f,c,m,C]),T=O[0],b=O[1],g=i(d,T,b);return a(function(){R.hasValue=!0,R.value=g},[g]),l(g),g}Zr.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Zr}(function(t){process.env.NODE_ENV==="production"?t.exports=ga():t.exports=ya()})(ha);const va=oa(zr),{useSyncExternalStoreWithSelector:ba}=va;function wa(t,e=t.getState,r){const n=ba(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return N.useDebugValue(n),n}const Zn=t=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&typeof t!="function"&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const e=typeof t=="function"?da(t):t,r=(n,i)=>wa(e,n,i);return Object.assign(r,e),r},Ca=t=>t?Zn(t):Zn;/**
|
|
61
|
+
* @remix-run/router v1.3.1
|
|
62
|
+
*
|
|
63
|
+
* Copyright (c) Remix Software Inc.
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the MIT license found in the
|
|
66
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
67
|
+
*
|
|
68
|
+
* @license MIT
|
|
69
|
+
*/function G(){return G=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},G.apply(this,arguments)}var oe;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(oe||(oe={}));function Ea(t){t===void 0&&(t={});let{initialEntries:e=["/"],initialIndex:r,v5Compat:n=!1}=t,i;i=e.map((m,C)=>d(m,typeof m=="string"?null:m.state,C===0?"default":void 0));let s=l(r??i.length-1),a=oe.Pop,o=null;function l(m){return Math.min(Math.max(m,0),i.length-1)}function u(){return i[s]}function d(m,C,E){C===void 0&&(C=null);let R=Jr(i?u().pathname:"/",m,C,E);return Ra(R.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(m)),R}function f(m){return typeof m=="string"?m:Pe(m)}return{get index(){return s},get action(){return a},get location(){return u()},createHref:f,createURL(m){return new URL(f(m),"http://localhost")},encodeLocation(m){let C=typeof m=="string"?Fe(m):m;return{pathname:C.pathname||"",search:C.search||"",hash:C.hash||""}},push(m,C){a=oe.Push;let E=d(m,C);s+=1,i.splice(s,i.length,E),n&&o&&o({action:a,location:E,delta:1})},replace(m,C){a=oe.Replace;let E=d(m,C);i[s]=E,n&&o&&o({action:a,location:E,delta:0})},go(m){a=oe.Pop;let C=l(s+m),E=i[C];s=C,o&&o({action:a,location:E,delta:m})},listen(m){return o=m,()=>{o=null}}}}function F(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ra(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Sa(){return Math.random().toString(36).substr(2,8)}function Jr(t,e,r,n){return r===void 0&&(r=null),G({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Fe(e):e,{state:r,key:e&&e.key||n||Sa()})}function Pe(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Fe(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var de;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(de||(de={}));function xa(t){return t.index===!0}function Jn(t,e,r){return e===void 0&&(e=[]),r===void 0&&(r=new Set),t.map((n,i)=>{let s=[...e,i],a=typeof n.id=="string"?n.id:s.join("-");return F(n.index!==!0||!n.children,"Cannot specify children on an index route"),F(!r.has(a),'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),r.add(a),xa(n)?G({},n,{id:a}):G({},n,{id:a,children:n.children?Jn(n.children,s,r):void 0})})}function Ht(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Fe(e):e,i=ri(n.pathname||"/",r);if(i==null)return null;let s=Xn(t);Oa(s);let a=null;for(let o=0;a==null&&o<s.length;++o)a=Na(s[o],qa(i));return a}function Xn(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(s,a,o)=>{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};l.relativePath.startsWith("/")&&(F(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Ne([n,l.relativePath]),d=r.concat(l);s.children&&s.children.length>0&&(F(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Xn(s.children,e,d,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:Fa(u,s.index),routesMeta:d})};return t.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let l of ei(s.path))i(s,a,l)}),e}function ei(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let a=ei(n.join("/")),o=[];return o.push(...a.map(l=>l===""?s:[s,l].join("/"))),i&&o.push(...a),o.map(l=>t.startsWith("/")&&l===""?"/":l)}function Oa(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Ma(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const _a=/^:\w+$/,Ta=3,ka=2,Da=1,La=10,Pa=-2,ti=t=>t==="*";function Fa(t,e){let r=t.split("/"),n=r.length;return r.some(ti)&&(n+=Pa),e&&(n+=ka),r.filter(i=>!ti(i)).reduce((i,s)=>i+(_a.test(s)?Ta:s===""?Da:La),n)}function Ma(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Na(t,e){let{routesMeta:r}=t,n={},i="/",s=[];for(let a=0;a<r.length;++a){let o=r[a],l=a===r.length-1,u=i==="/"?e:e.slice(i.length)||"/",d=ja({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},u);if(!d)return null;Object.assign(n,d.params);let f=o.route;s.push({params:n,pathname:Ne([i,d.pathname]),pathnameBase:$a(Ne([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Ne([i,d.pathnameBase]))}return s}function ja(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Aa(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce((u,d,f)=>{if(d==="*"){let c=o[f]||"";a=s.slice(0,s.length-c.length).replace(/(.)\/+$/,"$1")}return u[d]=Ia(o[f]||"",d),u},{}),pathname:s,pathnameBase:a,pattern:t}}function Aa(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Me(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,o)=>(n.push(o),"/([^\\/]+)"));return t.endsWith("*")?(n.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function qa(t){try{return decodeURI(t)}catch(e){return Me(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ia(t,e){try{return decodeURIComponent(t)}catch(r){return Me(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function ri(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Me(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Va(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Fe(t):t;return{pathname:r?r.startsWith("/")?r:Ua(r,e):e,search:Ba(n),hash:Ha(i)}}function Ua(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Xr(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hr(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function en(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Fe(t):(i=G({},t),F(!i.pathname||!i.pathname.includes("?"),Xr("?","pathname","search",i)),F(!i.pathname||!i.pathname.includes("#"),Xr("#","pathname","hash",i)),F(!i.search||!i.search.includes("#"),Xr("#","search","hash",i)));let s=t===""||i.pathname==="",a=s?"/":i.pathname,o;if(n||a==null)o=r;else{let f=e.length-1;if(a.startsWith("..")){let c=a.split("/");for(;c[0]==="..";)c.shift(),f-=1;i.pathname=c.join("/")}o=f>=0?e[f]:"/"}let l=Va(i,o),u=a&&a!=="/"&&a.endsWith("/"),d=(s||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Ne=t=>t.join("/").replace(/\/\/+/g,"/"),$a=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Ba=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Ha=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class ni extends Error{}class Qa{constructor(e,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],F(e&&typeof e=="object"&&!Array.isArray(e),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((s,a)=>n=a),this.controller=new AbortController;let i=()=>n(new ni("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",i),this.controller.signal.addEventListener("abort",i),this.data=Object.entries(e).reduce((s,a)=>{let[o,l]=a;return Object.assign(s,{[o]:this.trackPromise(o,l)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(e,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([r,this.abortPromise]).then(i=>this.onSettle(n,e,null,i),i=>this.onSettle(n,e,i));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,r,n,i){return this.controller.signal.aborted&&n instanceof ni?(this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n)):(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>i}),this.emit(!1,r),i))}emit(e,r){this.subscribers.forEach(n=>n(e,r))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(e){let r=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n),r=await new Promise(i=>{this.subscribe(s=>{e.removeEventListener("abort",n),(s||this.done)&&i(s)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return F(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,r)=>{let[n,i]=r;return Object.assign(e,{[n]:Wa(i)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function za(t){return t instanceof Promise&&t._tracked===!0}function Wa(t){if(!za(t))return t;if(t._error)throw t._error;return t._data}class ii{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function si(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const ai=["post","put","patch","delete"],Ka=new Set(ai),Ya=["get",...ai],Ga=new Set(Ya),Za=new Set([301,302,303,307,308]),Ja=new Set([307,308]),tn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Xa={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},oi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},li=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eo=!li;function to(t){F(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let e=Jn(t.routes),r=null,n=new Set,i=null,s=null,a=null,o=t.hydrationData!=null,l=Ht(e,t.history.location,t.basename),u=null;if(l==null){let y=Je(404,{pathname:t.history.location.pathname}),{matches:v,route:S}=gi(e);l=v,u={[S.id]:y}}let d=!l.some(y=>y.route.loader)||t.hydrationData!=null,f,c={historyAction:t.history.action,location:t.history.location,matches:l,initialized:d,navigation:tn,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||u,fetchers:new Map,blockers:new Map},m=oe.Pop,C=!1,E,R=!1,O=!1,T=[],b=[],g=new Map,M=0,_=-1,j=new Map,L=new Set,B=new Map,ee=new Map,re=null,W=new Map,ne=!1;function Ee(){return r=t.history.listen(y=>{let{action:v,location:S,delta:P}=y;if(ne){ne=!1;return}Me(re!=null&&P===null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=$r({currentLocation:c.location,nextLocation:S,historyAction:v});if(D&&P!=null){ne=!0,t.history.go(P*-1),Ye(D,{state:"blocked",location:S,proceed(){Ye(D,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),t.history.go(P)},reset(){ot(D),ie({blockers:new Map(f.state.blockers)})}});return}return qe(v,S)}),c.initialized||qe(oe.Pop,c.location),f}function Ke(){r&&r(),n.clear(),E&&E.abort(),c.fetchers.forEach((y,v)=>Ft(v)),c.blockers.forEach((y,v)=>ot(v))}function it(y){return n.add(y),()=>n.delete(y)}function ie(y){c=G({},c,y),n.forEach(v=>v(c))}function st(y,v){var S,P;let D=c.actionData!=null&&c.navigation.formMethod!=null&&$e(c.navigation.formMethod)&&c.navigation.state==="loading"&&((S=y.state)==null?void 0:S._isRedirect)!==!0,I;v.actionData?Object.keys(v.actionData).length>0?I=v.actionData:I=null:D?I=c.actionData:I=null;let q=v.loaderData?mi(c.loaderData,v.loaderData,v.matches||[],v.errors):c.loaderData;for(let[A]of W)ot(A);let Q=C===!0||c.navigation.formMethod!=null&&$e(c.navigation.formMethod)&&((P=y.state)==null?void 0:P._isRedirect)!==!0;ie(G({},v,{actionData:I,loaderData:q,historyAction:m,location:y,initialized:!0,navigation:tn,revalidation:"idle",restoreScrollPosition:Br(y,v.matches||c.matches),preventScrollReset:Q,blockers:new Map(c.blockers)})),R||m===oe.Pop||(m===oe.Push?t.history.push(y,y.state):m===oe.Replace&&t.history.replace(y,y.state)),m=oe.Pop,C=!1,R=!1,O=!1,T=[],b=[]}async function nr(y,v){if(typeof y=="number"){t.history.go(y);return}let{path:S,submission:P,error:D}=ui(y,v),I=c.location,q=Jr(c.location,S,v&&v.state);q=G({},q,t.history.encodeLocation(q));let Q=v&&v.replace!=null?v.replace:void 0,A=oe.Push;Q===!0?A=oe.Replace:Q===!1||P!=null&&$e(P.formMethod)&&P.formAction===c.location.pathname+c.location.search&&(A=oe.Replace);let pe=v&&"preventScrollReset"in v?v.preventScrollReset===!0:void 0,H=$r({currentLocation:I,nextLocation:q,historyAction:A});if(H){Ye(H,{state:"blocked",location:q,proceed(){Ye(H,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),nr(y,v)},reset(){ot(H),ie({blockers:new Map(c.blockers)})}});return}return await qe(A,q,{submission:P,pendingError:D,preventScrollReset:pe,replace:v&&v.replace})}function jr(){if(at(),ie({revalidation:"loading"}),c.navigation.state!=="submitting"){if(c.navigation.state==="idle"){qe(c.historyAction,c.location,{startUninterruptedRevalidation:!0});return}qe(m||c.historyAction,c.navigation.location,{overrideNavigation:c.navigation})}}async function qe(y,v,S){E&&E.abort(),E=null,m=y,R=(S&&S.startUninterruptedRevalidation)===!0,Vn(c.location,c.matches),C=(S&&S.preventScrollReset)===!0;let P=S&&S.overrideNavigation,D=Ht(e,v,t.basename);if(!D){let te=Je(404,{pathname:v.pathname}),{matches:Re,route:Se}=gi(e);or(),st(v,{matches:Re,loaderData:{},errors:{[Se.id]:te}});return}if(ao(c.location,v)&&!(S&&S.submission&&$e(S.submission.formMethod))){st(v,{matches:D});return}E=new AbortController;let I=zt(t.history,v,E.signal,S&&S.submission),q,Q;if(S&&S.pendingError)Q={[xt(D).route.id]:S.pendingError};else if(S&&S.submission&&$e(S.submission.formMethod)){let te=await Ar(I,v,S.submission,D,{replace:S.replace});if(te.shortCircuited)return;q=te.pendingActionData,Q=te.pendingActionError,P=G({state:"loading",location:v},S.submission),I=new Request(I.url,{signal:I.signal})}let{shortCircuited:A,loaderData:pe,errors:H}=await qr(I,v,D,P,S&&S.submission,S&&S.replace,q,Q);A||(E=null,st(v,G({matches:D},q?{actionData:q}:{},{loaderData:pe,errors:H})))}async function Ar(y,v,S,P,D){at();let I=G({state:"submitting",location:v},S);ie({navigation:I});let q,Q=Ri(P,v);if(!Q.route.action)q={type:de.error,error:Je(405,{method:y.method,pathname:v.pathname,routeId:Q.route.id})};else if(q=await Qt("action",y,Q,P,f.basename),y.signal.aborted)return{shortCircuited:!0};if(Ot(q)){let A;return D&&D.replace!=null?A=D.replace:A=q.location===c.location.pathname+c.location.search,await Ie(c,q,{submission:S,replace:A}),{shortCircuited:!0}}if(Wt(q)){let A=xt(P,Q.route.id);return(D&&D.replace)!==!0&&(m=oe.Push),{pendingActionData:{},pendingActionError:{[A.route.id]:q.error}}}if(ut(q))throw Je(400,{type:"defer-action"});return{pendingActionData:{[Q.route.id]:q.data}}}async function qr(y,v,S,P,D,I,q,Q){let A=P;A||(A=G({state:"loading",location:v,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},D));let pe=D||(A.formMethod&&A.formAction&&A.formData&&A.formEncType?{formMethod:A.formMethod,formAction:A.formAction,formData:A.formData,formEncType:A.formEncType}:void 0),[H,te]=ci(t.history,c,S,pe,v,O,T,b,q,Q,B);if(or(ce=>!(S&&S.some(Oe=>Oe.route.id===ce))||H&&H.some(Oe=>Oe.route.id===ce)),H.length===0&&te.length===0)return st(v,G({matches:S,loaderData:{},errors:Q||null},q?{actionData:q}:{})),{shortCircuited:!0};if(!R){te.forEach(Oe=>{let Ue=c.fetchers.get(Oe.key),jt={state:"loading",data:Ue&&Ue.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(Oe.key,jt)});let ce=q||c.actionData;ie(G({navigation:A},ce?Object.keys(ce).length===0?{actionData:null}:{actionData:ce}:{},te.length>0?{fetchers:new Map(c.fetchers)}:{}))}_=++M,te.forEach(ce=>g.set(ce.key,E));let{results:Re,loaderResults:Se,fetcherResults:Ge}=await Pt(c.matches,S,H,te,y);if(y.signal.aborted)return{shortCircuited:!0};te.forEach(ce=>g.delete(ce.key));let Rt=yi(Re);if(Rt)return await Ie(c,Rt,{replace:I}),{shortCircuited:!0};let{loaderData:De,errors:Ve}=pi(c,S,H,Se,Q,te,Ge,ee);ee.forEach((ce,Oe)=>{ce.subscribe(Ue=>{(Ue||ce.done)&&ee.delete(Oe)})}),Nt();let St=Et(_);return G({loaderData:De,errors:Ve},St||te.length>0?{fetchers:new Map(c.fetchers)}:{})}function Ir(y){return c.fetchers.get(y)||Xa}function In(y,v,S,P){if(eo)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");g.has(y)&&Mt(y);let D=Ht(e,S,t.basename);if(!D){ar(y,v,Je(404,{pathname:S}));return}let{path:I,submission:q}=ui(S,P,!0),Q=Ri(D,I);if(C=(P&&P.preventScrollReset)===!0,q&&$e(q.formMethod)){ir(y,v,I,Q,D,q);return}B.set(y,{routeId:v,path:I,match:Q,matches:D}),sr(y,v,I,Q,D,q)}async function ir(y,v,S,P,D,I){if(at(),B.delete(y),!P.route.action){let Le=Je(405,{method:I.formMethod,pathname:S,routeId:v});ar(y,v,Le);return}let q=c.fetchers.get(y),Q=G({state:"submitting"},I,{data:q&&q.data," _hasFetcherDoneAnything ":!0});c.fetchers.set(y,Q),ie({fetchers:new Map(c.fetchers)});let A=new AbortController,pe=zt(t.history,S,A.signal,I);g.set(y,A);let H=await Qt("action",pe,P,D,f.basename);if(pe.signal.aborted){g.get(y)===A&&g.delete(y);return}if(Ot(H)){g.delete(y),L.add(y);let Le=G({state:"loading"},I,{data:void 0," _hasFetcherDoneAnything ":!0});return c.fetchers.set(y,Le),ie({fetchers:new Map(c.fetchers)}),Ie(c,H,{isFetchActionRedirect:!0})}if(Wt(H)){ar(y,v,H.error);return}if(ut(H))throw Je(400,{type:"defer-action"});let te=c.navigation.location||c.location,Re=zt(t.history,te,A.signal),Se=c.navigation.state!=="idle"?Ht(e,c.navigation.location,t.basename):c.matches;F(Se,"Didn't find any matches after fetcher action");let Ge=++M;j.set(y,Ge);let Rt=G({state:"loading",data:H.data},I,{" _hasFetcherDoneAnything ":!0});c.fetchers.set(y,Rt);let[De,Ve]=ci(t.history,c,Se,I,te,O,T,b,{[P.route.id]:H.data},void 0,B);Ve.filter(Le=>Le.key!==y).forEach(Le=>{let qt=Le.key,Qr=c.fetchers.get(qt),$n={state:"loading",data:Qr&&Qr.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(qt,$n),g.set(qt,A)}),ie({fetchers:new Map(c.fetchers)});let{results:St,loaderResults:ce,fetcherResults:Oe}=await Pt(c.matches,Se,De,Ve,Re);if(A.signal.aborted)return;j.delete(y),g.delete(y),Ve.forEach(Le=>g.delete(Le.key));let Ue=yi(St);if(Ue)return Ie(c,Ue);let{loaderData:jt,errors:At}=pi(c,c.matches,De,ce,void 0,Ve,Oe,ee),Hr={state:"idle",data:H.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(y,Hr);let Un=Et(Ge);c.navigation.state==="loading"&&Ge>_?(F(m,"Expected pending action"),E&&E.abort(),st(c.navigation.location,{matches:Se,loaderData:jt,errors:At,fetchers:new Map(c.fetchers)})):(ie(G({errors:At,loaderData:mi(c.loaderData,jt,Se,At)},Un?{fetchers:new Map(c.fetchers)}:{})),O=!1)}async function sr(y,v,S,P,D,I){let q=c.fetchers.get(y),Q=G({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},I,{data:q&&q.data," _hasFetcherDoneAnything ":!0});c.fetchers.set(y,Q),ie({fetchers:new Map(c.fetchers)});let A=new AbortController,pe=zt(t.history,S,A.signal);g.set(y,A);let H=await Qt("loader",pe,P,D,f.basename);if(ut(H)&&(H=await wi(H,pe.signal,!0)||H),g.get(y)===A&&g.delete(y),pe.signal.aborted)return;if(Ot(H)){await Ie(c,H);return}if(Wt(H)){let Re=xt(c.matches,v);c.fetchers.delete(y),ie({fetchers:new Map(c.fetchers),errors:{[Re.route.id]:H.error}});return}F(!ut(H),"Unhandled fetcher deferred data");let te={state:"idle",data:H.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(y,te),ie({fetchers:new Map(c.fetchers)})}async function Ie(y,v,S){var P;let{submission:D,replace:I,isFetchActionRedirect:q}=S===void 0?{}:S;v.revalidate&&(O=!0);let Q=Jr(y.location,v.location,G({_isRedirect:!0},q?{_isFetchActionRedirect:!0}:{}));if(F(Q,"Expected a location on the redirect navigation"),li&&typeof((P=window)==null?void 0:P.location)<"u"){let Se=t.history.createURL(v.location).origin;if(window.location.origin!==Se){I?window.location.replace(v.location):window.location.assign(v.location);return}}E=null;let A=I===!0?oe.Replace:oe.Push,{formMethod:pe,formAction:H,formEncType:te,formData:Re}=y.navigation;!D&&pe&&H&&Re&&te&&(D={formMethod:pe,formAction:H,formEncType:te,formData:Re}),Ja.has(v.status)&&D&&$e(D.formMethod)?await qe(A,Q,{submission:G({},D,{formAction:v.location}),preventScrollReset:C}):await qe(A,Q,{overrideNavigation:{state:"loading",location:Q,formMethod:D?D.formMethod:void 0,formAction:D?D.formAction:void 0,formEncType:D?D.formEncType:void 0,formData:D?D.formData:void 0},preventScrollReset:C})}async function Pt(y,v,S,P,D){let I=await Promise.all([...S.map(A=>Qt("loader",D,A,v,f.basename)),...P.map(A=>Qt("loader",zt(t.history,A.path,D.signal),A.match,A.matches,f.basename))]),q=I.slice(0,S.length),Q=I.slice(S.length);return await Promise.all([bi(y,S,q,D.signal,!1,c.loaderData),bi(y,P.map(A=>A.match),Q,D.signal,!0)]),{results:I,loaderResults:q,fetcherResults:Q}}function at(){O=!0,T.push(...or()),B.forEach((y,v)=>{g.has(v)&&(b.push(v),Mt(v))})}function ar(y,v,S){let P=xt(c.matches,v);Ft(y),ie({errors:{[P.route.id]:S},fetchers:new Map(c.fetchers)})}function Ft(y){g.has(y)&&Mt(y),B.delete(y),j.delete(y),L.delete(y),c.fetchers.delete(y)}function Mt(y){let v=g.get(y);F(v,"Expected fetch controller: "+y),v.abort(),g.delete(y)}function Vr(y){for(let v of y){let P={state:"idle",data:Ir(v).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(v,P)}}function Nt(){let y=[];for(let v of L){let S=c.fetchers.get(v);F(S,"Expected fetcher: "+v),S.state==="loading"&&(L.delete(v),y.push(v))}Vr(y)}function Et(y){let v=[];for(let[S,P]of j)if(P<y){let D=c.fetchers.get(S);F(D,"Expected fetcher: "+S),D.state==="loading"&&(Mt(S),j.delete(S),v.push(S))}return Vr(v),v.length>0}function Ur(y,v){let S=c.blockers.get(y)||oi;return W.get(y)!==v&&(W.set(y,v),re==null?re=y:y!==re&&Me(!1,"A router only supports one blocker at a time")),S}function ot(y){c.blockers.delete(y),W.delete(y),re===y&&(re=null)}function Ye(y,v){let S=c.blockers.get(y)||oi;F(S.state==="unblocked"&&v.state==="blocked"||S.state==="blocked"&&v.state==="blocked"||S.state==="blocked"&&v.state==="proceeding"||S.state==="blocked"&&v.state==="unblocked"||S.state==="proceeding"&&v.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+v.state),c.blockers.set(y,v),ie({blockers:new Map(c.blockers)})}function $r(y){let{currentLocation:v,nextLocation:S,historyAction:P}=y;if(re==null)return;let D=W.get(re);F(D,"Could not find a function for the active blocker");let I=c.blockers.get(re);if(!(I&&I.state==="proceeding")&&D({currentLocation:v,nextLocation:S,historyAction:P}))return re}function or(y){let v=[];return ee.forEach((S,P)=>{(!y||y(P))&&(S.cancel(),v.push(P),ee.delete(P))}),v}function lr(y,v,S){if(i=y,a=v,s=S||(P=>P.key),!o&&c.navigation===tn){o=!0;let P=Br(c.location,c.matches);P!=null&&ie({restoreScrollPosition:P})}return()=>{i=null,a=null,s=null}}function Vn(y,v){if(i&&s&&a){let S=v.map(D=>Ei(D,c.loaderData)),P=s(y,S)||y.key;i[P]=a()}}function Br(y,v){if(i&&s&&a){let S=v.map(I=>Ei(I,c.loaderData)),P=s(y,S)||y.key,D=i[P];if(typeof D=="number")return D}return null}return f={get basename(){return t.basename},get state(){return c},get routes(){return e},initialize:Ee,subscribe:it,enableScrollRestoration:lr,navigate:nr,fetch:In,revalidate:jr,createHref:y=>t.history.createHref(y),encodeLocation:y=>t.history.encodeLocation(y),getFetcher:Ir,deleteFetcher:Ft,dispose:Ke,getBlocker:Ur,deleteBlocker:ot,_internalFetchControllers:g,_internalActiveDeferreds:ee},f}function ro(t){return t!=null&&"formData"in t}function ui(t,e,r){r===void 0&&(r=!1);let n=typeof t=="string"?t:Pe(t);if(!e||!ro(e))return{path:n};if(e.formMethod&&!lo(e.formMethod))return{path:n,error:Je(405,{method:e.formMethod})};let i;if(e.formData&&(i={formMethod:e.formMethod||"get",formAction:vi(n),formEncType:e&&e.formEncType||"application/x-www-form-urlencoded",formData:e.formData},$e(i.formMethod)))return{path:n,submission:i};let s=Fe(n),a=fi(e.formData);return r&&s.search&&Ci(s.search)&&a.append("index",""),s.search="?"+a,{path:Pe(s),submission:i}}function no(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function ci(t,e,r,n,i,s,a,o,l,u,d){let f=u?Object.values(u)[0]:l?Object.values(l)[0]:void 0,c=t.createURL(e.location),m=t.createURL(i),C=s||c.toString()===m.toString()||c.search!==m.search,E=u?Object.keys(u)[0]:void 0,O=no(r,E).filter((b,g)=>{if(b.route.loader==null)return!1;if(io(e.loaderData,e.matches[g],b)||a.some(j=>j===b.route.id))return!0;let M=e.matches[g],_=b;return hi(b,G({currentUrl:c,currentParams:M.params,nextUrl:m,nextParams:_.params},n,{actionResult:f,defaultShouldRevalidate:C||di(M,_)}))}),T=[];return d&&d.forEach((b,g)=>{if(r.some(M=>M.route.id===b.routeId))o.includes(g)?T.push(G({key:g},b)):hi(b.match,G({currentUrl:c,currentParams:e.matches[e.matches.length-1].params,nextUrl:m,nextParams:r[r.length-1].params},n,{actionResult:f,defaultShouldRevalidate:C}))&&T.push(G({key:g},b));else return}),[O,T]}function io(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function di(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function hi(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function Qt(t,e,r,n,i,s,a,o){i===void 0&&(i="/"),s===void 0&&(s=!1),a===void 0&&(a=!1);let l,u,d,f=new Promise((m,C)=>d=C),c=()=>d();e.signal.addEventListener("abort",c);try{let m=r.route[t];F(m,"Could not find the "+t+' to run on the "'+r.route.id+'" route'),u=await Promise.race([m({request:e,params:r.params,context:o}),f]),F(u!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(m){l=de.error,u=m}finally{e.signal.removeEventListener("abort",c)}if(oo(u)){let m=u.status;if(Za.has(m)){let R=u.headers.get("Location");if(F(R,"Redirects returned/thrown from loaders/actions must have a Location header"),/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(R)){if(!s){let T=new URL(e.url),b=R.startsWith("//")?new URL(T.protocol+R):new URL(R);b.origin===T.origin&&(R=b.pathname+b.search+b.hash)}}else{let T=n.slice(0,n.indexOf(r)+1),b=hr(T).map(M=>M.pathnameBase),g=en(R,b,new URL(e.url).pathname);if(F(Pe(g),"Unable to resolve redirect location: "+R),i){let M=g.pathname;g.pathname=M==="/"?i:Ne([i,M])}R=Pe(g)}if(s)throw u.headers.set("Location",R),u;return{type:de.redirect,status:m,location:R,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(a)throw{type:l||de.data,response:u};let C,E=u.headers.get("Content-Type");return E&&/\bapplication\/json\b/.test(E)?C=await u.json():C=await u.text(),l===de.error?{type:l,error:new ii(m,u.statusText,C),headers:u.headers}:{type:de.data,data:C,statusCode:u.status,headers:u.headers}}return l===de.error?{type:l,error:u}:u instanceof Qa?{type:de.deferred,deferredData:u}:{type:de.data,data:u}}function zt(t,e,r,n){let i=t.createURL(vi(e)).toString(),s={signal:r};if(n&&$e(n.formMethod)){let{formMethod:a,formEncType:o,formData:l}=n;s.method=a.toUpperCase(),s.body=o==="application/x-www-form-urlencoded"?fi(l):l}return new Request(i,s)}function fi(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,n instanceof File?n.name:n);return e}function so(t,e,r,n,i){let s={},a=null,o,l=!1,u={};return r.forEach((d,f)=>{let c=e[f].route.id;if(F(!Ot(d),"Cannot handle redirect results in processLoaderData"),Wt(d)){let m=xt(t,c),C=d.error;n&&(C=Object.values(n)[0],n=void 0),a=a||{},a[m.route.id]==null&&(a[m.route.id]=C),s[c]=void 0,l||(l=!0,o=si(d.error)?d.error.status:500),d.headers&&(u[c]=d.headers)}else ut(d)?(i.set(c,d.deferredData),s[c]=d.deferredData.data):s[c]=d.data,d.statusCode!=null&&d.statusCode!==200&&!l&&(o=d.statusCode),d.headers&&(u[c]=d.headers)}),n&&(a=n,s[Object.keys(n)[0]]=void 0),{loaderData:s,errors:a,statusCode:o||200,loaderHeaders:u}}function pi(t,e,r,n,i,s,a,o){let{loaderData:l,errors:u}=so(e,r,n,i,o);for(let d=0;d<s.length;d++){let{key:f,match:c}=s[d];F(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let m=a[d];if(Wt(m)){let C=xt(t.matches,c.route.id);u&&u[C.route.id]||(u=G({},u,{[C.route.id]:m.error})),t.fetchers.delete(f)}else if(Ot(m))F(!1,"Unhandled fetcher revalidation redirect");else if(ut(m))F(!1,"Unhandled fetcher deferred data");else{let C={state:"idle",data:m.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};t.fetchers.set(f,C)}}return{loaderData:l,errors:u}}function mi(t,e,r,n){let i=G({},e);for(let s of r){let a=s.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):t[a]!==void 0&&(i[a]=t[a]),n&&n.hasOwnProperty(a))break}return i}function xt(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function gi(t){let e=t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Je(t,e){let{pathname:r,routeId:n,method:i,type:s}=e===void 0?{}:e,a="Unknown Server Error",o="Unknown @remix-run/router error";return t===400?(a="Bad Request",i&&r&&n?o="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"&&(o="defer() is not supported in actions")):t===403?(a="Forbidden",o='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",o='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",i&&r&&n?o="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(o='Invalid request method "'+i.toUpperCase()+'"')),new ii(t||500,a,new Error(o),!0)}function yi(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(Ot(r))return r}}function vi(t){let e=typeof t=="string"?Fe(t):t;return Pe(G({},e,{hash:""}))}function ao(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash!==e.hash}function ut(t){return t.type===de.deferred}function Wt(t){return t.type===de.error}function Ot(t){return(t&&t.type)===de.redirect}function oo(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function lo(t){return Ga.has(t)}function $e(t){return Ka.has(t)}async function bi(t,e,r,n,i,s){for(let a=0;a<r.length;a++){let o=r[a],l=e[a],u=t.find(f=>f.route.id===l.route.id),d=u!=null&&!di(u,l)&&(s&&s[l.route.id])!==void 0;ut(o)&&(i||d)&&await wi(o,n,i).then(f=>{f&&(r[a]=f||r[a])})}}async function wi(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:de.data,data:t.deferredData.unwrappedData}}catch(i){return{type:de.error,error:i}}return{type:de.data,data:t.deferredData.data}}}function Ci(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Ei(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],handle:r.handle}}function Ri(t,e){let r=typeof e=="string"?Fe(e).search:e.search;if(t[t.length-1].route.index&&Ci(r||""))return t[t.length-1];let n=hr(t);return n[n.length-1]}/**
|
|
70
|
+
* React Router v6.8.0
|
|
71
|
+
*
|
|
72
|
+
* Copyright (c) Remix Software Inc.
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the MIT license found in the
|
|
75
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
76
|
+
*
|
|
77
|
+
* @license MIT
|
|
78
|
+
*/function fr(){return fr=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},fr.apply(this,arguments)}function uo(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}const Si=typeof Object.is=="function"?Object.is:uo,{useState:co,useEffect:ho,useLayoutEffect:fo,useDebugValue:po}=p;let xi=!1,Oi=!1;function mo(t,e,r){process.env.NODE_ENV!=="production"&&(xi||"startTransition"in p&&(xi=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.")));const n=e();if(process.env.NODE_ENV!=="production"&&!Oi){const a=e();Si(n,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Oi=!0)}const[{inst:i},s]=co({inst:{value:n,getSnapshot:e}});return fo(()=>{i.value=n,i.getSnapshot=e,rn(i)&&s({inst:i})},[t,n,e]),ho(()=>(rn(i)&&s({inst:i}),t(()=>{rn(i)&&s({inst:i})})),[t]),po(n),n}function rn(t){const e=t.getSnapshot,r=t.value;try{const n=e();return!Si(r,n)}catch{return!0}}function go(t,e,r){return e()}const yo=!(typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u")?go:mo,vo="useSyncExternalStore"in p?(t=>t.useSyncExternalStore)(p):yo,Kt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Kt.displayName="DataRouter");const Yt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Yt.displayName="DataRouterState");const bo=p.createContext(null);process.env.NODE_ENV!=="production"&&(bo.displayName="Await");const ct=p.createContext(null);process.env.NODE_ENV!=="production"&&(ct.displayName="Navigation");const Gt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Gt.displayName="Location");const je=p.createContext({outlet:null,matches:[]});process.env.NODE_ENV!=="production"&&(je.displayName="Route");const nn=p.createContext(null);process.env.NODE_ENV!=="production"&&(nn.displayName="RouteError");function wo(t,e){let{relative:r}=e===void 0?{}:e;Zt()||(process.env.NODE_ENV!=="production"?F(!1,"useHref() may be used only in the context of a <Router> component."):F(!1));let{basename:n,navigator:i}=p.useContext(ct),{hash:s,pathname:a,search:o}=pr(t,{relative:r}),l=a;return n!=="/"&&(l=a==="/"?n:Ne([n,a])),i.createHref({pathname:l,search:o,hash:s})}function Zt(){return p.useContext(Gt)!=null}function dt(){return Zt()||(process.env.NODE_ENV!=="production"?F(!1,"useLocation() may be used only in the context of a <Router> component."):F(!1)),p.useContext(Gt).location}function _i(){Zt()||(process.env.NODE_ENV!=="production"?F(!1,"useNavigate() may be used only in the context of a <Router> component."):F(!1));let{basename:t,navigator:e}=p.useContext(ct),{matches:r}=p.useContext(je),{pathname:n}=dt(),i=JSON.stringify(hr(r).map(o=>o.pathnameBase)),s=p.useRef(!1);return p.useEffect(()=>{s.current=!0}),p.useCallback(function(o,l){if(l===void 0&&(l={}),process.env.NODE_ENV!=="production"&&Me(s.current,"You should call navigate() in a React.useEffect(), not when your component is first rendered."),!s.current)return;if(typeof o=="number"){e.go(o);return}let u=en(o,JSON.parse(i),n,l.relative==="path");t!=="/"&&(u.pathname=u.pathname==="/"?t:Ne([t,u.pathname])),(l.replace?e.replace:e.push)(u,l.state,l)},[t,e,i,n])}const Co=p.createContext(null);function Eo(t){let e=p.useContext(je).outlet;return e&&p.createElement(Co.Provider,{value:t},e)}function Ro(){let{matches:t}=p.useContext(je),e=t[t.length-1];return e?e.params:{}}function pr(t,e){let{relative:r}=e===void 0?{}:e,{matches:n}=p.useContext(je),{pathname:i}=dt(),s=JSON.stringify(hr(n).map(a=>a.pathnameBase));return p.useMemo(()=>en(t,JSON.parse(s),i,r==="path"),[t,s,i,r])}function So(t,e){Zt()||(process.env.NODE_ENV!=="production"?F(!1,"useRoutes() may be used only in the context of a <Router> component."):F(!1));let{navigator:r}=p.useContext(ct),n=p.useContext(Yt),{matches:i}=p.useContext(je),s=i[i.length-1],a=s?s.params:{},o=s?s.pathname:"/",l=s?s.pathnameBase:"/",u=s&&s.route;if(process.env.NODE_ENV!=="production"){let O=u&&u.path||"";Po(o,!u||O.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+o+'" (under <Route path="'+O+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
79
|
+
|
|
80
|
+
`+('Please change the parent <Route path="'+O+'"> to <Route ')+('path="'+(O==="/"?"*":O+"/*")+'">.'))}let d=dt(),f;if(e){var c;let O=typeof e=="string"?Fe(e):e;l==="/"||(c=O.pathname)!=null&&c.startsWith(l)||(process.env.NODE_ENV!=="production"?F(!1,"When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was "+('matched by all parent routes. The current pathname base is "'+l+'" ')+('but pathname "'+O.pathname+'" was given in the `location` prop.')):F(!1)),f=O}else f=d;let m=f.pathname||"/",C=l==="/"?m:m.slice(l.length)||"/",E=Ht(t,{pathname:C});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Me(u||E!=null,'No routes matched location "'+f.pathname+f.search+f.hash+'" '),process.env.NODE_ENV!=="production"&&Me(E==null||E[E.length-1].route.element!==void 0,'Matched leaf route at location "'+f.pathname+f.search+f.hash+'" does not have an element. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let R=To(E&&E.map(O=>Object.assign({},O,{params:Object.assign({},a,O.params),pathname:Ne([l,r.encodeLocation?r.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?l:Ne([l,r.encodeLocation?r.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),i,n||void 0);return e&&R?p.createElement(Gt.Provider,{value:{location:fr({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:oe.Pop}},R):R}function xo(){let t=Di(),e=si(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},a=null;return process.env.NODE_ENV!=="production"&&(a=p.createElement(p.Fragment,null,p.createElement("p",null,"💿 Hey developer 👋"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:s},"errorElement")," props on ",p.createElement("code",{style:s},"<Route>")))),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),r?p.createElement("pre",{style:i},r):null,a)}class Oo extends p.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location?{error:e.error,location:e.location}:{error:e.error||r.error,location:r.location}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?p.createElement(je.Provider,{value:this.props.routeContext},p.createElement(nn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _o(t){let{routeContext:e,match:r,children:n}=t,i=p.useContext(Kt);return i&&i.static&&i.staticContext&&r.route.errorElement&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(je.Provider,{value:e},n)}function To(t,e,r){if(e===void 0&&(e=[]),t==null)if(r!=null&&r.errors)t=r.matches;else return null;let n=t,i=r==null?void 0:r.errors;if(i!=null){let s=n.findIndex(a=>a.route.id&&(i==null?void 0:i[a.route.id]));s>=0||(process.env.NODE_ENV!=="production"?F(!1,"Could not find a matching route for the current errors: "+i):F(!1)),n=n.slice(0,Math.min(n.length,s+1))}return n.reduceRight((s,a,o)=>{let l=a.route.id?i==null?void 0:i[a.route.id]:null,u=r?a.route.errorElement||p.createElement(xo,null):null,d=e.concat(n.slice(0,o+1)),f=()=>p.createElement(_o,{match:a,routeContext:{outlet:s,matches:d}},l?u:a.route.element!==void 0?a.route.element:s);return r&&(a.route.errorElement||o===0)?p.createElement(Oo,{location:r.location,component:u,error:l,children:f(),routeContext:{outlet:null,matches:d}}):f()},null)}var Ti;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator"})(Ti||(Ti={}));var mr;(function(t){t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(mr||(mr={}));function ki(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ko(t){let e=p.useContext(Yt);return e||(process.env.NODE_ENV!=="production"?F(!1,ki(t)):F(!1)),e}function Do(t){let e=p.useContext(je);return e||(process.env.NODE_ENV!=="production"?F(!1,ki(t)):F(!1)),e}function Lo(t){let e=Do(t),r=e.matches[e.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?F(!1,t+' can only be used on routes that contain a unique "id"'):F(!1)),r.route.id}function Di(){var t;let e=p.useContext(nn),r=ko(mr.UseRouteError),n=Lo(mr.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}const Li={};function Po(t,e,r){!e&&!Li[t]&&(Li[t]=!0,process.env.NODE_ENV!=="production"&&Me(!1,r))}function Fo(t){let{fallbackElement:e,router:r}=t,n=vo(r.subscribe,()=>r.state,()=>r.state),i=p.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:a=>r.navigate(a),push:(a,o,l)=>r.navigate(a,{state:o,preventScrollReset:l==null?void 0:l.preventScrollReset}),replace:(a,o,l)=>r.navigate(a,{replace:!0,state:o,preventScrollReset:l==null?void 0:l.preventScrollReset})}),[r]),s=r.basename||"/";return p.createElement(p.Fragment,null,p.createElement(Kt.Provider,{value:{router:r,navigator:i,static:!1,basename:s}},p.createElement(Yt.Provider,{value:n},p.createElement(jo,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:i},r.state.initialized?p.createElement(Ao,null):e))),null)}function Mo(t){return Eo(t.context)}function No(t){process.env.NODE_ENV!=="production"?F(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."):F(!1)}function jo(t){let{basename:e="/",children:r=null,location:n,navigationType:i=oe.Pop,navigator:s,static:a=!1}=t;Zt()&&(process.env.NODE_ENV!=="production"?F(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):F(!1));let o=e.replace(/^\/*/,"/"),l=p.useMemo(()=>({basename:o,navigator:s,static:a}),[o,s,a]);typeof n=="string"&&(n=Fe(n));let{pathname:u="/",search:d="",hash:f="",state:c=null,key:m="default"}=n,C=p.useMemo(()=>{let E=ri(u,o);return E==null?null:{pathname:E,search:d,hash:f,state:c,key:m}},[o,u,d,f,c,m]);return process.env.NODE_ENV!=="production"&&Me(C!=null,'<Router basename="'+o+'"> is not able to match the URL '+('"'+u+d+f+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),C==null?null:p.createElement(ct.Provider,{value:l},p.createElement(Gt.Provider,{children:r,value:{location:C,navigationType:i}}))}function Ao(t){let{children:e,location:r}=t,n=p.useContext(Kt),i=n&&!e?n.router.routes:sn(e);return So(i,r)}var Pi;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(Pi||(Pi={})),new Promise(()=>{});function sn(t,e){e===void 0&&(e=[]);let r=[];return p.Children.forEach(t,(n,i)=>{if(!p.isValidElement(n))return;if(n.type===p.Fragment){r.push.apply(r,sn(n.props.children,e));return}n.type!==No&&(process.env.NODE_ENV!=="production"?F(!1,"["+(typeof n.type=="string"?n.type:n.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):F(!1)),!n.props.index||!n.props.children||(process.env.NODE_ENV!=="production"?F(!1,"An index route cannot have child routes."):F(!1));let s=[...e,i],a={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,hasErrorBoundary:n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle};n.props.children&&(a.children=sn(n.props.children,s)),r.push(a)}),r}function Fi(t){return t.map(e=>{let r=fr({},e);return r.hasErrorBoundary==null&&(r.hasErrorBoundary=r.errorElement!=null),r.children&&(r.children=Fi(r.children)),r})}function qo(t,e){return to({basename:e==null?void 0:e.basename,history:Ea({initialEntries:e==null?void 0:e.initialEntries,initialIndex:e==null?void 0:e.initialIndex}),hydrationData:e==null?void 0:e.hydrationData,routes:Fi(t)}).initialize()}/**
|
|
81
|
+
* React Router DOM v6.8.0
|
|
82
|
+
*
|
|
83
|
+
* Copyright (c) Remix Software Inc.
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the MIT license found in the
|
|
86
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
87
|
+
*
|
|
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 Io(t){return yr(t)&&t.tagName.toLowerCase()==="button"}function Vo(t){return yr(t)&&t.tagName.toLowerCase()==="form"}function Uo(t){return yr(t)&&t.tagName.toLowerCase()==="input"}function $o(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Bo(t,e){return t.button===0&&(!e||e==="_self")&&!$o(t)}function Ho(t,e,r){let n,i,s,a;if(Vo(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(Io(t)||Uo(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 Qo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],zo=["aria-current","caseSensitive","className","end","style","to","children"],Wo=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];process.env.NODE_ENV;const Ko=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:u,preventScrollReset:d}=e,f=an(e,Qo),c=typeof u=="string"?u:Pe(u),m=/^[a-z+]+:\/\//i.test(c)||c.startsWith("//"),C=c,E=!1;if(Ko&&m){let b=new URL(window.location.href),g=c.startsWith("//")?new URL(b.protocol+c):new URL(c);g.origin===b.origin?C=g.pathname+g.search+g.hash:E=!0}let R=wo(C,{relative:i}),O=Xo(C,{replace:a,state:o,target:l,preventScrollReset:d,relative:i});function T(b){n&&n(b),b.defaultPrevented||O(b)}return p.createElement("a",ht({},f,{href:m?c:R,onClick:E||s?n:T,ref:r,target:l}))});process.env.NODE_ENV!=="production"&&(vr.displayName="Link");const Yo=p.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:a=!1,style:o,to:l,children:u}=e,d=an(e,zo),f=pr(l,{relative:d.relative}),c=dt(),m=p.useContext(Yt),{navigator:C}=p.useContext(ct),E=C.encodeLocation?C.encodeLocation(f).pathname:f.pathname,R=c.pathname,O=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(R=R.toLowerCase(),O=O?O.toLowerCase():null,E=E.toLowerCase());let T=R===E||!a&&R.startsWith(E)&&R.charAt(E.length)==="/",b=O!=null&&(O===E||!a&&O.startsWith(E)&&O.charAt(E.length)==="/"),g=T?n:void 0,M;typeof s=="function"?M=s({isActive:T,isPending:b}):M=[s,T?"active":null,b?"pending":null].filter(Boolean).join(" ");let _=typeof o=="function"?o({isActive:T,isPending:b}):o;return p.createElement(vr,ht({},d,{"aria-current":g,className:M,ref:r,style:_,to:l}),typeof u=="function"?u({isActive:T,isPending:b}):u)});process.env.NODE_ENV!=="production"&&(Yo.displayName="NavLink");const Go=p.forwardRef((t,e)=>p.createElement(Mi,ht({},t,{ref:e})));process.env.NODE_ENV!=="production"&&(Go.displayName="Form");const Mi=p.forwardRef((t,e)=>{let{reloadDocument:r,replace:n,method:i=gr,action:s,onSubmit:a,fetcherKey:o,routeId:l,relative:u,preventScrollReset:d}=t,f=an(t,Wo),c=el(o,l),m=i.toLowerCase()==="get"?"get":"post",C=ji(s,{relative:u}),E=R=>{if(a&&a(R),R.defaultPrevented)return;R.preventDefault();let O=R.nativeEvent.submitter,T=(O==null?void 0:O.getAttribute("formmethod"))||i;c(O||R.currentTarget,{method:T,replace:n,relative:u,preventScrollReset:d})};return p.createElement("form",ht({ref:e,method:m,action:C,onSubmit:r?a:E},f))});process.env.NODE_ENV!=="production"&&(Mi.displayName="FormImpl"),process.env.NODE_ENV;var ln;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(ln||(ln={}));var Ni;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ni||(Ni={}));function Zo(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Jo(t){let e=p.useContext(Kt);return e||(process.env.NODE_ENV!=="production"?F(!1,Zo(t)):F(!1)),e}function Xo(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a}=e===void 0?{}:e,o=_i(),l=dt(),u=pr(t,{relative:a});return p.useCallback(d=>{if(Bo(d,r)){d.preventDefault();let f=n!==void 0?n:Pe(l)===Pe(u);o(t,{replace:f,state:i,preventScrollReset:s,relative:a})}},[l,o,u,n,i,r,t,s,a])}function el(t,e){let{router:r}=Jo(ln.UseSubmitImpl),n=ji();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:u}=Ho(i,n,s),d=u.pathname+u.search,f={replace:s.replace,preventScrollReset:s.preventScrollReset,formData:l,formMethod:a,formEncType:o};t?(e==null&&(process.env.NODE_ENV!=="production"?F(!1,"No routeId available for useFetcher()"):F(!1)),r.fetch(t,e,d,f)):r.navigate(d,f)},[n,r,t,e])}function ji(t,e){let{relative:r}=e===void 0?{}:e,{basename:n}=p.useContext(ct),i=p.useContext(je);i||(process.env.NODE_ENV!=="production"?F(!1,"useFormAction must be used inside a RouteContext"):F(!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:Ne([n,a.pathname])),Pe(a)}function tl(){const{actions:t,showActions:e,setShowActions:r,navigateTo:n}=N.useContext(Xe),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]),w.jsxs("div",{className:"qikbar-command-footer",children:[w.jsx("div",{className:"qikbar-logo",children:w.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:w.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.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"}),w.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"}),w.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&&w.jsxs("div",{className:"qikbar-actions-wrapper",children:[e&&w.jsx("div",{className:"qikbar-actions-panel",children:w.jsx("ul",{className:"qikbar-actions-list",ref:i,children:t.filter(s=>!s.disabled).map(s=>w.jsx("button",{onClick:()=>n(s.click.href,s.click.title,s.click.target),className:"qikbar-action",children:s.title},s.id))})}),w.jsxs("button",{onClick:()=>r(s=>!s),className:"qikbar-actions",children:[w.jsx("span",{className:"qikbar-actions-action",children:"Actions"}),w.jsxs("span",{className:"qikbar-keys",children:[w.jsx("kbd",{className:"qikbar-kbd",children:"Cmd"})," +"," ",w.jsx("kbd",{className:"qikbar-kbd",children:"Enter"})]})]})]})]})}function rl(){const{search:t,setSearch:e,searchRef:r,placeholder:n}=N.useContext(Xe);return w.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 nl({crumbs:t}){const{setCrumbs:e}=N.useContext(Xe);return t.length===0?null:w.jsx("ul",{className:"qikbar-crumbs",children:t.map((r,n)=>{const i=t.length-1===n;return w.jsx("li",{className:"qikbar-crumb",children:w.jsxs(vr,{to:r.to,onClick:()=>e(s=>i?s:s.slice(0,n+1)),children:[r.title," ",!i&&w.jsx("span",{className:"qikbar-crumb-divider",children:">"})]})},n)})})}const Xe=N.createContext(null);function il(){const t=N.useRef(null),e=dt(),r=_i(),[n,i]=N.useState([]),[s,a]=N.useState([]),[o,l]=N.useState(!1),[u,d]=N.useState(!1),[f,c]=N.useState(""),[m,C]=N.useState("Search for resources"),E=N.useRef(),[R,O]=N.useState(0),T=Ae();return N.useEffect(()=>{var b;u&&((b=E.current)==null||b.focus(),O(0),document.body.style.overflow="hidden"),u||(r(""),l(!1),i([]),a([]),document.body.style.overflow="unset")},[u,e.pathname]),N.useEffect(()=>{const b=g=>{var M,_,j,L,B,ee,re;if(u&&["Space","ArrowUp","ArrowDown"].indexOf(g.key)>-1&&g.preventDefault(),g.metaKey&&g.key==="Enter"){g.preventDefault(),g.stopPropagation();return}if(u&&g.key==="ArrowDown"&&g.target.localName==="input"&&((M=t.current)!=null&&M.getElementsByClassName("qikbar-item")[1])&&(O(1),t.current.getElementsByClassName("qikbar-item")[1].focus()),u&&g.target.localName==="input"&&f===""&&g.key==="Backspace"&&(r(-1),a(W=>W.slice(0,-1))),u&&g.key==="Escape"&&(c(""),r(""),d(!1),i([])),u&&g.key==="Enter"&&g.target.localName==="input"&&((_=t.current)!=null&&_.getElementsByClassName("qikbar-item")[0])&&(t.current.getElementsByClassName("qikbar-item")[0].click(),c("")),u&&g.key==="ArrowDown"&&g.target.getAttribute("data-testid")==="qikbar-item"&&g.target.nextElementSibling){let W;g.target.nextElementSibling.className==="qikbar-category-wrapper"?W=g.target.nextElementSibling.nextElementSibling:W=g.target.nextElementSibling;const ne=Array.prototype.indexOf.call((L=(j=g.target)==null?void 0:j.parentNode)==null?void 0:L.getElementsByClassName("qikbar-item"),W);O(ne),W==null||W.focus()}if(u&&g.key==="ArrowUp"&&g.target.getAttribute("data-testid")==="qikbar-item"&&g.target.previousElementSibling){let W;if(g.target.previousElementSibling.className==="qikbar-category-wrapper"?W=g.target.previousElementSibling.previousElementSibling:W=g.target.previousElementSibling,!W)return;const ne=Array.prototype.indexOf.call((ee=(B=g.target)==null?void 0:B.parentNode)==null?void 0:ee.getElementsByClassName("qikbar-item"),W);O(ne),W==null||W.focus()}u&&g.key!=="ArrowUp"&&g.key!=="ArrowDown"&&g.key!=="Enter"&&!g.metaKey&&(O(0),(re=E.current)==null||re.focus()),g.metaKey&&g.key==="k"&&(u&&(r(""),c(""),O(0),i([]),a([])),d(W=>!W)),u&&g.key==="Enter"&&c("")};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[u,f]),u?w.jsx("div",{className:"qikbar-command-wrapper","data-testid":"command-bar-container",children:w.jsx(Xe.Provider,{value:{search:f,searchRef:E,setIsOpen:d,setSearch:c,activeIndex:R,placeholder:m,setPlaceholder:C,setActions:i,setCrumbs:a,crumbs:s,actions:n,showActions:o,setShowActions:l,navigateTo:(b,g,M="self")=>{var _,j;switch(l(!1),c(""),M){case"self":O(0),r(b),(_=E.current)==null||_.focus(),b!==(e==null?void 0:e.pathname)&&i([]),t.current.getElementsByClassName("qikbar-list")[0].scrollTo(0,0),a(L=>[...L,{title:g,to:b}]);break;case"internal":r(""),d(!1),a([]),i([]),T!=null&&T.router?(j=T==null?void 0:T.router)==null||j.call(T,b):window.location=b;break;case"external":r(""),d(!1),a([]),i([]),window.open(b,"_blank");break;default:r(b),a(L=>[...L,{title:g,to:b}])}}},children:w.jsxs("div",{className:"qikbar-command-bar",ref:t,children:[w.jsxs("div",{className:"qikbar-search-wrapper",children:[w.jsx(nl,{crumbs:s}),w.jsx(rl,{})]}),w.jsx("div",{className:"qikbar-command-content",children:w.jsx(Mo,{})}),w.jsx(tl,{})]})})}):null}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:"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 al=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:"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 ll=p.forwardRef(ol);function ul({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 cl=p.forwardRef(ul);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:"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 hl=p.forwardRef(dl);function fl({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 pl=p.forwardRef(fl);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:"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 gl=p.forwardRef(ml);function yl({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 vl=p.forwardRef(yl);function bl({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 wl=p.forwardRef(bl);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:"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 El=p.forwardRef(Cl);function Rl({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 Sl=p.forwardRef(Rl);function xl({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 Ol=p.forwardRef(xl);function _l({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 Tl=p.forwardRef(_l);function kl({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 Dl=p.forwardRef(kl);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:"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 Pl=p.forwardRef(Ll);function Fl({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 Ml=p.forwardRef(Fl);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:"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 jl=p.forwardRef(Nl);function Al({iconName:t}){switch(t){case"CalendarIcon":return w.jsx(cl,{});case"CalendarDaysIcon":return w.jsx(ll,{});case"FireIcon":return w.jsx(hl,{});case"MegaphoneIcon":return w.jsx(vl,{});case"WrenchIcon":return w.jsx(jl,{});case"WrenchScrewdriverIcon":return w.jsx(Ml,{});case"ShareIcon":return w.jsx(wl,{});case"ShoppingBagIcon":return w.jsx(El,{});case"ShoppingCartIcon":return w.jsx(Sl,{});case"StarIcon":return w.jsx(Ol,{});case"StopCircleIcon":return w.jsx(Tl,{});case"StopIcon":return w.jsx(Dl,{});case"LockClosedIcon":return w.jsx(gl,{});case"LinkIcon":return w.jsx(pl,{});case"UserGroupIcon":return w.jsx(Pl,{});case"BellAlertIcon":return w.jsx(al,{});default:return null}}function Jt({children:t}){return w.jsx("div",{className:"qikbar-details-container",children:t})}function Ai({children:t}){return w.jsx("ul",{className:"qikbar-list",children:t})}function qi({item:{name:t,children:e,Icon:r}}){return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"qikbar-category-wrapper",children:[r&&w.jsx(r,{}),w.jsx("p",{className:"qikbar-category",children:t})]}),e.map(n=>n.children?w.jsx(qi,{item:n},n.id):w.jsx(un,{item:n},n.id))]})}var Ii=function(t){return t.indexOf("//")===0&&(t=location.protocol+t),t.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]},ql=function(t){if(t)return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&Ii(location.href)!==Ii(t)};function un({item:{iconName:t,title:e,to:r,description:n,href:i,route:s,action:a,children:o,type:l}}){const{setIsOpen:u,setCrumbs:d,setActions:f}=N.useContext(Xe),c=Ae();if(o)return null;const m=i?"a":vr,C=O=>{var T;c!=null&&c.router&&((T=c==null?void 0:c.router)==null||T.call(c,i),u(!1),O.preventDefault())},E=r||(s==null?void 0:s.path),R=i?{...ql(i)?{rel:"noopener",target:"_blank",href:i,onClick:()=>u(!1)}:{href:i,onClick:C}}:{to:E,onClick:()=>{f([]),d(O=>[...O,{title:e,to:E}])}};return w.jsxs(m,{"data-testid":"qikbar-item",className:"qikbar-item",...R,onClick:a||(R==null?void 0:R.onClick),children:[w.jsxs("li",{children:[t&&w.jsx(Al,{iconName:t}),w.jsxs("div",{children:[w.jsx("p",{className:"qikbar-item-title",children:e}),w.jsx("p",{className:"qikbar-item-description",children:n})]})]}),l&&w.jsx("p",{className:"qikbar-item-type",children:l})]})}function Vi({placeholder:t}){const{setPlaceholder:e}=N.useContext(Xe);return N.useEffect(()=>{e(t)},[e,t]),null}function Ui({fields:t}){return w.jsx("div",{className:"qikbar-details-wrapper",children:w.jsx("div",{className:"qikbar-details",children:t.map((e,r)=>w.jsx("div",{className:"qikbar-fieldset",children:e.map(({label:n,value:i,html:s},a)=>w.jsxs("div",{className:"qikbar-field",children:[n&&w.jsxs("span",{className:"qikbar-field-label",children:[n,":"]}),s?w.jsx("p",{dangerouslySetInnerHTML:{__html:i},className:"qikbar-field-value"}):w.jsx("p",{className:"qikbar-field-value",children:i})]},a))},r))})})}function Il({categories:t,placeholderText:e}){var d;const{activeIndex:r,search:n,setActions:i,navigateTo:s}=N.useContext(Xe),a=t.map(f=>({...f,children:f.commands.filter(c=>c.title.toLowerCase().includes(n.toLowerCase()))})).filter(f=>f.children.length>0),l=a.reduce((f,c)=>[...f,...c.children],[])[r],u=l==null?void 0:l.actions;return l==null||l.fields,N.useEffect(()=>{i(l&&u?u:[])},[l,n,r]),a.length===0?w.jsx(Jt,{children:w.jsx("div",{className:"qikbar-item-empty",children:"No matches"})}):w.jsxs(w.Fragment,{children:[w.jsx(Vi,{placeholder:e}),w.jsxs(Jt,{children:[w.jsx(Ai,{children:a.map(f=>f.children?w.jsx(qi,{item:f},f.name):w.jsx(un,{item:f},f.id))}),l&&((d=l==null?void 0:l.details)==null?void 0:d.length)>0&&w.jsx(Ui,{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 xe(){}function Vl(t,e){return typeof t=="function"?t(e):t}function cn(t){return typeof t=="number"&&t>=0&&t!==1/0}function $i(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 et(t,e,r){return br(t)?[{...e,queryKey:t},r]:[t||{},e]}function Bi(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 Hi(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 Qi(t,e)}function Qi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!Qi(t[r],e[r])):!1}function zi(t,e){if(t===e)return t;const r=Ki(t)&&Ki(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 u=r?l:i[l];a[u]=zi(t[u],e[u]),a[u]===t[u]&&o++}return n===s&&o===n?t:a}return e}function Wi(t,e){if(t&&!e||e&&!t)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Ki(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function hn(t){if(!Yi(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!Yi(r)||!r.hasOwnProperty("isPrototypeOf"))}function Yi(t){return Object.prototype.toString.call(t)==="[object Object]"}function br(t){return Array.isArray(t)}function Gi(t){return new Promise(e=>{setTimeout(e,t)})}function Zi(t){Gi(0).then(t)}function Ul(){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?zi(t,e):e}class $l 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 $l;class Bl 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 Bl;function Hl(t){return Math.min(1e3*2**t,3e4)}function Er(t){return(t??"online")==="online"?Cr.isOnline():!0}class Ji{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Rr(t){return t instanceof Ji}function Xi(t){let e=!1,r=0,n=!1,i,s,a;const o=new Promise((R,O)=>{s=R,a=O}),l=R=>{n||(m(new Ji(R)),t.abort==null||t.abort())},u=()=>{e=!0},d=()=>{e=!1},f=()=>!wr.isFocused()||t.networkMode!=="always"&&!Cr.isOnline(),c=R=>{n||(n=!0,t.onSuccess==null||t.onSuccess(R),i==null||i(),s(R))},m=R=>{n||(n=!0,t.onError==null||t.onError(R),i==null||i(),a(R))},C=()=>new Promise(R=>{i=O=>{if(n||!f())return R(O)},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),E=()=>{if(n)return;let R;try{R=t.fn()}catch(O){R=Promise.reject(O)}Promise.resolve(R).then(c).catch(O=>{var T,b;if(n)return;const g=(T=t.retry)!=null?T:3,M=(b=t.retryDelay)!=null?b:Hl,_=typeof M=="function"?M(r,O):M,j=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,O);if(e||!j){m(O);return}r++,t.onFail==null||t.onFail(r,O),Gi(_).then(()=>{if(f())return C()}).then(()=>{e?m(O):E()})})};return Er(t.networkMode)?E():C().then(E),{promise:o,cancel:l,continue:()=>{i==null||i()},cancelRetry:u,continueRetry:d}}const pn=console;function Ql(){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):Zi(()=>{r(d)})},a=d=>(...f)=>{s(()=>{d(...f)})},o=()=>{const d=t;t=[],d.length&&Zi(()=>{n(()=>{d.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:a,schedule:s,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{n=d}}}const le=Ql();class es{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 zl extends es{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||Wl(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(xe).catch(xe):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||!$i(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(C=>C.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=Ul(),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 u=()=>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:u};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 c=m=>{if(Rr(m)&&m.silent||this.dispatch({type:"error",error:m}),!Rr(m)){var C,E;(C=(E=this.cache.config).onError)==null||C.call(E,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Xi({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var C,E;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),c(new Error("undefined"));return}this.setData(m),(C=(E=this.cache.config).onSuccess)==null||C.call(E,m,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:c,onFail:(m,C)=>{this.dispatch({type:"failed",failureCount:m,error:C})},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 Wl(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 Kl 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 zl({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]=et(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>Bi(n,i))}findAll(e,r){const[n]=et(e,r);return Object.keys(n).length>0?this.queries.filter(i=>Bi(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 Yl extends es{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||Gl(),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 b;return this.retryer=Xi({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(g,M)=>{this.dispatch({type:"failed",failureCount:g,error:M})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(b=this.options.retry)!=null?b: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 u,d,f,c;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const g=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,this.state.variables));g!==this.state.context&&this.dispatch({type:"loading",context:g,variables:this.state.variables})}const b=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,b,this.state.variables,this.state.context,this)),await((s=(a=this.options).onSuccess)==null?void 0:s.call(a,b,this.state.variables,this.state.context)),await((o=(l=this.options).onSettled)==null?void 0:o.call(l,b,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:b}),b}catch(b){try{var m,C,E,R,O,T;throw await((m=(C=this.mutationCache.config).onError)==null?void 0:m.call(C,b,this.state.variables,this.state.context,this)),process.env.NODE_ENV!=="production"&&this.logger.error(b),await((E=(R=this.options).onError)==null?void 0:E.call(R,b,this.state.variables,this.state.context)),await((O=(T=this.options).onSettled)==null?void 0:O.call(T,void 0,b,this.state.variables,this.state.context)),b}finally{this.dispatch({type:"error",error:b})}}}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 Gl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Zl extends Xt{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new Yl({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=>Hi(e,r))}findAll(e){return this.mutations.filter(r=>Hi(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(xe)),Promise.resolve()))}}function Jl(){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,u=l==null?void 0:l.pageParam,d=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",c=((s=t.state.data)==null?void 0:s.pages)||[],m=((a=t.state.data)==null?void 0:a.pageParams)||[];let C=m,E=!1;const R=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>{var j;if((j=t.signal)!=null&&j.aborted)E=!0;else{var L;(L=t.signal)==null||L.addEventListener("abort",()=>{E=!0})}return t.signal}})},O=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),T=(_,j,L,B)=>(C=B?[j,...C]:[...C,j],B?[L,..._]:[..._,L]),b=(_,j,L,B)=>{if(E)return Promise.reject("Cancelled");if(typeof L>"u"&&!j&&_.length)return Promise.resolve(_);const ee={queryKey:t.queryKey,pageParam:L,meta:t.options.meta};R(ee);const re=O(ee);return Promise.resolve(re).then(ne=>T(_,L,ne,B))};let g;if(!c.length)g=b([]);else if(d){const _=typeof u<"u",j=_?u:ts(t.options,c);g=b(c,_,j)}else if(f){const _=typeof u<"u",j=_?u:Xl(t.options,c);g=b(c,_,j,!0)}else{C=[];const _=typeof t.options.getNextPageParam>"u";g=(o&&c[0]?o(c[0],0,c):!0)?b([],_,m[0]):Promise.resolve(T([],m[0],c[0]));for(let L=1;L<c.length;L++)g=g.then(B=>{if(o&&c[L]?o(c[L],L,c):!0){const re=_?m[L]:ts(t.options,B);return b(B,_,re)}return Promise.resolve(T(B,m[L],c[L]))})}return g.then(_=>({pages:_,pageParams:C}))}}}}function ts(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function Xl(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}class eu{constructor(e={}){this.queryCache=e.queryCache||new Kl,this.mutationCache=e.mutationCache||new Zl,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]=et(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=Vl(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]=et(e,r),i=this.queryCache;le.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=et(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={}]=et(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(xe).catch(xe)}invalidateQueries(e,r,n){const[i,s]=et(e,r,n);return le.batch(()=>{var a,o;if(this.queryCache.findAll(i).forEach(u=>{u.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]=et(e,r,n),a=le.batch(()=>this.queryCache.findAll(i).filter(l=>!l.isDisabled()).map(l=>{var u;return l.fetch(void 0,{...s,cancelRefetch:(u=s==null?void 0:s.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(a).then(xe);return s!=null&&s.throwOnError||(o=o.catch(xe)),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(xe).catch(xe)}fetchInfiniteQuery(e,r,n){const i=tr(e,r,n);return i.behavior=Jl(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(xe).catch(xe)}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 tu 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),rs(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"),Wi(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&&ns(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(xe)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),er||this.currentResult.isStale||!cn(this.options.staleTime))return;const r=$i(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,u=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:c,error:m,errorUpdatedAt:C,fetchStatus:E,status:R}=f,O=!1,T=!1,b;if(r._optimisticResults){const L=this.hasListeners(),B=!L&&rs(e,r),ee=L&&ns(e,n,r,i);(B||ee)&&(E=Er(e.options.networkMode)?"fetching":"paused",c||(R="loading")),r._optimisticResults==="isRestoring"&&(E="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&R!=="error")b=d.data,c=d.dataUpdatedAt,R=d.status,O=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(a==null?void 0:a.data)&&r.select===this.selectFn)b=this.selectResult;else try{this.selectFn=r.select,b=r.select(f.data),b=fn(s==null?void 0:s.data,b,r),this.selectResult=b,this.selectError=null}catch(L){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(L),this.selectError=L}else b=f.data;if(typeof r.placeholderData<"u"&&typeof b>"u"&&R==="loading"){let L;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData))L=s.data;else if(L=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof L<"u")try{L=r.select(L),this.selectError=null}catch(B){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(B),this.selectError=B}typeof L<"u"&&(R="success",b=fn(s==null?void 0:s.data,L,r),T=!0)}this.selectError&&(m=this.selectError,b=this.selectResult,C=Date.now(),R="error");const g=E==="fetching",M=R==="loading",_=R==="error";return{status:R,fetchStatus:E,isLoading:M,isSuccess:R==="success",isError:_,isInitialLoading:M&&g,data:b,dataUpdatedAt:c,error:m,errorUpdatedAt:C,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!M,isLoadingError:_&&f.dataUpdatedAt===0,isPaused:E==="paused",isPlaceholderData:T,isPreviousData:O,isRefetchError:_&&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,Wi(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 u=l;return this.currentResult[u]!==r[u]&&o.has(u)})};(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,u;(a=(o=this.options).onError)==null||a.call(o,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,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 ru(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function rs(t,e){return ru(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 ns(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 nu=Gr();const iu=nu.useSyncExternalStore,is=p.createContext(void 0),ss=p.createContext(!1);function as(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=is),window.ReactQueryClientContext):is)}const su=({context:t}={})=>{const e=p.useContext(as(t,p.useContext(ss)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},au=({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=as(r,n);return p.createElement(ss.Provider,{value:!r&&n},p.createElement(i.Provider,{value:t},e))},os=p.createContext(!1),ou=()=>p.useContext(os);os.Provider;function lu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const uu=p.createContext(lu()),cu=()=>p.useContext(uu);function du(t,e){return typeof t=="function"?t(...e):!!t}const hu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},fu=t=>{p.useEffect(()=>{t.clearReset()},[t])},pu=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&du(r,[t.error,n]),mu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},gu=(t,e)=>t.isLoading&&t.isFetching&&!e,yu=(t,e,r)=>(t==null?void 0:t.suspense)&&gu(e,r),vu=(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 bu(t,e){const r=su({context:t.context}),n=ou(),i=cu(),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)),mu(s),hu(s,i),fu(i);const[a]=p.useState(()=>new e(r,s)),o=a.getOptimisticResult(s);if(iu(p.useCallback(l=>n?()=>{}:a.subscribe(le.batchCalls(l)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),yu(s,o,n))throw vu(s,a,i);if(pu({result:o,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw o.error;return s.notifyOnChangeProps?o:a.trackResult(o)}function wu(t,e,r){const n=tr(t,e,r);return bu(n,tu)}function Cu(t,e){const[r,n]=N.useState(t);return N.useEffect(()=>{const i=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(i)}},[t,e]),r}var Eu="Expected a function",ls="__lodash_hash_undefined__",us=1/0,Ru="[object Function]",Su="[object GeneratorFunction]",xu="[object Symbol]",Ou=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_u=/^\w*$/,Tu=/^\./,ku=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Du=/[\\^$.*+?()[\]{}|]/g,Lu=/\\(\\)?/g,Pu=/^\[object .+?Constructor\]$/,Fu=typeof ur=="object"&&ur&&ur.Object===Object&&ur,Mu=typeof self=="object"&&self&&self.Object===Object&&self,yn=Fu||Mu||Function("return this")();function Nu(t,e){return t==null?void 0:t[e]}function ju(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Au=Array.prototype,qu=Function.prototype,cs=Object.prototype,vn=yn["__core-js_shared__"],ds=function(){var t=/[^.]+$/.exec(vn&&vn.keys&&vn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),hs=qu.toString,bn=cs.hasOwnProperty,fs=cs.toString,Iu=RegExp("^"+hs.call(bn).replace(Du,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ps=yn.Symbol,Vu=Au.splice,Uu=ys(yn,"Map"),rr=ys(Object,"create"),ms=ps?ps.prototype:void 0,gs=ms?ms.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 $u(){this.__data__=rr?rr(null):{}}function Bu(t){return this.has(t)&&delete this.__data__[t]}function Hu(t){var e=this.__data__;if(rr){var r=e[t];return r===ls?void 0:r}return bn.call(e,t)?e[t]:void 0}function Qu(t){var e=this.__data__;return rr?e[t]!==void 0:bn.call(e,t)}function zu(t,e){var r=this.__data__;return r[t]=rr&&e===void 0?ls:e,this}pt.prototype.clear=$u,pt.prototype.delete=Bu,pt.prototype.get=Hu,pt.prototype.has=Qu,pt.prototype.set=zu;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 Wu(){this.__data__=[]}function Ku(t){var e=this.__data__,r=Sr(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Vu.call(e,r,1),!0}function Yu(t){var e=this.__data__,r=Sr(e,t);return r<0?void 0:e[r][1]}function Gu(t){return Sr(this.__data__,t)>-1}function Zu(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=Wu,Tt.prototype.delete=Ku,Tt.prototype.get=Yu,Tt.prototype.has=Gu,Tt.prototype.set=Zu;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 Ju(){this.__data__={hash:new pt,map:new(Uu||Tt),string:new pt}}function Xu(t){return xr(this,t).delete(t)}function ec(t){return xr(this,t).get(t)}function tc(t){return xr(this,t).has(t)}function rc(t,e){return xr(this,t).set(t,e),this}mt.prototype.clear=Ju,mt.prototype.delete=Xu,mt.prototype.get=ec,mt.prototype.has=tc,mt.prototype.set=rc;function Sr(t,e){for(var r=t.length;r--;)if(fc(t[r][0],e))return r;return-1}function nc(t,e){e=oc(e,t)?[e]:ac(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[dc(e[r++])];return r&&r==n?t:void 0}function ic(t){if(!bs(t)||uc(t))return!1;var e=pc(t)||ju(t)?Iu:Pu;return e.test(hc(t))}function sc(t){if(typeof t=="string")return t;if(Cn(t))return gs?gs.call(t):"";var e=t+"";return e=="0"&&1/t==-us?"-0":e}function ac(t){return vs(t)?t:cc(t)}function xr(t,e){var r=t.__data__;return lc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function ys(t,e){var r=Nu(t,e);return ic(r)?r:void 0}function oc(t,e){if(vs(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Cn(t)?!0:_u.test(t)||!Ou.test(t)||e!=null&&t in Object(e)}function lc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function uc(t){return!!ds&&ds in t}var cc=wn(function(t){t=gc(t);var e=[];return Tu.test(t)&&e.push(""),t.replace(ku,function(r,n,i,s){e.push(i?s.replace(Lu,"$1"):n||r)}),e});function dc(t){if(typeof t=="string"||Cn(t))return t;var e=t+"";return e=="0"&&1/t==-us?"-0":e}function hc(t){if(t!=null){try{return hs.call(t)}catch{}try{return t+""}catch{}}return""}function wn(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Eu);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 fc(t,e){return t===e||t!==t&&e!==e}var vs=Array.isArray;function pc(t){var e=bs(t)?fs.call(t):"";return e==Ru||e==Su}function bs(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function mc(t){return!!t&&typeof t=="object"}function Cn(t){return typeof t=="symbol"||mc(t)&&fs.call(t)==xu}function gc(t){return t==null?"":sc(t)}function yc(t,e,r){var n=t==null?void 0:nc(t,e);return n===void 0?r:n}var vc=yc;class Te{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
|
+
`?(e++,r=1):r++;return[e,r]}size(){return this.end-this.begin}}class gt{liquidMethodMissing(e){}}const bc=Object.prototype.toString,ws=String.prototype.toLowerCase,Cs=Object.hasOwnProperty;function Be(t){return typeof t=="string"}function ye(t){return typeof t=="function"}function wc(t){return t&&ye(t.then)}function Or(t){return t&&ye(t.next)&&ye(t.throw)&&ye(t.return)}function Cc(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t){return t=$(t),Be(t)?t:He(t)?"":be(t)?t.map(e=>U(e)).join(""):String(t)}function $(t){return t instanceof gt&&ye(t.valueOf)?t.valueOf():t}function _r(t){return typeof t=="number"}function Es(t){return t&&ye(t.toLiquid)?Es(t.toLiquid()):t}function He(t){return t==null}function be(t){return bc.call(t)==="[object Array]"}function Ec(t){return Rn(t)&&Symbol.iterator in t}function Rs(t,e){t=t||{};for(const r in t)if(Cs.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 Ss(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 xs(t,e,r,(n,i)=>i+n)}function Rc(t,e,r=" "){return xs(t,e,r,(n,i)=>n+i)}function xs(t,e,r,n){t=String(t);let i=e-t.length;for(;i-- >0;)t=n(t,r);return t}function Os(t){return t}function Sc(t){return[...t].some(r=>r>="a"&&r<="z")?t.toUpperCase():t.toLowerCase()}function xc(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function _s(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=ws.call(t),e=ws.call(e),t<e)?-1:t>e?1:0}function we(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=Dc(this.token),this.message=Lc(e.message,this.token),this.stack=this.message+`
|
|
91
|
+
`+this.context+`
|
|
92
|
+
`+this.stack+`
|
|
93
|
+
From `+e.stack}}class xn extends kr{constructor(e,r){super(new Error(e),r),this.name="TokenizationError",super.update()}}class Oc extends kr{constructor(e,r){super(e,r),this.name="ParseError",this.message=e.message,super.update()}}class Ts extends kr{constructor(e,r){super(e,r.token),this.name="RenderError",this.message=e.message,super.update()}static is(e){return e.name==="RenderError"}}class _c extends kr{constructor(e,r){super(e,r),this.name="UndefinedVariableError",this.message=e.message,super.update()}}class Tc extends Error{constructor(e){super(`undefined variable: ${e}`),this.name="InternalUndefinedVariableError",this.variableName=e}}class kc extends Error{constructor(e){super(e),this.name="AssertionError",this.message=e+""}}function Dc(t){const[e]=t.getPosition(),r=t.input.split(`
|
|
94
|
+
`),n=Math.max(e-2,1),i=Math.min(e+3,r.length);return Ss(n,i+1).map(a=>{const o=a===e?">> ":" ",l=Tr(String(a),String(i).length),u=r[a-1];return`${o}${l}| ${u}`}).join(`
|
|
95
|
+
`)}function Lc(t,e){e.file&&(t+=`, file:${e.file}`);const[r,n]=e.getPosition();return t+=`, line:${r}, col:${n}`,t}const J=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],On=1,Dr=4,ks=8,Ds=16,Pc=32,Fc=64;J[160]=J[5760]=J[6158]=J[8192]=J[8193]=J[8194]=J[8195]=J[8196]=J[8197]=J[8198]=J[8199]=J[8200]=J[8201]=J[8202]=J[8232]=J[8233]=J[8239]=J[8287]=J[12288]=Dr;function he(t,e){if(!t){const r=typeof e=="function"?e():e||`expect ${t} to be true`;throw new kc(r)}}class Mc extends gt{equals(e){return He($(e))}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return null}}class Lr extends gt{equals(e){return e instanceof Lr?!1:(e=$(e),Be(e)||be(e)?e.length===0:Rn(e)?Object.keys(e).length===0:!1)}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return""}}class Nc extends Lr{equals(e){return e===!1||He($(e))?!0:Be(e)?/^\s*$/.test(e):super.equals(e)}}class _n extends gt{constructor(e,r,n){super(),this.i=0,this.length=e,this.name=`${n}-${r}`}next(){this.i++}index0(){return this.i}index(){return this.i+1}first(){return this.i===0}last(){return this.i===this.length-1}rindex(){return this.length-this.i}rindex0(){return this.length-this.i-1}valueOf(){return JSON.stringify(this)}}class Ls extends gt{constructor(e=()=>""){super(),this.superBlockRender=e}super(){return this.superBlockRender()}}function Ce(t){return t&&ye(t.equals)}const Ps=new Mc,Fs={true:!0,false:!1,nil:Ps,null:Ps,empty:new Lr,blank:new Nc};function jc(t){const e={};for(const[r,n]of Object.entries(t)){let i=e;for(let s=0;s<r.length;s++){const a=r[s];i[a]=i[a]||{},s===r.length-1&&J[r.charCodeAt(s)]&On&&(i[a].needBoundary=!0),i=i[a]}i.handler=n,i.end=!0}return e}/*! *****************************************************************************
|
|
96
|
+
Copyright (c) Microsoft Corporation.
|
|
97
|
+
|
|
98
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
99
|
+
purpose with or without fee is hereby granted.
|
|
100
|
+
|
|
101
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
102
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
103
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
104
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
105
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
106
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
107
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
108
|
+
***************************************************************************** */var Pr=function(){return Pr=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Pr.apply(this,arguments)};function Qe(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{u(n.next(d))}catch(f){a(f)}}function l(d){try{u(n.throw(d))}catch(f){a(f)}}function u(d){d.done?s(d.value):i(d.value).then(o,l)}u((n=n.apply(t,e||[])).next())})}function tt(t){return Qe(this,void 0,void 0,function*(){if(!Or(t))return t;let e,r=!1,n="next";do{const i=t[n](e);r=i.done,e=i.value,n="next";try{Or(e)&&(e=tt(e)),wc(e)&&(e=yield e)}catch(s){n="throw",e=s}}while(!r);return e})}function rt(t){if(!Or(t))return t;let e,r=!1,n="next";do{const i=t[n](e);if(r=i.done,e=i.value,n="next",Or(e))try{e=rt(e)}catch(s){n="throw",e=s}}while(!r);return e}function Tn(t){return t=$(t),be(t)?t:Be(t)&&t.length>0?[t]:Ec(t)?Array.from(t):Rn(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function ze(t){return He(t)?[]:be(t)?t:[t]}const Ac=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,Ms=["January","February","March","April","May","June","July","August","September","October","November","December"],Ns=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],qc=Ms.map(As),Ic=Ns.map(As),js={1:"st",2:"nd",3:"rd",default:"th"};function As(t){return t.slice(0,3)}function Vc(t){return[31,Uc(t)?29:28,31,30,31,30,31,31,30,31,30,31]}function qs(t){let e=0;for(let r=0;r<t.getMonth();++r)e+=Vc(t)[r];return e+t.getDate()}function Is(t,e){const r=qs(t)+(e-t.getDay()),i=7-new Date(t.getFullYear(),0,1).getDay()+e;return String(Math.floor((r-i)/7)+1)}function Uc(t){const e=t.getFullYear();return!!(!(e&3)&&(e%100||e%400===0&&e))}function $c(t){const e=t.getDate().toString(),r=parseInt(e.slice(-1));return js[r]||js.default}function Bc(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}const Hc={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},Qc={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "},kn={a:t=>Ic[t.getDay()],A:t=>Ns[t.getDay()],b:t=>qc[t.getMonth()],B:t=>Ms[t.getMonth()],c:t=>t.toLocaleString(),C:t=>Bc(t),d:t=>t.getDate(),e:t=>t.getDate(),H:t=>t.getHours(),I:t=>String(t.getHours()%12||12),j:t=>qs(t),k:t=>t.getHours(),l:t=>String(t.getHours()%12||12),L:t=>t.getMilliseconds(),m:t=>t.getMonth()+1,M:t=>t.getMinutes(),N:(t,e)=>{const r=Number(e.width)||9,n=String(t.getMilliseconds()).slice(0,r);return Rc(n,r,"0")},p:t=>t.getHours()<12?"AM":"PM",P:t=>t.getHours()<12?"am":"pm",q:t=>$c(t),s:t=>Math.round(t.getTime()/1e3),S:t=>t.getSeconds(),u:t=>t.getDay()||7,U:t=>Is(t,0),w:t=>t.getDay(),W:t=>Is(t,1),x:t=>t.toLocaleDateString(),X:t=>t.toLocaleTimeString(),y:t=>t.getFullYear().toString().slice(2,4),Y:t=>t.getFullYear(),z:(t,e)=>{const r=Math.abs(t.getTimezoneOffset()),n=Math.floor(r/60),i=r%60;return(t.getTimezoneOffset()>0?"-":"+")+Tr(n,2,"0")+(e.flags[":"]?":":"")+Tr(i,2,"0")},t:()=>" ",n:()=>`
|
|
109
|
+
`,"%":()=>"%"};kn.h=kn.b;function zc(t,e){let r="",n=e,i;for(;i=Ac.exec(n);)r+=n.slice(0,i.index),n=n.slice(i.index+i[0].length),r+=Wc(t,i);return r+n}function Wc(t,e){const[r,n="",i,s,a]=e,o=kn[a];if(!o)return r;const l={};for(const c of n)l[c]=!0;let u=String(o(t,{flags:l,width:i,modifier:s})),d=Qc[a]||"0",f=i||Hc[a]||0;return l["^"]?u=u.toUpperCase():l["#"]&&(u=Sc(u)),l._?d=" ":l[0]&&(d="0"),l["-"]&&(f=0),Tr(u,f,d)}const Kc=6e4,Yc=new Date().getTimezoneOffset(),Gc=/([zZ]|([+-])(\d{2}):(\d{2}))$/;class nt{constructor(e,r){if(e instanceof nt)this.date=e.date,r=e.timezoneOffset;else{const n=(Yc-r)*Kc,i=new Date(e).getTime()+n;this.date=new Date(i)}this.timezoneOffset=r}getTime(){return this.date.getTime()}getMilliseconds(){return this.date.getMilliseconds()}getSeconds(){return this.date.getSeconds()}getMinutes(){return this.date.getMinutes()}getHours(){return this.date.getHours()}getDay(){return this.date.getDay()}getDate(){return this.date.getDate()}getMonth(){return this.date.getMonth()}getFullYear(){return this.date.getFullYear()}toLocaleTimeString(e){return this.date.toLocaleTimeString(e)}toLocaleDateString(e){return this.date.toLocaleDateString(e)}getTimezoneOffset(){return this.timezoneOffset}static createDateFixedToTimezone(e){const r=e.match(Gc);if(r&&r[1]==="Z")return new nt(+new Date(e),0);if(r&&r[2]&&r[3]&&r[4]){const[,,n,i,s]=r,a=(n==="+"?-1:1)*(parseInt(i,10)*60+parseInt(s,10));return new nt(+new Date(e),a)}return new Date(e)}}class Dn extends Te{constructor(e,r,n,i,s,a,o,l){super(e,n,i,s,l),this.trimLeft=!1,this.trimRight=!1,this.content=this.getText();const u=r[0]==="-",d=En(r)==="-";this.content=r.slice(u?1:0,d?-1:r.length).trim(),this.trimLeft=u||a,this.trimRight=d||o}}class Vs extends Dn{constructor(e,r,n,i,s){const{trimTagLeft:a,trimTagRight:o,tagDelimiterLeft:l,tagDelimiterRight:u}=i,d=e.slice(r+l.length,n-u.length);super(X.Tag,d,e,r,n,a,o,s);const f=new fe(this.content,i.operators);if(this.name=f.readTagName(),!this.name)throw new xn("illegal tag syntax",this);f.skipBlank(),this.args=f.remaining()}}class Zc extends Dn{constructor(e,r,n,i,s){const{trimOutputLeft:a,trimOutputRight:o,outputDelimiterLeft:l,outputDelimiterRight:u}=i,d=e.slice(r+l.length,n-u.length);super(X.Output,d,e,r,n,a,o,s)}}class Us extends Te{constructor(e,r,n,i){super(X.HTML,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.trimLeft=0,this.trimRight=0}getContent(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)}}class Jc extends Te{constructor(e,r){super(X.Number,e.input,e.begin,r?r.end:e.end,e.file),this.whole=e,this.decimal=r}}class Fr extends Te{constructor(e,r,n,i){super(X.Word,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.content=this.getText()}isNumber(e=!1){const r=e&&J[this.input.charCodeAt(this.begin)]&Fc?this.begin+1:this.begin;for(let n=r;n<this.end;n++)if(!(J[this.input.charCodeAt(n)]&Pc))return!1;return!0}}class Xc extends Te{constructor(e,r,n,i){super(X.Literal,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.literal=this.getText()}}const $s={"==":2,"!=":2,">":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},ed={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0};class td extends Te{constructor(e,r,n,i){super(X.Operator,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.operator=this.getText()}getPrecedence(){const e=this.getText();return e in $s?$s[e]:1}}class Bs extends Te{constructor(e,r,n){super(X.PropertyAccess,e.input,e.begin,n,e.file),this.variable=e,this.props=r,this.propertyName=this.variable instanceof Fr?this.variable.getText():Zs(this.variable.getText())}}class rd extends Te{constructor(e,r,n,i,s,a){super(X.Filter,n,i,s,a),this.name=e,this.args=r}}class nd extends Te{constructor(e,r,n,i,s,a){super(X.Hash,e,r,n,a),this.input=e,this.begin=r,this.end=n,this.name=i,this.value=s,this.file=a}}class id extends Te{constructor(e,r,n,i){super(X.Quoted,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i}}class sd extends Te{constructor(e,r,n,i,s,a){super(X.Range,e,r,n,a),this.input=e,this.begin=r,this.end=n,this.lhs=i,this.rhs=s,this.file=a}}class ad extends Dn{constructor(e,r,n,i,s){const a=e.slice(r,n);if(super(X.Tag,a,e,r,n,!1,!1,s),!/\S/.test(a))this.name="",this.args="";else{const o=new fe(this.content,i.operators);if(this.name=o.readTagName(),!this.name)throw new xn("illegal liquid tag syntax",this);o.skipBlank(),this.args=o.remaining()}}}class od{constructor(){this.buffer=""}write(e){this.buffer+=U(e)}}class ld{constructor(){throw this.buffer="",this.stream=null,new Error("streaming not supported in browser")}}class ud{constructor(){this.buffer=""}write(e){e=$(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=U(this.buffer)+U(e)}}class cd{renderTemplatesToNodeStream(e,r){const n=new ld;return Promise.resolve().then(()=>tt(this.renderTemplates(e,r,n))).then(()=>n.end(),i=>n.error(i)),n.stream}*renderTemplates(e,r,n){n||(n=r.opts.keepOutputType?new ud:new od);for(const i of e)try{const s=yield i.render(r,n);if(s&&n.write(s),n.break||n.continue)break}catch(s){throw Ts.is(s)?s:new Ts(s,i)}return n.buffer}}class dd{constructor(e){this.postfix=[...gd(e)]}*evaluate(e,r){he(e,"unable to evaluate: context not defined");const n=[];for(const i of this.postfix)if(Js(i)){const s=n.pop();let a;if(ed[i.operator]===1)a=yield e.opts.operators[i.operator](s,e);else{const o=n.pop();a=yield e.opts.operators[i.operator](o,s,e)}n.push(a)}else n.push(yield me(i,e,r&&this.postfix.length===1));return n[0]}}function*me(t,e,r=!1){if(Jd(t))return yield hd(t,e,r);if(eh(t))return yield md(t,e);if(Gd(t))return pd(t);if(Zd(t))return fd(t);if(Xd(t))return t.getText();if(Xs(t))return Ln(t)}function*hd(t,e,r){const n=[];for(const i of t.props)n.push(yield me(i,e,!1));try{return yield e._get([t.propertyName,...n])}catch(i){if(r&&i.name==="InternalUndefinedVariableError")return null;throw new _c(i,t)}}function fd(t){const e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}function Ln(t){return Zs(t.getText())}function pd(t){return Fs[t.literal]}function*md(t,e){const r=yield me(t.lhs,e),n=yield me(t.rhs,e);return Ss(+r,+n+1)}function*gd(t){const e=[];for(const r of t)if(Js(r)){for(;e.length&&e[e.length-1].getPrecedence()>r.getPrecedence();)yield e.pop();e.push(r)}else yield r;for(;e.length;)yield e.pop()}function yt(t,e){return!Mr(t,e)}function Mr(t,e){return e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}const yd={"==":(t,e)=>Ce(t)?t.equals(e):Ce(e)?e.equals(t):$(t)===$(e),"!=":(t,e)=>Ce(t)?!t.equals(e):Ce(e)?!e.equals(t):$(t)!==$(e),">":(t,e)=>Ce(t)?t.gt(e):Ce(e)?e.lt(t):$(t)>$(e),"<":(t,e)=>Ce(t)?t.lt(e):Ce(e)?e.gt(t):$(t)<$(e),">=":(t,e)=>Ce(t)?t.geq(e):Ce(e)?e.leq(t):$(t)>=$(e),"<=":(t,e)=>Ce(t)?t.leq(e):Ce(e)?e.geq(t):$(t)<=$(e),contains:(t,e)=>(t=$(t),e=$(e),t&&ye(t.indexOf)?t.indexOf(e)>-1:!1),not:(t,e)=>Mr($(t),e),and:(t,e,r)=>yt($(t),r)&&yt($(e),r),or:(t,e,r)=>yt($(t),r)||yt($(e),r)};class Pn{constructor(e,r,n,i){this.key=e,this.value=r,this.next=n,this.prev=i}}class Hs{constructor(e,r=0){this.limit=e,this.size=r,this.cache={},this.head=new Pn("HEAD",null,null,null),this.tail=new Pn("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}write(e,r){if(this.cache[e])this.cache[e].value=r;else{const n=new Pn(e,r,this.head.next,this.head);this.head.next.prev=n,this.head.next=n,this.cache[e]=n,this.size++,this.ensureLimit()}}read(e){if(!this.cache[e])return;const{value:r}=this.cache[e];return this.remove(e),this.write(e,r),r}remove(e){const r=this.cache[e];r.prev.next=r.next,r.next.prev=r.prev,delete this.cache[e],this.size--}clear(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}}ensureLimit(){this.size>this.limit&&this.remove(this.tail.prev.key)}}function Qs(t,e){const r=document.createElement("base");r.href=t;const n=document.getElementsByTagName("head")[0];n.insertBefore(r,n.firstChild);const i=document.createElement("a");i.href=e;const s=i.href;return n.removeChild(r),s}function vd(t,e,r){return t.length&&En(t)!=="/"&&(t+="/"),Qs(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,(i,s,a)=>{const o=a.split("/").pop();return/\.\w+$/.test(o)?i:s+a+r})}function bd(t){return Qe(this,void 0,void 0,function*(){return new Promise((e,r)=>{const n=new XMLHttpRequest;n.onload=()=>{n.status>=200&&n.status<300?e(n.responseText):r(new Error(n.statusText))},n.onerror=()=>{r(new Error("An error occurred whilst receiving the response."))},n.open("GET",t),n.send()})})}function wd(t){const e=new XMLHttpRequest;if(e.open("GET",t,!1),e.send(),e.status<200||e.status>=300)throw new Error(e.statusText);return e.responseText}function Cd(t){return Qe(this,void 0,void 0,function*(){return!0})}function Ed(t){return!0}function Rd(t){return Qs(t,".")}var Sd=Object.freeze({__proto__:null,resolve:vd,readFile:bd,readFileSync:wd,exists:Cd,existsSync:Ed,dirname:Rd,sep:"/"});function xd(t,e,...r){return t=$(t),be(t)||Be(t)?t.length?t:e:t===!1&&new Map(r).get("allow_false")?!1:Mr(t,this.context)?e:t}function zs(t){return JSON.stringify(t)}const Od={raw:!0,handler:Os},_d={"&":"&","<":"<",">":">",'"':""","'":"'"},Td={"&":"&","<":"<",">":">",""":'"',"'":"'"};function Fn(t){return U(t).replace(/&|<|>|"|'/g,e=>_d[e])}function kd(t){return U(t).replace(/&(amp|lt|gt|#34|#39);/g,e=>Td[e])}function Dd(t){return Fn(kd(U(t)))}function Ld(t){return U(t).replace(/\n/g,`<br />
|
|
110
|
+
`)}function Pd(t){return U(t).replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}var Fd=Object.freeze({__proto__:null,escape:Fn,escape_once:Dd,newline_to_br:Ld,strip_html:Pd});const vt={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:Sd,dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:yd};function Md(t){if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let e;typeof t.cache=="number"?e=t.cache>0?new Hs(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Hs(1024):void 0,t.cache=e}return t=Object.assign(Object.assign(Object.assign({},vt),t.jekyllInclude?{dynamicPartials:!1}:{}),t),!t.fs.dirname&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` is required for relativeReference, set relativeReference to `false` to suppress this warning, or provide implementation for `fs.dirname`"),t.relativeReference=!1),t.root=Nr(t.root),t.partials=Nr(t.partials),t.layouts=Nr(t.layouts),t.outputEscape=t.outputEscape&&Nd(t.outputEscape),t}function Nd(t){return t==="escape"?Fn:t==="json"?zs:(he(ye(t),"`outputEscape` need to be of type string or function"),t)}function Nr(t){let e=[];return be(t)&&(e=t),Be(t)&&(e=[t]),e}function jd(t,e,r,n=t.length){let i=r,s=e,a;for(;i[t[s]]&&s<n;)i=i[t[s++]],i.end&&(a=i);return!a||a.needBoundary&&J[t.charCodeAt(s)]&On?-1:s}function Ad(t,e){let r=!1;for(let n=0;n<t.length;n++){const i=t[n];Kd(i)&&(!r&&i.trimLeft&&qd(t[n-1],e.greedy),wt(i)&&(i.name==="raw"?r=!0:i.name==="endraw"&&(r=!1)),!r&&i.trimRight&&Id(t[n+1],e.greedy))}}function qd(t,e){if(!t||!Nn(t))return;const r=e?Dr:Ds;for(;J[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Id(t,e){if(!t||!Nn(t))return;const r=e?Dr:Ds;for(;J[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
|
|
111
|
+
`&&t.trimLeft++}class fe{constructor(e,r=vt.operators,n){this.input=e,this.file=n,this.p=0,this.rawBeginAt=-1,this.N=e.length,this.opTrie=jc(r)}readExpression(){return new dd(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){const e=this.readOperator();if(e){yield e;continue}const r=this.readValue();if(r){yield r;continue}return}}readOperator(){this.skipBlank();const e=jd(this.input,this.p,this.opTrie);if(e!==-1)return new td(this.input,this.p,this.p=e,this.file)}readFilters(){const e=[];for(;;){const r=this.readFilter();if(!r)return e;e.push(r)}}readFilter(){if(this.skipBlank(),this.end())return null;he(this.peek()==="|",()=>`unexpected token at ${this.snapshot()}`),this.p++;const e=this.p,r=this.readIdentifier();if(!r.size())return null;const n=[];if(this.skipBlank(),this.peek()===":")do{++this.p;const i=this.readFilterArg();i&&n.push(i),this.skipBlank(),he(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");return new rd(r.getText(),n,this.input,e,this.p,this.file)}readFilterArg(){const e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;const r=this.readValue();return[e.getText(),r]}readTopLevelTokens(e=vt){const r=[];for(;this.p<this.N;){const n=this.readTopLevelToken(e);r.push(n)}return Ad(r,e),r}readTopLevelToken(e){const{tagDelimiterLeft:r,outputDelimiterLeft:n}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(r)?this.readTagToken(e):this.match(n)?this.readOutputToken(e):this.readHTMLToken([r,n])}readHTMLToken(e){const r=this.p;for(;this.p<this.N&&!e.some(n=>this.match(n));)++this.p;return new Us(this.input,r,this.p,this.file)}readTagToken(e=vt){const{file:r,input:n}=this,i=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.mkError(`tag ${this.snapshot(i)} not closed`,i);const s=new Vs(n,i,this.p,e,r);return s.name==="raw"&&(this.rawBeginAt=i),s}readToDelimiter(e){for(;this.p<this.N;){if(this.peekType()&ks){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=vt){const{file:r,input:n}=this,{outputDelimiterRight:i}=e,s=this.p;if(this.readToDelimiter(i)===-1)throw this.mkError(`output ${this.snapshot(s)} not closed`,s);return new Zc(n,s,this.p,e,r)}readEndrawOrRawContent(e){const{tagDelimiterLeft:r,tagDelimiterRight:n}=e,i=this.p;let s=this.readTo(r)-r.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){s=this.readTo(r)-r.length;continue}for(;this.p<=this.N;){if(this.rmatch(n)){const a=this.p;return i===s?(this.rawBeginAt=-1,new Vs(this.input,i,a,e,this.file)):(this.p=s,new Us(this.input,i,s,this.file))}if(this.rmatch(r))break;this.p++}}throw this.mkError(`raw ${this.snapshot(this.rawBeginAt)} not closed`,i)}readLiquidTagTokens(e=vt){const r=[];for(;this.p<this.N;){const n=this.readLiquidTagToken(e);n.name&&r.push(n)}return r}readLiquidTagToken(e){const{file:r,input:n}=this,i=this.p;let s=this.N;return this.readToDelimiter(`
|
|
112
|
+
`)!==-1&&(s=this.p),new ad(n,i,s,e,r)}mkError(e,r){return new xn(e,new Fr(this.input,r,this.N,this.file))}snapshot(e=this.p){return JSON.stringify(xc(this.input.slice(e),16))}readWord(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()}readIdentifier(){this.skipBlank();const e=this.p;for(;this.peekType()&On;)++this.p;return new Fr(this.input,e,this.p,this.file)}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){const r=[];for(;;){const n=this.readHash(e);if(!n)return r;r.push(n)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;const r=this.p,n=this.readIdentifier();if(!n.size())return;let i;this.skipBlank();const s=e?"=":":";return this.peek()===s&&(++this.p,i=this.readValue()),new nd(this.input,r,this.p,n,i,this.file)}remaining(){return this.input.slice(this.p)}advance(e=1){this.p+=e}end(){return this.p>=this.N}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){const e=this.readQuoted()||this.readRange();if(e)return e;if(this.peek()==="["){this.p++;const s=this.readQuoted();return!s||this.peek()!=="]"?void 0:(this.p++,new Bs(s,[],this.p))}const r=this.readIdentifier();if(!r.size())return;let n=r.isNumber(!0);const i=[];for(;;)if(this.peek()==="["){n=!1,this.p++;const s=this.readValue()||new Fr(this.input,this.p,this.p,this.file);this.readTo("]"),i.push(s)}else if(this.peek()==="."&&this.peek(1)!=="."){this.p++;const s=this.readIdentifier();if(!s.size())break;s.isNumber()||(n=!1),i.push(s)}else break;return!i.length&&Fs.hasOwnProperty(r.content)?new Xc(this.input,r.begin,r.end,this.file):n?new Jc(r,i[0]):new Bs(r,i,this.p)}readRange(){this.skipBlank();const e=this.p;if(this.peek()!=="(")return;++this.p;const r=this.readValueOrThrow();this.p+=2;const n=this.readValueOrThrow();return++this.p,new sd(this.input,e,this.p,r,n,this.file)}readValueOrThrow(){const e=this.readValue();return he(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();const e=this.p;if(!(this.peekType()&ks))return;++this.p;let r=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!r));)r?r=!1:this.input[this.p-1]==="\\"&&(r=!0);return new id(this.input,e,this.p,this.file)}*readFileNameTemplate(e){const{outputDelimiterLeft:r}=e,n=[","," ",r],i=new Set(n);for(;this.p<this.N&&!i.has(this.peek());)yield this.match(r)?this.readOutputToken(e):this.readHTMLToken(n)}match(e){for(let r=0;r<e.length;r++)if(e[r]!==this.input[this.p+r])return!1;return!0}rmatch(e){for(let r=0;r<e.length;r++)if(e[e.length-1-r]!==this.input[this.p-1-r])return!1;return!0}peekType(e=0){return J[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.input[this.p+e]}skipBlank(){for(;this.peekType()&Dr;)++this.p}}class Vd{constructor(e,r){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=r}on(e,r){return this.handlers[e]=r,this}trigger(e,r){const n=this.handlers[e];return n?(n.call(this,r),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||wt(e)&&this.trigger(`tag:${e.name}`,e))continue;const r=this.parseToken(e,this.tokens);this.trigger("template",r)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}}class Mn{constructor(e){this.token=e}}class se extends Mn{constructor(e,r,n){super(e),this.name=e.name,this.liquid=n}}class kt{constructor(e,r){this.hash={};const n=new fe(e,{});for(const i of n.readHashes(r))this.hash[i.name.content]=i.value}*render(e){const r={};for(const n of Object.keys(this.hash))r[n]=this.hash[n]===void 0?!0:yield me(this.hash[n],e);return r}}function Ud(t){return class extends se{constructor(e,r,n){super(e,r,n),ye(t.parse)&&t.parse.call(this,e,r)}*render(e,r){const n=yield new kt(this.token.args).render(e);return yield t.render.call(this,e,r,n)}}}function $d(t){return be(t)}class Ws{constructor(e,r,n,i){this.name=e,this.handler=ye(r)?r:ye(r==null?void 0:r.handler)?r.handler:Os,this.raw=!ye(r)&&!!(r!=null&&r.raw),this.args=n,this.liquid=i}*render(e,r){const n=[];for(const i of this.args)$d(i)?n.push([i[0],yield me(i[1],r)]):n.push(yield me(i,r));return this.handler.apply({context:r,liquid:this.liquid},[e,...n])}}class We{constructor(e,r){this.filters=[];const n=new fe(e,r.options.operators);this.initial=n.readExpression(),this.filters=n.readFilters().map(({name:i,args:s})=>new Ws(i,this.getFilter(r,i),s,r))}*value(e,r){r=r||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let n=yield this.initial.evaluate(e,r);for(const i of this.filters)n=yield i.render(n,e);return n}getFilter(e,r){const n=e.filters[r];return he(n||!e.options.strictFilters,()=>`undefined filter: ${r}`),n}}class Bd extends Mn{constructor(e,r){var n;super(e),this.value=new We(e.content,r);const i=this.value.filters,s=r.options.outputEscape;!(!((n=i[i.length-1])===null||n===void 0)&&n.raw)&&s&&i.push(new Ws(toString.call(s),s,[],r))}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class Hd extends Mn{constructor(e){super(e),this.str=e.getContent()}*render(e,r){r.write(this.str)}}var bt;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(bt||(bt={}));class Qd{constructor(e){if(this.options=e,e.relativeReference){const r=e.fs.sep;he(r,"`fs.sep` is required for relative reference");const n=new RegExp(["."+r,".."+r,"./","../"].map(i=>Cc(i)).join("|"));this.shouldLoadRelative=i=>n.test(i)}else this.shouldLoadRelative=r=>!1;this.contains=this.options.fs.contains||(()=>!0)}*lookup(e,r,n,i){const{fs:s}=this.options,a=this.options[r];for(const o of this.candidates(e,a,i,r!==bt.Root))if(n?s.existsSync(o):yield s.exists(o))return o;throw this.lookupError(e,a)}*candidates(e,r,n,i){const{fs:s,extname:a}=this.options;if(this.shouldLoadRelative(e)&&n){const o=s.resolve(this.dirname(n),e,a);for(const l of r)if(!i||this.contains(l,o)){yield o;break}}for(const o of r){const l=s.resolve(o,e,a);(!i||this.contains(o,l))&&(yield l)}if(s.fallback!==void 0){const o=s.fallback(e);o!==void 0&&(yield o)}}dirname(e){const r=this.options.fs;return he(r.dirname,"`fs.dirname` is required for relative reference"),r.dirname(e)}lookupError(e,r){const n=new Error("ENOENT");return n.message=`ENOENT: Failed to lookup "${e}" in "${r}"`,n.code="ENOENT",n}}class zd{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Qd(this.liquid.options)}parse(e,r){const i=new fe(e,this.liquid.options.operators,r).readTopLevelTokens(this.liquid.options);return this.parseTokens(i)}parseTokens(e){let r;const n=[];for(;r=e.shift();)n.push(this.parseToken(r,e));return n}parseToken(e,r){try{if(wt(e)){const n=this.liquid.tags[e.name];return he(n,`tag "${e.name}" not found`),new n(e,r,this.liquid)}return Yd(e)?new Bd(e,this.liquid):new Hd(e)}catch(n){throw new Oc(n,e)}}parseStream(e){return new Vd(e,(r,n)=>this.parseToken(r,n))}*_parseFileCached(e,r,n=bt.Root,i){const s=this.cache,a=this.loader.shouldLoadRelative(e)?i+","+e:n+":"+e,o=yield s.read(a);if(o)return o;const l=this._parseFile(e,r,n,i),u=r?yield l:tt(l);s.write(a,u);try{return yield u}catch(d){throw s.remove(a),d}}*_parseFile(e,r,n=bt.Root,i){const s=yield this.loader.lookup(e,n,r,i);return this.liquid.parse(r?this.fs.readFileSync(s):yield this.fs.readFile(s),s)}}const Wd=/[\da-fA-F]/,Ks=/[0-7]/,Ys={b:"\b",f:"\f",n:`
|
|
113
|
+
`,r:"\r",t:" ",v:"\v"};function Gs(t){const e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function Zs(t){let e="";for(let r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(Ys[t[r+1]]!==void 0)e+=Ys[t[++r]];else if(t[r+1]==="u"){let n=0,i=r+2;for(;i<=r+5&&Wd.test(t[i]);)n=n*16+Gs(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(!Ks.test(t[r+1]))e+=t[++r];else{let n=r+1,i=0;for(;n<=r+3&&Ks.test(t[n]);)i=i*8+Gs(t[n++]);r=n-1,e+=String.fromCharCode(i)}}return e}var X;(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.Delimited=12]="Delimited"})(X||(X={}));function Kd(t){return!!(ke(t)&X.Delimited)}function Js(t){return ke(t)===X.Operator}function Nn(t){return ke(t)===X.HTML}function Yd(t){return ke(t)===X.Output}function wt(t){return ke(t)===X.Tag}function Xs(t){return ke(t)===X.Quoted}function Gd(t){return ke(t)===X.Literal}function Zd(t){return ke(t)===X.Number}function Jd(t){return ke(t)===X.PropertyAccess}function Xd(t){return ke(t)===X.Word}function eh(t){return ke(t)===X.Range}function ke(t){return t?t.kind:-1}class Dt{constructor(e={},r=vt,n={}){var i,s;this.scopes=[{}],this.registers={},this.sync=!!n.sync,this.opts=r,this.globals=(i=n.globals)!==null&&i!==void 0?i:r.globals,this.environments=e,this.strictVariables=(s=n.strictVariables)!==null&&s!==void 0?s:this.opts.strictVariables}getRegister(e){return this.registers[e]=this.registers[e]||{}}setRegister(e,r){return this.registers[e]=r}saveRegister(...e){return e.map(r=>[r,this.getRegister(r)])}restoreRegister(e){return e.forEach(([r,n])=>this.setRegister(r,n))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,r)=>Pr(e,r),{})}get(e){return rt(this._get(e))}*_get(e){const r=this.findScope(e[0]);return yield this._getFromScope(r,e)}getFromScope(e,r){return rt(this._getFromScope(e,r))}*_getFromScope(e,r){Be(r)&&(r=r.split("."));for(let n=0;n<r.length;n++)if(e=yield th(e,r[n],this.opts.ownPropertyOnly),He(e)&&this.strictVariables)throw new Tc(r.slice(0,n+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}findScope(e){for(let r=this.scopes.length-1;r>=0;r--){const n=this.scopes[r];if(e in n)return n}return e in this.environments?this.environments:this.globals}}function th(t,e,r){if(t=Es(t),He(t))return t;if(be(t)&&e<0)return t[t.length+ +e];const n=rh(t,e,r);return n===void 0&&t instanceof gt?t.liquidMethodMissing(e):ye(n)?n.call(t):e==="size"?sh(t):e==="first"?nh(t):e==="last"?ih(t):n}function rh(t,e,r){if(!(r&&!Object.hasOwnProperty.call(t,e)&&!(t instanceof gt)))return t[e]}function nh(t){return be(t)?t[0]:t.first}function ih(t){return be(t)?t[t.length-1]:t.last}function sh(t){if(t.hasOwnProperty("size")||t.size!==void 0)return t.size;if(be(t)||Be(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var Ct;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(Ct||(Ct={}));const ah=we(Math.abs),oh=we(Math.max),lh=we(Math.min),uh=we(Math.ceil),ch=we((t,e,r=!1)=>r?Math.floor(t/e):t/e),dh=we(Math.floor),hh=we((t,e)=>t-e),fh=we((t,e)=>t%e),ph=we((t,e)=>t*e);function mh(t,e=0){t=$(t),e=$(e);const r=Math.pow(10,e);return Math.round(t*r)/r}function gh(t,e){return t=$(t),e=$(e),Number(t)+Number(e)}var yh=Object.freeze({__proto__:null,abs:ah,at_least:oh,at_most:lh,ceil:uh,divided_by:ch,floor:dh,minus:hh,modulo:fh,times:ph,round:mh,plus:gh}),vh=Object.freeze({__proto__:null,url_decode:t=>U(t).split("+").map(decodeURIComponent).join(" "),url_encode:t=>U(t).split(" ").map(encodeURIComponent).join("+")});const bh=we((t,e)=>ze(t).join(e===void 0?" ":e)),wh=we(t=>be(t)?En(t):""),Ch=we(t=>be(t)?t[0]:""),Eh=we(t=>[...ze(t)].reverse());function*Rh(t,e){const r=[];for(const n of ze($(t)))r.push([n,e?yield this.context._getFromScope(n,U(e).split(".")):n]);return r.sort((n,i)=>{const s=n[1],a=i[1];return s<a?-1:s>a?1:0}).map(n=>n[0])}function Sh(t,e){t=$(t);const r=U(e),n=e===void 0?_s:(i,s)=>_s(i[r],s[r]);return[...ze(t)].sort(n)}const xh=t=>t&&t.length||0;function*Oh(t,e){const r=[];for(const n of ze($(t)))r.push(yield this.context._getFromScope(n,U(e).split(".")));return r}function _h(t){return t=$(t),ze(t).filter(e=>!He($(e)))}function Th(t,e=[]){return t=$(t),e=ze(e).map(r=>$(r)),ze(t).concat(e)}function kh(t,e,r=1){return t=$(t),He(t)?[]:(be(t)||(t=U(t)),e=e<0?t.length+e:e,t.slice(e,e+r))}function*Dh(t,e,r){const n=[];t=ze($(t));for(const i of t)n.push(yield this.context._getFromScope(i,U(e).split(".")));return t.filter((i,s)=>r===void 0?yt(n[s],this.context):Ce(r)?r.equals(n[s]):n[s]===r)}function Lh(t){t=$(t);const e={};return(t||[]).filter(r=>Cs.call(e,String(r))?!1:(e[String(r)]=!0,!0))}var Ph=Object.freeze({__proto__:null,join:bh,last:wh,first:Ch,reverse:Eh,sort:Rh,sort_natural:Sh,size:xh,map:Oh,compact:_h,concat:Th,slice:kh,where:Dh,uniq:Lh});const Fh="%A, %B %-e, %Y at %-l:%M %P %z";function Mh(t,e,r){const n=this.context.opts;let i;return t=$(t),e=$(e),He(e)?e=Fh:e=U(e),t==="now"||t==="today"?i=new Date:_r(t)?i=new Date(t*1e3):Be(t)?/^\d+$/.test(t)?i=new Date(+t*1e3):n.preserveTimezones?i=nt.createDateFixedToTimezone(t):i=new Date(t):i=t,Nh(i)?(r!==void 0?i=new nt(i,ea(i,r)):n.timezoneOffset!==void 0&&(i=new nt(i,ea(i,n.timezoneOffset))),zc(i,e)):t}function Nh(t){return(t instanceof Date||t instanceof nt)&&!isNaN(t.getTime())}function ea(t,e){if(_r(e))return e;const r=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),n=new Date(t.toLocaleString("en-US",{timeZone:e}));return(r.getTime()-n.getTime())/6e4}var jh=Object.freeze({__proto__:null,date:Mh});function Ah(t,e){return he(arguments.length===2,"append expect 2 arguments"),U(t)+U(e)}function qh(t,e){return he(arguments.length===2,"prepend expect 2 arguments"),U(e)+U(t)}function Ih(t,e){return e?(e=Sn(U(e)),U(t).replace(new RegExp(`^[${e}]+`,"g"),"")):U(t).replace(/^\s+/,"")}function Vh(t){return U(t).toLowerCase()}function Uh(t){return U(t).toUpperCase()}function $h(t,e){return U(t).split(String(e)).join("")}function Bh(t,e){return U(t).replace(String(e),"")}function Hh(t,e){const r=U(t),n=String(e),i=r.lastIndexOf(n);return i===-1?r:r.substring(0,i)+r.substring(i+n.length+1)}function Qh(t,e){return e?(e=Sn(U(e)),U(t).replace(new RegExp(`[${e}]+$`,"g"),"")):U(t).replace(/\s+$/,"")}function zh(t,e){const r=U(t).split(String(e));for(;r.length&&r[r.length-1]==="";)r.pop();return r}function Wh(t,e){return e?(e=Sn(U(e)),U(t).replace(new RegExp(`^[${e}]+`,"g"),"").replace(new RegExp(`[${e}]+$`,"g"),"")):U(t).trim()}function Kh(t){return U(t).replace(/\n/g,"")}function Yh(t){return t=U(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Gh(t,e,r){return U(t).split(String(e)).join(r)}function Zh(t,e,r){return U(t).replace(String(e),r)}function Jh(t,e,r){const n=U(t),i=String(e),s=n.lastIndexOf(i);if(s===-1)return n;const a=String(r);return n.substring(0,s)+a+n.substring(s+i.length)}function Xh(t,e=50,r="..."){return t=U(t),t.length<=e?t:t.substring(0,e-r.length)+r}function ef(t,e=15,r="..."){const n=U(t).split(/\s+/);e<=0&&(e=1);let i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}var tf=Object.freeze({__proto__:null,append:Ah,prepend:qh,lstrip:Ih,downcase:Vh,upcase:Uh,remove:$h,remove_first:Bh,remove_last:Hh,rstrip:Qh,split:zh,strip:Wh,strip_newlines:Kh,capitalize:Yh,replace:Gh,replace_first:Zh,replace_last:Jh,truncate:Xh,truncatewords:ef});const rf=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fd),yh),vh),Ph),jh),tf),{json:zs,raw:Od,default:xd});class nf extends se{constructor(e,r,n){super(e,r,n);const i=new fe(e.args,n.options.operators);this.key=i.readIdentifier().content,i.skipBlank(),he(i.peek()==="=",()=>`illegal token ${e.getText()}`),i.advance(),this.value=new We(i.remaining(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}}const ta=["offset","limit","reversed"];class sf extends se{constructor(e,r,n){super(e,r,n);const i=new fe(e.args,this.liquid.options.operators),s=i.readIdentifier(),a=i.readIdentifier(),o=i.readValue();if(!s.size()||a.content!=="in"||!o)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=o,this.hash=new kt(i.remaining()),this.templates=[],this.elseTemplates=[];let l;const u=this.liquid.parser.parseStream(r).on("start",()=>l=this.templates).on("tag:else",()=>l=this.elseTemplates).on("tag:endfor",()=>u.stop()).on("template",d=>l.push(d)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});u.start()}*render(e,r){const n=this.liquid.renderer;let i=Tn(yield me(this.collection,e));if(!i.length){yield n.renderTemplates(this.elseTemplates,e,r);return}const s="continue-"+this.variable+"-"+this.collection.getText();e.push({continue:e.getRegister(s)});const a=yield this.hash.render(e);e.pop(),i=(this.liquid.options.orderedFilterParameters?Object.keys(a).filter(u=>ta.includes(u)):ta.filter(u=>a[u]!==void 0)).reduce((u,d)=>d==="offset"?of(u,a.offset):d==="limit"?lf(u,a.limit):af(u),i),e.setRegister(s,(a.offset||0)+i.length);const l={forloop:new _n(i.length,this.collection.getText(),this.variable)};e.push(l);for(const u of i){if(l[this.variable]=u,yield n.renderTemplates(this.templates,e,r),r.break){r.break=!1;break}r.continue=!1,l.forloop.next()}e.pop()}}function af(t){return[...t].reverse()}function of(t,e){return t.slice(e)}function lf(t,e){return t.slice(0,e)}class uf extends se{constructor(e,r,n){super(e,r,n),this.templates=[];const i=new fe(e.args,this.liquid.options.operators);for(this.variable=cf(i),he(this.variable,()=>`${e.args} not valid identifier`);r.length;){const s=r.shift();if(wt(s)&&s.name==="endcapture")return;this.templates.push(n.parser.parseToken(s,r))}throw new Error(`tag ${e.getText()} not closed`)}*render(e){const n=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=n}}function cf(t){const e=t.readIdentifier().content;if(e)return e;const r=t.readQuoted();if(r)return Ln(r)}class df extends se{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[],this.value=new We(e.args,this.liquid),this.elseTemplates=[];let i=[];const s=this.liquid.parser.parseStream(r).on("tag:when",a=>{i=[];const o=new fe(a.args,this.liquid.options.operators),l=[];for(;!o.end();)l.push(o.readValueOrThrow()),o.readTo(",");this.branches.push({values:l,templates:i})}).on("tag:else",()=>i=this.elseTemplates).on("tag:endcase",()=>s.stop()).on("template",a=>i.push(a)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});s.start()}*render(e,r){const n=this.liquid.renderer,i=$(yield this.value.value(e,e.opts.lenientIf));let s=!1;for(const a of this.branches)for(const o of a.values){const l=yield me(o,e,e.opts.lenientIf);if(i===l){yield n.renderTemplates(a.templates,e,r),s=!0;break}}s||(yield n.renderTemplates(this.elseTemplates,e,r))}}class hf extends se{constructor(e,r,n){for(super(e,r,n);r.length;){const i=r.shift();if(wt(i)&&i.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}}class ff extends se{constructor(e,r,n){super(e,r,n);const i=e.args,s=new fe(i,this.liquid.options.operators);for(this.file=jn(s,this.liquid),this.currentFile=e.file;!s.end();){s.skipBlank();const a=s.p,o=s.readIdentifier();if((o.content==="with"||o.content==="for")&&(s.skipBlank(),s.peek()!==":")){const l=s.readValue();if(l){const u=s.p,d=s.readIdentifier();let f;d.content==="as"?f=s.readIdentifier():s.p=u,this[o.content]={value:l,alias:f&&f.content},s.skipBlank(),s.peek()===","&&s.advance();continue}}s.p=a;break}this.hash=new kt(s.remaining())}*render(e,r){const{liquid:n,hash:i}=this,s=yield An(this.file,e,n);he(s,()=>`illegal filename "${s}"`);const a=new Dt({},e.opts,{sync:e.sync,globals:e.globals,strictVariables:e.strictVariables}),o=a.bottom();if(Pr(o,yield i.render(e)),this.with){const{value:l,alias:u}=this.with;o[u||s]=yield me(l,e)}if(this.for){const{value:l,alias:u}=this.for,d=Tn(yield me(l,e));o.forloop=new _n(d.length,l.getText(),u);for(const f of d){o[u]=f;const c=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(c,a,r),o.forloop.next()}}else{const l=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(l,a,r)}}}function jn(t,e){if(e.options.dynamicPartials){const i=t.readValue();if(i===void 0)throw new TypeError(`illegal argument "${t.input}"`);if(i.getText()==="none")return;if(Xs(i)){const s=e.parse(Ln(i));return ra(s)}return i}const r=[...t.readFileNameTemplate(e.options)],n=ra(e.parser.parseTokens(r));return n==="none"?void 0:n}function ra(t){return t.length===1&&Nn(t[0].token)?t[0].token.getContent():t}function*An(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):yield me(t,e)}class pf extends se{constructor(e,r,n){super(e,r,n);const i=e.args,s=new fe(i,this.liquid.options.operators);this.file=jn(s,this.liquid),this.currentFile=e.file;const a=s.p;s.readIdentifier().content==="with"?(s.skipBlank(),s.peek()!==":"?this.withVar=s.readValue():s.p=a):s.p=a,this.hash=new kt(s.remaining(),this.liquid.options.jekyllInclude)}*render(e,r){const{liquid:n,hash:i,withVar:s}=this,{renderer:a}=n,o=yield An(this.file,e,n);he(o,()=>`illegal filename "${o}"`);const l=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",Ct.OUTPUT);const u=yield i.render(e);s&&(u[o]=yield me(s,e));const d=yield n._parsePartialFile(o,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?{include:u}:u),yield a.renderTemplates(d,e,r),e.pop(),e.restoreRegister(l)}}class mf extends se{constructor(e,r,n){super(e,r,n);const i=new fe(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;_r(n[this.variable])||(n[this.variable]=0),r.write(U(--n[this.variable]))}}class gf extends se{constructor(e,r,n){super(e,r,n),this.candidates=[];const i=new fe(e.args,this.liquid.options.operators),s=i.readValue();for(i.skipBlank(),s&&(i.peek()===":"?(this.group=s,i.advance()):this.candidates.push(s));!i.end();){const a=i.readValue();a&&this.candidates.push(a),i.readTo(",")}he(this.candidates.length,()=>`empty candidates: ${e.getText()}`)}*render(e,r){const i=`cycle:${yield me(this.group,e)}:`+this.candidates.join(","),s=e.getRegister("cycle");let a=s[i];a===void 0&&(a=s[i]=0);const o=this.candidates[a];return a=(a+1)%this.candidates.length,s[i]=a,yield me(o,e)}}class yf extends se{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;n.parser.parseStream(r).on("start",()=>this.branches.push({value:new We(e.args,this.liquid),templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new We(s.args,this.liquid),templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endif",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,templates:s}of this.branches){const a=yield i.value(e,e.opts.lenientIf);if(yt(a,e)){yield n.renderTemplates(s,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class vf extends se{constructor(e,r,n){super(e,r,n);const i=new fe(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;_r(n[this.variable])||(n[this.variable]=0);const i=n[this.variable];n[this.variable]++,r.write(U(i))}}class bf extends se{constructor(e,r,n){super(e,r,n);const i=new fe(e.args,this.liquid.options.operators);this.file=jn(i,this.liquid),this.currentFile=e.file,this.args=new kt(i.remaining()),this.templates=this.liquid.parser.parseTokens(r)}*render(e,r){const{liquid:n,args:i,file:s}=this,{renderer:a}=n;if(s===void 0){e.setRegister("blockMode",Ct.OUTPUT),yield a.renderTemplates(this.templates,e,r);return}const o=yield An(this.file,e,n);he(o,()=>`illegal filename "${o}"`);const l=yield n._parseLayoutFile(o,e.sync,this.currentFile);e.setRegister("blockMode",Ct.STORE);const u=yield a.renderTemplates(this.templates,e),d=e.getRegister("blocks");d[""]===void 0&&(d[""]=(f,c)=>c.write(u)),e.setRegister("blockMode",Ct.OUTPUT),e.push(yield i.render(e)),yield a.renderTemplates(l,e,r),e.pop()}}class wf extends se{constructor(e,r,n){super(e,r,n),this.templates=[];const i=/\w+/.exec(e.args);for(this.block=i?i[0]:"";r.length;){const s=r.shift();if(wt(s)&&s.name==="endblock")return;const a=n.parser.parseToken(s,r);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,r){const n=this.getBlockRender(e);e.getRegister("blockMode")===Ct.STORE?e.getRegister("blocks")[this.block]=n:yield n(new Ls,r)}getBlockRender(e){const{liquid:r,templates:n}=this,i=e.getRegister("blocks")[this.block],s=function*(a,o){e.push({block:a}),yield r.renderer.renderTemplates(n,e,o),e.pop()};return i?(a,o)=>i(new Ls(()=>s(a,o)),o):s}}class Cf extends se{constructor(e,r,n){for(super(e,r,n),this.tokens=[];r.length;){const i=r.shift();if(wt(i)&&i.name==="endraw")return;this.tokens.push(i)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}}class Ef extends _n{constructor(e,r,n,i){super(e,n,i),this.length=e,this.cols=r}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}}class Rf extends se{constructor(e,r,n){super(e,r,n);const i=new fe(e.args,this.liquid.options.operators),s=i.readIdentifier();i.skipBlank();const a=i.readIdentifier(),o=i.readValue();if(a.content!=="in"||!o)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=o,this.args=new kt(i.remaining()),this.templates=[];let l;const u=this.liquid.parser.parseStream(r).on("start",()=>l=this.templates).on("tag:endtablerow",()=>u.stop()).on("template",d=>l.push(d)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});u.start()}*render(e,r){let n=Tn(yield me(this.collection,e));const i=yield this.args.render(e),s=i.offset||0,a=i.limit===void 0?n.length:i.limit;n=n.slice(s,s+a);const o=i.cols||n.length,l=this.liquid.renderer,u=new Ef(n.length,o,this.collection.getText(),this.variable),d={tablerowloop:u};e.push(d);for(let f=0;f<n.length;f++,u.next())d[this.variable]=n[f],u.col0()===0&&(u.row()!==1&&r.write("</tr>"),r.write(`<tr class="row${u.row()}">`)),r.write(`<td class="col${u.col()}">`),yield l.renderTemplates(this.templates,e,r),r.write("</td>");n.length&&r.write("</tr>"),e.pop()}}class Sf extends se{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;this.liquid.parser.parseStream(r).on("start",()=>this.branches.push({value:new We(e.args,this.liquid),test:Mr,templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new We(s.args,this.liquid),test:yt,templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endunless",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,test:s,templates:a}of this.branches){const o=yield i.value(e,e.opts.lenientIf);if(s(o,e)){yield n.renderTemplates(a,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class xf extends se{render(e,r){r.break=!0}}class Of extends se{render(e,r){r.continue=!0}}class _f extends se{constructor(e,r,n){super(e,r,n),this.value=new We(e.args,this.liquid)}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class Tf extends se{constructor(e,r,n){super(e,r,n);const s=new fe(e.args,this.liquid.options.operators).readLiquidTagTokens(this.liquid.options);this.templates=this.liquid.parser.parseTokens(s)}*render(e,r){yield this.liquid.renderer.renderTemplates(this.templates,e,r)}}class kf extends se{constructor(e,r,n){if(super(e,r,n),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}}const Df={assign:nf,for:sf,capture:uf,case:df,comment:hf,include:pf,render:ff,decrement:mf,increment:vf,cycle:gf,if:yf,layout:bf,block:wf,raw:Cf,tablerow:Rf,unless:Sf,break:xf,continue:Of,echo:_f,liquid:Tf,"#":kf};class qn{constructor(e={}){this.renderer=new cd,this.filters={},this.tags={},this.options=Md(e),this.parser=new zd(this),Rs(Df,(r,n)=>this.registerTag(n,r)),Rs(rf,(r,n)=>this.registerFilter(n,r))}parse(e,r){return this.parser.parse(e,r)}_render(e,r,n){const i=r instanceof Dt?r:new Dt(r,this.options,n);return this.renderer.renderTemplates(e,i)}render(e,r,n){return Qe(this,void 0,void 0,function*(){return tt(this._render(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderSync(e,r,n){return rt(this._render(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderToNodeStream(e,r,n={}){const i=new Dt(r,this.options,n);return this.renderer.renderTemplatesToNodeStream(e,i)}_parseAndRender(e,r,n){const i=this.parse(e);return this._render(i,r,n)}parseAndRender(e,r,n){return Qe(this,void 0,void 0,function*(){return tt(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}parseAndRenderSync(e,r,n){return rt(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!0})))}_parsePartialFile(e,r,n){return this.parser.parseFile(e,r,bt.Partials,n)}_parseLayoutFile(e,r,n){return this.parser.parseFile(e,r,bt.Layouts,n)}_parseFile(e,r,n,i){return this.parser.parseFile(e,r,n,i)}parseFile(e,r){return Qe(this,void 0,void 0,function*(){return tt(this.parser.parseFile(e,!1,r))})}parseFileSync(e,r){return rt(this.parser.parseFile(e,!0,r))}*_renderFile(e,r,n){const i=yield this._parseFile(e,n.sync,n.lookupType);return yield this._render(i,r,n)}renderFile(e,r,n){return Qe(this,void 0,void 0,function*(){return tt(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderFileSync(e,r,n){return rt(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderFileToNodeStream(e,r,n){return Qe(this,void 0,void 0,function*(){const i=yield this.parseFile(e);return this.renderToNodeStream(i,r,n)})}_evalValue(e,r){const n=new We(e,this),i=r instanceof Dt?r:new Dt(r,this.options);return n.value(i)}evalValue(e,r){return Qe(this,void 0,void 0,function*(){return tt(this._evalValue(e,r))})}evalValueSync(e,r){return rt(this._evalValue(e,r))}registerFilter(e,r){this.filters[e]=r}registerTag(e,r){this.tags[e]=ye(r)?r:Ud(r)}plugin(e){return e.call(this,qn)}express(){const e=this;let r=!0;return function(n,i,s){if(r){r=!1;const a=Nr(this.root);e.options.root.unshift(...a),e.options.layouts.unshift(...a),e.options.partials.unshift(...a)}e.renderFile(n,i).then(a=>s(null,a),s)}}}const Lt=new qn;function Lf(t,e){return N.useMemo(()=>Pf(t,e),[t,e])}function Pf(t,e){return t.map(r=>{const n=e||r.transform;return n?Object.keys(n).reduce((i,s)=>s==="details"?(i[s]=n[s].map(a=>Array.isArray(a)?a.map(o=>({label:o.label,value:Lt.parseAndRenderSync(o.value,r),html:o.html})):{label:a.label,value:Lt.parseAndRenderSync(a.value,r),html:a.html}),i):s==="actions"?(i[s]=n[s].map(a=>Object.keys(a).reduce((o,l)=>(typeof a[l]=="object"?o[l]=Object.keys(a[l]).reduce((u,d)=>(u[d]=Lt.parseAndRenderSync(a[l][d],r),u),{}):o[l]=Lt.parseAndRenderSync(a[l],r),o),{})),i):(i[s]=Lt.parseAndRenderSync(n[s],r),i),{}):r})}function Ff({path:t,placeholderText:e,dynamicOptions:r}){var j;let{asyncUrl:n,transform:i,clientSideFilter:s,rootData:a,includeHeaders:o}=r,l=Ro();const u=Ae(),{activeIndex:d,search:f,setActions:c,navigateTo:m}=N.useContext(Xe),C=Cu(f,500),E=o&&u.headers?u.headers:{},{isLoading:R,error:O,data:T=[]}=wu({queryKey:[t,s?"":C],queryFn:()=>fetch(Lt.parseAndRenderSync(n,l),{headers:E}).then(L=>L.json())}),b=a?vc(T,a,[]):T,g=N.useMemo(()=>Array.isArray(b)?b:[b],[b]);let M=Lf(g,i);s&&(M=M.filter(L=>L.title.toLowerCase().includes(f.toLowerCase())));const _=M[d];return N.useEffect(()=>{_&&_.actions?c(_.actions):c([])},[_,f,d,c]),R?w.jsx(Jt,{children:w.jsx("div",{className:"qikbar-item-empty",children:"loading..."})}):M.length===0?w.jsx(Jt,{children:w.jsx("div",{className:"qikbar-item-empty",children:"No matches"})}):w.jsxs(w.Fragment,{children:[w.jsx(Vi,{placeholder:e}),w.jsxs(Jt,{children:[w.jsx(Ai,{children:M.map(L=>w.jsx(un,{item:L},L.id))}),_&&((j=_==null?void 0:_.details)==null?void 0:j.length)>0&&w.jsx(Ui,{fields:_.details})]})]})}class Mf extends N.Component{constructor(){super(...arguments);sa(this,"state",{hasError:!1})}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,n){}render(){return this.state.hasError?w.jsx("div",{className:"qikbar-command-wrapper",children:"Something went wrong."}):this.props.children}}function Nf(){let t=Di();return w.jsx("div",{className:"qikbar-command-wrapper",children:w.jsxs("div",{className:"qikbar-command-bar",children:[w.jsx("div",{className:"qikbar-command-content",children:w.jsxs("div",{className:"qikbar-command-error",children:["It looks like there maybe a problem. If you continue to see this please contact @"," ",w.jsx("a",{href:`mailto:support@qikbar.com?subject=Issues with running qikbar on my site.&body=The current error is: ${t}`,children:"support@qikbar.com"})]})}),w.jsx("div",{className:"qikbar-command-footer",children:w.jsx("div",{className:"qikbar-logo",children:w.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:w.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.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"}),w.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"}),w.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"})]})})})})]})})}const Ae=Ca(t=>({commands:[],router:null,headers:null,addRouter:e=>{t(r=>({router:e}))},addHeaders:e=>{t(()=>({headers:e}))},addCommand:e=>{t(r=>({commands:[...r.commands,e]}))},addCommands:e=>{t(r=>({commands:e}))},updateCommand:e=>{t(r=>({commands:r.commands.map(n=>n.id===e.id?e:n)}))},removeCommand:e=>{t(r=>({commands:r.commands.filter(n=>n.id!==e.id)}))}}));function jf(){const t=Ae(r=>r.commands),e=qo([{path:"/",element:w.jsx(il,{}),errorElement:w.jsx(Nf,{}),children:t.map(r=>({path:r.path,element:r.type==="STATIC"?w.jsx(Il,{...r}):w.jsx(Ff,{...r})}))}]);return w.jsx(Fo,{router:e})}const Af=new eu;function qf({id:t}){const e={}.VITE_DEV==="true"?"http://localhost:3000":"https://app.qikbar.com";return fetch(`${e}/api/site/${t}`).then(n=>n.json()).then(n=>{Ae.getState().addCommands(n.routes)}).catch(n=>{console.error(n)}),{id:t,boot:({elementId:n})=>{$t.createRoot(document.getElementById(n)).render(w.jsx(N.StrictMode,{children:w.jsx(Mf,{children:w.jsx(au,{client:Af,children:w.jsx("div",{id:"qikbar",children:w.jsx(jf,{})})})})})),window.Qikbar.booted=!0},addCommand:n=>Ae.getState().addCommand(n),updateCommand:n=>Ae.getState().updateCommand(n),removeCommand:n=>Ae.getState().removeCommand(n),addRouter:n=>Ae.getState().addRouter(n),addHeaders:n=>Ae.getState().addHeaders(n)}}function na(t){return window.Qikbar=qf({id:t}),window.Qikbar}function If({elementId:t,router:e,siteId:r}){return N.useEffect(()=>{if(window.Qikbar)return;const n=na("rc8LayKvbQ");n.boot({elementId:t||"qikbar"}),n.addRouter(e)},[e,t]),t?null:w.jsx("div",{id:"qikbar"})}const dp="";ge.Qikbar=If,ge.init=na,Object.defineProperty(ge,Symbol.toStringTag,{value:"Module"})});
|