squad-kit 1.0.1 → 1.1.0
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/CHANGELOG.md +72 -1
- package/README.md +27 -3
- package/SECURITY.md +42 -13
- package/dist/cli.js +4989 -1626
- package/dist/console-ui/assets/index-B5OB6sbE.css +1 -0
- package/dist/console-ui/assets/index-CmwEXgR9.js +551 -0
- package/dist/console-ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/console-ui/assets/index-CSk4SKT_.css +0 -1
- package/dist/console-ui/assets/index-DKFsGYQn.js +0 -500
|
@@ -1,500 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Ao=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ud(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dm={exports:{}},bl={},hm={exports:{}},se={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var pa=Symbol.for("react.element"),C3=Symbol.for("react.portal"),E3=Symbol.for("react.fragment"),T3=Symbol.for("react.strict_mode"),P3=Symbol.for("react.profiler"),R3=Symbol.for("react.provider"),A3=Symbol.for("react.context"),L3=Symbol.for("react.forward_ref"),I3=Symbol.for("react.suspense"),_3=Symbol.for("react.memo"),z3=Symbol.for("react.lazy"),Hp=Symbol.iterator;function F3(e){return e===null||typeof e!="object"?null:(e=Hp&&e[Hp]||e["@@iterator"],typeof e=="function"?e:null)}var pm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fm=Object.assign,mm={};function Ur(e,t,n){this.props=e,this.context=t,this.refs=mm,this.updater=n||pm}Ur.prototype.isReactComponent={};Ur.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ur.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function gm(){}gm.prototype=Ur.prototype;function qd(e,t,n){this.props=e,this.context=t,this.refs=mm,this.updater=n||pm}var Wd=qd.prototype=new gm;Wd.constructor=qd;fm(Wd,Ur.prototype);Wd.isPureReactComponent=!0;var Vp=Array.isArray,ym=Object.prototype.hasOwnProperty,Hd={current:null},xm={key:!0,ref:!0,__self:!0,__source:!0};function vm(e,t,n){var s,i={},a=null,o=null;if(t!=null)for(s in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)ym.call(t,s)&&!xm.hasOwnProperty(s)&&(i[s]=t[s]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(s in l=e.defaultProps,l)i[s]===void 0&&(i[s]=l[s]);return{$$typeof:pa,type:e,key:a,ref:o,props:i,_owner:Hd.current}}function M3(e,t){return{$$typeof:pa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Vd(e){return typeof e=="object"&&e!==null&&e.$$typeof===pa}function O3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Kp=/\/+/g;function rc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?O3(""+e.key):t.toString(36)}function ho(e,t,n,s,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case pa:case C3:o=!0}}if(o)return o=e,i=i(o),e=s===""?"."+rc(o,0):s,Vp(i)?(n="",e!=null&&(n=e.replace(Kp,"$&/")+"/"),ho(i,t,n,"",function(u){return u})):i!=null&&(Vd(i)&&(i=M3(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Kp,"$&/")+"/")+e)),t.push(i)),1;if(o=0,s=s===""?".":s+":",Vp(e))for(var l=0;l<e.length;l++){a=e[l];var c=s+rc(a,l);o+=ho(a,t,n,c,i)}else if(c=F3(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=s+rc(a,l++),o+=ho(a,t,n,c,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function La(e,t,n){if(e==null)return e;var s=[],i=0;return ho(e,s,"","",function(a){return t.call(n,a,i++)}),s}function $3(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var st={current:null},po={transition:null},D3={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:po,ReactCurrentOwner:Hd};function km(){throw Error("act(...) is not supported in production builds of React.")}se.Children={map:La,forEach:function(e,t,n){La(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return La(e,function(){t++}),t},toArray:function(e){return La(e,function(t){return t})||[]},only:function(e){if(!Vd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=Ur;se.Fragment=E3;se.Profiler=P3;se.PureComponent=qd;se.StrictMode=T3;se.Suspense=I3;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D3;se.act=km;se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=fm({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=Hd.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)ym.call(t,c)&&!xm.hasOwnProperty(c)&&(s[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)s.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];s.children=l}return{$$typeof:pa,type:e.type,key:i,ref:a,props:s,_owner:o}};se.createContext=function(e){return e={$$typeof:A3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:R3,_context:e},e.Consumer=e};se.createElement=vm;se.createFactory=function(e){var t=vm.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:L3,render:e}};se.isValidElement=Vd;se.lazy=function(e){return{$$typeof:z3,_payload:{_status:-1,_result:e},_init:$3}};se.memo=function(e,t){return{$$typeof:_3,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=po.transition;po.transition={};try{e()}finally{po.transition=t}};se.unstable_act=km;se.useCallback=function(e,t){return st.current.useCallback(e,t)};se.useContext=function(e){return st.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return st.current.useDeferredValue(e)};se.useEffect=function(e,t){return st.current.useEffect(e,t)};se.useId=function(){return st.current.useId()};se.useImperativeHandle=function(e,t,n){return st.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return st.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return st.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return st.current.useMemo(e,t)};se.useReducer=function(e,t,n){return st.current.useReducer(e,t,n)};se.useRef=function(e){return st.current.useRef(e)};se.useState=function(e){return st.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return st.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return st.current.useTransition()};se.version="18.3.1";hm.exports=se;var j=hm.exports;const Fi=Ud(j);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var B3=j,U3=Symbol.for("react.element"),q3=Symbol.for("react.fragment"),W3=Object.prototype.hasOwnProperty,H3=B3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,V3={key:!0,ref:!0,__self:!0,__source:!0};function wm(e,t,n){var s,i={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(s in t)W3.call(t,s)&&!V3.hasOwnProperty(s)&&(i[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)i[s]===void 0&&(i[s]=t[s]);return{$$typeof:U3,type:e,key:a,ref:o,props:i,_owner:H3.current}}bl.Fragment=q3;bl.jsx=wm;bl.jsxs=wm;dm.exports=bl;var r=dm.exports,bm={exports:{}},Et={},jm={exports:{}},Sm={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(_,B){var N=_.length;_.push(B);e:for(;0<N;){var V=N-1>>>1,X=_[V];if(0<i(X,B))_[V]=B,_[N]=X,N=V;else break e}}function n(_){return _.length===0?null:_[0]}function s(_){if(_.length===0)return null;var B=_[0],N=_.pop();if(N!==B){_[0]=N;e:for(var V=0,X=_.length,P=X>>>1;V<P;){var ae=2*(V+1)-1,oe=_[ae],re=ae+1,ke=_[re];if(0>i(oe,N))re<X&&0>i(ke,oe)?(_[V]=ke,_[re]=N,V=re):(_[V]=oe,_[ae]=N,V=ae);else if(re<X&&0>i(ke,N))_[V]=ke,_[re]=N,V=re;else break e}}return B}function i(_,B){var N=_.sortIndex-B.sortIndex;return N!==0?N:_.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],h=1,d=null,f=3,p=!1,m=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(_){for(var B=n(u);B!==null;){if(B.callback===null)s(u);else if(B.startTime<=_)s(u),B.sortIndex=B.expirationTime,t(c,B);else break;B=n(u)}}function b(_){if(g=!1,k(_),!m)if(n(c)!==null)m=!0,ee(T);else{var B=n(u);B!==null&&Q(b,B.startTime-_)}}function T(_,B){m=!1,g&&(g=!1,y(S),S=-1),p=!0;var N=f;try{for(k(B),d=n(c);d!==null&&(!(d.expirationTime>B)||_&&!R());){var V=d.callback;if(typeof V=="function"){d.callback=null,f=d.priorityLevel;var X=V(d.expirationTime<=B);B=e.unstable_now(),typeof X=="function"?d.callback=X:d===n(c)&&s(c),k(B)}else s(c);d=n(c)}if(d!==null)var P=!0;else{var ae=n(u);ae!==null&&Q(b,ae.startTime-B),P=!1}return P}finally{d=null,f=N,p=!1}}var w=!1,E=null,S=-1,A=5,C=-1;function R(){return!(e.unstable_now()-C<A)}function L(){if(E!==null){var _=e.unstable_now();C=_;var B=!0;try{B=E(!0,_)}finally{B?$():(w=!1,E=null)}}else w=!1}var $;if(typeof x=="function")$=function(){x(L)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,W=U.port2;U.port1.onmessage=L,$=function(){W.postMessage(null)}}else $=function(){v(L,0)};function ee(_){E=_,w||(w=!0,$())}function Q(_,B){S=v(function(){_(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,ee(T))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(_){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var N=f;f=B;try{return _()}finally{f=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,B){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var N=f;f=_;try{return B()}finally{f=N}},e.unstable_scheduleCallback=function(_,B,N){var V=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?V+N:V):N=V,_){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=N+X,_={id:h++,callback:B,priorityLevel:_,startTime:N,expirationTime:X,sortIndex:-1},N>V?(_.sortIndex=N,t(u,_),n(c)===null&&_===n(u)&&(g?(y(S),S=-1):g=!0,Q(b,N-V))):(_.sortIndex=X,t(c,_),m||p||(m=!0,ee(T))),_},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(_){var B=f;return function(){var N=f;f=B;try{return _.apply(this,arguments)}finally{f=N}}}})(Sm);jm.exports=Sm;var K3=jm.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Q3=j,Ct=K3;function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Nm=new Set,Mi={};function Vs(e,t){Pr(e,t),Pr(e+"Capture",t)}function Pr(e,t){for(Mi[e]=t,e=0;e<t.length;e++)Nm.add(t[e])}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hu=Object.prototype.hasOwnProperty,G3=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Qp={},Gp={};function Y3(e){return hu.call(Gp,e)?!0:hu.call(Qp,e)?!1:G3.test(e)?Gp[e]=!0:(Qp[e]=!0,!1)}function Z3(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function X3(e,t,n,s){if(t===null||typeof t>"u"||Z3(e,t,n,s))return!0;if(s)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function rt(e,t,n,s,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new rt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){We[e]=new rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Kd=/[\-:]([a-z])/g;function Qd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Kd,Qd);We[t]=new rt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Kd,Qd);We[t]=new rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Kd,Qd);We[t]=new rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new rt(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gd(e,t,n,s){var i=We.hasOwnProperty(t)?We[t]:null;(i!==null?i.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(X3(t,n,i,s)&&(n=null),s||i===null?Y3(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,s=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,s?e.setAttributeNS(s,t,n):e.setAttribute(t,n))))}var Rn=Q3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ia=Symbol.for("react.element"),cr=Symbol.for("react.portal"),ur=Symbol.for("react.fragment"),Yd=Symbol.for("react.strict_mode"),pu=Symbol.for("react.profiler"),Cm=Symbol.for("react.provider"),Em=Symbol.for("react.context"),Zd=Symbol.for("react.forward_ref"),fu=Symbol.for("react.suspense"),mu=Symbol.for("react.suspense_list"),Xd=Symbol.for("react.memo"),$n=Symbol.for("react.lazy"),Tm=Symbol.for("react.offscreen"),Yp=Symbol.iterator;function ni(e){return e===null||typeof e!="object"?null:(e=Yp&&e[Yp]||e["@@iterator"],typeof e=="function"?e:null)}var Ne=Object.assign,ic;function yi(e){if(ic===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ic=t&&t[1]||""}return`
|
|
34
|
-
`+ic+e}var ac=!1;function oc(e,t){if(!e||ac)return"";ac=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var s=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){s=u}e.call(t.prototype)}else{try{throw Error()}catch(u){s=u}e()}}catch(u){if(u&&s&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
-
`),a=s.stack.split(`
|
|
36
|
-
`),o=i.length-1,l=a.length-1;1<=o&&0<=l&&i[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==a[l]){var c=`
|
|
37
|
-
`+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{ac=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yi(e):""}function J3(e){switch(e.tag){case 5:return yi(e.type);case 16:return yi("Lazy");case 13:return yi("Suspense");case 19:return yi("SuspenseList");case 0:case 2:case 15:return e=oc(e.type,!1),e;case 11:return e=oc(e.type.render,!1),e;case 1:return e=oc(e.type,!0),e;default:return""}}function gu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ur:return"Fragment";case cr:return"Portal";case pu:return"Profiler";case Yd:return"StrictMode";case fu:return"Suspense";case mu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Em:return(e.displayName||"Context")+".Consumer";case Cm:return(e._context.displayName||"Context")+".Provider";case Zd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xd:return t=e.displayName||null,t!==null?t:gu(e.type)||"Memo";case $n:t=e._payload,e=e._init;try{return gu(e(t))}catch{}}return null}function e4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return gu(t);case 8:return t===Yd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function us(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function t4(e){var t=Pm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){s=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return s},setValue:function(o){s=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _a(e){e._valueTracker||(e._valueTracker=t4(e))}function Rm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=Pm(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}function Lo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function yu(e,t){var n=t.checked;return Ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zp(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=us(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Am(e,t){t=t.checked,t!=null&&Gd(e,"checked",t,!1)}function xu(e,t){Am(e,t);var n=us(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vu(e,t.type,n):t.hasOwnProperty("defaultValue")&&vu(e,t.type,us(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function vu(e,t,n){(t!=="number"||Lo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xi=Array.isArray;function wr(e,t,n,s){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&s&&(e[n].defaultSelected=!0)}else{for(n=""+us(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,s&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ku(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(M(91));return Ne({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(M(92));if(xi(n)){if(1<n.length)throw Error(M(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:us(n)}}function Lm(e,t){var n=us(t.value),s=us(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),s!=null&&(e.defaultValue=""+s)}function ef(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Im(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function wu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Im(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var za,_m=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,s,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,s,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(za=za||document.createElement("div"),za.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=za.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Oi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ji={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},n4=["Webkit","ms","Moz","O"];Object.keys(ji).forEach(function(e){n4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ji[t]=ji[e]})});function zm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ji.hasOwnProperty(e)&&ji[e]?(""+t).trim():t+"px"}function Fm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,i=zm(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,i):e[n]=i}}var s4=Ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bu(e,t){if(t){if(s4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function ju(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Su=null;function Jd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nu=null,br=null,jr=null;function tf(e){if(e=ga(e)){if(typeof Nu!="function")throw Error(M(280));var t=e.stateNode;t&&(t=El(t),Nu(e.stateNode,e.type,t))}}function Mm(e){br?jr?jr.push(e):jr=[e]:br=e}function Om(){if(br){var e=br,t=jr;if(jr=br=null,tf(e),t)for(e=0;e<t.length;e++)tf(t[e])}}function $m(e,t){return e(t)}function Dm(){}var lc=!1;function Bm(e,t,n){if(lc)return e(t,n);lc=!0;try{return $m(e,t,n)}finally{lc=!1,(br!==null||jr!==null)&&(Dm(),Om())}}function $i(e,t){var n=e.stateNode;if(n===null)return null;var s=El(n);if(s===null)return null;n=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var Cu=!1;if(Sn)try{var si={};Object.defineProperty(si,"passive",{get:function(){Cu=!0}}),window.addEventListener("test",si,si),window.removeEventListener("test",si,si)}catch{Cu=!1}function r4(e,t,n,s,i,a,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(h){this.onError(h)}}var Si=!1,Io=null,_o=!1,Eu=null,i4={onError:function(e){Si=!0,Io=e}};function a4(e,t,n,s,i,a,o,l,c){Si=!1,Io=null,r4.apply(i4,arguments)}function o4(e,t,n,s,i,a,o,l,c){if(a4.apply(this,arguments),Si){if(Si){var u=Io;Si=!1,Io=null}else throw Error(M(198));_o||(_o=!0,Eu=u)}}function Ks(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Um(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function nf(e){if(Ks(e)!==e)throw Error(M(188))}function l4(e){var t=e.alternate;if(!t){if(t=Ks(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,s=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(s=i.return,s!==null){n=s;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return nf(i),e;if(a===s)return nf(i),t;a=a.sibling}throw Error(M(188))}if(n.return!==s.return)n=i,s=a;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,s=a;break}if(l===s){o=!0,s=i,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,s=i;break}if(l===s){o=!0,s=a,n=i;break}l=l.sibling}if(!o)throw Error(M(189))}}if(n.alternate!==s)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function qm(e){return e=l4(e),e!==null?Wm(e):null}function Wm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Wm(e);if(t!==null)return t;e=e.sibling}return null}var Hm=Ct.unstable_scheduleCallback,sf=Ct.unstable_cancelCallback,c4=Ct.unstable_shouldYield,u4=Ct.unstable_requestPaint,Re=Ct.unstable_now,d4=Ct.unstable_getCurrentPriorityLevel,eh=Ct.unstable_ImmediatePriority,Vm=Ct.unstable_UserBlockingPriority,zo=Ct.unstable_NormalPriority,h4=Ct.unstable_LowPriority,Km=Ct.unstable_IdlePriority,jl=null,ln=null;function p4(e){if(ln&&typeof ln.onCommitFiberRoot=="function")try{ln.onCommitFiberRoot(jl,e,void 0,(e.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:g4,f4=Math.log,m4=Math.LN2;function g4(e){return e>>>=0,e===0?32:31-(f4(e)/m4|0)|0}var Fa=64,Ma=4194304;function vi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fo(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?s=vi(l):(a&=o,a!==0&&(s=vi(a)))}else o=n&~i,o!==0?s=vi(o):a!==0&&(s=vi(a));if(s===0)return 0;if(t!==0&&t!==s&&!(t&i)&&(i=s&-s,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(s&4&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)n=31-Qt(t),i=1<<n,s|=e[n],t&=~i;return s}function y4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function x4(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Qt(a),l=1<<o,c=i[o];c===-1?(!(l&n)||l&s)&&(i[o]=y4(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function Tu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Qm(){var e=Fa;return Fa<<=1,!(Fa&4194240)&&(Fa=64),e}function cc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function fa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function v4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Qt(n),a=1<<i;t[i]=0,s[i]=-1,e[i]=-1,n&=~a}}function th(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-Qt(n),i=1<<s;i&t|e[s]&t&&(e[s]|=t),n&=~i}}var ue=0;function Gm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ym,nh,Zm,Xm,Jm,Pu=!1,Oa=[],Xn=null,Jn=null,es=null,Di=new Map,Bi=new Map,Un=[],k4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function rf(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":es=null;break;case"pointerover":case"pointerout":Di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.delete(t.pointerId)}}function ri(e,t,n,s,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ga(t),t!==null&&nh(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function w4(e,t,n,s,i){switch(t){case"focusin":return Xn=ri(Xn,e,t,n,s,i),!0;case"dragenter":return Jn=ri(Jn,e,t,n,s,i),!0;case"mouseover":return es=ri(es,e,t,n,s,i),!0;case"pointerover":var a=i.pointerId;return Di.set(a,ri(Di.get(a)||null,e,t,n,s,i)),!0;case"gotpointercapture":return a=i.pointerId,Bi.set(a,ri(Bi.get(a)||null,e,t,n,s,i)),!0}return!1}function eg(e){var t=Ns(e.target);if(t!==null){var n=Ks(t);if(n!==null){if(t=n.tag,t===13){if(t=Um(n),t!==null){e.blockedOn=t,Jm(e.priority,function(){Zm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ru(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);Su=s,n.target.dispatchEvent(s),Su=null}else return t=ga(n),t!==null&&nh(t),e.blockedOn=n,!1;t.shift()}return!0}function af(e,t,n){fo(e)&&n.delete(t)}function b4(){Pu=!1,Xn!==null&&fo(Xn)&&(Xn=null),Jn!==null&&fo(Jn)&&(Jn=null),es!==null&&fo(es)&&(es=null),Di.forEach(af),Bi.forEach(af)}function ii(e,t){e.blockedOn===t&&(e.blockedOn=null,Pu||(Pu=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,b4)))}function Ui(e){function t(i){return ii(i,e)}if(0<Oa.length){ii(Oa[0],e);for(var n=1;n<Oa.length;n++){var s=Oa[n];s.blockedOn===e&&(s.blockedOn=null)}}for(Xn!==null&&ii(Xn,e),Jn!==null&&ii(Jn,e),es!==null&&ii(es,e),Di.forEach(t),Bi.forEach(t),n=0;n<Un.length;n++)s=Un[n],s.blockedOn===e&&(s.blockedOn=null);for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)eg(n),n.blockedOn===null&&Un.shift()}var Sr=Rn.ReactCurrentBatchConfig,Mo=!0;function j4(e,t,n,s){var i=ue,a=Sr.transition;Sr.transition=null;try{ue=1,sh(e,t,n,s)}finally{ue=i,Sr.transition=a}}function S4(e,t,n,s){var i=ue,a=Sr.transition;Sr.transition=null;try{ue=4,sh(e,t,n,s)}finally{ue=i,Sr.transition=a}}function sh(e,t,n,s){if(Mo){var i=Ru(e,t,n,s);if(i===null)vc(e,t,s,Oo,n),rf(e,s);else if(w4(i,e,t,n,s))s.stopPropagation();else if(rf(e,s),t&4&&-1<k4.indexOf(e)){for(;i!==null;){var a=ga(i);if(a!==null&&Ym(a),a=Ru(e,t,n,s),a===null&&vc(e,t,s,Oo,n),a===i)break;i=a}i!==null&&s.stopPropagation()}else vc(e,t,s,null,n)}}var Oo=null;function Ru(e,t,n,s){if(Oo=null,e=Jd(s),e=Ns(e),e!==null)if(t=Ks(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Um(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Oo=e,null}function tg(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(d4()){case eh:return 1;case Vm:return 4;case zo:case h4:return 16;case Km:return 536870912;default:return 16}default:return 16}}var Wn=null,rh=null,mo=null;function ng(){if(mo)return mo;var e,t=rh,n=t.length,s,i="value"in Wn?Wn.value:Wn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(s=1;s<=o&&t[n-s]===i[a-s];s++);return mo=i.slice(e,1<s?1-s:void 0)}function go(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function $a(){return!0}function of(){return!1}function Tt(e){function t(n,s,i,a,o){this._reactName=n,this._targetInst=i,this.type=s,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?$a:of,this.isPropagationStopped=of,this}return Ne(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=$a)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=$a)},persist:function(){},isPersistent:$a}),t}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ih=Tt(qr),ma=Ne({},qr,{view:0,detail:0}),N4=Tt(ma),uc,dc,ai,Sl=Ne({},ma,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ah,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ai&&(ai&&e.type==="mousemove"?(uc=e.screenX-ai.screenX,dc=e.screenY-ai.screenY):dc=uc=0,ai=e),uc)},movementY:function(e){return"movementY"in e?e.movementY:dc}}),lf=Tt(Sl),C4=Ne({},Sl,{dataTransfer:0}),E4=Tt(C4),T4=Ne({},ma,{relatedTarget:0}),hc=Tt(T4),P4=Ne({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),R4=Tt(P4),A4=Ne({},qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),L4=Tt(A4),I4=Ne({},qr,{data:0}),cf=Tt(I4),_4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},z4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},F4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=F4[e])?!!t[e]:!1}function ah(){return M4}var O4=Ne({},ma,{key:function(e){if(e.key){var t=_4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=go(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?z4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ah,charCode:function(e){return e.type==="keypress"?go(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?go(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$4=Tt(O4),D4=Ne({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uf=Tt(D4),B4=Ne({},ma,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ah}),U4=Tt(B4),q4=Ne({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),W4=Tt(q4),H4=Ne({},Sl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),V4=Tt(H4),K4=[9,13,27,32],oh=Sn&&"CompositionEvent"in window,Ni=null;Sn&&"documentMode"in document&&(Ni=document.documentMode);var Q4=Sn&&"TextEvent"in window&&!Ni,sg=Sn&&(!oh||Ni&&8<Ni&&11>=Ni),df=" ",hf=!1;function rg(e,t){switch(e){case"keyup":return K4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ig(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function G4(e,t){switch(e){case"compositionend":return ig(t);case"keypress":return t.which!==32?null:(hf=!0,df);case"textInput":return e=t.data,e===df&&hf?null:e;default:return null}}function Y4(e,t){if(dr)return e==="compositionend"||!oh&&rg(e,t)?(e=ng(),mo=rh=Wn=null,dr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return sg&&t.locale!=="ko"?null:t.data;default:return null}}var Z4={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Z4[e.type]:t==="textarea"}function ag(e,t,n,s){Mm(s),t=$o(t,"onChange"),0<t.length&&(n=new ih("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var Ci=null,qi=null;function X4(e){yg(e,0)}function Nl(e){var t=fr(e);if(Rm(t))return e}function J4(e,t){if(e==="change")return t}var og=!1;if(Sn){var pc;if(Sn){var fc="oninput"in document;if(!fc){var ff=document.createElement("div");ff.setAttribute("oninput","return;"),fc=typeof ff.oninput=="function"}pc=fc}else pc=!1;og=pc&&(!document.documentMode||9<document.documentMode)}function mf(){Ci&&(Ci.detachEvent("onpropertychange",lg),qi=Ci=null)}function lg(e){if(e.propertyName==="value"&&Nl(qi)){var t=[];ag(t,qi,e,Jd(e)),Bm(X4,t)}}function ev(e,t,n){e==="focusin"?(mf(),Ci=t,qi=n,Ci.attachEvent("onpropertychange",lg)):e==="focusout"&&mf()}function tv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nl(qi)}function nv(e,t){if(e==="click")return Nl(t)}function sv(e,t){if(e==="input"||e==="change")return Nl(t)}function rv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:rv;function Wi(e,t){if(Xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var i=n[s];if(!hu.call(t,i)||!Xt(e[i],t[i]))return!1}return!0}function gf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yf(e,t){var n=gf(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gf(n)}}function cg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ug(){for(var e=window,t=Lo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lo(e.document)}return t}function lh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function iv(e){var t=ug(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cg(n.ownerDocument.documentElement,n)){if(s!==null&&lh(n)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(s.start,i);s=s.end===void 0?a:Math.min(s.end,i),!e.extend&&a>s&&(i=s,s=a,a=i),i=yf(n,a);var o=yf(n,s);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>s?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var av=Sn&&"documentMode"in document&&11>=document.documentMode,hr=null,Au=null,Ei=null,Lu=!1;function xf(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lu||hr==null||hr!==Lo(s)||(s=hr,"selectionStart"in s&&lh(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ei&&Wi(Ei,s)||(Ei=s,s=$o(Au,"onSelect"),0<s.length&&(t=new ih("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=hr)))}function Da(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pr={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionend:Da("Transition","TransitionEnd")},mc={},dg={};Sn&&(dg=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);function Cl(e){if(mc[e])return mc[e];if(!pr[e])return e;var t=pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in dg)return mc[e]=t[n];return e}var hg=Cl("animationend"),pg=Cl("animationiteration"),fg=Cl("animationstart"),mg=Cl("transitionend"),gg=new Map,vf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fs(e,t){gg.set(e,t),Vs(t,[e])}for(var gc=0;gc<vf.length;gc++){var yc=vf[gc],ov=yc.toLowerCase(),lv=yc[0].toUpperCase()+yc.slice(1);fs(ov,"on"+lv)}fs(hg,"onAnimationEnd");fs(pg,"onAnimationIteration");fs(fg,"onAnimationStart");fs("dblclick","onDoubleClick");fs("focusin","onFocus");fs("focusout","onBlur");fs(mg,"onTransitionEnd");Pr("onMouseEnter",["mouseout","mouseover"]);Pr("onMouseLeave",["mouseout","mouseover"]);Pr("onPointerEnter",["pointerout","pointerover"]);Pr("onPointerLeave",["pointerout","pointerover"]);Vs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ki="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),cv=new Set("cancel close invalid load scroll toggle".split(" ").concat(ki));function kf(e,t,n){var s=e.type||"unknown-event";e.currentTarget=n,o4(s,t,void 0,e),e.currentTarget=null}function yg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],i=s.event;s=s.listeners;e:{var a=void 0;if(t)for(var o=s.length-1;0<=o;o--){var l=s[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&i.isPropagationStopped())break e;kf(i,l,u),a=c}else for(o=0;o<s.length;o++){if(l=s[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&i.isPropagationStopped())break e;kf(i,l,u),a=c}}}if(_o)throw e=Eu,_o=!1,Eu=null,e}function xe(e,t){var n=t[Mu];n===void 0&&(n=t[Mu]=new Set);var s=e+"__bubble";n.has(s)||(xg(t,e,2,!1),n.add(s))}function xc(e,t,n){var s=0;t&&(s|=4),xg(n,e,s,t)}var Ba="_reactListening"+Math.random().toString(36).slice(2);function Hi(e){if(!e[Ba]){e[Ba]=!0,Nm.forEach(function(n){n!=="selectionchange"&&(cv.has(n)||xc(n,!1,e),xc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ba]||(t[Ba]=!0,xc("selectionchange",!1,t))}}function xg(e,t,n,s){switch(tg(t)){case 1:var i=j4;break;case 4:i=S4;break;default:i=sh}n=i.bind(null,t,n,e),i=void 0,!Cu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),s?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function vc(e,t,n,s,i){var a=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var o=s.tag;if(o===3||o===4){var l=s.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=s.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Ns(l),o===null)return;if(c=o.tag,c===5||c===6){s=a=o;continue e}l=l.parentNode}}s=s.return}Bm(function(){var u=a,h=Jd(n),d=[];e:{var f=gg.get(e);if(f!==void 0){var p=ih,m=e;switch(e){case"keypress":if(go(n)===0)break e;case"keydown":case"keyup":p=$4;break;case"focusin":m="focus",p=hc;break;case"focusout":m="blur",p=hc;break;case"beforeblur":case"afterblur":p=hc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=lf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=E4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=U4;break;case hg:case pg:case fg:p=R4;break;case mg:p=W4;break;case"scroll":p=N4;break;case"wheel":p=V4;break;case"copy":case"cut":case"paste":p=L4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=uf}var g=(t&4)!==0,v=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var x=u,k;x!==null;){k=x;var b=k.stateNode;if(k.tag===5&&b!==null&&(k=b,y!==null&&(b=$i(x,y),b!=null&&g.push(Vi(x,b,k)))),v)break;x=x.return}0<g.length&&(f=new p(f,m,null,n,h),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Su&&(m=n.relatedTarget||n.fromElement)&&(Ns(m)||m[Nn]))break e;if((p||f)&&(f=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?Ns(m):null,m!==null&&(v=Ks(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=lf,b="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=uf,b="onPointerLeave",y="onPointerEnter",x="pointer"),v=p==null?f:fr(p),k=m==null?f:fr(m),f=new g(b,x+"leave",p,n,h),f.target=v,f.relatedTarget=k,b=null,Ns(h)===u&&(g=new g(y,x+"enter",m,n,h),g.target=k,g.relatedTarget=v,b=g),v=b,p&&m)t:{for(g=p,y=m,x=0,k=g;k;k=nr(k))x++;for(k=0,b=y;b;b=nr(b))k++;for(;0<x-k;)g=nr(g),x--;for(;0<k-x;)y=nr(y),k--;for(;x--;){if(g===y||y!==null&&g===y.alternate)break t;g=nr(g),y=nr(y)}g=null}else g=null;p!==null&&wf(d,f,p,g,!1),m!==null&&v!==null&&wf(d,v,m,g,!0)}}e:{if(f=u?fr(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=J4;else if(pf(f))if(og)T=sv;else{T=tv;var w=ev}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=nv);if(T&&(T=T(e,u))){ag(d,T,n,h);break e}w&&w(e,f,u),e==="focusout"&&(w=f._wrapperState)&&w.controlled&&f.type==="number"&&vu(f,"number",f.value)}switch(w=u?fr(u):window,e){case"focusin":(pf(w)||w.contentEditable==="true")&&(hr=w,Au=u,Ei=null);break;case"focusout":Ei=Au=hr=null;break;case"mousedown":Lu=!0;break;case"contextmenu":case"mouseup":case"dragend":Lu=!1,xf(d,n,h);break;case"selectionchange":if(av)break;case"keydown":case"keyup":xf(d,n,h)}var E;if(oh)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else dr?rg(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(sg&&n.locale!=="ko"&&(dr||S!=="onCompositionStart"?S==="onCompositionEnd"&&dr&&(E=ng()):(Wn=h,rh="value"in Wn?Wn.value:Wn.textContent,dr=!0)),w=$o(u,S),0<w.length&&(S=new cf(S,e,null,n,h),d.push({event:S,listeners:w}),E?S.data=E:(E=ig(n),E!==null&&(S.data=E)))),(E=Q4?G4(e,n):Y4(e,n))&&(u=$o(u,"onBeforeInput"),0<u.length&&(h=new cf("onBeforeInput","beforeinput",null,n,h),d.push({event:h,listeners:u}),h.data=E))}yg(d,t)})}function Vi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $o(e,t){for(var n=t+"Capture",s=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=$i(e,n),a!=null&&s.unshift(Vi(e,a,i)),a=$i(e,t),a!=null&&s.push(Vi(e,a,i))),e=e.return}return s}function nr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wf(e,t,n,s,i){for(var a=t._reactName,o=[];n!==null&&n!==s;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===s)break;l.tag===5&&u!==null&&(l=u,i?(c=$i(n,a),c!=null&&o.unshift(Vi(n,c,l))):i||(c=$i(n,a),c!=null&&o.push(Vi(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var uv=/\r\n?/g,dv=/\u0000|\uFFFD/g;function bf(e){return(typeof e=="string"?e:""+e).replace(uv,`
|
|
38
|
-
`).replace(dv,"")}function Ua(e,t,n){if(t=bf(t),bf(e)!==t&&n)throw Error(M(425))}function Do(){}var Iu=null,_u=null;function zu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Fu=typeof setTimeout=="function"?setTimeout:void 0,hv=typeof clearTimeout=="function"?clearTimeout:void 0,jf=typeof Promise=="function"?Promise:void 0,pv=typeof queueMicrotask=="function"?queueMicrotask:typeof jf<"u"?function(e){return jf.resolve(null).then(e).catch(fv)}:Fu;function fv(e){setTimeout(function(){throw e})}function kc(e,t){var n=t,s=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(s===0){e.removeChild(i),Ui(t);return}s--}else n!=="$"&&n!=="$?"&&n!=="$!"||s++;n=i}while(n);Ui(t)}function ts(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Sf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Wr=Math.random().toString(36).slice(2),an="__reactFiber$"+Wr,Ki="__reactProps$"+Wr,Nn="__reactContainer$"+Wr,Mu="__reactEvents$"+Wr,mv="__reactListeners$"+Wr,gv="__reactHandles$"+Wr;function Ns(e){var t=e[an];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nn]||n[an]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sf(e);e!==null;){if(n=e[an])return n;e=Sf(e)}return t}e=n,n=e.parentNode}return null}function ga(e){return e=e[an]||e[Nn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(M(33))}function El(e){return e[Ki]||null}var Ou=[],mr=-1;function ms(e){return{current:e}}function ve(e){0>mr||(e.current=Ou[mr],Ou[mr]=null,mr--)}function ye(e,t){mr++,Ou[mr]=e.current,e.current=t}var ds={},Ye=ms(ds),ut=ms(!1),Ms=ds;function Rr(e,t){var n=e.type.contextTypes;if(!n)return ds;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function dt(e){return e=e.childContextTypes,e!=null}function Bo(){ve(ut),ve(Ye)}function Nf(e,t,n){if(Ye.current!==ds)throw Error(M(168));ye(Ye,t),ye(ut,n)}function vg(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var i in s)if(!(i in t))throw Error(M(108,e4(e)||"Unknown",i));return Ne({},n,s)}function Uo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ds,Ms=Ye.current,ye(Ye,e),ye(ut,ut.current),!0}function Cf(e,t,n){var s=e.stateNode;if(!s)throw Error(M(169));n?(e=vg(e,t,Ms),s.__reactInternalMemoizedMergedChildContext=e,ve(ut),ve(Ye),ye(Ye,e)):ve(ut),ye(ut,n)}var yn=null,Tl=!1,wc=!1;function kg(e){yn===null?yn=[e]:yn.push(e)}function yv(e){Tl=!0,kg(e)}function gs(){if(!wc&&yn!==null){wc=!0;var e=0,t=ue;try{var n=yn;for(ue=1;e<n.length;e++){var s=n[e];do s=s(!0);while(s!==null)}yn=null,Tl=!1}catch(i){throw yn!==null&&(yn=yn.slice(e+1)),Hm(eh,gs),i}finally{ue=t,wc=!1}}return null}var gr=[],yr=0,qo=null,Wo=0,Lt=[],It=0,Os=null,vn=1,kn="";function bs(e,t){gr[yr++]=Wo,gr[yr++]=qo,qo=e,Wo=t}function wg(e,t,n){Lt[It++]=vn,Lt[It++]=kn,Lt[It++]=Os,Os=e;var s=vn;e=kn;var i=32-Qt(s)-1;s&=~(1<<i),n+=1;var a=32-Qt(t)+i;if(30<a){var o=i-i%5;a=(s&(1<<o)-1).toString(32),s>>=o,i-=o,vn=1<<32-Qt(t)+i|n<<i|s,kn=a+e}else vn=1<<a|n<<i|s,kn=e}function ch(e){e.return!==null&&(bs(e,1),wg(e,1,0))}function uh(e){for(;e===qo;)qo=gr[--yr],gr[yr]=null,Wo=gr[--yr],gr[yr]=null;for(;e===Os;)Os=Lt[--It],Lt[It]=null,kn=Lt[--It],Lt[It]=null,vn=Lt[--It],Lt[It]=null}var jt=null,wt=null,be=!1,Vt=null;function bg(e,t){var n=zt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ef(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,jt=e,wt=ts(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,jt=e,wt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Os!==null?{id:vn,overflow:kn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=zt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,jt=e,wt=null,!0):!1;default:return!1}}function $u(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Du(e){if(be){var t=wt;if(t){var n=t;if(!Ef(e,t)){if($u(e))throw Error(M(418));t=ts(n.nextSibling);var s=jt;t&&Ef(e,t)?bg(s,n):(e.flags=e.flags&-4097|2,be=!1,jt=e)}}else{if($u(e))throw Error(M(418));e.flags=e.flags&-4097|2,be=!1,jt=e}}}function Tf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;jt=e}function qa(e){if(e!==jt)return!1;if(!be)return Tf(e),be=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!zu(e.type,e.memoizedProps)),t&&(t=wt)){if($u(e))throw jg(),Error(M(418));for(;t;)bg(e,t),t=ts(t.nextSibling)}if(Tf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){wt=ts(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}wt=null}}else wt=jt?ts(e.stateNode.nextSibling):null;return!0}function jg(){for(var e=wt;e;)e=ts(e.nextSibling)}function Ar(){wt=jt=null,be=!1}function dh(e){Vt===null?Vt=[e]:Vt.push(e)}var xv=Rn.ReactCurrentBatchConfig;function oi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(M(309));var s=n.stateNode}if(!s)throw Error(M(147,e));var i=s,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=i.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(M(284));if(!n._owner)throw Error(M(290,e))}return e}function Wa(e,t){throw e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pf(e){var t=e._init;return t(e._payload)}function Sg(e){function t(y,x){if(e){var k=y.deletions;k===null?(y.deletions=[x],y.flags|=16):k.push(x)}}function n(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function s(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function i(y,x){return y=is(y,x),y.index=0,y.sibling=null,y}function a(y,x,k){return y.index=k,e?(k=y.alternate,k!==null?(k=k.index,k<x?(y.flags|=2,x):k):(y.flags|=2,x)):(y.flags|=1048576,x)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,x,k,b){return x===null||x.tag!==6?(x=Tc(k,y.mode,b),x.return=y,x):(x=i(x,k),x.return=y,x)}function c(y,x,k,b){var T=k.type;return T===ur?h(y,x,k.props.children,b,k.key):x!==null&&(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===$n&&Pf(T)===x.type)?(b=i(x,k.props),b.ref=oi(y,x,k),b.return=y,b):(b=jo(k.type,k.key,k.props,null,y.mode,b),b.ref=oi(y,x,k),b.return=y,b)}function u(y,x,k,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==k.containerInfo||x.stateNode.implementation!==k.implementation?(x=Pc(k,y.mode,b),x.return=y,x):(x=i(x,k.children||[]),x.return=y,x)}function h(y,x,k,b,T){return x===null||x.tag!==7?(x=As(k,y.mode,b,T),x.return=y,x):(x=i(x,k),x.return=y,x)}function d(y,x,k){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Tc(""+x,y.mode,k),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ia:return k=jo(x.type,x.key,x.props,null,y.mode,k),k.ref=oi(y,null,x),k.return=y,k;case cr:return x=Pc(x,y.mode,k),x.return=y,x;case $n:var b=x._init;return d(y,b(x._payload),k)}if(xi(x)||ni(x))return x=As(x,y.mode,k,null),x.return=y,x;Wa(y,x)}return null}function f(y,x,k,b){var T=x!==null?x.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return T!==null?null:l(y,x,""+k,b);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Ia:return k.key===T?c(y,x,k,b):null;case cr:return k.key===T?u(y,x,k,b):null;case $n:return T=k._init,f(y,x,T(k._payload),b)}if(xi(k)||ni(k))return T!==null?null:h(y,x,k,b,null);Wa(y,k)}return null}function p(y,x,k,b,T){if(typeof b=="string"&&b!==""||typeof b=="number")return y=y.get(k)||null,l(x,y,""+b,T);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Ia:return y=y.get(b.key===null?k:b.key)||null,c(x,y,b,T);case cr:return y=y.get(b.key===null?k:b.key)||null,u(x,y,b,T);case $n:var w=b._init;return p(y,x,k,w(b._payload),T)}if(xi(b)||ni(b))return y=y.get(k)||null,h(x,y,b,T,null);Wa(x,b)}return null}function m(y,x,k,b){for(var T=null,w=null,E=x,S=x=0,A=null;E!==null&&S<k.length;S++){E.index>S?(A=E,E=null):A=E.sibling;var C=f(y,E,k[S],b);if(C===null){E===null&&(E=A);break}e&&E&&C.alternate===null&&t(y,E),x=a(C,x,S),w===null?T=C:w.sibling=C,w=C,E=A}if(S===k.length)return n(y,E),be&&bs(y,S),T;if(E===null){for(;S<k.length;S++)E=d(y,k[S],b),E!==null&&(x=a(E,x,S),w===null?T=E:w.sibling=E,w=E);return be&&bs(y,S),T}for(E=s(y,E);S<k.length;S++)A=p(E,y,S,k[S],b),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?S:A.key),x=a(A,x,S),w===null?T=A:w.sibling=A,w=A);return e&&E.forEach(function(R){return t(y,R)}),be&&bs(y,S),T}function g(y,x,k,b){var T=ni(k);if(typeof T!="function")throw Error(M(150));if(k=T.call(k),k==null)throw Error(M(151));for(var w=T=null,E=x,S=x=0,A=null,C=k.next();E!==null&&!C.done;S++,C=k.next()){E.index>S?(A=E,E=null):A=E.sibling;var R=f(y,E,C.value,b);if(R===null){E===null&&(E=A);break}e&&E&&R.alternate===null&&t(y,E),x=a(R,x,S),w===null?T=R:w.sibling=R,w=R,E=A}if(C.done)return n(y,E),be&&bs(y,S),T;if(E===null){for(;!C.done;S++,C=k.next())C=d(y,C.value,b),C!==null&&(x=a(C,x,S),w===null?T=C:w.sibling=C,w=C);return be&&bs(y,S),T}for(E=s(y,E);!C.done;S++,C=k.next())C=p(E,y,S,C.value,b),C!==null&&(e&&C.alternate!==null&&E.delete(C.key===null?S:C.key),x=a(C,x,S),w===null?T=C:w.sibling=C,w=C);return e&&E.forEach(function(L){return t(y,L)}),be&&bs(y,S),T}function v(y,x,k,b){if(typeof k=="object"&&k!==null&&k.type===ur&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Ia:e:{for(var T=k.key,w=x;w!==null;){if(w.key===T){if(T=k.type,T===ur){if(w.tag===7){n(y,w.sibling),x=i(w,k.props.children),x.return=y,y=x;break e}}else if(w.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===$n&&Pf(T)===w.type){n(y,w.sibling),x=i(w,k.props),x.ref=oi(y,w,k),x.return=y,y=x;break e}n(y,w);break}else t(y,w);w=w.sibling}k.type===ur?(x=As(k.props.children,y.mode,b,k.key),x.return=y,y=x):(b=jo(k.type,k.key,k.props,null,y.mode,b),b.ref=oi(y,x,k),b.return=y,y=b)}return o(y);case cr:e:{for(w=k.key;x!==null;){if(x.key===w)if(x.tag===4&&x.stateNode.containerInfo===k.containerInfo&&x.stateNode.implementation===k.implementation){n(y,x.sibling),x=i(x,k.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else t(y,x);x=x.sibling}x=Pc(k,y.mode,b),x.return=y,y=x}return o(y);case $n:return w=k._init,v(y,x,w(k._payload),b)}if(xi(k))return m(y,x,k,b);if(ni(k))return g(y,x,k,b);Wa(y,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,x!==null&&x.tag===6?(n(y,x.sibling),x=i(x,k),x.return=y,y=x):(n(y,x),x=Tc(k,y.mode,b),x.return=y,y=x),o(y)):n(y,x)}return v}var Lr=Sg(!0),Ng=Sg(!1),Ho=ms(null),Vo=null,xr=null,hh=null;function ph(){hh=xr=Vo=null}function fh(e){var t=Ho.current;ve(Ho),e._currentValue=t}function Bu(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function Nr(e,t){Vo=e,hh=xr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(lt=!0),e.firstContext=null)}function Mt(e){var t=e._currentValue;if(hh!==e)if(e={context:e,memoizedValue:t,next:null},xr===null){if(Vo===null)throw Error(M(308));xr=e,Vo.dependencies={lanes:0,firstContext:e}}else xr=xr.next=e;return t}var Cs=null;function mh(e){Cs===null?Cs=[e]:Cs.push(e)}function Cg(e,t,n,s){var i=t.interleaved;return i===null?(n.next=n,mh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Cn(e,s)}function Cn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dn=!1;function gh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Eg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function bn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ns(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,ce&2){var i=s.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),s.pending=t,Cn(e,n)}return i=s.interleaved,i===null?(t.next=t,mh(s)):(t.next=i.next,i.next=t),s.interleaved=t,Cn(e,n)}function yo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,th(e,n)}}function Rf(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:s.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ko(e,t,n,s){var i=e.updateQueue;Dn=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==o&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,h=u=c=null,l=a;do{var f=l.lane,p=l.eventTime;if((s&f)===f){h!==null&&(h=h.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,g=l;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=Ne({},d,f);break e;case 2:Dn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=p,c=d):h=h.next=p,o|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(h===null&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ds|=o,e.lanes=o,e.memoizedState=d}}function Af(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],i=s.callback;if(i!==null){if(s.callback=null,s=n,typeof i!="function")throw Error(M(191,i));i.call(s)}}}var ya={},cn=ms(ya),Qi=ms(ya),Gi=ms(ya);function Es(e){if(e===ya)throw Error(M(174));return e}function yh(e,t){switch(ye(Gi,t),ye(Qi,e),ye(cn,ya),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:wu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=wu(t,e)}ve(cn),ye(cn,t)}function Ir(){ve(cn),ve(Qi),ve(Gi)}function Tg(e){Es(Gi.current);var t=Es(cn.current),n=wu(t,e.type);t!==n&&(ye(Qi,e),ye(cn,n))}function xh(e){Qi.current===e&&(ve(cn),ve(Qi))}var je=ms(0);function Qo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bc=[];function vh(){for(var e=0;e<bc.length;e++)bc[e]._workInProgressVersionPrimary=null;bc.length=0}var xo=Rn.ReactCurrentDispatcher,jc=Rn.ReactCurrentBatchConfig,$s=0,Se=null,ze=null,$e=null,Go=!1,Ti=!1,Yi=0,vv=0;function He(){throw Error(M(321))}function kh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xt(e[n],t[n]))return!1;return!0}function wh(e,t,n,s,i,a){if($s=a,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xo.current=e===null||e.memoizedState===null?jv:Sv,e=n(s,i),Ti){a=0;do{if(Ti=!1,Yi=0,25<=a)throw Error(M(301));a+=1,$e=ze=null,t.updateQueue=null,xo.current=Nv,e=n(s,i)}while(Ti)}if(xo.current=Yo,t=ze!==null&&ze.next!==null,$s=0,$e=ze=Se=null,Go=!1,t)throw Error(M(300));return e}function bh(){var e=Yi!==0;return Yi=0,e}function nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?Se.memoizedState=$e=e:$e=$e.next=e,$e}function Ot(){if(ze===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=$e===null?Se.memoizedState:$e.next;if(t!==null)$e=t,ze=e;else{if(e===null)throw Error(M(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},$e===null?Se.memoizedState=$e=e:$e=$e.next=e}return $e}function Zi(e,t){return typeof t=="function"?t(e):t}function Sc(e){var t=Ot(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var s=ze,i=s.baseQueue,a=n.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}s.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,s=s.baseState;var l=o=null,c=null,u=a;do{var h=u.lane;if(($s&h)===h)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),s=u.hasEagerState?u.eagerState:e(s,u.action);else{var d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=d,o=s):c=c.next=d,Se.lanes|=h,Ds|=h}u=u.next}while(u!==null&&u!==a);c===null?o=s:c.next=l,Xt(s,t.memoizedState)||(lt=!0),t.memoizedState=s,t.baseState=o,t.baseQueue=c,n.lastRenderedState=s}if(e=n.interleaved,e!==null){i=e;do a=i.lane,Se.lanes|=a,Ds|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nc(e){var t=Ot(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var s=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Xt(a,t.memoizedState)||(lt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,s]}function Pg(){}function Rg(e,t){var n=Se,s=Ot(),i=t(),a=!Xt(s.memoizedState,i);if(a&&(s.memoizedState=i,lt=!0),s=s.queue,jh(Ig.bind(null,n,s,e),[e]),s.getSnapshot!==t||a||$e!==null&&$e.memoizedState.tag&1){if(n.flags|=2048,Xi(9,Lg.bind(null,n,s,i,t),void 0,null),De===null)throw Error(M(349));$s&30||Ag(n,t,i)}return i}function Ag(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lg(e,t,n,s){t.value=n,t.getSnapshot=s,_g(t)&&zg(e)}function Ig(e,t,n){return n(function(){_g(t)&&zg(e)})}function _g(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xt(e,n)}catch{return!0}}function zg(e){var t=Cn(e,1);t!==null&&Gt(t,e,1,-1)}function Lf(e){var t=nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zi,lastRenderedState:e},t.queue=e,e=e.dispatch=bv.bind(null,Se,e),[t.memoizedState,e]}function Xi(e,t,n,s){return e={tag:e,create:t,destroy:n,deps:s,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e)),e}function Fg(){return Ot().memoizedState}function vo(e,t,n,s){var i=nn();Se.flags|=e,i.memoizedState=Xi(1|t,n,void 0,s===void 0?null:s)}function Pl(e,t,n,s){var i=Ot();s=s===void 0?null:s;var a=void 0;if(ze!==null){var o=ze.memoizedState;if(a=o.destroy,s!==null&&kh(s,o.deps)){i.memoizedState=Xi(t,n,a,s);return}}Se.flags|=e,i.memoizedState=Xi(1|t,n,a,s)}function If(e,t){return vo(8390656,8,e,t)}function jh(e,t){return Pl(2048,8,e,t)}function Mg(e,t){return Pl(4,2,e,t)}function Og(e,t){return Pl(4,4,e,t)}function $g(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Dg(e,t,n){return n=n!=null?n.concat([e]):null,Pl(4,4,$g.bind(null,t,e),n)}function Sh(){}function Bg(e,t){var n=Ot();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&kh(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function Ug(e,t){var n=Ot();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&kh(t,s[1])?s[0]:(e=e(),n.memoizedState=[e,t],e)}function qg(e,t,n){return $s&21?(Xt(n,t)||(n=Qm(),Se.lanes|=n,Ds|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=n)}function kv(e,t){var n=ue;ue=n!==0&&4>n?n:4,e(!0);var s=jc.transition;jc.transition={};try{e(!1),t()}finally{ue=n,jc.transition=s}}function Wg(){return Ot().memoizedState}function wv(e,t,n){var s=rs(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},Hg(e))Vg(t,n);else if(n=Cg(e,t,n,s),n!==null){var i=nt();Gt(n,e,s,i),Kg(n,t,s)}}function bv(e,t,n){var s=rs(e),i={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hg(e))Vg(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,n);if(i.hasEagerState=!0,i.eagerState=l,Xt(l,o)){var c=t.interleaved;c===null?(i.next=i,mh(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Cg(e,t,i,s),n!==null&&(i=nt(),Gt(n,e,s,i),Kg(n,t,s))}}function Hg(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Vg(e,t){Ti=Go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Kg(e,t,n){if(n&4194240){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,th(e,n)}}var Yo={readContext:Mt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},jv={readContext:Mt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:If,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vo(4194308,4,$g.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vo(4194308,4,e,t)},useInsertionEffect:function(e,t){return vo(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var s=nn();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=wv.bind(null,Se,e),[s.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Lf,useDebugValue:Sh,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Lf(!1),t=e[0];return e=kv.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var s=Se,i=nn();if(be){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),De===null)throw Error(M(349));$s&30||Ag(s,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,If(Ig.bind(null,s,a,e),[e]),s.flags|=2048,Xi(9,Lg.bind(null,s,a,n,t),void 0,null),n},useId:function(){var e=nn(),t=De.identifierPrefix;if(be){var n=kn,s=vn;n=(s&~(1<<32-Qt(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=vv++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Sv={readContext:Mt,useCallback:Bg,useContext:Mt,useEffect:jh,useImperativeHandle:Dg,useInsertionEffect:Mg,useLayoutEffect:Og,useMemo:Ug,useReducer:Sc,useRef:Fg,useState:function(){return Sc(Zi)},useDebugValue:Sh,useDeferredValue:function(e){var t=Ot();return qg(t,ze.memoizedState,e)},useTransition:function(){var e=Sc(Zi)[0],t=Ot().memoizedState;return[e,t]},useMutableSource:Pg,useSyncExternalStore:Rg,useId:Wg,unstable_isNewReconciler:!1},Nv={readContext:Mt,useCallback:Bg,useContext:Mt,useEffect:jh,useImperativeHandle:Dg,useInsertionEffect:Mg,useLayoutEffect:Og,useMemo:Ug,useReducer:Nc,useRef:Fg,useState:function(){return Nc(Zi)},useDebugValue:Sh,useDeferredValue:function(e){var t=Ot();return ze===null?t.memoizedState=e:qg(t,ze.memoizedState,e)},useTransition:function(){var e=Nc(Zi)[0],t=Ot().memoizedState;return[e,t]},useMutableSource:Pg,useSyncExternalStore:Rg,useId:Wg,unstable_isNewReconciler:!1};function Wt(e,t){if(e&&e.defaultProps){t=Ne({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Uu(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:Ne({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rl={isMounted:function(e){return(e=e._reactInternals)?Ks(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var s=nt(),i=rs(e),a=bn(s,i);a.payload=t,n!=null&&(a.callback=n),t=ns(e,a,i),t!==null&&(Gt(t,e,i,s),yo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=nt(),i=rs(e),a=bn(s,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ns(e,a,i),t!==null&&(Gt(t,e,i,s),yo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nt(),s=rs(e),i=bn(n,s);i.tag=2,t!=null&&(i.callback=t),t=ns(e,i,s),t!==null&&(Gt(t,e,s,n),yo(t,e,s))}};function _f(e,t,n,s,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,a,o):t.prototype&&t.prototype.isPureReactComponent?!Wi(n,s)||!Wi(i,a):!0}function Qg(e,t,n){var s=!1,i=ds,a=t.contextType;return typeof a=="object"&&a!==null?a=Mt(a):(i=dt(t)?Ms:Ye.current,s=t.contextTypes,a=(s=s!=null)?Rr(e,i):ds),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Rl,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function zf(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&Rl.enqueueReplaceState(t,t.state,null)}function qu(e,t,n,s){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},gh(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Mt(a):(a=dt(t)?Ms:Ye.current,i.context=Rr(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Uu(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Rl.enqueueReplaceState(i,i.state,null),Ko(e,n,i,s),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function _r(e,t){try{var n="",s=t;do n+=J3(s),s=s.return;while(s);var i=n}catch(a){i=`
|
|
39
|
-
Error generating stack: `+a.message+`
|
|
40
|
-
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function Cc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Cv=typeof WeakMap=="function"?WeakMap:Map;function Gg(e,t,n){n=bn(-1,n),n.tag=3,n.payload={element:null};var s=t.value;return n.callback=function(){Xo||(Xo=!0,ed=s),Wu(e,t)},n}function Yg(e,t,n){n=bn(-1,n),n.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var i=t.value;n.payload=function(){return s(i)},n.callback=function(){Wu(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Wu(e,t),typeof s!="function"&&(ss===null?ss=new Set([this]):ss.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Ff(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new Cv;var i=new Set;s.set(t,i)}else i=s.get(t),i===void 0&&(i=new Set,s.set(t,i));i.has(n)||(i.add(n),e=Dv.bind(null,e,t,n),t.then(e,e))}function Mf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Of(e,t,n,s,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=bn(-1,1),t.tag=2,ns(n,t,1))),n.lanes|=1),e)}var Ev=Rn.ReactCurrentOwner,lt=!1;function Je(e,t,n,s){t.child=e===null?Ng(t,null,n,s):Lr(t,e.child,n,s)}function $f(e,t,n,s,i){n=n.render;var a=t.ref;return Nr(t,i),s=wh(e,t,n,s,a,i),n=bh(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,En(e,t,i)):(be&&n&&ch(t),t.flags|=1,Je(e,t,s,i),t.child)}function Df(e,t,n,s,i){if(e===null){var a=n.type;return typeof a=="function"&&!Lh(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Zg(e,t,a,s,i)):(e=jo(n.type,null,s,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:Wi,n(o,s)&&e.ref===t.ref)return En(e,t,i)}return t.flags|=1,e=is(a,s),e.ref=t.ref,e.return=t,t.child=e}function Zg(e,t,n,s,i){if(e!==null){var a=e.memoizedProps;if(Wi(a,s)&&e.ref===t.ref)if(lt=!1,t.pendingProps=s=a,(e.lanes&i)!==0)e.flags&131072&&(lt=!0);else return t.lanes=e.lanes,En(e,t,i)}return Hu(e,t,n,s,i)}function Xg(e,t,n){var s=t.pendingProps,i=s.children,a=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(kr,vt),vt|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ye(kr,vt),vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=a!==null?a.baseLanes:n,ye(kr,vt),vt|=s}else a!==null?(s=a.baseLanes|n,t.memoizedState=null):s=n,ye(kr,vt),vt|=s;return Je(e,t,i,n),t.child}function Jg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Hu(e,t,n,s,i){var a=dt(n)?Ms:Ye.current;return a=Rr(t,a),Nr(t,i),n=wh(e,t,n,s,a,i),s=bh(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,En(e,t,i)):(be&&s&&ch(t),t.flags|=1,Je(e,t,n,i),t.child)}function Bf(e,t,n,s,i){if(dt(n)){var a=!0;Uo(t)}else a=!1;if(Nr(t,i),t.stateNode===null)ko(e,t),Qg(t,n,s),qu(t,n,s,i),s=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Mt(u):(u=dt(n)?Ms:Ye.current,u=Rr(t,u));var h=n.getDerivedStateFromProps,d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==s||c!==u)&&zf(t,o,s,u),Dn=!1;var f=t.memoizedState;o.state=f,Ko(t,s,o,i),c=t.memoizedState,l!==s||f!==c||ut.current||Dn?(typeof h=="function"&&(Uu(t,n,h,s),c=t.memoizedState),(l=Dn||_f(t,n,l,s,f,c,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=c),o.props=s,o.state=c,o.context=u,s=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{o=t.stateNode,Eg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Wt(t.type,l),o.props=u,d=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Mt(c):(c=dt(n)?Ms:Ye.current,c=Rr(t,c));var p=n.getDerivedStateFromProps;(h=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||f!==c)&&zf(t,o,s,c),Dn=!1,f=t.memoizedState,o.state=f,Ko(t,s,o,i);var m=t.memoizedState;l!==d||f!==m||ut.current||Dn?(typeof p=="function"&&(Uu(t,n,p,s),m=t.memoizedState),(u=Dn||_f(t,n,u,s,f,m,c)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(s,m,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(s,m,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=m),o.props=s,o.state=m,o.context=c,s=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),s=!1)}return Vu(e,t,n,s,a,i)}function Vu(e,t,n,s,i,a){Jg(e,t);var o=(t.flags&128)!==0;if(!s&&!o)return i&&Cf(t,n,!1),En(e,t,a);s=t.stateNode,Ev.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&o?(t.child=Lr(t,e.child,null,a),t.child=Lr(t,null,l,a)):Je(e,t,l,a),t.memoizedState=s.state,i&&Cf(t,n,!0),t.child}function e2(e){var t=e.stateNode;t.pendingContext?Nf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Nf(e,t.context,!1),yh(e,t.containerInfo)}function Uf(e,t,n,s,i){return Ar(),dh(i),t.flags|=256,Je(e,t,n,s),t.child}var Ku={dehydrated:null,treeContext:null,retryLane:0};function Qu(e){return{baseLanes:e,cachePool:null,transitions:null}}function t2(e,t,n){var s=t.pendingProps,i=je.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ye(je,i&1),e===null)return Du(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=s.children,e=s.fallback,a?(s=t.mode,a=t.child,o={mode:"hidden",children:o},!(s&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Il(o,s,0,null),e=As(e,s,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Qu(n),t.memoizedState=Ku,e):Nh(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Tv(e,t,o,s,l,i,n);if(a){a=s.fallback,o=t.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:s.children};return!(o&1)&&t.child!==i?(s=t.child,s.childLanes=0,s.pendingProps=c,t.deletions=null):(s=is(i,c),s.subtreeFlags=i.subtreeFlags&14680064),l!==null?a=is(l,a):(a=As(a,o,n,null),a.flags|=2),a.return=t,s.return=t,s.sibling=a,t.child=s,s=a,a=t.child,o=e.child.memoizedState,o=o===null?Qu(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Ku,s}return a=e.child,e=a.sibling,s=is(a,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=n),s.return=t,s.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}function Nh(e,t){return t=Il({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ha(e,t,n,s){return s!==null&&dh(s),Lr(t,e.child,null,n),e=Nh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tv(e,t,n,s,i,a,o){if(n)return t.flags&256?(t.flags&=-257,s=Cc(Error(M(422))),Ha(e,t,o,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=s.fallback,i=t.mode,s=Il({mode:"visible",children:s.children},i,0,null),a=As(a,i,o,null),a.flags|=2,s.return=t,a.return=t,s.sibling=a,t.child=s,t.mode&1&&Lr(t,e.child,null,o),t.child.memoizedState=Qu(o),t.memoizedState=Ku,a);if(!(t.mode&1))return Ha(e,t,o,null);if(i.data==="$!"){if(s=i.nextSibling&&i.nextSibling.dataset,s)var l=s.dgst;return s=l,a=Error(M(419)),s=Cc(a,s,void 0),Ha(e,t,o,s)}if(l=(o&e.childLanes)!==0,lt||l){if(s=De,s!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(s.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Cn(e,i),Gt(s,e,i,-1))}return Ah(),s=Cc(Error(M(421))),Ha(e,t,o,s)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Bv.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,wt=ts(i.nextSibling),jt=t,be=!0,Vt=null,e!==null&&(Lt[It++]=vn,Lt[It++]=kn,Lt[It++]=Os,vn=e.id,kn=e.overflow,Os=t),t=Nh(t,s.children),t.flags|=4096,t)}function qf(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Bu(e.return,t,n)}function Ec(e,t,n,s,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=s,a.tail=n,a.tailMode=i)}function n2(e,t,n){var s=t.pendingProps,i=s.revealOrder,a=s.tail;if(Je(e,t,s.children,n),s=je.current,s&2)s=s&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qf(e,n,t);else if(e.tag===19)qf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(ye(je,s),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Qo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ec(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ec(t,!0,n,null,a);break;case"together":Ec(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ko(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function En(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ds|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=is(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=is(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pv(e,t,n){switch(t.tag){case 3:e2(t),Ar();break;case 5:Tg(t);break;case 1:dt(t.type)&&Uo(t);break;case 4:yh(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,i=t.memoizedProps.value;ye(Ho,s._currentValue),s._currentValue=i;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(ye(je,je.current&1),t.flags|=128,null):n&t.child.childLanes?t2(e,t,n):(ye(je,je.current&1),e=En(e,t,n),e!==null?e.sibling:null);ye(je,je.current&1);break;case 19:if(s=(n&t.childLanes)!==0,e.flags&128){if(s)return n2(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ye(je,je.current),s)break;return null;case 22:case 23:return t.lanes=0,Xg(e,t,n)}return En(e,t,n)}var s2,Gu,r2,i2;s2=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Gu=function(){};r2=function(e,t,n,s){var i=e.memoizedProps;if(i!==s){e=t.stateNode,Es(cn.current);var a=null;switch(n){case"input":i=yu(e,i),s=yu(e,s),a=[];break;case"select":i=Ne({},i,{value:void 0}),s=Ne({},s,{value:void 0}),a=[];break;case"textarea":i=ku(e,i),s=ku(e,s),a=[];break;default:typeof i.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=Do)}bu(n,s);var o;n=null;for(u in i)if(!s.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Mi.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in s){var c=s[u];if(l=i?.[u],s.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Mi.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&xe("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};i2=function(e,t,n,s){n!==s&&(t.flags|=4)};function li(e,t){if(!be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,s|=i.subtreeFlags&14680064,s|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,s|=i.subtreeFlags,s|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function Rv(e,t,n){var s=t.pendingProps;switch(uh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return dt(t.type)&&Bo(),Ve(t),null;case 3:return s=t.stateNode,Ir(),ve(ut),ve(Ye),vh(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(qa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vt!==null&&(sd(Vt),Vt=null))),Gu(e,t),Ve(t),null;case 5:xh(t);var i=Es(Gi.current);if(n=t.type,e!==null&&t.stateNode!=null)r2(e,t,n,s,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(M(166));return Ve(t),null}if(e=Es(cn.current),qa(t)){s=t.stateNode,n=t.type;var a=t.memoizedProps;switch(s[an]=t,s[Ki]=a,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",s),xe("close",s);break;case"iframe":case"object":case"embed":xe("load",s);break;case"video":case"audio":for(i=0;i<ki.length;i++)xe(ki[i],s);break;case"source":xe("error",s);break;case"img":case"image":case"link":xe("error",s),xe("load",s);break;case"details":xe("toggle",s);break;case"input":Zp(s,a),xe("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!a.multiple},xe("invalid",s);break;case"textarea":Jp(s,a),xe("invalid",s)}bu(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?s.textContent!==l&&(a.suppressHydrationWarning!==!0&&Ua(s.textContent,l,e),i=["children",l]):typeof l=="number"&&s.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Ua(s.textContent,l,e),i=["children",""+l]):Mi.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&xe("scroll",s)}switch(n){case"input":_a(s),Xp(s,a,!0);break;case"textarea":_a(s),ef(s);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(s.onclick=Do)}s=i,t.updateQueue=s,s!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Im(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=o.createElement(n,{is:s.is}):(e=o.createElement(n),n==="select"&&(o=e,s.multiple?o.multiple=!0:s.size&&(o.size=s.size))):e=o.createElementNS(e,n),e[an]=t,e[Ki]=s,s2(e,t,!1,!1),t.stateNode=e;e:{switch(o=ju(n,s),n){case"dialog":xe("cancel",e),xe("close",e),i=s;break;case"iframe":case"object":case"embed":xe("load",e),i=s;break;case"video":case"audio":for(i=0;i<ki.length;i++)xe(ki[i],e);i=s;break;case"source":xe("error",e),i=s;break;case"img":case"image":case"link":xe("error",e),xe("load",e),i=s;break;case"details":xe("toggle",e),i=s;break;case"input":Zp(e,s),i=yu(e,s),xe("invalid",e);break;case"option":i=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},i=Ne({},s,{value:void 0}),xe("invalid",e);break;case"textarea":Jp(e,s),i=ku(e,s),xe("invalid",e);break;default:i=s}bu(n,i),l=i;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?Fm(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&_m(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Oi(e,c):typeof c=="number"&&Oi(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Mi.hasOwnProperty(a)?c!=null&&a==="onScroll"&&xe("scroll",e):c!=null&&Gd(e,a,c,o))}switch(n){case"input":_a(e),Xp(e,s,!1);break;case"textarea":_a(e),ef(e);break;case"option":s.value!=null&&e.setAttribute("value",""+us(s.value));break;case"select":e.multiple=!!s.multiple,a=s.value,a!=null?wr(e,!!s.multiple,a,!1):s.defaultValue!=null&&wr(e,!!s.multiple,s.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Do)}switch(n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ve(t),null;case 6:if(e&&t.stateNode!=null)i2(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(M(166));if(n=Es(Gi.current),Es(cn.current),qa(t)){if(s=t.stateNode,n=t.memoizedProps,s[an]=t,(a=s.nodeValue!==n)&&(e=jt,e!==null))switch(e.tag){case 3:Ua(s.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ua(s.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else s=(n.nodeType===9?n:n.ownerDocument).createTextNode(s),s[an]=t,t.stateNode=s}return Ve(t),null;case 13:if(ve(je),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(be&&wt!==null&&t.mode&1&&!(t.flags&128))jg(),Ar(),t.flags|=98560,a=!1;else if(a=qa(t),s!==null&&s.dehydrated!==null){if(e===null){if(!a)throw Error(M(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(M(317));a[an]=t}else Ar(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ve(t),a=!1}else Vt!==null&&(sd(Vt),Vt=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,t.mode&1&&(e===null||je.current&1?Me===0&&(Me=3):Ah())),t.updateQueue!==null&&(t.flags|=4),Ve(t),null);case 4:return Ir(),Gu(e,t),e===null&&Hi(t.stateNode.containerInfo),Ve(t),null;case 10:return fh(t.type._context),Ve(t),null;case 17:return dt(t.type)&&Bo(),Ve(t),null;case 19:if(ve(je),a=t.memoizedState,a===null)return Ve(t),null;if(s=(t.flags&128)!==0,o=a.rendering,o===null)if(s)li(a,!1);else{if(Me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Qo(e),o!==null){for(t.flags|=128,li(a,!1),s=o.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=n,n=t.child;n!==null;)a=n,e=s,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ye(je,je.current&1|2),t.child}e=e.sibling}a.tail!==null&&Re()>zr&&(t.flags|=128,s=!0,li(a,!1),t.lanes=4194304)}else{if(!s)if(e=Qo(o),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),li(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!be)return Ve(t),null}else 2*Re()-a.renderingStartTime>zr&&n!==1073741824&&(t.flags|=128,s=!0,li(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Re(),t.sibling=null,n=je.current,ye(je,s?n&1|2:n&1),t):(Ve(t),null);case 22:case 23:return Rh(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?vt&1073741824&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function Av(e,t){switch(uh(t),t.tag){case 1:return dt(t.type)&&Bo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ir(),ve(ut),ve(Ye),vh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xh(t),null;case 13:if(ve(je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));Ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(je),null;case 4:return Ir(),null;case 10:return fh(t.type._context),null;case 22:case 23:return Rh(),null;case 24:return null;default:return null}}var Va=!1,Ke=!1,Lv=typeof WeakSet=="function"?WeakSet:Set,H=null;function vr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){Te(e,t,s)}else n.current=null}function Yu(e,t,n){try{n()}catch(s){Te(e,t,s)}}var Wf=!1;function Iv(e,t){if(Iu=Mo,e=ug(),lh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var i=s.anchorOffset,a=s.focusNode;s=s.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=o+i),d!==a||s!==0&&d.nodeType!==3||(c=o+s),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===i&&(l=o),f===a&&++h===s&&(c=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_u={focusedElem:e,selectionRange:n},Mo=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Wt(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(b){Te(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return m=Wf,Wf=!1,m}function Pi(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var i=s=s.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Yu(t,n,a)}i=i.next}while(i!==s)}}function Al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}function Zu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function a2(e){var t=e.alternate;t!==null&&(e.alternate=null,a2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[an],delete t[Ki],delete t[Mu],delete t[mv],delete t[gv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function o2(e){return e.tag===5||e.tag===3||e.tag===4}function Hf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||o2(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xu(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Do));else if(s!==4&&(e=e.child,e!==null))for(Xu(e,t,n),e=e.sibling;e!==null;)Xu(e,t,n),e=e.sibling}function Ju(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Ju(e,t,n),e=e.sibling;e!==null;)Ju(e,t,n),e=e.sibling}var Ue=null,Ht=!1;function Mn(e,t,n){for(n=n.child;n!==null;)l2(e,t,n),n=n.sibling}function l2(e,t,n){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(jl,n)}catch{}switch(n.tag){case 5:Ke||vr(n,t);case 6:var s=Ue,i=Ht;Ue=null,Mn(e,t,n),Ue=s,Ht=i,Ue!==null&&(Ht?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(Ht?(e=Ue,n=n.stateNode,e.nodeType===8?kc(e.parentNode,n):e.nodeType===1&&kc(e,n),Ui(e)):kc(Ue,n.stateNode));break;case 4:s=Ue,i=Ht,Ue=n.stateNode.containerInfo,Ht=!0,Mn(e,t,n),Ue=s,Ht=i;break;case 0:case 11:case 14:case 15:if(!Ke&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){i=s=s.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Yu(n,t,o),i=i.next}while(i!==s)}Mn(e,t,n);break;case 1:if(!Ke&&(vr(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(l){Te(n,t,l)}Mn(e,t,n);break;case 21:Mn(e,t,n);break;case 22:n.mode&1?(Ke=(s=Ke)||n.memoizedState!==null,Mn(e,t,n),Ke=s):Mn(e,t,n);break;default:Mn(e,t,n)}}function Vf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Lv),t.forEach(function(s){var i=Uv.bind(null,e,s);n.has(s)||(n.add(s),s.then(i,i))})}}function qt(e,t){var n=t.deletions;if(n!==null)for(var s=0;s<n.length;s++){var i=n[s];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Ue=l.stateNode,Ht=!1;break e;case 3:Ue=l.stateNode.containerInfo,Ht=!0;break e;case 4:Ue=l.stateNode.containerInfo,Ht=!0;break e}l=l.return}if(Ue===null)throw Error(M(160));l2(a,o,i),Ue=null,Ht=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){Te(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)c2(t,e),t=t.sibling}function c2(e,t){var n=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qt(t,e),tn(e),s&4){try{Pi(3,e,e.return),Al(3,e)}catch(g){Te(e,e.return,g)}try{Pi(5,e,e.return)}catch(g){Te(e,e.return,g)}}break;case 1:qt(t,e),tn(e),s&512&&n!==null&&vr(n,n.return);break;case 5:if(qt(t,e),tn(e),s&512&&n!==null&&vr(n,n.return),e.flags&32){var i=e.stateNode;try{Oi(i,"")}catch(g){Te(e,e.return,g)}}if(s&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&Am(i,a),ju(l,o);var u=ju(l,a);for(o=0;o<c.length;o+=2){var h=c[o],d=c[o+1];h==="style"?Fm(i,d):h==="dangerouslySetInnerHTML"?_m(i,d):h==="children"?Oi(i,d):Gd(i,h,d,u)}switch(l){case"input":xu(i,a);break;case"textarea":Lm(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?wr(i,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?wr(i,!!a.multiple,a.defaultValue,!0):wr(i,!!a.multiple,a.multiple?[]:"",!1))}i[Ki]=a}catch(g){Te(e,e.return,g)}}break;case 6:if(qt(t,e),tn(e),s&4){if(e.stateNode===null)throw Error(M(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){Te(e,e.return,g)}}break;case 3:if(qt(t,e),tn(e),s&4&&n!==null&&n.memoizedState.isDehydrated)try{Ui(t.containerInfo)}catch(g){Te(e,e.return,g)}break;case 4:qt(t,e),tn(e);break;case 13:qt(t,e),tn(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(Th=Re())),s&4&&Vf(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Ke=(u=Ke)||h,qt(t,e),Ke=u):qt(t,e),tn(e),s&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!h&&e.mode&1)for(H=e,h=e.child;h!==null;){for(d=H=h;H!==null;){switch(f=H,p=f.child,f.tag){case 0:case 11:case 14:case 15:Pi(4,f,f.return);break;case 1:vr(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){s=f,n=f.return;try{t=s,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Te(s,n,g)}}break;case 5:vr(f,f.return);break;case 22:if(f.memoizedState!==null){Qf(d);continue}}p!==null?(p.return=f,H=p):Qf(d)}h=h.sibling}e:for(h=null,d=e;;){if(d.tag===5){if(h===null){h=d;try{i=d.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=d.stateNode,c=d.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=zm("display",o))}catch(g){Te(e,e.return,g)}}}else if(d.tag===6){if(h===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){Te(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:qt(t,e),tn(e),s&4&&Vf(e);break;case 21:break;default:qt(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(o2(n)){var s=n;break e}n=n.return}throw Error(M(160))}switch(s.tag){case 5:var i=s.stateNode;s.flags&32&&(Oi(i,""),s.flags&=-33);var a=Hf(e);Ju(e,a,i);break;case 3:case 4:var o=s.stateNode.containerInfo,l=Hf(e);Xu(e,l,o);break;default:throw Error(M(161))}}catch(c){Te(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _v(e,t,n){H=e,u2(e)}function u2(e,t,n){for(var s=(e.mode&1)!==0;H!==null;){var i=H,a=i.child;if(i.tag===22&&s){var o=i.memoizedState!==null||Va;if(!o){var l=i.alternate,c=l!==null&&l.memoizedState!==null||Ke;l=Va;var u=Ke;if(Va=o,(Ke=c)&&!u)for(H=i;H!==null;)o=H,c=o.child,o.tag===22&&o.memoizedState!==null?Gf(i):c!==null?(c.return=o,H=c):Gf(i);for(;a!==null;)H=a,u2(a),a=a.sibling;H=i,Va=l,Ke=u}Kf(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,H=a):Kf(e)}}function Kf(e){for(;H!==null;){var t=H;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ke||Al(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!Ke)if(n===null)s.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Wt(t.type,n.memoizedProps);s.componentDidUpdate(i,n.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Af(t,a,s);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Af(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var h=u.memoizedState;if(h!==null){var d=h.dehydrated;d!==null&&Ui(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(M(163))}Ke||t.flags&512&&Zu(t)}catch(f){Te(t,t.return,f)}}if(t===e){H=null;break}if(n=t.sibling,n!==null){n.return=t.return,H=n;break}H=t.return}}function Qf(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var n=t.sibling;if(n!==null){n.return=t.return,H=n;break}H=t.return}}function Gf(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Al(4,t)}catch(c){Te(t,n,c)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var i=t.return;try{s.componentDidMount()}catch(c){Te(t,i,c)}}var a=t.return;try{Zu(t)}catch(c){Te(t,a,c)}break;case 5:var o=t.return;try{Zu(t)}catch(c){Te(t,o,c)}}}catch(c){Te(t,t.return,c)}if(t===e){H=null;break}var l=t.sibling;if(l!==null){l.return=t.return,H=l;break}H=t.return}}var zv=Math.ceil,Zo=Rn.ReactCurrentDispatcher,Ch=Rn.ReactCurrentOwner,Ft=Rn.ReactCurrentBatchConfig,ce=0,De=null,Le=null,qe=0,vt=0,kr=ms(0),Me=0,Ji=null,Ds=0,Ll=0,Eh=0,Ri=null,ot=null,Th=0,zr=1/0,gn=null,Xo=!1,ed=null,ss=null,Ka=!1,Hn=null,Jo=0,Ai=0,td=null,wo=-1,bo=0;function nt(){return ce&6?Re():wo!==-1?wo:wo=Re()}function rs(e){return e.mode&1?ce&2&&qe!==0?qe&-qe:xv.transition!==null?(bo===0&&(bo=Qm()),bo):(e=ue,e!==0||(e=window.event,e=e===void 0?16:tg(e.type)),e):1}function Gt(e,t,n,s){if(50<Ai)throw Ai=0,td=null,Error(M(185));fa(e,n,s),(!(ce&2)||e!==De)&&(e===De&&(!(ce&2)&&(Ll|=n),Me===4&&qn(e,qe)),ht(e,s),n===1&&ce===0&&!(t.mode&1)&&(zr=Re()+500,Tl&&gs()))}function ht(e,t){var n=e.callbackNode;x4(e,t);var s=Fo(e,e===De?qe:0);if(s===0)n!==null&&sf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(n!=null&&sf(n),t===1)e.tag===0?yv(Yf.bind(null,e)):kg(Yf.bind(null,e)),pv(function(){!(ce&6)&&gs()}),n=null;else{switch(Gm(s)){case 1:n=eh;break;case 4:n=Vm;break;case 16:n=zo;break;case 536870912:n=Km;break;default:n=zo}n=x2(n,d2.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function d2(e,t){if(wo=-1,bo=0,ce&6)throw Error(M(327));var n=e.callbackNode;if(Cr()&&e.callbackNode!==n)return null;var s=Fo(e,e===De?qe:0);if(s===0)return null;if(s&30||s&e.expiredLanes||t)t=el(e,s);else{t=s;var i=ce;ce|=2;var a=p2();(De!==e||qe!==t)&&(gn=null,zr=Re()+500,Rs(e,t));do try{Ov();break}catch(l){h2(e,l)}while(!0);ph(),Zo.current=a,ce=i,Le!==null?t=0:(De=null,qe=0,t=Me)}if(t!==0){if(t===2&&(i=Tu(e),i!==0&&(s=i,t=nd(e,i))),t===1)throw n=Ji,Rs(e,0),qn(e,s),ht(e,Re()),n;if(t===6)qn(e,s);else{if(i=e.current.alternate,!(s&30)&&!Fv(i)&&(t=el(e,s),t===2&&(a=Tu(e),a!==0&&(s=a,t=nd(e,a))),t===1))throw n=Ji,Rs(e,0),qn(e,s),ht(e,Re()),n;switch(e.finishedWork=i,e.finishedLanes=s,t){case 0:case 1:throw Error(M(345));case 2:js(e,ot,gn);break;case 3:if(qn(e,s),(s&130023424)===s&&(t=Th+500-Re(),10<t)){if(Fo(e,0)!==0)break;if(i=e.suspendedLanes,(i&s)!==s){nt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Fu(js.bind(null,e,ot,gn),t);break}js(e,ot,gn);break;case 4:if(qn(e,s),(s&4194240)===s)break;for(t=e.eventTimes,i=-1;0<s;){var o=31-Qt(s);a=1<<o,o=t[o],o>i&&(i=o),s&=~a}if(s=i,s=Re()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*zv(s/1960))-s,10<s){e.timeoutHandle=Fu(js.bind(null,e,ot,gn),s);break}js(e,ot,gn);break;case 5:js(e,ot,gn);break;default:throw Error(M(329))}}}return ht(e,Re()),e.callbackNode===n?d2.bind(null,e):null}function nd(e,t){var n=Ri;return e.current.memoizedState.isDehydrated&&(Rs(e,t).flags|=256),e=el(e,t),e!==2&&(t=ot,ot=n,t!==null&&sd(t)),e}function sd(e){ot===null?ot=e:ot.push.apply(ot,e)}function Fv(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var s=0;s<n.length;s++){var i=n[s],a=i.getSnapshot;i=i.value;try{if(!Xt(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function qn(e,t){for(t&=~Eh,t&=~Ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qt(t),s=1<<n;e[n]=-1,t&=~s}}function Yf(e){if(ce&6)throw Error(M(327));Cr();var t=Fo(e,0);if(!(t&1))return ht(e,Re()),null;var n=el(e,t);if(e.tag!==0&&n===2){var s=Tu(e);s!==0&&(t=s,n=nd(e,s))}if(n===1)throw n=Ji,Rs(e,0),qn(e,t),ht(e,Re()),n;if(n===6)throw Error(M(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,js(e,ot,gn),ht(e,Re()),null}function Ph(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(zr=Re()+500,Tl&&gs())}}function Bs(e){Hn!==null&&Hn.tag===0&&!(ce&6)&&Cr();var t=ce;ce|=1;var n=Ft.transition,s=ue;try{if(Ft.transition=null,ue=1,e)return e()}finally{ue=s,Ft.transition=n,ce=t,!(ce&6)&&gs()}}function Rh(){vt=kr.current,ve(kr)}function Rs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,hv(n)),Le!==null)for(n=Le.return;n!==null;){var s=n;switch(uh(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&Bo();break;case 3:Ir(),ve(ut),ve(Ye),vh();break;case 5:xh(s);break;case 4:Ir();break;case 13:ve(je);break;case 19:ve(je);break;case 10:fh(s.type._context);break;case 22:case 23:Rh()}n=n.return}if(De=e,Le=e=is(e.current,null),qe=vt=t,Me=0,Ji=null,Eh=Ll=Ds=0,ot=Ri=null,Cs!==null){for(t=0;t<Cs.length;t++)if(n=Cs[t],s=n.interleaved,s!==null){n.interleaved=null;var i=s.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,s.next=o}n.pending=s}Cs=null}return e}function h2(e,t){do{var n=Le;try{if(ph(),xo.current=Yo,Go){for(var s=Se.memoizedState;s!==null;){var i=s.queue;i!==null&&(i.pending=null),s=s.next}Go=!1}if($s=0,$e=ze=Se=null,Ti=!1,Yi=0,Ch.current=null,n===null||n.return===null){Me=1,Ji=t,Le=null;break}e:{var a=e,o=n.return,l=n,c=t;if(t=qe,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,h=l,d=h.tag;if(!(h.mode&1)&&(d===0||d===11||d===15)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=Mf(o);if(p!==null){p.flags&=-257,Of(p,o,l,a,t),p.mode&1&&Ff(a,u,t),t=p,c=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}else{if(!(t&1)){Ff(a,u,t),Ah();break e}c=Error(M(426))}}else if(be&&l.mode&1){var v=Mf(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),Of(v,o,l,a,t),dh(_r(c,l));break e}}a=c=_r(c,l),Me!==4&&(Me=2),Ri===null?Ri=[a]:Ri.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=Gg(a,c,t);Rf(a,y);break e;case 1:l=c;var x=a.type,k=a.stateNode;if(!(a.flags&128)&&(typeof x.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(ss===null||!ss.has(k)))){a.flags|=65536,t&=-t,a.lanes|=t;var b=Yg(a,l,t);Rf(a,b);break e}}a=a.return}while(a!==null)}m2(n)}catch(T){t=T,Le===n&&n!==null&&(Le=n=n.return);continue}break}while(!0)}function p2(){var e=Zo.current;return Zo.current=Yo,e===null?Yo:e}function Ah(){(Me===0||Me===3||Me===2)&&(Me=4),De===null||!(Ds&268435455)&&!(Ll&268435455)||qn(De,qe)}function el(e,t){var n=ce;ce|=2;var s=p2();(De!==e||qe!==t)&&(gn=null,Rs(e,t));do try{Mv();break}catch(i){h2(e,i)}while(!0);if(ph(),ce=n,Zo.current=s,Le!==null)throw Error(M(261));return De=null,qe=0,Me}function Mv(){for(;Le!==null;)f2(Le)}function Ov(){for(;Le!==null&&!c4();)f2(Le)}function f2(e){var t=y2(e.alternate,e,vt);e.memoizedProps=e.pendingProps,t===null?m2(e):Le=t,Ch.current=null}function m2(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Av(n,t),n!==null){n.flags&=32767,Le=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Le=null;return}}else if(n=Rv(n,t,vt),n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);Me===0&&(Me=5)}function js(e,t,n){var s=ue,i=Ft.transition;try{Ft.transition=null,ue=1,$v(e,t,n,s)}finally{Ft.transition=i,ue=s}return null}function $v(e,t,n,s){do Cr();while(Hn!==null);if(ce&6)throw Error(M(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(M(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(v4(e,a),e===De&&(Le=De=null,qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ka||(Ka=!0,x2(zo,function(){return Cr(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=Ft.transition,Ft.transition=null;var o=ue;ue=1;var l=ce;ce|=4,Ch.current=null,Iv(e,n),c2(n,e),iv(_u),Mo=!!Iu,_u=Iu=null,e.current=n,_v(n),u4(),ce=l,ue=o,Ft.transition=a}else e.current=n;if(Ka&&(Ka=!1,Hn=e,Jo=i),a=e.pendingLanes,a===0&&(ss=null),p4(n.stateNode),ht(e,Re()),t!==null)for(s=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],s(i.value,{componentStack:i.stack,digest:i.digest});if(Xo)throw Xo=!1,e=ed,ed=null,e;return Jo&1&&e.tag!==0&&Cr(),a=e.pendingLanes,a&1?e===td?Ai++:(Ai=0,td=e):Ai=0,gs(),null}function Cr(){if(Hn!==null){var e=Gm(Jo),t=Ft.transition,n=ue;try{if(Ft.transition=null,ue=16>e?16:e,Hn===null)var s=!1;else{if(e=Hn,Hn=null,Jo=0,ce&6)throw Error(M(331));var i=ce;for(ce|=4,H=e.current;H!==null;){var a=H,o=a.child;if(H.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(H=u;H!==null;){var h=H;switch(h.tag){case 0:case 11:case 15:Pi(8,h,a)}var d=h.child;if(d!==null)d.return=h,H=d;else for(;H!==null;){h=H;var f=h.sibling,p=h.return;if(a2(h),h===u){H=null;break}if(f!==null){f.return=p,H=f;break}H=p}}}var m=a.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}H=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,H=o;else e:for(;H!==null;){if(a=H,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Pi(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,H=y;break e}H=a.return}}var x=e.current;for(H=x;H!==null;){o=H;var k=o.child;if(o.subtreeFlags&2064&&k!==null)k.return=o,H=k;else e:for(o=x;H!==null;){if(l=H,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Al(9,l)}}catch(T){Te(l,l.return,T)}if(l===o){H=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,H=b;break e}H=l.return}}if(ce=i,gs(),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(jl,e)}catch{}s=!0}return s}finally{ue=n,Ft.transition=t}}return!1}function Zf(e,t,n){t=_r(n,t),t=Gg(e,t,1),e=ns(e,t,1),t=nt(),e!==null&&(fa(e,1,t),ht(e,t))}function Te(e,t,n){if(e.tag===3)Zf(e,e,n);else for(;t!==null;){if(t.tag===3){Zf(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ss===null||!ss.has(s))){e=_r(n,e),e=Yg(t,e,1),t=ns(t,e,1),e=nt(),t!==null&&(fa(t,1,e),ht(t,e));break}}t=t.return}}function Dv(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&n,De===e&&(qe&n)===n&&(Me===4||Me===3&&(qe&130023424)===qe&&500>Re()-Th?Rs(e,0):Eh|=n),ht(e,t)}function g2(e,t){t===0&&(e.mode&1?(t=Ma,Ma<<=1,!(Ma&130023424)&&(Ma=4194304)):t=1);var n=nt();e=Cn(e,t),e!==null&&(fa(e,t,n),ht(e,n))}function Bv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),g2(e,n)}function Uv(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(M(314))}s!==null&&s.delete(t),g2(e,n)}var y2;y2=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)lt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return lt=!1,Pv(e,t,n);lt=!!(e.flags&131072)}else lt=!1,be&&t.flags&1048576&&wg(t,Wo,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;ko(e,t),e=t.pendingProps;var i=Rr(t,Ye.current);Nr(t,n),i=wh(null,t,s,e,i,n);var a=bh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dt(s)?(a=!0,Uo(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,gh(t),i.updater=Rl,t.stateNode=i,i._reactInternals=t,qu(t,s,e,n),t=Vu(null,t,s,!0,a,n)):(t.tag=0,be&&a&&ch(t),Je(null,t,i,n),t=t.child),t;case 16:s=t.elementType;e:{switch(ko(e,t),e=t.pendingProps,i=s._init,s=i(s._payload),t.type=s,i=t.tag=Wv(s),e=Wt(s,e),i){case 0:t=Hu(null,t,s,e,n);break e;case 1:t=Bf(null,t,s,e,n);break e;case 11:t=$f(null,t,s,e,n);break e;case 14:t=Df(null,t,s,Wt(s.type,e),n);break e}throw Error(M(306,s,""))}return t;case 0:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:Wt(s,i),Hu(e,t,s,i,n);case 1:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:Wt(s,i),Bf(e,t,s,i,n);case 3:e:{if(e2(t),e===null)throw Error(M(387));s=t.pendingProps,a=t.memoizedState,i=a.element,Eg(e,t),Ko(t,s,null,n);var o=t.memoizedState;if(s=o.element,a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=_r(Error(M(423)),t),t=Uf(e,t,s,n,i);break e}else if(s!==i){i=_r(Error(M(424)),t),t=Uf(e,t,s,n,i);break e}else for(wt=ts(t.stateNode.containerInfo.firstChild),jt=t,be=!0,Vt=null,n=Ng(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ar(),s===i){t=En(e,t,n);break e}Je(e,t,s,n)}t=t.child}return t;case 5:return Tg(t),e===null&&Du(t),s=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,zu(s,i)?o=null:a!==null&&zu(s,a)&&(t.flags|=32),Jg(e,t),Je(e,t,o,n),t.child;case 6:return e===null&&Du(t),null;case 13:return t2(e,t,n);case 4:return yh(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Lr(t,null,s,n):Je(e,t,s,n),t.child;case 11:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:Wt(s,i),$f(e,t,s,i,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,ye(Ho,s._currentValue),s._currentValue=o,a!==null)if(Xt(a.value,o)){if(a.children===i.children&&!ut.current){t=En(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var c=l.firstContext;c!==null;){if(c.context===s){if(a.tag===1){c=bn(-1,n&-n),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Bu(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(M(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Bu(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Je(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,s=t.pendingProps.children,Nr(t,n),i=Mt(i),s=s(i),t.flags|=1,Je(e,t,s,n),t.child;case 14:return s=t.type,i=Wt(s,t.pendingProps),i=Wt(s.type,i),Df(e,t,s,i,n);case 15:return Zg(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:Wt(s,i),ko(e,t),t.tag=1,dt(s)?(e=!0,Uo(t)):e=!1,Nr(t,n),Qg(t,s,i),qu(t,s,i,n),Vu(null,t,s,!0,e,n);case 19:return n2(e,t,n);case 22:return Xg(e,t,n)}throw Error(M(156,t.tag))};function x2(e,t){return Hm(e,t)}function qv(e,t,n,s){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,n,s){return new qv(e,t,n,s)}function Lh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wv(e){if(typeof e=="function")return Lh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zd)return 11;if(e===Xd)return 14}return 2}function is(e,t){var n=e.alternate;return n===null?(n=zt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jo(e,t,n,s,i,a){var o=2;if(s=e,typeof e=="function")Lh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ur:return As(n.children,i,a,t);case Yd:o=8,i|=8;break;case pu:return e=zt(12,n,t,i|2),e.elementType=pu,e.lanes=a,e;case fu:return e=zt(13,n,t,i),e.elementType=fu,e.lanes=a,e;case mu:return e=zt(19,n,t,i),e.elementType=mu,e.lanes=a,e;case Tm:return Il(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cm:o=10;break e;case Em:o=9;break e;case Zd:o=11;break e;case Xd:o=14;break e;case $n:o=16,s=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=zt(o,n,t,i),t.elementType=e,t.type=s,t.lanes=a,t}function As(e,t,n,s){return e=zt(7,e,s,t),e.lanes=n,e}function Il(e,t,n,s){return e=zt(22,e,s,t),e.elementType=Tm,e.lanes=n,e.stateNode={isHidden:!1},e}function Tc(e,t,n){return e=zt(6,e,null,t),e.lanes=n,e}function Pc(e,t,n){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hv(e,t,n,s,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cc(0),this.expirationTimes=cc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cc(0),this.identifierPrefix=s,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ih(e,t,n,s,i,a,o,l,c){return e=new Hv(e,t,n,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=zt(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gh(a),e}function Vv(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:cr,key:s==null?null:""+s,children:e,containerInfo:t,implementation:n}}function v2(e){if(!e)return ds;e=e._reactInternals;e:{if(Ks(e)!==e||e.tag!==1)throw Error(M(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(M(171))}if(e.tag===1){var n=e.type;if(dt(n))return vg(e,n,t)}return t}function k2(e,t,n,s,i,a,o,l,c){return e=Ih(n,s,!0,e,i,a,o,l,c),e.context=v2(null),n=e.current,s=nt(),i=rs(n),a=bn(s,i),a.callback=t??null,ns(n,a,i),e.current.lanes=i,fa(e,i,s),ht(e,s),e}function _l(e,t,n,s){var i=t.current,a=nt(),o=rs(i);return n=v2(n),t.context===null?t.context=n:t.pendingContext=n,t=bn(a,o),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=ns(i,t,o),e!==null&&(Gt(e,i,o,a),yo(e,i,o)),o}function tl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Xf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _h(e,t){Xf(e,t),(e=e.alternate)&&Xf(e,t)}function Kv(){return null}var w2=typeof reportError=="function"?reportError:function(e){console.error(e)};function zh(e){this._internalRoot=e}zl.prototype.render=zh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));_l(e,t,null,null)};zl.prototype.unmount=zh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bs(function(){_l(null,e,null,null)}),t[Nn]=null}};function zl(e){this._internalRoot=e}zl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&eg(e)}};function Fh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jf(){}function Qv(e,t,n,s,i){if(i){if(typeof s=="function"){var a=s;s=function(){var u=tl(o);a.call(u)}}var o=k2(t,s,e,0,null,!1,!1,"",Jf);return e._reactRootContainer=o,e[Nn]=o.current,Hi(e.nodeType===8?e.parentNode:e),Bs(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof s=="function"){var l=s;s=function(){var u=tl(c);l.call(u)}}var c=Ih(e,0,!1,null,null,!1,!1,"",Jf);return e._reactRootContainer=c,e[Nn]=c.current,Hi(e.nodeType===8?e.parentNode:e),Bs(function(){_l(t,c,n,s)}),c}function Ml(e,t,n,s,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var l=i;i=function(){var c=tl(o);l.call(c)}}_l(t,o,e,i)}else o=Qv(n,t,e,i,s);return tl(o)}Ym=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=vi(t.pendingLanes);n!==0&&(th(t,n|1),ht(t,Re()),!(ce&6)&&(zr=Re()+500,gs()))}break;case 13:Bs(function(){var s=Cn(e,1);if(s!==null){var i=nt();Gt(s,e,1,i)}}),_h(e,1)}};nh=function(e){if(e.tag===13){var t=Cn(e,134217728);if(t!==null){var n=nt();Gt(t,e,134217728,n)}_h(e,134217728)}};Zm=function(e){if(e.tag===13){var t=rs(e),n=Cn(e,t);if(n!==null){var s=nt();Gt(n,e,t,s)}_h(e,t)}};Xm=function(){return ue};Jm=function(e,t){var n=ue;try{return ue=e,t()}finally{ue=n}};Nu=function(e,t,n){switch(t){case"input":if(xu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var i=El(s);if(!i)throw Error(M(90));Rm(s),xu(s,i)}}}break;case"textarea":Lm(e,n);break;case"select":t=n.value,t!=null&&wr(e,!!n.multiple,t,!1)}};$m=Ph;Dm=Bs;var Gv={usingClientEntryPoint:!1,Events:[ga,fr,El,Mm,Om,Ph]},ci={findFiberByHostInstance:Ns,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Yv={bundleType:ci.bundleType,version:ci.version,rendererPackageName:ci.rendererPackageName,rendererConfig:ci.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Rn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qm(e),e===null?null:e.stateNode},findFiberByHostInstance:ci.findFiberByHostInstance||Kv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qa.isDisabled&&Qa.supportsFiber)try{jl=Qa.inject(Yv),ln=Qa}catch{}}Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gv;Et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fh(t))throw Error(M(200));return Vv(e,t,null,n)};Et.createRoot=function(e,t){if(!Fh(e))throw Error(M(299));var n=!1,s="",i=w2;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ih(e,1,!1,null,null,n,!1,s,i),e[Nn]=t.current,Hi(e.nodeType===8?e.parentNode:e),new zh(t)};Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=qm(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e){return Bs(e)};Et.hydrate=function(e,t,n){if(!Fl(t))throw Error(M(200));return Ml(null,e,t,!0,n)};Et.hydrateRoot=function(e,t,n){if(!Fh(e))throw Error(M(405));var s=n!=null&&n.hydratedSources||null,i=!1,a="",o=w2;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=k2(t,null,e,1,n??null,i,!1,a,o),e[Nn]=t.current,Hi(e),s)for(e=0;e<s.length;e++)n=s[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new zl(t)};Et.render=function(e,t,n){if(!Fl(t))throw Error(M(200));return Ml(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!Fl(e))throw Error(M(40));return e._reactRootContainer?(Bs(function(){Ml(null,null,e,!1,function(){e._reactRootContainer=null,e[Nn]=null})}),!0):!1};Et.unstable_batchedUpdates=Ph;Et.unstable_renderSubtreeIntoContainer=function(e,t,n,s){if(!Fl(n))throw Error(M(200));if(e==null||e._reactInternals===void 0)throw Error(M(38));return Ml(e,t,n,!1,s)};Et.version="18.3.1-next-f1338f8080-20240426";function b2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b2)}catch(e){console.error(e)}}b2(),bm.exports=Et;var j2=bm.exports,S2,e1=j2;S2=e1.createRoot,e1.hydrateRoot;var Hr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Zv=class extends Hr{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Mh=new Zv,Xv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Jv=class{#e=Xv;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ts=new Jv;function e5(e){setTimeout(e,0)}var t5=typeof window>"u"||"Deno"in globalThis;function et(){}function n5(e,t){return typeof e=="function"?e(t):e}function rd(e){return typeof e=="number"&&e>=0&&e!==1/0}function N2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function as(e,t){return typeof e=="function"?e(t):e}function kt(e,t){return typeof e=="function"?e(t):e}function t1(e,t){const{type:n="all",exact:s,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(s){if(t.queryHash!==Oh(o,t.options))return!1}else if(!ea(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function n1(e,t){const{exact:n,status:s,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Us(t.options.mutationKey)!==Us(a))return!1}else if(!ea(t.options.mutationKey,a))return!1}return!(s&&t.state.status!==s||i&&!i(t))}function Oh(e,t){return(t?.queryKeyHashFn||Us)(e)}function Us(e){return JSON.stringify(e,(t,n)=>id(n)?Object.keys(n).sort().reduce((s,i)=>(s[i]=n[i],s),{}):n)}function ea(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ea(e[n],t[n])):!1}var s5=Object.prototype.hasOwnProperty;function C2(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=s1(e)&&s1(t);if(!s&&!(id(e)&&id(t)))return t;const a=(s?e:Object.keys(e)).length,o=s?t:Object.keys(t),l=o.length,c=s?new Array(l):{};let u=0;for(let h=0;h<l;h++){const d=s?h:o[h],f=e[d],p=t[d];if(f===p){c[d]=f,(s?h<a:s5.call(e,d))&&u++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){c[d]=p;continue}const m=C2(f,p,n+1);c[d]=m,m===f&&u++}return a===l&&u===a?e:c}function nl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function s1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function id(e){if(!r1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!r1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function r1(e){return Object.prototype.toString.call(e)==="[object Object]"}function r5(e){return new Promise(t=>{Ts.setTimeout(t,e)})}function ad(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?C2(e,t):t}function i5(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function a5(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var $h=Symbol();function E2(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===$h?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Dh(e,t){return typeof e=="function"?e(...t):!!e}function o5(e,t,n){let s=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),s||(s=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var ta=(()=>{let e=()=>t5;return{isServer(){return e()},setIsServer(t){e=t}}})();function od(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function s(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{s({status:"fulfilled",value:i}),e(i)},n.reject=i=>{s({status:"rejected",reason:i}),t(i)},n}var l5=e5;function c5(){let e=[],t=0,n=l=>{l()},s=l=>{l()},i=l5;const a=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{s(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{s=l},setScheduler:l=>{i=l}}}var Fe=c5(),u5=class extends Hr{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},sl=new u5;function d5(e){return Math.min(1e3*2**e,3e4)}function T2(e){return(e??"online")==="online"?sl.isOnline():!0}var ld=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function P2(e){let t=!1,n=0,s;const i=od(),a=()=>i.status!=="pending",o=g=>{if(!a()){const v=new ld(g);f(v),e.onCancel?.(v)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>Mh.isFocused()&&(e.networkMode==="always"||sl.isOnline())&&e.canRun(),h=()=>T2(e.networkMode)&&e.canRun(),d=g=>{a()||(s?.(),i.resolve(g))},f=g=>{a()||(s?.(),i.reject(g))},p=()=>new Promise(g=>{s=v=>{(a()||u())&&g(v)},e.onPause?.()}).then(()=>{s=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let g;const v=n===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{if(a())return;const x=e.retry??(ta.isServer()?0:3),k=e.retryDelay??d5,b=typeof k=="function"?k(n,y):k,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,y);if(t||!T){f(y);return}n++,e.onFail?.(n,y),r5(b).then(()=>u()?void 0:p()).then(()=>{t?f(y):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(s?.(),i),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?m():p().then(m),i)}}var R2=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rd(this.gcTime)&&(this.#e=Ts.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ta.isServer()?1/0:5*60*1e3))}clearGcTimeout(){this.#e!==void 0&&(Ts.clearTimeout(this.#e),this.#e=void 0)}};function h5(e){return{onFetch:(t,n)=>{const s=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const d=m=>{o5(m,()=>t.signal,()=>h=!0)},f=E2(t.options,t.fetchOptions),p=async(m,g,v)=>{if(h)return Promise.reject(t.signal.reason);if(g==null&&m.pages.length)return Promise.resolve(m);const x=(()=>{const w={client:t.client,queryKey:t.queryKey,pageParam:g,direction:v?"backward":"forward",meta:t.options.meta};return d(w),w})(),k=await f(x),{maxPages:b}=t.options,T=v?a5:i5;return{pages:T(m.pages,k,b),pageParams:T(m.pageParams,g,b)}};if(i&&a.length){const m=i==="backward",g=m?p5:i1,v={pages:a,pageParams:o},y=g(s,v);l=await p(v,y,m)}else{const m=e??a.length;do{const g=c===0?o[0]??s.initialPageParam:i1(s,l);if(c>0&&g==null)break;l=await p(l,g),c++}while(c<m)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function i1(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function p5(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var f5=class extends R2{#e;#t;#n;#s;#i;#r;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#s=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=o1(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=o1(this.options);t.data!==void 0&&(this.setState(a1(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,t){const n=ad(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(et).catch(et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>kt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$h||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>as(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!N2(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a||this.#u()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,s=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const c=E2(this.options,t),h=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(d),d})();return this.#a=!1,this.options.persister?this.options.persister(c,h,this):c(h)},o=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return s(c),c})();(this.#e==="infinite"?h5(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#l({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=P2({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:c=>{c instanceof ld&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,u)=>{this.#l({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#s.config.onSuccess?.(c,this),this.#s.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof ld){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#s.config.onError?.(c,this),this.#s.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(e){const t=n=>{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,...A2(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...a1(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Fe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function A2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:T2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function a1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function o1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var m5=class extends Hr{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=od(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#i;#r;#o;#a;#u;#l;#f;#d;#h;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),l1(this.#t,this.options)?this.#p():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#k(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#t.setOptions(this.options),t._defaulted&&!nl(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&c1(this.#t,n,this.options,t)&&this.#p(),this.updateResult(),s&&(this.#t!==n||kt(this.options.enabled,this.#t)!==kt(t.enabled,this.#t)||as(this.options.staleTime,this.#t)!==as(t.staleTime,this.#t))&&this.#g();const i=this.#y();s&&(this.#t!==n||kt(this.options.enabled,this.#t)!==kt(t.enabled,this.#t)||i!==this.#c)&&this.#x(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return y5(this,n)&&(this.#s=n,this.#r=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,s)=>(this.trackProp(s),t?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#p(e){this.#b();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(et)),t}#g(){this.#k();const e=as(this.options.staleTime,this.#t);if(ta.isServer()||this.#s.isStale||!rd(e))return;const n=N2(this.#s.dataUpdatedAt,e)+1;this.#d=Ts.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#w(),this.#c=e,!(ta.isServer()||kt(this.options.enabled,this.#t)===!1||!rd(this.#c)||this.#c===0)&&(this.#h=Ts.setInterval(()=>{(this.options.refetchIntervalInBackground||Mh.isFocused())&&this.#p()},this.#c))}#v(){this.#g(),this.#x(this.#y())}#k(){this.#d!==void 0&&(Ts.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#h!==void 0&&(Ts.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const n=this.#t,s=this.options,i=this.#s,a=this.#i,o=this.#r,c=e!==n?e.state:this.#n,{state:u}=e;let h={...u},d=!1,f;if(t._optimisticResults){const S=this.hasListeners(),A=!S&&l1(e,t),C=S&&c1(e,n,t,s);(A||C)&&(h={...h,...A2(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:g}=h;f=h.data;let v=!1;if(t.placeholderData!==void 0&&f===void 0&&g==="pending"){let S;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(S=i.data,v=!0):S=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,S!==void 0&&(g="success",f=ad(i?.data,S,t),d=!0)}if(t.select&&f!==void 0&&!v)if(i&&f===a?.data&&t.select===this.#u)f=this.#l;else try{this.#u=t.select,f=t.select(f),f=ad(i?.data,f,t),this.#l=f,this.#a=null}catch(S){this.#a=S}this.#a&&(p=this.#a,f=this.#l,m=Date.now(),g="error");const y=h.fetchStatus==="fetching",x=g==="pending",k=g==="error",b=x&&y,T=f!==void 0,E={status:g,fetchStatus:h.fetchStatus,isPending:x,isSuccess:g==="success",isError:k,isInitialLoading:b,isLoading:b,data:f,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:k&&!T,isPaused:h.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:k&&T,isStale:Bh(e,t),refetch:this.refetch,promise:this.#o,isEnabled:kt(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const S=E.data!==void 0,A=E.status==="error"&&!S,C=$=>{A?$.reject(E.error):S&&$.resolve(E.data)},R=()=>{const $=this.#o=E.promise=od();C($)},L=this.#o;switch(L.status){case"pending":e.queryHash===n.queryHash&&C(L);break;case"fulfilled":(A||E.data!==L.value)&&R();break;case"rejected":(!A||E.error!==L.reason)&&R();break}}return E}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#r=this.options,this.#i.data!==void 0&&(this.#f=this.#t),nl(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#m.size)return!0;const a=new Set(i??this.#m);return this.options.throwOnError&&a.add("error"),Object.keys(this.#s).some(o=>{const l=o;return this.#s[l]!==e[l]&&a.has(l)})};this.#j({listeners:n()})}#b(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#j(e){Fe.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function g5(e,t){return kt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&kt(t.retryOnMount,e)===!1)}function l1(e,t){return g5(e,t)||e.state.data!==void 0&&cd(e,t,t.refetchOnMount)}function cd(e,t,n){if(kt(t.enabled,e)!==!1&&as(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&Bh(e,t)}return!1}function c1(e,t,n,s){return(e!==t||kt(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Bh(e,n)}function Bh(e,t){return kt(t.enabled,e)!==!1&&e.isStaleByTime(as(t.staleTime,e))}function y5(e,t){return!nl(e.getCurrentResult(),t)}var x5=class extends R2{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||L2(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=P2({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#i({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",i=!this.#s.canStart();try{if(s)t();else{this.#i({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#i({type:"pending",context:o,variables:e,isPaused:i})}const a=await this.#s.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:"success",data:a}),a}catch(a){try{await this.#n.config.onError?.(a,e,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(a,e,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,a,e,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#i({type:"error",error:a}),a}finally{this.#n.runNext(this)}}#i(e){const t=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"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};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"}}};this.state=t(this.state),Fe.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function L2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var v5=class extends Hr{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const s=new x5({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){this.#e.add(e);const t=Ga(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Ga(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ga(e);if(typeof t=="string"){const s=this.#t.get(t)?.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=Ga(e);return typeof t=="string"?this.#t.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Fe.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>n1(t,n))}findAll(e={}){return this.getAll().filter(t=>n1(e,t))}notify(e){Fe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Fe.batch(()=>Promise.all(e.map(t=>t.continue().catch(et))))}};function Ga(e){return e.options.scope?.id}var k5=class extends Hr{#e;#t=void 0;#n;#s;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),nl(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Us(n.mutationKey)!==Us(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#r(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#r()}mutate(t,n){return this.#s=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#i(){const t=this.#n?.state??L2();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#r(t){Fe.batch(()=>{if(this.#s&&this.hasListeners()){const n=this.#t.variables,s=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#s.onSuccess?.(t.data,n,s,i)}catch(a){Promise.reject(a)}try{this.#s.onSettled?.(t.data,null,n,s,i)}catch(a){Promise.reject(a)}}else if(t?.type==="error"){try{this.#s.onError?.(t.error,n,s,i)}catch(a){Promise.reject(a)}try{this.#s.onSettled?.(void 0,t.error,n,s,i)}catch(a){Promise.reject(a)}}}this.listeners.forEach(n=>{n(this.#t)})})}},w5=class extends Hr{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const s=t.queryKey,i=t.queryHash??Oh(s,t);let a=this.get(i);return a||(a=new f5({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Fe.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>t1(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>t1(e,n)):t}notify(e){Fe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Fe.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Fe.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},b5=class{#e;#t;#n;#s;#i;#r;#o;#a;constructor(e={}){this.#e=e.queryCache||new w5,this.#t=e.mutationCache||new v5,this.#n=e.defaultOptions||{},this.#s=new Map,this.#i=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#o=Mh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=sl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(as(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(s.queryHash)?.state.data,o=n5(t,a);if(o!==void 0)return this.#e.build(this,s).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Fe.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Fe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Fe.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=Fe.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(s).then(et).catch(et)}invalidateQueries(e,t={}){return Fe.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=Fe.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(et)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(et)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(as(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(et).catch(et)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(et).catch(et)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return sl.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(Us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(s=>{ea(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(s=>{ea(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Oh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===$h&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},I2=j.createContext(void 0),Qs=e=>{const t=j.useContext(I2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},j5=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),r.jsx(I2.Provider,{value:e,children:t})),_2=j.createContext(!1),S5=()=>j.useContext(_2);_2.Provider;function N5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var C5=j.createContext(N5()),E5=()=>j.useContext(C5),T5=(e,t,n)=>{const s=n?.state.error&&typeof e.throwOnError=="function"?Dh(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},P5=e=>{j.useEffect(()=>{e.clearReset()},[e])},R5=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&e.data===void 0||Dh(n,[e.error,s])),A5=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...i)=>n(s(...i)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},L5=(e,t)=>e.isLoading&&e.isFetching&&!t,I5=(e,t)=>e?.suspense&&t.isPending,u1=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function _5(e,t,n){const s=S5(),i=E5(),a=Qs(),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const l=a.getQueryCache().get(o.queryHash);o._optimisticResults=s?"isRestoring":"optimistic",A5(o),T5(o,i,l),P5(i);const c=!a.getQueryCache().get(o.queryHash),[u]=j.useState(()=>new t(a,o)),h=u.getOptimisticResult(o),d=!s&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(f=>{const p=d?u.subscribe(Fe.batchCalls(f)):et;return u.updateResult(),p},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),j.useEffect(()=>{u.setOptions(o)},[o,u]),I5(o,h))throw u1(o,u,i);if(R5({result:h,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw h.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,h),o.experimental_prefetchInRender&&!ta.isServer()&&L5(h,s)&&(c?u1(o,u,i):l?.promise)?.catch(et).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?h:u.trackResult(h)}function he(e,t){return _5(e,m5)}function z5(e,t){const n=Qs(),[s]=j.useState(()=>new k5(n,e));j.useEffect(()=>{s.setOptions(e)},[s,e]);const i=j.useSyncExternalStore(j.useCallback(o=>s.subscribe(Fe.batchCalls(o)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=j.useCallback((o,l)=>{s.mutate(o,l).catch(et)},[s]);if(i.error&&Dh(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var wi=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Rc(e){const t=j.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function F5(e,t,n={},s={}){j.useEffect(()=>{if(!e.current||s.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([a])=>{t(a)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,s.disabled,e])}function M5(e){const t=j.useRef(null);return j.useImperativeHandle(e,()=>t.current,[]),t}const z2=!1;function na(e){return e[e.length-1]}function O5(e){return typeof e=="function"}function Vn(e,t){return O5(e)?e(t):e}const F2=Object.prototype.hasOwnProperty,d1=Object.prototype.propertyIsEnumerable;function M2(e){for(const t in e)if(F2.call(e,t))return!0;return!1}const $5=()=>Object.create(null),vs=(e,t)=>Kn(e,t,$5);function Kn(e,t,n=()=>({}),s=0){if(e===t)return e;if(s>500)return t;const i=t,a=f1(e)&&f1(i);if(!a&&!(Fr(e)&&Fr(i)))return i;const o=a?e:h1(e);if(!o)return i;const l=a?i:h1(i);if(!l)return i;const c=o.length,u=l.length,h=a?new Array(u):n();let d=0;for(let f=0;f<u;f++){const p=a?f:l[f],m=e[p],g=i[p];if(m===g){h[p]=m,(a?f<c:F2.call(e,p))&&d++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){h[p]=g;continue}const v=Kn(m,g,n,s+1);h[p]=v,v===m&&d++}return c===u&&d===c?e:h}function h1(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!d1.call(e,i))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const s=t;for(const i of n){if(!d1.call(e,i))return!1;s.push(i)}return s}function Fr(e){if(!p1(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!p1(n)||!n.hasOwnProperty("isPrototypeOf"))}function p1(e){return Object.prototype.toString.call(e)==="[object Object]"}function f1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ls(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let s=0,i=e.length;s<i;s++)if(!Ls(e[s],t[s],n))return!1;return!0}if(Fr(e)&&Fr(t)){const s=n?.ignoreUndefined??!0;if(n?.partial){for(const o in t)if((!s||t[o]!==void 0)&&!Ls(e[o],t[o],n))return!1;return!0}let i=0;if(!s)i=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&i++;let a=0;for(const o in t)if((!s||t[o]!==void 0)&&(a++,a>i||!Ls(e[o],t[o],n)))return!1;return i===a}return!1}function Mr(e){let t,n;const s=new Promise((i,a)=>{t=i,n=a});return s.status="pending",s.resolve=i=>{s.status="resolved",s.value=i,t(i),e?.(i)},s.reject=i=>{s.status="rejected",n(i)},s}function sa(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function D5(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function m1(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return D5(t)}const B5=["http:","https:","mailto:","tel:"];function rl(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ui(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,s="",i;for(;(i=t.exec(e))!==null;)s+=m1(e.slice(n,i.index))+i[0],n=t.lastIndex;s=s+m1(n?e.slice(n):e);let a=!1;return s.startsWith("//")&&(a=!0,s="/"+s.replace(/^\/+/,"")),{path:s,handledProtocolRelativeURL:a}}function U5(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function q5(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function jn(){throw new Error("Invariant failed")}function ra(e){const t=new Map;let n,s;const i=a=>{a.next&&(a.prev?(a.prev.next=a.next,a.next.prev=a.prev,a.next=void 0,s&&(s.next=a,a.prev=s)):(a.next.prev=void 0,n=a.next,a.next=void 0,s&&(a.prev=s,s.next=a)),s=a)};return{get(a){const o=t.get(a);if(o)return i(o),o.value},set(a,o){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===s&&(s=void 0)}const l=t.get(a);if(l)l.value=o,i(l);else{const c={key:a,value:o,prev:s};s&&(s.next=c),s=c,n||(n=c),t.set(a,c)}},clear(){t.clear(),n=void 0,s=void 0}}}const Qn=4,O2=5;function W5(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function $2(e,t,n=new Uint16Array(6)){const s=e.indexOf("/",t),i=s===-1?e.length:s,a=e.substring(t,i);if(!a||!a.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a==="$"){const l=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=l,n[4]=l,n[5]=l,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const o=W5(a);if(o){const[l,c]=o,u=a.charCodeAt(l+1);if(u===45){if(l+2<a.length&&a.charCodeAt(l+2)===36){const h=l+3,d=c;if(h<d)return n[0]=3,n[1]=t+l,n[2]=t+h,n[3]=t+d,n[4]=t+c+1,n[5]=i,n}}else if(u===36){const h=l+1,d=l+2;return d===c?(n[0]=2,n[1]=t+l,n[2]=t+h,n[3]=t+d,n[4]=t+c+1,n[5]=e.length,n):(n[0]=1,n[1]=t+l,n[2]=t+d,n[3]=t+c,n[4]=t+c+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function Ol(e,t,n,s,i,a,o){o?.(n);let l=s;{const c=n.fullPath??n.from,u=c.length,h=n.options?.caseSensitive??e,d=n.options?.params?.parse??n.options?.parseParams;for(;l<u;){const p=$2(c,l,t);let m;const g=l,v=p[5];switch(l=v+1,a++,p[0]){case 0:{const y=c.substring(p[2],p[3]);if(h){const x=i.static?.get(y);if(x)m=x;else{i.static??=new Map;const k=Ps(n.fullPath??n.from);k.parent=i,k.depth=a,m=k,i.static.set(y,k)}}else{const x=y.toLowerCase(),k=i.staticInsensitive?.get(x);if(k)m=k;else{i.staticInsensitive??=new Map;const b=Ps(n.fullPath??n.from);b.parent=i,b.depth=a,m=b,i.staticInsensitive.set(x,b)}}break}case 1:{const y=c.substring(g,p[1]),x=c.substring(p[4],v),k=h&&!!(y||x),b=y?k?y:y.toLowerCase():void 0,T=x?k?x:x.toLowerCase():void 0,w=!d&&i.dynamic?.find(E=>!E.parse&&E.caseSensitive===k&&E.prefix===b&&E.suffix===T);if(w)m=w;else{const E=Lc(1,n.fullPath??n.from,k,b,T);m=E,E.depth=a,E.parent=i,i.dynamic??=[],i.dynamic.push(E)}break}case 3:{const y=c.substring(g,p[1]),x=c.substring(p[4],v),k=h&&!!(y||x),b=y?k?y:y.toLowerCase():void 0,T=x?k?x:x.toLowerCase():void 0,w=!d&&i.optional?.find(E=>!E.parse&&E.caseSensitive===k&&E.prefix===b&&E.suffix===T);if(w)m=w;else{const E=Lc(3,n.fullPath??n.from,k,b,T);m=E,E.parent=i,E.depth=a,i.optional??=[],i.optional.push(E)}break}case 2:{const y=c.substring(g,p[1]),x=c.substring(p[4],v),k=h&&!!(y||x),b=y?k?y:y.toLowerCase():void 0,T=x?k?x:x.toLowerCase():void 0,w=Lc(2,n.fullPath??n.from,k,b,T);m=w,w.parent=i,w.depth=a,i.wildcard??=[],i.wildcard.push(w)}}i=m}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const p=Ps(n.fullPath??n.from);p.kind=O2,p.parent=i,a++,p.depth=a,i.pathless??=[],i.pathless.push(p),i=p}const f=(n.path||!n.children)&&!n.isRoot;if(f&&c.endsWith("/")){const p=Ps(n.fullPath??n.from);p.kind=Qn,p.parent=i,a++,p.depth=a,i.index=p,i=p}i.parse=d??null,f&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)Ol(e,t,c,l,i,a,o)}function Ac(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Bn(e){if(e.pathless)for(const t of e.pathless)Bn(t);if(e.static)for(const t of e.static.values())Bn(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Bn(t);if(e.dynamic?.length){e.dynamic.sort(Ac);for(const t of e.dynamic)Bn(t)}if(e.optional?.length){e.optional.sort(Ac);for(const t of e.optional)Bn(t)}if(e.wildcard?.length){e.wildcard.sort(Ac);for(const t of e.wildcard)Bn(t)}}function Ps(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null}}function Lc(e,t,n,s,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,caseSensitive:n,prefix:s,suffix:i}}function H5(e,t){const n=Ps("/"),s=new Uint16Array(6);for(const i of e)Ol(!1,s,i,1,n,0);Bn(n),t.masksTree=n,t.flatCache=ra(1e3)}function V5(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const s=Uh(e,t.masksTree);return t.flatCache.set(e,s),s}function K5(e,t,n,s,i){e||="/",s||="/";const a=t?`case\0${e}`:e;let o=i.singleCache.get(a);return o||(o=Ps("/"),Ol(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Uh(s,o,n)}function Q5(e,t,n=!1){const s=n?e:`nofuzz\0${e}`,i=t.matchCache.get(s);if(i!==void 0)return i;e||="/";let a;try{a=Uh(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)a=null;else throw o}return a&&(a.branch=B2(a.route)),t.matchCache.set(s,a),a}function G5(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Y5(e,t=!1,n){const s=Ps(e.fullPath),i=new Uint16Array(6),a={},o={};let l=0;return Ol(t,i,e,1,s,0,c=>{if(n?.(c,l),c.id in a&&jn(),a[c.id]=c,l!==0&&c.path){const u=G5(c.fullPath);(!o[u]||c.fullPath.endsWith("/"))&&(o[u]=c)}l++}),Bn(s),{processedTree:{segmentTree:s,singleCache:ra(1e3),matchCache:ra(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Uh(e,t,n=!1){const s=e.split("/"),i=X5(e,s,t,n);if(!i)return null;const[a]=D2(e,s,i);return{route:i.node.route,rawParams:a}}function D2(e,t,n){const s=Z5(n.node);let i=null;const a=Object.create(null);let o=n.extract?.part??0,l=n.extract?.node??0,c=n.extract?.path??0,u=n.extract?.segment??0;for(;l<s.length;o++,l++,c++,u++){const h=s[l];if(h.kind===Qn)break;if(h.kind===O2){u--,o--,c--;continue}const d=t[o],f=c;if(d&&(c+=d.length),h.kind===1){i??=n.node.fullPath.split("/");const p=i[u],m=h.prefix?.length??0;if(p.charCodeAt(m)===123){const g=h.suffix?.length??0,v=p.substring(m+2,p.length-g-1),y=d.substring(m,d.length-g);a[v]=decodeURIComponent(y)}else{const g=p.substring(1);a[g]=decodeURIComponent(d)}}else if(h.kind===3){if(n.skipped&1<<l){o--,c=f-1;continue}i??=n.node.fullPath.split("/");const p=i[u],m=h.prefix?.length??0,g=h.suffix?.length??0,v=p.substring(m+3,p.length-g-1),y=h.suffix||h.prefix?d.substring(m,d.length-g):d;y&&(a[v]=decodeURIComponent(y))}else if(h.kind===2){const p=h,m=e.substring(f+(p.prefix?.length??0),e.length-(p.suffix?.length??0)),g=decodeURIComponent(m);a["*"]=g,a._splat=g;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:l,path:c,segment:u}]}function B2(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Z5(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function X5(e,t,n,s){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!na(t),a=i&&e!=="/",o=t.length-(i?1:0),l=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,u=null;for(;l.length;){const h=l.pop(),{node:d,index:f,skipped:p,depth:m,statics:g,dynamics:v,optionals:y}=h;let{extract:x,rawParams:k}=h;if(d.kind===2&&d.route&&!Za(u,h))continue;if(d.parse){if(!g1(e,t,h))continue;k=h.rawParams,x=h.extract}s&&d.route&&d.kind!==Qn&&Za(c,h)&&(c=h);const b=f===o;if(b&&(d.route&&(!a||d.kind===Qn||d.kind===2)&&Za(u,h)&&(u=h),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const T=b?void 0:t[f];let w;if(b&&d.index){const E={node:d.index,index:f,skipped:p,depth:m+1,statics:g,dynamics:v,optionals:y,extract:x,rawParams:k};let S=!0;if(d.index.parse&&(g1(e,t,E)||(S=!1)),S){if(!v&&!y&&!p&&J5(g,o))return E;Za(u,E)&&(u=E)}}if(d.wildcard)for(let E=d.wildcard.length-1;E>=0;E--){const S=d.wildcard[E],{prefix:A,suffix:C}=S;if(!(A&&(b||!(S.caseSensitive?T:w??=T.toLowerCase()).startsWith(A)))){if(C){if(b)continue;const R=t.slice(f).join("/").slice(-C.length);if((S.caseSensitive?R:R.toLowerCase())!==C)continue}l.push({node:S,index:o,skipped:p,depth:m+1,statics:g,dynamics:v,optionals:y,extract:x,rawParams:k})}}if(d.optional){const E=p|1<<m,S=m+1;for(let A=d.optional.length-1;A>=0;A--){const C=d.optional[A];l.push({node:C,index:f,skipped:E,depth:S,statics:g,dynamics:v,optionals:y,extract:x,rawParams:k})}if(!b)for(let A=d.optional.length-1;A>=0;A--){const C=d.optional[A],{prefix:R,suffix:L}=C;if(R||L){const $=C.caseSensitive?T:w??=T.toLowerCase();if(R&&!$.startsWith(R)||L&&!$.endsWith(L))continue}l.push({node:C,index:f+1,skipped:p,depth:S,statics:g,dynamics:v,optionals:y+Ya(o,f),extract:x,rawParams:k})}}if(!b&&d.dynamic&&T)for(let E=d.dynamic.length-1;E>=0;E--){const S=d.dynamic[E],{prefix:A,suffix:C}=S;if(A||C){const R=S.caseSensitive?T:w??=T.toLowerCase();if(A&&!R.startsWith(A)||C&&!R.endsWith(C))continue}l.push({node:S,index:f+1,skipped:p,depth:m+1,statics:g,dynamics:v+Ya(o,f),optionals:y,extract:x,rawParams:k})}if(!b&&d.staticInsensitive){const E=d.staticInsensitive.get(w??=T.toLowerCase());E&&l.push({node:E,index:f+1,skipped:p,depth:m+1,statics:g+Ya(o,f),dynamics:v,optionals:y,extract:x,rawParams:k})}if(!b&&d.static){const E=d.static.get(T);E&&l.push({node:E,index:f+1,skipped:p,depth:m+1,statics:g+Ya(o,f),dynamics:v,optionals:y,extract:x,rawParams:k})}if(d.pathless){const E=m+1;for(let S=d.pathless.length-1;S>=0;S--){const A=d.pathless[S];l.push({node:A,index:f,skipped:p,depth:E,statics:g,dynamics:v,optionals:y,extract:x,rawParams:k})}}}if(u)return u;if(s&&c){let h=c.index;for(let f=0;f<c.index;f++)h+=t[f].length;const d=h===e.length?"/":e.slice(h);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(d),c}return null}function Ya(e,t){return 2**(e-t-1)}function J5(e,t){return e===2**(t-1)-1}function g1(e,t,n){let s,i;try{[s,i]=D2(e,t,n)}catch{return null}if(n.rawParams=s,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(s)===!1)return null}catch{}return!0}function Za(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Qn)>(e.node.kind===Qn)||t.node.kind===Qn==(e.node.kind===Qn)&&t.depth>e.depth))):!0}function So(e){return qh(e.filter(t=>t!==void 0).join("/"))}function qh(e){return e.replace(/\/{2,}/g,"/")}function U2(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function wn(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function q2(e){return wn(U2(e))}function il(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function e6(e,t,n){return il(e,n)===il(t,n)}function t6({base:e,to:t,trailingSlash:n="never",cache:s}){const i=t.startsWith("/"),a=!i&&t===".";let o;if(s){o=i?t:a?e:e+"\0"+t;const u=s.get(o);if(u)return u}let l;if(a)l=e.split("/");else if(i)l=t.split("/");else{for(l=e.split("/");l.length>1&&na(l)==="";)l.pop();const u=t.split("/");for(let h=0,d=u.length;h<d;h++){const f=u[h];f===""?h?h===d-1&&l.push(f):l=[f]:f===".."?l.pop():f==="."||l.push(f)}}l.length>1&&(na(l)===""?n==="never"&&l.pop():n==="always"&&l.push(""));const c=qh(l.join("/"))||"/";return o&&s&&s.set(o,c),c}function n6(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(n,"g");return i=>i.replace(s,a=>t.get(a)??a)}function Ic(e,t,n){const s=t[e];return typeof s!="string"?s:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(s)?s:s.split("/").map(i=>x1(i,n)).join("/"):x1(s,n)}function y1({path:e,params:t,decoder:n,...s}){let i=!1;const a=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:i};const o=e.length;let l=0,c,u="";for(;l<o;){const h=l;c=$2(e,h,c);const d=c[5];if(l=d+1,h===d)continue;const f=c[0];if(f===0){u+="/"+e.substring(h,d);continue}if(f===2){const p=t._splat;a._splat=p,a["*"]=p;const m=e.substring(h,c[1]),g=e.substring(c[4],d);if(!p){i=!0,(m||g)&&(u+="/"+m+g);continue}const v=Ic("_splat",t,n);u+="/"+m+v+g;continue}if(f===1){const p=e.substring(c[2],c[3]);!i&&!(p in t)&&(i=!0),a[p]=t[p];const m=e.substring(h,c[1]),g=e.substring(c[4],d),v=Ic(p,t,n)??"undefined";u+="/"+m+v+g;continue}if(f===3){const p=e.substring(c[2],c[3]),m=t[p];if(m==null)continue;a[p]=m;const g=e.substring(h,c[1]),v=e.substring(c[4],d),y=Ic(p,t,n)??"";u+="/"+g+y+v;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:a,interpolatedPath:u||"/",isMissingParams:i}}function x1(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Ge(e){return e?.isNotFound===!0}function s6(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const r6="tsr-scroll-restoration-v1_3";function i6(){const e=s6();if(!e)return null;let t={};try{const s=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Fr(s)&&(t=s)}catch{}return{get state(){return t},set:s=>{t=Vn(s,t)||t},persist:()=>{try{e.setItem(r6,JSON.stringify(t))}catch{}}}}const v1=i6(),a6=e=>e.state.__TSR_key||e.href;function o6(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Xa=!1;const di="window",k1="data-scroll-restoration-id";function l6(e,t){if(!v1)return;const n=v1;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Xa=!1;const s=e.options.getScrollRestorationKey||a6,i=new Map;window.history.scrollRestoration="manual";const a=l=>{if(!(Xa||!e.isScrollRestoring))if(l.target===document||l.target===window)i.set(di,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const c=l.target;i.set(c,{scrollX:c.scrollLeft||0,scrollY:c.scrollTop||0})}},o=l=>{if(!e.isScrollRestoring||!l||i.size===0||!n)return;const c=n.state[l]||={};for(const[u,h]of i){let d;if(u===di)d=di;else if(u.isConnected){const f=u.getAttribute(k1);d=f?`[${k1}="${f}"]`:o6(u)}d&&(c[d]=h)}};document.addEventListener("scroll",a,!0),e.subscribe("onBeforeLoad",l=>{o(l.fromLocation?s(l.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(s(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",l=>{const c=s(l.toLocation),u=e.options.scrollRestorationBehavior,h=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Xa=!0;try{const d=e.isScrollRestoring?n.state[c]:void 0;let f=!1;if(d)for(const p in d){const m=d[p];if(!Fr(m))continue;const{scrollX:g,scrollY:v}=m;if(!(!Number.isFinite(g)||!Number.isFinite(v))){if(p===di)window.scrollTo({top:v,left:g,behavior:u}),f=!0;else if(p){let y;try{y=document.querySelector(p)}catch{continue}y&&(y.scrollLeft=g,y.scrollTop=v,f=!0)}}}if(!f){const p=e.history.location.hash.slice(1);if(p){const m=window.history.state?.__hashScrollIntoViewOptions??!0;if(m){const g=document.getElementById(p);g&&g.scrollIntoView(m)}}else{const m={top:0,left:0,behavior:u};if(window.scrollTo(m),h)for(const g of h){if(g===di)continue;const v=typeof g=="function"?g():document.querySelector(g);v&&v.scrollTo(m)}}}}finally{Xa=!1}e.isScrollRestoring&&n.set(d=>(d[c]||={},d))}})}function c6(e,t=String){const n=new URLSearchParams;for(const s in e){const i=e[s];i!==void 0&&n.set(s,t(i))}return n.toString()}function _c(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function u6(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[s,i]of t.entries()){const a=n[s];a==null?n[s]=_c(i):Array.isArray(a)?a.push(_c(i)):n[s]=[a,_c(i)]}return n}const d6=p6(JSON.parse),h6=f6(JSON.stringify,JSON.parse);function p6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=u6(t);for(const s in n){const i=n[s];if(typeof i=="string")try{n[s]=e(i)}catch{}}return n}}function f6(e,t){const n=typeof t=="function";function s(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const a=c6(i,s);return a?`?${a}`:""}}const Is="__root__";function $l(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ct(e){return e instanceof Response&&!!e.options}function m6(e){return{input:({url:t})=>{for(const n of e)t=ud(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=W2(e[n],t);return t}}}function g6(e){const t=q2(e.basepath),n=`/${t}`,s=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?s:s.toLowerCase();return{input:({url:o})=>{const l=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return l===i?o.pathname="/":l.startsWith(a)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=So(["/",t,o.pathname]),o)}}function ud(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function W2(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function y6(e,t){const{createMutableStore:n,createReadonlyStore:s,batch:i,init:a}=t,o=new Map,l=new Map,c=new Map,u=n(e.status),h=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),g=n(e.statusCode),v=n(e.redirect),y=n([]),x=n([]),k=n([]),b=s(()=>zc(o,y.get())),T=s(()=>zc(l,x.get())),w=s(()=>zc(c,k.get())),E=s(()=>y.get()[0]),S=s(()=>y.get().some(Q=>o.get(Q)?.get().status==="pending")),A=s(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:u.get()})),C=s(()=>({status:u.get(),loadedAt:h.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:g.get(),redirect:v.get()})),R=ra(64);function L(Q){let _=R.get(Q);return _||(_=s(()=>{const B=y.get();for(const N of B){const V=o.get(N);if(V&&V.routeId===Q)return V.get()}}),R.set(Q,_)),_}const $={status:u,loadedAt:h,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:g,redirect:v,matchesId:y,pendingIds:x,cachedIds:k,matches:b,pendingMatches:T,cachedMatches:w,firstId:E,hasPending:S,matchRouteDeps:A,matchStores:o,pendingMatchStores:l,cachedMatchStores:c,__store:C,getRouteMatchStore:L,setMatches:U,setPending:W,setCached:ee};U(e.matches),a?.($);function U(Q){Fc(Q,o,y,n,i)}function W(Q){Fc(Q,l,x,n,i)}function ee(Q){Fc(Q,c,k,n,i)}return $}function zc(e,t){const n=[];for(const s of t){const i=e.get(s);i&&n.push(i.get())}return n}function Fc(e,t,n,s,i){const a=e.map(l=>l.id),o=new Set(a);i(()=>{for(const l of t.keys())o.has(l)||t.delete(l);for(const l of e){const c=t.get(l.id);if(!c){const u=s(l);u.routeId=l.routeId,t.set(l.id,u);continue}c.routeId=l.routeId,c.get()!==l&&c.set(l)}q5(n.get(),a)||n.set(a)})}const dd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},x6=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Dl=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),_s=(e,t,n=!0)=>{const s={...e.router.options.context??{}},i=n?t:t-1;for(let a=0;a<=i;a++){const o=e.matches[a];if(!o)continue;const l=e.router.getMatch(o.id);l&&Object.assign(s,l.__routeContext,l.__beforeLoadContext)}return s},w1=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,s=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),i=s>=0?s:0;let a=n?e.matches.findIndex(o=>o.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let o=a;o>=0;o--){const l=e.matches[o];if(e.router.looseRoutesById[l.routeId].options.notFoundComponent)return o}return n?a:i},Gn=(e,t,n)=>{if(!(!ct(n)&&!Ge(n)))throw ct(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:ct(n)?"redirected":Ge(n)?"notFound":s.status==="pending"?"success":s.status,context:_s(e,t.index),isFetching:!1,error:n})),Ge(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),ct(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},H2=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},b1=(e,t,n)=>{const s=_s(e,n);e.updateMatch(t,i=>({...i,context:s}))},hi=(e,t,n,s)=>{const{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=s,e.firstBadMatchIndex??=t,Gn(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(l){n=l,Gn(e,e.router.getMatch(i),n)}e.updateMatch(i,l=>(l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,l._nonReactive.loadPromise?.resolve(),{...l,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!ct(n)&&!Ge(n)&&(e.serialError??=n)},V2=(e,t,n,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Dl(e,t)&&(n.options.loader||n.options.beforeLoad||Q2(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const a=setTimeout(()=>{dd(e)},i);s._nonReactive.pendingTimeout=a}},v6=(e,t,n)=>{const s=e.router.getMatch(t);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;V2(e,t,n,s);const i=()=>{const a=e.router.getMatch(t);a.preload&&(a.status==="redirected"||a.status==="notFound")&&Gn(e,a,a.error)};return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(i):i()},k6=(e,t,n,s)=>{const i=e.router.getMatch(t);let a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Mr(()=>{a?.resolve(),a=void 0});const{paramsError:o,searchError:l}=i;o&&hi(e,n,o,"PARSE_PARAMS"),l&&hi(e,n,l,"VALIDATE_SEARCH"),V2(e,t,s,i);const c=new AbortController;let u=!1;const h=()=>{u||(u=!0,e.updateMatch(t,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,b=>({...b,isFetching:!1}))};if(!s.options.beforeLoad){e.router.batch(()=>{h(),d()});return}i._nonReactive.beforeLoadPromise=Mr();const f={..._s(e,n,!1),...i.__routeContext},{search:p,params:m,cause:g}=i,v=Dl(e,t),y={search:p,abortController:c,params:m,preload:v,context:f,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":g,matches:e.matches,routeId:s.id,...e.router.options.additionalContext},x=b=>{if(b===void 0){e.router.batch(()=>{h(),d()});return}(ct(b)||Ge(b))&&(h(),hi(e,n,b,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,T=>({...T,__beforeLoadContext:b})),d()})};let k;try{if(k=s.options.beforeLoad(y),sa(k))return h(),k.catch(b=>{hi(e,n,b,"BEFORE_LOAD")}).then(x)}catch(b){h(),hi(e,n,b,"BEFORE_LOAD")}x(k)},w6=(e,t)=>{const{id:n,routeId:s}=e.matches[t],i=e.router.looseRoutesById[s],a=()=>l(),o=()=>k6(e,n,t,i),l=()=>{if(H2(e,n))return;const c=v6(e,n,i);return sa(c)?c.then(o):o()};return a()},b6=(e,t,n)=>{const s=e.router.getMatch(t);if(!s||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([a,o,l])=>({meta:a?.meta,links:a?.links,headScripts:a?.scripts,headers:l,scripts:o,styles:a?.styles}))},K2=(e,t,n,s,i)=>{const a=t[s-1],{params:o,loaderDeps:l,abortController:c,cause:u}=e.router.getMatch(n),h=_s(e,s),d=Dl(e,n);return{params:o,deps:l,preload:!!d,parentMatchPromise:a,abortController:c,context:h,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:d?"preload":u,route:i,...e.router.options.additionalContext}},j1=async(e,t,n,s,i)=>{try{const a=e.router.getMatch(n);try{(!(z2??e.router.isServer)||a.ssr===!0)&&ia(i);const o=i.options.loader,l=typeof o=="function"?o:o?.handler,c=l?.(K2(e,t,n,s,i)),u=!!l&&sa(c);if((u||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,d=>({...d,isFetching:"loader"})),l){const d=u?await c:c;Gn(e,e.router.getMatch(n),d),d!==void 0&&e.updateMatch(n,f=>({...f,loaderData:d}))}i._lazyPromise&&await i._lazyPromise;const h=a._nonReactive.minPendingPromise;h&&await h,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,d=>({...d,error:void 0,context:_s(e,s),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(o){let l=o;if(l?.name==="AbortError"){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,u=>({...u,status:u.status==="pending"?"success":u.status,isFetching:!1,context:_s(e,s)}));return}const c=a._nonReactive.minPendingPromise;c&&await c,Ge(o)&&await i.options.notFoundComponent?.preload?.(),Gn(e,e.router.getMatch(n),o);try{i.options.onError?.(o)}catch(u){l=u,Gn(e,e.router.getMatch(n),u)}!ct(l)&&!Ge(l)&&await ia(i,["errorComponent"]),e.updateMatch(n,u=>({...u,error:l,context:_s(e,s),status:"error",isFetching:!1}))}}catch(a){const o=e.router.getMatch(n);o&&(o._nonReactive.loaderPromise=void 0),Gn(e,o,a)}},j6=async(e,t,n)=>{async function s(p,m,g,v,y){const x=Date.now()-m.updatedAt,k=p?y.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:y.options.staleTime??e.router.options.defaultStaleTime??0,b=y.options.shouldReload,T=typeof b=="function"?b(K2(e,t,i,n,y)):b,{status:w,invalid:E}=v,S=x>=k&&(!!e.forceStaleReload||v.cause==="enter"||g!==void 0&&g!==v.id);o=w==="success"&&(E||(T??S)),p&&y.options.preload===!1||(o&&!e.sync&&h?(l=!0,(async()=>{try{await j1(e,t,i,n,y);const A=e.router.getMatch(i);A._nonReactive.loaderPromise?.resolve(),A._nonReactive.loadPromise?.resolve(),A._nonReactive.loaderPromise=void 0,A._nonReactive.loadPromise=void 0}catch(A){ct(A)&&await e.router.navigate(A.options)}})()):w!=="success"||o?await j1(e,t,i,n,y):b1(e,i,n))}const{id:i,routeId:a}=e.matches[n];let o=!1,l=!1;const c=e.router.looseRoutesById[a],u=c.options.loader,h=((typeof u=="function"?void 0:u?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(H2(e,i)){if(!e.router.getMatch(i))return e.matches[n];b1(e,i,n)}else{const p=e.router.getMatch(i),m=e.router.stores.matchesId.get()[n],g=(m&&e.router.stores.matchStores.get(m)||null)?.routeId===a?m:e.router.stores.matches.get().find(y=>y.routeId===a)?.id,v=Dl(e,i);if(p._nonReactive.loaderPromise){if(p.status==="success"&&!e.sync&&!p.preload&&h)return p;await p._nonReactive.loaderPromise;const y=e.router.getMatch(i),x=y._nonReactive.error||y.error;x&&Gn(e,y,x),y.status==="pending"&&await s(v,p,g,y,c)}else{const y=v&&!e.router.stores.matchStores.has(i),x=e.router.getMatch(i);x._nonReactive.loaderPromise=Mr(),y!==x.preload&&e.updateMatch(i,k=>({...k,preload:y})),await s(v,p,g,x,c)}}const d=e.router.getMatch(i);l||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,l||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;const f=l?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,p=>({...p,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function S1(e){const t=e,n=[];x6(t.router)&&dd(t);let s;for(let f=0;f<t.matches.length;f++){try{const p=w6(t,f);sa(p)&&await p}catch(p){if(ct(p))throw p;if(Ge(p))s=p;else if(!t.preload)throw p;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,a=s&&!t.preload?w1(t,s):void 0,o=s&&t.preload?0:a!==void 0?Math.min(a+1,i):i;let l,c;for(let f=0;f<o;f++)n.push(j6(t,n,f));try{await Promise.all(n)}catch{const f=await Promise.allSettled(n);for(const p of f){if(p.status!=="rejected")continue;const m=p.reason;if(ct(m))throw m;Ge(m)?l??=m:c??=m}if(c!==void 0)throw c}const u=l??(s&&!t.preload?s:void 0);let h=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!u&&s&&t.preload)return t.matches;if(u){const f=w1(t,u);f===void 0&&jn();const p=t.matches[f],m=t.router.looseRoutesById[p.routeId],g=t.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&g&&(m.options.notFoundComponent=g),u.routeId=p.routeId;const v=p.routeId===t.router.routeTree.id;t.updateMatch(p.id,y=>({...y,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),h=f,await ia(m,["notFoundComponent"])}else if(!t.preload){const f=t.matches[0];f.globalNotFound||t.router.getMatch(f.id)?.globalNotFound&&t.updateMatch(f.id,p=>({...p,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const f=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await ia(f,["errorComponent"])}for(let f=0;f<=h;f++){const{id:p,routeId:m}=t.matches[f],g=t.router.looseRoutesById[m];try{const v=b6(t,p,g);if(v){const y=await v;t.updateMatch(p,x=>({...x,...y}))}}catch(v){console.error(`Error executing head for route ${m}:`,v)}}const d=dd(t);if(sa(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function N1(e,t){const n=t.map(s=>e.options[s]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function ia(e,t=No){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(s=>{const{id:i,...a}=s.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===No?(()=>{if(e._componentsPromise===void 0){const s=N1(e,No);s?e._componentsPromise=s.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():N1(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Q2(e){for(const t of No)if(e.options[t]?.preload)return!0;return!1}const No=["component","errorComponent","pendingComponent","notFoundComponent"];var os="__TSR_index",C1="popstate",E1="beforeunload";function S6(e){let t=e.getLocation();const n=new Set,s=o=>{t=e.getLocation(),n.forEach(l=>l({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?s(o):t=e.getLocation()},a=async({task:o,navigateOpts:l,...c})=>{if(l?.ignoreBlocker??!1){o();return}const u=e.getBlockers?.()??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const d of u){const f=al(c.path,c.state);if(await d.blockerFn({currentLocation:t,nextLocation:f,action:c.type})){e.onBlocked?.();return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,l,c)=>{const u=t.state[os];l=T1(u+1,l),a({task:()=>{e.pushState(o,l),s({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:l})},replace:(o,l,c)=>{const u=t.state[os];l=T1(u,l),a({task:()=>{e.replaceState(o,l),s({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:l})},go:(o,l)=>{a({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:l,type:"GO"})},back:o=>{a({task:()=>{e.back(o?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{a({task:()=>{e.forward(o?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[os]!==0,createHref:o=>e.createHref(o),block:o=>{if(!e.setBlockers)return()=>{};const l=e.getBlockers?.()??[];return e.setBlockers([...l,o]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(u=>u!==o))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:s}}function T1(e,t){t||(t={});const n=Wh();return{...t,key:n,__TSR_key:n,[os]:e}}function N6(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,s=t.history.replaceState;let i=[];const a=()=>i,o=S=>i=S,l=S=>S,c=()=>al(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!t.history.state?.__TSR_key&&!t.history.state?.key){const S=Wh();t.history.replaceState({[os]:0,key:S,__TSR_key:S},"")}let u=c(),h,d=!1,f=!1,p=!1,m=!1;const g=()=>u;let v,y;const x=()=>{v&&(E._ignoreSubscribers=!0,(v.isPush?t.history.pushState:t.history.replaceState)(v.state,"",v.href),E._ignoreSubscribers=!1,v=void 0,y=void 0,h=void 0)},k=(S,A,C)=>{const R=l(A);y||(h=u),u=al(A,C),v={href:R,state:C,isPush:v?.isPush||S==="push"},y||(y=Promise.resolve().then(()=>x()))},b=S=>{u=c(),E.notify({type:S})},T=async()=>{if(f){f=!1;return}const S=c(),A=S.state[os]-u.state[os],C=A===1,R=A===-1,L=!C&&!R||d;d=!1;const $=L?"GO":R?"BACK":"FORWARD",U=L?{type:"GO",index:A}:{type:R?"BACK":"FORWARD"};if(p)p=!1;else{const W=a();if(typeof document<"u"&&W.length){for(const ee of W)if(await ee.blockerFn({currentLocation:u,nextLocation:S,action:$})){f=!0,t.history.go(1),E.notify(U);return}}}u=c(),E.notify(U)},w=S=>{if(m){m=!1;return}let A=!1;const C=a();if(typeof document<"u"&&C.length)for(const R of C){const L=R.enableBeforeUnload??!0;if(L===!0){A=!0;break}if(typeof L=="function"&&L()===!0){A=!0;break}}if(A)return S.preventDefault(),S.returnValue=""},E=S6({getLocation:g,getLength:()=>t.history.length,pushState:(S,A)=>k("push",S,A),replaceState:(S,A)=>k("replace",S,A),back:S=>(S&&(p=!0),m=!0,t.history.back()),forward:S=>{S&&(p=!0),m=!0,t.history.forward()},go:S=>{d=!0,t.history.go(S)},createHref:S=>l(S),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=s,t.removeEventListener(E1,w,{capture:!0}),t.removeEventListener(C1,T)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(E1,w,{capture:!0}),t.addEventListener(C1,T),t.history.pushState=function(...S){const A=n.apply(t.history,S);return E._ignoreSubscribers||b("PUSH"),A},t.history.replaceState=function(...S){const A=s.apply(t.history,S);return E._ignoreSubscribers||b("REPLACE"),A},E}function C6(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function al(e,t){const n=C6(e),s=n.indexOf("#"),i=n.indexOf("?"),a=Wh();return{href:n,pathname:n.substring(0,s>0?i>0?Math.min(s,i):s:i>0?i:n.length),hash:s>-1?n.substring(s):"",search:i>-1?n.slice(i,s===-1?void 0:s):"",state:t||{[os]:0,key:a,__TSR_key:a}}}function Wh(){return(Math.random()+1).toString(36).substring(7)}function Er(e,t){const n=t,s=e;return{fromLocation:n,toLocation:s,pathChanged:n?.pathname!==s.pathname,hrefChanged:n?.href!==s.href,hashChanged:n?.hash!==s.hash}}var E6=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const s=this.options,i=this.basepath??s?.basepath??"/",a=this.basepath===void 0,o=s?.rewrite;if(this.options={...s,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=n6(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=N6()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let h;this.resolvePathCache=ra(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=y6(P6(this.latestLocation),h),l6(this)}let l=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(a||i!==c||o!==u){this.basepath=c;const h=[],d=q2(c);d&&d!=="/"&&h.push(g6({basepath:c})),u&&h.push(u),this.rewrite=h.length===0?void 0:h.length===1?h[0]:m6(h),this.history&&this.updateLatestLocation(),l=!0}l&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Y5(this.routeTree,this.options.caseSensitive,(s,i)=>{s.init({originalIndex:i})});return this.options.routeMasks&&H5(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,s)=>{const i={eventType:n,fn:s};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(s=>{s.eventType===n.type&&s.fn(n)})},this.parseLocation=(n,s)=>{const i=({pathname:c,search:u,hash:h,href:d,state:f})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const y=this.options.parseSearch(u),x=this.options.stringifySearch(y);return{href:c+x+h,publicHref:c+x+h,pathname:ui(c).path,external:!1,searchStr:x,search:vs(s?.search,y),hash:ui(h.slice(1)).path,state:Kn(s?.state,f)}}const p=new URL(d,this.origin),m=ud(this.rewrite,p),g=this.options.parseSearch(m.search),v=this.options.stringifySearch(g);return m.search=v,{href:m.href.replace(m.origin,""),publicHref:d,pathname:ui(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:v,search:vs(s?.search,g),hash:ui(m.hash.slice(1)).path,state:Kn(s?.state,f)}},a=i(n),{__tempLocation:o,__tempKey:l}=a.state;if(o&&(!l||l===this.tempLocationKey)){const c=i(o);return c.state.key=a.state.key,c.state.__TSR_key=a.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:a}}return a},this.resolvePathWithBase=(n,s)=>t6({base:n,to:s.includes("//")?qh(s):s,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,s,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:s},i):this.matchRoutesInternal(n,s),this.getMatchedRoutes=n=>R6({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const s=this.getMatch(n);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const s=this.stores.matchStores.get(n)?.get();s&&(s.status==="pending"||s.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const s=(a={})=>{const o=a._fromLocation||this.pendingBuiltLocation||this.latestLocation,l=this.matchRoutesLightweight(o);a.from;const c=a.unsafeRelative==="path"?o.pathname:a.from??l.fullPath,u=a.to?`${a.to}`:void 0,h=l.search,d=Object.assign(Object.create(null),l.params),f=u?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),p=u?this.resolvePathWithBase(f,u):f,m=a.params===!1||a.params===null?Object.create(null):(a.params??!0)===!0?d:Object.assign(d,Vn(a.params,d)),g=this.routesByPath[wn(p)];let v;if(g)v=this.getRouteBranch(g);else if(p.includes("$"))v=[];else{const R=this.getMatchedRoutes(p);v=R.matchedRoutes,this.options.notFoundRoute&&(!R.foundRoute||R.foundRoute.path!=="/"&&R.routeParams["**"])&&(v=[...v,this.options.notFoundRoute])}if(v.length&&M2(m))for(const R of v){const L=R.options.params?.stringify??R.options.stringifyParams;if(L)try{Object.assign(m,L(m))}catch{}}const y=n.leaveParams?p:ui(y1({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=h;if(n._includeValidateSearch&&this.options.search?.strict){const R={};v.forEach(L=>{if(L.options.validateSearch)try{Object.assign(R,Co(L.options.validateSearch,{...R,...x}))}catch{}}),x=R}x=A6({search:x,dest:a,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),x=vs(h,x);const k=this.options.stringifySearch(x),b=a.hash===!0?o.hash:a.hash?Vn(a.hash,o.hash):void 0,T=b?`#${b}`:"";let w=a.state===!0?o.state:a.state?Vn(a.state,o.state):{};w=Kn(o.state,w);const E=`${y}${k}${T}`;let S,A,C=!1;if(this.rewrite){const R=new URL(E,this.origin),L=W2(this.rewrite,R);S=R.href.replace(R.origin,""),L.origin!==this.origin?(A=L.href,C=!0):A=L.pathname+L.search+L.hash}else S=U5(E),A=S;return{publicHref:A,href:S,pathname:y,search:x,searchStr:k,state:w,hash:b??"",external:C,unmaskOnReload:a.unmaskOnReload}},i=(a={},o)=>{const l=s(a);let c=o?s(o):void 0;if(!c){const u=Object.create(null);if(this.options.routeMasks){const h=V5(l.pathname,this.processedTree);if(h){Object.assign(u,h.rawParams);const{from:d,params:f,...p}=h.route,m=f===!1||f===null?Object.create(null):(f??!0)===!0?u:Object.assign(u,Vn(f,u));o={from:n.from,...p,params:m},c=s(o)}}}return c&&(l.maskedLocation=c),l};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:s,...i})=>{const a=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{i.state[h]=this.latestLocation.state[h]});const u=Ls(i.state,this.latestLocation.state);return c.forEach(h=>{delete i.state[h]}),u},o=wn(this.latestLocation.href)===wn(i.href);let l=this.commitLocationPromise;if(this.commitLocationPromise=Mr(()=>{l?.resolve(),l=void 0}),o&&a())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,...h}=i;c&&(h={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:s})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:s,hashScrollIntoView:i,viewTransition:a,ignoreBlocker:o,href:l,...c}={})=>{if(l){const d=this.history.location.state.__TSR_index,f=al(l,{__TSR_index:n?d:d+1}),p=new URL(f.pathname,this.origin);c.to=ud(this.rewrite,p).pathname,c.search=this.options.parseSearch(f.search),c.hash=f.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const h=this.commitLocation({...u,viewTransition:a,replace:n,resetScroll:s,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:s,href:i,publicHref:a,...o})=>{let l=!1;if(i)try{new URL(`${i}`),l=!0}catch{}if(l&&!s&&(s=!0),s){if(n!==void 0||!i){const u=this.buildLocation({to:n,...o});i=i??u.publicHref,a=a??u.publicHref}const c=!l&&a?a:i;if(rl(c,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const h of u)if(h?.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),s=this.stores.cachedMatches.get().filter(i=>!n.some(a=>a.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(s)})},this.load=async n=>{let s,i,a;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad();const u=this.latestLocation,h=Er(u,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...h}),this.emit({type:"onBeforeLoad",...h}),await S1({router:this,sync:n?.sync,forceStaleReload:o.href===u.href,matches:this.stores.pendingMatches.get(),location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let d=null,f=null,p=null,m=null;this.batch(()=>{const g=this.stores.pendingMatches.get(),v=g.length,y=this.stores.matches.get();d=v?y.filter(b=>!this.stores.pendingMatchStores.has(b.id)):null;const x=new Set;for(const b of this.stores.pendingMatchStores.values())b.routeId&&x.add(b.routeId);const k=new Set;for(const b of this.stores.matchStores.values())b.routeId&&k.add(b.routeId);f=v?y.filter(b=>!x.has(b.routeId)):null,p=v?g.filter(b=>!k.has(b.routeId)):null,m=v?g.filter(b=>k.has(b.routeId)):y,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(g),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...d.filter(b=>b.status!=="error"&&b.status!=="notFound"&&b.status!=="redirected")]),this.clearExpiredCache())});for(const[g,v]of[[f,"onLeave"],[p,"onEnter"],[m,"onStay"]])if(g)for(const y of g)this.looseRoutesById[y.routeId].options[v]?.(y)})})}})}catch(u){ct(u)?(s=u,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):Ge(u)&&(i=u);const h=s?s.status:i?404:this.stores.matches.get().some(d=>d.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(h),this.stores.redirect.set(s)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.stores.matches.get().some(c=>c.status==="error")&&(l=500),l!==void 0&&this.stores.statusCode.set(l)},this.startViewTransition=n=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof s=="object"&&this.isViewTransitionTypesSupported){const a=this.latestLocation,o=this.stores.resolvedLocation.get(),l=typeof s.types=="function"?s.types(Er(a,o)):s.types;if(l===!1){n();return}i={update:n,types:l}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,s)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(s);return}const a=this.stores.matchStores.get(n);if(a){a.set(s);return}const o=this.stores.cachedMatchStores.get(n);if(o){const l=s(o.get());l.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(u=>u!==n)):o.set(l)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const s=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(s)),this.stores.setCached(this.stores.cachedMatches.get().map(s)),this.stores.setPending(this.stores.pendingMatches.get().map(s))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const s=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),a=this.getParsedLocationHref(i);n.options.href=a,n.headers.set("Location",a)}else if(s)try{const i=new URL(s);if(this.origin&&i.origin===this.origin){const a=i.pathname+i.search+i.hash;n.options.href=a,n.headers.set("Location",a)}}catch{}if(n.options.href&&!n.options._builtLocation&&rl(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const s=n?.filter;s!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!s(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),s=i=>{const a=this.looseRoutesById[i.routeId];if(!a.options.loader)return!0;const o=(i.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=o};this.clearCache({filter:s})},this.loadRouteChunk=ia,this.preloadRoute=async n=>{const s=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:n});const a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...a,...this.stores.cachedIds.get()]),l=i.filter(c=>!o.has(c.id));if(l.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...l])}try{return i=await S1({router:this,matches:i,location:s,preload:!0,updateMatch:(c,u)=>{a.has(c)?i=i.map(h=>h.id===c?u(h):h):this.updateMatch(c,u)}}),i}catch(c){if(ct(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:s});Ge(c)||console.error(c);return}},this.matchRoute=(n,s)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},a=this.buildLocation(i);if(s?.pending&&this.stores.status.get()!=="pending")return!1;const o=(s?.pending===void 0?!this.stores.isLoading.get():s.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=K5(a.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,o.pathname,this.processedTree);return!l||n.params&&!Ls(l.rawParams,n.params,{partial:!0})?!1:s?.includeSearch??!0?Ls(o.search,a.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??h6,parseSearch:e.parseSearch??d6,protocolAllowlist:e.protocolAllowlist??B5}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=B2(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const n=this.getMatchedRoutes(e.pathname),{foundRoute:s,routeParams:i}=n;let{matchedRoutes:a}=n,o=!1;(s?s.path!=="/"&&i["**"]:wn(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);const l=o?I6(this.options.notFoundMode,a):void 0,c=new Array(a.length),u=new Map;for(const h of this.stores.matchStores.values())h.routeId&&u.set(h.routeId,h.get());for(let h=0;h<a.length;h++){const d=a[h],f=c[h-1];let p,m,g;{const L=f?.search??e.search,$=f?._strictSearch??void 0;try{const U=Co(d.options.validateSearch,{...L})??void 0;p={...L,...U},m={...$,...U},g=void 0}catch(U){let W=U;if(U instanceof ol||(W=new ol(U.message,{cause:U})),t?.throwOnError)throw W;p=L,m={},g=W}}const v=d.options.loaderDeps?.({search:p})??"",y=v?JSON.stringify(v):"",{interpolatedPath:x,usedParams:k}=y1({path:d.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),b=d.id+x+y,T=this.getMatch(b),w=u.get(d.id),E=T?._strictParams??k;let S;if(!T)try{P1(d,E)}catch(L){if(Ge(L)||ct(L)?S=L:S=new T6(L.message,{cause:L}),t?.throwOnError)throw S}Object.assign(i,E);const A=w?"stay":"enter";let C;if(T)C={...T,cause:A,params:w?.params??i,_strictParams:E,search:vs(w?w.search:T.search,p),_strictSearch:m};else{const L=d.options.loader||d.options.beforeLoad||d.lazyFn||Q2(d)?"pending":"success";C={id:b,ssr:d.options.ssr,index:h,routeId:d.id,params:w?.params??i,_strictParams:E,pathname:x,updatedAt:Date.now(),search:w?vs(w.search,p):p,_strictSearch:m,searchError:void 0,status:L,isFetching:!1,error:void 0,paramsError:S,__routeContext:void 0,_nonReactive:{loadPromise:Mr()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:A,loaderDeps:w?Kn(w.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:d.options.staticData||{},fullPath:d.fullPath}}t?.preload||(C.globalNotFound=l===d.id),C.searchError=g;const R=this.getParentContext(f);C.context={...R,...C.__routeContext,...C.__beforeLoadContext},c[h]=C}for(let h=0;h<c.length;h++){const d=c[h],f=this.looseRoutesById[d.routeId],p=this.getMatch(d.id),m=u.get(d.routeId);if(d.params=m?vs(m.params,i):i,!p){const g=c[h-1],v=this.getParentContext(g);if(f.options.context){const y={deps:d.loaderDeps,params:d.params,context:v??{},location:e,navigate:x=>this.navigate({...x,_fromLocation:e}),buildLocation:this.buildLocation,cause:d.cause,abortController:d.abortController,preload:!!d.preload,matches:c,routeId:f.id};d.__routeContext=f.options.context(y)??void 0}d.context={...v,...d.__routeContext,...d.__beforeLoadContext}}}return c}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),s=na(t),i={...e.search};for(const u of t)try{Object.assign(i,Co(u.options.validateSearch,i))}catch{}const a=na(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),l=o&&o.routeId===s.id&&o.pathname===e.pathname;let c;if(l)c=o.params;else{const u=Object.assign(Object.create(null),n);for(const h of t)try{P1(h,u)}catch{}c=u}return{matchedRoutes:t,fullPath:s.fullPath,search:i,params:c}}},ol=class extends Error{},T6=class extends Error{};function P6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Co(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new ol("Async validation not supported");if(n.issues)throw new ol(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function R6({pathname:e,routesById:t,processedTree:n}){const s=Object.create(null),i=wn(e);let a;const o=Q5(i,n,!0);return o&&(a=o.route,Object.assign(s,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:s,foundRoute:a}}function A6({search:e,dest:t,destRoutes:n,_includeValidateSearch:s}){return L6(n)(e,t,s??!1)}function L6(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)i.options.search?.middlewares&&t.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const a=({search:o,next:l})=>{let c=o;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(c=i.options.preSearchFilters.reduce((h,d)=>d(h),o));const u=l(c);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((h,d)=>d(h),u):u};t.middlewares.push(a)}if(i.options.validateSearch){const a=({search:o,next:l})=>{const c=l(o);if(!t._includeValidateSearch)return c;try{return{...c,...Co(i.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(a)}}const n=({search:i})=>{const a=t.dest;return a.search?a.search===!0?i:Vn(a.search,i):{}};t.middlewares.push(n);const s=(i,a,o)=>{if(i>=o.length)return a;const l=o[i];return l({search:a,next:u=>s(i+1,u,o)})};return function(a,o,l){return t.dest=o,t._includeValidateSearch=l,s(0,a,t.middlewares)}}function I6(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const s=t[n];if(s.children)return s.id}return Is}function P1(e,t){const n=e.options.params?.parse??e.options.parseParams;if(n){const s=n(t);if(s===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,s)}}const _6="Error preloading route! ☝️";var G2=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const n=this.options,s=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Is:this.parentRoute||jn();let i=s?Is:n?.path;i&&i!=="/"&&(i=U2(i));const a=n?.id||i;let o=s?Is:So([this.parentRoute.id==="__root__"?"":this.parentRoute.id,a]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=So(["/",o]));const l=o==="__root__"?"/":So([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=l,this._to=wn(l)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>$l({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},z6=class extends G2{constructor(e){super(e)}};function F6(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const s=document.getElementById(t.hash);s&&s.scrollIntoView(n)}}}function Hh(e){const t=e.errorComponent??Vh;return r.jsx(M6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:s})=>n?j.createElement(t,{error:n,reset:s}):e.children})}var M6=class extends j.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Vh({error:e}){const[t,n]=j.useState(!1);return r.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[r.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),r.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(s=>!s),children:t?"Hide Error":"Show Error"})]}),r.jsx("div",{style:{height:".25rem"}}),t?r.jsx("div",{children:r.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?r.jsx("code",{children:e.message}):null})}):null]})}function O6({children:e,fallback:t=null}){return Y2()?r.jsx(Fi.Fragment,{children:e}):r.jsx(Fi.Fragment,{children:t})}function Y2(){return Fi.useSyncExternalStore($6,()=>!0,()=>!1)}function $6(){return()=>{}}var Z2=j.createContext(null);function Pt(e){return j.useContext(Z2)}var Bl=j.createContext(void 0),D6=j.createContext(void 0),we=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(we||{});function B6({update:e,notify:t,unwatched:n}){return{link:s,unlink:i,propagate:a,checkDirty:o,shallowPropagate:l};function s(u,h,d){const f=h.depsTail;if(f!==void 0&&f.dep===u)return;const p=f!==void 0?f.nextDep:h.deps;if(p!==void 0&&p.dep===u){p.version=d,h.depsTail=p;return}const m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===h)return;const g=h.depsTail=u.subsTail={version:d,dep:u,sub:h,prevDep:f,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=g),f!==void 0?f.nextDep=g:h.deps=g,m!==void 0?m.nextSub=g:u.subs=g}function i(u,h=u.sub){const d=u.dep,f=u.prevDep,p=u.nextDep,m=u.nextSub,g=u.prevSub;return p!==void 0?p.prevDep=f:h.depsTail=f,f!==void 0?f.nextDep=p:h.deps=p,m!==void 0?m.prevSub=g:d.subsTail=g,g!==void 0?g.nextSub=m:(d.subs=m)===void 0&&n(d),p}function a(u){let h=u.nextSub,d;e:do{const f=u.sub;let p=f.flags;if(p&60?p&12?p&4?!(p&48)&&c(u,f)?(f.flags=p|40,p&=1):p=0:f.flags=p&-9|32:p=0:f.flags=p|32,p&2&&t(f),p&1){const m=f.subs;if(m!==void 0){const g=(u=m).nextSub;g!==void 0&&(d={value:h,prev:d},h=g);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function o(u,h){let d,f=0,p=!1;e:do{const m=u.dep,g=m.flags;if(h.flags&16)p=!0;else if((g&17)===17){if(e(m)){const v=m.subs;v.nextSub!==void 0&&l(v),p=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,h=m,++f;continue}if(!p){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;f--;){const v=h.subs,y=v.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=v,p){if(e(h)){y&&l(v),h=u.sub;continue}p=!1}else h.flags&=-33;h=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return p}while(!0)}function l(u){do{const h=u.sub,d=h.flags;(d&48)===32&&(h.flags=d|16,(d&6)===2&&t(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let d=h.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function U6(e,t,n){const s=typeof e=="object",i=s?e:void 0;return{next:(s?e.next:e)?.bind(i),error:(s?e.error:t)?.bind(i),complete:(s?e.complete:n)?.bind(i)}}const hd=[];let Eo=0;const{link:R1,unlink:q6,propagate:W6,checkDirty:X2,shallowPropagate:A1}=B6({update(e){return e._update()},notify(e){hd[pd++]=e,e.flags&=~we.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=we.Mutable|we.Dirty,ll(e))}});let Ja=0,pd=0,rn,fd=0;function J2(e){try{++fd,e()}finally{--fd||ey()}}function ll(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=q6(n,e)}function ey(){if(!(fd>0)){for(;Ja<pd;){const e=hd[Ja];hd[Ja++]=void 0,e.notify()}Ja=0,pd=0}}function L1(e,t){const n=typeof e=="function",s=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?we.None:we.Mutable,get(){return rn!==void 0&&R1(i,rn,Eo),i._snapshot},subscribe(a){const o=U6(a),l={current:!1},c=H6(()=>{i.get(),l.current?o.next?.(i._snapshot):l.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(a){const o=rn,l=t?.compare??Object.is;if(n)rn=i,++Eo,i.depsTail=void 0;else if(a===void 0)return!1;n&&(i.flags=we.Mutable|we.RecursedCheck);try{const c=i._snapshot,u=typeof a=="function"?a(c):a===void 0&&n?s(c):a;return c===void 0||!l(c,u)?(i._snapshot=u,!0):!1}finally{rn=o,n&&(i.flags&=~we.RecursedCheck),ll(i)}}};return n?(i.flags=we.Mutable|we.Dirty,i.get=function(){const a=i.flags;if(a&we.Dirty||a&we.Pending&&X2(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&A1(o)}}else a&we.Pending&&(i.flags=a&~we.Pending);return rn!==void 0&&R1(i,rn,Eo),i._snapshot}):i.set=function(a){if(i._update(a)){const o=i.subs;o!==void 0&&(W6(o),A1(o),ey())}},i}function H6(e){const t=()=>{const s=rn;rn=n,++Eo,n.depsTail=void 0,n.flags=we.Watching|we.RecursedCheck;try{return e()}finally{rn=s,n.flags&=~we.RecursedCheck,ll(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:we.Watching|we.RecursedCheck,notify(){const s=this.flags;s&we.Dirty||s&we.Pending&&X2(this.deps,this)?t():this.flags=we.Watching},stop(){this.flags=we.None,this.depsTail=void 0,ll(this)}};return t(),n}var ty={exports:{}},ny={},sy={exports:{}},ry={};/**
|
|
41
|
-
* @license React
|
|
42
|
-
* use-sync-external-store-shim.production.js
|
|
43
|
-
*
|
|
44
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the MIT license found in the
|
|
47
|
-
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var Or=j;function V6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var K6=typeof Object.is=="function"?Object.is:V6,Q6=Or.useState,G6=Or.useEffect,Y6=Or.useLayoutEffect,Z6=Or.useDebugValue;function X6(e,t){var n=t(),s=Q6({inst:{value:n,getSnapshot:t}}),i=s[0].inst,a=s[1];return Y6(function(){i.value=n,i.getSnapshot=t,Mc(i)&&a({inst:i})},[e,n,t]),G6(function(){return Mc(i)&&a({inst:i}),e(function(){Mc(i)&&a({inst:i})})},[e]),Z6(n),n}function Mc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!K6(e,n)}catch{return!0}}function J6(e,t){return t()}var ek=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?J6:X6;ry.useSyncExternalStore=Or.useSyncExternalStore!==void 0?Or.useSyncExternalStore:ek;sy.exports=ry;var tk=sy.exports;/**
|
|
49
|
-
* @license React
|
|
50
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/var Ul=j,nk=tk;function sk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rk=typeof Object.is=="function"?Object.is:sk,ik=nk.useSyncExternalStore,ak=Ul.useRef,ok=Ul.useEffect,lk=Ul.useMemo,ck=Ul.useDebugValue;ny.useSyncExternalStoreWithSelector=function(e,t,n,s,i){var a=ak(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=lk(function(){function c(p){if(!u){if(u=!0,h=p,p=s(p),i!==void 0&&o.hasValue){var m=o.value;if(i(m,p))return d=m}return d=p}if(m=d,rk(h,p))return m;var g=s(p);return i!==void 0&&i(m,g)?(h=p,m):(h=p,d=g)}var u=!1,h,d,f=n===void 0?null:n;return[function(){return c(t())},f===null?void 0:function(){return c(f())}]},[t,n,s,i]);var l=ik(e,a[0],a[1]);return ok(function(){o.hasValue=!0,o.value=l},[l]),ck(l),l};ty.exports=ny;var uk=ty.exports;function dk(e,t){return e===t}function pt(e,t,n=dk){const s=j.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:l}=e.subscribe(o);return l},[e]),i=j.useCallback(()=>e?.get(),[e]);return uk.useSyncExternalStoreWithSelector(s,i,i,t,n)}var hk={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Gs(e){const t=Pt(),n=j.useContext(e.from?D6:Bl),s=e.from??n,i=s?e.from?t.stores.getRouteMatchStore(s):t.stores.matchStores.get(s):void 0,a=j.useRef(void 0);return pt(i??hk,o=>{if((e.shouldThrow??!0)&&!o&&jn(),o===void 0)return;const l=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=Kn(a.current,l);return a.current=c,c}return l})}function iy(e){return Gs({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ay(e){const{select:t,...n}=e;return Gs({...n,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function Kh(e){return Gs({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function xa(e){return Gs({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ys(e){const t=Pt();return j.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function oy(e){return Gs({...e,select:t=>e.select?e.select(t.context):t.context})}function pk(e,t){const n=Pt(),s=M5(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:l,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:g,children:v,target:y,disabled:x,style:k,className:b,onClick:T,onBlur:w,onFocus:E,onMouseEnter:S,onMouseLeave:A,onTouchStart:C,ignoreBlocker:R,params:L,search:$,hash:U,state:W,mask:ee,reloadDocument:Q,unsafeRelative:_,from:B,_fromLocation:N,...V}=e,X=Y2(),P=j.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ae=pt(n.stores.location,pe=>pe,(pe,z)=>pe.href===z.href),oe=j.useMemo(()=>{const pe={_fromLocation:ae,...P};return n.buildLocation(pe)},[n,ae,P]),re=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ke=oe.maskedLocation?oe.maskedLocation.external:oe.external,Oe=j.useMemo(()=>vk(re,ke,n.history,x),[x,ke,re,n.history]),me=j.useMemo(()=>{if(Oe?.external)return rl(Oe.href,n.protocolAllowlist)?void 0:Oe.href;if(!kk(l)&&!(typeof l!="string"||l.indexOf(":")===-1))try{return new URL(l),rl(l,n.protocolAllowlist)?void 0:l}catch{}},[l,Oe,n.protocolAllowlist]),_e=j.useMemo(()=>{if(me)return!1;if(o?.exact){if(!e6(ae.pathname,oe.pathname,n.basepath))return!1}else{const pe=il(ae.pathname,n.basepath),z=il(oe.pathname,n.basepath);if(!(pe.startsWith(z)&&(pe.length===z.length||pe[z.length]==="/")))return!1}return(o?.includeSearch??!0)&&!Ls(ae.search,oe.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?X&&ae.hash===oe.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,ae,me,X,oe.hash,oe.pathname,oe.search,n.basepath]),Xe=_e?Vn(i,{})??fk:Oc,Bt=_e?Oc:Vn(a,{})??Oc,_n=[b,Xe.className,Bt.className].filter(Boolean).join(" "),Js=(k||Xe.style||Bt.style)&&{...k,...Xe.style,...Bt.style},[Ut,zn]=j.useState(!1),Fn=j.useRef(!1),Jt=e.reloadDocument||me?!1:c??n.options.defaultPreload,en=u??n.options.defaultPreloadDelay??0,At=j.useCallback(()=>{n.preloadRoute({...P,_builtLocation:oe}).catch(pe=>{console.warn(pe),console.warn(_6)})},[n,P,oe]);F5(s,j.useCallback(pe=>{pe?.isIntersecting&&At()},[At]),xk,{disabled:!!x||Jt!=="viewport"}),j.useEffect(()=>{Fn.current||!x&&Jt==="render"&&(At(),Fn.current=!0)},[x,At,Jt]);const Xr=pe=>{const z=pe.currentTarget.getAttribute("target"),D=y!==void 0?y:z;if(!x&&!wk(pe)&&!pe.defaultPrevented&&(!D||D==="_self")&&pe.button===0){pe.preventDefault(),j2.flushSync(()=>{zn(!0)});const I=n.subscribe("onResolved",()=>{I(),zn(!1)});n.navigate({...P,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:g,ignoreBlocker:R})}};if(me)return{...V,ref:s,href:me,...v&&{children:v},...y&&{target:y},...x&&{disabled:x},...k&&{style:k},...b&&{className:b},...T&&{onClick:T},...w&&{onBlur:w},...E&&{onFocus:E},...S&&{onMouseEnter:S},...A&&{onMouseLeave:A},...C&&{onTouchStart:C}};const xs=pe=>{if(x||Jt!=="intent")return;if(!en){At();return}const z=pe.currentTarget;if(pi.has(z))return;const D=setTimeout(()=>{pi.delete(z),At()},en);pi.set(z,D)},Jr=pe=>{x||Jt!=="intent"||At()},er=pe=>{if(x||!Jt||!en)return;const z=pe.currentTarget,D=pi.get(z);D&&(clearTimeout(D),pi.delete(z))};return{...V,...Xe,...Bt,href:Oe?.href,ref:s,onClick:sr([T,Xr]),onBlur:sr([w,er]),onFocus:sr([E,xs]),onMouseEnter:sr([S,xs]),onMouseLeave:sr([A,er]),onTouchStart:sr([C,Jr]),disabled:!!x,target:y,...Js&&{style:Js},..._n&&{className:_n},...x&&mk,..._e&&gk,...X&&Ut&&yk}}var Oc={},fk={className:"active"},mk={role:"link","aria-disabled":!0},gk={"data-status":"active","aria-current":"page"},yk={"data-transitioning":"transitioning"},pi=new WeakMap,xk={rootMargin:"100px"},sr=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function vk(e,t,n,s){if(!s)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function kk(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Pe=j.forwardRef((e,t)=>{const{_asChild:n,...s}=e,{type:i,...a}=pk(s,t),o=typeof s.children=="function"?s.children({isActive:a["data-status"]==="active"}):s.children;if(!n){const{disabled:l,...c}=a;return j.createElement("a",c,o)}return j.createElement(n,a,o)});function wk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var bk=class extends G2{constructor(e){super(e),this.useMatch=t=>Gs({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>oy({...t,from:this.id}),this.useSearch=t=>xa({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Kh({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>ay({...t,from:this.id}),this.useLoaderData=t=>iy({...t,from:this.id}),this.useNavigate=()=>Ys({from:this.fullPath}),this.Link=Fi.forwardRef((t,n)=>r.jsx(Pe,{ref:n,from:this.fullPath,...t}))}};function $t(e){return new bk(e)}var jk=class extends z6{constructor(e){super(e),this.useMatch=t=>Gs({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>oy({...t,from:this.id}),this.useSearch=t=>xa({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Kh({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>ay({...t,from:this.id}),this.useLoaderData=t=>iy({...t,from:this.id}),this.useNavigate=()=>Ys({from:this.fullPath}),this.Link=Fi.forwardRef((t,n)=>r.jsx(Pe,{ref:n,from:this.fullPath,...t}))}};function Sk(e){return new jk(e)}function Nk(e){const t=Pt(),n=`not-found-${pt(t.stores.location,s=>s.pathname)}-${pt(t.stores.status,s=>s)}`;return r.jsx(Hh,{getResetKey:()=>n,onCatch:(s,i)=>{if(Ge(s))e.onCatch?.(s,i);else throw s},errorComponent:({error:s})=>{if(Ge(s))return e.fallback?.(s);throw s},children:e.children})}function Ck(){return r.jsx("p",{children:"Not Found"})}function or(e){return r.jsx(r.Fragment,{children:e.children})}function ly(e,t,n){return t.options.notFoundComponent?r.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?r.jsx(e.options.defaultNotFoundComponent,{...n}):r.jsx(Ck,{})}function Ek(e){return null}function Tk(){return Ek(Pt()),null}var cy=j.memo(function({matchId:t}){const n=Pt(),s=n.stores.matchStores.get(t);s||jn();const i=pt(n.stores.loadedAt,o=>o),a=pt(s,o=>o);return r.jsx(Pk,{router:n,matchId:t,resetKey:i,matchState:j.useMemo(()=>{const o=a.routeId,l=n.routesById[o].parentRoute?.id;return{routeId:o,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:l}},[a._displayPending,a.routeId,a.ssr,n.routesById])})});function Pk({router:e,matchId:t,resetKey:n,matchState:s}){const i=e.routesById[s.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?r.jsx(a,{}):null,l=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,h=s.ssr===!1||s.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||h)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||h))?j.Suspense:or,f=l?Hh:or,p=u?Nk:or;return r.jsxs(i.isRoot?i.options.shellComponent??or:or,{children:[r.jsx(Bl.Provider,{value:t,children:r.jsx(d,{fallback:o,children:r.jsx(f,{getResetKey:()=>n,errorComponent:l||Vh,onCatch:(m,g)=>{if(Ge(m))throw m.routeId??=s.routeId,m;c?.(m,g)},children:r.jsx(p,{fallback:m=>{if(m.routeId??=s.routeId,!u||m.routeId&&m.routeId!==s.routeId||!m.routeId&&!i.isRoot)throw m;return j.createElement(u,m)},children:h||s._displayPending?r.jsx(O6,{fallback:o,children:r.jsx(I1,{matchId:t})}):r.jsx(I1,{matchId:t})})})})}),s.parentRouteId===Is?r.jsxs(r.Fragment,{children:[r.jsx(Rk,{resetKey:n}),e.options.scrollRestoration&&z2?r.jsx(Tk,{}):null]}):null]})}function Rk({resetKey:e}){const t=Pt(),n=j.useRef(void 0);return wi(()=>{const s=t.latestLocation.href;(n.current===void 0||n.current!==s)&&(t.emit({type:"onRendered",...Er(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=s)},[t.latestLocation.state.__TSR_key,e,t]),null}var I1=j.memo(function({matchId:t}){const n=Pt(),s=(h,d)=>n.getMatch(h.id)?._nonReactive[d]??h._nonReactive[d],i=n.stores.matchStores.get(t);i||jn();const a=pt(i,h=>h),o=a.routeId,l=n.routesById[o],c=j.useMemo(()=>{const h=(n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:o,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return h?JSON.stringify(h):void 0},[o,a.loaderDeps,a._strictParams,a._strictSearch,n.options.defaultRemountDeps,n.routesById]),u=j.useMemo(()=>{const h=l.options.component??n.options.defaultComponent;return h?r.jsx(h,{},c):r.jsx(md,{})},[c,l.options.component,n.options.defaultComponent]);if(a._displayPending)throw s(a,"displayPendingPromise");if(a._forcePending)throw s(a,"minPendingPromise");if(a.status==="pending"){const h=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const d=n.getMatch(a.id);if(d&&!d._nonReactive.minPendingPromise){const f=Mr();d._nonReactive.minPendingPromise=f,setTimeout(()=>{f.resolve(),d._nonReactive.minPendingPromise=void 0},h)}}throw s(a,"loadPromise")}if(a.status==="notFound")return Ge(a.error)||jn(),ly(n,l,a.error);if(a.status==="redirected")throw ct(a.error)||jn(),s(a,"loadPromise");if(a.status==="error")throw a.error;return u}),md=j.memo(function(){const t=Pt(),n=j.useContext(Bl);let s,i=!1,a;{const u=n?t.stores.matchStores.get(n):void 0;[s,i]=pt(u,h=>[h?.routeId,h?.globalNotFound??!1]),a=pt(t.stores.matchesId,h=>h[h.findIndex(d=>d===n)+1])}const o=s?t.routesById[s]:void 0,l=t.options.defaultPendingComponent?r.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||jn(),ly(t,o,void 0);if(!a)return null;const c=r.jsx(cy,{matchId:a});return s===Is?r.jsx(j.Suspense,{fallback:l,children:c}):c});function Ak(){const e=Pt(),t=j.useRef({router:e,mounted:!1}),[n,s]=j.useState(!1),i=pt(e.stores.isLoading,d=>d),a=pt(e.stores.hasPending,d=>d),o=Rc(i),l=i||n||a,c=Rc(l),u=i||a,h=Rc(u);return e.startTransition=d=>{s(!0),j.startTransition(()=>{d(),s(!1)})},j.useEffect(()=>{const d=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return wn(e.latestLocation.publicHref)!==wn(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{d()}},[e,e.history]),wi(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(f){console.error(f)}})()},[e]),wi(()=>{o&&!i&&e.emit({type:"onLoad",...Er(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),wi(()=>{h&&!u&&e.emit({type:"onBeforeRouteMount",...Er(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,h,e]),wi(()=>{if(c&&!l){const d=Er(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),J2(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&F6(e)}},[l,c,e]),null}function Lk(){const e=Pt(),t=e.routesById[Is].options.pendingComponent??e.options.defaultPendingComponent,n=t?r.jsx(t,{}):null,s=r.jsxs(typeof document<"u"&&e.ssr?or:j.Suspense,{fallback:n,children:[r.jsx(Ak,{}),r.jsx(Ik,{})]});return e.options.InnerWrap?r.jsx(e.options.InnerWrap,{children:s}):s}function Ik(){const e=Pt(),t=pt(e.stores.firstId,i=>i),n=pt(e.stores.loadedAt,i=>i),s=t?r.jsx(cy,{matchId:t}):null;return r.jsx(Bl.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?s:r.jsx(Hh,{getResetKey:()=>n,errorComponent:Vh,onCatch:void 0,children:s})})}var _k=e=>({createMutableStore:L1,createReadonlyStore:L1,batch:J2}),zk=e=>new Fk(e),Fk=class extends E6{constructor(e){super(e,_k)}};function Mk({router:e,children:t,...n}){M2(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const s=r.jsx(Z2.Provider,{value:e,children:t});return e.options.Wrap?r.jsx(e.options.Wrap,{children:s}):s}function Ok({router:e,...t}){return r.jsx(Mk,{router:e,...t,children:r.jsx(Lk,{})})}function $k(e){const t=Pt({warn:e?.router===void 0}),n=e?.router||t,s=j.useRef(void 0);return pt(n.stores.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const a=Kn(s.current,e.select(i));return s.current=a,a}return e.select(i)}return i})}const $r="squad.console.token",aa=(()=>{const e=/^\/p\/([^/]+)/.exec(window.location.pathname);return e?decodeURIComponent(e[1]):null})(),gd=aa?`/p/${encodeURIComponent(aa)}`:"";function ql(e){return!gd||!e.startsWith("/api/")||e.startsWith("/api/v1/app/")?e:gd+e}function Dk(){const e=new URL(window.location.href),t=e.searchParams.get("t");return t?(sessionStorage.setItem($r,t),e.searchParams.delete("t"),window.history.replaceState({},"",e.toString()),t):sessionStorage.getItem($r)}class cl extends Error{constructor(){super("Session token missing or invalid. Reopen squad console."),this.name="UnauthorizedError"}}async function de(e,t){const n=sessionStorage.getItem($r);if(!n)throw new cl;const s=await fetch(ql(e),{...t,headers:{"content-type":"application/json",authorization:`Bearer ${n}`}});if(s.status===401)throw new cl;if(!s.ok){const i=await Bk(s);throw new Error(`${s.status} ${s.statusText}: ${i}`)}return await s.json()}async function Bk(e){try{return(await e.text()).slice(0,400)}catch{return""}}async function St(e,t,n={}){const s=sessionStorage.getItem($r);if(!s)throw new cl;const i=await fetch(ql(e),{method:t,headers:{"content-type":"application/json",authorization:`Bearer ${s}`},body:JSON.stringify(n)});if(i.status===401)throw new cl;const a=await i.json().catch(()=>({}));if(!i.ok)throw new Error(a.error??`${i.status} ${i.statusText}`);return a}function bt(e,t){const n=sessionStorage.getItem($r)??"";return`${ql(`/api/v1/tickets/${encodeURIComponent(e)}/file`)}?path=${encodeURIComponent(t.replace(/^file:\/\//,""))}&t=${encodeURIComponent(n)}`}function Yn(e){const t=sessionStorage.getItem($r)??"";return`${ql(e)}?t=${encodeURIComponent(t)}`}/**
|
|
57
|
-
* @license lucide-react v0.460.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const Uk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uy=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/**
|
|
62
|
-
* @license lucide-react v0.460.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/var qk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
67
|
-
* @license lucide-react v0.460.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Wk=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:a,iconNode:o,...l},c)=>j.createElement("svg",{ref:c,...qk,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:uy("lucide",i),...l},[...o.map(([u,h])=>j.createElement(u,h)),...Array.isArray(a)?a:[a]]));/**
|
|
72
|
-
* @license lucide-react v0.460.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const q=(e,t)=>{const n=j.forwardRef(({className:s,...i},a)=>j.createElement(Wk,{ref:a,iconNode:t,className:uy(`lucide-${Uk(e)}`,s),...i}));return n.displayName=`${e}`,n};/**
|
|
77
|
-
* @license lucide-react v0.460.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Hk=q("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
82
|
-
* @license lucide-react v0.460.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const ul=q("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
|
|
87
|
-
* @license lucide-react v0.460.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Vk=q("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
92
|
-
* @license lucide-react v0.460.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const hs=q("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
97
|
-
* @license lucide-react v0.460.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const dy=q("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
102
|
-
* @license lucide-react v0.460.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const Tn=q("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
|
|
107
|
-
* @license lucide-react v0.460.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const J=q("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
112
|
-
* @license lucide-react v0.460.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const hy=q("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
117
|
-
* @license lucide-react v0.460.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const Qh=q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
122
|
-
* @license lucide-react v0.460.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const Kk=q("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
127
|
-
* @license lucide-react v0.460.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const py=q("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
132
|
-
* @license lucide-react v0.460.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const va=q("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
137
|
-
* @license lucide-react v0.460.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const Qk=q("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
142
|
-
* @license lucide-react v0.460.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const Vr=q("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
147
|
-
* @license lucide-react v0.460.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const Gk=q("CornerLeftUp",[["polyline",{points:"14 9 9 4 4 9",key:"m9oyvo"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]);/**
|
|
152
|
-
* @license lucide-react v0.460.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const Pn=q("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
157
|
-
* @license lucide-react v0.460.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const ls=q("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
162
|
-
* @license lucide-react v0.460.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const fy=q("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
167
|
-
* @license lucide-react v0.460.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const Yk=q("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
172
|
-
* @license lucide-react v0.460.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const Zk=q("FolderCheck",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]]);/**
|
|
177
|
-
* @license lucide-react v0.460.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const Xk=q("FolderGit2",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);/**
|
|
182
|
-
* @license lucide-react v0.460.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const my=q("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
187
|
-
* @license lucide-react v0.460.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const Jk=q("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
192
|
-
* @license lucide-react v0.460.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const e8=q("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);/**
|
|
197
|
-
* @license lucide-react v0.460.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const t8=q("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
202
|
-
* @license lucide-react v0.460.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const n8=q("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
|
|
207
|
-
* @license lucide-react v0.460.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const s8=q("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
212
|
-
* @license lucide-react v0.460.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const r8=q("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
217
|
-
* @license lucide-react v0.460.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const i8=q("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
222
|
-
* @license lucide-react v0.460.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const a8=q("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
227
|
-
* @license lucide-react v0.460.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const o8=q("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
232
|
-
* @license lucide-react v0.460.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const hn=q("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
237
|
-
* @license lucide-react v0.460.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const l8=q("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
|
|
242
|
-
* @license lucide-react v0.460.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const Gh=q("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
247
|
-
* @license lucide-react v0.460.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const ka=q("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
|
|
252
|
-
* @license lucide-react v0.460.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const _1=q("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
257
|
-
* @license lucide-react v0.460.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const c8=q("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
|
|
262
|
-
* @license lucide-react v0.460.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const z1=q("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
267
|
-
* @license lucide-react v0.460.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const u8=q("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
272
|
-
* @license lucide-react v0.460.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const Wl=q("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
277
|
-
* @license lucide-react v0.460.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const Hl=q("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
282
|
-
* @license lucide-react v0.460.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const d8=q("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
287
|
-
* @license lucide-react v0.460.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const dl=q("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
|
|
292
|
-
* @license lucide-react v0.460.0 - ISC
|
|
293
|
-
*
|
|
294
|
-
* This source code is licensed under the ISC license.
|
|
295
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/const gy=q("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
297
|
-
* @license lucide-react v0.460.0 - ISC
|
|
298
|
-
*
|
|
299
|
-
* This source code is licensed under the ISC license.
|
|
300
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
-
*/const Yh=q("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
302
|
-
* @license lucide-react v0.460.0 - ISC
|
|
303
|
-
*
|
|
304
|
-
* This source code is licensed under the ISC license.
|
|
305
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
-
*/const Dr=q("PencilLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}],["path",{d:"m15 5 3 3",key:"1w25hb"}]]);/**
|
|
307
|
-
* @license lucide-react v0.460.0 - ISC
|
|
308
|
-
*
|
|
309
|
-
* This source code is licensed under the ISC license.
|
|
310
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
-
*/const yd=q("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
312
|
-
* @license lucide-react v0.460.0 - ISC
|
|
313
|
-
*
|
|
314
|
-
* This source code is licensed under the ISC license.
|
|
315
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
-
*/const Zh=q("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
317
|
-
* @license lucide-react v0.460.0 - ISC
|
|
318
|
-
*
|
|
319
|
-
* This source code is licensed under the ISC license.
|
|
320
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
-
*/const h8=q("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
322
|
-
* @license lucide-react v0.460.0 - ISC
|
|
323
|
-
*
|
|
324
|
-
* This source code is licensed under the ISC license.
|
|
325
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
-
*/const Yt=q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
327
|
-
* @license lucide-react v0.460.0 - ISC
|
|
328
|
-
*
|
|
329
|
-
* This source code is licensed under the ISC license.
|
|
330
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
-
*/const hl=q("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
332
|
-
* @license lucide-react v0.460.0 - ISC
|
|
333
|
-
*
|
|
334
|
-
* This source code is licensed under the ISC license.
|
|
335
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
-
*/const p8=q("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
|
337
|
-
* @license lucide-react v0.460.0 - ISC
|
|
338
|
-
*
|
|
339
|
-
* This source code is licensed under the ISC license.
|
|
340
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
-
*/const bi=q("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
|
|
342
|
-
* @license lucide-react v0.460.0 - ISC
|
|
343
|
-
*
|
|
344
|
-
* This source code is licensed under the ISC license.
|
|
345
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
-
*/const xd=q("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
347
|
-
* @license lucide-react v0.460.0 - ISC
|
|
348
|
-
*
|
|
349
|
-
* This source code is licensed under the ISC license.
|
|
350
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
-
*/const Kr=q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
352
|
-
* @license lucide-react v0.460.0 - ISC
|
|
353
|
-
*
|
|
354
|
-
* This source code is licensed under the ISC license.
|
|
355
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
-
*/const wa=q("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
357
|
-
* @license lucide-react v0.460.0 - ISC
|
|
358
|
-
*
|
|
359
|
-
* This source code is licensed under the ISC license.
|
|
360
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
-
*/const f8=q("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
362
|
-
* @license lucide-react v0.460.0 - ISC
|
|
363
|
-
*
|
|
364
|
-
* This source code is licensed under the ISC license.
|
|
365
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
-
*/const m8=q("Shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]);/**
|
|
367
|
-
* @license lucide-react v0.460.0 - ISC
|
|
368
|
-
*
|
|
369
|
-
* This source code is licensed under the ISC license.
|
|
370
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
-
*/const $c=q("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
372
|
-
* @license lucide-react v0.460.0 - ISC
|
|
373
|
-
*
|
|
374
|
-
* This source code is licensed under the ISC license.
|
|
375
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
-
*/const yy=q("SquareCheck",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
377
|
-
* @license lucide-react v0.460.0 - ISC
|
|
378
|
-
*
|
|
379
|
-
* This source code is licensed under the ISC license.
|
|
380
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
-
*/const F1=q("SquarePlus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
|
|
382
|
-
* @license lucide-react v0.460.0 - ISC
|
|
383
|
-
*
|
|
384
|
-
* This source code is licensed under the ISC license.
|
|
385
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
386
|
-
*/const oa=q("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
387
|
-
* @license lucide-react v0.460.0 - ISC
|
|
388
|
-
*
|
|
389
|
-
* This source code is licensed under the ISC license.
|
|
390
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
391
|
-
*/const Vl=q("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
392
|
-
* @license lucide-react v0.460.0 - ISC
|
|
393
|
-
*
|
|
394
|
-
* This source code is licensed under the ISC license.
|
|
395
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
396
|
-
*/const pl=q("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
397
|
-
* @license lucide-react v0.460.0 - ISC
|
|
398
|
-
*
|
|
399
|
-
* This source code is licensed under the ISC license.
|
|
400
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
401
|
-
*/const Xh=q("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
402
|
-
* @license lucide-react v0.460.0 - ISC
|
|
403
|
-
*
|
|
404
|
-
* This source code is licensed under the ISC license.
|
|
405
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
406
|
-
*/const g8=q("Triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]);/**
|
|
407
|
-
* @license lucide-react v0.460.0 - ISC
|
|
408
|
-
*
|
|
409
|
-
* This source code is licensed under the ISC license.
|
|
410
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
411
|
-
*/const xy=q("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
|
|
412
|
-
* @license lucide-react v0.460.0 - ISC
|
|
413
|
-
*
|
|
414
|
-
* This source code is licensed under the ISC license.
|
|
415
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
416
|
-
*/const y8=q("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
417
|
-
* @license lucide-react v0.460.0 - ISC
|
|
418
|
-
*
|
|
419
|
-
* This source code is licensed under the ISC license.
|
|
420
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
421
|
-
*/const vy=q("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
422
|
-
* @license lucide-react v0.460.0 - ISC
|
|
423
|
-
*
|
|
424
|
-
* This source code is licensed under the ISC license.
|
|
425
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
426
|
-
*/const vd=q("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
427
|
-
* @license lucide-react v0.460.0 - ISC
|
|
428
|
-
*
|
|
429
|
-
* This source code is licensed under the ISC license.
|
|
430
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
431
|
-
*/const Dt=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function x8(e){return e==="err"?null:3200}function v8(e,t){return t.kind==="err"&&e.some(n=>n.kind==="err"&&n.text===t.text)?e:[...e,t]}const ky=j.createContext(null);function wy(e){try{return localStorage.getItem(e)}catch{return null}}function M1(e,t){try{localStorage.setItem(e,t)}catch{}}function by(){const e=wy("sk.theme");return e==="light"||e==="dark"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function k8({children:e}){const[t,n]=j.useState(by),[s,i]=j.useState(wy("sk.commands")!=="off"),[a,o]=j.useState([]);j.useEffect(()=>{document.documentElement.dataset.theme=t,M1("sk.theme",t)},[t]);const l=j.useCallback(h=>o(d=>d.filter(f=>f.id!==h)),[]),c=j.useCallback((h,d="ok")=>{const f=Date.now()+Math.random();o(m=>v8(m,{id:f,text:h,kind:d}));const p=x8(d);p!==null&&setTimeout(()=>l(f),p)},[l]),u=j.useMemo(()=>({theme:t,toggleTheme:()=>n(h=>h==="light"?"dark":"light"),showCommands:s,toggleCommands:()=>i(h=>(M1("sk.commands",h?"off":"on"),!h)),toast:c}),[t,s,c]);return r.jsxs(ky.Provider,{value:u,children:[e,r.jsx("div",{className:"toasts",role:"status","aria-live":"polite",children:a.map(h=>h.kind==="err"?r.jsxs("div",{className:"toast err",role:"alert",children:[r.jsx(py,{size:16}),r.jsx("span",{className:"grow",children:h.text}),r.jsx("button",{className:"toast-x",onClick:()=>l(h.id),"aria-label":"Close this message",children:r.jsx(Dt,{size:15})})]},h.id):r.jsxs("div",{className:"toast",children:[r.jsx(J,{size:16}),h.text]},h.id))})]})}function Ce(){const e=j.useContext(ky);if(!e)throw new Error("usePrefs outside PrefsProvider");return e}const jy=900;function ft(){return he({queryKey:["board"],queryFn:()=>de("/api/v1/board"),refetchInterval:jy})}function ba(e){return he({queryKey:["ticket",e],queryFn:()=>de(`/api/v1/tickets/${e}`),enabled:!!e,refetchInterval:jy})}function w8(){return he({queryKey:["releases"],queryFn:()=>de("/api/v1/releases"),refetchInterval:2e3})}function b8(){return he({queryKey:["apps"],queryFn:()=>de("/api/v1/apps"),refetchInterval:5e3})}function Sy(){return he({queryKey:["app","settings"],queryFn:()=>de("/api/v1/app/settings"),refetchInterval:5e3})}function j8(){return he({queryKey:["architecture"],queryFn:()=>de("/api/v1/architecture"),refetchInterval:2e3})}function Y(){const e=Qs(),{toast:t}=Ce();return z5({mutationFn:({path:n,body:s,method:i="POST"})=>St(n,i,s),onSuccess:(n,s)=>{e.invalidateQueries(),s.done&&t(s.done)},onError:n=>t(n instanceof Error?n.message:String(n),"err")})}function Ny(){const{toast:e}=Ce(),[t,n]=j.useState(!1);return{restarting:t,restart:async()=>{n(!0);const i=await fetch("/healthz").then(o=>o.json()).catch(()=>({startedAt:void 0}));try{await St("/api/v1/restart","POST")}catch(o){n(!1),e(o instanceof Error?o.message:String(o),"err");return}const a=Date.now()+9e4;for(;Date.now()<a;){await new Promise(l=>setTimeout(l,1e3));const o=await fetch("/healthz").then(l=>l.json()).catch(()=>null);if(o?.startedAt&&o.startedAt!==i.startedAt){window.location.reload();return}}n(!1),e("The board did not come back. Run squad console in your terminal.","err")}}}function S8(){const{restarting:e,restart:t}=Ny();return r.jsxs("div",{className:"updatebar",role:"status",children:[r.jsx(hl,{size:15}),r.jsxs("span",{children:[r.jsx("b",{children:"squad-kit was updated."})," Restart the board to use the new version. Running work picks up where it stopped."]}),r.jsx("span",{className:"grow"}),r.jsx("button",{className:"btn sm pri",disabled:e,onClick:()=>void t(),children:e?"Restarting…":"Restart now"})]})}const zs={analyst:"Analyst",architect:"Architect",spec:"Spec writer",builder:"Builder",tester:"Tester",reviewer:"Reviewer",release:"Release",triage:"Triage",you:"You",squad:"Squad"},N8={analyst:Kr,architect:g8,spec:Yh,builder:va,tester:yy,reviewer:fy,release:hs,triage:Tn,you:y8,squad:vy};function Qr({role:e,small:t,size:n}){const s=N8[e];return r.jsx("span",{className:`glyph ${t?"sm":""} ${e==="you"?"you":""}`,title:zs[e],children:r.jsx(s,{size:n??(t?12:14),strokeWidth:2})})}function Z({text:e}){const{showCommands:t,toast:n}=Ce();if(!t)return null;const s=()=>{navigator.clipboard?.writeText(e).then(()=>n("Command copied"),()=>n("Could not copy. Select the text instead.","err"))};return r.jsxs("span",{className:"term",title:"The same action in the terminal",children:[r.jsx("b",{children:">_"}),r.jsx("span",{children:e}),r.jsx("button",{onClick:s,"aria-label":`Copy ${e}`,children:r.jsx(Vr,{size:13})})]})}const Dc=[{stage:"tickets",name:"Tickets"},{stage:"specs",name:"Specs"},{stage:"implement",name:"Implement"},{stage:"test",name:"Test"},{stage:"review",name:"Review"},{stage:"release",name:"Release"}];function C8({ticket:e}){const t=e.stage==="bugs"?"tickets":e.stage,n=t==="done"?Dc.length:Dc.findIndex(i=>i.stage===t),s=e.waiting?"you":"work";return r.jsx("div",{className:"track","aria-label":"Where this ticket is",children:Dc.map((i,a)=>{const o=a<n?"done":a===n?`cur ${s}`:"";return r.jsxs("div",{className:`ts ${o}`,children:[r.jsx("span",{className:"nd",children:a<n?r.jsx(J,{size:12,strokeWidth:3}):null}),i.name,a===n&&r.jsx("span",{className:"tag",children:s==="you"?"Your turn":e.stage==="release"?"Ready":"Working"})]},i.stage)})})}function it({title:e,onClose:t,children:n,footer:s,icon:i,wide:a}){return j.useEffect(()=>{const o=l=>l.key==="Escape"&&t();return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t]),r.jsx("div",{className:"modal-veil",onMouseDown:o=>o.target===o.currentTarget&&t(),children:r.jsxs("div",{className:`modal ${a?"wide":""}`,role:"dialog","aria-modal":"true","aria-label":e,children:[r.jsxs("header",{children:[i,r.jsx("h3",{children:e}),r.jsx("span",{className:"grow"}),r.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close",children:r.jsx(Dt,{size:16})})]}),r.jsx("div",{className:"mb",children:n}),s&&r.jsx("footer",{children:s})]})})}function qs(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}function Zs(e){return e?new Date(e).toLocaleDateString([],{day:"numeric",month:"short"}):""}function An(e){const t=Math.max(0,(Date.now()-Date.parse(e))/1e3);return t<60?"just now":t<3600?`${Math.round(t/60)} min ago`:t<86400?`${Math.round(t/3600)} h ago`:Zs(e)}function O1({text:e}){const t=e.split(/(\*\*[^*]+\*\*)/g);return r.jsx(r.Fragment,{children:t.map((n,s)=>n.startsWith("**")?r.jsx("strong",{children:n.slice(2,-2)},s):r.jsx("span",{children:n},s))})}function E8({notes:e}){return r.jsx("div",{className:"notes",children:e.split(`
|
|
432
|
-
`).map((t,n)=>t.startsWith("### ")?r.jsx("h4",{children:t.slice(4)},n):t.startsWith("- ")?r.jsxs("p",{children:["• ",r.jsx(O1,{text:t.slice(2)})]},n):t.trim()?r.jsx("p",{children:r.jsx(O1,{text:t})},n):null)})}function Jh(e){switch(e.waiting?.kind){case"questions":return`squad answer ${e.id}`;case"stuck":return`squad decide ${e.id}`;case"ask":return`squad reply ${e.id}`;case"yours":return`squad give-back ${e.id}`;case"chat":return`squad chat ${e.id}`;case"change":case"spec":case"plan":case"proof":return`squad approve ${e.id}`;default:return`squad watch ${e.id}`}}function ep(e){const t=e.outdated??[];return t.length===1?`${t[0].adr} came after this plan and changes it`:`${t.map(n=>n.adr).join(" and ")} came after this plan and change it`}function fl(e){switch(e.waiting?.kind){case"questions":return"Answer";case"spec":return"Review spec";case"plan":return e.specApproved?"Review design":"Review plan";case"proof":return"Check proof";case"stuck":return"Decide";case"ask":return"Answer";case"yours":return"Give back";case"chat":return"Open chat";case"change":return"Review design update";default:return"Open"}}const cs={tickets:"Tickets",specs:"Specs",implement:"Implement",test:"Test",review:"Review",release:"Release",bugs:"Bugs",done:"Released"},Cy=["app","update"],tp=["waiting","installing","restarting"];function np(){const e=he({queryKey:Cy,queryFn:()=>de("/api/v1/app/update"),refetchInterval:s=>tp.includes(s.state.data?.progress.state??"idle")?1e3:6e4}),t=j.useRef(null),n=e.data?.startedAt;return j.useEffect(()=>{n&&(t.current&&t.current!==n&&window.location.reload(),t.current??=n)},[n]),e}function ja(){const e=Qs(),{toast:t}=Ce(),[n,s]=j.useState(!1);return{pending:n,call:async(a,o,l={})=>{s(!0);try{const c=await St(a,o,l);return e.setQueryData(Cy,c),c}catch(c){return t(c instanceof Error?c.message:String(c),"err"),null}finally{s(!1)}}}}function kd(e=[]){const t=[...new Set(e.map(n=>n.ticket??`the Architect in ${n.project}`))];return t.length<=1?t[0]??"":t.length<=3?`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`:`${t.slice(0,2).join(", ")} and ${t.length-2} more`}function T8(e){const t=new Date(e),n=a=>a.toDateString(),s=new Date(Date.now()-864e5);return`${n(t)===n(new Date)?"Today":n(t)===n(s)?"Yesterday":t.toLocaleDateString([],{day:"numeric",month:"short"})} at ${qs(e)}`}function sp({text:e}){const{toast:t}=Ce(),n=()=>{const s=navigator.clipboard?.writeText(e);if(!s)return t("Could not copy. Select the text instead.","err");s.then(()=>t("Command copied"),()=>t("Could not copy. Select the text instead.","err"))};return r.jsxs("div",{className:"upd-cmd",children:[r.jsxs("span",{className:"term",children:[r.jsx("b",{children:">_"}),r.jsx("span",{children:e})]}),r.jsxs("button",{className:"btn sm",onClick:n,children:[r.jsx(Vr,{size:13})," Copy"]})]})}function Ey({lines:e}){return e?.length?r.jsx("ul",{className:"upd-notes","aria-label":"What is new",children:e.slice(0,3).map(t=>r.jsx("li",{children:t},t))}):null}function Ty(){const{data:e}=np();if(!e)return null;const t=e.progress.state;return tp.includes(t)?r.jsx(R8,{s:e}):t==="done"?r.jsx(A8,{s:e}):t==="failed"?r.jsx(L8,{s:e}):!e.newer||!e.latest||e.later===e.latest?null:r.jsx(P8,{s:e})}function P8({s:e}){const{pending:t,call:n}=ja(),s=e.devInstall||e.major;return r.jsxs("section",{className:"upd","aria-label":"A new squad-kit",children:[r.jsx("span",{className:"upd-ic",children:r.jsx(hs,{size:16})}),r.jsxs("div",{className:"upd-main",children:[r.jsxs("b",{className:"upd-title",children:["squad-kit ",e.latest," is ready"]}),r.jsx(Ey,{lines:e.notes}),r.jsx("span",{className:"upd-sub",children:e.devInstall?"This squad-kit runs from its source folder, so it does not update itself. To use the new version, run:":e.major?`A big change from ${e.current}. Read what is new first, then run this in a terminal:`:`You have ${e.current}. Takes about a minute. Your tickets and work are kept.`}),s&&r.jsx(sp,{text:e.command})]}),r.jsxs("div",{className:"upd-acts",children:[!s&&r.jsxs("button",{className:"btn sm pri",disabled:t,onClick:()=>void n("/api/v1/app/update","POST"),children:[r.jsx(hs,{size:14})," Update now"]}),(!e.notes?.length||s)&&r.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"What is new"}),r.jsx("button",{className:"btn sm",disabled:t,onClick:()=>void n("/api/v1/app/update","PUT",{later:e.latest}),children:"Later"}),!s&&r.jsx(Z,{text:"squad upgrade"})]})]})}function R8({s:e}){const t=e.progress,{pending:n,call:s}=ja(),i=tp.indexOf(t.state),a=u=>u<i?"done":u===i?"now":"todo",o=t.now?"Stopped the running steps":t.waitedFor?.length?`Waited for ${kd(t.waitedFor)} to finish ${t.waitedFor.length===1?"its step":"their steps"}`:"No work was in the middle of a step",l=t.busy?.length?`${kd(t.busy)} ${t.busy.length===1?"is":"are"} in the middle of a step`:"Almost there",c=[{label:i>0?o:"Waiting for running work to reach a safe point",note:i===0?l:t.now?"They pick up again after the restart":"Nothing was cut off"},{label:i>1?`Installed squad-kit ${t.to}`:`Installing squad-kit ${t.to}`,note:i===1?"Takes about a minute":i>1?"Done":"Next"},{label:"Restarting the app",note:i===2?"This page reloads on its own":"Same link, same tickets"},{label:"Picking up where each ticket was",note:"Nothing is lost"}];return r.jsxs("section",{className:"upd steps","aria-label":`Updating to squad-kit ${t.to}`,"aria-live":"polite",children:[r.jsxs("div",{className:"upd-head",children:[r.jsxs("b",{className:"upd-title",children:["Updating to squad-kit ",t.to]}),r.jsx("span",{className:"upd-sub",children:t.state==="waiting"?"squad-kit waits until no agent is in the middle of a step, so no work is cut off.":"Takes about a minute. Your tickets and work are kept."}),t.state==="waiting"&&r.jsxs("span",{className:"upd-acts",children:[r.jsx("button",{className:"btn sm pri",disabled:n,onClick:()=>void s("/api/v1/app/update","POST",{now:!0}),title:"Running steps stop now and pick up again after the restart",children:"Update now anyway"}),r.jsx("button",{className:"btn sm",disabled:n,onClick:()=>void s("/api/v1/app/update","DELETE"),children:"Not now"})]})]}),r.jsx("ol",{className:"setup-steps",children:c.map((u,h)=>r.jsxs("li",{className:a(h),children:[r.jsx("span",{className:"mark",children:a(h)==="done"?r.jsx(J,{size:12,strokeWidth:3}):a(h)==="now"?r.jsx("span",{className:"live"}):null}),r.jsxs("span",{className:"txt",children:[r.jsx("b",{children:u.label}),r.jsx("small",{title:u.note,children:u.note})]})]},u.label))}),r.jsx("div",{className:"setup-bar","aria-hidden":!0,children:r.jsx("i",{})})]})}function A8({s:e}){const{pending:t,call:n}=ja(),s=e.progress.carried??[];return r.jsxs("section",{className:"upd","aria-label":`You are on squad-kit ${e.current}`,children:[r.jsx("span",{className:"upd-ic ok",children:r.jsx(J,{size:16,strokeWidth:2.6})}),r.jsxs("div",{className:"upd-main",children:[r.jsxs("b",{className:"upd-title",children:["You are on squad-kit ",e.current]}),r.jsx("span",{className:"upd-sub",children:s.length?`${kd(s)} carried on where ${s.length===1?"it was":"they were"}. Nothing was lost.`:"Your tickets and work are kept."}),r.jsx(Ey,{lines:e.notes})]}),r.jsxs("div",{className:"upd-acts",children:[r.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"Read what is new"}),r.jsx("button",{className:"btn sm",disabled:t,onClick:()=>void n("/api/v1/app/update","DELETE"),children:"Close"})]})]})}function L8({s:e}){const t=e.progress,{pending:n,call:s}=ja();return r.jsxs("section",{className:"upd failed",role:"alert","aria-label":"squad-kit could not update by itself",children:[r.jsx("span",{className:"upd-ic",children:r.jsx(s8,{size:16})}),r.jsxs("div",{className:"upd-main",children:[r.jsx("b",{className:"upd-title",children:"Could not update by itself"}),r.jsxs("span",{className:"upd-sub",children:[t.reason," ",t.permission?"Run this once in a terminal, then press Restart:":"Try again, or run this in a terminal, then press Restart:"]}),r.jsx(sp,{text:e.command}),t.output&&r.jsxs("details",{className:"upd-out",children:[r.jsx("summary",{children:"What the installer said"}),r.jsx("pre",{children:t.output})]})]}),r.jsxs("div",{className:"upd-acts",children:[r.jsxs("button",{className:"btn sm pri",disabled:n,onClick:()=>void s("/api/v1/app/update/restart","POST"),children:[r.jsx(hl,{size:14})," Restart"]}),!t.permission&&r.jsx("button",{className:"btn sm",disabled:n,onClick:()=>void s("/api/v1/app/update","POST"),children:"Try again"}),r.jsx("button",{className:"btn sm",disabled:n,onClick:()=>void s("/api/v1/app/update","DELETE"),children:"Not now"})]})]})}function Py(){const{data:e}=np(),{pending:t,call:n}=ja(),{toast:s}=Ce();if(!e)return null;const i=async()=>{const o=await n("/api/v1/app/update/check","POST");o&&(o.checkError?s(o.checkError,"err"):s(o.newer?`squad-kit ${o.latest} is ready`:`You are on the latest version (${o.current})`))},a=e.newer&&!e.devInstall&&!e.major&&e.progress.state==="idle";return r.jsxs("div",{className:"about",children:[r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Version"}),r.jsxs("span",{className:"about-row",children:[r.jsx("b",{children:e.current}),e.newer?r.jsxs("span",{className:"pill you",children:[e.latest," is ready"]}):e.checkedAt&&!e.checkError?r.jsx("span",{className:"pill ok",children:"Up to date"}):null,e.devInstall&&r.jsx("span",{className:"pill",children:"Source folder"})]})]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Last checked"}),r.jsxs("span",{className:"about-row",children:[e.checkedAt?T8(e.checkedAt):"Not yet",e.checkError&&r.jsx("span",{className:"note bad",children:e.checkError})]})]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Updates"}),r.jsxs("span",{className:"about-row",children:[r.jsxs("label",{className:"about-daily",children:[r.jsx("input",{type:"checkbox",checked:e.daily,disabled:t,onChange:o=>void n("/api/v1/app/update","PUT",{daily:o.target.checked})}),"Check for updates every day"]}),r.jsx("span",{className:"note",children:"Turn it off on a network without internet."})]})]}),r.jsxs("div",{className:"about-acts",children:[r.jsx("button",{className:"btn sm",disabled:t,onClick:()=>void i(),children:t?"Checking…":"Check for updates"}),r.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"Release notes"}),a&&r.jsxs("button",{className:"btn sm pri",disabled:t,onClick:()=>void n("/api/v1/app/update","POST"),children:[r.jsx(hs,{size:14})," Update to ",e.latest]}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:"squad upgrade"})]}),e.newer&&(e.devInstall||e.major)&&r.jsx(sp,{text:e.command})]})}function I8(){const{data:e}=np(),[t,n]=j.useState(!1);return r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn sm",onClick:()=>n(!0),title:"Version and updates",children:[e?`squad-kit ${e.current}`:"About",e?.newer&&r.jsx("span",{className:"about-dot","aria-label":`${e.latest} is ready`})]}),t&&r.jsx(it,{title:"About squad-kit",onClose:()=>n(!1),children:r.jsx(Py,{})})]})}function Sa(e){const t=e.changes?.at(-1);return t&&t.status!=="done"&&t.status!=="declined"?t:void 0}function on(e){const t=Sa(e)?.status;return t==="proposed"||t==="failed"||t==="design-ready"}function Ws(e){return e.stage==="release"||e.stage==="done"}function rp(e){return Ws(e)||!!e.specApproved||["implement","test","review"].includes(e.stage)}function _8(e){return e.part==="story"?"The story":e.index===void 0?"New done when":`Done when ${e.index+1}`}function wd(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`:String(e[0]??"")}function $1({parts:e}){return r.jsx("div",{className:"changeparts",children:e.map((t,n)=>r.jsxs("div",{className:"chrow",children:[r.jsx("div",{className:"chlabel",children:_8(t)}),r.jsx("div",{className:t.before?"chold":"chold empty",children:t.before||r.jsx("i",{children:"new"})}),r.jsx("div",{className:"chnew",children:t.after||r.jsx("i",{children:"removed"})})]},n))})}const D1={same:"Stays",changed:"Redone",new:"New"};function z8({c:e}){const t=e.design,n=t.before.filter(i=>!t.steps.some(a=>a.title===i)),s=t.steps.flatMap((i,a)=>i.change==="same"?[a+1]:[]);return r.jsxs("div",{className:"changeparts",children:[s.length>0&&r.jsxs("div",{className:"chrow",children:[r.jsxs("div",{className:"chlabel",children:[s.length===1?"Step":"Steps"," ",wd(s)]}),r.jsx("div",{children:r.jsx("span",{className:"pill wait",children:D1.same})}),r.jsx("div",{className:"chnew note",children:"Built already, as they are."})]}),t.steps.map((i,a)=>i.change==="same"?null:r.jsxs("div",{className:"chrow",children:[r.jsxs("div",{className:"chlabel",children:["Step ",a+1]}),r.jsx("div",{children:r.jsx("span",{className:"pill you",children:D1[i.change]})}),r.jsx("div",{className:"chnew",children:i.title})]},a)),n.map(i=>r.jsxs("div",{className:"chrow",children:[r.jsx("div",{className:"chlabel",children:"Dropped"}),r.jsx("div",{}),r.jsx("div",{className:"chold",children:i})]},i))]})}function F8(e,t){const n=!!e.sessions?.build;return t.size==="big"?n?"Approve, and the Builder pauses after its current step. The Architect updates the design and you approve that too. Then the Builder redoes only the steps the change touches.":e.steps?"Approve, and the spec says it now. The Architect updates the design, and you approve it as usual.":"Approve, and the spec says it now. The Architect designs from the new spec.":n?"Approve, and the spec says it now. The Builder gets it at the end of its current step; the work does not stop.":"Approve, and the spec says it now. The Builder builds from the new spec."}function M8({t:e}){const t=Y(),[n,s]=j.useState(!1),[i,a]=j.useState(!1),[o,l]=j.useState(""),c=Sa(e);if(!c)return null;const u=c.status==="approved"||c.status==="designing",h=c.status==="writing"||c.status==="designing"||c.status==="building",d=(e.steps??[]).flatMap((m,g)=>m.status==="done"?[]:[g+1]),f={writing:`Change ${c.id}: the Analyst is writing it into the spec`,failed:`Change ${c.id}: the Analyst could not write it`,proposed:`Change ${c.id} to the spec`,approved:`Change ${c.id} is approved`,designing:`Change ${c.id}: the Architect is updating the design`,"design-ready":`The design update for change ${c.id}`,building:c.size==="big"?`Change ${c.id}: the Builder is redoing ${d.length===1?"step":"steps"} ${wd(d)}`:`Change ${c.id}: the Builder is making it`,done:"",declined:""}[c.status],p=(m,g,v)=>t.mutate({path:`/api/v1/tickets/${e.id}/spec-change/${m}`,body:v,done:g},{onSuccess:()=>{s(!1),a(!1)}});return r.jsx("div",{className:"outdated","aria-label":"Change to the spec",children:r.jsxs("div",{className:"outdated-item changecard",children:[r.jsxs("div",{className:"outdated-head",children:[r.jsx("span",{className:"ic",children:h?r.jsx(hn,{size:15,className:"spin"}):c.status==="failed"?r.jsx(Xh,{size:15}):r.jsx(Dr,{size:15})}),r.jsx("b",{children:f}),c.size&&r.jsx("span",{className:`pill ${c.size==="big"?"you":"wait"}`,children:c.size==="big"?"Big change":"Small change"})]}),r.jsxs("div",{className:"changebody",children:[c.summary?r.jsx("p",{children:c.summary}):r.jsxs("p",{children:["“",c.ask,"”"]}),c.status==="writing"&&r.jsx("p",{className:"note",children:"The work goes on meanwhile. Nothing changes until you approve it."}),c.status==="failed"&&r.jsx("p",{className:"note",children:c.error}),c.why&&(c.status==="proposed"||c.status==="approved")&&r.jsx("p",{className:"note",children:c.why}),c.status==="proposed"&&c.parts&&r.jsx($1,{parts:c.parts}),c.status==="proposed"&&r.jsx("p",{className:"note",children:F8(e,c)}),c.status==="approved"&&r.jsx("p",{className:"note",children:c.size==="big"?"The Builder finishes its current step, then pauses while the Architect updates the design.":"It reaches the Builder at the end of its current step. The work goes on."}),c.status==="designing"&&r.jsx("p",{className:"note",children:"The Builder paused after its step. The design update comes to you next."}),c.status==="design-ready"&&c.design&&r.jsxs(r.Fragment,{children:[c.design.summary&&r.jsx("p",{children:c.design.summary}),r.jsx(z8,{c}),c.parts&&r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"note",children:"And the spec, as you approved it:"}),r.jsx($1,{parts:c.parts})]}),r.jsxs("p",{className:"note",children:["Approve, and the Builder redoes only ",(()=>{const m=c.design.steps.flatMap((g,v)=>g.change==="same"?[]:[v+1]);return m.length?`${m.length===1?"step":"steps"} ${wd(m)}`:"what changed"})(),". Decline, and the spec stays as it was; the Builder carries on."]})]})]}),i?r.jsxs("div",{className:"row",children:[r.jsx("input",{className:"input",autoFocus:!0,value:o,onChange:m=>l(m.target.value),placeholder:"Why take it back? (optional, it stays in the spec's record)"}),r.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>p("withdraw","Withdrawn. The spec is back to how it was.",{reason:o}),children:"Withdraw"}),r.jsx("button",{className:"btn sm quiet",onClick:()=>a(!1),children:"Cancel"})]}):u?r.jsxs("div",{className:"row",children:[r.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>a(!0),children:"Withdraw change"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad propose ${e.id} --withdraw`})]}):n?r.jsxs("div",{className:"row",children:[r.jsx("input",{className:"input",autoFocus:!0,value:o,onChange:m=>l(m.target.value),placeholder:"Why not? (optional, it stays in the spec's record)"}),r.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>p("decline","Declined. Nothing changes.",{reason:o}),children:"Decline"}),r.jsx("button",{className:"btn sm quiet",onClick:()=>s(!1),children:"Cancel"})]}):c.status==="proposed"||c.status==="design-ready"?r.jsxs("div",{className:"row",children:[r.jsxs("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>p("approve",c.status==="design-ready"?"Approved. The Builder redoes what changed.":c.size==="big"?"Approved. The Architect updates the design next.":"Approved. The spec says it now."),children:[r.jsx(J,{size:14,strokeWidth:2.5})," ",c.status==="design-ready"?"Approve the new design":"Approve"]}),r.jsx("button",{className:"btn sm",onClick:()=>s(!0),children:c.status==="design-ready"?"Decline the change":"Decline"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:c.status==="design-ready"?`squad approve ${e.id}`:`squad propose ${e.id} --approve`})]}):c.status==="failed"?r.jsxs("div",{className:"row",children:[r.jsx("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>p("retry","The Analyst writes it again."),children:"Try again"}),r.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>p("decline","Dropped the change."),children:"Drop it"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad propose ${e.id} --retry`})]}):null]})})}function ip({t:e,initial:t="",from:n,onClose:s}){const i=Y(),[a,o]=j.useState(t),l=Ws(e),c=Sa(e),u=!!a.trim()&&!i.isPending,h=`"${a.trim().replace(/"/g,'\\"')||"…"}"`,d=f=>i.mutate({path:`/api/v1/tickets/${e.id}/spec-change/new-ticket`,body:{text:a,as:f},done:f==="bug"?`Reported a bug, linked to ${e.id}.`:`Made a new ticket, linked to ${e.id}.`},{onSuccess:s});return r.jsxs(it,{title:l?"Ask for a change":"Propose a change",icon:r.jsx(Dr,{size:16}),onClose:s,footer:r.jsxs(r.Fragment,{children:[l?r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn pri",disabled:!u,onClick:()=>d("ticket"),children:[r.jsx(Yt,{size:15})," Make a new linked ticket"]}),r.jsxs("button",{className:"btn",disabled:!u,onClick:()=>d("bug"),children:[r.jsx(Tn,{size:15})," Report a bug"]})]}):r.jsxs("button",{className:"btn pri",disabled:!u||!!c,onClick:()=>i.mutate({path:`/api/v1/tickets/${e.id}/spec-change`,body:{text:a,...n?{from:n}:{}},done:"Proposed. The Analyst writes it into the spec; the work goes on."},{onSuccess:s}),children:[r.jsx(Dr,{size:15})," Propose"]}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:l?`squad propose ${e.id} --as ticket ${h}`:`squad propose ${e.id} ${h}`})]}),children:[r.jsx("p",{className:"note",style:{marginBottom:10},children:l?`${e.id} is ${e.stage==="done"?"released":"accepted"}${e.release?` (${e.release})`:""}, so it only answers questions. Your change becomes a new ticket linked to it, or a bug report.`:c?`Change ${c.id} is still open. One change at a time: approve or decline it first.`:"Say what should change. The Analyst writes it into the spec, old and new, and says if it is small or big. Nothing changes until you approve it, and the work goes on meanwhile."}),r.jsx("textarea",{className:"input",rows:4,style:{width:"100%"},autoFocus:!0,value:a,onChange:f=>o(f.target.value),placeholder:"For example: allow 5 bookings a day, not 3"})]})}function O8({t:e}){const[t,n]=j.useState(!1);return rp(e)?r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn sm",onClick:()=>n(!0),title:Ws(e)?"Becomes a new linked ticket or a bug report":"The Analyst writes it into the spec; you approve it",children:[r.jsx(Dr,{size:13})," ",Ws(e)?"Ask for a change":"Propose a change"]}),t&&r.jsx(ip,{t:e,onClose:()=>n(!1)})]}):null}const $8={writing:"Being written",proposed:"Waits for you",approved:"Approved",designing:"Design update","design-ready":"Waits for you",building:"Being built",done:"In the spec",declined:"Declined",failed:"Not written"};function D8({t:e}){const t=[...e.changes??[]].reverse();return t.length?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"lbl",children:["Changes to the spec · ",t.length]}),r.jsx("ul",{className:"ticketnotes",children:t.map(n=>r.jsxs("li",{children:[r.jsx("span",{className:`pill ${n.status==="done"?"ok":n.status==="declined"?"wait":"you"}`,children:n.decided?.withdrawn?"Withdrawn":$8[n.status]}),r.jsxs("span",{className:"grow",children:[n.id,": ",n.summary??n.ask,n.size?` (${n.size})`:"",n.decided?.reason?`. Why not: ${n.decided.reason}`:""]}),r.jsx("span",{className:"note",children:n.by})]},n.id))})]}):null}const Ry="sk.chatdock",bd=new Set;function B8(){try{const e=JSON.parse(localStorage.getItem(Ry)??"{}");return{tab:e.tab??null,min:!!e.min,width:Ay(e.width??600),seen:e.seen??{}}}catch{return{tab:null,min:!1,width:600,seen:{}}}}let Fs=typeof window>"u"?{tab:null,min:!1,width:600,seen:{}}:B8();function Ay(e){return Math.max(440,Math.min(900,Math.round(e)))}function rr(e){Fs={...Fs,...e};try{localStorage.setItem(Ry,JSON.stringify(Fs))}catch{}for(const t of bd)t()}const Kt={get:()=>Fs,show:e=>rr({tab:e,min:!1}),pick:e=>rr({tab:e}),minimize:()=>rr({min:!0}),restore:()=>rr({min:!1}),resize:e=>rr({width:Ay(e)}),seen:(e,t)=>{Fs.seen[e]!==t&&rr({seen:{...Fs.seen,[e]:t}})}};function ap(e){return j.useSyncExternalStore(t=>{const n=window.matchMedia?.(e);return n?.addEventListener("change",t),()=>n?.removeEventListener("change",t)},()=>!!window.matchMedia?.(e).matches)}const op="(max-width: 760px)";function Kl(){return j.useSyncExternalStore(e=>(bd.add(e),()=>bd.delete(e)),()=>Fs)}const jd="-ۿݐ-ݿࢠ-ࣿﭐ-﷿ﹰ-\uFEFF",U8=new RegExp(`[${jd}]`,"g"),q8=/[A-Za-z]/g;function dn(e){const t=String(e??"").replace(/```[\s\S]*?(```|$)/g," ").replace(/`[^`]*`/g," ").replace(/(https?:\/\/|file:\/\/)\S+/g," "),n=t.match(U8)?.length??0,s=t.match(q8)?.length??0,i=n+s;if(!i)return{lang:"none",dir:"ltr",share:0};const a=n/i;return{lang:a>=.85?"ar":a<=.15?"en":"mixed",dir:a>=.5?"rtl":"ltr",share:a}}function Ln(e){return e.dir==="rtl"?"t-ar":e.lang==="mixed"?"t-mx":"t-en"}function W8(e){const t=e.dir==="rtl"?"right to left":"left to right";return e.lang==="ar"?`Arabic · ${t}`:e.lang==="en"?`English · ${t}`:e.lang==="mixed"?`Mixed · ${t}`:""}const Ly="[0-9\\u0660-\\u0669][0-9\\u0660-\\u0669.,:%/+\\-]*",H8=`(?:${Ly}[ ]+)*[A-Za-z][A-Za-z0-9._\\-/+#@:]*(?:[ ]+[A-Za-z0-9][A-Za-z0-9._\\-/+#@:]*)*`,V8=`[${jd}]+(?:[ ]+(?:${Ly}[ ]+)*[${jd}]+)*`,K8=new RegExp(`(${H8})|(${V8})`,"g");function Q8(e,t){const n=[];let s=0;const i=(a,o)=>{if(!a)return;const l=n.at(-1);l&&!l.dir&&!o?l.text+=a:n.push(o?{text:a,dir:o}:{text:a})};for(const a of e.matchAll(K8)){const o=a.index??0;i(e.slice(s,o));const l=!!a[1];i(a[0],l&&t==="rtl"?"ltr":!l&&t==="ltr"?"rtl":void 0),s=o+a[0].length}return i(e.slice(s)),n}function G8(e){const t=e.filter(n=>n==="rtl").length;return e.length&&t*2>=e.length?"rtl":"ltr"}function Y8(e,t){if(t<=0)return"";let n=0;for(const s of e.matchAll(/\S+/g))if(n+=1,n===t)return e.slice(0,(s.index??0)+s[0].length);return e}function Z8(e){return e.match(/\S+/g)?.length??0}const Iy=new Set(["p","li","h1","h2","h3","h4","h5","h6","td","th","dt","dd","figcaption"]),lp=new Set(["code","pre","svg","math"]);function _y(e,t=!1){return e.type==="text"?e.value??"":e.tagName&&lp.has(e.tagName)||t&&e.tagName&&(e.tagName==="ul"||e.tagName==="ol")?" ":(e.children??[]).map(n=>_y(n,!0)).join("")}function X8(e,t){const n=e.properties??={},s=Array.isArray(n.className)?n.className:typeof n.className=="string"?[n.className]:[];n.className=[...s,t]}function cp(e,t,n){return{type:"element",tagName:e,properties:t,children:n}}function zy(e,t,n){if(!e.children||e.tagName&&lp.has(e.tagName))return;const s=[];for(const i of e.children){if(i.type!=="text"){i.type==="element"&&!(i.tagName&&Iy.has(i.tagName))&&zy(i,t,n),s.push(i);continue}for(const a of Q8(i.value??"",t)){const o=n?J8(a.text):[{type:"text",value:a.text}];a.dir?s.push(cp("bdi",{dir:a.dir},o)):s.push(...o)}}e.children=s}function J8(e){return e.split(/(\s+)/).filter(Boolean).map(t=>/^\s+$/.test(t)?{type:"text",value:t}:cp("span",{className:["fx"]},[{type:"text",value:t}]))}function ew(e,t={}){let n=null;const s=i=>{if(i.type==="element"&&i.tagName&&lp.has(i.tagName)){i.tagName==="code"&&((i.properties??={}).dir="ltr"),i.tagName==="pre"&&(n=i);return}if(i.type==="element"&&i.tagName&&Iy.has(i.tagName)){const a=dn(_y(i));if(a.lang!=="none"){const o=i.properties??={};o.dir=a.dir,o.lang=a.dir==="rtl"?"ar":"en",X8(i,Ln(a))}zy(i,a.dir,!!t.stream),n=i}for(const a of i.children??[])s(a);if(i.type==="element"&&(i.tagName==="ul"||i.tagName==="ol"||i.tagName==="table")){const a=[],o=l=>{for(const c of l.children??[]){if(c.type!=="element")continue;const u=c.tagName==="li"||c.tagName==="td"||c.tagName==="th";u&&c.properties?.dir&&a.push(c.properties.dir),(!u||i.tagName==="table")&&o(c)}};o(i),a.length&&((i.properties??={}).dir=G8(a))}};return s(e),t.caret&&n&&n.tagName!=="pre"&&(n.children??=[]).push(cp("span",{className:["caret"],ariaHidden:"true"},[])),e}function tw(e={}){return t=>{ew(t,e)}}function nw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const sw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iw={};function B1(e,t){return(iw.jsx?rw:sw).test(e)}const aw=/[ \t\n\f\r]/g;function ow(e){return typeof e=="object"?e.type==="text"?U1(e.value):!1:U1(e)}function U1(e){return e.replace(aw,"")===""}class Na{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Na.prototype.normal={};Na.prototype.property={};Na.prototype.space=void 0;function Fy(e,t){const n={},s={};for(const i of e)Object.assign(n,i.property),Object.assign(s,i.normal);return new Na(n,s,t)}function Sd(e){return e.toLowerCase()}class mt{constructor(t,n){this.attribute=n,this.property=t}}mt.prototype.attribute="";mt.prototype.booleanish=!1;mt.prototype.boolean=!1;mt.prototype.commaOrSpaceSeparated=!1;mt.prototype.commaSeparated=!1;mt.prototype.defined=!1;mt.prototype.mustUseProperty=!1;mt.prototype.number=!1;mt.prototype.overloadedBoolean=!1;mt.prototype.property="";mt.prototype.spaceSeparated=!1;mt.prototype.space=void 0;let lw=0;const te=Xs(),Ae=Xs(),Nd=Xs(),O=Xs(),ge=Xs(),Tr=Xs(),xt=Xs();function Xs(){return 2**++lw}const Cd=Object.freeze(Object.defineProperty({__proto__:null,boolean:te,booleanish:Ae,commaOrSpaceSeparated:xt,commaSeparated:Tr,number:O,overloadedBoolean:Nd,spaceSeparated:ge},Symbol.toStringTag,{value:"Module"})),Bc=Object.keys(Cd);class up extends mt{constructor(t,n,s,i){let a=-1;if(super(t,n),q1(this,"space",i),typeof s=="number")for(;++a<Bc.length;){const o=Bc[a];q1(this,Bc[a],(s&Cd[o])===Cd[o])}}}up.prototype.defined=!0;function q1(e,t,n){n&&(e[t]=n)}function Gr(e){const t={},n={};for(const[s,i]of Object.entries(e.properties)){const a=new up(s,e.transform(e.attributes||{},s),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(a.mustUseProperty=!0),t[s]=a,n[Sd(s)]=s,n[Sd(a.attribute)]=s}return new Na(t,n,e.space)}const My=Gr({properties:{ariaActiveDescendant:null,ariaAtomic:Ae,ariaAutoComplete:null,ariaBusy:Ae,ariaChecked:Ae,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:ge,ariaCurrent:null,ariaDescribedBy:ge,ariaDetails:null,ariaDisabled:Ae,ariaDropEffect:ge,ariaErrorMessage:null,ariaExpanded:Ae,ariaFlowTo:ge,ariaGrabbed:Ae,ariaHasPopup:null,ariaHidden:Ae,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ge,ariaLevel:O,ariaLive:null,ariaModal:Ae,ariaMultiLine:Ae,ariaMultiSelectable:Ae,ariaOrientation:null,ariaOwns:ge,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:Ae,ariaReadOnly:Ae,ariaRelevant:null,ariaRequired:Ae,ariaRoleDescription:ge,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:Ae,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Oy(e,t){return t in e?e[t]:t}function $y(e,t){return Oy(e,t.toLowerCase())}const cw=Gr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tr,acceptCharset:ge,accessKey:ge,action:null,allow:null,allowFullScreen:te,allowPaymentRequest:te,allowUserMedia:te,alt:null,as:null,async:te,autoCapitalize:null,autoComplete:ge,autoFocus:te,autoPlay:te,blocking:ge,capture:null,charSet:null,checked:te,cite:null,className:ge,cols:O,colSpan:null,content:null,contentEditable:Ae,controls:te,controlsList:ge,coords:O|Tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:te,defer:te,dir:null,dirName:null,disabled:te,download:Nd,draggable:Ae,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:te,formTarget:null,headers:ge,height:O,hidden:Nd,high:O,href:null,hrefLang:null,htmlFor:ge,httpEquiv:ge,id:null,imageSizes:null,imageSrcSet:null,inert:te,inputMode:null,integrity:null,is:null,isMap:te,itemId:null,itemProp:ge,itemRef:ge,itemScope:te,itemType:ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:te,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:te,muted:te,name:null,nonce:null,noModule:te,noValidate:te,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:te,optimum:O,pattern:null,ping:ge,placeholder:null,playsInline:te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:te,referrerPolicy:null,rel:ge,required:te,reversed:te,rows:O,rowSpan:O,sandbox:ge,scope:null,scoped:te,seamless:te,selected:te,shadowRootClonable:te,shadowRootDelegatesFocus:te,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:Ae,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:te,useMap:null,value:Ae,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ge,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:te,declare:te,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:te,noHref:te,noShade:te,noWrap:te,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:Ae,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:te,disableRemotePlayback:te,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:$y}),uw=Gr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:xt,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:ge,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:te,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Tr,g2:Tr,glyphName:Tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xt,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Oy}),Dy=Gr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),By=Gr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$y}),Uy=Gr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},hw=/[A-Z]/g,W1=/-[a-z]/g,pw=/^data[-\w.:]+$/i;function fw(e,t){const n=Sd(t);let s=t,i=mt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pw.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(W1,gw);s="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!W1.test(a)){let o=a.replace(hw,mw);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=up}return new i(s,t)}function mw(e){return"-"+e.toLowerCase()}function gw(e){return e.charAt(1).toUpperCase()}const yw=Fy([My,cw,Dy,By,Uy],"html"),dp=Fy([My,uw,Dy,By,Uy],"svg");function xw(e){return e.join(" ").trim()}var hp={},H1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vw=/\n/g,kw=/^\s*/,ww=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bw=/^:\s*/,jw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Sw=/^[;\s]*/,Nw=/^\s+|\s+$/g,Cw=`
|
|
433
|
-
`,V1="/",K1="*",Ss="",Ew="comment",Tw="declaration";function Pw(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,s=1;function i(m){var g=m.match(vw);g&&(n+=g.length);var v=m.lastIndexOf(Cw);s=~v?m.length-v:s+m.length}function a(){var m={line:n,column:s};return function(g){return g.position=new o(m),u(),g}}function o(m){this.start=m,this.end={line:n,column:s},this.source=t.source}o.prototype.content=e;function l(m){var g=new Error(t.source+":"+n+":"+s+": "+m);if(g.reason=m,g.filename=t.source,g.line=n,g.column=s,g.source=e,!t.silent)throw g}function c(m){var g=m.exec(e);if(g){var v=g[0];return i(v),e=e.slice(v.length),g}}function u(){c(kw)}function h(m){var g;for(m=m||[];g=d();)g!==!1&&m.push(g);return m}function d(){var m=a();if(!(V1!=e.charAt(0)||K1!=e.charAt(1))){for(var g=2;Ss!=e.charAt(g)&&(K1!=e.charAt(g)||V1!=e.charAt(g+1));)++g;if(g+=2,Ss===e.charAt(g-1))return l("End of comment missing");var v=e.slice(2,g-2);return s+=2,i(v),e=e.slice(g),s+=2,m({type:Ew,comment:v})}}function f(){var m=a(),g=c(ww);if(g){if(d(),!c(bw))return l("property missing ':'");var v=c(jw),y=m({type:Tw,property:Q1(g[0].replace(H1,Ss)),value:v?Q1(v[0].replace(H1,Ss)):Ss});return c(Sw),y}}function p(){var m=[];h(m);for(var g;g=f();)g!==!1&&(m.push(g),h(m));return m}return u(),p()}function Q1(e){return e?e.replace(Nw,Ss):Ss}var Rw=Pw,Aw=Ao&&Ao.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hp,"__esModule",{value:!0});hp.default=Iw;const Lw=Aw(Rw);function Iw(e,t){let n=null;if(!e||typeof e!="string")return n;const s=(0,Lw.default)(e),i=typeof t=="function";return s.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:l}=a;i?t(o,l,a):l&&(n=n||{},n[o]=l)}),n}var Ql={};Object.defineProperty(Ql,"__esModule",{value:!0});Ql.camelCase=void 0;var _w=/^--[a-zA-Z0-9_-]+$/,zw=/-([a-z])/g,Fw=/^[^-]+$/,Mw=/^-(webkit|moz|ms|o|khtml)-/,Ow=/^-(ms)-/,$w=function(e){return!e||Fw.test(e)||_w.test(e)},Dw=function(e,t){return t.toUpperCase()},G1=function(e,t){return"".concat(t,"-")},Bw=function(e,t){return t===void 0&&(t={}),$w(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ow,G1):e=e.replace(Mw,G1),e.replace(zw,Dw))};Ql.camelCase=Bw;var Uw=Ao&&Ao.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qw=Uw(hp),Ww=Ql;function Ed(e,t){var n={};return!e||typeof e!="string"||(0,qw.default)(e,function(s,i){s&&i&&(n[(0,Ww.camelCase)(s,t)]=i)}),n}Ed.default=Ed;var Hw=Ed;const Vw=Ud(Hw),qy=Wy("end"),pp=Wy("start");function Wy(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function Kw(e){const t=pp(e),n=qy(e);if(t&&n)return{start:t,end:n}}function Li(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Y1(e.position):"start"in e||"end"in e?Y1(e):"line"in e||"column"in e?Td(e):""}function Td(e){return Z1(e&&e.line)+":"+Z1(e&&e.column)}function Y1(e){return Td(e&&e.start)+"-"+Td(e&&e.end)}function Z1(e){return e&&typeof e=="number"?e:1}class Ze extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof s=="string"){const c=s.indexOf(":");c===-1?a.ruleId=s:(a.source=s.slice(0,c),a.ruleId=s.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Li(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ze.prototype.file="";Ze.prototype.name="";Ze.prototype.reason="";Ze.prototype.message="";Ze.prototype.stack="";Ze.prototype.column=void 0;Ze.prototype.line=void 0;Ze.prototype.ancestors=void 0;Ze.prototype.cause=void 0;Ze.prototype.fatal=void 0;Ze.prototype.place=void 0;Ze.prototype.ruleId=void 0;Ze.prototype.source=void 0;const fp={}.hasOwnProperty,Qw=new Map,Gw=/[A-Z]/g,Yw=new Set(["table","tbody","thead","tfoot","tr"]),Zw=new Set(["td","th"]),Hy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Xw(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=a7(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=i7(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?dp:yw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Vy(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Vy(e,t,n){if(t.type==="element")return Jw(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return e7(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return n7(e,t,n);if(t.type==="mdxjsEsm")return t7(e,t);if(t.type==="root")return s7(e,t,n);if(t.type==="text")return r7(e,t)}function Jw(e,t,n){const s=e.schema;let i=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(i=dp,e.schema=i),e.ancestors.push(t);const a=Qy(e,t.tagName,!1),o=o7(e,t);let l=gp(e,t);return Yw.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!ow(c):!0})),Ky(e,o,a,t),mp(o,l),e.ancestors.pop(),e.schema=s,e.create(t,a,o,n)}function e7(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}la(e,t.position)}function t7(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);la(e,t.position)}function n7(e,t,n){const s=e.schema;let i=s;t.name==="svg"&&s.space==="html"&&(i=dp,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Qy(e,t.name,!0),o=l7(e,t),l=gp(e,t);return Ky(e,o,a,t),mp(o,l),e.ancestors.pop(),e.schema=s,e.create(t,a,o,n)}function s7(e,t,n){const s={};return mp(s,gp(e,t)),e.create(t,e.Fragment,s,n)}function r7(e,t){return t.value}function Ky(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function mp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function i7(e,t,n){return s;function s(i,a,o,l){const u=Array.isArray(o.children)?n:t;return l?u(a,o,l):u(a,o)}}function a7(e,t){return n;function n(s,i,a,o){const l=Array.isArray(a.children),c=pp(s);return t(i,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function o7(e,t){const n={};let s,i;for(i in t.properties)if(i!=="children"&&fp.call(t.properties,i)){const a=c7(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Zw.has(t.tagName)?s=l:n[o]=l}}if(s){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function l7(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const a=s.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else la(e,t.position);else{const i=s.name;let a;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const l=s.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else la(e,t.position);else a=s.value===null?!0:s.value;n[i]=a}return n}function gp(e,t){const n=[];let s=-1;const i=e.passKeys?new Map:Qw;for(;++s<t.children.length;){const a=t.children[s];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const u=i.get(c)||0;o=c+"-"+u,i.set(c,u+1)}}const l=Vy(e,a,o);l!==void 0&&n.push(l)}return n}function c7(e,t,n){const s=fw(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?nw(n):xw(n)),s.property==="style"){let i=typeof n=="object"?n:u7(e,String(n));return e.stylePropertyNameCase==="css"&&(i=d7(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&s.space?dw[s.property]||s.property:s.attribute,n]}}function u7(e,t){try{return Vw(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,i=new Ze("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Hy+"#cannot-parse-style-attribute",i}}function Qy(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=B1(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}s=o}else s=B1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const i=s.value;return fp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(s);la(e)}function la(e,t){const n=new Ze("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Hy+"#cannot-handle-mdx-estrees-without-createevaluater",n}function d7(e){const t={};let n;for(n in e)fp.call(e,n)&&(t[h7(n)]=e[n]);return t}function h7(e){let t=e.replace(Gw,p7);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function p7(e){return"-"+e.toLowerCase()}const Uc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},f7={};function yp(e,t){const n=f7,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Gy(e,s,i)}function Gy(e,t,n){if(m7(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return X1(e.children,t,n)}return Array.isArray(e)?X1(e,t,n):""}function X1(e,t,n){const s=[];let i=-1;for(;++i<e.length;)s[i]=Gy(e[i],t,n);return s.join("")}function m7(e){return!!(e&&typeof e=="object")}const J1=document.createElement("i");function xp(e){const t="&"+e+";";J1.innerHTML=t;const n=J1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Nt(e,t,n,s){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,s.length<1e4)o=Array.from(s),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<s.length;)o=s.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function _t(e,t){return e.length>0?(Nt(e,e.length,0,t),e):t}const e0={}.hasOwnProperty;function Yy(e){const t={};let n=-1;for(;++n<e.length;)g7(t,e[n]);return t}function g7(e,t){let n;for(n in t){const i=(e0.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){e0.call(i,o)||(i[o]=[]);const l=a[o];y7(i[o],Array.isArray(l)?l:l?[l]:[])}}}function y7(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);Nt(e,0,0,s)}function Zy(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Zt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tt=ys(/[A-Za-z]/),Qe=ys(/[\dA-Za-z]/),x7=ys(/[#-'*+\--9=?A-Z^-~]/);function ml(e){return e!==null&&(e<32||e===127)}const Pd=ys(/\d/),v7=ys(/[\dA-Fa-f]/),k7=ys(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function fe(e){return e!==null&&(e<0||e===32)}function ne(e){return e===-2||e===-1||e===32}const Gl=ys(/\p{P}|\p{S}/u),Hs=ys(/\s/);function ys(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Yr(e){const t=[];let n=-1,s=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&Qe(e.charCodeAt(n+1))&&Qe(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(s,n),encodeURIComponent(o)),s=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(s)}function le(e,t,n,s){const i=s?s-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return ne(c)?(e.enter(n),l(c)):t(c)}function l(c){return ne(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}const w7={tokenize:b7};function b7(e){const t=e.attempt(this.parser.constructs.contentInitial,s,i);let n;return t;function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),le(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return G(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const j7={tokenize:S7},t0={tokenize:N7};function S7(e){const t=this,n=[];let s=0,i,a,o;return l;function l(k){if(s<n.length){const b=n[s];return t.containerState=b[1],e.attempt(b[0].continuation,c,u)(k)}return u(k)}function c(k){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const b=t.events.length;let T=b,w;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){w=t.events[T][1].end;break}y(s);let E=b;for(;E<t.events.length;)t.events[E][1].end={...w},E++;return Nt(t.events,T+1,0,t.events.slice(b)),t.events.length=E,u(k)}return l(k)}function u(k){if(s===n.length){if(!i)return f(k);if(i.currentConstruct&&i.currentConstruct.concrete)return m(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(t0,h,d)(k)}function h(k){return i&&x(),y(s),f(k)}function d(k){return t.parser.lazy[t.now().line]=s!==n.length,o=t.now().offset,m(k)}function f(k){return t.containerState={},e.attempt(t0,p,m)(k)}function p(k){return s++,n.push([t.currentConstruct,t.containerState]),f(k)}function m(k){if(k===null){i&&x(),y(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),g(k)}function g(k){if(k===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(k);return}return G(k)?(e.consume(k),v(e.exit("chunkFlow")),s=0,t.interrupt=void 0,l):(e.consume(k),g)}function v(k,b){const T=t.sliceStream(k);if(b&&T.push(null),k.previous=a,a&&(a.next=k),a=k,i.defineSkip(k.start),i.write(T),t.parser.lazy[k.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<o&&(!i.events[w][1].end||i.events[w][1].end.offset>o))return;const E=t.events.length;let S=E,A,C;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(A){C=t.events[S][1].end;break}A=!0}for(y(s),w=E;w<t.events.length;)t.events[w][1].end={...C},w++;Nt(t.events,S+1,0,t.events.slice(E)),t.events.length=w}}function y(k){let b=n.length;for(;b-- >k;){const T=n[b];t.containerState=T[1],T[0].exit.call(t,e)}n.length=k}function x(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function N7(e,t,n){return le(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Br(e){if(e===null||fe(e)||Hs(e))return 1;if(Gl(e))return 2}function Yl(e,t,n){const s=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!s.includes(a)&&(t=a(t,n),s.push(a))}return t}const Rd={name:"attention",resolveAll:C7,tokenize:E7};function C7(e,t){let n=-1,s,i,a,o,l,c,u,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[s][1].end},f={...e[n][1].start};n0(d,-c),n0(f,c),o={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[s][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:c>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[s][1].end={...o.start},e[n][1].start={...l.end},u=[],e[s][1].end.offset-e[s][1].start.offset&&(u=_t(u,[["enter",e[s][1],t],["exit",e[s][1],t]])),u=_t(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),u=_t(u,Yl(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),u=_t(u,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,u=_t(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Nt(e,s-1,n-s+3,u),n=s+u.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function E7(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,i=Br(s);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const u=e.exit("attentionSequence"),h=Br(c),d=!h||h===2&&i||n.includes(c),f=!i||i===2&&h||n.includes(s);return u._open=!!(a===42?d:d&&(i||!f)),u._close=!!(a===42?f:f&&(h||!d)),t(c)}}function n0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const T7={name:"autolink",tokenize:P7};function P7(e,t,n){let s=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return tt(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||Qe(p)?(s=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),s=0,c):(p===43||p===45||p===46||Qe(p))&&s++<32?(e.consume(p),l):(s=0,u(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ml(p)?n(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),h):x7(p)?(e.consume(p),u):n(p)}function h(p){return Qe(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),s=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Qe(p))&&s++<63){const m=p===45?f:d;return e.consume(p),m}return n(p)}}const Ca={partial:!0,tokenize:R7};function R7(e,t,n){return s;function s(a){return ne(a)?le(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||G(a)?t(a):n(a)}}const Xy={continuation:{tokenize:L7},exit:I7,name:"blockQuote",tokenize:A7};function A7(e,t,n){const s=this;return i;function i(o){if(o===62){const l=s.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return ne(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function L7(e,t,n){const s=this;return i;function i(o){return ne(o)?le(e,a,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Xy,t,n)(o)}}function I7(e){e.exit("blockQuote")}const Jy={name:"characterEscape",tokenize:_7};function _7(e,t,n){return s;function s(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return k7(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const ex={name:"characterReference",tokenize:z7};function z7(e,t,n){const s=this;let i=0,a,o;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,o=Qe,h(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=v7,h):(e.enter("characterReferenceValue"),a=7,o=Pd,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return o===Qe&&!xp(s.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<a?(e.consume(d),h):n(d)}}const s0={partial:!0,tokenize:M7},r0={concrete:!0,name:"codeFenced",tokenize:F7};function F7(e,t,n){const s=this,i={partial:!0,tokenize:T};let a=0,o=0,l;return c;function c(w){return u(w)}function u(w){const E=s.events[s.events.length-1];return a=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,l=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===l?(o++,e.consume(w),h):o<3?n(w):(e.exit("codeFencedFenceSequence"),ne(w)?le(e,d,"whitespace")(w):d(w))}function d(w){return w===null||G(w)?(e.exit("codeFencedFence"),s.interrupt?t(w):e.check(s0,g,b)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===null||G(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):ne(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),le(e,p,"whitespace")(w)):w===96&&w===l?n(w):(e.consume(w),f)}function p(w){return w===null||G(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||G(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===l?n(w):(e.consume(w),m)}function g(w){return e.attempt(i,b,v)(w)}function v(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return a>0&&ne(w)?le(e,x,"linePrefix",a+1)(w):x(w)}function x(w){return w===null||G(w)?e.check(s0,g,b)(w):(e.enter("codeFlowValue"),k(w))}function k(w){return w===null||G(w)?(e.exit("codeFlowValue"),x(w)):(e.consume(w),k)}function b(w){return e.exit("codeFenced"),t(w)}function T(w,E,S){let A=0;return C;function C(W){return w.enter("lineEnding"),w.consume(W),w.exit("lineEnding"),R}function R(W){return w.enter("codeFencedFence"),ne(W)?le(w,L,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):L(W)}function L(W){return W===l?(w.enter("codeFencedFenceSequence"),$(W)):S(W)}function $(W){return W===l?(A++,w.consume(W),$):A>=o?(w.exit("codeFencedFenceSequence"),ne(W)?le(w,U,"whitespace")(W):U(W)):S(W)}function U(W){return W===null||G(W)?(w.exit("codeFencedFence"),E(W)):S(W)}}}function M7(e,t,n){const s=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return s.parser.lazy[s.now().line]?n(o):t(o)}}const qc={name:"codeIndented",tokenize:$7},O7={partial:!0,tokenize:D7};function $7(e,t,n){const s=this;return i;function i(u){return e.enter("codeIndented"),le(e,a,"linePrefix",5)(u)}function a(u){const h=s.events[s.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?c(u):G(u)?e.attempt(O7,o,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||G(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function D7(e,t,n){const s=this;return i;function i(o){return s.parser.lazy[s.now().line]?n(o):G(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):le(e,a,"linePrefix",5)(o)}function a(o){const l=s.events[s.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):G(o)?i(o):n(o)}}const B7={name:"codeText",previous:q7,resolve:U7,tokenize:W7};function U7(e){let t=e.length-4,n=3,s,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)i===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(i=s):(s===t||e[s][1].type==="lineEnding")&&(e[i][1].type="codeTextData",s!==i+2&&(e[i][1].end=e[s-1][1].end,e.splice(i+2,s-i-2),t-=s-i-2,s=i+2),i=void 0);return e}function q7(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function W7(e,t,n){let s=0,i,a;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),s++,l):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):G(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||G(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),u)}function h(d){return d===96?(e.consume(d),i++,h):i===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",u(d))}}class H7{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return s&&fi(this.left,s),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),fi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),fi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);fi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);fi(this.left,n.reverse())}}}function fi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function tx(e){const t={};let n=-1,s,i,a,o,l,c,u;const h=new H7(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(s=h.get(n),n&&s[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=s[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,V7(h,n)),n=t[n],u=!0);else if(s[1]._container){for(a=n,i=void 0;a--;)if(o=h.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(s[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(s),h.splice(i,n-i+1,l))}}return Nt(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!u}function V7(e,t){const n=e.get(t)[1],s=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],u={};let h,d,f=-1,p=n,m=0,g=0;const v=[g];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(h=s.sliceStream(p),p.next||h.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(h),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(g=f+1,v.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),f=v.length;f--;){const y=l.slice(v[f],v[f+1]),x=a.pop();c.push([x,x+y.length-1]),e.splice(x,2,y)}for(c.reverse(),f=-1;++f<c.length;)u[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return u}const K7={resolve:G7,tokenize:Y7},Q7={partial:!0,tokenize:Z7};function G7(e){return tx(e),e}function Y7(e,t){let n;return s;function s(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):G(l)?e.check(Q7,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Z7(e,t,n){const s=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),le(e,a,"linePrefix")}function a(o){if(o===null||G(o))return n(o);const l=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(s.parser.constructs.flow,n,t)(o)}}function nx(e,t,n,s,i,a,o,l,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return d;function d(y){return y===60?(e.enter(s),e.enter(i),e.enter(a),e.consume(y),e.exit(a),f):y===null||y===32||y===41||ml(y)?n(y):(e.enter(s),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),g(y))}function f(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(s),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(l),f(y)):y===null||y===60||G(y)?n(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function g(y){return!h&&(y===null||y===41||fe(y))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(s),t(y)):h<u&&y===40?(e.consume(y),h++,g):y===41?(e.consume(y),h--,g):y===null||y===32||y===40||ml(y)?n(y):(e.consume(y),y===92?v:g)}function v(y){return y===40||y===41||y===92?(e.consume(y),g):g(y)}}function sx(e,t,n,s,i,a){const o=this;let l=0,c;return u;function u(p){return e.enter(s),e.enter(i),e.consume(p),e.exit(i),e.enter(a),h}function h(p){return l>999||p===null||p===91||p===93&&!c||p===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(s),t):G(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||G(p)||l++>999?(e.exit("chunkString"),h(p)):(e.consume(p),c||(c=!ne(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function rx(e,t,n,s,i,a){let o;return l;function l(f){return f===34||f===39||f===40?(e.enter(s),e.enter(i),e.consume(f),e.exit(i),o=f===40?41:f,c):n(f)}function c(f){return f===o?(e.enter(i),e.consume(f),e.exit(i),e.exit(s),t):(e.enter(a),u(f))}function u(f){return f===o?(e.exit(a),c(o)):f===null?n(f):G(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),le(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===o||f===null||G(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:h)}function d(f){return f===o||f===92?(e.consume(f),h):h(f)}}function Ii(e,t){let n;return s;function s(i){return G(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,s):ne(i)?le(e,s,n?"linePrefix":"lineSuffix")(i):t(i)}}const X7={name:"definition",tokenize:eb},J7={partial:!0,tokenize:tb};function eb(e,t,n){const s=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return sx.call(s,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=Zt(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return fe(p)?Ii(e,u)(p):u(p)}function u(p){return nx(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(J7,d,d)(p)}function d(p){return ne(p)?le(e,f,"whitespace")(p):f(p)}function f(p){return p===null||G(p)?(e.exit("definition"),s.parser.defined.push(i),t(p)):n(p)}}function tb(e,t,n){return s;function s(l){return fe(l)?Ii(e,i)(l):n(l)}function i(l){return rx(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return ne(l)?le(e,o,"whitespace")(l):o(l)}function o(l){return l===null||G(l)?t(l):n(l)}}const nb={name:"hardBreakEscape",tokenize:sb};function sb(e,t,n){return s;function s(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return G(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const rb={name:"headingAtx",resolve:ib,tokenize:ab};function ib(e,t){let n=e.length-2,s=3,i,a;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(i={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},a={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},Nt(e,s,n-s+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function ab(e,t,n){let s=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&s++<6?(e.consume(h),o):h===null||fe(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||G(h)?(e.exit("atxHeading"),t(h)):ne(h)?le(e,l,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function u(h){return h===null||h===35||fe(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),u)}}const ob=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],i0=["pre","script","style","textarea"],lb={concrete:!0,name:"htmlFlow",resolveTo:db,tokenize:hb},cb={partial:!0,tokenize:fb},ub={partial:!0,tokenize:pb};function db(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function hb(e,t,n){const s=this;let i,a,o,l,c;return u;function u(P){return h(P)}function h(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),a=!0,g):P===63?(e.consume(P),i=3,s.interrupt?t:N):tt(P)?(e.consume(P),o=String.fromCharCode(P),v):n(P)}function f(P){return P===45?(e.consume(P),i=2,p):P===91?(e.consume(P),i=5,l=0,m):tt(P)?(e.consume(P),i=4,s.interrupt?t:N):n(P)}function p(P){return P===45?(e.consume(P),s.interrupt?t:N):n(P)}function m(P){const ae="CDATA[";return P===ae.charCodeAt(l++)?(e.consume(P),l===ae.length?s.interrupt?t:L:m):n(P)}function g(P){return tt(P)?(e.consume(P),o=String.fromCharCode(P),v):n(P)}function v(P){if(P===null||P===47||P===62||fe(P)){const ae=P===47,oe=o.toLowerCase();return!ae&&!a&&i0.includes(oe)?(i=1,s.interrupt?t(P):L(P)):ob.includes(o.toLowerCase())?(i=6,ae?(e.consume(P),y):s.interrupt?t(P):L(P)):(i=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(P):a?x(P):k(P))}return P===45||Qe(P)?(e.consume(P),o+=String.fromCharCode(P),v):n(P)}function y(P){return P===62?(e.consume(P),s.interrupt?t:L):n(P)}function x(P){return ne(P)?(e.consume(P),x):C(P)}function k(P){return P===47?(e.consume(P),C):P===58||P===95||tt(P)?(e.consume(P),b):ne(P)?(e.consume(P),k):C(P)}function b(P){return P===45||P===46||P===58||P===95||Qe(P)?(e.consume(P),b):T(P)}function T(P){return P===61?(e.consume(P),w):ne(P)?(e.consume(P),T):k(P)}function w(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),c=P,E):ne(P)?(e.consume(P),w):S(P)}function E(P){return P===c?(e.consume(P),c=null,A):P===null||G(P)?n(P):(e.consume(P),E)}function S(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||fe(P)?T(P):(e.consume(P),S)}function A(P){return P===47||P===62||ne(P)?k(P):n(P)}function C(P){return P===62?(e.consume(P),R):n(P)}function R(P){return P===null||G(P)?L(P):ne(P)?(e.consume(P),R):n(P)}function L(P){return P===45&&i===2?(e.consume(P),ee):P===60&&i===1?(e.consume(P),Q):P===62&&i===4?(e.consume(P),V):P===63&&i===3?(e.consume(P),N):P===93&&i===5?(e.consume(P),B):G(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(cb,X,$)(P)):P===null||G(P)?(e.exit("htmlFlowData"),$(P)):(e.consume(P),L)}function $(P){return e.check(ub,U,X)(P)}function U(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),W}function W(P){return P===null||G(P)?$(P):(e.enter("htmlFlowData"),L(P))}function ee(P){return P===45?(e.consume(P),N):L(P)}function Q(P){return P===47?(e.consume(P),o="",_):L(P)}function _(P){if(P===62){const ae=o.toLowerCase();return i0.includes(ae)?(e.consume(P),V):L(P)}return tt(P)&&o.length<8?(e.consume(P),o+=String.fromCharCode(P),_):L(P)}function B(P){return P===93?(e.consume(P),N):L(P)}function N(P){return P===62?(e.consume(P),V):P===45&&i===2?(e.consume(P),N):L(P)}function V(P){return P===null||G(P)?(e.exit("htmlFlowData"),X(P)):(e.consume(P),V)}function X(P){return e.exit("htmlFlow"),t(P)}}function pb(e,t,n){const s=this;return i;function i(o){return G(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return s.parser.lazy[s.now().line]?n(o):t(o)}}function fb(e,t,n){return s;function s(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ca,t,n)}}const mb={name:"htmlText",tokenize:gb};function gb(e,t,n){const s=this;let i,a,o;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),c}function c(N){return N===33?(e.consume(N),u):N===47?(e.consume(N),T):N===63?(e.consume(N),k):tt(N)?(e.consume(N),S):n(N)}function u(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),a=0,m):tt(N)?(e.consume(N),x):n(N)}function h(N){return N===45?(e.consume(N),p):n(N)}function d(N){return N===null?n(N):N===45?(e.consume(N),f):G(N)?(o=d,Q(N)):(e.consume(N),d)}function f(N){return N===45?(e.consume(N),p):d(N)}function p(N){return N===62?ee(N):N===45?f(N):d(N)}function m(N){const V="CDATA[";return N===V.charCodeAt(a++)?(e.consume(N),a===V.length?g:m):n(N)}function g(N){return N===null?n(N):N===93?(e.consume(N),v):G(N)?(o=g,Q(N)):(e.consume(N),g)}function v(N){return N===93?(e.consume(N),y):g(N)}function y(N){return N===62?ee(N):N===93?(e.consume(N),y):g(N)}function x(N){return N===null||N===62?ee(N):G(N)?(o=x,Q(N)):(e.consume(N),x)}function k(N){return N===null?n(N):N===63?(e.consume(N),b):G(N)?(o=k,Q(N)):(e.consume(N),k)}function b(N){return N===62?ee(N):k(N)}function T(N){return tt(N)?(e.consume(N),w):n(N)}function w(N){return N===45||Qe(N)?(e.consume(N),w):E(N)}function E(N){return G(N)?(o=E,Q(N)):ne(N)?(e.consume(N),E):ee(N)}function S(N){return N===45||Qe(N)?(e.consume(N),S):N===47||N===62||fe(N)?A(N):n(N)}function A(N){return N===47?(e.consume(N),ee):N===58||N===95||tt(N)?(e.consume(N),C):G(N)?(o=A,Q(N)):ne(N)?(e.consume(N),A):ee(N)}function C(N){return N===45||N===46||N===58||N===95||Qe(N)?(e.consume(N),C):R(N)}function R(N){return N===61?(e.consume(N),L):G(N)?(o=R,Q(N)):ne(N)?(e.consume(N),R):A(N)}function L(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,$):G(N)?(o=L,Q(N)):ne(N)?(e.consume(N),L):(e.consume(N),U)}function $(N){return N===i?(e.consume(N),i=void 0,W):N===null?n(N):G(N)?(o=$,Q(N)):(e.consume(N),$)}function U(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||fe(N)?A(N):(e.consume(N),U)}function W(N){return N===47||N===62||fe(N)?A(N):n(N)}function ee(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function Q(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),_}function _(N){return ne(N)?le(e,B,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):B(N)}function B(N){return e.enter("htmlTextData"),o(N)}}const vp={name:"labelEnd",resolveAll:kb,resolveTo:wb,tokenize:bb},yb={tokenize:jb},xb={tokenize:Sb},vb={tokenize:Nb};function kb(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const i=s.type==="labelImage"?4:2;s.type="data",t+=i}}return e.length!==n.length&&Nt(e,0,e.length,n),e}function wb(e,t){let n=e.length,s=0,i,a,o,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){s=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},h={type:"labelText",start:{...e[a+s+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=_t(l,e.slice(a+1,a+s+3)),l=_t(l,[["enter",h,t]]),l=_t(l,Yl(t.parser.constructs.insideSpan.null,e.slice(a+s+4,o-3),t)),l=_t(l,[["exit",h,t],e[o-2],e[o-1],["exit",u,t]]),l=_t(l,e.slice(o+1)),l=_t(l,[["exit",c,t]]),Nt(e,a,e.length,l),e}function bb(e,t,n){const s=this;let i=s.events.length,a,o;for(;i--;)if((s.events[i][1].type==="labelImage"||s.events[i][1].type==="labelLink")&&!s.events[i][1]._balanced){a=s.events[i][1];break}return l;function l(f){return a?a._inactive?d(f):(o=s.parser.defined.includes(Zt(s.sliceSerialize({start:a.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(yb,h,o?h:d)(f):f===91?e.attempt(xb,h,o?u:d)(f):o?h(f):d(f)}function u(f){return e.attempt(vb,h,d)(f)}function h(f){return t(f)}function d(f){return a._balanced=!0,n(f)}}function jb(e,t,n){return s;function s(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return fe(d)?Ii(e,a)(d):a(d)}function a(d){return d===41?h(d):nx(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return fe(d)?Ii(e,c)(d):h(d)}function l(d){return n(d)}function c(d){return d===34||d===39||d===40?rx(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function u(d){return fe(d)?Ii(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function Sb(e,t,n){const s=this;return i;function i(l){return sx.call(s,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return s.parser.defined.includes(Zt(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function Nb(e,t,n){return s;function s(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Cb={name:"labelStartImage",resolveAll:vp.resolveAll,tokenize:Eb};function Eb(e,t,n){const s=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(l):t(l)}}const Tb={name:"labelStartLink",resolveAll:vp.resolveAll,tokenize:Pb};function Pb(e,t,n){const s=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(o):t(o)}}const Wc={name:"lineEnding",tokenize:Rb};function Rb(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),le(e,t,"linePrefix")}}const To={name:"thematicBreak",tokenize:Ab};function Ab(e,t,n){let s=0,i;return a;function a(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):s>=3&&(u===null||G(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),s++,c):(e.exit("thematicBreakSequence"),ne(u)?le(e,l,"whitespace")(u):l(u))}}const at={continuation:{tokenize:zb},exit:Mb,name:"list",tokenize:_b},Lb={partial:!0,tokenize:Ob},Ib={partial:!0,tokenize:Fb};function _b(e,t,n){const s=this,i=s.events[s.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(p){const m=s.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!s.containerState.marker||p===s.containerState.marker:Pd(p)){if(s.containerState.type||(s.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(To,n,u)(p):u(p);if(!s.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return Pd(p)&&++o<10?(e.consume(p),c):(!s.interrupt||o<2)&&(s.containerState.marker?p===s.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||p,e.check(Ca,s.interrupt?n:h,e.attempt(Lb,f,d))}function h(p){return s.containerState.initialBlankLine=!0,a++,f(p)}function d(p){return ne(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return s.containerState.size=a+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function zb(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(Ca,i,a);function i(l){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,le(e,t,"listItemIndent",s.containerState.size+1)(l)}function a(l){return s.containerState.furtherBlankLines||!ne(l)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,o(l)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(Ib,t,o)(l))}function o(l){return s.containerState._closeFlow=!0,s.interrupt=void 0,le(e,e.attempt(at,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Fb(e,t,n){const s=this;return le(e,i,"listItemIndent",s.containerState.size+1);function i(a){const o=s.events[s.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===s.containerState.size?t(a):n(a)}}function Mb(e){e.exit(this.containerState.type)}function Ob(e,t,n){const s=this;return le(e,i,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=s.events[s.events.length-1];return!ne(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const a0={name:"setextUnderline",resolveTo:$b,tokenize:Db};function $b(e,t){let n=e.length,s,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[s][1],t]),e[s][1].end={...e[a][1].end}):e[s][1]=o,e.push(["exit",o,t]),e}function Db(e,t,n){const s=this;let i;return a;function a(u){let h=s.events.length,d;for(;h--;)if(s.events[h][1].type!=="lineEnding"&&s.events[h][1].type!=="linePrefix"&&s.events[h][1].type!=="content"){d=s.events[h][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),ne(u)?le(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||G(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Bb={tokenize:Ub};function Ub(e){const t=this,n=e.attempt(Ca,s,e.attempt(this.parser.constructs.flowInitial,i,le(e,e.attempt(this.parser.constructs.flow,i,e.attempt(K7,i)),"linePrefix")));return n;function s(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const qb={resolveAll:ax()},Wb=ix("string"),Hb=ix("text");function ix(e){return{resolveAll:ax(e==="text"?Vb:void 0),tokenize:t};function t(n){const s=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(h){return u(h)?a(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return u(h)?(n.exit("data"),a(h)):(n.consume(h),c)}function u(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(s,s.previous))return!0}return!1}}}function ax(e){return t;function t(n,s){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,s):n}}function Vb(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const s=e[n-1][1],i=t.sliceStream(s);let a=i.length,o=-1,l=0,c;for(;a--;){const u=i[a];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(u===-2)c=!0,l++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:s.start._bufferIndex+o,_index:s.start._index+a,line:s.end.line,column:s.end.column-l,offset:s.end.offset-l},end:{...s.end}};s.end={...u.start},s.start.offset===s.end.offset?Object.assign(s,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Kb={42:at,43:at,45:at,48:at,49:at,50:at,51:at,52:at,53:at,54:at,55:at,56:at,57:at,62:Xy},Qb={91:X7},Gb={[-2]:qc,[-1]:qc,32:qc},Yb={35:rb,42:To,45:[a0,To],60:lb,61:a0,95:To,96:r0,126:r0},Zb={38:ex,92:Jy},Xb={[-5]:Wc,[-4]:Wc,[-3]:Wc,33:Cb,38:ex,42:Rd,60:[T7,mb],91:Tb,92:[nb,Jy],93:vp,95:Rd,96:B7},Jb={null:[Rd,qb]},ej={null:[42,95]},tj={null:[]},nj=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ej,contentInitial:Qb,disable:tj,document:Kb,flow:Yb,flowInitial:Gb,insideSpan:Jb,string:Zb,text:Xb},Symbol.toStringTag,{value:"Module"}));function sj(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const c={attempt:E(T),check:E(w),consume:x,enter:k,exit:b,interrupt:E(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let h=t.tokenize.call(u,c);return t.resolveAll&&a.push(t),u;function d(R){return o=_t(o,R),v(),o[o.length-1]!==null?[]:(S(t,0),u.events=Yl(a,u.events,u),u.events)}function f(R,L){return ij(p(R),L)}function p(R){return rj(o,R)}function m(){const{_bufferIndex:R,_index:L,line:$,column:U,offset:W}=s;return{_bufferIndex:R,_index:L,line:$,column:U,offset:W}}function g(R){i[R.line]=R.column,C()}function v(){let R;for(;s._index<o.length;){const L=o[s._index];if(typeof L=="string")for(R=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===R&&s._bufferIndex<L.length;)y(L.charCodeAt(s._bufferIndex));else y(L)}}function y(R){h=h(R)}function x(R){G(R)?(s.line++,s.column=1,s.offset+=R===-3?2:1,C()):R!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===o[s._index].length&&(s._bufferIndex=-1,s._index++)),u.previous=R}function k(R,L){const $=L||{};return $.type=R,$.start=m(),u.events.push(["enter",$,u]),l.push($),$}function b(R){const L=l.pop();return L.end=m(),u.events.push(["exit",L,u]),L}function T(R,L){S(R,L.from)}function w(R,L){L.restore()}function E(R,L){return $;function $(U,W,ee){let Q,_,B,N;return Array.isArray(U)?X(U):"tokenize"in U?X([U]):V(U);function V(re){return ke;function ke(Oe){const me=Oe!==null&&re[Oe],_e=Oe!==null&&re.null,Xe=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return X(Xe)(Oe)}}function X(re){return Q=re,_=0,re.length===0?ee:P(re[_])}function P(re){return ke;function ke(Oe){return N=A(),B=re,re.partial||(u.currentConstruct=re),re.name&&u.parser.constructs.disable.null.includes(re.name)?oe():re.tokenize.call(L?Object.assign(Object.create(u),L):u,c,ae,oe)(Oe)}}function ae(re){return R(B,N),W}function oe(re){return N.restore(),++_<Q.length?P(Q[_]):ee}}}function S(R,L){R.resolveAll&&!a.includes(R)&&a.push(R),R.resolve&&Nt(u.events,L,u.events.length-L,R.resolve(u.events.slice(L),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function A(){const R=m(),L=u.previous,$=u.currentConstruct,U=u.events.length,W=Array.from(l);return{from:U,restore:ee};function ee(){s=R,u.previous=L,u.currentConstruct=$,u.events.length=U,l=W,C()}}function C(){s.line in i&&s.column<2&&(s.column=i[s.line],s.offset+=i[s.line]-1)}}function rj(e,t){const n=t.start._index,s=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(s,a)];else{if(o=e.slice(n,i),s>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(s):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ij(e,t){let n=-1;const s=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
434
|
-
`;break}case-3:{o=`\r
|
|
435
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,s.push(o)}return s.join("")}function aj(e){const s={constructs:Yy([nj,...(e||{}).extensions||[]]),content:i(w7),defined:[],document:i(j7),flow:i(Bb),lazy:{},string:i(Wb),text:i(Hb)};return s;function i(a){return o;function o(l){return sj(s,a,l)}}}function oj(e){for(;!tx(e););return e}const o0=/[\0\t\n\r]/g;function lj(){let e=1,t="",n=!0,s;return i;function i(a,o,l){const c=[];let u,h,d,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(o0.lastIndex=d,u=o0.exec(a),f=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(f),!u){t=a.slice(d);break}if(p===10&&d===f&&s)c.push(-3),s=void 0;else switch(s&&(c.push(-5),s=void 0),d<f&&(c.push(a.slice(d,f)),e+=f-d),p){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:s=!0,e=1}d=f+1}return l&&(s&&c.push(-5),t&&c.push(t),c.push(null)),c}}const cj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uj(e){return e.replace(cj,dj)}function dj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Zy(n.slice(a?2:1),a?16:10)}return xp(n)||e}const ox={}.hasOwnProperty;function hj(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),pj(n)(oj(aj(n).document().write(lj()(e,t,!0))))}function pj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(en),autolinkProtocol:A,autolinkEmail:A,atxHeading:a(Ut),blockQuote:a(_e),characterEscape:A,characterReference:A,codeFenced:a(Xe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Xe,o),codeText:a(Bt,o),codeTextData:A,data:A,codeFlowValue:A,definition:a(_n),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Js),hardBreakEscape:a(zn),hardBreakTrailing:a(zn),htmlFlow:a(Fn,o),htmlFlowData:A,htmlText:a(Fn,o),htmlTextData:A,image:a(Jt),label:o,link:a(en),listItem:a(Xr),listItemValue:f,listOrdered:a(At,d),listUnordered:a(At),paragraph:a(xs),reference:P,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ut),strong:a(Jr),thematicBreak:a(pe)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:me,autolinkProtocol:Oe,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:re,characterReference:ke,codeFenced:c(v),codeFencedFence:g,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:C,codeIndented:c(y),codeText:c(W),codeTextData:C,data:C,definition:c(),definitionDestinationString:b,definitionLabelString:x,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(L),hardBreakTrailing:c(L),htmlFlow:c($),htmlFlowData:C,htmlText:c(U),htmlTextData:C,image:c(Q),label:B,labelText:_,lineEnding:R,link:c(ee),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:N,resourceTitleString:V,resource:X,setextHeading:c(S),setextHeadingLineSequence:E,setextHeadingText:w,strong:c(),thematicBreak:c()}};lx(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(z){let D={type:"root",children:[]};const I={stack:[D],tokenStack:[],config:t,enter:l,exit:u,buffer:o,resume:h,data:n},K=[];let ie=-1;for(;++ie<z.length;)if(z[ie][1].type==="listOrdered"||z[ie][1].type==="listUnordered")if(z[ie][0]==="enter")K.push(ie);else{const Ee=K.pop();ie=i(z,Ee,ie)}for(ie=-1;++ie<z.length;){const Ee=t[z[ie][0]];ox.call(Ee,z[ie][1].type)&&Ee[z[ie][1].type].call(Object.assign({sliceSerialize:z[ie][2].sliceSerialize},I),z[ie][1])}if(I.tokenStack.length>0){const Ee=I.tokenStack[I.tokenStack.length-1];(Ee[1]||l0).call(I,void 0,Ee[0])}for(D.position={start:On(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:On(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},ie=-1;++ie<t.transforms.length;)D=t.transforms[ie](D)||D;return D}function i(z,D,I){let K=D-1,ie=-1,Ee=!1,Be,fn,ei,ti;for(;++K<=I;){const gt=z[K];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?ie++:ie--,ti=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(Be&&!ti&&!ie&&!ei&&(ei=K),ti=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ti=void 0}if(!ie&>[0]==="enter"&>[1].type==="listItemPrefix"||ie===-1&>[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(Be){let tr=K;for(fn=void 0;tr--;){const mn=z[tr];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;fn&&(z[fn][1].type="lineEndingBlank",Ee=!0),mn[1].type="lineEnding",fn=tr}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}ei&&(!fn||ei<fn)&&(Be._spread=!0),Be.end=Object.assign({},fn?z[fn][1].start:gt[1].end),z.splice(fn||K,0,["exit",Be,gt[2]]),K++,I++}if(gt[1].type==="listItemPrefix"){const tr={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};Be=tr,z.splice(K,0,["enter",tr,gt[2]]),K++,I++,ei=void 0,ti=!0}}}return z[D][1]._spread=Ee,I}function a(z,D){return I;function I(K){l.call(this,z(K),K),D&&D.call(this,K)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(z,D,I){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([D,I||void 0]),z.position={start:On(D.start),end:void 0}}function c(z){return D;function D(I){z&&z.call(this,I),u.call(this,I)}}function u(z,D){const I=this.stack.pop(),K=this.tokenStack.pop();if(K)K[0].type!==z.type&&(D?D.call(this,z,K[0]):(K[1]||l0).call(this,z,K[0]));else throw new Error("Cannot close `"+z.type+"` ("+Li({start:z.start,end:z.end})+"): it’s not open");I.position.end=On(z.end)}function h(){return yp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(z){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function p(){const z=this.resume(),D=this.stack[this.stack.length-1];D.lang=z}function m(){const z=this.resume(),D=this.stack[this.stack.length-1];D.meta=z}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z.replace(/(\r?\n|\r)$/g,"")}function x(z){const D=this.resume(),I=this.stack[this.stack.length-1];I.label=D,I.identifier=Zt(this.sliceSerialize(z)).toLowerCase()}function k(){const z=this.resume(),D=this.stack[this.stack.length-1];D.title=z}function b(){const z=this.resume(),D=this.stack[this.stack.length-1];D.url=z}function T(z){const D=this.stack[this.stack.length-1];if(!D.depth){const I=this.sliceSerialize(z).length;D.depth=I}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function E(z){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function A(z){const I=this.stack[this.stack.length-1].children;let K=I[I.length-1];(!K||K.type!=="text")&&(K=er(),K.position={start:On(z.start),end:void 0},I.push(K)),this.stack.push(K)}function C(z){const D=this.stack.pop();D.value+=this.sliceSerialize(z),D.position.end=On(z.end)}function R(z){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const I=D.children[D.children.length-1];I.position.end=On(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(D.type)&&(A.call(this,z),C.call(this,z))}function L(){this.data.atHardBreak=!0}function $(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z}function U(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z}function W(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z}function ee(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=D,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function Q(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=D,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function _(z){const D=this.sliceSerialize(z),I=this.stack[this.stack.length-2];I.label=uj(D),I.identifier=Zt(D).toLowerCase()}function B(){const z=this.stack[this.stack.length-1],D=this.resume(),I=this.stack[this.stack.length-1];if(this.data.inReference=!0,I.type==="link"){const K=z.children;I.children=K}else I.alt=D}function N(){const z=this.resume(),D=this.stack[this.stack.length-1];D.url=z}function V(){const z=this.resume(),D=this.stack[this.stack.length-1];D.title=z}function X(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ae(z){const D=this.resume(),I=this.stack[this.stack.length-1];I.label=D,I.identifier=Zt(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function oe(z){this.data.characterReferenceType=z.type}function re(z){const D=this.sliceSerialize(z),I=this.data.characterReferenceType;let K;I?(K=Zy(D,I==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):K=xp(D);const ie=this.stack[this.stack.length-1];ie.value+=K}function ke(z){const D=this.stack.pop();D.position.end=On(z.end)}function Oe(z){C.call(this,z);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(z)}function me(z){C.call(this,z);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(z)}function _e(){return{type:"blockquote",children:[]}}function Xe(){return{type:"code",lang:null,meta:null,value:""}}function Bt(){return{type:"inlineCode",value:""}}function _n(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Js(){return{type:"emphasis",children:[]}}function Ut(){return{type:"heading",depth:0,children:[]}}function zn(){return{type:"break"}}function Fn(){return{type:"html",value:""}}function Jt(){return{type:"image",title:null,url:"",alt:null}}function en(){return{type:"link",title:null,url:"",children:[]}}function At(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function Xr(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function xs(){return{type:"paragraph",children:[]}}function Jr(){return{type:"strong",children:[]}}function er(){return{type:"text",value:""}}function pe(){return{type:"thematicBreak"}}}function On(e){return{line:e.line,column:e.column,offset:e.offset}}function lx(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?lx(e,s):fj(e,s)}}function fj(e,t){let n;for(n in t)if(ox.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function l0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Li({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Li({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Li({start:t.start,end:t.end})+") is still open")}function mj(e){const t=this;t.parser=n;function n(s){return hj(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gj(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function yj(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
436
|
-
`}]}function xj(e,t){const n=t.value?t.value+`
|
|
437
|
-
`:"",s={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(s.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function vj(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kj(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wj(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),i=Yr(s.toLowerCase()),a=e.footnoteOrder.indexOf(s);let o,l=e.footnoteCounts.get(s);l===void 0?(l=0,e.footnoteOrder.push(s),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(s,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function bj(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jj(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function cx(e,t){const n=t.referenceType;let s="]";if(n==="collapsed"?s+="[]":n==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=s:i.push({type:"text",value:s}),i}function Sj(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return cx(e,t);const i={src:Yr(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(i.title=s.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Nj(e,t){const n={src:Yr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function Cj(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const s={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,s),e.applyData(t,s)}function Ej(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return cx(e,t);const i={href:Yr(s.url||"")};s.title!==null&&s.title!==void 0&&(i.title=s.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Tj(e,t){const n={href:Yr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Pj(e,t,n){const s=e.all(t),i=n?Rj(n):ux(t),a={},o=[];if(typeof t.checked=="boolean"){const h=s[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},s.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<s.length;){const h=s[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&o.push({type:"text",value:`
|
|
438
|
-
`}),h.type==="element"&&h.tagName==="p"&&!i?o.push(...h.children):o.push(h)}const c=s[s.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
439
|
-
`});const u={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,u),e.applyData(t,u)}function Rj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let s=-1;for(;!t&&++s<n.length;)t=ux(n[s])}return t}function ux(e){const t=e.spread;return t??e.children.length>1}function Aj(e,t){const n={},s=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<s.length;){const o=s[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function Lj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ij(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _j(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zj(e,t){const n=e.all(t),s=n.shift(),i=[];if(s){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=pp(t.children[1]),c=qy(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Fj(e,t,n){const s=n?n.children:void 0,a=(s?s.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const d=t.children[c],f={},p=o?o[c]:void 0;p&&(f.align=p);let m={type:"element",tagName:a,properties:f,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,h),e.applyData(t,h)}function Mj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const c0=9,u0=32;function Oj(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),i=0;const a=[];for(;s;)a.push(d0(t.slice(i,s.index),i>0,!0),s[0]),i=s.index+s[0].length,s=n.exec(t);return a.push(d0(t.slice(i),i>0,!1)),a.join("")}function d0(e,t,n){let s=0,i=e.length;if(t){let a=e.codePointAt(s);for(;a===c0||a===u0;)s++,a=e.codePointAt(s)}if(n){let a=e.codePointAt(i-1);for(;a===c0||a===u0;)i--,a=e.codePointAt(i-1)}return i>s?e.slice(s,i):""}function $j(e,t){const n={type:"text",value:Oj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Dj(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Bj={blockquote:gj,break:yj,code:xj,delete:vj,emphasis:kj,footnoteReference:wj,heading:bj,html:jj,imageReference:Sj,image:Nj,inlineCode:Cj,linkReference:Ej,link:Tj,listItem:Pj,list:Aj,paragraph:Lj,root:Ij,strong:_j,table:zj,tableCell:Mj,tableRow:Fj,text:$j,thematicBreak:Dj,toml:eo,yaml:eo,definition:eo,footnoteDefinition:eo};function eo(){}const dx=-1,Zl=0,_i=1,gl=2,kp=3,wp=4,bp=5,jp=6,hx=7,px=8,h0=typeof self=="object"?self:globalThis,Uj=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),s=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Zl:case dx:return n(o,i);case _i:{const l=n([],i);for(const c of o)l.push(s(c));return l}case gl:{const l=n({},i);for(const[c,u]of o)l[s(c)]=s(u);return l}case kp:return n(new Date(o),i);case wp:{const{source:l,flags:c}=o;return n(new RegExp(l,c),i)}case bp:{const l=n(new Map,i);for(const[c,u]of o)l.set(s(c),s(u));return l}case jp:{const l=n(new Set,i);for(const c of o)l.add(s(c));return l}case hx:{const{name:l,message:c}=o;return n(new h0[l](c),i)}case px:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new h0[a](o),i)};return s},p0=e=>Uj(new Map,e)(0),ir="",{toString:qj}={},{keys:Wj}=Object,mi=e=>{const t=typeof e;if(t!=="object"||!e)return[Zl,t];const n=qj.call(e).slice(8,-1);switch(n){case"Array":return[_i,ir];case"Object":return[gl,ir];case"Date":return[kp,ir];case"RegExp":return[wp,ir];case"Map":return[bp,ir];case"Set":return[jp,ir];case"DataView":return[_i,n]}return n.includes("Array")?[_i,n]:n.includes("Error")?[hx,n]:[gl,n]},to=([e,t])=>e===Zl&&(t==="function"||t==="symbol"),Hj=(e,t,n,s)=>{const i=(o,l)=>{const c=s.push(o)-1;return n.set(l,c),c},a=o=>{if(n.has(o))return n.get(o);let[l,c]=mi(o);switch(l){case Zl:{let h=o;switch(c){case"bigint":l=px,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([dx],o)}return i([l,h],o)}case _i:{if(c){let f=o;return c==="DataView"?f=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(o)),i([c,[...f]],o)}const h=[],d=i([l,h],o);for(const f of o)h.push(a(f));return d}case gl:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const h=[],d=i([l,h],o);for(const f of Wj(o))(e||!to(mi(o[f])))&&h.push([a(f),a(o[f])]);return d}case kp:return i([l,o.toISOString()],o);case wp:{const{source:h,flags:d}=o;return i([l,{source:h,flags:d}],o)}case bp:{const h=[],d=i([l,h],o);for(const[f,p]of o)(e||!(to(mi(f))||to(mi(p))))&&h.push([a(f),a(p)]);return d}case jp:{const h=[],d=i([l,h],o);for(const f of o)(e||!to(mi(f)))&&h.push(a(f));return d}}const{message:u}=o;return i([l,{name:c,message:u}],o)};return a},f0=(e,{json:t,lossy:n}={})=>{const s=[];return Hj(!(t||n),!!t,new Map,s)(e),s},yl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?p0(f0(e,t)):structuredClone(e):(e,t)=>p0(f0(e,t));function Vj(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Kj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Qj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Vj,s=e.options.footnoteBackLabel||Kj,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const h=e.all(u),d=String(u.identifier).toUpperCase(),f=Yr(d.toLowerCase());let p=0;const m=[],g=e.footnoteCounts.get(d);for(;g!==void 0&&++p<=g;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(c,p);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(c,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...m)}else h.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(h,!0)};e.patch(u,y),l.push(y)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...yl(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
440
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
441
|
-
`}]}}const Ea=function(e){if(e==null)return Xj;if(typeof e=="function")return Xl(e);if(typeof e=="object")return Array.isArray(e)?Gj(e):Yj(e);if(typeof e=="string")return Zj(e);throw new Error("Expected function, string, or object as test")};function Gj(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ea(e[n]);return Xl(s);function s(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Yj(e){const t=e;return Xl(n);function n(s){const i=s;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Zj(e){return Xl(t);function t(n){return n&&n.type===e}}function Xl(e){return t;function t(n,s,i){return!!(Jj(n)&&e.call(this,n,typeof s=="number"?s:void 0,i||void 0))}}function Xj(){return!0}function Jj(e){return e!==null&&typeof e=="object"&&"type"in e}const fx=[],e9=!0,Ad=!1,t9="skip";function n9(e,t,n,s){let i;typeof t=="function"&&typeof n!="function"?(s=n,n=t):i=t;const a=Ea(i),o=s?-1:1;l(e,void 0,[])();function l(c,u,h){const d=c&&typeof c=="object"?c:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=fx,m,g,v;if((!t||a(c,u,h[h.length-1]||void 0))&&(p=s9(n(c,h)),p[0]===Ad))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==t9)for(g=(s?y.children.length:-1)+o,v=h.concat(y);g>-1&&g<y.children.length;){const x=y.children[g];if(m=l(x,g,v)(),m[0]===Ad)return m;g=typeof m[1]=="number"?m[1]:g+o}}return p}}}function s9(e){return Array.isArray(e)?e:typeof e=="number"?[e9,e]:e==null?fx:[e]}function Sp(e,t,n,s){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=s),n9(e,a,l,i);function l(c,u){const h=u[u.length-1],d=h?h.children.indexOf(c):void 0;return o(c,d,h)}}const Ld={}.hasOwnProperty,r9={};function i9(e,t){const n=t||r9,s=new Map,i=new Map,a=new Map,o={...Bj,...n.handlers},l={all:u,applyData:o9,definitionById:s,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:n,patch:a9,wrap:c9};return Sp(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?s:i,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),l;function c(h,d){const f=h.type,p=l.handlers[f];if(Ld.call(l.handlers,f)&&p)return p(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in h){const{children:g,...v}=h,y=yl(v);return y.children=l.all(h),y}return yl(h)}return(l.options.unknownHandler||l9)(l,h,d)}function u(h){const d=[];if("children"in h){const f=h.children;let p=-1;for(;++p<f.length;){const m=l.one(f[p],h);if(m){if(p&&f[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=m0(m.value)),!Array.isArray(m)&&m.type==="element")){const g=m.children[0];g&&g.type==="text"&&(g.value=m0(g.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function a9(e,t){e.position&&(t.position=Kw(e))}function o9(e,t){let n=t;if(e&&e.data){const s=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const o="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,yl(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function l9(e,t){const n=t.data||{},s="value"in t&&!(Ld.call(n,"hProperties")||Ld.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function c9(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
|
|
442
|
-
`});++s<e.length;)s&&n.push({type:"text",value:`
|
|
443
|
-
`}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
444
|
-
`}),n}function m0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function g0(e,t){const n=i9(e,t),s=n.one(e,void 0),i=Qj(n),a=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
445
|
-
`},i),a}function u9(e,t){return e&&"run"in e?async function(n,s){const i=g0(n,{file:s,...t});await e.run(i,s)}:function(n,s){return g0(n,{file:s,...e||t})}}function y0(e){if(e)throw e}var Po=Object.prototype.hasOwnProperty,mx=Object.prototype.toString,x0=Object.defineProperty,v0=Object.getOwnPropertyDescriptor,k0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):mx.call(t)==="[object Array]"},w0=function(t){if(!t||mx.call(t)!=="[object Object]")return!1;var n=Po.call(t,"constructor"),s=t.constructor&&t.constructor.prototype&&Po.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!s)return!1;var i;for(i in t);return typeof i>"u"||Po.call(t,i)},b0=function(t,n){x0&&n.name==="__proto__"?x0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},j0=function(t,n){if(n==="__proto__")if(Po.call(t,n)){if(v0)return v0(t,n).value}else return;return t[n]},d9=function e(){var t,n,s,i,a,o,l=arguments[0],c=1,u=arguments.length,h=!1;for(typeof l=="boolean"&&(h=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)s=j0(l,n),i=j0(t,n),l!==i&&(h&&i&&(w0(i)||(a=k0(i)))?(a?(a=!1,o=s&&k0(s)?s:[]):o=s&&w0(s)?s:{},b0(l,{name:n,newValue:e(h,o,i)})):typeof i<"u"&&b0(l,{name:n,newValue:i}));return l};const Hc=Ud(d9);function Id(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function h9(){const e=[],t={run:n,use:s};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...u){const h=e[++a];let d=-1;if(c){o(c);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,h?p9(h,l)(...u):o(null,...u)}}function s(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function p9(e,t){let n;return s;function s(...o){const l=e.length>o.length;let c;l&&o.push(i);try{c=e.apply(this,o)}catch(u){const h=u;if(l&&n)throw h;return i(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const sn={basename:f9,dirname:m9,extname:g9,join:y9,sep:"/"};function f9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ta(e);let n=0,s=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(s=i):(l=-1,s=o));return n===s?s=o:s<0&&(s=e.length),e.slice(n,s)}function m9(e){if(Ta(e),e.length===0)return".";let t=-1,n=e.length,s;for(;--n;)if(e.codePointAt(n)===47){if(s){t=n;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function g9(e){Ta(e);let t=e.length,n=-1,s=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){s=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===s+1?"":e.slice(i,n)}function y9(...e){let t=-1,n;for(;++t<e.length;)Ta(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":x9(n)}function x9(e){Ta(e);const t=e.codePointAt(0)===47;let n=v9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function v9(e,t){let n="",s=0,i=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||s!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",s=0):(n=n.slice(0,c),s=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",s=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),s=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function Ta(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const k9={cwd:w9};function w9(){return"/"}function _d(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function b9(e){if(typeof e=="string")e=new URL(e);else if(!_d(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return j9(e)}function j9(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const s=t.codePointAt(n+2);if(s===70||s===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Vc=["history","path","basename","stem","extname","dirname"];class gx{constructor(t){let n;t?_d(t)?n={path:t}:typeof t=="string"||S9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":k9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Vc.length;){const a=Vc[s];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Vc.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?sn.basename(this.path):void 0}set basename(t){Qc(t,"basename"),Kc(t,"basename"),this.path=sn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sn.dirname(this.path):void 0}set dirname(t){S0(this.basename,"dirname"),this.path=sn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sn.extname(this.path):void 0}set extname(t){if(Kc(t,"extname"),S0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=sn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_d(t)&&(t=b9(t)),Qc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sn.basename(this.path,this.extname):void 0}set stem(t){Qc(t,"stem"),Kc(t,"stem"),this.path=sn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const i=this.message(t,n,s);throw i.fatal=!0,i}info(t,n,s){const i=this.message(t,n,s);return i.fatal=void 0,i}message(t,n,s){const i=new Ze(t,n,s);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Kc(e,t){if(e&&e.includes(sn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sn.sep+"`")}function Qc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function S0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function S9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const N9=function(e){const s=this.constructor.prototype,i=s[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,s),a},C9={}.hasOwnProperty;class Np extends N9{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=h9()}copy(){const t=new Np;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(Hc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Zc("data",this.frozen),this.namespace[t]=n,this):C9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Zc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const i=n.call(t,...s);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=no(t),s=this.parser||this.Parser;return Gc("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),Gc("process",this.parser||this.Parser),Yc("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=no(t),c=s.parse(l);s.run(c,l,function(h,d,f){if(h||!d||!f)return u(h);const p=d,m=s.stringify(p,f);P9(m)?f.value=m:f.result=m,u(h,f)});function u(h,d){h||!d?o(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,s;return this.freeze(),Gc("processSync",this.parser||this.Parser),Yc("processSync",this.compiler||this.Compiler),this.process(t,i),C0("processSync","process",n),s;function i(a,o){n=!0,y0(a),s=o}}run(t,n,s){N0(t),this.freeze();const i=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?a(void 0,s):new Promise(a);function a(o,l){const c=no(n);i.run(t,c,u);function u(h,d,f){const p=d||t;h?l(h):o?o(p):s(void 0,p,f)}}}runSync(t,n){let s=!1,i;return this.run(t,n,a),C0("runSync","run",s),i;function a(o,l){y0(o),i=l,s=!0}}stringify(t,n){this.freeze();const s=no(n),i=this.compiler||this.Compiler;return Yc("stringify",i),N0(t),i(t,s)}use(t,...n){const s=this.attachers,i=this.namespace;if(Zc("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[h,...d]=u;c(h,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=Hc(!0,i.settings,u.settings))}function l(u){let h=-1;if(u!=null)if(Array.isArray(u))for(;++h<u.length;){const d=u[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,h){let d=-1,f=-1;for(;++d<s.length;)if(s[d][0]===u){f=d;break}if(f===-1)s.push([u,...h]);else if(h.length>0){let[p,...m]=h;const g=s[f][1];Id(g)&&Id(p)&&(p=Hc(!0,g,p)),s[f]=[u,p,...m]}}}}const E9=new Np().freeze();function Gc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function N0(e){if(!Id(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function C0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function no(e){return T9(e)?e:new gx(e)}function T9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function P9(e){return typeof e=="string"||R9(e)}function R9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const A9="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",E0=[],T0={allowDangerousHtml:!0},L9=/^(https?|ircs?|mailto|xmpp)$/i,I9=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yx(e){const t=_9(e),n=z9(e);return F9(t.runSync(t.parse(n),n),e)}function _9(e){const t=e.rehypePlugins||E0,n=e.remarkPlugins||E0,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...T0}:T0;return E9().use(mj).use(n).use(u9,s).use(t)}function z9(e){const t=e.children||"",n=new gx;return typeof t=="string"&&(n.value=t),n}function F9(e,t){const n=t.allowedElements,s=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||M9;for(const h of I9)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+A9+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Sp(e,u),Xw(e,{Fragment:r.Fragment,components:i,ignoreInvalidStyle:!0,jsx:r.jsx,jsxs:r.jsxs,passKeys:!0,passNode:!0});function u(h,d,f){if(h.type==="raw"&&f&&typeof d=="number")return o?f.children.splice(d,1):f.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let p;for(p in Uc)if(Object.hasOwn(Uc,p)&&Object.hasOwn(h.properties,p)){const m=h.properties[p],g=Uc[p];(g===null||g.includes(h.tagName))&&(h.properties[p]=c(String(m||""),p,h))}}if(h.type==="element"){let p=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!p&&s&&typeof d=="number"&&(p=!s(h,d,f)),p&&f&&typeof d=="number")return l&&h.children?f.children.splice(d,1,...h.children):f.children.splice(d,1),d}}}function M9(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||s!==-1&&t>s||L9.test(e.slice(0,t))?e:""}function P0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,i=n.indexOf(t);for(;i!==-1;)s++,i=n.indexOf(t,i+t.length);return s}function O9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const xx=[],$9=!0,Xc=!1,zd="skip";function D9(e,t,n,s){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i,a,o,l;if(a=t,typeof a=="function")o=a;else if(a&&typeof a=="object"){if(!(a.enter===null||a.enter===void 0))if(typeof a.enter=="function")o=a.enter;else throw new Error("Unexpected value `"+a.enter+"` for `visitors.enter`, expected optional visitor");if(typeof a.exit=="function")l=a.exit;else throw new Error("Unexpected value `"+a.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+a+"` for `enter` or `visitors`, expected visitor or object with visitors");Ea(i);const c=1;u(e,void 0,[])();function u(h,d,f){const p=h&&typeof h=="object"?h:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(h.type+(g?"<"+g+">":""))+")"})}return m;function m(){const g=!i;let v=xx;if(o&&g&&(v=R0(o(h,f,d)),v[0]===Xc))return v;if("children"in h&&h.children){const y=h;if(y.children&&v[0]!==zd){let x=-1+c;const k=[...f,y];for(;x>-1&&x<y.children.length;){const b=y.children[x],T=u(b,x,k)();if(T[0]===Xc)return T;x=typeof T[1]=="number"?T[1]:x+c}}}if(l&&g){const y=R0(l(h,f,d));if(y[0]===zd)throw new Error("Unexpected value `"+y[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(y[0]===Xc||typeof y[1]=="number")return y}return v}}}function R0(e){return Array.isArray(e)?e:typeof e=="number"?[$9,e]:e==null?xx:[e]}function B9(e,t,n){const i=Ea((n||{}).ignore||[]),a=U9(t);let o=-1;for(;++o<a.length;)D9(e,l);function l(u,h,d){if(u.type==="text"&&typeof d=="number")return c(u,h,d);if(i(u,d,h[h.length-1]))return zd}function c(u,h,d){const f=h[h.length-1],p=a[o][0],m=a[o][1];let g=0,v=!1,y=[];p.lastIndex=0;let x=p.exec(u.value);for(;x;){const b=x.index,T={index:x.index,input:x.input,stack:[...h,u]};let w=m(...x,T);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1)p.lastIndex=b+1;else{if(g!==b&&k({type:"text",value:u.value.slice(g,b)}),Array.isArray(w))for(const E of w)k(E);else w&&k(w);g=b+x[0].length,v=!0}if(!p.global)break;x=p.exec(u.value)}return v?(g<u.value.length&&k({type:"text",value:u.value.slice(g)}),f.children.splice(d,1,...y)):y=[u],d+y.length;function k(b){const T=y[y.length-1];T&&T.type==="text"&&b.type==="text"?T.value+=b.value:y.push(b)}}}function U9(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let s=-1;for(;++s<n.length;){const i=n[s];t.push([q9(i[0]),W9(i[1])])}return t}function q9(e){return typeof e=="string"?new RegExp(O9(e),"g"):e}function W9(e){return typeof e=="function"?e:function(){return e}}const Jc="phrasing",eu=["autolink","link","image","label"];function H9(){return{transforms:[X9],enter:{literalAutolink:K9,literalAutolinkEmail:tu,literalAutolinkHttp:tu,literalAutolinkWww:tu},exit:{literalAutolink:Z9,literalAutolinkEmail:Y9,literalAutolinkHttp:Q9,literalAutolinkWww:G9}}}function V9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Jc,notInConstruct:eu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Jc,notInConstruct:eu},{character:":",before:"[ps]",after:"\\/",inConstruct:Jc,notInConstruct:eu}]}}function K9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function tu(e){this.config.enter.autolinkProtocol.call(this,e)}function Q9(e){this.config.exit.autolinkProtocol.call(this,e)}function G9(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Y9(e){this.config.exit.autolinkEmail.call(this,e)}function Z9(e){this.exit(e)}function X9(e){B9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,J9],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,eS]],{ignore:["link","linkReference"]})}function J9(e,t,n,s,i){let a="";if(!vx(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!tS(n)))return!1;const o=nS(n+s);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function eS(e,t,n,s){return!vx(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function tS(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function nS(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],s=n.indexOf(")");const i=P0(e,"(");let a=P0(e,")");for(;s!==-1&&i>a;)e+=n.slice(0,s+1),n=n.slice(s+1),s=n.indexOf(")"),a++;return[e,n]}function vx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Hs(n)||Gl(n))&&(!t||n!==47)}kx.peek=dS;function sS(){this.buffer()}function rS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function iS(){this.buffer()}function aS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Zt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lS(e){this.exit(e)}function cS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Zt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uS(e){this.exit(e)}function dS(){return"["}function kx(e,t,n,s){const i=n.createTracker(s);let a=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]"),a}function hS(){return{enter:{gfmFootnoteCallString:sS,gfmFootnoteCall:rS,gfmFootnoteDefinitionLabelString:iS,gfmFootnoteDefinition:aS},exit:{gfmFootnoteCallString:oS,gfmFootnoteCall:lS,gfmFootnoteDefinitionLabelString:cS,gfmFootnoteDefinition:uS}}}function pS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:kx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(s,i,a,o){const l=a.createTracker(o);let c=l.move("[^");const u=a.enter("footnoteDefinition"),h=a.enter("label");return c+=l.move(a.safe(a.associationId(s),{before:c,after:"]"})),h(),c+=l.move("]:"),s.children&&s.children.length>0&&(l.shift(4),c+=l.move((t?`
|
|
446
|
-
`:" ")+a.indentLines(a.containerFlow(s,l.current()),t?wx:fS))),u(),c}}function fS(e,t,n){return t===0?e:wx(e,t,n)}function wx(e,t,n){return(n?"":" ")+e}const mS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Cp.attention=kS;Cp.peek=wS;function gS(){return{canContainEols:["delete"],enter:{strikethrough:xS},exit:{strikethrough:vS}}}function yS(){return{handlers:{delete:Cp},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mS}]}}function xS(e){this.enter({type:"delete",children:[],position:void 0},e)}function vS(e){this.exit(e)}function Cp(e,t,n,s){const i=n.createTracker(s),a=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let l=i.move(a);return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move(a),o(),l}function kS(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function wS(){return"~"}function bS(e){return e.length}function jS(e,t){const n=t||{},s=(n.align||[]).concat(),i=n.stringLength||bS,a=[],o=[],l=[],c=[];let u=0,h=-1;for(;++h<e.length;){const g=[],v=[];let y=-1;for(e[h].length>u&&(u=e[h].length);++y<e[h].length;){const x=SS(e[h][y]);if(n.alignDelimiters!==!1){const k=i(x);v[y]=k,(c[y]===void 0||k>c[y])&&(c[y]=k)}g.push(x)}o[h]=g,l[h]=v}let d=-1;if(typeof s=="object"&&"length"in s)for(;++d<u;)a[d]=A0(s[d]);else{const g=A0(s);for(;++d<u;)a[d]=g}d=-1;const f=[],p=[];for(;++d<u;){const g=a[d];let v="",y="";g===99?(v=":",y=":"):g===108?v=":":g===114&&(y=":");let x=n.alignDelimiters===!1?1:Math.max(1,c[d]-v.length-y.length);const k=v+"-".repeat(x)+y;n.alignDelimiters!==!1&&(x=v.length+x+y.length,x>c[d]&&(c[d]=x),p[d]=x),f[d]=k}o.splice(1,0,f),l.splice(1,0,p),h=-1;const m=[];for(;++h<o.length;){const g=o[h],v=l[h];d=-1;const y=[];for(;++d<u;){const x=g[d]||"";let k="",b="";if(n.alignDelimiters!==!1){const T=c[d]-(v[d]||0),w=a[d];w===114?k=" ".repeat(T):w===99?T%2?(k=" ".repeat(T/2+.5),b=" ".repeat(T/2-.5)):(k=" ".repeat(T/2),b=k):b=" ".repeat(T)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(k),y.push(x),n.alignDelimiters!==!1&&y.push(b),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
|
|
447
|
-
`)}function SS(e){return e==null?"":String(e)}function A0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function NS(e,t,n,s){const i=n.enter("blockquote"),a=n.createTracker(s);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),CS);return i(),o}function CS(e,t,n){return">"+(n?"":" ")+e}function ES(e,t){return L0(e,t.inConstruct,!0)&&!L0(e,t.notInConstruct,!1)}function L0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function I0(e,t,n,s){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
448
|
-
`&&ES(n.stack,n.unsafe[i]))return/[ \t]/.test(s.before)?"":" ";return`\\
|
|
449
|
-
`}function TS(e,t){const n=String(e);let s=n.indexOf(t),i=s,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===i?++a>o&&(o=a):a=1,i=s+t.length,s=n.indexOf(t,i);return o}function PS(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function RS(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function AS(e,t,n,s){const i=RS(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(PS(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(a,LS);return d(),f}const l=n.createTracker(s),c=i.repeat(Math.max(TS(a,i)+1,3)),u=n.enter("codeFenced");let h=l.move(c);if(e.lang){const d=n.enter(`codeFencedLang${o}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
|
|
450
|
-
`,encode:["`"],...l.current()})),d()}return h+=l.move(`
|
|
451
|
-
`),a&&(h+=l.move(a+`
|
|
452
|
-
`)),h+=l.move(c),u(),h}function LS(e,t,n){return(n?"":" ")+e}function Ep(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function IS(e,t,n,s){const i=Ep(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(s);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
453
|
-
`,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),o(),u}function _S(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ca(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xl(e,t,n){const s=Br(e),i=Br(t);return s===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}bx.peek=zS;function bx(e,t,n,s){const i=_S(n),a=n.enter("emphasis"),o=n.createTracker(s),l=o.move(i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const u=c.charCodeAt(0),h=xl(s.before.charCodeAt(s.before.length-1),u,i);h.inside&&(c=ca(u)+c.slice(1));const d=c.charCodeAt(c.length-1),f=xl(s.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ca(d));const p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},l+c+p}function zS(e,t,n){return n.options.emphasis||"*"}function FS(e,t){let n=!1;return Sp(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,Ad}),!!((!e.depth||e.depth<3)&&yp(e)&&(t.options.setext||n))}function MS(e,t,n,s){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(s);if(FS(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...a.current(),before:`
|
|
454
|
-
`,after:`
|
|
455
|
-
`});return d(),h(),f+`
|
|
456
|
-
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
457
|
-
`))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
458
|
-
`,...a.current()});return/^[\t ]/.test(u)&&(u=ca(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),c(),l(),u}jx.peek=OS;function jx(e){return e.value||""}function OS(){return"<"}Sx.peek=$S;function Sx(e,t,n,s){const i=Ep(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(s);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),u+=c.move(")"),o(),u}function $S(){return"!"}Nx.peek=DS;function Nx(e,t,n,s){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(s);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=h,a(),i==="full"||!u||u!==d?c+=l.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function DS(){return"!"}Cx.peek=BS;function Cx(e,t,n){let s=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(s);)i+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(s);){let u=c.index;s.charCodeAt(u)===10&&s.charCodeAt(u-1)===13&&u--,s=s.slice(0,u)+" "+s.slice(c.index+1)}}return i+s+i}function BS(){return"`"}function Ex(e,t){const n=yp(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Tx.peek=US;function Tx(e,t,n,s){const i=Ep(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(s);let l,c;if(Ex(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),n.stack=h,d}l=n.enter("link"),c=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(c=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),c()),u+=o.move(")"),l(),u}function US(e,t,n){return Ex(e,n)?"<":"["}Px.peek=qS;function Px(e,t,n,s){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(s);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=h,a(),i==="full"||!u||u!==d?c+=l.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function qS(){return"["}function Tp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function WS(e){const t=Tp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function HS(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Rx(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function VS(e,t,n,s){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?HS(n):Tp(n);const l=e.ordered?o==="."?")":".":WS(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Rx(n)===o&&h){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const u=n.containerFlow(e,s);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),u}function KS(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function QS(e,t,n,s){const i=KS(n);let a=n.bulletCurrent||Tp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(s);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),h);return c(),u;function h(d,f,p){return f?(p?"":" ".repeat(o))+d:(p?a:a+" ".repeat(o-a.length))+d}}function GS(e,t,n,s){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,s);return a(),i(),o}const YS=Ea(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ZS(e,t,n,s){return(e.children.some(function(o){return YS(o)})?n.containerPhrasing:n.containerFlow).call(n,e,s)}function XS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ax.peek=JS;function Ax(e,t,n,s){const i=XS(n),a=n.enter("strong"),o=n.createTracker(s),l=o.move(i+i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const u=c.charCodeAt(0),h=xl(s.before.charCodeAt(s.before.length-1),u,i);h.inside&&(c=ca(u)+c.slice(1));const d=c.charCodeAt(c.length-1),f=xl(s.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ca(d));const p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},l+c+p}function JS(e,t,n){return n.options.strong||"*"}function eN(e,t,n,s){return n.safe(e.value,s)}function tN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function nN(e,t,n){const s=(Rx(n)+(n.options.ruleSpaces?" ":"")).repeat(tN(n));return n.options.ruleSpaces?s.slice(0,-1):s}const Lx={blockquote:NS,break:I0,code:AS,definition:IS,emphasis:bx,hardBreak:I0,heading:MS,html:jx,image:Sx,imageReference:Nx,inlineCode:Cx,link:Tx,linkReference:Px,list:VS,listItem:QS,paragraph:GS,root:ZS,strong:Ax,text:eN,thematicBreak:nN};function sN(){return{enter:{table:rN,tableData:_0,tableHeader:_0,tableRow:aN},exit:{codeText:oN,table:iN,tableData:nu,tableHeader:nu,tableRow:nu}}}function rN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function iN(e){this.exit(e),this.data.inTable=void 0}function aN(e){this.enter({type:"tableRow",children:[]},e)}function nu(e){this.exit(e)}function _0(e){this.enter({type:"tableCell",children:[]},e)}function oN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lN(e,t){return t==="|"?t:e}function cN(e){const t=e||{},n=t.tableCellPadding,s=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
459
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:l}};function o(p,m,g,v){return u(h(p,g,v),p.align)}function l(p,m,g,v){const y=d(p,g,v),x=u([y]);return x.slice(0,x.indexOf(`
|
|
460
|
-
`))}function c(p,m,g,v){const y=g.enter("tableCell"),x=g.enter("phrasing"),k=g.containerPhrasing(p,{...v,before:a,after:a});return x(),y(),k}function u(p,m){return jS(p,{align:m,alignDelimiters:s,padding:n,stringLength:i})}function h(p,m,g){const v=p.children;let y=-1;const x=[],k=m.enter("table");for(;++y<v.length;)x[y]=d(v[y],m,g);return k(),x}function d(p,m,g){const v=p.children;let y=-1;const x=[],k=m.enter("tableRow");for(;++y<v.length;)x[y]=c(v[y],p,m,g);return k(),x}function f(p,m,g){let v=Lx.inlineCode(p,m,g);return g.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function uN(){return{exit:{taskListCheckValueChecked:z0,taskListCheckValueUnchecked:z0,paragraph:hN}}}function dN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pN}}}function z0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const s=n.children[0];if(s&&s.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(s.value=s.value.slice(1),s.value.length===0?n.children.shift():n.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,n.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function pN(e,t,n,s){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(s);a&&l.move(o);let c=Lx.listItem(e,t,n,{...s,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(h){return h+o}}function fN(){return[H9(),hS(),gS(),sN(),uN()]}function mN(e){return{extensions:[V9(),pS(e),yS(),cN(e),dN()]}}const gN={tokenize:bN,partial:!0},Ix={tokenize:jN,partial:!0},_x={tokenize:SN,partial:!0},zx={tokenize:NN,partial:!0},yN={tokenize:CN,partial:!0},Fx={name:"wwwAutolink",tokenize:kN,previous:Ox},Mx={name:"protocolAutolink",tokenize:wN,previous:$x},In={name:"emailAutolink",tokenize:vN,previous:Dx},pn={};function xN(){return{text:pn}}let ks=48;for(;ks<123;)pn[ks]=In,ks++,ks===58?ks=65:ks===91&&(ks=97);pn[43]=In;pn[45]=In;pn[46]=In;pn[95]=In;pn[72]=[In,Mx];pn[104]=[In,Mx];pn[87]=[In,Fx];pn[119]=[In,Fx];function vN(e,t,n){const s=this;let i,a;return o;function o(d){return!Fd(d)||!Dx.call(s,s.previous)||Pp(s.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Fd(d)?(e.consume(d),l):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(yN,h,u)(d):d===45||d===95||Qe(d)?(a=!0,e.consume(d),c):h(d)}function u(d){return e.consume(d),i=!0,c}function h(d){return a&&i&&tt(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function kN(e,t,n){const s=this;return i;function i(o){return o!==87&&o!==119||!Ox.call(s,s.previous)||Pp(s.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gN,e.attempt(Ix,e.attempt(_x,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function wN(e,t,n){const s=this;let i="",a=!1;return o;function o(d){return(d===72||d===104)&&$x.call(s,s.previous)&&!Pp(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(tt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),a?u:(a=!0,c)):n(d)}function u(d){return d===null||ml(d)||fe(d)||Hs(d)||Gl(d)?n(d):e.attempt(Ix,e.attempt(_x,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function bN(e,t,n){let s=0;return i;function i(o){return(o===87||o===119)&&s<3?(s++,e.consume(o),i):o===46&&s===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function jN(e,t,n){let s,i,a;return o;function o(u){return u===46||u===95?e.check(zx,c,l)(u):u===null||fe(u)||Hs(u)||u!==45&&Gl(u)?c(u):(a=!0,e.consume(u),o)}function l(u){return u===95?s=!0:(i=s,s=void 0),e.consume(u),o}function c(u){return i||s||!a?n(u):t(u)}}function SN(e,t){let n=0,s=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&s<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(zx,t,a)(o):o===null||fe(o)||Hs(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&s++,e.consume(o),i}}function NN(e,t,n){return s;function s(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),s):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||fe(l)||Hs(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||fe(l)||Hs(l)?t(l):s(l)}function a(l){return tt(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),s):tt(l)?(e.consume(l),o):n(l)}}function CN(e,t,n){return s;function s(a){return e.consume(a),i}function i(a){return Qe(a)?n(a):t(a)}}function Ox(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||fe(e)}function $x(e){return!tt(e)}function Dx(e){return!(e===47||Fd(e))}function Fd(e){return e===43||e===45||e===46||e===95||Qe(e)}function Pp(e){let t=e.length,n=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){n=!0;break}if(s._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const EN={tokenize:zN,partial:!0};function TN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:LN,continuation:{tokenize:IN},exit:_N}},text:{91:{name:"gfmFootnoteCall",tokenize:AN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:PN,resolveTo:RN}}}}function PN(e,t,n){const s=this;let i=s.events.length;const a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o;for(;i--;){const c=s.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const u=Zt(s.sliceSerialize({start:o.end,end:s.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function RN(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",s,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(n,e.length-n+1,...l),e}function AN(e,t,n){const s=this,i=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(a>999||d===93&&!o||d===null||d===91||fe(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Zt(s.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return fe(d)||(o=!0),a++,e.consume(d),d===92?h:u}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function LN(e,t,n){const s=this,i=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(m)}function h(m){if(o>999||m===93&&!l||m===null||m===91||fe(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return a=Zt(s.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return fe(m)||(l=!0),o++,e.consume(m),m===92?d:h}function d(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),le(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function IN(e,t,n){return e.check(Ca,t,e.attempt(EN,t,n))}function _N(e){e.exit("gfmFootnoteDefinition")}function zN(e,t,n){const s=this;return le(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=s.events[s.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function FN(e){let n=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function i(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let u=c;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[c][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[c][1].end)},d={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[c][1].start)},f=[["enter",h,l],["enter",o[u][1],l],["exit",o[u][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&Nt(f,f.length,0,Yl(p,o.slice(u+1,c),l)),Nt(f,f.length,0,[["exit",d,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",h,l]]),Nt(o,u-1,c-u+3,f),c=u+f.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function a(o,l,c){const u=this.previous,h=this.events;let d=0;return f;function f(m){return u===126&&h[h.length-1][1].type!=="characterEscape"?c(m):(o.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const g=Br(u);if(m===126)return d>1?c(m):(o.consume(m),d++,p);if(d<2&&!n)return c(m);const v=o.exit("strikethroughSequenceTemporary"),y=Br(m);return v._open=!y||y===2&&!!g,v._close=!g||g===2&&!!y,l(m)}}}class MN{constructor(){this.map=[],this.index=new Map}add(t,n,s){ON(this,t,n,s)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const s=[];for(;n>0;)n-=1,s.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];s.push(t.slice()),t.length=0;let i=s.pop();for(;i;){for(const a of i)t.push(a);i=s.pop()}this.map.length=0,this.index.clear()}}function ON(e,t,n,s){if(n===0&&s.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...s);return}const a=[t,n,s];e.map.push(a),e.index.set(t,a)}function $N(e,t){let n=!1;const s=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=s.length-1;s[a]=s[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return s}function DN(){return{flow:{null:{name:"table",tokenize:BN,resolveAll:UN}}}}function BN(e,t,n){const s=this;let i=0,a=0,o;return l;function l(C){let R=s.events.length-1;for(;R>-1;){const{type:U}=s.events[R][1];if(U==="lineEnding"||U==="linePrefix")R--;else break}const L=R>-1?s.events[R][1].type:null,$=L==="tableHead"||L==="tableRow"?w:c;return $===w&&s.parser.lazy[s.now().line]?n(C):$(C)}function c(C){return e.enter("tableHead"),e.enter("tableRow"),u(C)}function u(C){return C===124||(o=!0,a+=1),h(C)}function h(C){return C===null?n(C):G(C)?a>1?(a=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),p):n(C):ne(C)?le(e,h,"whitespace")(C):(a+=1,o&&(o=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(C)))}function d(C){return C===null||C===124||fe(C)?(e.exit("data"),h(C)):(e.consume(C),C===92?f:d)}function f(C){return C===92||C===124?(e.consume(C),d):d(C)}function p(C){return s.interrupt=!1,s.parser.lazy[s.now().line]?n(C):(e.enter("tableDelimiterRow"),o=!1,ne(C)?le(e,m,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):m(C))}function m(C){return C===45||C===58?v(C):C===124?(o=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),g):T(C)}function g(C){return ne(C)?le(e,v,"whitespace")(C):v(C)}function v(C){return C===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),y):C===45?(a+=1,y(C)):C===null||G(C)?b(C):T(C)}function y(C){return C===45?(e.enter("tableDelimiterFiller"),x(C)):T(C)}function x(C){return C===45?(e.consume(C),x):C===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(C))}function k(C){return ne(C)?le(e,b,"whitespace")(C):b(C)}function b(C){return C===124?m(C):C===null||G(C)?!o||i!==a?T(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):T(C)}function T(C){return n(C)}function w(C){return e.enter("tableRow"),E(C)}function E(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),E):C===null||G(C)?(e.exit("tableRow"),t(C)):ne(C)?le(e,E,"whitespace")(C):(e.enter("data"),S(C))}function S(C){return C===null||C===124||fe(C)?(e.exit("data"),E(C)):(e.consume(C),C===92?A:S)}function A(C){return C===92||C===124?(e.consume(C),S):S(C)}}function UN(e,t){let n=-1,s=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,u,h,d;const f=new MN;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(l=!1,c!==0&&(F0(f,t,c,u,h),h=void 0,c=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(s=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",h,t]])),i=m.type==="tableDelimiterRow"?2:h?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(s=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=so(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(s?s=!1:(a[1]!==0&&(o[0]=o[1],d=so(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(l=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],d=so(f,t,a,i,n,d)):o[1]!==0&&(d=so(f,t,o,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&F0(f,t,c,u,h),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=$N(t.events,n))}return e}function so(e,t,n,s,i,a){const o=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},lr(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=lr(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=lr(t.events,n[2]),h=lr(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),s!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;e.add(m,g,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},lr(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function F0(e,t,n,s,i){const a=[],o=lr(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),s.end=Object.assign({},o),a.push(["exit",s,t]),e.add(n+1,0,a)}function lr(e,t){const n=e[t],s=n[0]==="enter"?"start":"end";return n[1][s]}const qN={name:"tasklistCheck",tokenize:HN};function WN(){return{text:{91:qN}}}function HN(e,t,n){const s=this;return i;function i(c){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return fe(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return G(c)?t(c):ne(c)?e.check({tokenize:VN},t,n)(c):n(c)}}function VN(e,t,n){return le(e,s,"whitespace");function s(i){return i===null?n(i):t(i)}}function KN(e){return Yy([xN(),TN(),FN(e),DN(),WN()])}const QN={};function Bx(e){const t=this,n=e||QN,s=t.data(),i=s.micromarkExtensions||(s.micromarkExtensions=[]),a=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),o=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);i.push(KN(n)),a.push(fN()),o.push(mN(n))}function Ux(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ux(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function qx(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ux(e))&&(s&&(s+=" "),s+=t);return s}var GN=Object.create,Jl=Object.defineProperty,YN=Object.defineProperties,ZN=Object.getOwnPropertyDescriptor,XN=Object.getOwnPropertyDescriptors,Wx=Object.getOwnPropertyNames,vl=Object.getOwnPropertySymbols,JN=Object.getPrototypeOf,Rp=Object.prototype.hasOwnProperty,Hx=Object.prototype.propertyIsEnumerable,M0=(e,t,n)=>t in e?Jl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,un=(e,t)=>{for(var n in t||(t={}))Rp.call(t,n)&&M0(e,n,t[n]);if(vl)for(var n of vl(t))Hx.call(t,n)&&M0(e,n,t[n]);return e},ec=(e,t)=>YN(e,XN(t)),Vx=(e,t)=>{var n={};for(var s in e)Rp.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&vl)for(var s of vl(e))t.indexOf(s)<0&&Hx.call(e,s)&&(n[s]=e[s]);return n},eC=(e,t)=>function(){return t||(0,e[Wx(e)[0]])((t={exports:{}}).exports,t),t.exports},tC=(e,t)=>{for(var n in t)Jl(e,n,{get:t[n],enumerable:!0})},nC=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Wx(t))!Rp.call(e,i)&&i!==n&&Jl(e,i,{get:()=>t[i],enumerable:!(s=ZN(t,i))||s.enumerable});return e},sC=(e,t,n)=>(n=e!=null?GN(JN(e)):{},nC(!e||!e.__esModule?Jl(n,"default",{value:e,enumerable:!0}):n,e)),rC=eC({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},o={util:{encode:function m(g){return g instanceof l?new l(g.type,m(g.content),g.alias):Array.isArray(g)?g.map(m):g.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++i}),m.__id},clone:function m(g,v){v=v||{};var y,x;switch(o.util.type(g)){case"Object":if(x=o.util.objId(g),v[x])return v[x];y={},v[x]=y;for(var k in g)g.hasOwnProperty(k)&&(y[k]=m(g[k],v));return y;case"Array":return x=o.util.objId(g),v[x]?v[x]:(y=[],v[x]=y,g.forEach(function(b,T){y[T]=m(b,v)}),y);default:return g}},getLanguage:function(m){for(;m;){var g=s.exec(m.className);if(g)return g[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,g){m.className=m.className.replace(RegExp(s,"gi"),""),m.classList.add("language-"+g)},isActive:function(m,g,v){for(var y="no-"+g;m;){var x=m.classList;if(x.contains(g))return!0;if(x.contains(y))return!1;m=m.parentElement}return!!v}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(m,g){var v=o.util.clone(o.languages[m]);for(var y in g)v[y]=g[y];return v},insertBefore:function(m,g,v,y){y=y||o.languages;var x=y[m],k={};for(var b in x)if(x.hasOwnProperty(b)){if(b==g)for(var T in v)v.hasOwnProperty(T)&&(k[T]=v[T]);v.hasOwnProperty(b)||(k[b]=x[b])}var w=y[m];return y[m]=k,o.languages.DFS(o.languages,function(E,S){S===w&&E!=m&&(this[E]=k)}),k},DFS:function m(g,v,y,x){x=x||{};var k=o.util.objId;for(var b in g)if(g.hasOwnProperty(b)){v.call(g,b,g[b],y||b);var T=g[b],w=o.util.type(T);w==="Object"&&!x[k(T)]?(x[k(T)]=!0,m(T,v,null,x)):w==="Array"&&!x[k(T)]&&(x[k(T)]=!0,m(T,v,b,x))}}},plugins:{},highlight:function(m,g,v){var y={code:m,grammar:g,language:v};if(o.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=o.tokenize(y.code,y.grammar),o.hooks.run("after-tokenize",y),l.stringify(o.util.encode(y.tokens),y.language)},tokenize:function(m,g){var v=g.rest;if(v){for(var y in v)g[y]=v[y];delete g.rest}var x=new h;return d(x,x.head,m),u(m,x,g,x.head,0),p(x)},hooks:{all:{},add:function(m,g){var v=o.hooks.all;v[m]=v[m]||[],v[m].push(g)},run:function(m,g){var v=o.hooks.all[m];if(!(!v||!v.length))for(var y=0,x;x=v[y++];)x(g)}},Token:l};function l(m,g,v,y){this.type=m,this.content=g,this.alias=v,this.length=(y||"").length|0}l.stringify=function m(g,v){if(typeof g=="string")return g;if(Array.isArray(g)){var y="";return g.forEach(function(w){y+=m(w,v)}),y}var x={type:g.type,content:m(g.content,v),tag:"span",classes:["token",g.type],attributes:{},language:v},k=g.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(x.classes,k):x.classes.push(k)),o.hooks.run("wrap",x);var b="";for(var T in x.attributes)b+=" "+T+'="'+(x.attributes[T]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+b+">"+x.content+"</"+x.tag+">"};function c(m,g,v,y){m.lastIndex=g;var x=m.exec(v);if(x&&y&&x[1]){var k=x[1].length;x.index+=k,x[0]=x[0].slice(k)}return x}function u(m,g,v,y,x,k){for(var b in v)if(!(!v.hasOwnProperty(b)||!v[b])){var T=v[b];T=Array.isArray(T)?T:[T];for(var w=0;w<T.length;++w){if(k&&k.cause==b+","+w)return;var E=T[w],S=E.inside,A=!!E.lookbehind,C=!!E.greedy,R=E.alias;if(C&&!E.pattern.global){var L=E.pattern.toString().match(/[imsuy]*$/)[0];E.pattern=RegExp(E.pattern.source,L+"g")}for(var $=E.pattern||E,U=y.next,W=x;U!==g.tail&&!(k&&W>=k.reach);W+=U.value.length,U=U.next){var ee=U.value;if(g.length>m.length)return;if(!(ee instanceof l)){var Q=1,_;if(C){if(_=c($,W,m,A),!_||_.index>=m.length)break;var X=_.index,B=_.index+_[0].length,N=W;for(N+=U.value.length;X>=N;)U=U.next,N+=U.value.length;if(N-=U.value.length,W=N,U.value instanceof l)continue;for(var V=U;V!==g.tail&&(N<B||typeof V.value=="string");V=V.next)Q++,N+=V.value.length;Q--,ee=m.slice(W,N),_.index-=W}else if(_=c($,0,ee,A),!_)continue;var X=_.index,P=_[0],ae=ee.slice(0,X),oe=ee.slice(X+P.length),re=W+ee.length;k&&re>k.reach&&(k.reach=re);var ke=U.prev;ae&&(ke=d(g,ke,ae),W+=ae.length),f(g,ke,Q);var Oe=new l(b,S?o.tokenize(P,S):P,R,P);if(U=d(g,ke,Oe),oe&&d(g,U,oe),Q>1){var me={cause:b+","+w,reach:re};u(m,g,v,U.prev,W,me),k&&me.reach>k.reach&&(k.reach=me.reach)}}}}}}function h(){var m={value:null,prev:null,next:null},g={value:null,prev:m,next:null};m.next=g,this.head=m,this.tail=g,this.length=0}function d(m,g,v){var y=g.next,x={value:v,prev:g,next:y};return g.next=x,y.prev=x,m.length++,x}function f(m,g,v){for(var y=g.next,x=0;x<v&&y!==m.tail;x++)y=y.next;g.next=y,y.prev=g,m.length-=x}function p(m){for(var g=[],v=m.head.next;v!==m.tail;)g.push(v.value),v=v.next;return g}return o}();t.exports=n,n.default=n}}),F=sC(rC());F.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},F.languages.markup.tag.inside["attr-value"].inside.entity=F.languages.markup.entity,F.languages.markup.doctype.inside["internal-subset"].inside=F.languages.markup,F.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(F.languages.markup.tag,"addInlined",{value:function(e,s){var n={},n=(n["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:F.languages[s]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),s=(n["language-"+s]={pattern:/[\s\S]+/,inside:F.languages[s]},{});s[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},F.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(F.languages.markup.tag,"addAttribute",{value:function(e,t){F.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:F.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),F.languages.html=F.languages.markup,F.languages.mathml=F.languages.markup,F.languages.svg=F.languages.markup,F.languages.xml=F.languages.extend("markup",{}),F.languages.ssml=F.languages.xml,F.languages.atom=F.languages.xml,F.languages.rss=F.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s="(?:[^\\\\-]|"+n.source+")",s=RegExp(s+"-"+s),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(F),F.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},F.languages.javascript=F.languages.extend("clike",{"class-name":[F.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),F.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,F.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:F.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:F.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:F.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:F.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:F.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),F.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:F.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),F.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),F.languages.markup&&(F.languages.markup.tag.addInlined("script","javascript"),F.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),F.languages.js=F.languages.javascript,F.languages.actionscript=F.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),F.languages.actionscript["class-name"].alias="function",delete F.languages.actionscript.parameter,delete F.languages.actionscript["literal-property"],F.languages.markup&&F.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:F.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(F),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,s){(n=typeof n=="string"?[n]:n).forEach(function(i){var a=function(d){d.inside||(d.inside={}),d.inside.rest=s},o="doc-comment";if(l=e.languages[i]){var l,c=l[o];if((c=c||(l=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(c=l[o]={pattern:c}),Array.isArray(c))for(var u=0,h=c.length;u<h;u++)c[u]instanceof RegExp&&(c[u]={pattern:c[u]}),a(c[u]);else a(c)}})}}),t.addSupport(["java","javascript","php"],t)}(F),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(F),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(F),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(l,c){c=(c||"").replace(/m/g,"")+"m";var u=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return s}).replace(/<<value>>/g,function(){return l});return RegExp(u,c)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return s}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(F),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,o=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(h){u!==h&&(e.languages.markdown[u].inside.content.inside[h]=e.languages.markdown[h])})}),e.hooks.add("after-tokenize",function(u){u.language!=="markdown"&&u.language!=="md"||function h(d){if(d&&typeof d!="string")for(var f=0,p=d.length;f<p;f++){var m,g=d[f];g.type!=="code"?h(g.content):(m=g.content[1],g=g.content[3],m&&g&&m.type==="code-language"&&g.type==="code-block"&&typeof m.content=="string"&&(m=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),m="language-"+(m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase()),g.alias?typeof g.alias=="string"?g.alias=[g.alias,m]:g.alias.push(m):g.alias=[m]))}}(u.tokens)}),e.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var h="",d=0,f=u.classes.length;d<f;d++){var p=u.classes[d],p=/language-(.+)/.exec(p);if(p){h=p[1];break}}var m,g=e.languages[h];g?u.content=e.highlight(function(v){return v=v.replace(o,""),v=v.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(y,x){var k;return(x=x.toLowerCase())[0]==="#"?(k=x[1]==="x"?parseInt(x.slice(2),16):Number(x.slice(1)),c(k)):l[x]||y})}(u.content),g,h):h&&h!=="none"&&e.plugins.autoloader&&(m="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),u.attributes.id=m,e.plugins.autoloader.loadLanguages(h,function(){var v=document.getElementById(m);v&&(v.innerHTML=e.highlight(v.textContent,e.languages[h],h))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),l={amp:"&",lt:"<",gt:">",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(F),F.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:F.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},F.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),n=0;n<t.length;){var s=t[n++];if(s.type==="keyword"&&s.content==="mutation"){var i=[];if(d(["definition-mutation","punctuation"])&&h(1).content==="("){n+=2;var a=f(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=h(0);o.type==="variable"&&(p(o,"variable-input"),i.push(o.content))}n=a+1}if(d(["punctuation","property-query"])&&h(0).content==="{"&&(n++,p(h(0),"property-mutation"),0<i.length)){var l=f(/^\{$/,/^\}$/);if(l!==-1)for(var c=n;c<l;c++){var u=t[c];u.type==="variable"&&0<=i.indexOf(u.content)&&p(u,"variable-input")}}}}function h(m){return t[n+m]}function d(m,g){g=g||0;for(var v=0;v<m.length;v++){var y=h(v+g);if(!y||y.type!==m[v])return}return 1}function f(m,g){for(var v=1,y=n;y<t.length;y++){var x=t[y],k=x.content;if(x.type==="punctuation"&&typeof k=="string"){if(m.test(k))v++;else if(g.test(k)&&--v===0)return y}}return-1}function p(m,g){var v=m.alias;v?Array.isArray(v)||(m.alias=v=[v]):m.alias=v=[],v.push(g)}}),F.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,s=t.inside.interpolation,i=s.inside["interpolation-punctuation"],a=s.pattern.source;function o(d,f){if(e.languages[d])return{pattern:RegExp("((?:"+f+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:d}}}}function l(d,f,p){return d={code:d,grammar:f,language:p},e.hooks.run("before-tokenize",d),d.tokens=e.tokenize(d.code,d.grammar),e.hooks.run("after-tokenize",d),d.tokens}function c(d,f,p){var v=e.tokenize(d,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),m=0,g={},v=l(v.map(function(x){if(typeof x=="string")return x;for(var k,b,x=x.content;d.indexOf((b=m++,k="___"+p.toUpperCase()+"_"+b+"___"))!==-1;);return g[k]=x,k}).join(""),f,p),y=Object.keys(g);return m=0,function x(k){for(var b=0;b<k.length;b++){if(m>=y.length)return;var T,w,E,S,A,C,R,L=k[b];typeof L=="string"||typeof L.content=="string"?(T=y[m],(R=(C=typeof L=="string"?L:L.content).indexOf(T))!==-1&&(++m,w=C.substring(0,R),A=g[T],E=void 0,(S={})["interpolation-punctuation"]=i,(S=e.tokenize(A,S)).length===3&&((E=[1,1]).push.apply(E,l(S[1],e.languages.javascript,"javascript")),S.splice.apply(S,E)),E=new e.Token("interpolation",S,s.alias,A),S=C.substring(R+T.length),A=[],w&&A.push(w),A.push(E),S&&(x(C=[S]),A.push.apply(A,C)),typeof L=="string"?(k.splice.apply(k,[b,1].concat(A)),b+=A.length-1):L.content=A)):(R=L.content,Array.isArray(R)?x(R):x([R]))}}(v),new e.Token(p,v,"language-"+p,d)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function h(d){return typeof d=="string"?d:Array.isArray(d)?d.map(h).join(""):h(d.content)}e.hooks.add("after-tokenize",function(d){d.language in u&&function f(p){for(var m=0,g=p.length;m<g;m++){var v,y,x,k=p[m];typeof k!="string"&&(v=k.content,Array.isArray(v)?k.type==="template-string"?(k=v[1],v.length===3&&typeof k!="string"&&k.type==="embedded-code"&&(y=h(k),k=k.alias,k=Array.isArray(k)?k[0]:k,x=e.languages[k])&&(v[1]=c(y,x,k))):f(v):typeof v!="string"&&f([v]))}}(d.tokens)})}(F),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(F),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,s="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(s+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(s+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(F),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(F),F.languages.n4js=F.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),F.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),F.languages.n4jsd=F.languages.n4js,function(e){function t(o,l){return RegExp(o.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),l)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],s=0;s<n.length;s++){var a=n[s],i=e.languages.javascript[a],a=(i=e.util.type(i)==="RegExp"?e.languages.javascript[a]={pattern:i}:i).inside||{};(i.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(F),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,s=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(c,u){return c=c.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return s}).replace(/<SPREAD>/g,function(){return i}),RegExp(c,u)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(c){for(var u=[],h=0;h<c.length;h++){var d=c[h],f=!1;typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?0<u.length&&u[u.length-1].tagName===l(d.content[0].content[1])&&u.pop():d.content[d.content.length-1].content!=="/>"&&u.push({tagName:l(d.content[0].content[1]),openedBraces:0}):0<u.length&&d.type==="punctuation"&&d.content==="{"?u[u.length-1].openedBraces++:0<u.length&&0<u[u.length-1].openedBraces&&d.type==="punctuation"&&d.content==="}"?u[u.length-1].openedBraces--:f=!0),(f||typeof d=="string")&&0<u.length&&u[u.length-1].openedBraces===0&&(f=l(d),h<c.length-1&&(typeof c[h+1]=="string"||c[h+1].type==="plain-text")&&(f+=l(c[h+1]),c.splice(h+1,1)),0<h&&(typeof c[h-1]=="string"||c[h-1].type==="plain-text")&&(f=l(c[h-1])+f,c.splice(h-1,1),h--),c[h]=new e.Token("plain-text",f,null,f)),d.content&&typeof d.content!="string"&&o(d.content)}}var l=function(c){return c?typeof c=="string"?c:typeof c.content=="string"?c.content:c.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(c){c.language!=="jsx"&&c.language!=="tsx"||o(c.tokens)})}(F),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(F),F.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},F.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=F.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(F),F.languages.c=F.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),F.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),F.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},F.languages.c.string],char:F.languages.c.char,comment:F.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:F.languages.c}}}}),F.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete F.languages.c.boolean,F.languages.objectivec=F.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete F.languages.objectivec["class-name"],F.languages.objc=F.languages.objectivec,F.languages.reason=F.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),F.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete F.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(F),F.languages.go=F.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),F.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete F.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(F),F.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},F.languages.python["string-interpolation"].inside.interpolation.inside.rest=F.languages.python,F.languages.py=F.languages.python,F.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},F.languages.webmanifest=F.languages.json;var ua={};tC(ua,{dracula:()=>aC,duotoneDark:()=>lC,duotoneLight:()=>uC,github:()=>hC,gruvboxMaterialDark:()=>BC,gruvboxMaterialLight:()=>qC,jettwaveDark:()=>IC,jettwaveLight:()=>zC,nightOwl:()=>fC,nightOwlLight:()=>gC,oceanicNext:()=>xC,okaidia:()=>kC,oneDark:()=>MC,oneLight:()=>$C,palenight:()=>bC,shadesOfPurple:()=>SC,synthwave84:()=>CC,ultramin:()=>TC,vsDark:()=>Kx,vsLight:()=>AC});var iC={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},aC=iC,oC={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},lC=oC,cC={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},uC=cC,dC={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},hC=dC,pC={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},fC=pC,mC={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},gC=mC,yt={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},yC={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:yt.keyword}},{types:["attr-value"],style:{color:yt.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:yt.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:yt.primitive}},{types:["boolean"],style:{color:yt.boolean}},{types:["tag"],style:{color:yt.tag}},{types:["string"],style:{color:yt.string}},{types:["punctuation"],style:{color:yt.string}},{types:["selector","char","builtin","inserted"],style:{color:yt.char}},{types:["function"],style:{color:yt.function}},{types:["operator","entity","url","variable"],style:{color:yt.variable}},{types:["keyword"],style:{color:yt.keyword}},{types:["atrule","class-name"],style:{color:yt.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},xC=yC,vC={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},kC=vC,wC={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},bC=wC,jC={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},SC=jC,NC={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},CC=NC,EC={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},TC=EC,PC={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Kx=PC,RC={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},AC=RC,LC={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},IC=LC,_C={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},zC=_C,FC={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},MC=FC,OC={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},$C=OC,DC={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},BC=DC,UC={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},qC=UC,WC=e=>j.useCallback(t=>{var n=t,{className:s,style:i,line:a}=n,o=Vx(n,["className","style","line"]);const l=ec(un({},o),{className:qx("token-line",s)});return typeof e=="object"&&"plain"in e&&(l.style=e.plain),typeof i=="object"&&(l.style=un(un({},l.style||{}),i)),l},[e]),HC=e=>{const t=j.useCallback(({types:n,empty:s})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return s!=null?{display:"inline-block"}:void 0;if(n.length===1&&s!=null)return e[n[0]]}return Object.assign(s!=null?{display:"inline-block"}:{},...n.map(i=>e[i]))}},[e]);return j.useCallback(n=>{var s=n,{token:i,className:a,style:o}=s,l=Vx(s,["token","className","style"]);const c=ec(un({},l),{className:qx("token",...i.types,a),children:i.content,style:t(i)});return o!=null&&(c.style=un(un({},c.style||{}),o)),c},[t])},VC=/\r\n|\r|\n/,O0=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
461
|
-
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
462
|
-
`,e[0].empty=!0)},$0=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},KC=e=>{const t=[[]],n=[e],s=[0],i=[e.length];let a=0,o=0,l=[];const c=[l];for(;o>-1;){for(;(a=s[o]++)<i[o];){let u,h=t[o];const f=n[o][a];if(typeof f=="string"?(h=o>0?h:["plain"],u=f):(h=$0(h,f.type),f.alias&&(h=$0(h,f.alias)),u=f.content),typeof u!="string"){o++,t.push(h),n.push(u),s.push(0),i.push(u.length);continue}const p=u.split(VC),m=p.length;l.push({types:h,content:p[0]});for(let g=1;g<m;g++)O0(l),c.push(l=[]),l.push({types:h,content:p[g]})}o--,t.pop(),n.pop(),s.pop(),i.pop()}return O0(l),c},D0=KC,QC=({prism:e,code:t,grammar:n,language:s})=>j.useMemo(()=>{if(n==null)return D0([t]);const i={code:t,grammar:n,language:s,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",i),D0(i.tokens)},[t,n,s,e]),GC=(e,t)=>{const{plain:n}=e,s=e.styles.reduce((i,a)=>{const{languages:o,style:l}=a;return o&&!o.includes(t)||a.types.forEach(c=>{const u=un(un({},i[c]),l);i[c]=u}),i},{});return s.root=n,s.plain=ec(un({},n),{backgroundColor:void 0}),s},YC=GC,ZC=({children:e,language:t,code:n,theme:s,prism:i})=>{const a=t.toLowerCase(),o=YC(s,a),l=WC(o),c=HC(o),u=i.languages[a],h=QC({prism:i,language:a,code:n,grammar:u});return e({tokens:h,className:`prism-code language-${a}`,style:o!=null?o.root:{},getLineProps:l,getTokenProps:c})},Qx=e=>j.createElement(ZC,ec(un({},e),{prism:e.prism||F,theme:e.theme||Kx,code:e.code,language:e.language}));/*! Bundled license information:
|
|
463
|
-
|
|
464
|
-
prismjs/prism.js:
|
|
465
|
-
(**
|
|
466
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
467
|
-
*
|
|
468
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
469
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
470
|
-
* @namespace
|
|
471
|
-
* @public
|
|
472
|
-
*)
|
|
473
|
-
*/const XC=/^\s*(?:flowchart|graph)\s*(LR|RL|TD|TB|BT)?\s*;?\s*$/i,JC=/^([A-Za-z0-9_-ۿ-]+)\s*(\[\[(.+?)\]\]|\(\[(.+?)\]\)|\(\((.+?)\)\)|\[(.+?)\]|\((.+?)\)|\{(.+?)\}|>(.+?)\])?/,eE=/^\s*(-->|---|-\.->|-\.-|==>|===|--\s*(.+?)\s*-->|-\.\s*(.+?)\s*\.->|==\s*(.+?)\s*==>)\s*(?:\|(.+?)\|)?\s*/;function B0(e){return e.replace(/^["']|["']$/g,"").replace(/<br\s*\/?>/gi," ").trim()}function tE(e){const t=e.split(`
|
|
474
|
-
`).map(f=>f.replace(/%%.*$/,"").trim()).filter(Boolean),n=t.shift()?.match(XC);if(!n)return null;const s=(n[1]??"TD").toUpperCase(),i=new Map,a=[],o=f=>{const p=f.match(JC);if(!p)return null;const m=p[1],g=p[3]??p[4]??p[5]??p[6]??p[7]??p[8]??p[9],v=p[8]?"decision":p[6]||p[3]?"box":g?"round":"box",y=i.get(m);return(!y||g)&&i.set(m,{id:m,text:B0(g??y?.text??m),shape:g?v:y?.shape??v}),{id:m,rest:f.slice(p[0].length)}};for(const f of t)if(!/^(classDef|class|style|linkStyle|click|subgraph|end|direction)\b/.test(f))for(const p of f.split(";").map(m=>m.trim()).filter(Boolean)){let m=o(p);if(!m)continue;let g=m.rest;for(;;){const v=g.match(eE);if(!v)break;const y=o(g.slice(v[0].length));if(!y)break;const x=B0(v[5]??v[2]??v[3]??v[4]??"");a.push({from:m.id,to:y.id,...x?{label:x}:{},...v[1].includes(".")?{dashed:!0}:{}}),m=y,g=y.rest}}if(!i.size)return null;const l=new Map([...i.keys()].map(f=>[f,0]));for(let f=0;f<i.size;f+=1){let p=!1;for(const m of a){if(m.from===m.to)continue;const g=(l.get(m.from)??0)+1;g>(l.get(m.to)??0)&&g<i.size&&(l.set(m.to,g),p=!0)}if(!p)break}const c=new Map,u=[...i.values()].map(f=>{const p=l.get(f.id)??0,m=c.get(p)??0;return c.set(p,m+1),{...f,rank:p,slot:m}}),h=s==="RL"||s==="BT",d=Math.max(...u.map(f=>f.rank));return{across:s==="LR"||s==="RL",nodes:h?u.map(f=>({...f,rank:d-f.rank})):u,edges:a}}function Zr({pictures:e,start:t,onClose:n}){const[s,i]=j.useState(t),a=e.length,o=j.useCallback(c=>i(u=>(u+c+a)%a),[a]);j.useEffect(()=>{const c=u=>{u.key==="Escape"?n():u.key==="ArrowRight"?o(1):u.key==="ArrowLeft"&&o(-1)};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[n,o]);const l=e[s];return l?r.jsxs("div",{className:"lightbox",role:"dialog","aria-modal":"true","aria-label":l.caption,onMouseDown:c=>c.target===c.currentTarget&&n(),children:[r.jsxs("div",{className:"lb-top",children:[r.jsx("span",{className:"lb-cap",children:l.caption}),a>1&&r.jsxs("span",{className:"lb-count",children:[s+1," of ",a]}),r.jsx("span",{className:"grow"}),r.jsx("a",{className:"iconbtn",href:l.src,target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",title:"Open in a new tab",children:r.jsx(ls,{size:15})}),r.jsx("button",{className:"iconbtn",onClick:n,"aria-label":"Close",children:r.jsx(Dt,{size:16})})]}),r.jsx("img",{className:"lb-img",src:l.src,alt:l.caption,onMouseDown:c=>c.stopPropagation()}),a>1&&r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"lb-nav prev",onClick:()=>o(-1),"aria-label":"Previous picture",children:r.jsx(hy,{size:22})}),r.jsx("button",{className:"lb-nav next",onClick:()=>o(1),"aria-label":"Next picture",children:r.jsx(Qh,{size:22})})]})]}):null}function Ap({src:e,alt:t,className:n}){const[s,i]=j.useState(!1);return r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"zoom",onClick:()=>i(!0),"aria-label":`Open ${t} full size`,children:r.jsx("img",{className:n,src:e,alt:t,loading:"lazy"})}),s&&r.jsx(Zr,{pictures:[{src:e,caption:t}],start:0,onClose:()=>i(!1)})]})}function Lp({text:e,ticket:t,stream:n,caret:s}){const[i,a]=j.useState(null),o=j.useMemo(()=>[[tw,{stream:n,caret:s}]],[n,s]);return r.jsxs("div",{className:"cmd",children:[r.jsx(yx,{remarkPlugins:[Bx],rehypePlugins:o,components:{a:({href:l,children:c})=>r.jsx("a",{href:l,target:"_blank",rel:"noreferrer",children:c}),img:({src:l,alt:c})=>{const u=l?/^(https?:|data:)/.test(l)?l:bt(t,l):"";return r.jsx("button",{className:"cimg",onClick:()=>a(u),"aria-label":`Open ${c||"the picture"} big`,children:r.jsx("img",{src:u,alt:c??"",loading:"lazy"})})},table:({node:l,children:c})=>r.jsx("div",{className:"ctable",children:r.jsx("table",{dir:l?.properties?.dir??void 0,children:c})}),pre:({node:l})=>r.jsx(nE,{node:l})},children:e}),i&&r.jsx(Zr,{pictures:[{src:i,caption:"Picture"}],start:0,onClose:()=>a(null)})]})}function Gx(e){return e.type==="text"?e.value??"":(e.children??[]).map(Gx).join("")}function nE({node:e}){const t=e.children?.find(a=>a.tagName==="code"),s=(t?.properties?.className??[]).find(a=>a.startsWith("language-"))?.slice(9)??"",i=Gx(t??e).replace(/\n$/,"");if(s==="mermaid"){const a=tE(i);if(a)return r.jsx(rE,{chart:a})}return r.jsx(sE,{lang:s==="mermaid"?"Diagram (Mermaid)":s,code:i})}function sE({lang:e,code:t}){const{theme:n,toast:s}=Ce(),i=()=>void navigator.clipboard?.writeText(t).then(()=>s("Code copied"),()=>s("Could not copy. Select the text instead.","err"));return r.jsxs("div",{className:"ccode",dir:"ltr",children:[r.jsxs("div",{className:"ccode-h",children:[r.jsx("span",{children:e||"text"}),r.jsxs("button",{className:"cact",onClick:i,"aria-label":"Copy the code",children:[r.jsx(Vr,{size:13})," Copy"]})]}),r.jsx(Qx,{code:t,language:e||"text",theme:n==="dark"?ua.vsDark:ua.github,children:({tokens:a,getLineProps:o,getTokenProps:l})=>r.jsx("pre",{children:a.map((c,u)=>r.jsx("div",{...o({line:c}),children:c.map((h,d)=>r.jsx("span",{...l({token:h})},d))},u))})})]})}function rE({chart:e}){const t=j.useRef(null),[n,s]=j.useState([]),i=j.useMemo(()=>{const o=[];for(const l of e.nodes)(o[l.rank]??=[]).push(l);return o.map(l=>(l??[]).sort((c,u)=>c.slot-u.slot))},[e]),a=j.useMemo(()=>new Set(e.nodes.filter(o=>!e.edges.some(l=>l.from===o.id)).map(o=>o.id)),[e]);return j.useLayoutEffect(()=>{const o=t.current;if(!o)return;const l=()=>{const u=o.getBoundingClientRect(),h=d=>o.querySelector(`[data-node="${CSS.escape(d)}"]`)?.getBoundingClientRect();s(e.edges.flatMap(d=>{const f=h(d.from),p=h(d.to);if(!f||!p)return[];const m=e.across?p.left>=f.right-1:p.top>=f.bottom-1;let g,v,y,x,k;if(e.across){g=(m?f.right:f.left)-u.left,v=f.top+f.height/2-u.top,y=(m?p.left:p.right)-u.left,x=p.top+p.height/2-u.top;const b=Math.max(24,Math.abs(y-g)/2)*(m?1:-1);k=`M${g},${v} C${g+b},${v} ${y-b},${x} ${y},${x}`}else{g=f.left+f.width/2-u.left,v=(m?f.bottom:f.top)-u.top,y=p.left+p.width/2-u.left,x=(m?p.top:p.bottom)-u.top;const b=Math.max(18,Math.abs(x-v)/2)*(m?1:-1);k=`M${g},${v} C${g},${v+b} ${y},${x-b} ${y},${x}`}return[{d:k,x:(g+y)/2,y:(v+x)/2,...d.label?{label:d.label}:{},...d.dashed?{dashed:!0}:{}}]}))};l();const c=new ResizeObserver(l);return c.observe(o),()=>c.disconnect()},[e]),r.jsx("div",{className:"cdiagram",dir:"ltr",children:r.jsxs("div",{ref:t,className:`cflow ${e.across?"across":"down"}`,children:[r.jsxs("svg",{className:"cflow-lines","aria-hidden":"true",children:[r.jsx("defs",{children:r.jsx("marker",{id:"cflow-arrow",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:r.jsx("path",{d:"M0,0 L10,5 L0,10 z"})})}),n.map((o,l)=>r.jsx("path",{d:o.d,className:o.dashed?"dash":"",markerEnd:"url(#cflow-arrow)"},l))]}),i.map((o,l)=>r.jsx("div",{className:"cflow-rank",children:o.map(c=>r.jsx("span",{"data-node":c.id,className:`cnode ${c.shape} ${a.has(c.id)&&c.shape!=="decision"?"end":""}`,children:r.jsx("bdi",{children:c.text})},c.id))},l)),n.map((o,l)=>o.label?r.jsx("span",{className:"cflow-label",style:{left:o.x,top:o.y},children:o.label},l):null)]})})}function iE({lines:e,children:t}){const[n,s]=j.useState(!1);return e<=26?r.jsx(r.Fragment,{children:t}):r.jsxs("div",{className:`cfold ${n?"open":""}`,children:[r.jsx("div",{className:"cfold-body",children:t}),r.jsx("button",{className:"btn sm",onClick:()=>s(!n),children:n?"Show less":`Show all · ${e} lines`})]})}function aE(e){return e.split(`
|
|
475
|
-
`).reduce((t,n)=>t+(n.trim()?Math.ceil(n.length/80):0),0)}const U0=/\.(png|jpe?g|gif|webp)$/i,q0=/\.html?$/i;function oE({ticket:e,files:t}){const n=t.filter(a=>U0.test(a)),s=t.filter(a=>q0.test(a)),i=t.filter(a=>!U0.test(a)&&!q0.test(a));return r.jsxs("div",{className:"attached",children:[s.map(a=>r.jsx(Ip,{ticket:e,file:a},a)),n.length>0&&r.jsx("div",{className:"attpics",children:n.map(a=>r.jsx(Ap,{src:bt(e,a),alt:W0(a)},a))}),i.map(a=>r.jsxs("a",{className:"btn sm",href:bt(e,a),download:!0,children:[r.jsx(Pn,{size:13})," ",W0(a)]},a))]})}function Ip({ticket:e,file:t,title:n="Mockup"}){const[s,i]=j.useState(!1),a=he({queryKey:["mockup-link",e,t],queryFn:()=>de(`/api/v1/tickets/${encodeURIComponent(e)}/mockup-link?path=${encodeURIComponent(t)}`),staleTime:1/0});if(a.isError)return r.jsx("p",{className:"note",children:"The mockup could not be read."});const o=l=>r.jsx("iframe",{className:l,title:n,sandbox:"allow-scripts",src:a.data?.url??"about:blank"});return r.jsxs("div",{className:"mockup",children:[r.jsxs("div",{className:"mockbar",children:[r.jsxs("span",{children:[n," · click around, it is only a picture of the idea"]}),r.jsxs("button",{className:"btn sm",onClick:()=>i(!0),children:[r.jsx(Gh,{size:12})," Full size"]})]}),o("mockframe"),s&&r.jsx(it,{title:n,wide:!0,onClose:()=>i(!1),children:o("mockframe big")})]})}function W0(e){return e.split(/[\\/]/).pop()??e}const Md=/\.(png|jpe?g|gif|webp|bmp)$/i,H0=/\.(mp4|webm|mov|m4v)$/i,Od=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba)$/i,Yx=/\.(md|markdown)$/i,Zx=/\.pdf$/i,Xx=/\.html?$/i;function xn(e){return e.split(/[\\/]/).pop()??e}function Jx(e){return Yx.test(e)?{cls:"md",label:"MD"}:Zx.test(e)?{cls:"pdf",label:"PDF"}:Xx.test(e)?{cls:"html",label:"HTML"}:Md.test(e)?{cls:"img",label:(e.split(".").pop()??"IMG").toUpperCase().slice(0,4)}:{cls:"file",label:(e.split(".").pop()??"FILE").toUpperCase().slice(0,4)}}function _p({ticket:e,files:t,from:n,onOpen:s,sent:i}){const[a,o]=j.useState(null),[l,c]=j.useState(null),u=t.filter(p=>Md.test(p)),h=t.filter(p=>H0.test(p)),d=t.filter(p=>Od.test(p)),f=t.filter(p=>!Md.test(p)&&!H0.test(p)&&!Od.test(p)&&!/\.transcript\.txt$/.test(p));return r.jsxs("div",{className:"cfiles",children:[u.length>0&&r.jsx("div",{className:"cshots",children:u.map((p,m)=>r.jsxs("button",{className:"cshot",onClick:()=>o(m),"aria-label":`Open ${xn(p)} big`,children:[r.jsx("img",{src:bt(e,p),alt:xn(p),loading:"lazy"}),i&&r.jsx("span",{className:"cshot-ok",title:"Sent",children:r.jsx(J,{size:11,strokeWidth:3})})]},p))}),h.map(p=>r.jsxs("div",{className:"cvideo",children:[r.jsx("video",{src:bt(e,p),controls:!0,preload:"metadata"}),r.jsx(e3,{ticket:e,file:p})]},p)),d.map(p=>r.jsx(cE,{ticket:e,file:p},p)),f.map(p=>{const m=Jx(p),g=Yx.test(p),v=Zx.test(p),y=Xx.test(p),x=g?"Markdown · opens beside the chat":v?"PDF · opens beside the chat":y?"Mockup · runs here, sealed off":"File · downloads",k=r.jsxs(r.Fragment,{children:[r.jsx("span",{className:`cfic ${m.cls}`,children:m.label}),r.jsxs("span",{className:"cfile-t",children:[r.jsx("span",{className:"cfname",children:xn(p)}),r.jsx("span",{className:"cfmeta",children:x})]}),r.jsx("span",{className:"cfopen",children:g||v||y?"Open":r.jsx(Pn,{size:14})})]});return g||v?r.jsx("button",{className:"cfile",onClick:()=>s?.({ticket:e,file:p,kind:g?"md":"pdf",...n?{from:n}:{}}),children:k},p):y?r.jsx("button",{className:"cfile",onClick:()=>c(p),children:k},p):r.jsx("a",{className:"cfile",href:bt(e,p),download:!0,children:k},p)}),a!==null&&r.jsx(Zr,{pictures:u.map(p=>({src:bt(e,p),caption:xn(p)})),start:a,onClose:()=>o(null)}),l&&r.jsx(it,{title:xn(l),wide:!0,onClose:()=>c(null),children:r.jsx(Ip,{ticket:e,file:l,title:xn(l)})})]})}function lE(e,t){return he({queryKey:["transcript",e,t],queryFn:async()=>{const n=await fetch(bt(e,`${t}.transcript.txt`));return n.ok&&(await n.text()).replace(/^Transcript of [^\n]*\n+/,"").trim()||null},staleTime:3e4,refetchInterval:n=>n.state.data?!1:1e4})}function e3({ticket:e,file:t,open:n=!0}){const s=lE(e,t).data,[i,a]=j.useState(n);return s?r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"ctlink",onClick:()=>a(!i),children:i?"Hide the written text":"Show the written text"}),i&&r.jsx("div",{className:"ctrans",children:s.split(/\n+/).map((o,l)=>{const c=dn(o);return r.jsx("p",{dir:c.dir,lang:c.dir==="rtl"?"ar":"en",className:Ln(c),children:o},l)})})]}):null}function cE({ticket:e,file:t}){const n=j.useRef(null),[s,i]=j.useState(!1),[a,o]=j.useState({at:0,length:0}),l=j.useMemo(()=>{let d=7;for(const f of t)d=(d*31+f.charCodeAt(0))%9973;return Array.from({length:34},(f,p)=>6+d*(p+3)*7%19)},[t]);j.useEffect(()=>{const d=n.current;if(!d)return;const f=()=>o({at:d.currentTime,length:Number.isFinite(d.duration)?d.duration:0}),p=()=>i(!1);return d.addEventListener("timeupdate",f),d.addEventListener("loadedmetadata",f),d.addEventListener("ended",p),()=>{d.removeEventListener("timeupdate",f),d.removeEventListener("loadedmetadata",f),d.removeEventListener("ended",p)}},[]);const c=()=>{const d=n.current;d&&(s?d.pause():d.play().catch(()=>i(!1)),i(!s))},u=s||a.at>0?a.at:a.length,h=a.length?Math.min(1,a.at/a.length):0;return r.jsxs("div",{className:"cvoice-w",children:[r.jsxs("div",{className:"cvoice",children:[r.jsx("button",{className:"cplay",onClick:c,"aria-label":s?"Pause the voice note":"Play the voice note",children:s?r.jsx(gy,{size:15,fill:"currentColor"}):r.jsx(Zh,{size:15,fill:"currentColor"})}),r.jsx("div",{className:"cwave","aria-hidden":"true",children:l.map((d,f)=>r.jsx("i",{style:{height:d},className:f/l.length<h?"on":""},f))}),r.jsx("span",{className:"cvt",children:uE(u)}),r.jsx("audio",{ref:n,src:bt(e,t),preload:"metadata"})]}),r.jsx(e3,{ticket:e,file:t})]})}function uE(e){const t=Math.max(0,Math.round(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function zp({doc:e,onClose:t}){const{toast:n}=Ce(),s=bt(e.ticket,e.file),i=he({queryKey:["doc",e.ticket,e.file],queryFn:async()=>{const l=await fetch(s);if(!l.ok)throw new Error("The file could not be read.");return l.text()},enabled:e.kind==="md"}),a=Jx(e.file),o=()=>void navigator.clipboard?.writeText(i.data??"").then(()=>n("Document copied"));return r.jsxs("section",{className:"cdoc","aria-label":xn(e.file),children:[r.jsxs("div",{className:"cdoc-h",children:[r.jsx("span",{className:`cfic sm ${a.cls}`,children:a.label}),r.jsxs("div",{className:"grow",children:[r.jsx("div",{className:"cfname",children:xn(e.file)}),r.jsx("div",{className:"cfmeta",children:e.from??(e.kind==="md"?"Markdown":"PDF")})]}),e.kind==="md"&&r.jsx("button",{className:"btn sm",onClick:o,disabled:!i.data,children:"Copy"}),e.kind==="pdf"&&r.jsx("a",{className:"btn sm",href:s,target:"_blank",rel:"noreferrer",children:"Open in a tab"}),r.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close the document",children:r.jsx(Dt,{size:16})})]}),e.kind==="md"?r.jsx("div",{className:"cdoc-b",children:i.isError?r.jsx("p",{className:"note",children:"The file could not be read."}):i.data?r.jsx(Lp,{text:i.data,ticket:e.ticket}):r.jsx("p",{className:"note",children:"Loading…"})}):r.jsx("iframe",{className:"cdoc-pdf",src:s,title:xn(e.file)})]})}function t3(e){const t=[],n=new Map;for(const{at:s,update:i}of e)switch(i.sessionUpdate){case"user_message_chunk":{const a=i.content.type==="text"&&i.content._meta?.squadKit?.from==="claude-code"?"claude-code":"squad-kit";t.push({kind:"message",from:a,content:i.content,at:s});break}case"agent_message_chunk":t.push({kind:"message",from:"agent",content:i.content,at:s});break;case"agent_thought_chunk":t.push({kind:"message",from:"thought",content:i.content,at:s});break;case"plan":t.push({kind:"plan",entries:i.entries,at:s});break;case"tool_call":{const a={kind:"tool",id:i.toolCallId,title:i.title,toolKind:i.kind??"other",status:i.status??"in_progress",content:[...i.content??[]],command:i.rawInput?.command,at:s};n.set(i.toolCallId,a),t.push(a);break}case"tool_call_update":{const a=n.get(i.toolCallId);if(!a)break;i.status&&(a.status=i.status),i.title&&(a.title=i.title),i.kind&&(a.toolKind=i.kind),i.rawInput?.command&&(a.command=i.rawInput.command),i.content&&(a.content=[...i.content]);break}}for(const s of n.values())fE(s);return t}const dE=/^(StructuredOutput|Gave squad-kit its answer|Handed in its answer)$/,hE=/^structured output provided successfully\.?$/i,V0=/User refused permission to run tool|^Permission denied: |haven't granted it yet/i;function su(e){return e.type==="content"&&e.content.type==="text"?e.content.text.trim():""}function pE(e){return e==="execute"?"Skipped a command this step may not run":e==="edit"||e==="delete"||e==="move"?"Skipped a change this step may not make":"Skipped something this step may not do"}function fE(e){if(dE.test(e.title)){e.answer=!0,e.title="Handed in its answer",e.content=e.content.filter(t=>!hE.test(su(t)));return}e.status==="failed"&&e.content.some(t=>V0.test(su(t)))&&(e.skipped=!0,e.detail=e.title,e.title=pE(e.toolKind),e.content=e.content.filter(t=>!V0.test(su(t))))}const K0=10*1024*1024;function Fp(e){return new Promise((t,n)=>{const s=new FileReader;s.onload=()=>{const i=String(s.result);t({name:e.name,size:e.size,data:i.slice(i.indexOf(",")+1),...e.type.startsWith("image/")?{preview:i}:{}})},s.onerror=()=>n(new Error(`Could not read ${e.name}`)),s.readAsDataURL(e)})}function ws(e){return`"${e.replace(/"/g,'\\"')}"`}function mE(e){const t=/\.(png|jpe?g|gif|webp)$/i.exec(e.name)?.[1]?.toLowerCase();return t?{preview:`data:image/${t==="jpg"?"jpeg":t};base64,${e.data}`}:{}}function gE({onClose:e,onCreated:t}){const n=Y(),{toast:s}=Ce(),[i,a]=j.useState("write"),[o,l]=j.useState(""),[c,u]=j.useState(null),[h,d]=j.useState(null),f=c?.status==="working",[p,m]=j.useState(null),[g,v]=j.useState(""),[y,x]=j.useState(""),[k,b]=j.useState("feature"),[T,w]=j.useState("normal"),[E,S]=j.useState("full"),[A,C]=j.useState(!1),[R,L]=j.useState(null),[$,U]=j.useState([]),[W,ee]=j.useState([]),[Q,_]=j.useState([]),[B,N]=j.useState(""),[V,X]=j.useState([]),[P,ae]=j.useState(""),[oe,re]=j.useState(""),[ke,Oe]=j.useState("annoying"),me=k==="bug",[_e,Xe]=j.useState([]),Bt=async I=>{const K=[...I],ie=K.find(Be=>Be.size>K0);ie&&s(`${ie.name} is larger than 10 MB.`,"err");const Ee=await Promise.all(K.filter(Be=>Be.size<=K0).map(Fp)).catch(Be=>(s(Be.message,"err"),[]));Xe(Be=>[...Be,...Ee].slice(0,10))},_n=_e.map(({name:I,data:K})=>({name:I,data:K})),Js=I=>{v(I.title),x(I.ask),I.kind==="bug"&&N(I.ask),b(I.kind),w(I.priority),I.track&&(S(I.track),L(I.track)),U(I.criteria),ee(I.rules),_(I.edgeCases),m(I.gaps),a("write")};j.useEffect(()=>{let I=!0;return de("/api/v1/tickets/draft/current").then(async({draft:K})=>{if(!(!I||!K)&&(l(K.text),a("paste"),u(K),K.files.length)){const ie=await de(`/api/v1/tickets/draft/${K.id}/files`).catch(()=>({files:[]}));I&&Xe(ie.files.map((Ee,Be)=>({...Ee,size:K.files[Be]?.size??0,...mE(Ee)})))}}).catch(()=>{}),()=>{I=!1}},[]);const Ut=he({queryKey:["ticket-draft",c?.id],queryFn:()=>de(`/api/v1/tickets/draft/${c.id}`),enabled:f,refetchInterval:1e3,retry:!1});j.useEffect(()=>{Ut.data&&c?.status==="working"&&Ut.data.id===c.id&&u(Ut.data)},[Ut.data]),j.useEffect(()=>{Ut.isError&&f&&u(I=>I&&{...I,status:"failed",error:"squad-kit lost this draft, maybe because it restarted."})},[Ut.isError]);const zn=j.useRef(null);j.useEffect(()=>{c?.status==="done"&&c.draft&&zn.current!==c.id&&(zn.current=c.id,Js(c.draft))},[c]);const Fn=async()=>{d(null);try{u(await St("/api/v1/tickets/draft","POST",{text:o,files:_n}))}catch(I){d(I instanceof Error?I.message:String(I))}},Jt=async()=>{if(c)try{u(await St(`/api/v1/tickets/draft/${c.id}/cancel`,"POST"))}catch{u({...c,status:"cancelled"})}},en=()=>{c&&St(`/api/v1/tickets/draft/${c.id}/dismiss`,"POST").catch(()=>{}),u(null)},At=()=>{en(),d(null),y.trim()||x(o.trim()),B.trim()||N(o.trim()),a("write")},Xr=()=>{en(),m(null),L(null);for(const I of[v,x,N,ae,re])I("");for(const I of[U,ee,_,X])I([]);a("paste")},xs=V.filter(I=>I.trim()),Jr=[B.trim()&&`What happens:
|
|
476
|
-
${B.trim()}`,xs.length&&`Steps to see it:
|
|
477
|
-
${xs.map((I,K)=>`${K+1}. ${I.trim()}`).join(`
|
|
478
|
-
`)}`,P.trim()&&`What should happen:
|
|
479
|
-
${P.trim()}`,oe.trim()&&`Where: ${oe.trim()}`].filter(Boolean).join(`
|
|
480
|
-
|
|
481
|
-
`),er=me?{title:g,ask:Jr,kind:k,severity:ke,priority:ke==="stops-work"?"high":ke==="small"?"low":"normal",track:E,files:_n,talkFirst:A&&E==="full"}:{title:g,ask:y,kind:k,track:E,priority:T,criteria:$,rules:W,edgeCases:Q,files:_n,talkFirst:A&&E==="full"},pe=()=>n.mutate({path:"/api/v1/tickets",body:er},{onSuccess:I=>{en(),t(I),e()}}),z=!!h||c?.status==="failed"||c?.status==="cancelled",D=i==="paste"?`squad new --from ${ws(o.trim().split(`
|
|
482
|
-
`)[0]?.slice(0,40)||"your message")}`:[`squad new ${ws(g.trim()||"Your title")}`,me?`--bug --severity ${ke}`:"",me&&B.trim()?`--ask ${ws(B.trim())}`:"",E==="express"?"--express":"",A&&E==="full"?"--talk":"",...me?[]:$.filter(I=>I.trim()).map(I=>`--criteria ${ws(I)}`),...me?[]:W.filter(I=>I.trim()).map(I=>`--rule ${ws(I)}`),...me?[]:Q.filter(I=>I.trim()).map(I=>`--edge ${ws(I)}`),..._e.map(I=>`--attach ${ws(I.name)}`)].filter(Boolean).join(" ");return r.jsxs(it,{title:"New ticket",wide:!0,onClose:e,icon:r.jsx("span",{className:"glyph",children:r.jsx(Yt,{size:15})}),footer:r.jsxs(r.Fragment,{children:[i==="paste"?z?null:r.jsxs("button",{className:"btn pri",disabled:!o.trim()&&!_e.length||f,onClick:()=>void Fn(),children:[f?r.jsx(hn,{size:15,className:"spin"}):r.jsx($c,{size:15})," ",f?"Filling in…":"Fill in the ticket"]}):r.jsxs("button",{className:"btn pri",disabled:!g.trim()||n.isPending,onClick:pe,children:[r.jsx(Yt,{size:15})," Create ticket"]}),r.jsx("button",{className:"btn",onClick:f?()=>void Jt():e,children:"Cancel"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:D})]}),children:[r.jsxs("div",{className:"seg",style:{marginBottom:14,width:"fit-content"},children:[r.jsx("button",{className:i==="write"?"on":"",disabled:f,title:f?"Press Cancel first to write it yourself":void 0,onClick:()=>a("write"),children:"Write it"}),r.jsxs("button",{className:i==="paste"?"on":"",onClick:()=>a("paste"),children:[r.jsx($c,{size:13,style:{verticalAlign:"-2px",marginRight:5}}),"From an idea or message"]})]}),i==="paste"?r.jsxs(r.Fragment,{children:[!f&&r.jsx("p",{children:"Paste an idea, a WhatsApp message or one line of business. Add screenshots if you have them. The Analyst fills in the ticket, and you check every field before it is created."}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"nt-paste",children:"The idea or message"}),r.jsx("textarea",{id:"nt-paste",className:"textarea",style:{minHeight:f?70:150},autoFocus:!0,readOnly:f,value:o,onChange:I=>l(I.target.value),onPaste:I=>{I.clipboardData.files.length&&(I.preventDefault(),Bt(I.clipboardData.files))},placeholder:"For example: the manager says clerks should not book more than 3 appointments a day for the same person"})]}),f&&c?r.jsxs(r.Fragment,{children:[_e.length>0&&r.jsxs("p",{className:"note",style:{margin:"-6px 0 12px"},children:["With ",_e.map(I=>I.name).join(", ")]}),r.jsx(vE,{job:c})]}):r.jsx(iu,{files:_e,onAdd:Bt,onRemove:I=>Xe(K=>K.filter((ie,Ee)=>Ee!==I))}),z&&r.jsx(kE,{error:h??(c?.status==="failed"?c.error??"Something went wrong.":null),onRetry:()=>void Fn(),onWrite:At})]}):r.jsxs(r.Fragment,{children:[p?r.jsxs("div",{className:"drafted",children:[r.jsxs("b",{children:[r.jsx($c,{size:13})," The Analyst filled this in from your message."]})," Check it and change anything."," ",r.jsx("button",{className:"linkbtn",onClick:Xr,children:"Discard this draft"}),p.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{marginTop:6},children:"Still unclear, so the Analyst will ask you after you create it:"}),r.jsx("ul",{children:p.map((I,K)=>r.jsx("li",{children:I},K))})]})]}):r.jsx("p",{children:me?"Say what goes wrong and how to see it. The squad finds the cause and fixes it.":"Write it in plain words. Add what you already know; the Analyst asks you about the rest."}),r.jsxs("div",{className:"field",children:[r.jsx("label",{children:"Kind"}),r.jsx("div",{className:"sevs",children:["feature","bug"].map(I=>r.jsxs("button",{className:`choice ${k===I?"on":""}`,onClick:()=>b(I),children:[r.jsx("span",{className:"rd"}),I==="feature"?"New feature":"Bug"]},I))})]}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"nt-title",children:"Title"}),r.jsx("input",{id:"nt-title",className:"input",autoFocus:!0,value:g,onChange:I=>v(I.target.value),placeholder:me?"For example: A price written as 1,500 is refused":"For example: Show hearing time in local time"})]}),me?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"nt-what",children:"What happens"}),r.jsx("textarea",{id:"nt-what",className:"textarea",value:B,onChange:I=>N(I.target.value),placeholder:"For example: the form says the price is not valid."})]}),r.jsx(ro,{label:"Steps to see it",hint:"One step per line, for example: Open Services and add a service.",items:V,onChange:X,add:"Add a step"}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"nt-expected",children:"What should happen"}),r.jsx("textarea",{id:"nt-expected",className:"textarea",value:P,onChange:I=>ae(I.target.value),placeholder:"For example: the price is saved as 1,500 SAR."})]}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"nt-where",children:"Where"}),r.jsx("input",{id:"nt-where",className:"input",value:oe,onChange:I=>re(I.target.value),placeholder:"The page or link, for example: Setup, Services"})]}),r.jsx(iu,{files:_e,onAdd:Bt,onRemove:I=>Xe(K=>K.filter((ie,Ee)=>Ee!==I))}),r.jsxs("div",{className:"field",children:[r.jsx("label",{children:"How bad is it?"}),r.jsx("div",{className:"sevs",children:n3.map(I=>r.jsxs("button",{className:`choice ${ke===I.value?"on":""}`,onClick:()=>Oe(I.value),children:[r.jsx("span",{className:"rd"}),I.label]},I.value))})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"nt-ask",children:"What do you want?"}),r.jsx("textarea",{id:"nt-ask",className:"textarea",value:y,onChange:I=>x(I.target.value),placeholder:"Who needs it, and why. One or two sentences is enough."})]}),r.jsx(ro,{label:"Acceptance criteria",hint:"Each one is something you can check, for example: The clerk sees the time in their own city.",items:$,onChange:U,add:"Add a criterion"}),r.jsx(ro,{label:"Business rules",hint:"Limits and who may do what, for example: Only a team lead can reassign a case.",items:W,onChange:ee,add:"Add a rule"}),r.jsx(ro,{label:"Edge cases",hint:"Unusual cases to handle, for example: The person has no cases yet.",items:Q,onChange:_,add:"Add an edge case"}),r.jsx(iu,{files:_e,onAdd:Bt,onRemove:I=>Xe(K=>K.filter((ie,Ee)=>Ee!==I))}),r.jsxs("div",{className:"field",children:[r.jsx("label",{children:"Priority"}),r.jsx("div",{className:"sevs",children:["high","normal","low"].map(I=>r.jsxs("button",{className:`choice ${T===I?"on":""}`,onClick:()=>w(I),children:[r.jsx("span",{className:"rd"}),I==="high"?"High":I==="normal"?"Normal":"Low"]},I))})]})]}),r.jsxs("div",{className:"field",children:[r.jsxs("label",{children:["Track",R&&r.jsxs("span",{className:"note",style:{marginLeft:8,fontWeight:400},children:["The Analyst suggests ",R==="express"?"Express":"Full"]})]}),r.jsx("div",{className:"tracks",children:wE.map(I=>r.jsxs("button",{className:`opt2 ${E===I.id?"pick":""}`,onClick:()=>S(I.id),children:[r.jsxs("b",{children:[I.name,E===I.id&&r.jsxs("span",{children:[r.jsx(J,{size:13,strokeWidth:2.5})," Chosen"]})]}),I.note]},I.id))})]}),E==="full"&&r.jsxs("label",{className:"talkfirst",children:[r.jsx("input",{type:"checkbox",checked:A,onChange:I=>C(I.target.checked)}),r.jsxs("span",{children:[r.jsx("b",{children:"Talk it through first."})," The Analyst opens a chat instead of sending questions. The spec is written from your talk when you say so."]})]})]})]})}const yE=60;function xE(e){const[t,n]=j.useState(Date.now());return j.useEffect(()=>{const s=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(s)},[e]),t}function vE({job:e}){const t=xE(!0),n=Math.max(0,Math.floor((t-Date.parse(e.startedAt))/1e3)),i=["read","look","write"].indexOf(e.step),a=c=>c<i?"done":c===i?"now":"todo",o=e.looked.slice(-3),l=e.looked.length-o.length;return r.jsxs("div",{className:"drafting",role:"status","aria-live":"polite",children:[r.jsxs("div",{className:"drafting-head",children:[r.jsx("b",{children:"The Analyst is filling in your ticket"}),r.jsx("span",{className:"grow"}),r.jsxs("span",{className:"mono drafting-clock","aria-label":`${n} seconds so far`,children:[Math.floor(n/60),":",String(n%60).padStart(2,"0")]})]}),r.jsx(ru,{state:a(0),children:"Read your message"}),r.jsxs(ru,{state:a(1),children:["Looking at the project",o.length>0&&r.jsxs("span",{className:"note",children:[": ",o.join(", "),l>0?` and ${l} more`:""]})]}),r.jsx(ru,{state:a(2),children:"Writing the ticket for you to check"}),r.jsxs("p",{className:"note",children:[n>2*yE?"This one is taking longer than usual. You can wait, or press Cancel.":"Usually under a minute."," You can close this window: the draft waits for you under New ticket."]})]})}function ru({state:e,children:t}){return r.jsxs("div",{className:`dstep ${e}`,children:[r.jsx("span",{className:"dot","aria-hidden":"true",children:e==="done"?r.jsx(J,{size:12,strokeWidth:3}):e==="now"?r.jsx(hn,{size:12,className:"spin"}):null}),r.jsxs("span",{children:[t,r.jsx("span",{className:"sr-only",children:e==="done"?" (done)":e==="now"?" (now)":""})]})]})}function kE({error:e,onRetry:t,onWrite:n}){return r.jsxs("div",{className:`drafterr ${e?"":"calm"}`,role:e?"alert":"status",children:[r.jsx("b",{children:e?"The Analyst could not finish":"You stopped the Analyst"}),r.jsxs("div",{children:[e??"Nothing was saved."," Your text is kept."]}),r.jsxs("div",{className:"drafterr-ways",children:[r.jsxs("button",{className:"btn pri",onClick:t,children:[r.jsx(xd,{size:14})," Try again"]}),r.jsxs("button",{className:"btn",onClick:n,children:[r.jsx(Yh,{size:14})," Write it myself with what I typed"]})]})]})}const wE=[{id:"full",name:"Full",note:"Every step. The Analyst asks questions and you approve the plan."},{id:"express",name:"Express",note:"For a typo or a small urgent fix. No questions, the plan is approved on its own. Build, checks, review and your Looks right still run."}];function ro({label:e,hint:t,items:n,onChange:s,add:i}){const a=(o,l)=>s(n.map((c,u)=>u===o?l:c));return r.jsxs("div",{className:"field",children:[r.jsx("label",{children:e}),n.length===0&&r.jsx("p",{className:"note",style:{margin:"0 0 6px"},children:t}),n.map((o,l)=>r.jsxs("div",{className:"listrow",children:[r.jsx("span",{className:"mono note",children:l+1}),r.jsx("input",{className:"input",value:o,autoFocus:o===""&&l===n.length-1,onChange:c=>a(l,c.target.value),onKeyDown:c=>{c.key==="Enter"&&l===n.length-1&&o.trim()&&s([...n,""])},"aria-label":`${e} ${l+1}`}),r.jsx("button",{className:"iconbtn",onClick:()=>s(n.filter((c,u)=>u!==l)),"aria-label":`Remove ${e.toLowerCase()} ${l+1}`,children:r.jsx(Dt,{size:14})})]},l)),r.jsxs("button",{className:"btn sm",onClick:()=>s([...n,""]),children:[r.jsx(Yt,{size:13})," ",i]})]})}const bE=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba|mp4|mov|m4v|webm)$/i;function iu({files:e,onAdd:t,onRemove:n}){const[s,i]=j.useState(!1),a=e.some(l=>bE.test(l.name)),o=he({queryKey:["speech"],queryFn:()=>de("/api/v1/speech"),enabled:a});return r.jsxs("div",{className:"field",children:[r.jsx("label",{children:"Files"}),r.jsxs("label",{className:`dropzone ${s?"over":""}`,onDragOver:l=>{l.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:l=>{l.preventDefault(),i(!1),l.dataTransfer.files.length&&t(l.dataTransfer.files)},onPaste:l=>l.clipboardData.files.length&&t(l.clipboardData.files),children:[r.jsx(dl,{size:15})," Drop screenshots, documents, voice or video notes here, or click to pick",r.jsx("input",{type:"file",multiple:!0,hidden:!0,onChange:l=>{l.target.files?.length&&t(l.target.files),l.target.value=""}})]}),e.length>0&&r.jsx("div",{className:"picked",children:e.map((l,c)=>r.jsxs("span",{className:"pickedfile",children:[l.preview?r.jsx("img",{src:l.preview,alt:""}):r.jsx(dl,{size:13}),r.jsx("span",{className:"mono",children:l.name}),r.jsx("span",{className:"note",children:l.size<1024*1024?`${Math.max(1,Math.round(l.size/1024))} KB`:`${(l.size/1024/1024).toFixed(1)} MB`}),r.jsx("button",{className:"iconbtn",onClick:()=>n(c),"aria-label":`Remove ${l.name}`,children:r.jsx(Dt,{size:13})})]},`${l.name}-${c}`))}),a&&o.data&&r.jsx("p",{className:"note",style:{marginTop:6},children:o.data.hasKey?"squad-kit writes out voice and video notes with Munsit, and takes pictures of the screen in videos, so every agent knows what was said.":"Add a Munsit key in Settings so the squad can listen to voice and video notes. Without it they stay attached, unheard."})]})}function jE({onClose:e,onCreated:t}){const n=Y(),[s,i]=j.useState("AB#"),a=()=>n.mutate({path:"/api/v1/pull",body:{ref:s}},{onSuccess:o=>{t(o),e()}});return r.jsxs(it,{title:"Pull from Azure DevOps",onClose:e,icon:r.jsx("span",{className:"glyph",children:r.jsx(Pn,{size:15})}),footer:r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn pri",disabled:s.replace(/\D/g,"").length===0||n.isPending,onClick:a,children:[r.jsx(Pn,{size:15})," Pull ticket"]}),r.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad pull ${s.trim()||"AB#4133"}`})]}),children:[r.jsx("p",{children:"Bring a work item in as a ticket, with its description and attachments."}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"pull-ref",children:"Work item"}),r.jsx("input",{id:"pull-ref",className:"input mono",autoFocus:!0,value:s,onChange:o=>i(o.target.value),onKeyDown:o=>o.key==="Enter"&&a()})]})]})}const n3=[{value:"stops-work",label:"Stops work"},{value:"annoying",label:"Annoying"},{value:"small",label:"Small"}];function Mp({onClose:e,foundIn:t}){const n=Y(),[s,i]=j.useState(""),[a,o]=j.useState(""),[l,c]=j.useState(""),[u,h]=j.useState("annoying"),d=()=>n.mutate({path:"/api/v1/bugs",body:{what:s,how:a,expected:l,severity:u,foundIn:t},done:"Bug reported. Triage is sorting it."},{onSuccess:e});return r.jsxs(it,{title:"Report a bug",onClose:e,icon:r.jsx("span",{className:"glyph",style:{background:"var(--bug-soft)",color:"var(--bug)"},children:r.jsx(Tn,{size:15})}),footer:r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn pri",disabled:!s.trim()||n.isPending,onClick:d,children:[r.jsx(Tn,{size:15})," Report bug"]}),r.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad bug "${s.trim()||"What happened"}"${t?` --in ${t}`:""}`})]}),children:[r.jsxs("p",{children:["It becomes a ticket linked to ",t??"the latest release",", and goes around the same loop. The Tester adds a check so it can't come back."]}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"bug-what",children:"What happened?"}),r.jsx("input",{id:"bug-what",className:"input",autoFocus:!0,value:s,onChange:f=>i(f.target.value),placeholder:"For example: Table text is hard to read in dark mode"})]}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"bug-how",children:"How can we see it?"}),r.jsx("input",{id:"bug-how",className:"input",value:a,onChange:f=>o(f.target.value),placeholder:"The steps, in a line"})]}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"bug-exp",children:"What did you expect?"}),r.jsx("input",{id:"bug-exp",className:"input",value:l,onChange:f=>c(f.target.value)})]}),r.jsxs("div",{className:"field",children:[r.jsx("label",{children:"How bad is it?"}),r.jsx("div",{className:"sevs",children:n3.map(f=>r.jsxs("button",{className:`choice ${u===f.value?"on":""}`,onClick:()=>h(f.value),children:[r.jsx("span",{className:"rd"}),f.label]},f.value))})]})]})}function SE({release:e,demo:t,onClose:n}){const{toast:s}=Ce(),i=()=>void navigator.clipboard?.writeText(e.whatsappDraft??"").then(()=>s("Message copied. Send it from WhatsApp.")),a=[e.addons.changelog&&"Changelog updated",e.addons.tag&&`Tagged ${e.version} in git`,e.addons.pipeline&&"Azure pipeline started"].filter(Boolean);return r.jsxs(it,{title:e.unpushed?.length?`${e.version} is made, but not pushed yet`:`${e.version} is released`,onClose:n,icon:r.jsx("span",{className:"glyph",children:r.jsx(bi,{size:15})}),footer:r.jsxs(r.Fragment,{children:[e.addons.whatsapp&&r.jsxs("button",{className:"btn pri",onClick:i,children:[r.jsx(Vr,{size:15})," Copy message"]}),r.jsx("button",{className:"btn",onClick:n,children:"Done"})]}),children:[r.jsxs("div",{className:"donelist",children:[e.unpushed?.length?r.jsxs("div",{style:{color:"var(--you-ink)"},children:[r.jsx("span",{style:{width:16,textAlign:"center",fontWeight:800},children:"!"})," The push failed, so its tickets stay open. Press Push again on the release once the remote is reachable."]}):r.jsxs("div",{children:[r.jsx(J,{size:16})," ",e.tickets.length," tickets released"]}),e.log?e.log.map(o=>r.jsxs("div",{style:o.ok?void 0:{color:"var(--you-ink)"},children:[o.ok?r.jsx(J,{size:16}):r.jsx("span",{style:{width:16,textAlign:"center",fontWeight:800},children:"!"})," ",o.text]},o.text)):a.map(o=>r.jsxs("div",{children:[r.jsx(J,{size:16})," ",o]},o))]}),t&&!e.log&&r.jsx("p",{className:"note",style:{marginBottom:12},children:"Demo board: these release steps are shown, not run."}),e.addons.whatsapp&&e.whatsappDraft&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",style:{marginTop:4},children:"A WhatsApp note for your manager. Copy it and send it yourself."}),r.jsx("div",{className:"wa",children:e.whatsappDraft})]})]})}function Op(e){return!e.takenOver&&["implement","test","review"].includes(e.stage)}function $p({t:e}){const t=Y();return r.jsxs("button",{className:"btn sm",disabled:t.isPending,title:"The squad stops. You work in the Builder's Claude Code session, then give it back.",onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/take-over`,done:"It is yours. The squad waits until you give it back."}),children:[r.jsx(va,{size:12})," Take over"]})}const Ie={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"},Q0={analyst:"intake",architect:"intake",builder:"build",reviewer:"review",tester:"tester"},NE={analyst:Kr,architect:Qk,builder:va,reviewer:fy,tester:yy},CE={"analyst-read":"analyst",triage:"analyst","spec-rewrite":"analyst","chat-spec":"analyst","plan-write":"architect","plan-rewrite":"architect","answered-architect":"architect","chat-design":"architect",build:"builder",unstick:"builder",fix:"builder",test:"builder","review-fix":"builder","update-base":"builder","answered-builder":"builder","chat-carry-builder":"builder",review:"reviewer","answered-reviewer":"reviewer","chat-carry-reviewer":"reviewer",proof:"tester","chat-carry-tester":"tester"};function ps({role:e,small:t,live:n}){const s=NE[e]??Kr;return r.jsx("span",{className:`cav av-${e} ${t?"sm":""} ${n?"live":""}`,"aria-hidden":"true",children:r.jsx(s,{size:t?13:16,strokeWidth:2})})}function Pa({t:e,agent:t,label:n,primary:s}){const i=Y();return r.jsxs("button",{className:`btn ${s?"pri":""}`,disabled:i.isPending,onClick:()=>i.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:t}},{onSuccess:()=>Kt.show(e.id)}),children:[r.jsx(ka,{size:14})," ",n??`Talk to the ${Ie[t]}`]})}function s3(e){return e.live&&e.squad?.phase?CE[e.squad.phase]??null:null}function r3(e){if(e.stage==="done")return{text:`Released${e.release?` · ${e.release}`:""}`,tone:"done"};if(e.stage==="release")return{text:`Accepted${e.release?` · ready for ${e.release}`:""}`,tone:"done"};const t=cs[e.stage];return e.chat?.open&&!e.chat.beside?{text:`${t} · ${e.chat.thinking?"talking":"your turn"}`,tone:"you"}:e.waiting?{text:`${t} · your turn`,tone:"you"}:{text:`${t}${e.live?" · working":""}`,tone:e.live?"work":"you"}}function i3(e){const t=e.chat,n=Ie[t.with];return t.beside&&Ws(e)?{kind:"released",note:"Questions only"}:t.beside?{kind:"working",note:"Asking never stops the work"}:{kind:"talk",note:`The ${n} waits while you talk`}}function a3(e){const t=e.chat,n=Ie[t.with];return t.beside?null:t.with==="analyst"?{label:`${e.story?"Update":"Write"} the spec`,path:"write",done:`The Analyst is ${e.story?"updating":"writing"} the spec from your talk.`}:t.with==="architect"&&e.specApproved?{label:`${e.steps?"Update":"Write"} the design`,path:"write",done:`The Architect is ${e.steps?"updating":"writing"} the design from your talk.`}:t.with==="architect"?null:{label:"Back to work",path:"done",done:`The ${n} carries on as you agreed.`}}function EE({t:e,size:t,onFull:n,onPanel:s}){const i=Y(),[a,o]=j.useState(!1),l=e.chat,c=Ie[l.with],u=i3(e),h=r3(e),d=l.open?a3(e):null,f=i.isPending||!!l.thinking,p=l.with==="builder"||l.with==="reviewer"||l.with==="tester",m=s3(e),g=(k,b)=>i.mutate({path:`/api/v1/tickets/${e.id}/chat/${k}`,done:b}),v=r.jsxs(r.Fragment,{children:[l.open&&d&&r.jsxs("button",{className:"btn pri",disabled:f,onClick:()=>g(d.path,d.done),children:[r.jsx(J,{size:15,strokeWidth:2.5})," ",d.label]}),l.open&&u.kind==="talk"&&!p&&r.jsx("button",{className:"btn",disabled:f,onClick:()=>g("done","Done talking."),children:d?"Done, no changes":"Done"}),l.open&&u.kind==="talk"&&p&&Op(e)&&r.jsx($p,{t:e}),l.open&&u.kind==="released"&&r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn",onClick:()=>o(!0),children:[r.jsx(F1,{size:14})," New linked ticket"]}),r.jsxs("button",{className:"btn",onClick:()=>o(!0),children:[r.jsx(Tn,{size:14})," Report a bug"]})]}),l.open&&u.kind==="working"&&rp(e)&&r.jsxs("button",{className:"btn",onClick:()=>o(!0),children:[r.jsx(Dr,{size:14})," Propose a change"]}),l.open&&u.kind!=="talk"&&r.jsx("button",{className:"btn",disabled:i.isPending,onClick:()=>g("done",`Done asking the ${c}.`),children:"Done"}),!l.open&&!e.takenOver&&r.jsxs("button",{className:"btn",disabled:i.isPending,onClick:()=>i.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:l.with}},{onSuccess:()=>Kt.show(e.id)}),children:[r.jsx(ka,{size:14})," Talk to the ",c," again"]})]}),y=l.open&&u.kind==="working"?r.jsxs("div",{className:"cbanner work",children:[r.jsx("span",{className:"livedot","aria-hidden":"true"}),r.jsxs("span",{children:[r.jsx("b",{children:m?`The ${Ie[m]} keeps working`:e.live||e.squad?"The squad keeps working":"Nothing waits for this talk"}),e.status?r.jsxs(r.Fragment,{children:[" · ",e.status]}):null,". Your questions change nothing on ",e.id,"; a change goes through the spec."]})]}):l.open&&u.kind==="released"?r.jsx("div",{className:"cbanner done",children:r.jsxs("span",{children:[r.jsxs("b",{children:[e.id," is ",e.stage==="done"?`released${e.release?` in ${e.release}`:""}`:`accepted${e.release?` for ${e.release}`:""}`,"."]})," Ask anything about it. A change becomes a new linked ticket or a bug report."]})}):null,x=a?r.jsx(ip,{t:e,from:l.with,onClose:()=>o(!1)}):null;return t==="phone"?r.jsxs("div",{className:"chead-m",children:[r.jsxs("div",{className:"chead-m-row",children:[r.jsx("span",{className:"ctitle",children:e.title}),l.open&&d&&r.jsx("button",{className:"btn pri sm",disabled:f,onClick:()=>g(d.path,d.done),children:d.label}),l.open&&!d&&r.jsx("button",{className:"btn sm",disabled:i.isPending,onClick:()=>g("done","Done talking."),children:"Done"})]}),y,l.open&&u.kind==="released"&&r.jsxs("div",{className:"chead-m-row",children:[r.jsxs("button",{className:"btn sm",onClick:()=>o(!0),children:[r.jsx(F1,{size:13})," New linked ticket"]}),r.jsxs("button",{className:"btn sm",onClick:()=>o(!0),children:[r.jsx(Tn,{size:13})," Report a bug"]})]}),x]}):t==="full"?r.jsxs("div",{className:"chead-f",children:[r.jsxs("div",{className:"chead-f-row",children:[r.jsx(ps,{role:l.with,live:l.thinking}),r.jsxs("div",{className:"chead-f-t",children:[r.jsxs("div",{className:"chead-line",children:[r.jsx("span",{className:"cid",children:e.id}),r.jsx("span",{className:`cstage ${h.tone}`,children:h.text}),l.open&&r.jsx("span",{className:"cnote",children:u.note})]}),r.jsx("div",{className:"ctitle",children:e.title})]}),r.jsx("span",{className:"grow"}),r.jsx("div",{className:"cbtns",children:v}),s&&r.jsx("button",{className:"iconbtn",onClick:s,"aria-label":"Back to the side panel",title:"Back to the side panel",children:r.jsx(u8,{size:16})})]}),y,x]}):r.jsxs("div",{className:"chead-p",children:[r.jsxs("div",{className:"chead-line",children:[r.jsx("span",{className:"cid",children:e.id}),r.jsx("span",{className:`cstage ${h.tone}`,children:h.text}),r.jsx("span",{className:"grow"}),l.open&&r.jsx("span",{className:"cnote",children:u.note}),n&&r.jsx("button",{className:"iconbtn sm",onClick:n,"aria-label":"Open full screen",title:"Full screen",children:r.jsx(Gh,{size:14})})]}),r.jsx("div",{className:"ctitle",children:e.title}),y,r.jsx("div",{className:"cbtns",children:v}),x]})}const io=e=>`${e.at}|${e.who}`,G0=e=>e.who!=="you"&&e.who!=="squad";function Dp({id:e,size:t,onOpenDoc:n,onFull:s,onPanel:i}){const a=ba(e),o=a.data,l=o?.chat,c=j.useRef(null),[u,h]=j.useState(""),d=j.useRef(null),f=j.useRef(null),[p,m]=j.useState(null),g=o?.chat?.messages.length??0;j.useEffect(()=>{p&&g>p.count&&m(null)},[g,p]);const v=l?l.beside?"chat":Q0[l.with]:"",y=he({queryKey:["conversation",e,v],queryFn:()=>de(`/api/v1/tickets/${e}/conversations/${v}`),enabled:!!(l&&(l.beside?l.side:o?.sessions?.[Q0[l.with]])),refetchInterval:l?.thinking?1500:8e3,retry:!1}),x=j.useMemo(()=>t3(y.data?.updates??[]).filter(_=>_.kind==="tool"),[y.data]),k=(_,B)=>x.filter(N=>(!_||(N.at??"")>=_)&&(!B||(N.at??"")<=B)),b=j.useRef(null),[T,w]=j.useState(null),E=j.useMemo(()=>l?.messages??[],[l?.messages]);j.useEffect(()=>{if(!l)return;const _=E.map(io);if(!b.current){b.current=new Set(_);return}const B=E.filter(V=>!b.current.has(io(V)));for(const V of _)b.current.add(V);const N=B.filter(G0).at(-1);N&&w({key:io(N),shown:0,total:Z8(N.text)})},[l,E]),j.useEffect(()=>{if(!T)return;if(T.shown>=T.total){w(null);return}const _=Math.max(1,Math.ceil(T.total/120)),B=setTimeout(()=>w(N=>N&&{...N,shown:N.shown+_}),55);return()=>clearTimeout(B)},[T]);const S=j.useRef(!0),A=j.useRef(null);if(j.useLayoutEffect(()=>{const _=c.current;_&&S.current&&(_.scrollTop=_.scrollHeight)}),j.useEffect(()=>{const _=c.current,B=A.current;if(!_||!B)return;const N=new ResizeObserver(()=>{S.current&&(_.scrollTop=_.scrollHeight)});return N.observe(B),()=>N.disconnect()},[o?.id,!!l]),j.useEffect(()=>{l&&Kt.seen(e,E.length)},[l,e,E.length]),!o)return r.jsx("div",{className:"cempty",children:a.isError?`No ticket ${e}.`:"Loading…"});if(!l)return r.jsxs("div",{className:"cempty",children:[r.jsxs("p",{children:["No talk on ",o.id," yet."]}),r.jsx(Pa,{t:o,agent:"analyst",primary:!0})]});const C=Ie[l.with],R=i3(o),L=[...E].reverse().find(_=>_.who==="you"),$=a3(o),U=s3(o),W=R.kind==="working"?`You are asking the ${C}. ${U?`The ${Ie[U]}`:"The squad"} keeps working on ${o.id}, and this talk changes nothing.`:R.kind==="released"?`${o.id} is ${o.stage==="done"?"released":"accepted"}. Ask the ${C} anything about it.`:`You started talking with the ${C}. Its work on ${o.id} waits until you press ${$?$.label:"Done"}${$&&$.label!=="Back to work"?" or Done":""}.`,ee=[...E].reverse().find(G0),Q=_=>{_!==void 0&&h(_),setTimeout(()=>d.current?.focus(),0)};return r.jsxs("div",{className:`chat-v csize-${t}`,children:[r.jsx(EE,{t:o,size:t,onFull:s,onPanel:i}),r.jsx("div",{className:"cthread",ref:c,"aria-live":"polite",onScroll:_=>{const B=_.currentTarget;S.current=B.scrollHeight-B.scrollTop-B.clientHeight<80},children:r.jsxs("div",{className:"ccol",ref:A,children:[l.open&&r.jsx("div",{className:"cnote-pill",children:W}),E.map((_,B)=>{if(_.who==="squad")return r.jsx(FE,{t:o,m:_,last:B===E.length-1,onAsk:()=>Q()},B);if(_.who==="you")return r.jsx(RE,{t:o,m:_,onOpenDoc:n,onReply:P=>Q(P)},B);const N=E[B-1],V=T?.key===io(_),X=E[B+1];return r.jsx(AE,{t:o,m:_,size:t,used:k(N?.at,_.at),writing:V?T.shown:null,answer:X?.who==="you"?X.text:void 0,canChoose:l.open&&!l.thinking&&_===ee&&B===E.length-1,newest:_===ee,onChoose:P=>f.current?.(P),onOther:()=>Q(),onOpenDoc:n,onReply:P=>Q(P)},B)}),p&&r.jsx(TE,{p}),l.thinking&&r.jsx(zE,{role:l.with,steps:k(L?.at??E.at(-1)?.at),hasMessage:!!L})]})}),l.open?r.jsx(ME,{t:o,size:t,text:u,setText:h,input:d,onSent:()=>S.current=!0,sendRef:f,setPending:m}):r.jsx("div",{className:"cclosed",children:"This talk is over. It stays here to read."})]})}function TE({p:e}){const t=dn(e.text);return r.jsxs("div",{className:"cyou cmsg",children:[r.jsxs("div",{className:"cybub",children:[e.files.length>0&&r.jsx("div",{className:"cup",children:e.files.map((n,s)=>r.jsxs("div",{className:"cup-row",children:[n.preview?r.jsx("img",{className:"cup-img",src:n.preview,alt:""}):r.jsx("span",{className:"cfic sm file",children:(n.name.split(".").pop()??"").toUpperCase().slice(0,4)}),r.jsx("span",{className:"cfname",children:n.name}),r.jsx("span",{className:"cbar",children:r.jsx("i",{})})]},s))}),e.text.trim()&&r.jsx("p",{className:Ln(t),dir:t.dir,lang:t.dir==="rtl"?"ar":"en",children:e.text})]}),r.jsx("span",{className:"cmeta",children:"You · now · sending"})]})}function o3({t:e,m:t,holder:n,onReply:s}){const i=Y(),{toast:a}=Ce(),[o,l]=j.useState(!1),[c,u]=j.useState(!1),h=()=>{const m=window.getSelection();return((m&&!m.isCollapsed&&n.current?.contains(m.anchorNode)?m.toString().trim():"")||t.text).trim().slice(0,2e3)},d=(m,g)=>{l(!1),i.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:h(),kind:m},done:`Added to the spec as ${g}.`})},f=()=>void navigator.clipboard?.writeText(t.text).then(()=>a("Copied"),()=>a("Could not copy. Select the text instead.","err")),p=()=>s(`> ${t.text.replace(/\s+/g," ").slice(0,160)}${t.text.length>160?"…":""}
|
|
483
|
-
|
|
484
|
-
`);return r.jsxs("div",{className:"cacts",children:[r.jsxs("button",{className:"cact",onClick:f,children:[r.jsx(Vr,{size:13})," Copy"]}),t.who==="you"&&t.text.trim()&&rp(e)&&r.jsxs("button",{className:"cact",onClick:()=>u(!0),children:[r.jsx(Dr,{size:13})," Propose as a change"]}),!Ws(e)&&t.text.trim()&&r.jsxs("span",{className:"cmenu-w",children:[r.jsxs("button",{className:"cact",onClick:()=>l(!o),"aria-haspopup":"menu","aria-expanded":o,onMouseDown:m=>m.preventDefault(),children:[r.jsx(Yt,{size:13})," Add to spec"]}),o&&r.jsxs("div",{className:"cmenu",role:"menu",onMouseLeave:()=>l(!1),children:[r.jsxs("button",{role:"menuitem",onClick:()=>d("rule","a business rule"),onMouseDown:m=>m.preventDefault(),children:[r.jsx("b",{children:"A business rule"}),r.jsx("small",{children:"Every agent must follow it"})]}),r.jsxs("button",{role:"menuitem",onClick:()=>d("criterion",'a "done when" item'),onMouseDown:m=>m.preventDefault(),children:[r.jsx("b",{children:'A "done when" item'}),r.jsx("small",{children:"The Tester proves it with a screenshot"})]}),r.jsxs("button",{role:"menuitem",onClick:()=>d("note","a note"),onMouseDown:m=>m.preventDefault(),children:[r.jsx("b",{children:"A note"}),r.jsx("small",{children:"Context for the next steps"})]})]})]}),e.chat?.open&&r.jsxs("button",{className:"cact",onClick:p,children:[r.jsx(p8,{size:13})," Reply"]}),c&&r.jsx(ip,{t:e,initial:t.text,from:e.chat?.with,onClose:()=>u(!1)})]})}function PE(e){let t=!1;return e.split(`
|
|
485
|
-
`).map((n,s,i)=>{/^\s*```/.test(n)&&(t=!t);const a=i[s+1]??"";return!t&&n.trim()&&a.trim()&&!/^\s*([-*+]|\d+\.|>|```)\s/.test(a)?`${n}
|
|
486
|
-
`:n}).join(`
|
|
487
|
-
`)}function RE({t:e,m:t,onOpenDoc:n,onReply:s}){const i=j.useRef(null),[a,o]=j.useState(!1),l=!t.text.trim()&&(t.files??[]).some(c=>Od.test(c));return r.jsxs("div",{className:`cyou cmsg ${a?"picked":""}`,children:[r.jsxs("div",{className:"cybub",ref:i,onClick:()=>o(!a),children:[t.text.trim()&&r.jsx(Lp,{text:PE(t.text),ticket:e.id}),t.files&&t.files.length>0&&r.jsx(_p,{ticket:e.id,files:t.files,onOpen:n,sent:!0,from:"From you"})]}),r.jsxs("span",{className:"cmeta",children:["You · ",Ro(t.at),l?" · written out from your voice":""]}),r.jsx(o3,{t:e,m:t,holder:i,onReply:s})]})}function Ro(e){return new Date(e).toDateString()===new Date().toDateString()?qs(e):`${Zs(e)} ${qs(e)}`}function AE({t:e,m:t,size:n,used:s,writing:i,answer:a,canChoose:o,newest:l,onChoose:c,onOther:u,onOpenDoc:h,onReply:d}){const f=j.useRef(null),[p,m]=j.useState(!1),g=t.who,v=Ie[g]??"Agent",y=i!==null,x=y?Y8(t.text,i):t.text,k=r.jsx(Lp,{text:x,ticket:e.id,stream:y,caret:y});return r.jsxs("div",{className:`cag cmsg ag-${g} ${p?"picked":""}`,children:[r.jsx(ps,{role:g,live:y}),r.jsxs("div",{className:"cwho",children:[r.jsx("b",{children:v}),y?r.jsx("span",{className:"shim",children:"Writing"}):r.jsx("span",{className:"ctime",children:Ro(t.at)})]}),r.jsxs("div",{className:"cagb",ref:f,onClick:b=>n==="phone"&&!b.target.closest("button, a")&&m(!p),children:[s.length>0&&r.jsx(_E,{steps:s}),y||l?k:r.jsx(iE,{lines:aE(t.text),children:k}),!y&&t.files&&t.files.length>0&&r.jsx(_p,{ticket:e.id,files:t.files,onOpen:h,from:`From the ${v} · ${Ro(t.at)}`}),!y&&t.options&&t.options.length>0&&r.jsx(LE,{options:t.options,answer:a,can:o,onChoose:c,onOther:u})]}),!y&&n==="phone"&&r.jsxs("span",{className:"cmeta",children:[v," · ",Ro(t.at)]}),!y&&r.jsx(o3,{t:e,m:t,holder:f,onReply:d})]})}function LE({options:e,answer:t,can:n,onChoose:s,onOther:i}){const a=dn(e.join(" ")),o=t?.trim();return r.jsxs("div",{className:"cchoices",dir:a.dir,children:[e.map(l=>{const c=dn(l),u=o?o===l.trim()?"on":"off":n?"":"off";return r.jsx("button",{className:`cch ${u} ${Ln(c)}`,lang:c.dir==="rtl"?"ar":"en",dir:c.dir,disabled:!n,onClick:()=>s(l),children:l},l)}),n&&r.jsx("button",{className:"cch other",onClick:i,dir:a.dir,children:a.dir==="rtl"?"إجابة أخرى…":"Something else…"})]})}function IE(e){let t=0,n=0;for(const s of e.content){if(s.type!=="diff")continue;const i=(s.oldText??"").split(`
|
|
488
|
-
`).filter(Boolean).length,a=s.newText.split(`
|
|
489
|
-
`).filter(Boolean).length;t+=Math.max(0,a-(s.oldText==null?0:Math.min(i,a))),n+=s.oldText==null?0:Math.max(0,i-a)}return{title:e.title,...t||n?{plus:t,minus:n}:{}}}function l3({s:e}){const t=IE(e);return r.jsxs("div",{className:`cstep ${e.skipped?"skipped":e.status}`,children:[e.skipped?r.jsx(Wl,{size:13}):e.status==="completed"?r.jsx(J,{size:13,strokeWidth:2.5}):e.status==="failed"?r.jsx(Dt,{size:13}):r.jsx(hn,{size:13,className:"spin"}),r.jsx("span",{className:"cstep-t",children:t.title}),t.plus!==void 0&&r.jsxs("span",{className:"cstep-n",children:[r.jsxs("span",{className:"add",children:["+",t.plus]})," ",r.jsxs("span",{className:"del",children:["−",t.minus]})]})]})}function _E({steps:e}){const[t,n]=j.useState(!1);return r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"cactv",onClick:()=>n(!t),"aria-expanded":t,children:[r.jsx(Qh,{size:13,style:{transform:t?"rotate(90deg)":void 0}})," Looked at ",e.length," ",e.length===1?"thing":"things"]}),t&&r.jsx("div",{className:"cactlist",children:e.map(s=>r.jsx(l3,{s},s.id))})]})}function zE({role:e,steps:t,hasMessage:n}){const s=t.filter(o=>o.status==="in_progress").at(-1)??t.at(-1),i=s?s.title:n?"Reading your message":"Reading the ticket",a=t.slice(-6);return r.jsxs("div",{className:`cag cmsg ag-${e} thinking`,children:[r.jsx(ps,{role:e,live:!0}),r.jsxs("div",{className:"cwho",children:[r.jsx("b",{children:Ie[e]}),r.jsx("span",{className:"shim",children:i})]}),r.jsxs("div",{className:"cagb",children:[r.jsxs("span",{className:"cdots","aria-label":`The ${Ie[e]} is answering`,children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]}),a.length>0&&r.jsxs("div",{className:"csteps",children:[t.length>a.length&&r.jsxs("div",{className:"cstep more",children:["and ",t.length-a.length," earlier steps"]}),a.map(o=>r.jsx(l3,{s:o},o.id))]})]})]})}function FE({t:e,m:t,last:n,onAsk:s}){const i=Y(),a=t.note==="failed"||!t.note&&t.text.startsWith("Could not answer"),o=e.chat?Ie[e.chat.with]:"agent",l=n&&e.chat?.open&&!e.chat.thinking&&(a||t.note==="stopped"),c=()=>i.mutate({path:`/api/v1/tickets/${e.id}/chat/retry`});return a?r.jsxs("div",{className:"cfail cmsg",children:[r.jsxs("div",{className:"cfail-t",children:[r.jsx(py,{size:15})," The ",o," could not answer. Nothing was lost.",r.jsx("span",{className:"cfail-why",children:t.text.replace(/^Could not answer:\s*/,"")})]}),l&&r.jsxs("div",{className:"cbtns",children:[r.jsx("button",{className:"btn pri sm",disabled:i.isPending,onClick:c,children:"Try again"}),r.jsx("button",{className:"btn sm",onClick:s,children:"Ask something else"})]})]}):r.jsxs("div",{className:"cnote-w cmsg",children:[r.jsx("div",{className:"cnote-pill",children:t.text}),l&&r.jsx("div",{className:"cbtns",children:r.jsx("button",{className:"btn sm",disabled:i.isPending,onClick:c,children:"Ask again"})})]})}const Y0=10*1024*1024;function ME({t:e,size:t,text:n,setText:s,input:i,onSent:a,sendRef:o,setPending:l}){const c=Y(),{toast:u}=Ce(),h=e.chat,d=Ie[h.with],[f,p]=j.useState([]),[m,g]=j.useState(!1),v=j.useRef(null),y=dn(n),x=W8(y),k=Math.min(6,Math.max(1,n.split(`
|
|
490
|
-
`).length)),b=async S=>{const A=[...S],C=A.find(L=>L.size>Y0);C&&u(`${C.name} is larger than 10 MB.`,"err");const R=await Promise.all(A.filter(L=>L.size<=Y0).slice(0,10).map(Fp)).catch(L=>(u(L.message,"err"),[]));p(L=>[...L,...R].slice(0,10))},T=(S=n,A=[])=>{const C=[...f,...A];if(!S.trim()&&!C.length||h.thinking||c.isPending)return;l({text:S,files:C,count:h.messages.length});const R=n;s(""),p([]),a(),c.mutate({path:`/api/v1/tickets/${e.id}/chat/send`,body:{text:S,files:C.map(({name:L,data:$})=>({name:L,data:$}))}},{onError:()=>{l(null),s(R),p(C.filter(L=>!A.includes(L)))}})};o.current=S=>T(S);const w=()=>c.mutate({path:`/api/v1/tickets/${e.id}/chat/stop`}),E=t==="phone"?`Message the ${d}`:`Message the ${d} in Arabic or English`;return r.jsxs("div",{className:"ccomp",onDragOver:S=>(S.preventDefault(),g(!0)),onDragLeave:()=>g(!1),onDrop:S=>(S.preventDefault(),g(!1),void b(S.dataTransfer.files)),children:[m&&r.jsx("div",{className:"cdrop",children:"Drop files to add them to your message"}),r.jsx(OE,{who:d,size:t,onDone:S=>T(n,[S]),render:S=>S.on?S.box:r.jsxs("div",{className:`cbox ${t==="phone"?"m":""}`,children:[f.length>0&&r.jsx("div",{className:"cpicked",children:f.map((A,C)=>r.jsxs("span",{className:"chip",children:[A.preview?r.jsx("img",{src:A.preview,alt:""}):r.jsx(dl,{size:12})," ",A.name,r.jsx("button",{className:"iconbtn","aria-label":`Remove ${A.name}`,onClick:()=>p(f.filter((R,L)=>L!==C)),children:r.jsx(Dt,{size:11})})]},C))}),t==="phone"&&r.jsx("button",{className:"ib","aria-label":"Add screenshots or files",onClick:()=>v.current?.click(),children:r.jsx(Yt,{size:20})}),r.jsx("textarea",{ref:i,className:`cta ${n?Ln(y):"t-en"}`,dir:n?y.dir:"auto",lang:y.dir==="rtl"?"ar":"en",rows:k,value:n,placeholder:E,"aria-label":"Your message",onChange:A=>s(A.target.value),onPaste:A=>{const C=[...A.clipboardData.files];C.length&&b(C)},onKeyDown:A=>{A.key==="Enter"&&!A.shiftKey&&!A.nativeEvent.isComposing&&(A.preventDefault(),T())}}),t==="phone"?h.thinking?r.jsx("button",{className:"csend m stop",onClick:w,"aria-label":"Stop the answer",children:r.jsx(oa,{size:14,fill:"currentColor"})}):n.trim()||f.length?r.jsx("button",{className:"csend m",onClick:()=>T(),"aria-label":"Send",disabled:c.isPending,children:r.jsx(hs,{size:18})}):r.jsx("button",{className:"csend m mic",onClick:S.start,"aria-label":"Record a voice note",children:r.jsx(z1,{size:18})}):r.jsxs("div",{className:"crow",children:[r.jsx("button",{className:"ib","aria-label":"Add screenshots or files",title:"Add screenshots or files",onClick:()=>v.current?.click(),children:r.jsx(dl,{size:16})}),r.jsx("button",{className:"ib","aria-label":"Record a voice note",title:"Record a voice note",onClick:S.start,children:r.jsx(z1,{size:16})}),x&&r.jsx("span",{className:"clchip",children:x}),r.jsx("span",{className:"grow"}),h.thinking?r.jsxs("button",{className:"cstop",onClick:w,disabled:h.stopping||c.isPending,children:[r.jsx(oa,{size:11,fill:"currentColor"})," ",h.stopping?"Stopping…":"Stop"]}):r.jsx("button",{className:"csend",onClick:()=>T(),disabled:c.isPending||!n.trim()&&!f.length,"aria-label":"Send",children:r.jsx(hs,{size:17})})]}),r.jsx("input",{ref:v,type:"file",multiple:!0,hidden:!0,onChange:A=>A.target.files&&void b(A.target.files)})]})}),t!=="phone"&&r.jsx("div",{className:"chint",children:"Enter sends · Shift+Enter for a new line · It answers in the language you write"})]})}function OE({who:e,size:t,onDone:n,render:s}){const{toast:i}=Ce(),[a,o]=j.useState(!1),[l,c]=j.useState(0),u=j.useRef(null),h=j.useRef(!1);j.useEffect(()=>{if(!a)return;const m=setInterval(()=>c(g=>g+1),1e3);return()=>clearInterval(m)},[a]),j.useEffect(()=>()=>u.current?.stream.getTracks().forEach(m=>m.stop()),[]);const d=async()=>{try{const m=await navigator.mediaDevices.getUserMedia({audio:!0}),g=["audio/webm","audio/ogg","audio/mp4"].find(x=>MediaRecorder.isTypeSupported?.(x))??"",v=new MediaRecorder(m,g?{mimeType:g}:void 0),y=[];v.ondataavailable=x=>x.data.size&&y.push(x.data),v.onstop=()=>{if(m.getTracks().forEach(w=>w.stop()),!h.current||!y.length)return;const x=v.mimeType||g||"audio/webm",k=x.includes("ogg")?"ogg":x.includes("mp4")?"m4a":"weba",b=new Date().toTimeString().slice(0,8).replace(/:/g,""),T=new File(y,`voice-note-${b}.${k}`,{type:x});Fp(T).then(n)},u.current=v,h.current=!1,c(0),v.start(),o(!0)}catch{i("The microphone is not available. Allow it for this page, or attach a voice note file.","err")}},f=m=>{h.current=m,u.current?.stop(),o(!1)},p=r.jsxs("div",{className:`crec ${t==="phone"?"m":""}`,role:"group","aria-label":"Recording a voice note",children:[r.jsx("span",{className:"crdot"}),r.jsxs("span",{className:"crt",children:["0:",String(l).padStart(2,"0")," · Recording for the ",e]}),r.jsx("span",{className:"clw","aria-hidden":"true",children:Array.from({length:22},(m,g)=>r.jsx("i",{style:{animationDelay:`${g%7*.11}s`}},g))}),r.jsx("button",{className:"btn sm",onClick:()=>f(!1),children:"Cancel"}),r.jsx("button",{className:"btn sm pri",onClick:()=>f(!0),children:"Send"})]});return r.jsx(r.Fragment,{children:s({on:a,start:()=>void d(),box:p})})}function da(e=""){return he({queryKey:["conversations",e],queryFn:()=>de(`/api/v1/conversations${e?`?q=${encodeURIComponent(e)}`:""}`),refetchInterval:1500})}function Bp(e,t){if(!e.open)return 0;const n=t[e.id];return n===void 0?e.fresh:Math.min(e.fresh,Math.max(0,e.count-n))}function $E(){const e=Kl(),t=ap(op),n=da();return!t&&!e.min&&(n.data??[]).some(s=>s.open)}function DE(e){const t=Ie[e.with];return e.thinking?`The ${t} is typing on ${e.id}`:e.yourTurn?`The ${t} answered on ${e.id}`:`${t} on ${e.id}`}function BE(){const e=Kl(),t=ap(op),n=Ys(),s=da(),[i,a]=j.useState(null),o=j.useRef(null),l=(s.data??[]).filter(d=>d.open),c=l.find(d=>d.id===e.tab)??l[0];if(j.useEffect(()=>{o.current?.querySelector(".ctab.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[c?.id,e.min]),!c)return null;const u=d=>void n({to:"/conversations",search:{ticket:d}});if(e.min||t){const d=l.find(f=>f.thinking)??l.find(f=>f.yourTurn)??c;return r.jsxs("div",{className:"cmini",role:"status",children:[r.jsx(ps,{role:d.with,small:!0,live:d.thinking}),r.jsxs("div",{children:[r.jsxs("b",{children:[l.length," ",l.length===1?"conversation":"conversations"]}),r.jsx("small",{children:DE(d)})]}),r.jsx("button",{className:"btn pri sm",onClick:()=>t?u(d.id):Kt.restore(),children:"Open"})]})}const h=d=>{d.preventDefault();const f=d.clientX,p=e.width,m=v=>Kt.resize(p+(f-v.clientX)),g=()=>{window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",g),document.body.classList.remove("cresizing")};document.body.classList.add("cresizing"),window.addEventListener("mousemove",m),window.addEventListener("mouseup",g)};return r.jsxs(r.Fragment,{children:[i&&r.jsx(zp,{doc:i,onClose:()=>a(null)}),r.jsxs("section",{className:"cdock",style:{width:e.width},"aria-label":"Conversations",children:[r.jsx("span",{className:"cgrip",onMouseDown:h,"aria-hidden":"true"}),r.jsxs("div",{className:"ctabs",children:[r.jsx("div",{className:"ctabscroll",role:"tablist","aria-label":"Open conversations",ref:o,children:l.map(d=>{const f=d.id===c.id,p=Bp(d,e.seen);return r.jsxs("button",{className:`ctab ${f?"on":""}`,role:"tab","aria-selected":f,onClick:()=>Kt.pick(d.id),title:`${d.id} · ${d.title}`,children:[r.jsx(ps,{role:d.with,small:!0}),r.jsx("span",{className:"tid",children:d.id}),r.jsx("span",{className:"tn",children:Ie[d.with]}),d.thinking&&!f&&r.jsxs("span",{className:`cdots sm c-${d.with}`,"aria-label":"Typing",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]}),p>0&&!f&&r.jsx("span",{className:"cbadge","aria-label":`${p} unread`,children:p})]},d.id)})}),r.jsx(c3,{}),r.jsx("span",{className:"grow"}),r.jsx("button",{className:"iconbtn",onClick:()=>u(c.id),"aria-label":"Open full screen",title:"Full screen",children:r.jsx(Gh,{size:15})}),r.jsx("button",{className:"iconbtn",onClick:Kt.minimize,"aria-label":"Minimize",title:"Minimize",children:r.jsx(Wl,{size:16})})]}),r.jsx(Dp,{id:c.id,size:"panel",onOpenDoc:a},c.id)]})]})}function c3(){const e=ft(),t=Y(),[n,s]=j.useState(!1),[i,a]=j.useState(""),[o,l]=j.useState("analyst"),c=(e.data?.ready?e.data.tickets:[]).filter(h=>!h.chat?.open&&!h.takenOver),u=()=>t.mutate({path:`/api/v1/tickets/${i}/chat/start`,body:{with:o}},{onSuccess:()=>{s(!1),Kt.show(i)}});return r.jsxs("span",{className:"cmenu-w",children:[r.jsx("button",{className:"iconbtn",onClick:()=>s(!n),"aria-label":"Start a new conversation",title:"Start a new conversation","aria-expanded":n,children:r.jsx(Yt,{size:16})}),n&&r.jsxs("div",{className:"cmenu cnew",role:"dialog","aria-label":"Start a new conversation",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Ticket"}),r.jsxs("select",{className:"input",value:i,onChange:h=>a(h.target.value),children:[r.jsx("option",{value:"",children:"Pick a ticket"}),c.map(h=>r.jsxs("option",{value:h.id,children:[h.id," · ",h.title]},h.id))]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Talk to"}),r.jsx("select",{className:"input",value:o,onChange:h=>l(h.target.value),children:Object.keys(Ie).map(h=>r.jsxs("option",{value:h,children:["The ",Ie[h]]},h))})]}),r.jsxs("div",{className:"cbtns",children:[r.jsx("button",{className:"btn pri sm",disabled:!i||t.isPending,onClick:u,children:"Start talking"}),r.jsx("button",{className:"btn sm",onClick:()=>s(!1),children:"Cancel"})]})]})]})}const UE=[{to:"/board",label:"Board",icon:r8},{to:"/backlog",label:"Backlog",icon:o8},{to:"/inbox",label:"Waiting for you",icon:n8,badge:"you"},{to:"/conversations",label:"Conversations",icon:c8,badge:"chats"},{to:"/releases",label:"Releases",icon:hs},{to:"/architecture",label:"Architecture",icon:d8},{to:"/bugs",label:"Bugs",icon:Tn,badge:"bugs"},{to:"/squad",label:"Squad and AI",icon:vy},{to:"/settings",label:"Settings",icon:f8}];function qE(){const e=ft(),{theme:t,toggleTheme:n,showCommands:s,toggleCommands:i}=Ce(),a=$k({select:p=>p.location.pathname}),o=e.data?.ready?e.data.meta:void 0,l=e.data?.ready?e.data.tickets:[],c=l.filter(p=>p.waiting||p.outdated?.length||on(p)).length,u=l.filter(p=>p.kind==="bug").length,h=(o?.user.name??"You").slice(0,2).toUpperCase(),d=da().data?.filter(p=>p.open).length??0,f=$E();return a.startsWith("/conversations")?r.jsx(md,{}):r.jsxs("div",{className:`app ${f?"docked":""}`,children:[r.jsxs("aside",{className:"side",children:[r.jsxs("a",{className:"brand",href:"/",title:"All your projects",children:[r.jsx("img",{src:"/logo.svg",alt:""}),r.jsx("b",{children:"squad-kit"}),o?.engine==="demo"&&r.jsx("small",{title:"The squad plays back a recorded run",children:"Demo"})]}),r.jsxs("a",{className:"proj",href:"/",title:"All your projects",children:[r.jsx("span",{className:"pm",children:(o?.project??"P").charAt(0)}),r.jsxs("div",{children:[r.jsx("b",{children:o?.project??"Your project"}),r.jsxs("span",{children:[l.length," open tickets"]})]}),r.jsx(Kk,{size:14,className:"sw"})]}),UE.map(p=>{const m=p.badge==="you"?c:p.badge==="bugs"?u:p.badge==="chats"?d:0,g=a.startsWith(p.to)||p.to==="/inbox"&&a.endsWith("/proof");return r.jsxs(Pe,{to:p.to,className:`nav ${g?"on":""}`,children:[r.jsx(p.icon,{size:16}),p.label,m>0&&r.jsx("span",{className:`badge ${p.badge==="you"?"you":p.badge==="chats"?"talk":""}`,children:m})]},p.to)}),r.jsx("div",{className:"grow"}),r.jsx(WE,{}),r.jsx("div",{className:"engines",children:(o?.tools??[]).map(p=>r.jsxs("div",{className:"row",children:[r.jsx("span",{children:p.name}),r.jsx("span",{className:`dot ${p.ready?"":"off"}`,children:p.ready?"Ready":"Not installed"})]},p.name))}),r.jsxs("button",{className:"switch",onClick:i,"aria-pressed":s,children:[r.jsxs("span",{children:[r.jsx(pl,{size:15}),"Show commands"]}),r.jsx("span",{className:`tog ${s?"on":""}`})]}),r.jsxs("div",{className:"me",children:[r.jsx("span",{className:"av",children:h}),r.jsxs("div",{children:[o?.user.name??"You",r.jsx("small",{children:o?.user.role??""})]}),r.jsx("button",{className:"theme",onClick:n,"aria-label":t==="light"?"Switch to dark":"Switch to light",children:t==="light"?r.jsx(Hl,{size:15}):r.jsx(Vl,{size:15})})]})]}),r.jsxs("main",{className:"canvas",children:[r.jsx(Ty,{}),e.data?.ready&&e.data.console?.outdated&&r.jsx(S8,{}),r.jsx(md,{})]}),r.jsx(BE,{})]})}function WE(){const e=b8().data?.apps??[];return e.length?r.jsxs("div",{className:"apps",children:[r.jsx("div",{className:"apps-h",children:"Your apps"}),e.map(t=>r.jsxs("a",{className:`app-row ${t.up?"up":""}`,href:t.url,target:"_blank",rel:"noreferrer",title:t.up?`Open ${t.url}`:`Not running. Start it in ${t.repo==="."?"the project folder":`${t.repo}/`}${t.start?` with: ${t.start}`:""}`,children:[r.jsx("i",{}),r.jsxs("span",{className:"nm",children:[r.jsx("b",{children:t.name}),r.jsx("small",{children:t.up?t.url.replace(/^https?:\/\//,""):"Not running"})]}),r.jsx(ls,{size:14})]},t.repo))]}):null}function HE(e,t,n=3){const s=e?e.split(`
|
|
491
|
-
`):[],i=t.split(`
|
|
492
|
-
`);if(s.length*i.length>25e4)return[...s.map(p=>({kind:"del",text:p})),...i.map(p=>({kind:"add",text:p}))];const a=s.length,o=i.length,l=Array.from({length:a+1},()=>new Array(o+1).fill(0));for(let p=a-1;p>=0;p--)for(let m=o-1;m>=0;m--)l[p][m]=s[p]===i[m]?l[p+1][m+1]+1:Math.max(l[p+1][m],l[p][m+1]);const c=[];let u=0,h=0;for(;u<a&&h<o;)s[u]===i[h]?(c.push({kind:"same",text:s[u]}),u++,h++):l[u+1][h]>=l[u][h+1]?c.push({kind:"del",text:s[u++]}):c.push({kind:"add",text:i[h++]});for(;u<a;)c.push({kind:"del",text:s[u++]});for(;h<o;)c.push({kind:"add",text:i[h++]});const d=c.map((p,m)=>p.kind!=="same"||c.slice(Math.max(0,m-n),m+n+1).some(g=>g.kind!=="same")),f=[];return c.forEach((p,m)=>{d[m]?f.push(p):f.at(-1)?.kind!=="gap"&&f.push({kind:"gap",text:""})}),f}function VE({t:e}){const n=he({queryKey:["conversations",e.id],queryFn:()=>de(`/api/v1/tickets/${e.id}/conversations`),refetchInterval:3e3}).data??[],[s,i]=j.useState(null),a=s??n.filter(d=>d.started).at(-1)?.key??null,o=he({queryKey:["conversation",e.id,a],queryFn:()=>de(`/api/v1/tickets/${e.id}/conversations/${a}`),enabled:!!a,refetchInterval:e.live?2e3:1e4}),l=j.useMemo(()=>t3(o.data?.updates??[]),[o.data]),[c,u]=j.useState(!0),h=j.useRef(null);return j.useEffect(()=>{c&&h.current?.scrollIntoView({block:"end"})},[l.length,c,a]),n.length?r.jsxs("div",{className:"db",children:[r.jsxs("div",{className:"pills",style:{marginBottom:6},children:[n.map(d=>r.jsx("button",{className:`btn sm ${d.key===a?"pri":""}`,disabled:!d.started,onClick:()=>i(d.key),children:d.label},d.key)),r.jsx("span",{className:"grow"}),r.jsxs("label",{className:"note",style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12.5},children:[r.jsx("input",{type:"checkbox",checked:c,onChange:d=>u(d.target.checked)})," Follow live"]})]}),r.jsxs("p",{className:"note",style:{fontSize:12.5,margin:"0 0 14px"},children:["Everything the ",n.find(d=>d.key===a)?.label??"agent"," did, step by step. Read only."," ",o.data&&o.data.total>(o.data.updates.length??0)?`Showing the latest ${o.data.updates.length} of ${o.data.total} entries.`:""]}),r.jsxs("div",{className:"conv",children:[l.map((d,f)=>r.jsx(QE,{it:d,ticket:e.id,cwd:o.data?.cwd},d.kind==="tool"?d.id:f)),r.jsx("div",{ref:h})]}),a&&r.jsxs("div",{className:"convactions",children:[r.jsx(KE,{t:e,to:Z0[a]??"builder"}),!e.chat?.open&&!e.takenOver&&r.jsx(Pa,{t:e,agent:Z0[a]??"builder"})]}),o.data?.command&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Open it in Claude Code"}),r.jsx(Z,{text:o.data.command}),r.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:6},children:a==="build"&&Op(e)?r.jsxs(r.Fragment,{children:["To work in it yourself, press ",r.jsx("b",{children:"Take over"})," first, so you and the squad never edit at the same time."," ",r.jsx($p,{t:e})]}):e.takenOver?"The ticket is yours: type into it freely, then press Give back on the Now tab.":"Read it any time. To work in it, take the ticket over while it is being built."})]})]}):r.jsx("div",{className:"db",children:r.jsx("p",{className:"note",children:"No conversation yet. It starts when the Analyst reads the ticket."})})}const Z0={intake:"analyst",build:"builder",review:"reviewer",tester:"tester"},X0={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"};function KE({t:e,to:t}){const n=Y(),[s,i]=j.useState("");if(e.stage==="done")return null;const a=()=>n.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:s,to:t},done:`Sent. The ${X0[t]} reads it at its next step.`},{onSuccess:()=>i("")});return r.jsxs("div",{className:"msgagent",children:[r.jsx("input",{className:"input",value:s,onChange:o=>i(o.target.value),placeholder:`Message the ${X0[t]}…`,onKeyDown:o=>o.key==="Enter"&&s.trim()&&a()}),r.jsxs("button",{className:"btn sm pri",disabled:!s.trim()||n.isPending,onClick:a,children:[r.jsx(wa,{size:13})," Send"]})]})}function QE({it:e,ticket:t,cwd:n}){if(e.kind==="plan")return r.jsx(tT,{entries:e.entries});if(e.kind==="tool")return r.jsx(ZE,{it:e,ticket:t,cwd:n});const{from:s,content:i}=e;return s==="agent"?r.jsx("div",{className:"conv-text",children:r.jsx(Up,{content:i,ticket:t})}):r.jsx(GE,{from:s,content:i,ticket:t})}function GE({from:e,content:t,ticket:n}){const s=t.type==="text"?t.text:"",i=s.length>420||s.split(`
|
|
493
|
-
`).length>8,[a,o]=j.useState(!i&&e!=="thought"),l=e==="squad-kit"?"squad-kit asked":e==="claude-code"?"Note from Claude Code":"Thinking";return r.jsxs("div",{className:e==="thought"?"conv-thought":"conv-prompt",children:[r.jsxs("button",{className:"conv-who linkish",onClick:()=>o(!a),children:[e==="thought"&&r.jsx(dy,{size:12})," ",l," ",!a&&r.jsx("span",{className:"note",children:"· show"})]}),a&&(e==="thought"?r.jsx("div",{style:{whiteSpace:"pre-wrap"},children:s}):r.jsx(Up,{content:t,ticket:n}))]})}const YE={read:Yk,edit:yd,delete:Dt,move:yd,search:Kr,execute:pl,think:dy,fetch:t8,switch_mode:vd,other:vd};function ZE({it:e,ticket:t,cwd:n}){const s=e.content.some(h=>h.type==="content"&&(h.content.type==="image"||h.content.type==="resource_link")),i=e.content.some(h=>h.type==="diff"),a=e.status==="failed"&&!e.skipped,[o,l]=j.useState(!e.skipped&&(i||s||a));j.useEffect(()=>{(a||s)&&l(!0)},[a,s]);const c=e.answer?wa:e.skipped?Wl:YE[e.toolKind]??vd,u=e.content.length>0||e.command||e.skipped;return r.jsxs("div",{className:`conv-tool ${e.skipped?"skipped":e.status}`,children:[r.jsxs("button",{className:"conv-tool-head",onClick:()=>u&&l(!o),"aria-expanded":o,children:[r.jsx(c,{size:14}),r.jsx("span",{className:"mono conv-tool-title",children:e.title}),r.jsx("span",{className:"conv-at",children:e.at?qs(e.at):""}),r.jsx(XE,{status:e.status,skipped:e.skipped})]}),o&&u&&r.jsxs("div",{className:"conv-tool-body",children:[e.skipped&&r.jsx("p",{className:"note",children:"By design, nothing went wrong: squad-kit lets each step do only what it needs, and this was not part of it."}),e.command&&e.toolKind==="execute"?r.jsxs("pre",{className:"conv-cmd",children:["$ ",e.command]}):e.skipped&&e.detail&&r.jsx("pre",{className:"conv-cmd",children:e.detail}),e.content.map((h,d)=>r.jsx(JE,{c:h,ticket:t,cwd:n},d))]})]})}function XE({status:e,skipped:t}){return t?r.jsxs("span",{className:"conv-status skip",children:[r.jsx(Wl,{size:12})," Skipped"]}):e==="completed"?r.jsxs("span",{className:"conv-status ok",children:[r.jsx(J,{size:12})," Done"]}):e==="failed"?r.jsxs("span",{className:"conv-status bad",children:[r.jsx(Dt,{size:12})," Failed"]}):r.jsxs("span",{className:"conv-status run",children:[r.jsx(hn,{size:12,className:"spin"})," Running"]})}function JE({c:e,ticket:t,cwd:n}){if(e.type==="diff"){const s=n&&e.path.startsWith(`${n}/`)?e.path.slice(n.length+1):e.path;return r.jsx(eT,{path:s,oldText:e.oldText??"",newText:e.newText,isNew:e.oldText==null})}return e.type==="terminal"?r.jsxs("p",{className:"note",children:["Terminal ",e.terminalId]}):e.content.type==="text"?e.content.text.trimStart().startsWith("```")?r.jsx(d3,{text:e.content.text}):r.jsx(u3,{text:e.content.text}):r.jsx(Up,{content:e.content,ticket:t})}function u3({text:e}){const t=e.length>600||e.split(`
|
|
494
|
-
`).length>12,[n,s]=j.useState(!t);return r.jsxs("div",{className:"conv-out",children:[r.jsx("pre",{children:n?e:`${e.split(`
|
|
495
|
-
`).slice(0,10).join(`
|
|
496
|
-
`).slice(0,600)}…`}),t&&r.jsx("button",{className:"linkbtn",onClick:()=>s(!n),children:n?"Show less":"Show all output"})]})}function eT({path:e,oldText:t,newText:n,isNew:s}){const i=j.useMemo(()=>HE(t,n),[t,n]),a=i.filter(h=>h.kind==="add").length,o=i.filter(h=>h.kind==="del").length,[l,c]=j.useState(i.length<=40),u=l?i:i.slice(0,40);return r.jsxs("div",{className:"conv-diff",children:[r.jsxs("div",{className:"conv-diff-head mono",children:[r.jsx("span",{style:{overflowWrap:"anywhere"},children:e}),r.jsx("span",{className:"grow"}),s?r.jsxs("span",{className:"add",children:["new file · ",a," lines"]}):r.jsxs("span",{children:[r.jsxs("span",{className:"add",children:["+",a]})," ",r.jsxs("span",{className:"del",children:["−",o]})]})]}),r.jsx("pre",{children:u.map((h,d)=>h.kind==="gap"?r.jsx("div",{className:"gap",children:"⋯"},d):r.jsxs("div",{className:h.kind,children:[r.jsx("span",{className:"sign",children:h.kind==="add"?"+":h.kind==="del"?"−":" "}),h.text||" "]},d))}),i.length>40&&r.jsx("button",{className:"linkbtn",style:{margin:"0 10px 8px"},onClick:()=>c(!l),children:l?"Show less":`Show all ${i.length} lines`})]})}function tT({entries:e}){const t=e.filter(n=>n.status==="completed").length;return r.jsxs("div",{className:"conv-plan",children:[r.jsxs("div",{className:"conv-who",children:[r.jsx(a8,{size:13})," Plan · ",t," of ",e.length," done"]}),e.map((n,s)=>r.jsxs("div",{className:`conv-plan-row ${n.status}`,children:[r.jsx("span",{className:"box",children:n.status==="completed"?r.jsx(J,{size:11}):n.status==="in_progress"?r.jsx(hn,{size:11,className:"spin"}):null}),n.content]},s))]})}function Up({content:e,ticket:t}){switch(e.type){case"text":return r.jsx(d3,{text:e.text});case"image":return r.jsx(Ap,{className:"conv-img",src:`data:${e.mimeType};base64,${e.data}`,alt:"Picture the agent looked at"});case"audio":return r.jsx("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});case"resource_link":return r.jsx(J0,{uri:e.uri,name:e.name,mime:e.mimeType??"",size:e.size??void 0,ticket:t});case"resource":return e.resource.text?r.jsx(u3,{text:e.resource.text}):r.jsx(J0,{uri:e.resource.uri,name:e.resource.uri.split("/").pop()??"file",mime:e.resource.mimeType??"",ticket:t})}}function J0({uri:e,name:t,mime:n,size:s,ticket:i}){const a=bt(i,e);return n.startsWith("image/")&&n!=="image/svg+xml"?r.jsxs("div",{className:"conv-media",children:[r.jsx(Ap,{className:"conv-img",src:a,alt:t}),r.jsx("span",{className:"note mono",children:t})]}):n.startsWith("video/")?r.jsxs("div",{className:"conv-media",children:[r.jsx("video",{className:"conv-img",src:a,controls:!0,preload:"metadata"}),r.jsx("span",{className:"note mono",children:t})]}):n.startsWith("audio/")?r.jsx("audio",{controls:!0,src:a}):r.jsxs("a",{href:a,target:"_blank",rel:"noreferrer",className:"conv-file",children:[r.jsx(Pn,{size:15}),r.jsx("span",{className:"mono",children:t}),r.jsx("span",{className:"note",children:[n.split("/").pop(),s?`${Math.max(1,Math.round(s/1024))} KB`:""].filter(Boolean).join(" · ")})]})}function d3({text:e}){const{theme:t}=Ce();return r.jsx("div",{className:"md",children:r.jsx(yx,{remarkPlugins:[Bx],components:{a:({href:n,children:s})=>r.jsx("a",{href:n,target:"_blank",rel:"noreferrer",children:s}),code:({className:n,children:s})=>{const i=/language-(\w+)/.exec(n??"")?.[1],a=String(s).replace(/\n$/,"");return!i&&!a.includes(`
|
|
497
|
-
`)?r.jsx("code",{className:"mono",children:s}):r.jsxs("div",{className:"md-code",children:[i&&r.jsx("span",{className:"md-lang",children:i==="mermaid"?"Diagram (Mermaid)":i}),r.jsx(Qx,{code:a,language:i??"text",theme:t==="dark"?ua.vsDark:ua.github,children:({tokens:o,getLineProps:l,getTokenProps:c})=>r.jsx("pre",{children:o.map((u,h)=>r.jsx("div",{...l({line:u}),children:u.map((d,f)=>r.jsx("span",{...c({token:d})},f))},h))})})]})}},children:e})})}const em={cursor:"Cursor",code:"VS Code"};function tc({t:e}){const t=Y(),s=he({queryKey:["editors"],queryFn:()=>de("/api/v1/editors"),staleTime:3e5}).data?.editors[0];return r.jsxs("button",{className:"btn sm",disabled:t.isPending||!e.baseCommit,title:e.baseCommit?void 0:"Nothing built yet",onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/open-editor`,body:s?{editor:s}:{},done:`Opened in ${s?em[s]:"your editor"}`}),children:[r.jsx(ls,{size:13})," Open in ",s?em[s]:"editor"]})}function nT({t:e}){const t=he({queryKey:["changes",e.id,e.activity.length],queryFn:()=>de(`/api/v1/tickets/${e.id}/changes`),refetchInterval:e.live?1e4:!1}),n=t.data,s=n?.files.reduce((a,o)=>a+o.added,0)??0,i=n?.files.reduce((a,o)=>a+o.removed,0)??0;return r.jsxs("div",{className:"db",children:[r.jsxs("div",{className:"changes-head",children:[r.jsxs("div",{children:[n&&n.files.length>0?r.jsxs(r.Fragment,{children:[r.jsxs("b",{children:[n.files.length," ",n.files.length===1?"file":"files"," changed"]})," ",r.jsxs("span",{className:"add",children:["+",s]})," ",r.jsxs("span",{className:"del",children:["−",i]})]}):r.jsx("b",{children:"Changes"}),r.jsx("p",{className:"note",children:n?.from==="branch"?`Read from branch ${n.branch}. The copy was removed after the release.`:"The squad builds in its own copy of the code, so your folder stays yours. These changes reach your folder after Looks right."})]}),r.jsx("span",{className:"grow"}),r.jsx(tc,{t:e})]}),t.isLoading&&r.jsx("p",{className:"note",children:"Reading the changes…"}),t.error&&r.jsx("p",{className:"note",children:t.error.message}),n&&!n.files.length&&r.jsx("p",{className:"note",children:n.from==="none"?"Nothing built yet.":"No changes against main yet."}),n?.cut&&r.jsx("p",{className:"note",children:"This change is very large, so some files show only their name. Open it in your editor to see all of it."}),n?.files.map(a=>r.jsx(sT,{f:a},a.path)),r.jsxs("div",{className:"pills",style:{marginTop:12},children:[r.jsx(Z,{text:`squad changes ${e.id} --full`}),r.jsx(Z,{text:`squad open ${e.id}`})]})]})}function sT({f:e}){const t=e.patch?e.patch.split(`
|
|
498
|
-
`):[],[n,s]=j.useState(t.length<=300);return r.jsxs("div",{className:"conv-diff",children:[r.jsxs("button",{className:"conv-diff-head mono changes-file",onClick:()=>s(!n),children:[r.jsx("span",{className:`fstat ${e.status}`,children:e.status==="added"?"new":e.status==="deleted"?"deleted":e.status==="renamed"?"moved":"changed"}),r.jsx("span",{style:{overflowWrap:"anywhere",textAlign:"left"},children:e.path}),r.jsx("span",{className:"grow"}),e.binary?r.jsx("span",{children:"binary"}):r.jsxs("span",{children:[r.jsxs("span",{className:"add",children:["+",e.added]})," ",r.jsxs("span",{className:"del",children:["−",e.removed]})]})]}),n&&t.length>0&&r.jsx("pre",{children:t.map((i,a)=>i.startsWith("@@")?r.jsx("div",{className:"gap",children:i.replace(/^(@@[^@]*@@).*/,"$1")},a):r.jsxs("div",{className:i.startsWith("+")?"add":i.startsWith("-")?"del":"same",children:[r.jsx("span",{className:"sign",children:i.startsWith("+")?"+":i.startsWith("-")?"−":" "}),i.slice(1)||" "]},a))})]})}const rT=(e,t)=>e.part===t.part&&(e.index??0)===(t.index??0);function ao({review:e,at:t,children:n}){const[s,i]=j.useState(null),[a,o]=j.useState("");if(!e)return r.jsx(r.Fragment,{children:n});const l=e.comments.map((u,h)=>({c:u,i:h})).filter(({c:u})=>rT(u,t)),c=()=>{a.trim()&&e.add({...t,text:a.trim()}),o(""),i(null)};return r.jsxs("div",{className:`part ${s?"open":""}`,children:[r.jsxs("div",{className:"partbody",children:[r.jsx("div",{className:"partmain",children:s==="edit"?r.jsx(iT,{review:e,at:t,onDone:()=>i(null)}):n}),s!=="edit"&&r.jsxs("span",{className:"parttools",children:[r.jsx("button",{className:"iconbtn",title:"Comment on this","aria-label":"Comment on this",onClick:()=>i("comment"),children:r.jsx(_1,{size:13})}),e.canEdit(t)&&r.jsx("button",{className:"iconbtn",title:"Edit it yourself","aria-label":"Edit it yourself",onClick:()=>i("edit"),children:r.jsx(yd,{size:13})})]})]}),l.map(({c:u,i:h})=>r.jsxs("div",{className:"pcomment",children:[r.jsx(_1,{size:12})," ",r.jsx("span",{children:u.text}),r.jsx("button",{className:"iconbtn","aria-label":"Remove comment",onClick:()=>e.remove(h),children:r.jsx(Dt,{size:12})})]},h)),s==="comment"&&r.jsxs("div",{className:"pcomment new",children:[r.jsx("input",{className:"input",autoFocus:!0,value:a,placeholder:"Your comment on this part. Enter to add",onChange:u=>o(u.target.value),onKeyDown:u=>{u.key==="Enter"&&c(),u.key==="Escape"&&i(null)}}),r.jsx("button",{className:"btn sm",onClick:c,children:"Add"})]})]})}function iT({review:e,at:t,onDone:n}){const s=Y(),i=e.t,a=t.index??0,[o,l]=j.useState(t.part==="story"?i.story??"":t.part==="step"?i.steps?.[a]?.title??"":""),[c,u]=j.useState(i.criteria?.[a]??{given:"",when:"",then:""}),h=()=>s.mutate({path:`/api/v1/tickets/${i.id}/plan/edit`,body:t.part==="criterion"?{...t,criterion:c}:{...t,text:o},done:"Edited. Your wording stays."},{onSuccess:n});return r.jsxs("div",{className:"editpart",children:[t.part==="criterion"?["given","when","then"].map(d=>r.jsxs("label",{children:[r.jsx("em",{children:d[0].toUpperCase()+d.slice(1)}),r.jsx("input",{className:"input",value:c[d],onChange:f=>u({...c,[d]:f.target.value})})]},d)):r.jsx("textarea",{className:"waynote",rows:t.part==="story"?3:2,autoFocus:!0,value:o,onChange:d=>l(d.target.value)}),r.jsxs("div",{className:"editbtns",children:[r.jsx("button",{className:"btn sm pri",disabled:s.isPending,onClick:h,children:"Save"}),r.jsx("button",{className:"btn sm",onClick:n,children:"Cancel"})]})]})}const tm=e=>e?`Given ${e.given}, when ${e.when}, then ${e.then}.`:"";function aT({t:e}){const[t,n]=j.useState(!0),s=e.planReview?.before;if(!s)return null;const i=[],a=(c,u="",h="")=>u!==h&&i.push({label:c,old:u,now:h});a("The story",s.story,e.story);const o=Math.max(s.criteria?.length??0,e.criteria?.length??0);for(let c=0;c<o;c++)a(`Done when ${c+1}`,tm(s.criteria?.[c]),tm(e.criteria?.[c]));(s.decision!==void 0||e.decision)&&a("The decision",s.decision,e.decision?`${e.decision.title}: ${e.decision.options.find(c=>c.chosen)?.name??""}`:"");const l=Math.max(s.steps?.length??0,e.steps?.length??0);for(let c=0;c<l;c++)a(`Step ${c+1}`,s.steps?.[c],e.steps?.[c]?.title);return r.jsxs("div",{className:"changed",children:[r.jsxs("button",{className:"changedhead",onClick:()=>n(!t),children:[r.jsx("b",{children:"What changed"})," ",i.length?`${i.length} ${i.length===1?"part":"parts"}`:"nothing"," since the last version ",t?"▾":"▸"]}),t&&r.jsxs(r.Fragment,{children:[(e.planReview?.sent??[]).length>0&&r.jsxs("div",{className:"sentlist",children:["Your comments:"," ",e.planReview.sent.map((c,u)=>r.jsxs("span",{children:["“",c.text,"”"]},u))]}),i.map(c=>r.jsxs("div",{className:"chrow",children:[r.jsx("div",{className:"chlabel",children:c.label}),r.jsx("div",{className:c.old?"chold":"chold empty",children:c.old||r.jsx("i",{children:"new"})}),r.jsx("div",{className:"chnew",children:c.now||r.jsx("i",{children:"removed"})})]},c.label))]})]})}const oT={questions:"Questions",spec:"Spec",scan:"Reading the project",design:"Design",blueprint:"Stack and patterns",build:"Build",fix:"Fixes",review:"Review",proof:"Proof",chat:"Talking it through",draft:"Filling in a new ticket"},lT=["analyst","architect","builder","reviewer","tester"],qp="What it would cost at the AI company's API prices. Your own AI subscription pays for it; this shows where the cost goes.";function h3(e,t){e.runs+=t.runs;for(const n of["inputTokens","cachedTokens","outputTokens","costUsd"])t[n]!==void 0&&(e[n]=(e[n]??0)+t[n]);t.tokensUnknown&&(e.tokensUnknown=(e.tokensUnknown??0)+t.tokensUnknown),t.costUnknown&&(e.costUnknown=(e.costUnknown??0)+t.costUnknown)}function p3(e){const t={runs:0};for(const n of e)h3(t,n);return t}function cT(e){return lT.flatMap(t=>{const n=e.filter(i=>i.role===t);if(!n.length)return[];const s=[];for(const i of n){let a=s.find(o=>o.level===i.level&&o.model===i.model);a||s.push(a={level:i.level,model:i.model,steps:[],total:{runs:0}}),a.steps.includes(i.step)||a.steps.push(i.step),h3(a.total,i)}return[{role:t,total:p3(n),levels:s}]})}function ha(e){return e.costUsd===void 0?null:e.costUsd<.005?"under $0.01":`$${e.costUsd.toFixed(2)}`}function oo(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e)}const $d=e=>`${e} ${e===1?"run":"runs"}`;function nm({t:e}){const t=ha(e);return t?r.jsxs("span",{title:e.costUnknown?`${$d(e.costUnknown)} did not report a cost, so the real amount is higher`:void 0,children:[t,e.costUnknown?r.jsxs("span",{className:"note",children:[" +",e.costUnknown," not reported"]}):null]}):r.jsx("span",{className:"note",children:"Not reported"})}function sm({t:e}){if(e.inputTokens===void 0&&e.outputTokens===void 0)return r.jsx("span",{className:"note",children:"Not reported"});const t=e.cachedTokens?`, ${oo(e.cachedTokens)} of it read again from earlier in the conversation, which costs less`:"";return r.jsxs("span",{title:`Tokens are the pieces of text the AI reads and writes. It read ${oo(e.inputTokens??0)}${t}.`,children:[e.inputTokens!==void 0&&r.jsxs(r.Fragment,{children:[oo(e.inputTokens)," read"]}),e.inputTokens!==void 0&&e.outputTokens!==void 0&&" · ",e.outputTokens!==void 0&&r.jsxs(r.Fragment,{children:[oo(e.outputTokens)," written"]})]})}function uT({level:e,model:t}){return t?r.jsxs(r.Fragment,{children:[t," ",r.jsx("span",{className:"note",children:e})]}):r.jsx(r.Fragment,{children:e})}function f3({roles:e,total:t,steps:n}){return r.jsxs("table",{className:"table usage",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"Role"}),r.jsx("th",{children:"Model level"}),r.jsx("th",{children:n?"What it did":"Runs"}),r.jsx("th",{children:"Tokens"}),r.jsx("th",{className:"num",children:"Cost"})]})}),r.jsx("tbody",{children:e.flatMap(s=>s.levels.map((i,a)=>r.jsxs("tr",{children:[r.jsx("td",{children:a===0&&r.jsxs("span",{className:"who",children:[r.jsx(Qr,{role:s.role,small:!0})," ",zs[s.role]]})}),r.jsx("td",{children:r.jsx(uT,{level:i.level,model:i.model})}),r.jsx("td",{children:n?r.jsxs(r.Fragment,{children:[i.steps.map(o=>oT[o]??o).join(", "),r.jsxs("span",{className:"note",children:[" · ",$d(i.total.runs)]})]}):i.total.runs}),r.jsx("td",{children:r.jsx(sm,{t:i.total})}),r.jsx("td",{className:"num",children:r.jsx(nm,{t:i.total})})]},`${s.role}-${i.level}-${i.model}`)))}),r.jsx("tfoot",{children:r.jsxs("tr",{children:[r.jsx("td",{children:"Total"}),r.jsx("td",{}),r.jsx("td",{children:n?r.jsx("span",{className:"note",children:$d(t.runs)}):t.runs}),r.jsx("td",{children:r.jsx(sm,{t})}),r.jsx("td",{className:"num",children:r.jsx(nm,{t})})]})})]})}function m3({t:e}){const t=e.usage??[],n=p3(t);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"lbl",children:["What it used",t.length>0&&r.jsx("span",{className:"pill",children:ha(n)?`${ha(n)} at API prices`:"Cost not reported"})]}),t.length?r.jsxs(r.Fragment,{children:[r.jsx(f3,{roles:cT(t),total:n,steps:!0}),r.jsxs("p",{className:"note",style:{marginTop:8},children:[qp," Each role's model level can be changed on the Squad page."]})]}):r.jsx("p",{className:"note",children:"Nothing yet. Each run of a role is counted here as the squad works."})]})}function g3(){return he({queryKey:["usage"],queryFn:()=>de("/api/v1/usage"),refetchInterval:5e3})}function dT(){const e=g3().data?.total;return e?.runs?r.jsxs("span",{title:qp,children:["Used ",r.jsx("b",{children:ha(e)??"an unknown amount"})," at API prices"]}):null}function hT(){const e=g3().data;return e?.total.runs?r.jsxs(r.Fragment,{children:[r.jsx("h2",{style:{marginTop:30},children:"What the squad used"}),r.jsxs("p",{className:"note",style:{marginTop:2},children:["Every ticket on this computer (",e.tickets," so far) and the project's own work, like reading the project and filling in new tickets",e.project.runs?` (${ha(e.project)??"cost not reported"})`:"",". ",qp," Change a role's model level with its Edit button above."]}),r.jsx("div",{style:{marginTop:10},children:r.jsx(f3,{roles:e.roles,total:e.total})})]}):null}function Ra(e){return e.owner?.trim()||e.createdBy}function kl(e,t){return!!e?.trim()&&e.trim().toLowerCase()===t?.trim().toLowerCase()}function nc(){const e=ft();return e.data?.ready?e.data.meta.user?.name:void 0}function Zn(e,t){return kl(Ra(e),t)}function pT(e,t){return Zn(e,t)&&!e.takenOver&&e.stage!=="release"&&e.stage!=="done"}function fT({t:e}){const[t,n]=j.useState(!1);return r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn sm",onClick:()=>n(!0),title:"Give this ticket to a teammate. Their squad carries on from its branch.",children:[r.jsx(ul,{size:13})," Hand over"]}),t&&r.jsx(mT,{t:e,onClose:()=>n(!1)})]})}function mT({t:e,onClose:t}){const n=Y(),s=Y(),i=ft(),a=nc(),[o,l]=j.useState(""),[c,u]=j.useState(""),h=i.data?.ready?i.data.meta.engine==="live":!0,d=e.branch??`squad/${e.id.toLowerCase()}`,f=!!(e.live||e.squad||e.stopRequested),p=e.chat?.open?"A chat is open on this ticket. Finish the talk first.":f?"The squad is working on it right now. It hands over once the step is done, or you stop it.":null,m=j.useMemo(()=>{const y=new Map;for(const x of i.data?.ready?i.data.tickets:[])for(const k of[Ra(x),x.createdBy,x.specApproved?.by,x.handedOver?.from,x.handedOver?.to,...(x.notes??[]).map(b=>b.by)])k?.trim()&&!kl(k,a)&&y.set(k.trim().toLowerCase(),k.trim());return[...y.values()].slice(0,8)},[i.data,a]),g=o.trim()||"them",v=()=>o.trim()&&n.mutate({path:`/api/v1/tickets/${e.id}/hand-over`,body:{to:o,note:c},done:`Handed ${e.id} over to ${o.trim()}. Their squad carries on from the branch.`},{onSuccess:t});return r.jsxs(it,{title:`Hand over ${e.id}`,onClose:t,icon:r.jsx("span",{className:"glyph",children:r.jsx(ul,{size:15})}),footer:r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn pri",disabled:!o.trim()||!!p||n.isPending,onClick:v,children:[r.jsx(ul,{size:15})," ",n.isPending?"Pushing…":"Hand over"]}),r.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad hand-over ${e.id} ${o.trim()||"Name"}${c.trim()?` --note "${c.trim()}"`:""}`})]}),children:[r.jsx("p",{children:"Give this ticket to a teammate. Their squad carries on where it is now."}),p&&r.jsxs("div",{className:"stuckbox",style:{marginBottom:14,display:"flex",gap:10,alignItems:"center"},children:[r.jsx("span",{style:{flex:1},children:p}),f&&!e.chat?.open&&r.jsxs("button",{className:"btn sm",disabled:e.stopRequested||s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),children:[r.jsx(oa,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]})]}),r.jsxs("div",{className:"field",children:[r.jsx("label",{htmlFor:"handover-to",children:"Hand it over to"}),r.jsx("input",{id:"handover-to",className:"input",autoFocus:!0,value:o,placeholder:"Their name, as their board shows it",onChange:y=>l(y.target.value),onKeyDown:y=>y.key==="Enter"&&!p&&v()}),m.length>0&&r.jsx("div",{className:"pills",style:{marginTop:8},children:m.map(y=>r.jsxs("button",{className:`pill click ${kl(y,o)?"on":""}`,onClick:()=>l(y),children:[r.jsx(xy,{size:12})," ",y]},y))})]}),r.jsxs("div",{className:"field",children:[r.jsxs("label",{htmlFor:"handover-note",children:["A note for ",g," (optional)"]}),r.jsx("textarea",{id:"handover-note",className:"input",rows:2,value:c,placeholder:"Where you got to, and anything to watch out for. Every agent reads it too.",onChange:y=>u(y.target.value)})]}),r.jsx("div",{className:"lbl",children:"What happens"}),r.jsxs("ul",{className:"brief",children:[h?r.jsxs(r.Fragment,{children:[r.jsxs("li",{children:["squad-kit saves the work so far and the ticket's documents on its branch, ",r.jsx("span",{className:"mono",children:d}),", and pushes it."]}),r.jsxs("li",{children:[g==="them"?"They become":`${g} becomes`," the owner. Their squad makes its copy of the code from that branch, and the Builder starts a fresh chat from the spec, the design and the code."]})]}):r.jsxs("li",{children:[g==="them"?"They become":`${g} becomes`," the owner. This is a sample board, so nothing is pushed."]}),r.jsx("li",{children:"Your squad stops working on it. You still see it on your board, with its new owner."})]}),r.jsx("div",{className:"lbl",children:"What stays on this computer"}),r.jsx("p",{className:"note",style:{fontSize:13},children:"Live progress, agent chats and screenshots. They see the documents and the code, not the chat. The Tester takes the screenshots again on their computer."})]})}function gT({t:e}){const t=nc(),n=e.handedOver;return!n||!kl(n.to,t)||!Zn(e,t)?null:r.jsxs("div",{className:"calm",style:{flex:"none",margin:"16px 28px 0"},children:[r.jsx("span",{className:"ring",children:r.jsx(ul,{size:16})}),r.jsxs("div",{children:[r.jsxs("b",{children:[n.from," handed this ticket to you ",An(n.at)]}),r.jsxs("span",{children:["The spec, the design, the notes and the code came with its branch. Live progress, agent chats and screenshots stayed on ",n.from,"'s computer, so the Builder starts a fresh chat from the spec, the design and the code, and the Tester takes the screenshots again."]})]})]})}function yT({t:e}){const t=Ra(e),n=e.handedOver;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"db",children:[r.jsxs("div",{className:"calm",children:[r.jsx("span",{className:"ring",children:r.jsx(xy,{size:17})}),r.jsxs("div",{children:[r.jsxs("b",{children:[t," owns this ticket"]}),r.jsxs("span",{children:[n?`${n.from} handed it to ${n.to} ${An(n.at)}. `:"","Their squad works on it, on their computer. You see their work here when they push it: when they hand it over, or when its pull request opens."]})]})]}),r.jsxs("p",{className:"note",style:{marginTop:12,fontSize:13},children:["Live progress and agent chats stay on ",t,"'s computer. The spec, the design and the notes here are as ",t," last pushed them."]})]}),r.jsxs("div",{className:"df",children:[r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad show ${e.id}`})]})]})}function xT({id:e,onClose:t}){const n=ba(e),s=nc(),[i,a]=j.useState("now");j.useEffect(()=>a("now"),[e]),j.useEffect(()=>{const l=c=>c.key==="Escape"&&!document.querySelector(".modal")&&t();return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[t]);const o=n.data;return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"veil",onClick:t}),r.jsx("aside",{className:"drawer","aria-label":o?`${o.id} ${o.title}`:"Ticket",children:o?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"dh",children:[r.jsxs("div",{className:"dtop",children:[r.jsx("span",{className:"idtag",children:o.id}),o.source.type!=="manual"&&(o.source.url?r.jsxs("a",{className:"src",href:o.source.url,target:"_blank",rel:"noreferrer",children:[r.jsx(Pn,{size:14})," ",o.source.itemType??"Item"," ",o.source.ref," ",r.jsx(ls,{size:12})]}):r.jsxs("span",{className:"src",children:[r.jsx(Pn,{size:14})," From ",o.source.ref]})),o.pr&&r.jsxs("a",{className:"src",href:o.pr.url,target:"_blank",rel:"noreferrer",children:[r.jsx(e8,{size:14})," Pull request ",o.pr.id," ",r.jsx(ls,{size:12})]}),o.kind==="bug"&&r.jsxs("span",{className:"prio",children:["Bug",o.foundIn?` found in ${o.foundIn}`:""]}),o.priority==="high"&&o.kind!=="bug"&&r.jsx("span",{className:"prio",children:"High priority"}),r.jsx("span",{className:"grow"}),pT(o,s)&&r.jsx(fT,{t:o}),(Zn(o,s)||!s)&&r.jsx(O8,{t:o}),o.waiting?.kind==="proof"&&r.jsx(Pe,{to:"/tickets/$id/proof",params:{id:o.id},className:"iconbtn","aria-label":"Open the proof page",children:r.jsx(ls,{size:15})}),r.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close",children:r.jsx(Dt,{size:16})})]}),r.jsx("h2",{children:o.title}),r.jsxs("div",{className:"sub",children:[r.jsxs("span",{children:["Created by ",r.jsx("b",{children:o.createdBy})," ",An(o.createdAt)," · ",r.jsx("b",{children:o.track==="express"?"Express":"Full"})," track"]}),r.jsxs("span",{children:["Owner ",r.jsx("b",{children:Ra(o)}),Zn(o,s)?" (you)":""]}),o.repo&&r.jsxs("span",{children:["Repo ",r.jsx("b",{className:"mono",style:{fontSize:12.5},children:o.repo})]}),o.builder&&r.jsxs("span",{children:["Builder ",r.jsx("b",{children:o.builder})]}),o.reviewer&&r.jsxs("span",{children:["Reviewer ",r.jsx("b",{children:o.reviewer})]})]}),r.jsx(C8,{ticket:o})]}),r.jsxs("div",{className:"tabs",role:"tablist",children:[[["now","Now"],["story","Story"],["plan","Plan"],["activity","Activity"],["conversation","Conversation"],["proof","Proof"],["changes","Changes"],["cost","Cost"]].map(([l,c])=>r.jsxs("button",{className:i===l?"on":"",onClick:()=>a(l),children:[c,l==="now"&&(o.waiting||o.outdated?.length||on(o))&&r.jsx("span",{className:"dot"})]},l)),r.jsxs("button",{className:`dev ${i==="developer"?"on":""}`,onClick:()=>a("developer"),children:[r.jsx(va,{size:15})," Developer"]})]}),i==="now"&&o.outdated?.length?r.jsx(RT,{t:o}):null,i==="now"&&r.jsx(gT,{t:o}),i==="now"&&(Zn(o,s)||!s)&&r.jsx(M8,{t:o}),i==="now"&&(Zn(o,s)||!s?r.jsx(vT,{t:o}):r.jsx(yT,{t:o})),i==="story"&&r.jsx(_T,{t:o}),i==="plan"&&r.jsx(MT,{t:o}),i==="activity"&&r.jsx(OT,{t:o}),i==="conversation"&&r.jsx(VE,{t:o}),i==="proof"&&r.jsx($T,{t:o}),i==="changes"&&r.jsx(nT,{t:o}),i==="cost"&&r.jsx("div",{className:"db",children:r.jsx(m3,{t:o})}),i==="developer"&&r.jsx(DT,{t:o})]}):r.jsx("div",{className:"center",children:n.isError?`No ticket ${e}.`:"Loading…"})})]})}function vT({t:e}){if(!e.waiting&&e.quiet)return r.jsx(PT,{t:e});switch(e.waiting?.kind){case"questions":return r.jsx(wT,{t:e});case"spec":case"plan":return r.jsx(jT,{t:e});case"proof":return r.jsx(CT,{t:e});case"stuck":return r.jsx(TT,{t:e});case"ask":return r.jsx(ET,{t:e});case"yours":return r.jsx(LT,{t:e});case"chat":return e.chat?r.jsx(kT,{t:e}):r.jsx(Dd,{t:e});default:return r.jsx(Dd,{t:e})}}function kT({t:e}){const t=Ie[e.chat.with];return r.jsx("div",{className:"db",children:r.jsxs("div",{className:"youbox",children:[r.jsx("span",{className:"ring",children:r.jsx(ka,{size:15})}),r.jsxs("div",{children:[r.jsxs("b",{children:["Talking it through with the ",t]}),r.jsx("span",{children:"The talk is open in the chat panel beside the board. Its work waits until you press a button there."})]}),r.jsx("span",{className:"grow"}),r.jsx("button",{className:"btn pri sm",onClick:()=>Kt.show(e.id),children:"Open the chat"}),r.jsx(Pe,{to:"/conversations",search:{ticket:e.id},className:"btn sm",children:"Full screen"})]})})}function wT({t:e}){const t=Y(),[n,s]=j.useState(()=>Object.fromEntries((e.questions??[]).filter(l=>l.answer).map(l=>[l.id,l.answer]))),i=e.questions??[],a=[{from:"analyst",label:"From the Analyst, about what to build"},{from:"architect",label:"From the Architect, about how to build it"}],o=i.every(l=>{const c=n[l.id];return c?c.choice===l.inputOption||c.choice==="Other"?!!c.value?.trim():!0:!1});return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"db",children:a.map(l=>{const c=i.filter(u=>u.from===l.from);return c.length?r.jsxs("div",{className:"qblock",children:[r.jsxs("div",{className:"qgroup",children:[r.jsx(Qr,{role:l.from,small:!0}),l.label]}),c.map(u=>r.jsx(bT,{t:e,q:u,n:i.indexOf(u)+1,answer:n[u.id],onAnswer:h=>s(d=>({...d,[u.id]:h}))},u.id))]},l.from):null})}),r.jsxs("div",{className:"df",children:[r.jsxs("button",{className:"btn pri",disabled:!o||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/answers`,body:{answers:n},done:"Answers sent. The Architect is choosing the design."}),children:[r.jsx(wa,{size:15})," Send answers"]}),r.jsx("button",{className:"btn",onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/skip`,done:"The squad made its own guesses. You will see them in the plan."}),children:"Skip, let the squad guess"}),r.jsx(Pa,{t:e,agent:"analyst",label:"Talk it through instead"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad answer ${e.id}`})]})]})}function bT({t:e,q:t,n,answer:s,onAnswer:i}){const a=Y(),[o,l]=j.useState(!1),[c,u]=j.useState(""),h=()=>{c.trim()&&(a.mutate({path:`/api/v1/tickets/${e.id}/ask`,body:{questionId:t.id,text:c}}),u(""),l(!1))},d=[...t.options,"Other"];return r.jsxs("div",{className:"q",children:[r.jsxs("h4",{children:[n,". ",t.text]}),(t.thread?.length||t.thinking)&&r.jsxs("div",{className:"thread",children:[t.thread?.map((f,p)=>r.jsxs("div",{className:`msg ${f.who==="you"?"":"squad"}`,children:[r.jsx("small",{children:f.who==="you"?"You":zs[f.who]}),f.text]},p)),t.thinking&&r.jsxs("div",{className:"msg squad",children:[r.jsx("small",{children:zs[t.from]}),r.jsxs("span",{className:"typing","aria-label":"Writing a reply",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})]})]}),r.jsx("div",{className:"choices",children:d.map(f=>{const p=s?.choice===f,m=f===t.inputOption||f==="Other";return r.jsxs("div",{className:`choice ${p?"on":""}`,role:"radio","aria-checked":p,tabIndex:0,onClick:()=>!p&&i({choice:f}),onKeyDown:g=>g.key==="Enter"&&i({choice:f}),children:[r.jsx("span",{className:"rd"}),f==="Other"?"Other":f.replace(/:$/,""),m&&p&&r.jsx("input",{autoFocus:!0,value:s?.value??"",placeholder:f==="Other"?"Your answer":"Which one?",onChange:g=>i({choice:f,value:g.target.value}),onClick:g=>g.stopPropagation()})]},f)})}),o?r.jsxs("div",{className:"askrow",children:[r.jsx("input",{className:"input",autoFocus:!0,value:c,onChange:f=>u(f.target.value),placeholder:`Ask the ${zs[t.from]} about this question`,onKeyDown:f=>f.key==="Enter"&&h()}),r.jsx("button",{className:"btn",onClick:h,disabled:!c.trim(),children:"Ask"})]}):r.jsxs("button",{className:"asklink",onClick:()=>l(!0),disabled:t.thinking,children:[r.jsx(ka,{size:14})," Ask about this"]})]})}function wl({t:e,review:t}){return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"The story"}),r.jsx(ao,{review:t,at:{part:"story"},children:r.jsx("p",{className:"story",children:e.story})}),e.criteria&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Done when"}),r.jsx("ol",{className:"ac",children:e.criteria.map((n,s)=>r.jsx("li",{children:r.jsx(ao,{review:t,at:{part:"criterion",index:s},children:r.jsxs("span",{children:[r.jsx("em",{children:"Given"})," ",n.given,", ",r.jsx("em",{children:"when"})," ",n.when,", ",r.jsx("em",{children:"then"})," ",n.then,"."]})})},s))})]}),e.decision&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"lbl",children:["The Architect's decision ",e.decision.adr&&r.jsxs("span",{className:"pill ok",children:["Saved as ",e.decision.adr]})]}),r.jsx(ao,{review:t,at:{part:"decision"},children:r.jsxs("div",{className:"decision",children:[r.jsxs("h3",{children:[r.jsx(Qr,{role:"architect",small:!0}),e.decision.title]}),r.jsx("div",{className:"opts2",children:e.decision.options.map(n=>r.jsxs("div",{className:`opt2 ${n.chosen?"pick":""}`,children:[r.jsxs("b",{children:[n.name,n.chosen&&r.jsxs("span",{children:[r.jsx(J,{size:13,strokeWidth:2.5})," Chosen"]})]}),n.note]},n.name))}),r.jsxs("div",{className:"why",children:[r.jsxs("span",{children:[r.jsx("b",{children:"Why"})," ",e.decision.why]}),e.decision.clientCheck&&r.jsxs("span",{children:[r.jsx("b",{children:"Client's choice"})," ",e.decision.clientCheck]}),e.decision.replaces&&r.jsxs("span",{children:[r.jsx("b",{children:"Replaces"})," ",e.decision.replaces,". Once you approve, it is no longer a rule and later tickets follow this one."]})]})]})})]}),e.work&&e.follows&&e.follows.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Follows saved decisions"}),r.jsx("div",{className:"pills",children:e.follows.map(n=>r.jsx(Pe,{to:"/architecture",search:{adr:n},className:"pill",children:n},n))})]}),e.mockup&&e.work&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"How it will look"}),r.jsx(Ip,{ticket:e.id,file:e.mockup,title:`${e.title}: mockup`})]}),e.work&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"The work"}),r.jsxs("div",{className:"pills",children:[r.jsxs("span",{className:"pill",children:[e.work.steps," small steps"]}),r.jsxs("span",{className:"pill",children:[e.work.tests," new tests"]}),e.work.screens>0&&r.jsxs("span",{className:"pill",children:[e.work.screens," before and after screens"]})]})]}),t&&e.work&&e.steps&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Build steps"}),r.jsx("ol",{className:"ac",children:e.steps.map((n,s)=>r.jsx("li",{children:r.jsx(ao,{review:t,at:{part:"step",index:s},children:r.jsx("span",{children:n.title})})},s))})]})]})}function jT({t:e}){const t=Y(),[n,s]=j.useState(null),[i,a]=j.useState(""),[o,l]=j.useState(!1),[c,u]=j.useState([]),h=e.waiting?.kind==="spec",d=!h&&!!e.specApproved,f=h?"the Analyst":d?"the Architect":"the Spec writer",p={t:e,comments:c,add:v=>u(y=>[...y,v]),remove:v=>u(y=>y.filter((x,k)=>k!==v)),canEdit:v=>h?v.part==="story"||v.part==="criterion":v.part==="step"||!d&&(v.part==="story"||v.part==="criterion")},m=()=>n==="over"?t.mutate({path:`/api/v1/tickets/${e.id}/plan/start-over`,body:{direction:i},done:`Starting over. ${f[0].toUpperCase()}${f.slice(1)} writes it again.`}):t.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:i},done:`Sent to ${f}.`}),g=c.length;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"db",children:[(h||d)&&r.jsxs("div",{className:"twostep",children:[r.jsxs("span",{className:h?"on":"done",children:[h?"1":r.jsx(J,{size:12,strokeWidth:3})," The what"]}),r.jsx("span",{className:"bar"}),r.jsx("span",{className:d?"on":"",children:"2 The how"}),r.jsx("p",{children:h?'Is this what you want? Check the story and the "done when" list. The Architect designs how to build it after you approve.':`The spec was approved by ${e.specApproved.by}. Now check how the Architect will build it. A developer can approve this part for you.`})]}),r.jsx(aT,{t:e}),r.jsx("p",{className:"note reviewhint",children:"Point at any part to comment on it or edit it yourself. Send back sends every comment at once."}),h?r.jsx(wl,{t:{...e,decision:void 0,work:void 0},review:p}):r.jsx(wl,{t:e,review:p}),!h&&e.decision&&r.jsx("p",{className:"note",style:{marginTop:14},children:"Approved decisions are saved in Decisions. Later tickets must follow them."})]}),n?r.jsxs("div",{className:"df",children:[r.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,value:i,onChange:v=>a(v.target.value),placeholder:n==="over"?"What is the new direction? It is written again from zero.":"What should change? One line is enough.",onKeyDown:v=>v.key==="Enter"&&i.trim()&&m()}),r.jsx("button",{className:"btn pri",disabled:!i.trim()||t.isPending,onClick:m,children:n==="over"?"Start over":"Send"}),r.jsx("button",{className:"btn",onClick:()=>s(null),children:"Cancel"})]}):r.jsxs("div",{className:"df",children:[g>0?r.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/plan/send-back`,body:{comments:c},done:`Sent back to ${f} with ${g} ${g===1?"comment":"comments"}.`},{onSuccess:()=>u([])}),children:[r.jsx(wa,{size:15})," Send back (",g,")"]}):r.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:h?"Spec approved. The Architect is designing how to build it.":"Plan approved. The Builder started."}),children:[r.jsx(J,{size:15,strokeWidth:2.5})," ",h?"Approve spec":d?"Approve design":"Approve plan"]}),g===0&&r.jsx("button",{className:"btn",onClick:()=>s("change"),children:"Change something"}),(h||d)&&r.jsx(Pa,{t:e,agent:h?"analyst":"architect",label:"Talk it through"}),r.jsx("button",{className:"btn quiet",onClick:()=>s("over"),children:"Start over"}),r.jsx("button",{className:"btn quiet",onClick:()=>l(!0),children:"Ask a developer"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:g>0?`squad send-back ${e.id} ${c.map(v=>`"${ST(v)}: ${v.text}"`).join(" ")}`:`squad approve ${e.id}`})]}),o&&r.jsx(NT,{t:e,onClose:()=>l(!1)})]})}function ST(e){return e.part==="criterion"?`done when ${(e.index??0)+1}`:e.part==="step"?`step ${(e.index??0)+1}`:e.part}function NT({t:e,onClose:t}){const{toast:n}=Ce(),s=`Hi, can you check the plan for ${e.id} "${e.title}" before I approve it? It's on the board, or run: squad show ${e.id}`;return r.jsxs(it,{title:"Ask a developer",onClose:t,footer:r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn pri",onClick:()=>void navigator.clipboard?.writeText(s).then(()=>n("Message copied")),children:[r.jsx(Vr,{size:15})," Copy message"]}),r.jsx("button",{className:"btn",onClick:t,children:"Close"})]}),children:[r.jsx("p",{children:"Send this to a developer on your team. They can read the plan in the terminal and tell you what they think."}),r.jsx("div",{className:"wa",children:s})]})}function Wp({t:e}){const t=e.gates,n=(s,i)=>r.jsxs("span",{className:`pill ${s==="pass"?"ok":s==="skipped"?"skip":"wait"}`,children:[s==="pass"&&r.jsx(J,{size:13,strokeWidth:2.5}),i]});return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"pills",children:[n(t?.checks,t?.checks==="skipped"?"Checks failed, you continued":t?.checksText??"All checks pass"),n(t?.review,t?.review==="pass"?`Review approved by ${t.reviewBy}`:t?.review==="skipped"?"Review notes open, you continued":"Review approved"),n(t?.proof,t?.proof==="skipped"?"No screenshots, you continued":"Proof made")]}),e.overrides?.map(s=>r.jsxs("p",{className:"note override",children:[r.jsx("b",{children:"Continued anyway"})," past the ",s.gate==="checks"?"failed checks":s.gate==="proof"?"missing screenshots":"open review",", by ",s.by,": ",s.reason]},s.at))]})}function y3({t:e}){const[t,n]=j.useState(null);if(!e.proof?.length)return r.jsx("p",{className:"note",children:e.gates?.proof==="skipped"||(e.work?.screens??0)>0?"No screenshots were taken for this ticket. See the activity for why.":"No screens change in this ticket, so the passing checks are the proof."});const s=e.proof.flatMap(i=>[{src:Yn(`/api/v1/proof/${i.before}`),caption:`${i.criterion} · ${i.beforeLabel}`},{src:Yn(`/api/v1/proof/${i.after}`),caption:`${i.criterion} · ${i.afterLabel}`}]);return r.jsxs(r.Fragment,{children:[t!==null&&r.jsx(Zr,{pictures:s,start:t,onClose:()=>n(null)}),e.proof.map((i,a)=>r.jsxs("div",{className:"critrow",children:[r.jsxs("h5",{children:[r.jsx(J,{size:15,strokeWidth:2.5}),i.criterion]}),r.jsxs("div",{className:"proofmini",children:[r.jsxs("div",{children:[r.jsx("small",{children:i.beforeLabel}),r.jsx("button",{className:"zoom",onClick:()=>n(a*2),"aria-label":`Open ${i.beforeLabel} full size`,children:r.jsx("img",{src:Yn(`/api/v1/proof/${i.before}`),alt:`${i.criterion}, ${i.beforeLabel}`})})]}),r.jsxs("div",{children:[r.jsx("small",{children:i.afterLabel}),r.jsx("button",{className:"zoom",onClick:()=>n(a*2+1),"aria-label":`Open ${i.afterLabel} full size`,children:r.jsx("img",{src:Yn(`/api/v1/proof/${i.after}`),alt:`${i.criterion}, ${i.afterLabel}`})})]})]})]},i.criterion))]})}function x3({t:e,sticky:t}){const n=Y(),[s,i]=j.useState(!1),[a,o]=j.useState(""),l=()=>n.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:a},done:"Sent back to the Builder with your note."});return s?r.jsxs("div",{className:t?"stickybar":"df",children:[r.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,value:a,onChange:c=>o(c.target.value),placeholder:"What's wrong? Tell the squad in one line.",onKeyDown:c=>c.key==="Enter"&&a.trim()&&l()}),r.jsx("button",{className:"btn pri",disabled:!a.trim(),onClick:l,children:"Send back"}),r.jsx("button",{className:"btn",onClick:()=>i(!1),children:"Cancel"})]}):r.jsxs("div",{className:t?"stickybar":"df",children:[r.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:`${e.id} is ready to release.`}),children:[r.jsx(J,{size:15,strokeWidth:2.5})," Looks right"]}),r.jsx("button",{className:"btn",onClick:()=>i(!0),children:"Something's wrong"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad approve ${e.id}`})]})}function CT({t:e}){return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"db",children:[r.jsxs("div",{className:"youbox",children:[r.jsx("span",{className:"ring",children:r.jsx(J,{size:18,strokeWidth:2.5})}),r.jsxs("div",{children:[r.jsx("b",{children:"Check that it works the way you want"}),r.jsx("span",{children:'Every gate is green. Compare the screens before and after each "done when".'})]}),r.jsx("span",{className:"grow"}),r.jsxs(Pe,{to:"/tickets/$id/proof",params:{id:e.id},className:"btn sm",children:[r.jsx(ls,{size:14})," Full page"]})]}),r.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),r.jsx(Wp,{t:e}),r.jsx("div",{className:"lbl",children:"Before and after"}),r.jsx(y3,{t:e})]}),r.jsx(x3,{t:e})]})}const au="Decide yourself: take the simplest choice that fits the plan, and say what you chose";function ET({t:e}){const t=Y(),n=e.agentQuestion,[s,i]=j.useState(null),[a,o]=j.useState("");if(!n)return r.jsx(Dd,{t:e});const l={architect:"Architect",builder:"Builder",reviewer:"Reviewer"}[n.from],c=s===""?a.trim():s,u=[...n.options,au];return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"db",children:[r.jsxs("div",{className:"youbox",children:[r.jsx("span",{className:"ring",children:"?"}),r.jsxs("div",{children:[r.jsxs("b",{children:["The ",l," has a question"]}),r.jsx("span",{children:"It stopped instead of guessing. Your answer goes back into the same conversation, and the work carries on."})]})]}),r.jsxs("div",{className:"lbl",children:[l," asks"]}),r.jsx("p",{className:"stuckq",children:n.text}),n.why&&r.jsxs("p",{className:"note",style:{marginTop:-4},children:["Why it matters: ",n.why]}),n.files&&n.files.length>0&&r.jsx(oE,{ticket:e.id,files:n.files}),r.jsxs("div",{className:"opts2",children:[u.map(h=>r.jsxs("button",{className:`opt2 ${s===h?"pick":""}`,onClick:()=>i(h),children:[r.jsxs("b",{children:[h===au?"Let it decide":h,s===h&&r.jsxs("span",{children:[r.jsx(J,{size:13,strokeWidth:2.5})," Your pick"]})]}),h===au?"It takes the simplest choice that fits the plan and tells you which.":""]},h)),r.jsx("button",{className:`opt2 ${s===""?"pick":""}`,onClick:()=>i(""),children:r.jsx("b",{children:"Write my own answer"})})]}),s===""&&r.jsx("textarea",{className:"input",rows:3,style:{width:"100%",marginTop:8},autoFocus:!0,value:a,placeholder:"Your answer",onChange:h=>o(h.target.value)}),r.jsx(Aa,{t:e})]}),r.jsxs("div",{className:"df",children:[r.jsxs("button",{className:"btn pri",disabled:!c||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:c},done:`Sent. The ${l} carries on.`}),children:[r.jsx(wa,{size:15})," Send answer"]}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad reply ${e.id}${c?` "${c.length>40?`${c.slice(0,40)}…`:c}"`:""}`})]})]})}function TT({t:e}){const t=Y(),[n,s]=j.useState(null),[i,a]=j.useState(""),o=e.stuck?.options??[],l=n===null?void 0:o[n]?.do??(n===0?"retry":void 0),c=l==="continue"&&!i.trim(),u=l==="yourself"?"I fixed it, check again":l==="continue"?"Continue anyway":l==="retry"?"Try again":"Decide",h=l==="continue"?` --reason "${i.trim()||"…"}"`:l==="retry"&&i.trim()?` --note "${i.trim()}"`:"";return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"db",children:[r.jsxs("div",{className:"youbox",children:[r.jsx("span",{className:"ring",children:"!"}),r.jsxs("div",{children:[r.jsx("b",{children:"The squad stopped and needs your decision"}),r.jsx("span",{children:"Read what happened, then pick a way out. Nothing is lost whatever you pick."})]})]}),r.jsx("div",{className:"lbl",children:"What happened"}),r.jsx("p",{className:"stuckq",children:e.stuck?.question}),r.jsx("div",{className:"opts2",children:o.map((d,f)=>r.jsxs("button",{className:`opt2 ${n===f?"pick":""}`,onClick:()=>{s(f),a("")},children:[r.jsxs("b",{children:[d.name,n===f&&r.jsxs("span",{children:[r.jsx(J,{size:13,strokeWidth:2.5})," Your pick"]})]}),d.note]},d.name))}),l==="retry"&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"A note for the squad (optional)"}),r.jsx("textarea",{className:"waynote",rows:2,value:i,onChange:d=>a(d.target.value),placeholder:"For example: the test server needs the VPN, it is on now"})]}),l==="continue"&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Why continue anyway?"}),r.jsx("textarea",{className:"waynote",rows:2,value:i,onChange:d=>a(d.target.value),placeholder:"For example: the failing test is broken on main too, fixed in SK-160"}),r.jsx("p",{className:"note",style:{fontSize:12.5},children:"Only you can do this. Your reason shows on the ticket, the pull request and the release notes."})]}),l==="yourself"&&r.jsxs("div",{className:"stuckbox",children:[r.jsxs("p",{style:{margin:"0 0 8px"},children:["Open the ticket's copy, fix it, and save. Then press ",r.jsx("b",{children:"I fixed it"}),": the checks, review and proof run again."]}),r.jsx(tc,{t:e})]}),r.jsx(Aa,{t:e})]}),r.jsxs("div",{className:"df",children:[r.jsxs("button",{className:"btn pri",disabled:n===null||c||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/decide`,body:{choice:n,...l==="continue"?{reason:i}:l==="retry"?{note:i}:{}},done:l==="yourself"?"OK. The checks run again on your fix.":"Decided. The squad carries on."}),children:[r.jsx(J,{size:15,strokeWidth:2.5})," ",u]}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad decide ${e.id}${n!==null?` ${n+1}`:""}${h}`})]})]})}function PT({t:e}){const t=Y(),n=e.quiet,s=n.kind==="stuck";return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"db",children:[r.jsx("div",{className:"lbl",children:s?"This step looks stuck":"This step is taking long"}),r.jsxs("div",{className:"stuckbox",children:[r.jsx("p",{style:{margin:0},children:n.detail}),n.command&&r.jsx("p",{className:"mono",style:{fontSize:12.5,margin:"8px 0 0",overflowWrap:"anywhere"},children:n.command}),r.jsxs("p",{className:"note",style:{margin:"8px 0 0",fontSize:12.5},children:["No progress since ",qs(n.since),". Nothing is lost whatever you choose."]})]}),r.jsx("div",{className:"lbl",children:"What to do"}),r.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[n.pid&&r.jsx("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/unstick`,done:"Ended the stuck command. The squad carries on."}),children:"End the stuck command"}),r.jsx("button",{className:"btn",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/keep-waiting`,done:"OK. squad-kit stays quiet about it for 10 minutes."}),children:"Keep waiting"}),r.jsxs("button",{className:"btn",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),children:[r.jsx(oa,{size:13})," Stop"]})]}),r.jsx("p",{className:"note",style:{marginTop:10,fontSize:12.5},children:"Ending the command gives the squad an error back, and it carries on in the same conversation. See what it was doing in the Conversation tab."})]}),r.jsxs("div",{className:"foot",children:[r.jsx("span",{className:"grow"}),r.jsx(Z,{text:n.pid?`squad unstick ${e.id}`:`squad stop ${e.id}`})]})]})}function RT({t:e}){const t=Y(),[n,s]=j.useState(null),[i,a]=j.useState(""),o=!!e.mergedAt||e.stage==="done";return r.jsx("div",{className:"outdated",children:e.outdated.map(l=>r.jsxs("div",{className:"outdated-item",children:[r.jsxs("div",{className:"outdated-head",children:[r.jsx("span",{className:"ic",children:r.jsx(Xh,{size:15})}),r.jsxs("b",{children:[r.jsx(Pe,{to:"/architecture",search:{adr:l.adr},children:l.adr})," came after this plan and changes it"]})]}),r.jsx("p",{children:l.why}),r.jsxs("p",{children:[r.jsx("span",{className:"note",children:o?"What a follow-up would change:":"What would change:"})," ",l.change]}),n===l.adr?r.jsxs("div",{className:"row",children:[r.jsx("input",{className:"input",autoFocus:!0,value:i,onChange:c=>a(c.target.value),placeholder:"Why the plan stays as it is"}),r.jsx("button",{className:"btn sm",disabled:!i.trim()||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:l.adr,do:"keep",reason:i},done:"Kept the plan. The reason is on the ticket."},{onSuccess:()=>s(null)}),children:"Keep it"}),r.jsx("button",{className:"btn sm quiet",onClick:()=>s(null),children:"Cancel"})]}):r.jsxs("div",{className:"row",children:[r.jsx("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:l.adr,do:"update"},done:o?"Made a follow-up ticket.":"The Architect is updating the plan."}),children:o?"Make a follow-up ticket":"Update the plan"}),r.jsx("button",{className:"btn sm",onClick:()=>{s(l.adr),a("")},children:"Keep it as is"})]})]},l.adr))})}function AT({t:e}){const t=Y(),n=e.localSetup,s=n.status==="pending"||n.status==="running";return r.jsxs("div",{className:`localsetup ${n.status}`,children:[r.jsx("span",{className:"ic",children:s?r.jsx(hn,{size:15,className:"spin"}):n.status==="done"?r.jsx(J,{size:15,strokeWidth:2.5}):r.jsx(Xh,{size:15})}),r.jsxs("div",{children:[r.jsx("b",{children:s?"Updating your copy of the code":n.status==="done"?"Your copy of the code is ready to run":"Your copy of the code needs a hand"}),r.jsx("span",{children:s?"The merge changed your own folder, so the squad installs new packages and runs the database changes there.":n.status==="done"?`New packages and database changes are in your own folder${n.at?`, ${An(n.at)}`:""}${n.seconds!==void 0?` (${n.seconds} s)`:""}.`:"The setup stopped in your own folder. Run it there, or try again."}),r.jsx("code",{children:n.command}),n.status==="failed"&&n.output&&r.jsx("pre",{children:n.output})]}),n.status==="failed"&&r.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/local-setup`,done:"Running the setup again"}),children:"Try again"})]})}function Dd({t:e}){const t=Y(),n=e.stage==="release"?{title:`Ready for ${e.release}`,text:"It goes out with the next release. Nothing needed from you until then."}:e.stage==="done"?{title:e.status,text:"This ticket is live. Found a problem? Report a bug and it comes back around."}:e.waiting?.kind==="change"?{title:"The Builder paused for your change",text:"The Architect updated the design. Approve it above, or decline the change and the Builder carries on."}:{title:"Nothing needed from you",text:`${IT(e)} You'll get a card when the squad needs you.`};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"db",children:[r.jsxs("div",{className:"calm",children:[r.jsx("span",{className:"ring",children:e.stage==="release"?r.jsx(hs,{size:18}):r.jsx(J,{size:18,strokeWidth:2.5})}),r.jsxs("div",{children:[r.jsx("b",{children:n.title}),r.jsx("span",{children:n.text})]}),e.stage==="release"&&r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"grow",style:{flex:1}}),r.jsx(Pe,{to:"/releases",className:"btn sm",children:"Open release"})]})]}),e.localSetup&&r.jsx(AT,{t:e}),e.steps&&e.steps.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Steps"}),r.jsx(v3,{t:e})]}),e.gates&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),r.jsx(Wp,{t:e})]}),(e.stage==="release"||e.stage==="done")&&e.usage?.length?r.jsx(m3,{t:e}):null,r.jsx(Aa,{t:e})]}),r.jsxs("div",{className:"df",children:[e.live&&e.stage!=="release"&&e.stage!=="done"&&r.jsxs("button",{className:"btn sm",disabled:e.stopRequested||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping the squad"}),children:[r.jsx(oa,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]}),Op(e)&&r.jsx($p,{t:e}),e.chat?.open?r.jsxs("button",{className:"btn sm",onClick:()=>Kt.show(e.id),children:[r.jsx(ka,{size:13})," Open the chat"]}):!e.takenOver&&r.jsx(Pa,{t:e,agent:"analyst",label:Ws(e)?"Ask a question":"Ask the Analyst"}),r.jsx("span",{className:"note",children:e.live?"Updates live as the squad works.":""}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:e.live&&e.stage!=="release"?`squad stop ${e.id}`:Jh(e)})]})]})}function LT({t:e}){const t=Y(),[n,s]=j.useState(""),i=e.takenOver;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"db",children:[r.jsxs("div",{className:"youbox",children:[r.jsx("span",{className:"ring",children:r.jsx(va,{size:15})}),r.jsxs("div",{children:[r.jsx("b",{children:"You have this ticket"}),r.jsx("span",{children:"The squad stopped and waits. Nothing runs until you give it back."})]})]}),r.jsx("div",{className:"lbl",children:"1. Open the Builder's session in Claude Code"}),r.jsx(Z,{text:`cd "${i.cwd}" && claude --resume ${i.session}`}),r.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:6},children:"It is the same conversation the Builder had, in the ticket's own copy of the code. Your folder is not touched. Or just edit the files:"}),r.jsx(tc,{t:e}),r.jsx("div",{className:"lbl",children:"2. Give it back"}),r.jsx("textarea",{className:"waynote",rows:2,value:n,onChange:a=>s(a.target.value),placeholder:"What did you change? (optional, every agent reads it)"}),r.jsx("p",{className:"note",style:{fontSize:12.5},children:"Then squad-kit runs the checks, the Reviewer reads all the changes, yours too, and the Tester makes the proof again."}),r.jsx(Aa,{t:e})]}),r.jsxs("div",{className:"df",children:[r.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/give-back`,body:{note:n},done:"Given back. The checks run on your changes."}),children:[r.jsx(J,{size:15,strokeWidth:2.5})," Give back"]}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad give-back ${e.id}${n.trim()?` "${n.trim()}"`:""}`})]})]})}function IT(e){const t=e.steps??[],n=t.findIndex(s=>s.status==="doing");return e.stage==="implement"&&n>=0?`The Builder is on step ${n+1} of ${t.length}.`:e.stage==="test"?"squad-kit is running the project checks.":e.stage==="review"?"The Reviewer is checking the work.":e.stage==="tickets"?"The Analyst is reading the ticket.":e.stage==="specs"?"The Architect is writing the plan.":`${e.status}.`}function v3({t:e}){return r.jsx("ul",{className:"steps",children:e.steps.map((t,n)=>r.jsxs("li",{className:t.status==="doing"?"now":t.status==="todo"?"todo":"",children:[r.jsx("span",{className:`sd ${t.status==="done"?"ok":t.status==="doing"?"now":""}`,children:t.status==="done"&&r.jsx(J,{size:11,strokeWidth:3})}),r.jsxs("span",{children:[t.status==="doing"?r.jsx("b",{style:{fontWeight:600},children:t.title}):t.title,t.live&&r.jsxs("span",{className:"livetxt",children:[r.jsx("span",{className:"live"}),t.live]})]}),r.jsx("span",{className:"time",children:t.status==="done"?`${t.minutes??1} min`:t.status==="doing"?"now":""})]},n))})}function Aa({t:e,all:t}){const n=t?e.activity:e.activity.slice(0,4);return n.length?r.jsxs(r.Fragment,{children:[!t&&r.jsx("div",{className:"lbl",children:"Latest activity"}),r.jsx("div",{className:"feed",children:n.map((s,i)=>r.jsxs("div",{className:"fe",children:[r.jsx("span",{className:"tm",children:qs(s.at)}),r.jsx(Qr,{role:s.who,small:!0}),r.jsxs("span",{children:[r.jsx("b",{children:zs[s.who]})," ",s.text.charAt(0).toLowerCase()+s.text.slice(1)]})]},s.at+i))})]}):null}function _T({t:e}){return r.jsxs("div",{className:"db",children:[r.jsx("div",{className:"lbl",children:"What was asked"}),r.jsx("p",{className:"story",style:{whiteSpace:"pre-wrap"},children:e.ask}),r.jsx(lu,{head:"Your acceptance criteria",items:e.brief?.criteria}),r.jsx(lu,{head:"Business rules",items:e.brief?.rules}),r.jsx(lu,{head:"Edge cases",items:e.brief?.edgeCases}),r.jsx(FT,{t:e}),r.jsx(zT,{t:e}),r.jsx(D8,{t:e}),e.story?r.jsx(wl,{t:{...e,decision:void 0,work:void 0}}):r.jsx("p",{className:"note",style:{marginTop:16},children:"The Analyst writes the user story after your answers."})]})}const ou=[{kind:"note",label:"Note",head:"Note",hint:"Anything the squad should know"},{kind:"rule",label:"Business rule",head:"Rule",hint:"For example: at most 3 bookings a day per person"},{kind:"criterion",label:"Acceptance criterion",head:"Done when",hint:"The Tester must prove it, for example: the clerk sees an error on the 4th booking"}];function zT({t:e}){const t=Y(),[n,s]=j.useState("note"),[i,a]=j.useState(""),o=e.notes??[],l=e.stage!=="done",c=ou.find(h=>h.kind===n),u=()=>t.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:i,kind:n},done:e.live?"Added. The squad reads it at its next step.":"Added. Every agent on this ticket reads it."},{onSuccess:()=>a("")});return!l&&!o.length?null:r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"lbl",children:["Notes",o.length?` · ${o.length}`:""]}),o.length>0&&r.jsx("ul",{className:"ticketnotes",children:o.map((h,d)=>r.jsxs("li",{children:[r.jsx("span",{className:`pill ${h.kind==="criterion"?"ok":h.kind==="rule"?"wait":""}`,children:ou.find(f=>f.kind===h.kind)?.head}),r.jsx("span",{className:"grow",children:h.text}),r.jsxs("span",{className:"note",children:[h.by," · ",An(h.at)]})]},d))}),l&&r.jsxs("div",{className:"addnote",children:[r.jsx("div",{className:"seg",style:{width:"fit-content"},children:ou.map(h=>r.jsx("button",{className:n===h.kind?"on":"",onClick:()=>s(h.kind),children:h.label},h.kind))}),r.jsx("textarea",{className:"input",rows:2,value:i,placeholder:c.hint,onChange:h=>a(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&i.trim()&&u()}}),r.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[r.jsxs("button",{className:"btn pri sm",disabled:!i.trim()||t.isPending,onClick:u,children:["Add ",c.label.toLowerCase()]}),r.jsxs("span",{className:"note",children:["Every agent on this ticket reads it",e.live?", the one working now from its next step":"","."]}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad note ${e.id}${n==="note"?"":` --${n}`} "${i.trim()||"…"}"`})]})]})]})}function lu({head:e,items:t}){return t?.length?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:e}),r.jsx("ul",{className:"brief",children:t.map((n,s)=>r.jsx("li",{children:n},s))})]}):null}const rm=/\.(png|jpe?g|gif|webp|bmp)$/i;function FT({t:e}){const[t,n]=j.useState(null),s=e.attachments??[];if(!s.length)return null;const i=l=>l.split(/[\\/]/).pop()??l,a=s.filter(l=>rm.test(l)).map(l=>({src:bt(e.id,l),caption:i(l)})),o=s.filter(l=>!rm.test(l));return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"lbl",children:["Attached · ",s.length]}),a.length>0&&r.jsx("div",{className:"thumbs",children:a.map((l,c)=>r.jsx("button",{className:"zoom thumb",onClick:()=>n(c),"aria-label":`Open ${l.caption} full size`,children:r.jsx("img",{src:l.src,alt:l.caption,loading:"lazy"})},l.src))}),o.map(l=>r.jsx("a",{className:"filechip mono",href:bt(e.id,l),target:"_blank",rel:"noreferrer",children:i(l)},l)),t!==null&&r.jsx(Zr,{pictures:a,start:t,onClose:()=>n(null)})]})}function MT({t:e}){return e.story?r.jsxs("div",{className:"db",children:[r.jsx(wl,{t:e}),e.steps&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Steps"}),r.jsx(v3,{t:e})]})]}):r.jsx("div",{className:"db",children:r.jsx("p",{className:"note",children:"The plan is written after the questions are answered."})})}function OT({t:e}){return r.jsx("div",{className:"db",children:r.jsx(Aa,{t:e,all:!0})})}function $T({t:e}){return e.gates?r.jsxs("div",{className:"db",children:[r.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),r.jsx(Wp,{t:e}),r.jsx("div",{className:"lbl",children:"Before and after"}),e.gates.proof==="pass"?r.jsx(y3,{t:e}):r.jsx("p",{className:"note",children:"The screens are recorded after all checks pass."})]}):r.jsx("div",{className:"db",children:r.jsx("p",{className:"note",children:"The Tester records the proof after the Builder finishes."})})}function DT({t:e}){const t=j.useMemo(()=>{const n=new Set,s=[...e.activity.map(i=>i.text),...(e.steps??[]).map(i=>i.live??"")];for(const i of s)for(const a of i.matchAll(/[\w./-]+\/[\w.-]+\.\w+/g))n.add(a[0]);return[...n]},[e]);return r.jsxs("div",{className:"db",children:[r.jsx("div",{className:"lbl",children:"Branch"}),r.jsxs("p",{className:"mono",style:{fontSize:13},children:[e.repo?`${e.repo}: `:"",e.branch??`squad/${e.id.toLowerCase()}`]}),e.worktree&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"The ticket's copy of the code"}),r.jsx("p",{className:"mono",style:{fontSize:12.5,overflowWrap:"anywhere"},children:e.worktree}),r.jsx(tc,{t:e})]}),r.jsx("div",{className:"lbl",children:"Files the squad touched"}),t.length?r.jsx("div",{className:"feed",children:t.map(n=>r.jsx("div",{className:"mono",style:{fontSize:12.5},children:n},n))}):r.jsx("p",{className:"note",children:"No files changed yet."}),r.jsx("div",{className:"lbl",children:"In the terminal"}),r.jsxs("div",{className:"pills",children:[r.jsx(Z,{text:`squad show ${e.id}`}),r.jsx(Z,{text:`squad watch ${e.id}`})]})]})}const BT=[{stage:"tickets",role:"analyst",who:"Analyst"},{stage:"specs",role:"architect",who:"Architect"},{stage:"implement",role:"builder",who:"Builder"},{stage:"test",role:"tester",who:"Tester"},{stage:"review",role:"reviewer",who:"Reviewer"},{stage:"release",role:"release",who:"Release"},{stage:"bugs",role:"triage",who:"Triage"}];function UT(){const e=ft(),t=xa({from:"/board"}),n=Ys({from:"/board"}),[s,i]=j.useState(null),[a,o]=j.useState(""),l=he({queryKey:["ticket-draft-current"],queryFn:()=>de("/api/v1/tickets/draft/current"),enabled:s!=="new",refetchInterval:v=>v.state.data?.draft?.status==="working"?2e3:3e4}),c={working:"drafting…",done:"draft ready",failed:"draft stopped",cancelled:""}[l.data?.draft?.status??"cancelled"],u=t.view??"all",h=v=>void n({search:y=>({...y,ticket:v})}),d=()=>void n({search:v=>({...v,ticket:void 0})}),f=e.data?.ready?e.data:null,p=j.useMemo(()=>{const v=f?.tickets??[],y=a.trim().toLowerCase();return v.filter(x=>u==="bugs"&&x.kind!=="bug"||u==="mine"&&!Zn(x,f?.meta.user?.name)?!1:!y||x.title.toLowerCase().includes(y)||x.id.toLowerCase().includes(y))},[f,a,u]);if(e.isLoading)return r.jsx("div",{className:"center",children:"Loading the board…"});if(!f)return r.jsx(VT,{});const m=["chat","ask","questions","spec","plan","change","stuck","proof","yours","release"],g=f.tickets.filter(v=>v.waiting||v.quiet?.kind==="stuck"||v.outdated?.length||on(v)).sort((v,y)=>(v.waiting?m.indexOf(v.waiting.kind):-1)-(y.waiting?m.indexOf(y.waiting.kind):-1));return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"top",children:[r.jsx("h1",{children:"Board"}),r.jsx("div",{className:"seg",role:"tablist",children:["all","mine","bugs"].map(v=>r.jsx("button",{className:u===v?"on":"",onClick:()=>void n({search:y=>({...y,view:v==="all"?void 0:v})}),children:v==="all"?"All tickets":v==="mine"?"Mine":"Bugs"},v))}),r.jsx("span",{className:"grow"}),r.jsxs("label",{className:"search",children:[r.jsx(Kr,{size:15}),r.jsx("input",{value:a,onChange:v=>o(v.target.value),placeholder:"Search tickets","aria-label":"Search tickets"})]}),r.jsx(WT,{onPull:()=>i("pull")}),r.jsxs("button",{className:"btn pri",onClick:()=>i("new"),children:[r.jsx(Yt,{size:15})," New ticket",c&&r.jsx("span",{className:"btn-tag",children:c})]})]}),r.jsxs("section",{className:"waiting","aria-label":"Waiting for you",children:[r.jsxs("div",{className:"wh",children:[r.jsxs("h2",{children:["Waiting for you ",g.length>0&&r.jsx("span",{className:"count",children:g.length})]}),r.jsx("p",{children:g.length?"Everything else is handled by the squad.":""}),r.jsx("span",{className:"grow"}),g.length>3&&r.jsxs(Pe,{to:"/inbox",className:"btn sm",children:["See all ",g.length]}),r.jsx(Z,{text:"squad inbox"})]}),f.meta.engine==="live"&&f.meta.scan&&f.meta.scan.status!=="done"?r.jsx(HT,{meta:f.meta}):f.meta.engine==="live"&&f.tickets.length===0?r.jsxs("div",{className:"calmlane",children:[r.jsx("span",{className:"glyph",children:r.jsx(Yt,{size:14,strokeWidth:2.5})}),r.jsxs("span",{children:[r.jsx("b",{children:"Start with your first ticket."})," Write what you want in plain words. The squad asks what it needs to know."]}),r.jsx("span",{className:"grow",style:{flex:1}}),r.jsxs("button",{className:"btn pri sm",onClick:()=>i("new"),children:[r.jsx(Yt,{size:14})," New ticket"]})]}):g.length===0?r.jsxs("div",{className:"calmlane",children:[r.jsx("span",{className:"glyph",children:r.jsx(J,{size:14,strokeWidth:2.5})}),r.jsxs("span",{children:[r.jsx("b",{children:"Nothing needs you right now."})," The squad is working. New questions and approvals show up here."]})]}):r.jsx("div",{className:"wcards",children:g.slice(0,3).map(v=>r.jsxs("button",{className:"wcard",onClick:()=>h(v.id),children:[r.jsxs("div",{className:"grow",children:[r.jsxs("div",{className:"meta",children:[r.jsx("span",{className:"id",children:v.id}),r.jsx("span",{children:cs[v.stage]})]}),r.jsx("h3",{children:v.title}),r.jsx("p",{children:v.waiting?.summary??(on(v)?`Change ${Sa(v).id} to the spec waits for you`:v.outdated?.length?ep(v):"Looks stuck. Check what it is waiting on")})]}),r.jsx("span",{className:"btn sm pri",children:v.waiting?fl(v):on(v)?"Check the change":"Check it"})]},v.id))})]}),r.jsx("div",{className:"board",children:BT.map(v=>{const y=p.filter(x=>x.stage===v.stage);return r.jsxs("section",{className:"lane","aria-label":cs[v.stage],children:[r.jsxs("div",{className:"lh",children:[r.jsx(Qr,{role:v.role}),r.jsxs("span",{className:"t",children:[r.jsx("b",{children:cs[v.stage]}),r.jsx("small",{children:v.who})]}),r.jsx("span",{className:"n",children:y.length})]}),y.map(x=>r.jsx(qT,{t:x,selected:t.ticket===x.id,onOpen:()=>h(x.id)},x.id)),y.length===0&&r.jsx("div",{className:"empty-lane",children:"Nothing here"})]},v.stage)})}),r.jsxs("div",{className:"foot",children:[r.jsxs("span",{children:["Last 30 days ",r.jsxs("b",{children:[f.stats.released30," tickets released"]})]}),r.jsxs("span",{children:[r.jsx("b",{children:f.stats.bugs30})," ",f.stats.bugs30===1?"bug":"bugs"," found after release"]}),r.jsxs("span",{children:[r.jsx("b",{children:f.stats.open})," open tickets"]}),r.jsx(dT,{}),r.jsx("span",{className:"grow"}),r.jsx("button",{className:"btn sm quiet",onClick:()=>i("bug"),children:"Report a bug"})]}),t.ticket&&r.jsx(xT,{id:t.ticket,onClose:d}),s==="new"&&r.jsx(gE,{onClose:()=>i(null),onCreated:v=>h(v.id)}),s==="pull"&&r.jsx(jE,{onClose:()=>i(null),onCreated:v=>h(v.id)}),s==="bug"&&r.jsx(Mp,{onClose:()=>i(null)})]})}function qT({t:e,selected:t,onOpen:n}){const s=!!e.waiting||e.quiet?.kind==="stuck"||on(e),i=nc();return r.jsxs("button",{className:`card ${s?"you":""} ${e.kind==="bug"?"bug":""} ${t?"sel":""}`,onClick:n,children:[r.jsxs("div",{className:"row1",children:[r.jsx("span",{className:"id",children:e.id}),e.track==="express"&&r.jsx("span",{className:"prio express",children:"Express"}),s?r.jsx("span",{className:"youtag",children:"You"}):e.kind==="bug"?r.jsx("span",{className:"prio",children:"Bug"}):e.priority==="high"?r.jsx("span",{className:"prio",children:"High"}):null,i&&!Zn(e,i)&&r.jsx("span",{className:"prio owner",title:"Their squad works on it",children:Ra(e)})]}),r.jsx("h4",{children:e.title}),r.jsxs("div",{className:"st",children:[e.live&&!s?r.jsx("span",{className:"live"}):e.stage==="release"?r.jsx(J,{size:13,strokeWidth:2.5}):null,r.jsx("span",{children:e.quiet?e.quiet.kind==="stuck"?`Looks stuck: ${e.quiet.command??"no progress"}`:`Taking long: ${e.quiet.command??e.status}`:e.status})]}),typeof e.progress=="number"&&!s&&r.jsx("div",{className:"bar",children:r.jsx("i",{style:{width:`${e.progress}%`}})})]})}function WT({onPull:e}){const n=he({queryKey:["tracker"],queryFn:()=>de("/api/v1/tracker"),refetchInterval:6e4}).data;return n?n.type==="none"?r.jsxs(Pe,{to:"/settings",className:"btn",children:[r.jsx(Pn,{size:15})," Connect a tracker"]}):r.jsxs("button",{className:"btn",onClick:e,children:[r.jsx(Pn,{size:15})," Pull from ",n.label??"the tracker"]}):null}function HT({meta:e}){const t=Y(),n=e.scan,s=n.status==="failed",i=e.tools.find(o=>o.ready),a=[{label:"Project files and board",state:"done",note:".squad/ in this folder"},i?{label:`${i.name} is ready`,state:"done",note:"The squad works with it"}:{label:"An AI tool",state:"fail",note:"Install Claude Code and sign in once, then press Try again"},{label:"The Architect reads the project",state:s?"fail":n.status==="running"?"now":"todo",note:s?n.error:n.status==="running"?n.now??"Starting…":"Starts in a moment"},{label:"Ready for your first ticket",state:"todo",note:"Write it, or pull it from your tracker"}];return r.jsxs("div",{className:"setup",children:[r.jsxs("div",{className:"setup-head",children:[r.jsx("b",{children:s?"The Architect could not read the project.":"Setting up your project"}),r.jsx("span",{children:s?"Fix what the step below says, then try again.":"The Architect maps the project and finds how to test and run it. This takes a few minutes."}),s&&r.jsx("button",{className:"btn sm",onClick:()=>t.mutate({path:"/api/v1/scan",done:"Reading the project again"}),children:"Try again"})]}),r.jsx("ol",{className:"setup-steps",children:a.map(o=>r.jsxs("li",{className:o.state,children:[r.jsx("span",{className:"mark",children:o.state==="done"?r.jsx(J,{size:12,strokeWidth:3}):o.state==="fail"?"!":o.state==="now"?r.jsx("span",{className:"live"}):null}),r.jsxs("span",{className:"txt",children:[r.jsx("b",{children:o.label}),o.note&&r.jsx("small",{title:o.note,children:o.note})]})]},o.label))}),!s&&r.jsx("div",{className:"setup-bar","aria-hidden":!0,children:r.jsx("i",{})})]})}function VT(){return r.jsx("div",{className:"center",children:r.jsxs("div",{children:[r.jsx("h2",{children:"No board yet"}),r.jsx("p",{children:"Run this in the terminal to open a sample board where the squad works on its own:"}),r.jsx("p",{style:{marginTop:12},children:r.jsx(Z,{text:"squad demo"})})]})})}function KT(){const{id:e}=Kh({from:"/tickets/$id/proof"}),t=ba(e),[n,s]=j.useState(0),[i,a]=j.useState(null),o=t.data;if(!o)return r.jsx("div",{className:"center",children:t.isError?`No ticket ${e}.`:"Loading…"});const l=o.proof??[],c=l[Math.min(n,l.length-1)],u=o.waiting?.kind==="proof",h=o.gates,d=l.flatMap(p=>[{src:Yn(`/api/v1/proof/${p.before}`),caption:`${p.criterion} · ${p.beforeLabel}`},{src:Yn(`/api/v1/proof/${p.after}`),caption:`${p.criterion} · ${p.afterLabel}`}]),f=Math.min(n,l.length-1)*2;return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"top",children:r.jsxs("span",{className:"crumbs",children:[r.jsx(Pe,{to:"/inbox",children:"Waiting for you"})," /",r.jsxs(Pe,{to:"/board",search:{ticket:o.id},children:[o.id," ",o.title]})," ","/ ",r.jsx("b",{children:"Proof"})]})}),r.jsxs("div",{className:"gatebar",children:[r.jsx(cu,{state:h?.checks,text:h?.checks==="skipped"?"Checks failed, you continued":h?.checksText??"All checks pass"}),r.jsx(cu,{state:h?.review,text:h?.review==="skipped"?"Review notes open, you continued":`Review approved${h?.reviewBy?` by ${h.reviewBy}`:""}`}),r.jsx(cu,{state:h?.proof,text:h?.proof==="skipped"?"No screenshots, you continued":"Proof made"}),r.jsx("span",{style:{marginLeft:6},children:"Nothing ships without these three."})]}),r.jsxs("div",{className:"split",children:[r.jsxs("div",{className:"critlist",children:[r.jsxs("div",{className:"lbl",style:{marginTop:0},children:["Done when · ",l.length]}),l.map((p,m)=>r.jsxs("button",{className:`crit ${m===n?"on":""}`,onClick:()=>s(m),children:[r.jsx(J,{size:15,strokeWidth:2.5}),r.jsx("span",{children:p.criterion})]},p.criterion)),l.length===0&&r.jsx("p",{className:"note",children:h?.proof==="skipped"||(o.work?.screens??0)>0?"No screenshots were taken for this ticket. See the activity for why.":"No screens change in this ticket, so the passing checks are the proof."})]}),r.jsx("div",{className:"stage",children:c?r.jsxs(r.Fragment,{children:[r.jsx("h3",{children:c.criterion}),r.jsxs("div",{className:"ba",children:[r.jsxs("div",{children:[r.jsx("div",{className:"cap",children:r.jsx("span",{children:c.beforeLabel})}),r.jsx("button",{className:"zoom",onClick:()=>a(f),"aria-label":`Open ${c.beforeLabel} full size`,children:r.jsx("img",{src:Yn(`/api/v1/proof/${c.before}`),alt:`${c.criterion}, ${c.beforeLabel}`})})]}),r.jsxs("div",{children:[r.jsx("div",{className:"cap",children:r.jsx("span",{children:c.afterLabel})}),r.jsx("button",{className:"zoom",onClick:()=>a(f+1),"aria-label":`Open ${c.afterLabel} full size`,children:r.jsx("img",{src:Yn(`/api/v1/proof/${c.after}`),alt:`${c.criterion}, ${c.afterLabel}`})})]})]}),c.note&&r.jsx("p",{className:"note",children:c.note})]}):r.jsx("p",{className:"note",children:"Nothing to compare."})})]}),i!==null&&r.jsx(Zr,{pictures:d,start:i,onClose:()=>a(null)}),u?r.jsx(x3,{t:o,sticky:!0}):r.jsx("div",{className:"stickybar",children:r.jsx("span",{className:"note",children:o.status})})]})}function cu({state:e,text:t}){return r.jsxs("span",{className:`pill ${e==="pass"?"ok":e==="skipped"?"skip":"wait"}`,children:[e==="pass"&&r.jsx(J,{size:13,strokeWidth:2.5}),t]})}function QT(){const e=w8(),t=ft(),[n,s]=j.useState(null),[i,a]=j.useState(null),o=e.data??[],l=o.find(u=>u.version===n)??o.find(u=>u.status==="draft")??o[0],c=t.data?.ready?t.data.meta.engine==="demo":!1;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"top",children:[r.jsx("h1",{children:"Releases"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:"squad release"})]}),r.jsxs("div",{className:"split",children:[r.jsx("div",{className:"listcol",children:o.map(u=>r.jsxs("button",{className:`litem ${l?.version===u.version?u.status==="draft"?"on":"on plain":""}`,onClick:()=>s(u.version),children:[r.jsxs("b",{children:[u.version,u.status==="draft"?r.jsx("span",{className:"youtag",children:u.items.length?"Ready":"Empty"}):u.bugs?.length?r.jsxs("span",{className:"prio",children:[u.bugs.length," ",u.bugs.length===1?"bug":"bugs"]}):null]}),u.status==="draft"?"Next release":u.unpushed?.length?"Not pushed yet":Zs(u.date)," · ",u.items.length," tickets"]},u.version))}),l?r.jsx(GT,{r:l,onReleased:a}):r.jsx("div",{className:"center",children:"No releases yet."})]}),i&&r.jsx(SE,{release:i,demo:c,onClose:()=>a(null)})]})}function GT({r:e,onReleased:t}){const n=Y(),[s,i]=j.useState(!1),[a,o]=j.useState(e.notes),[l,c]=j.useState(!1),[u,h]=j.useState(!1);j.useEffect(()=>{s||o(e.notes)},[e.notes,s]);const d=e.status==="draft",f=e.unpushed??[],p=e.version.endsWith(".0")?"New features, nothing breaks for users.":"Fixes only, nothing new to learn.";return r.jsxs("div",{className:"detail",children:[r.jsx("h2",{style:{fontSize:24,fontStretch:"88%"},children:d?`Release ${e.version}`:e.version}),r.jsx("p",{className:"note",style:{marginTop:2},children:d?"The squad prepared this release. Read it, edit the notes if you like, then release.":`Released ${Zs(e.date)}`}),f.length>0&&r.jsxs("div",{className:"box",style:{marginTop:10,color:"var(--you-ink)"},children:[r.jsx("b",{children:"Not pushed yet."})," The release is made on this computer, but it did not reach the remote, so its tickets stay open.",f.map(m=>r.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:6},children:[m.repo==="."?"project":m.repo,": ",m.base," → ",m.remote,": ",m.error]},m.repo)),r.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:10},children:[r.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/releases/${e.version}/push`},{onSuccess:m=>m.unpushed?.length?void 0:t(m)}),children:[r.jsx(bi,{size:15})," Push again"]}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad release ${e.version} --push-again`})]})]}),r.jsx("div",{className:"lbl",children:"What's inside"}),e.items.map(m=>r.jsxs("div",{className:"trow",children:[r.jsx("span",{className:"mono",children:m.id}),r.jsx("b",{children:m.title}),m.gates?r.jsxs("span",{className:"pill ok",children:[r.jsx(J,{size:13,strokeWidth:2.5})," Checks, review, proof"]}):r.jsx("span",{})]},m.id)),e.items.length===0&&r.jsx("p",{className:"note",children:"No tickets yet. Tickets join after you check their proof."}),!d&&e.bugs&&e.bugs.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Bugs found after this release"}),e.bugs.map(m=>r.jsxs("div",{className:"trow",children:[r.jsx("span",{className:"mono",children:m}),r.jsx(Pe,{to:"/board",search:{ticket:m},children:r.jsx("b",{children:"Open the bug"})}),r.jsx("span",{})]},m))]}),r.jsxs("div",{className:"grid2",children:[r.jsxs("div",{children:[r.jsx("div",{className:"lbl",children:"Version"}),r.jsxs("div",{className:"ver",children:[r.jsx("span",{className:"from",children:e.from.replace(/^v/,"")}),r.jsx(Vk,{size:20}),r.jsx("span",{children:e.version.replace(/^v/,"")})]}),r.jsx("p",{className:"note",style:{marginTop:4},children:p}),r.jsx("div",{className:"lbl",children:d||!e.log?"Also":"What the release did"}),!d&&e.log?e.log.map(m=>r.jsxs("div",{className:"checkrow",style:m.ok?void 0:{color:"var(--you-ink)"},children:[r.jsx("span",{className:`cbx ${m.ok?"on":""}`,children:m.ok?r.jsx(J,{size:11,strokeWidth:3}):"!"}),m.text]},m.text)):[["changelog","Update the changelog"],["tag",`Tag ${e.version} in git`],["pipeline","Run the pipeline"],["whatsapp","Draft a WhatsApp note for my manager"]].map(([m,g])=>r.jsxs("div",{className:"checkrow",children:[r.jsx("span",{className:`cbx ${e.addons[m]?"on":""}`,children:e.addons[m]&&r.jsx(J,{size:11,strokeWidth:3})}),g]},m))]}),r.jsxs("div",{children:[r.jsxs("div",{className:"lbl",children:["Release notes",d&&", written by the squad",r.jsx("span",{className:"grow",style:{flex:1}}),d&&!s&&r.jsxs("button",{className:"btn sm",onClick:()=>i(!0),children:[r.jsx(Yh,{size:13})," Edit"]})]}),s?r.jsxs(r.Fragment,{children:[r.jsx("textarea",{className:"textarea mono",style:{minHeight:180,fontSize:13},value:a,onChange:m=>o(m.target.value)}),r.jsxs("div",{style:{display:"flex",gap:8,marginTop:8},children:[r.jsx("button",{className:"btn sm pri",onClick:()=>n.mutate({path:`/api/v1/releases/${e.version}/notes`,method:"PUT",body:{notes:a},done:"Notes saved"},{onSuccess:()=>i(!1)}),children:"Save notes"}),r.jsx("button",{className:"btn sm",onClick:()=>i(!1),children:"Cancel"})]})]}):r.jsx(E8,{notes:e.notes})]})]}),r.jsx("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:26},children:d?r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn pri",disabled:e.items.length===0,onClick:()=>c(!0),children:[r.jsx(bi,{size:15})," Release ",e.version]}),r.jsx("span",{className:"note",children:"You'll be asked once to confirm."})]}):r.jsxs("button",{className:"btn",onClick:()=>h(!0),children:["Report a bug in ",e.version]})}),l&&r.jsxs(it,{title:`Release ${e.version}?`,onClose:()=>c(!1),icon:r.jsx("span",{className:"glyph",children:r.jsx(bi,{size:15})}),footer:r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/releases/${e.version}/release`},{onSuccess:m=>{c(!1),t(m)}}),children:[r.jsx(bi,{size:15})," Yes, release it"]}),r.jsx("button",{className:"btn",onClick:()=>c(!1),children:"Not yet"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad release ${e.version}`})]}),children:[r.jsxs("p",{children:[e.items.length," tickets go live: ",e.items.map(m=>m.title).join(", "),"."]}),e.targets.length>0&&r.jsxs("div",{className:"box",style:{marginBottom:6},children:[r.jsx("b",{children:"This release changes these branches:"}),e.targets.map(m=>r.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:6},children:[m.repo==="."?"project":m.repo,": ",m.branch," ",m.remote?`→ pushed to ${m.remote}`:"(no remote, stays on this Mac)"]},m.repo)),r.jsx("p",{className:"note",style:{marginTop:6},children:"Change the branch or remote in Settings first if this is not right."})]})]}),u&&r.jsx(Mp,{foundIn:e.version,onClose:()=>h(!1)})]})}function YT(){const[e,t]=j.useState(void 0),n=he({queryKey:["backlog",e??""],queryFn:()=>de(`/api/v1/backlog${e?`?sprint=${encodeURIComponent(e)}`:""}`),refetchInterval:15e3}),s=n.data,i=e??s?.sprint,a=s?.sprints.find(o=>o.path===i)?.name;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"top",children:[r.jsx("h1",{children:"Backlog"}),s?.connected&&s.sprints.length>0&&r.jsxs("select",{className:"input",style:{width:"auto",marginLeft:12},value:i??"all",onChange:o=>t(o.target.value),"aria-label":"Sprint",children:[s.sprints.map(o=>r.jsxs("option",{value:o.path,children:[o.name,o.current?" (now)":""]},o.path)),r.jsx("option",{value:"all",children:"Everything open"})]}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:a?`squad backlog --sprint "${a}"`:"squad backlog"})]}),r.jsx("div",{className:"scroll",children:r.jsx("div",{className:"page",children:n.isLoading?r.jsx("p",{className:"note",children:"Reading the backlog from Azure…"}):s?.connected?s.error?r.jsx("p",{className:"note",style:{color:"var(--bug)"},children:s.error}):s.items.length===0?r.jsxs("p",{className:"note",children:["Nothing open in ",a??"this sprint","."]}):r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"note",style:{marginBottom:12},children:[s.items.length," open ",s.items.length===1?"item":"items"," in ",a??"the backlog",", in backlog order. Start one and the squad picks it up; Azure follows along."]}),r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{style:{width:80},children:"ID"}),r.jsx("th",{children:"Title"}),r.jsx("th",{style:{width:70},children:"Points"}),r.jsx("th",{style:{width:100},children:"On Azure"}),r.jsx("th",{style:{width:260},children:"squad-kit"})]})}),r.jsx("tbody",{children:s.items.map(o=>r.jsx(ZT,{w:o},o.id))})]})]}):r.jsxs("div",{className:"calm",children:[r.jsx("span",{className:"ring",children:r.jsx(h8,{size:18})}),r.jsxs("div",{children:[r.jsx("b",{children:"Connect Azure DevOps"}),r.jsxs("span",{children:[s?.error??"Add your Azure organization, project and token, and your stories and bugs show up here."," ",r.jsx(Pe,{to:"/settings",style:{fontWeight:600},children:"Open Settings"})]})]})]})})})]})}function ZT({w:e}){const t=Y();return r.jsxs("tr",{children:[r.jsx("td",{className:"mono",children:r.jsxs("a",{href:e.url,target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",gap:4},children:[e.id," ",r.jsx(ls,{size:11})]})}),r.jsx("td",{children:r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[e.type==="Bug"&&r.jsxs("span",{className:"pill bug",style:{padding:"2px 8px"},children:[r.jsx(Tn,{size:12})," Bug"]}),r.jsx("span",{style:{fontWeight:600},children:e.title})]})}),r.jsx("td",{children:e.points??""}),r.jsx("td",{children:e.state}),r.jsx("td",{children:e.ticket?r.jsxs(Pe,{to:"/board",search:{ticket:e.ticket.id},style:{color:"var(--muted)"},children:[r.jsx("b",{className:"mono",style:{color:"var(--text)"},children:e.ticket.id})," ",e.ticket.stage==="done"?"Released":cs[e.ticket.stage]]}):r.jsxs("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/backlog/${e.id}/start`,done:`${e.ref} is on the board. The Analyst is reading it.`}),children:[r.jsx(Zh,{size:13})," Start"]})})]})}const sc=["Structure","Data","Security","Interface","Rules"],XT={nextdotjs:{hex:"000000",path:"M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"},react:{hex:"61DAFB",path:"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"},typescript:{hex:"3178C6",path:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},javascript:{hex:"F7DF1E",path:"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z"},prisma:{hex:"2D3748",path:"M21.8068 18.2848L13.5528.7565c-.207-.4382-.639-.7273-1.1286-.7541-.5023-.0293-.9523.213-1.2062.6253L2.266 15.1271c-.2773.4518-.2718 1.0091.0158 1.4555l4.3759 6.7786c.2608.4046.7127.6388 1.1823.6388.1332 0 .267-.0188.3987-.0577l12.7019-3.7568c.3891-.1151.7072-.3904.8737-.7553s.1633-.7828-.0075-1.1454zm-1.8481.7519L9.1814 22.2242c-.3292.0975-.6448-.1873-.5756-.5194l3.8501-18.4386c.072-.3448.5486-.3996.699-.0803l7.1288 15.138c.1344.2856-.019.6224-.325.7128z"},sqlite:{hex:"003B57",path:"M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71 8.71 0 0 0-.547.535c-2.109 2.237-4.066 6.38-4.674 9.544.237.48.422 1.093.544 1.561a13.044 13.044 0 0 1 .164.703s-.019-.071-.096-.296l-.05-.146a1.689 1.689 0 0 0-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376 1.176.484.884.778 2.4.778 2.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304 1.346-.226 1.478.152.256.296.698.422 1.186.286 1.1.485 2.44.485 2.44l.017.224a22.41 22.41 0 0 0 .056 2.748c.095 1.146.273 2.13.5 2.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29 1.661-8.304 1.723-4.55 4.113-8.201 6.3-9.945-1.993 1.8-4.692 7.63-5.5 9.788-.904 2.416-1.545 4.684-1.931 6.857.666-2.037 2.821-2.912 2.821-2.912s1.057-1.304 2.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184 3.613-1.72C21.695 7.9 24.195 2.767 21.678.521m-18.573.543A1.842 1.842 0 0 0 1.27 2.9v16.608a1.84 1.84 0 0 0 1.835 1.834h9.418a22.953 22.953 0 0 1-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01 27.01 0 0 0-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432 0-.12.015-.245.037-.386a9.98 9.98 0 0 1 .234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8 32.8 0 0 1 .382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28 2.587-7.443 4.8-9.791.066-.069.133-.128.198-.194Z"},vitest:{hex:"6E9F18",path:"M13.74024 1.05293a.49504.49504 0 0 0-.1569.02512.49338.49338 0 0 0-.25056.1876L7.59513 9.56159a.4895.4895 0 0 0-.08373.22327.48846.48846 0 0 0 .03163.23629.4893.4893 0 0 0 .13985.19319.4927.4927 0 0 0 .2149.10481l3.70685.78609-.22947 4.58007a.48834.48834 0 0 0 .08466.30017.49205.49205 0 0 0 .24931.18854c.10157.03398.21174.03444.3135.00064a.49387.49387 0 0 0 .25056-.18761l5.73735-8.29594a.4884.4884 0 0 0 .08404-.22327c.009-.08015-.0016-.16137-.03163-.23629a.48835.48835 0 0 0-.13985-.19319.49318.49318 0 0 0-.2149-.1048l-3.70686-.7861.22947-4.58008a.48802.48802 0 0 0-.08466-.30017.4913.4913 0 0 0-.24931-.18853.49439.49439 0 0 0-.1566-.02574zM1.15697 9.78795c-.30647.0012-.60009.12378-.81679.34048a1.16107 1.16107 0 0 0-.34017.81648 1.162 1.162 0 0 0 .33366.81957l10.84241 10.8421a1.15762 1.15762 0 0 0 .37677.25211 1.1583 1.1583 0 0 0 .44467.08838c.00084 0 .0016-.00031.0025-.00031.00073 0 .0014.00031.0022.00031a1.15827 1.15827 0 0 0 .44467-.08838 1.15731 1.15731 0 0 0 .37677-.2521l10.84236-10.8421a1.16272 1.16272 0 0 0 .33397-.81958c-.0013-.30647-.12376-.59976-.34048-.81648a1.1616 1.1616 0 0 0-.81679-.34048 1.16114 1.16114 0 0 0-.81926.33366l-5.4012 5.4009c-.0078.0074-.01718.01255-.02482.02015L12 20.14011l-4.59776-4.59745c-.0074-.0074-.01659-.01238-.02419-.01954l-5.4015-5.40151a1.162 1.162 0 0 0-.81958-.33366Z"},eslint:{hex:"4B32C3",path:"M7.257 9.132L11.816 6.5a.369.369 0 0 1 .368 0l4.559 2.632a.369.369 0 0 1 .184.32v5.263a.37.37 0 0 1-.184.319l-4.559 2.632a.369.369 0 0 1-.368 0l-4.559-2.632a.369.369 0 0 1-.184-.32V9.452a.37.37 0 0 1 .184-.32M23.852 11.53l-5.446-9.475c-.198-.343-.564-.596-.96-.596H6.555c-.396 0-.762.253-.96.596L.149 11.509a1.127 1.127 0 0 0 0 1.117l5.447 9.398c.197.342.563.517.959.517h10.893c.395 0 .76-.17.959-.512l5.446-9.413a1.069 1.069 0 0 0 0-1.086m-4.51 4.556a.4.4 0 0 1-.204.338L12.2 20.426a.395.395 0 0 1-.392 0l-6.943-4.002a.4.4 0 0 1-.205-.338V8.08c0-.14.083-.269.204-.338L11.8 3.74c.12-.07.272-.07.392 0l6.943 4.003a.4.4 0 0 1 .206.338z"},primereact:{hex:"03C4E8",path:"M12.01 0c-1.212 0-2.297.62-2.903 1.66l-1.52 2.608H4.303A3.287 3.287 0 0 0 1.43 5.911a3.226 3.226 0 0 0 0 3.285l1.642 2.819-1.646 2.825a3.202 3.202 0 0 0 0 3.261 3.265 3.265 0 0 0 2.851 1.631h2.925l.865.856L9.09 22.34A3.322 3.322 0 0 0 11.991 24c1.211 0 2.296-.62 2.902-1.66l.816-1.4 1.22-1.208h2.77a3.287 3.287 0 0 0 2.87-1.643c.6-1.028.6-2.256 0-3.285l-1.642-2.82 1.646-2.824a3.202 3.202 0 0 0 0-3.261 3.265 3.265 0 0 0-2.851-1.631H16.43L14.91 1.66A3.322 3.322 0 0 0 12.01 0Zm0 .719c.948 0 1.798.486 2.273 1.3l1.31 2.249H8.425l1.31-2.248A2.603 2.603 0 0 1 12.01.719Zm.33 4.265v7.74h.962l5.904-2.174.014-.057.87 1.492-1.33 2.282.171-3.173-1.51.543-1.51 1.494-1.237-.27.962 1.357v4.212l1.452-1.296-.708 1.216v.001l-.744.622v.654l-.412.708V14.49l-1.098-1.63-.687.407h-2.746l-.687-.407-1.098 1.63v6.101l-.412-.706v-.912l-1.036-.867-.729-1.25 1.765 1.574v-4.212l.961-1.358-1.236.271-1.51-1.494-1.511-.543.188 3.455-1.477-2.534.942-1.617.122-.208.088.36 5.904 2.174h.824V4.985Zm1.512 0h.412l.96 2.17 1.935-.2.237.406-2.452.192zm-3.985.001h.412L9.187 7.552l-2.556-.205.072-.124.001.001.163-.28 2.04.21Zm-5.565.001h2.867L5.831 7.282l-1.592-.127.49 2.018-1.237 2.124-1.433-2.46a2.52 2.52 0 0 1 0-2.567 2.568 2.568 0 0 1 2.243-1.284Zm12.547 0h2.873c.928 0 1.759.476 2.223 1.272a2.497 2.497 0 0 1 0 2.543l-1.437 2.466-1.042-1.789.563-2.323-1.833.143Zm3.659 7.718 1.433 2.46a2.52 2.52 0 0 1 0 2.566 2.567 2.567 0 0 1-2.243 1.283h-2.277V18zm-17.016.03 3.22 5.525v.754H4.277a2.545 2.545 0 0 1-2.223-1.27 2.497 2.497 0 0 1 0-2.544z"},tailwindcss:{hex:"06B6D4",path:"M12.001,4.8c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 C13.666,10.618,15.027,12,18.001,12c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C16.337,6.182,14.976,4.8,12.001,4.8z M6.001,12c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 c1.177,1.194,2.538,2.576,5.512,2.576c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C10.337,13.382,8.976,12,6.001,12z"},nodedotjs:{hex:"5FA04E",path:"M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"},postgresql:{hex:"4169E1",path:"M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.4302-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698zM2.371 11.8765c-.7435-2.4358-1.1779-4.8851-1.2123-5.5719-.1086-2.1714.4171-3.6829 1.5623-4.4927 1.8367-1.2986 4.8398-.5408 6.108-.13-.0032.0032-.0066.0061-.0098.0094-2.0238 2.044-1.9758 5.536-1.9708 5.7495-.0002.0823.0066.1989.0162.3593.0348.5873.0996 1.6804-.0735 2.9184-.1609 1.1504.1937 2.2764.9728 3.0892.0806.0841.1648.1631.2518.2374-.3468.3714-1.1004 1.1926-1.9025 2.1576-.5677.6825-.9597.5517-1.0886.5087-.3919-.1307-.813-.5871-1.2381-1.3223-.4796-.839-.9635-2.0317-1.4155-3.5126zm6.0072 5.0871c-.1711-.0428-.3271-.1132-.4322-.1772.0889-.0394.2374-.0902.4833-.1409 1.2833-.2641 1.4815-.4506 1.9143-1.0002.0992-.126.2116-.2687.3673-.4426a.3549.3549 0 0 0 .0737-.1298c.1708-.1513.2724-.1099.4369-.0417.156.0646.3078.26.3695.4752.0291.1016.0619.2945-.0452.4444-.9043 1.2658-2.2216 1.2494-3.1676 1.0128zm2.094-3.988-.0525.141c-.133.3566-.2567.6881-.3334 1.003-.6674-.0021-1.3168-.2872-1.8105-.8024-.6279-.6551-.9131-1.5664-.7825-2.5004.1828-1.3079.1153-2.4468.079-3.0586-.005-.0857-.0095-.1607-.0122-.2199.2957-.2621 1.6659-.9962 2.6429-.7724.4459.1022.7176.4057.8305.928.5846 2.7038.0774 3.8307-.3302 4.7363-.084.1866-.1633.3629-.2311.5454zm7.3637 4.5725c-.0169.1768-.0358.376-.0618.5959l-.146.4383a.3547.3547 0 0 0-.0182.1077c-.0059.4747-.054.6489-.115.8693-.0634.2292-.1353.4891-.1794 1.0575-.11 1.4143-.8782 2.2267-2.4172 2.5565-1.5155.3251-1.7843-.4968-2.0212-1.2217a6.5824 6.5824 0 0 0-.0769-.2266c-.2154-.5858-.1911-1.4119-.1574-2.5551.0165-.5612-.0249-1.9013-.3302-2.6462.0044-.2932.0106-.5909.019-.8918a.3529.3529 0 0 0-.0153-.1126 1.4927 1.4927 0 0 0-.0439-.208c-.1226-.4283-.4213-.7866-.7797-.9351-.1424-.059-.4038-.1672-.7178-.0869.067-.276.1831-.5875.309-.9249l.0529-.142c.0595-.16.134-.3257.213-.5012.4265-.9476 1.0106-2.2453.3766-5.1772-.2374-1.0981-1.0304-1.6343-2.2324-1.5098-.7207.0746-1.3799.3654-1.7088.5321a5.6716 5.6716 0 0 0-.1958.1041c.0918-1.1064.4386-3.1741 1.7357-4.4823a4.0306 4.0306 0 0 1 .3033-.276.3532.3532 0 0 0 .1447-.0644c.7524-.5706 1.6945-.8506 2.802-.8325.4091.0067.8017.0339 1.1742.081 1.939.3544 3.2439 1.4468 4.0359 2.3827.8143.9623 1.2552 1.9315 1.4312 2.4543-1.3232-.1346-2.2234.1268-2.6797.779-.9926 1.4189.543 4.1729 1.2811 5.4964.1353.2426.2522.4522.2889.5413.2403.5825.5515.9713.7787 1.2552.0696.087.1372.1714.1885.245-.4008.1155-1.1208.3825-1.0552 1.717-.0123.1563-.0423.4469-.0834.8148-.0461.2077-.0702.4603-.0994.7662zm.8905-1.6211c-.0405-.8316.2691-.9185.5967-1.0105a2.8566 2.8566 0 0 0 .135-.0406 1.202 1.202 0 0 0 .1342.103c.5703.3765 1.5823.4213 3.0068.1344-.2016.1769-.5189.3994-.9533.6011-.4098.1903-1.0957.333-1.7473.3636-.7197.0336-1.0859-.0807-1.1721-.151zm.5695-9.2712c-.0059.3508-.0542.6692-.1054 1.0017-.055.3576-.112.7274-.1264 1.1762-.0142.4368.0404.8909.0932 1.3301.1066.887.216 1.8003-.2075 2.7014a3.5272 3.5272 0 0 1-.1876-.3856c-.0527-.1276-.1669-.3326-.3251-.6162-.6156-1.1041-2.0574-3.6896-1.3193-4.7446.3795-.5427 1.3408-.5661 2.1781-.463zm.2284 7.0137a12.3762 12.3762 0 0 0-.0853-.1074l-.0355-.0444c.7262-1.1995.5842-2.3862.4578-3.4385-.0519-.4318-.1009-.8396-.0885-1.2226.0129-.4061.0666-.7543.1185-1.0911.0639-.415.1288-.8443.1109-1.3505.0134-.0531.0188-.1158.0118-.1902-.0457-.4855-.5999-1.938-1.7294-3.253-.6076-.7073-1.4896-1.4972-2.6889-2.0395.5251-.1066 1.2328-.2035 2.0244-.1859 2.0515.0456 3.6746.8135 4.8242 2.2824a.908.908 0 0 1 .0667.1002c.7231 1.3556-.2762 6.2751-2.9867 10.5405zm-8.8166-6.1162c-.025.1794-.3089.4225-.6211.4225a.5821.5821 0 0 1-.0809-.0056c-.1873-.026-.3765-.144-.5059-.3156-.0458-.0605-.1203-.178-.1055-.2844.0055-.0401.0261-.0985.0925-.1488.1182-.0894.3518-.1226.6096-.0867.3163.0441.6426.1938.6113.4186zm7.9305-.4114c.0111.0792-.049.201-.1531.3102-.0683.0717-.212.1961-.4079.2232a.5456.5456 0 0 1-.075.0052c-.2935 0-.5414-.2344-.5607-.3717-.024-.1765.2641-.3106.5611-.352.297-.0414.6111.0088.6356.1851z"},vite:{hex:"646CFF",path:"m8.286 10.578.512-8.657a.306.306 0 0 1 .247-.282L17.377.006a.306.306 0 0 1 .353.385l-1.558 5.403a.306.306 0 0 0 .352.385l2.388-.46a.306.306 0 0 1 .332.438l-6.79 13.55-.123.19a.294.294 0 0 1-.252.14c-.177 0-.35-.152-.305-.369l1.095-5.301a.306.306 0 0 0-.388-.355l-1.433.435a.306.306 0 0 1-.389-.354l.69-3.375a.306.306 0 0 0-.37-.36l-2.32.536a.306.306 0 0 1-.374-.316zm14.976-7.926L17.284 3.74l-.544 1.887 2.077-.4a.8.8 0 0 1 .84.369.8.8 0 0 1 .034.783L12.9 19.93l-.013.025-.015.023-.122.19a.801.801 0 0 1-.672.37.826.826 0 0 1-.634-.302.8.8 0 0 1-.16-.67l1.029-4.981-1.12.34a.81.81 0 0 1-.86-.262.802.802 0 0 1-.165-.67l.63-3.08-2.027.468a.808.808 0 0 1-.768-.233.81.81 0 0 1-.217-.6l.389-6.57-7.44-1.33a.612.612 0 0 0-.64.906L11.58 23.691a.612.612 0 0 0 1.066-.004l11.26-20.135a.612.612 0 0 0-.644-.9z"},angular:{hex:"0F0F11",path:"M16.712 17.711H7.288l-1.204 2.916L12 24l5.916-3.373-1.204-2.916ZM14.692 0l7.832 16.855.814-12.856L14.692 0ZM9.308 0 .662 3.999l.814 12.856L9.308 0Zm-.405 13.93h6.198L12 6.396 8.903 13.93Z"},vuedotjs:{hex:"4FC08D",path:"M24,1.61H14.06L12,5.16,9.94,1.61H0L12,22.39ZM12,14.08,5.16,2.23H9.59L12,6.41l2.41-4.18h4.43Z"},dotnet:{hex:"512BD4",path:"M24 8.77h-2.468v7.565h-1.425V8.77h-2.462V7.53H24zm-6.852 7.565h-4.821V7.53h4.63v1.24h-3.205v2.494h2.953v1.234h-2.953v2.604h3.396zm-6.708 0H8.882L4.78 9.863a2.896 2.896 0 0 1-.258-.51h-.036c.032.189.048.592.048 1.21v5.772H3.157V7.53h1.659l3.965 6.32c.167.261.275.442.323.54h.024c-.04-.233-.06-.629-.06-1.185V7.529h1.372zm-8.703-.693a.868.829 0 0 1-.869.829.868.829 0 0 1-.868-.83.868.829 0 0 1 .868-.828.868.829 0 0 1 .869.829Z"},python:{hex:"3776AB",path:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"},jest:{hex:"C21325",path:"M22.251 11.82a3.117 3.117 0 0 0-2.328-3.01L22.911 0H8.104L11.1 8.838a3.116 3.116 0 0 0-2.244 2.988c0 1.043.52 1.967 1.313 2.536a8.279 8.279 0 0 1-1.084 1.244 8.14 8.14 0 0 1-2.55 1.647c-.834-.563-1.195-1.556-.869-2.446a3.11 3.11 0 0 0-.91-6.08 3.117 3.117 0 0 0-3.113 3.113c0 .848.347 1.626.903 2.182-.048.097-.097.195-.146.299-.465.959-.993 2.043-1.195 3.259-.403 2.432.257 4.384 1.849 5.489A5.093 5.093 0 0 0 5.999 24c1.827 0 3.682-.917 5.475-1.807 1.279-.632 2.599-1.292 3.898-1.612.48-.118.98-.187 1.508-.264 1.07-.153 2.175-.312 3.168-.89a4.482 4.482 0 0 0 2.182-3.091c.174-.994 0-1.994-.444-2.87.298-.48.465-1.042.465-1.647zm-1.355 0c0 .965-.785 1.75-1.75 1.75a1.753 1.753 0 0 1-1.085-3.126l.007-.007c.056-.042.118-.084.18-.125 0 0 .008 0 .008-.007.028-.014.055-.035.083-.05.007 0 .014-.006.021-.006.028-.014.063-.028.097-.042.035-.014.07-.027.098-.041.007 0 .013-.007.02-.007.028-.007.056-.021.084-.028.007 0 .02-.007.028-.007.034-.007.062-.014.097-.02h.007l.104-.022c.007 0 .02 0 .028-.007.028 0 .055-.007.083-.007h.035c.035 0 .07-.007.111-.007h.09c.028 0 .05 0 .077.007h.014c.055.007.111.014.167.028a1.766 1.766 0 0 1 1.396 1.723zM10.043 1.39h10.93l-2.509 7.4c-.104.02-.208.055-.312.09l-2.64-5.385-2.648 5.35c-.104-.034-.216-.055-.327-.076l-2.494-7.38zm4.968 9.825a3.083 3.083 0 0 0-.938-1.668l1.438-2.904 1.452 2.967c-.43.43-.743.98-.868 1.605H15.01zm-3.481-1.098c.034-.007.062-.014.097-.02h.02c.029-.008.056-.008.084-.015h.028c.028 0 .049-.007.076-.007h.271c.028 0 .049.007.07.007.014 0 .02 0 .035.007.027.007.048.007.076.014.007 0 .014 0 .028.007l.097.02h.007c.028.008.056.015.083.029.007 0 .014.007.028.007.021.007.049.014.07.027.007 0 .014.007.02.007.028.014.056.021.084.035h.007a.374.374 0 0 1 .09.049h.007c.028.014.056.034.084.048.007 0 .007.007.013.007.028.014.05.035.077.049l.007.007c.083.062.16.132.236.201l.007.007a1.747 1.747 0 0 1 .48 1.209 1.752 1.752 0 0 1-3.502 0 1.742 1.742 0 0 1 1.32-1.695zm-6.838-.049c.966 0 1.751.786 1.751 1.751s-.785 1.751-1.75 1.751-1.752-.785-1.752-1.75.786-1.752 1.751-1.752zm16.163 6.025a3.07 3.07 0 0 1-1.508 2.133c-.758.438-1.689.577-2.669.716a17.29 17.29 0 0 0-1.64.291c-1.445.355-2.834 1.05-4.182 1.717-1.724.854-3.35 1.66-4.857 1.66a3.645 3.645 0 0 1-2.154-.688c-1.529-1.056-1.453-3.036-1.272-4.12.167-1.015.632-1.966 1.077-2.877.028-.055.049-.104.077-.16.152.056.312.098.479.126-.264 1.473.486 2.994 1.946 3.745l.264.139.284-.104c1.216-.431 2.342-1.133 3.336-2.071a9.334 9.334 0 0 0 1.445-1.716c.16.027.32.034.48.034a3.117 3.117 0 0 0 3.008-2.327h1.167a3.109 3.109 0 0 0 3.01 2.327c.576 0 1.11-.16 1.57-.43.18.52.236 1.063.139 1.605z"},prettier:{hex:"F7B93E",path:"M8.571 23.429A.571.571 0 0 1 8 24H2.286a.571.571 0 0 1 0-1.143H8c.316 0 .571.256.571.572zM8 20.57H6.857a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zm-5.714 1.143H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM8 18.286H2.286a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zM16 16H5.714a.571.571 0 0 0 0 1.143H16A.571.571 0 0 0 16 16zM2.286 17.143h1.143a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm17.143-3.429H16a.571.571 0 0 0 0 1.143h3.429a.571.571 0 0 0 0-1.143zM9.143 14.857h4.571a.571.571 0 0 0 0-1.143H9.143a.571.571 0 0 0 0 1.143zm-6.857 0h4.571a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM20.57 11.43H11.43a.571.571 0 0 0 0 1.142h9.142a.571.571 0 0 0 0-1.142zM9.714 12a.571.571 0 0 0-.571-.571H5.714a.571.571 0 0 0 0 1.142h3.429A.571.571 0 0 0 9.714 12zm-7.428.571h1.143a.571.571 0 0 0 0-1.142H2.286a.571.571 0 0 0 0 1.142zm19.428-3.428H16a.571.571 0 0 0 0 1.143h5.714a.571.571 0 0 0 0-1.143zM2.286 10.286H8a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm13.143-2.857c0 .315.255.571.571.571h5.714a.571.571 0 0 0 0-1.143H16a.571.571 0 0 0-.571.572zm-8.572-.572a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143H6.857zM2.286 8H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm16.571-2.857c0 .315.256.571.572.571h1.142a.571.571 0 0 0 0-1.143H19.43a.571.571 0 0 0-.572.572zm-1.143 0a.571.571 0 0 0-.571-.572H12.57a.571.571 0 0 0 0 1.143h4.572a.571.571 0 0 0 .571-.571zm-15.428.571h8a.571.571 0 0 0 0-1.143h-8a.571.571 0 0 0 0 1.143zm5.143-2.857c0 .316.255.572.571.572h11.429a.571.571 0 0 0 0-1.143H8a.571.571 0 0 0-.571.571zm-5.143.572h3.428a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm0-2.286H16A.571.571 0 0 0 16 0H2.286a.571.571 0 0 0 0 1.143z"},express:{hex:"000000",path:"M24 18.588a1.529 1.529 0 01-1.895-.72l-3.45-4.771-.5-.667-4.003 5.444a1.466 1.466 0 01-1.802.708l5.158-6.92-4.798-6.251a1.595 1.595 0 011.9.666l3.576 4.83 3.596-4.81a1.435 1.435 0 011.788-.668L21.708 7.9l-2.522 3.283a.666.666 0 000 .994l4.804 6.412zM.002 11.576l.42-2.075c1.154-4.103 5.858-5.81 9.094-3.27 1.895 1.489 2.368 3.597 2.275 5.973H1.116C.943 16.447 4.005 19.009 7.92 17.7a4.078 4.078 0 002.582-2.876c.207-.666.548-.78 1.174-.588a5.417 5.417 0 01-2.589 3.957 6.272 6.272 0 01-7.306-.933 6.575 6.575 0 01-1.64-3.858c0-.235-.08-.455-.134-.666A88.33 88.33 0 010 11.577zm1.127-.286h9.654c-.06-3.076-2.001-5.258-4.59-5.278-2.882-.04-4.944 2.094-5.071 5.264z"},mongodb:{hex:"47A248",path:"M17.193 9.555c-1.264-5.58-4.252-7.414-4.573-8.115-.28-.394-.53-.954-.735-1.44-.036.495-.055.685-.523 1.184-.723.566-4.438 3.682-4.74 10.02-.282 5.912 4.27 9.435 4.888 9.884l.07.05A73.49 73.49 0 0111.91 24h.481c.114-1.032.284-2.056.51-3.07.417-.296.604-.463.85-.693a11.342 11.342 0 003.639-8.464c.01-.814-.103-1.662-.197-2.218zm-5.336 8.195s0-8.291.275-8.29c.213 0 .49 10.695.49 10.695-.381-.045-.765-1.76-.765-2.405z"},mysql:{hex:"4479A1",path:"M16.405 5.501c-.115 0-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77 18.695h-.927a50.854 50.854 0 00-.27-4.41h-.008l-1.41 4.41H2.45l-1.4-4.41h-.01a72.892 72.892 0 00-.195 4.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335 4.064h.008l1.347-4.064h1.095c.242 2.015.384 3.86.428 5.53zm4.017-4.08c-.378 2.045-.876 3.533-1.492 4.46-.482.716-1.01 1.073-1.583 1.073-.153 0-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268 0 .483-.075.647-.222.197-.18.295-.382.295-.605 0-.155-.077-.47-.23-.944L6.23 14.615h.91l.727 2.36c.164.536.233.91.205 1.123.4-1.064.678-2.227.835-3.483zm12.325 4.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253 0-1.83-.718-2.746-2.155-2.746-.704 0-1.254.232-1.65.697-.43.508-.646 1.256-.646 2.245 0 .972.19 1.686.574 2.14.35.41.877.615 1.583.615.264 0 .506-.033.725-.098l1.325.772.36-.622zM15.5 17.588c-.225-.36-.337-.94-.337-1.736 0-1.393.424-2.09 1.27-2.09.443 0 .77.167.977.5.224.362.336.936.336 1.723 0 1.404-.424 2.108-1.27 2.108-.445 0-.77-.167-.978-.5zm-1.658-.425c0 .47-.172.856-.516 1.156-.344.3-.803.45-1.384.45-.543 0-1.064-.172-1.573-.515l.237-.476c.438.22.833.328 1.19.328.332 0 .593-.073.783-.22a.754.754 0 00.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177 0-.45.157-.81.47-1.085.315-.278.72-.415 1.22-.415.512 0 .98.136 1.4.41l-.213.476a2.726 2.726 0 00-1.064-.23c-.283 0-.502.068-.654.206a.685.685 0 00-.248.524c0 .328.234.61.666.85.393.215 1.187.67 1.187.67.433.305.648.63.648 1.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223 3.223 0 00-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867 8.867 0 00-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69 17.69 0 01-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422 1.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146 1.693.194 2.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445 3.445 0 01-.35-.4 8.76 8.76 0 01-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188 1.01-.027.007-.014 0-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478 2.478 0 01-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953 5.953 0 012.085 2.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z"},redis:{hex:"FF4438",path:"M22.71 13.145c-1.66 2.092-3.452 4.483-7.038 4.483-3.203 0-4.397-2.825-4.48-5.12.701 1.484 2.073 2.685 4.214 2.63 4.117-.133 6.94-3.852 6.94-7.239 0-4.05-3.022-6.972-8.268-6.972-3.752 0-8.4 1.428-11.455 3.685C2.59 6.937 3.885 9.958 4.35 9.626c2.648-1.904 4.748-3.13 6.784-3.744C8.12 9.244.886 17.05 0 18.425c.1 1.261 1.66 4.648 2.424 4.648.232 0 .431-.133.664-.365a100.49 100.49 0 0 0 5.54-6.765c.222 3.104 1.748 6.898 6.014 6.898 3.819 0 7.604-2.756 9.33-8.965.2-.764-.73-1.361-1.261-.73zm-4.349-5.013c0 1.959-1.926 2.922-3.685 2.922-.941 0-1.664-.247-2.235-.568 1.051-1.592 2.092-3.225 3.21-4.973 1.972.334 2.71 1.43 2.71 2.619z"},docker:{hex:"2496ED",path:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"},zod:{hex:"408AFF",path:"M2.584 3.582a2.247 2.247 0 0 1 2.112-1.479h14.617c.948 0 1.794.595 2.115 1.487l2.44 6.777a2.248 2.248 0 0 1-.624 2.443l-9.61 8.52a2.247 2.247 0 0 1-2.963.018L.776 12.773a2.248 2.248 0 0 1-.64-2.467Zm12.038 4.887-9.11 5.537 5.74 5.007c.456.399 1.139.396 1.593-.006l5.643-5.001H14.4l6.239-3.957c.488-.328.69-.947.491-1.5l-1.24-3.446a1.535 1.535 0 0 0-1.456-1.015H5.545a1.535 1.535 0 0 0-1.431 1.01l-1.228 3.37z"},hono:{hex:"E36002",path:"M12.445.002a45.529 45.529 0 0 0-5.252 8.146 8.595 8.595 0 0 1-.555-.53 27.796 27.796 0 0 0-1.205-1.542 8.762 8.762 0 0 0-1.251 2.12 20.743 20.743 0 0 0-1.448 5.88 8.867 8.867 0 0 0 .338 3.468c1.312 3.48 3.794 5.593 7.445 6.337 3.055.438 5.755-.333 8.097-2.312 2.677-2.59 3.359-5.634 2.047-9.132a33.287 33.287 0 0 0-2.988-5.59A91.34 91.34 0 0 0 12.615.053a.216.216 0 0 0-.17-.051Zm-.336 3.906a50.93 50.93 0 0 1 4.794 6.552c.448.767.817 1.57 1.108 2.41.606 2.386-.044 4.354-1.951 5.904-1.845 1.298-3.87 1.683-6.072 1.156-2.376-.737-3.75-2.335-4.121-4.794a5.107 5.107 0 0 1 .242-2.266c.358-.908.79-1.774 1.3-2.601l1.446-2.121a397.33 397.33 0 0 0 3.254-4.24Z"},svelte:{hex:"FF3E00",path:"M10.354 21.125a4.44 4.44 0 0 1-4.765-1.767 4.109 4.109 0 0 1-.703-3.107 3.898 3.898 0 0 1 .134-.522l.105-.321.287.21a7.21 7.21 0 0 0 2.186 1.092l.208.063-.02.208a1.253 1.253 0 0 0 .226.83 1.337 1.337 0 0 0 1.435.533 1.231 1.231 0 0 0 .343-.15l5.59-3.562a1.164 1.164 0 0 0 .524-.778 1.242 1.242 0 0 0-.211-.937 1.338 1.338 0 0 0-1.435-.533 1.23 1.23 0 0 0-.343.15l-2.133 1.36a4.078 4.078 0 0 1-1.135.499 4.44 4.44 0 0 1-4.765-1.766 4.108 4.108 0 0 1-.702-3.108 3.855 3.855 0 0 1 1.742-2.582l5.589-3.563a4.072 4.072 0 0 1 1.135-.499 4.44 4.44 0 0 1 4.765 1.767 4.109 4.109 0 0 1 .703 3.107 3.943 3.943 0 0 1-.134.522l-.105.321-.286-.21a7.204 7.204 0 0 0-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 0 0-.226-.831 1.337 1.337 0 0 0-1.435-.532 1.231 1.231 0 0 0-.343.15L8.62 9.368a1.162 1.162 0 0 0-.524.778 1.24 1.24 0 0 0 .211.937 1.338 1.338 0 0 0 1.435.533 1.235 1.235 0 0 0 .344-.151l2.132-1.36a4.067 4.067 0 0 1 1.135-.498 4.44 4.44 0 0 1 4.765 1.766 4.108 4.108 0 0 1 .702 3.108 3.857 3.857 0 0 1-1.742 2.583l-5.589 3.562a4.072 4.072 0 0 1-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 0 0-2.896 4.295 6.753 6.753 0 0 0 .666 4.336 6.43 6.43 0 0 0-.96 2.396 6.833 6.833 0 0 0 1.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 0 0 2.896-4.295 6.756 6.756 0 0 0-.665-4.336 6.429 6.429 0 0 0 .958-2.396 6.831 6.831 0 0 0-1.167-5.168Z"},nestjs:{hex:"E0234E",path:"M14.131.047c-.173 0-.334.037-.483.087.316.21.49.49.576.806.007.043.019.074.025.117a.681.681 0 0 1 .013.112c.024.545-.143.614-.26.936-.18.415-.13.861.086 1.22a.74.74 0 0 0 .074.137c-.235-1.568 1.073-1.803 1.314-2.293.019-.428-.334-.713-.613-.911a1.37 1.37 0 0 0-.732-.21zM16.102.4c-.024.143-.006.106-.012.18-.006.05-.006.112-.012.161-.013.05-.025.1-.044.149-.012.05-.03.1-.05.149l-.067.142c-.02.025-.031.05-.05.075l-.037.055a2.152 2.152 0 0 1-.093.124c-.037.038-.068.081-.112.112v.006c-.037.031-.074.068-.118.1-.13.099-.278.173-.415.266-.043.03-.087.056-.124.093a.906.906 0 0 0-.118.099c-.043.037-.074.074-.111.118-.031.037-.068.08-.093.124a1.582 1.582 0 0 0-.087.13c-.025.05-.043.093-.068.142-.019.05-.037.093-.05.143a2.007 2.007 0 0 0-.043.155c-.006.025-.006.056-.012.08-.007.025-.007.05-.013.075 0 .05-.006.105-.006.155 0 .037 0 .074.006.111 0 .05.006.1.019.155.006.05.018.1.03.15.02.049.032.098.05.148.013.03.031.062.044.087l-1.426-.552c-.241-.068-.477-.13-.719-.186l-.39-.093c-.372-.074-.75-.13-1.128-.167-.013 0-.019-.006-.031-.006A11.082 11.082 0 0 0 8.9 2.855c-.378.025-.756.074-1.134.136a12.45 12.45 0 0 0-.837.174l-.279.074c-.092.037-.18.08-.266.118l-.205.093c-.012.006-.024.006-.03.012-.063.031-.118.056-.174.087a2.738 2.738 0 0 0-.236.118c-.043.018-.086.043-.124.062a.559.559 0 0 1-.055.03c-.056.032-.112.063-.162.094a1.56 1.56 0 0 0-.148.093c-.044.03-.087.055-.124.086-.006.007-.013.007-.019.013-.037.025-.08.056-.118.087l-.012.012-.093.074c-.012.007-.025.019-.037.025-.031.025-.062.056-.093.08-.006.013-.019.02-.025.025-.037.038-.074.069-.111.106-.007 0-.007.006-.013.012a1.742 1.742 0 0 0-.111.106c-.007.006-.007.012-.013.012a1.454 1.454 0 0 0-.093.1c-.012.012-.03.024-.043.036a1.374 1.374 0 0 1-.106.112c-.006.012-.018.019-.024.03-.05.05-.093.1-.143.15l-.018.018c-.1.106-.205.211-.317.304-.111.1-.229.192-.347.273a3.777 3.777 0 0 1-.762.421c-.13.056-.267.106-.403.149-.26.056-.527.161-.756.18-.05 0-.105.012-.155.018l-.155.037-.149.056c-.05.019-.099.044-.148.068-.044.031-.093.056-.137.087a1.011 1.011 0 0 0-.124.106c-.043.03-.087.074-.124.111-.037.043-.074.08-.105.124-.031.05-.068.093-.093.143a1.092 1.092 0 0 0-.087.142c-.025.056-.05.106-.068.161-.019.05-.037.106-.056.161-.012.05-.025.1-.03.15 0 .005-.007.012-.007.018-.012.056-.012.13-.019.167C.006 7.95 0 7.986 0 8.03a.657.657 0 0 0 .074.31v.006c.019.037.044.075.069.112.024.037.05.074.08.111.031.031.068.069.106.1a.906.906 0 0 0 .117.099c.149.13.186.173.378.272.031.019.062.031.1.05.006 0 .012.006.018.006 0 .013 0 .019.006.031a1.272 1.272 0 0 0 .08.298c.02.037.032.074.05.111.007.013.013.025.02.031.024.05.049.093.073.137l.093.13c.031.037.069.08.106.118.037.037.074.068.118.105 0 0 .006.006.012.006.037.031.074.062.112.087a.986.986 0 0 0 .136.08c.043.025.093.05.142.069a.73.73 0 0 0 .124.043c.007.006.013.006.025.012.025.007.056.013.08.019-.018.335-.024.65.026.762.055.124.328-.254.6-.688-.036.428-.061.93 0 1.079.069.155.44-.329.763-.862 4.395-1.016 8.405 2.02 8.826 6.31-.08-.67-.905-1.041-1.283-.948-.186.458-.502 1.047-1.01 1.413.043-.41.025-.83-.062-1.24a4.009 4.009 0 0 1-.769 1.562c-.588.043-1.177-.242-1.487-.67-.025-.018-.031-.055-.05-.08-.018-.043-.037-.087-.05-.13a.515.515 0 0 1-.037-.13c-.006-.044-.006-.087-.006-.137v-.093a.992.992 0 0 1 .031-.13c.013-.043.025-.086.044-.13.024-.043.043-.087.074-.13.105-.298.105-.54-.087-.682a.706.706 0 0 0-.118-.062c-.024-.006-.055-.018-.08-.025l-.05-.018a.847.847 0 0 0-.13-.031.472.472 0 0 0-.13-.019 1.01 1.01 0 0 0-.136-.012c-.031 0-.062.006-.093.006a.484.484 0 0 0-.137.019c-.043.006-.086.012-.13.024a1.068 1.068 0 0 0-.13.044c-.043.018-.08.037-.124.056-.037.018-.074.043-.118.062-1.444.942-.582 3.148.403 3.787-.372.068-.75.148-.855.229l-.013.012c.267.161.546.298.837.416.397.13.818.247 1.004.297v.006a5.996 5.996 0 0 0 1.562.112c2.746-.192 4.996-2.281 5.405-5.033l.037.161c.019.112.043.23.056.347v.006c.012.056.018.112.025.162v.024c.006.056.012.112.012.162.006.068.012.136.012.204v.1c0 .03.007.067.007.098 0 .038-.007.075-.007.112v.087c0 .043-.006.08-.006.124 0 .025 0 .05-.006.08 0 .044-.006.087-.006.137-.006.018-.006.037-.006.055l-.02.143c0 .019 0 .037-.005.056-.007.062-.019.118-.025.18v.012l-.037.174v.018l-.037.167c0 .007-.007.02-.007.025a1.663 1.663 0 0 1-.043.168v.018c-.019.062-.037.118-.05.174-.006.006-.006.012-.006.012l-.056.186c-.024.062-.043.118-.068.18-.025.062-.043.124-.068.18-.025.062-.05.117-.074.18h-.007c-.024.055-.05.117-.08.173a.302.302 0 0 1-.019.043c-.006.006-.006.013-.012.019a5.867 5.867 0 0 1-1.742 2.082c-.05.031-.099.069-.149.106-.012.012-.03.018-.043.03a2.603 2.603 0 0 1-.136.094l.018.037h.007l.26-.037h.006c.161-.025.322-.056.483-.087.044-.006.093-.019.137-.031l.087-.019c.043-.006.086-.018.13-.024.037-.013.074-.02.111-.031.62-.15 1.221-.354 1.798-.595a9.926 9.926 0 0 1-3.85 3.142c.714-.05 1.426-.167 2.114-.366a9.903 9.903 0 0 0 5.857-4.68 9.893 9.893 0 0 1-1.667 3.986 9.758 9.758 0 0 0 1.655-1.376 9.824 9.824 0 0 0 2.61-5.268c.21.98.272 1.99.18 2.987 4.474-6.241.371-12.712-1.346-14.416-.006-.013-.012-.019-.012-.031-.006.006-.006.006-.006.012 0-.006 0-.006-.007-.012 0 .074-.006.148-.012.223a8.34 8.34 0 0 1-.062.415c-.03.136-.068.273-.105.41-.044.13-.093.266-.15.396a5.322 5.322 0 0 1-.185.378 4.735 4.735 0 0 1-.477.688c-.093.111-.192.21-.292.31a3.994 3.994 0 0 1-.18.155l-.142.124a3.459 3.459 0 0 1-.347.241 4.295 4.295 0 0 1-.366.211c-.13.062-.26.118-.39.174a4.364 4.364 0 0 1-.818.223c-.143.025-.285.037-.422.05a4.914 4.914 0 0 1-.297.012 4.66 4.66 0 0 1-.422-.025 3.137 3.137 0 0 1-.421-.062 3.136 3.136 0 0 1-.415-.105h-.007c.137-.013.273-.025.41-.05a4.493 4.493 0 0 0 .818-.223c.136-.05.266-.112.39-.174.13-.062.248-.13.372-.204.118-.08.235-.161.347-.248.112-.087.217-.18.316-.279.105-.093.198-.198.291-.304.093-.111.18-.223.26-.334.013-.019.026-.044.038-.062.062-.1.124-.199.18-.298a4.272 4.272 0 0 0 .334-.775c.044-.13.075-.266.106-.403.025-.142.05-.278.062-.415.012-.142.025-.285.025-.421 0-.1-.007-.199-.013-.298a6.726 6.726 0 0 0-.05-.415 4.493 4.493 0 0 0-.092-.415c-.044-.13-.087-.267-.137-.397-.05-.13-.111-.26-.173-.384-.069-.124-.137-.248-.211-.366a6.843 6.843 0 0 0-.248-.34c-.093-.106-.186-.212-.285-.317a3.878 3.878 0 0 0-.161-.155c-.28-.217-.57-.421-.862-.607a1.154 1.154 0 0 0-.124-.062 2.415 2.415 0 0 0-.589-.26Z"},cypress:{hex:"69D3A7",path:"M11.998.0195c-.8642 0-1.6816.1101-2.1445.1934v.002C4.1731 1.2283 0 6.1368 0 12.0018c0 1.1265.1573 2.2328.4648 3.3028.0387.1453.0915.2993.1368.4473 1.607 4.865 6.2245 8.226 11.3925 8.2285.0651 0 .2518-.0003.502-.0118.8564-.0353 1.6228-.5734 1.9512-1.369l.4736-1.1544L20.4258 8.043H18.621l-2.3164 5.871-2.334-5.871h-1.9082l3.2734 8.0117c-.8115 1.9702-1.6252 3.9395-2.4355 5.9101-.0808.1945-.2655.3284-.4727.336-.144.005-.285.0098-.4316.0098-4.5848 0-8.6672-3.0695-9.9277-7.4649a10.3058 10.3058 0 0 1-.3985-2.8437c0-5.0887 3.6521-9.3404 8.6035-10.164.2214-.037.8885-.1446 1.7246-.1446 4.4166 0 8.269 2.732 9.7305 6.8476.0558.144.0977.293.1465.4395.299.9746.4531 1.9887.4531 3.0215 0 4.5696-2.9413 8.5326-7.3164 9.8613l.4863 1.5996c5.085-1.546 8.4995-6.1518 8.502-11.459 0-1.5491-.2983-2.8706-.6504-3.8926-.0432-.1212-.0873-.2422-.1309-.3633h-.002C21.4577 3.0954 17.0444.0195 11.998.0195ZM8.4336 7.8906c-1.1999 0-2.1747.3852-2.9805 1.1758-.8007.7856-1.205 1.7736-1.205 2.9356 0 1.1544.4068 2.1368 1.205 2.9199.8058.7906 1.7806 1.1738 2.9805 1.1738 1.705 0 3.1556-.955 3.7871-2.4883l.0332-.082-1.6289-.5547c-.168.4563-.7552 1.4883-2.1914 1.4883-.6745 0-1.2437-.2344-1.6934-.6992-.4572-.4699-.6875-1.0632-.6875-1.7578 0-.6998.2253-1.2809.6875-1.7735.4522-.4648 1.019-.7012 1.6934-.7012 1.438 0 2.0238 1.0815 2.1934 1.4883l1.627-.5527-.0333-.084c-.629-1.5358-2.082-2.4883-3.7871-2.4883Z"},storybook:{hex:"FF4785",path:"M16.71.243l-.12 2.71a.18.18 0 00.29.15l1.06-.8.9.7a.18.18 0 00.28-.14l-.1-2.76 1.33-.1a1.2 1.2 0 011.279 1.2v21.596a1.2 1.2 0 01-1.26 1.2l-16.096-.72a1.2 1.2 0 01-1.15-1.16l-.75-19.797a1.2 1.2 0 011.13-1.27L16.7.222zM13.64 9.3c0 .47 3.16.24 3.59-.08 0-3.2-1.72-4.89-4.859-4.89-3.15 0-4.899 1.72-4.899 4.29 0 4.45 5.999 4.53 5.999 6.959 0 .7-.32 1.1-1.05 1.1-.96 0-1.35-.49-1.3-2.16 0-.36-3.649-.48-3.769 0-.27 4.03 2.23 5.2 5.099 5.2 2.79 0 4.969-1.49 4.969-4.18 0-4.77-6.099-4.64-6.099-6.999 0-.97.72-1.1 1.13-1.1.45 0 1.25.07 1.19 1.87z"},graphql:{hex:"E10098",path:"M12.002 0a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.54 4.931a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm0 9.862a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm-8.54 4.931a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.276zm-8.542-4.93a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.277zm0-9.863a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.542-3.378L2.953 6.777v10.448l9.049 5.224 9.047-5.224V6.777zm0 1.601 7.66 13.27H4.34zm-1.387.371L3.97 15.037V7.363zm2.774 0 6.646 3.838v7.674zM5.355 17.44h13.293l-6.646 3.836z"},trpc:{hex:"2596BE",path:"M24 12c0 6.62-5.38 12-12 12S0 18.62 0 12 5.38 0 12 0s12 5.38 12 12ZM1.21 12A10.78 10.78 0 0 0 12 22.79 10.78 10.78 0 0 0 22.79 12 10.78 10.78 0 0 0 12 1.21 10.78 10.78 0 0 0 1.21 12Zm10.915-6.086 2.162 1.248a.25.25 0 0 1 .125.217v1.103l2.473 1.428a.25.25 0 0 1 .125.217v2.355l.955.551a.25.25 0 0 1 .125.217v2.496a.25.25 0 0 1-.125.217l-2.162 1.248a.25.25 0 0 1-.25 0l-.956-.552-2.472 1.427a.25.25 0 0 1-.25 0l-2.472-1.427-.956.552a.25.25 0 0 1-.25 0l-2.162-1.248a.25.25 0 0 1-.125-.217V13.25a.25.25 0 0 1 .125-.217l.955-.551v-2.355a.25.25 0 0 1 .125-.217l2.473-1.428V7.38a.25.25 0 0 1 .125-.217l2.162-1.248a.25.25 0 0 1 .25 0Zm1.268 10.049a.25.25 0 0 1-.125-.217V13.25a.25.25 0 0 1 .125-.217l2.16-1.248a.25.25 0 0 1 .25 0l.707.408v-1.922l-2.098-1.21v.814a.25.25 0 0 1-.125.217l-2.162 1.248a.25.25 0 0 1-.25 0l-2.162-1.248a.25.25 0 0 1-.125-.217V9.06L7.49 10.271v1.922l.707-.408a.25.25 0 0 1 .25 0l2.16 1.248a.25.25 0 0 1 .125.217v2.496a.25.25 0 0 1-.125.217l-.705.408L12 17.582l2.098-1.211ZM10.088 9.73l1.662.96V8.766l-1.662-.955Zm3.824 0V7.811l-1.662.955v1.924ZM12 6.418l-1.66.96 1.66.954 1.66-.954Zm-5.59 9.184 1.66.958v-1.921l-1.66-.956Zm3.822 0v-1.92l-1.662.957v1.923Zm-1.91-3.311-1.662.96 1.661.955 1.66-.956Zm5.446 3.31 1.66.96v-1.922l-1.66-.956Zm3.822 0v-1.918l-1.662.956v1.922Zm-1.912-3.31-1.66.96 1.66.955 1.66-.956Z"},redux:{hex:"764ABC",path:"M16.634 16.504c.87-.075 1.543-.84 1.5-1.754-.047-.914-.796-1.648-1.709-1.648h-.061a1.71 1.71 0 00-1.648 1.769c.03.479.226.869.494 1.153-1.048 2.038-2.621 3.536-5.005 4.795-1.603.838-3.296 1.154-4.944.93-1.378-.195-2.456-.81-3.116-1.799-.988-1.499-1.078-3.116-.255-4.734.6-1.17 1.499-2.023 2.099-2.443a9.96 9.96 0 01-.42-1.543C-.868 14.408-.416 18.752.932 20.805c1.004 1.498 3.057 2.456 5.304 2.456.6 0 1.23-.044 1.843-.194 3.897-.749 6.848-3.086 8.541-6.532zm5.348-3.746c-2.32-2.728-5.738-4.226-9.634-4.226h-.51c-.253-.554-.837-.899-1.498-.899h-.045c-.943 0-1.678.81-1.647 1.753.03.898.794 1.648 1.708 1.648h.074a1.69 1.69 0 001.499-1.049h.555c2.309 0 4.495.674 6.488 1.992 1.527 1.005 2.622 2.323 3.237 3.897.538 1.288.509 2.547-.045 3.597-.855 1.647-2.294 2.517-4.196 2.517-1.199 0-2.367-.375-2.967-.644-.36.298-.96.793-1.394 1.093 1.318.598 2.652.943 3.94.943 2.922 0 5.094-1.647 5.919-3.236.898-1.798.824-4.824-1.47-7.416zM6.49 17.042c.03.899.793 1.648 1.708 1.648h.06a1.688 1.688 0 001.648-1.768c0-.9-.779-1.647-1.693-1.647h-.06c-.06 0-.15 0-.226.029-1.243-2.098-1.768-4.347-1.572-6.772.12-1.828.72-3.417 1.797-4.735.9-1.124 2.593-1.68 3.747-1.708 3.236-.061 4.585 3.971 4.689 5.574l1.498.45C17.741 3.197 14.686.62 11.764.62 9.02.62 6.49 2.613 5.47 5.535 4.077 9.43 4.991 13.177 6.7 16.174c-.15.195-.24.539-.21.868z"},i18next:{hex:"26A69A",path:"M14.93646 2.48699v4.51684l5.0758 13.03647s1.5495 3.1839-2.8824 3.9597H7.01922s-4.13084-.4311-3.14053-3.7019L9.21276 7.00401V2.48699h5.7237Zm2.0894 13.10781c-4.4301-1.3742-8.15457-.6365-9.97498-.0788l-1.83572 4.4186c-.78296 2.499 2.27302 2.9417 2.59687 2.9813l.02755.0032h8.44448c3.5407-.5982 2.511-2.972 2.4147-3.1773l-.0068-.0142-1.6661-4.1328Zm-7.81345.7772c.78905.0004 1.42905.3862 1.42905.8646 0 .4764-.6404.864-1.42905.864-.7887 0-1.42711-.3878-1.42711-.864 0-.4784.6384-.8646 1.4271-.8646Zm5.08375 0c.7871.0004 1.4271.3862 1.4271.8646 0 .4764-.6403.864-1.4271.864-.791 0-1.429-.3878-1.429-.864 0-.4784.638-.8646 1.429-.8646Zm-4.5001-5.2131c-.55227 0-.99993.5395-.99993 1.2051 0 .6656.44766 1.2051.99993 1.2051.5522 0 .9998-.5395.9998-1.2051 0-.6656-.4476-1.2051-.9998-1.2051Zm3.6413-1.29686c-.6549 0-1.1862.63806-1.1862 1.42906 0 .7871.5313 1.4271 1.1862 1.4271.653 0 1.1862-.64 1.1862-1.4271 0-.7907-.5328-1.42906-1.1862-1.42906Zm6.0363-2.73783s-2.1219 1.54591-4.0858-.41975V4.55615s2.7243-.60065 4.0858 2.56806Zm-14.84367 0C5.9908 3.9555 8.71543 4.55615 8.71543 4.55615v2.14831c-1.96566 1.96566-4.08544.41975-4.08544.41975ZM15.04366 0c.4954 0 .8958.4387.8958.98109 0 .54203-.4006.98074-.8958.98074H8.95478c-.49315 0-.89428-.43871-.89428-.98074C8.0605.43871 8.46146 0 8.95478 0h6.08888Z"},mui:{hex:"007FFF",path:"M20.229 15.793a.666.666 0 0 0 .244-.243.666.666 0 0 0 .09-.333l.012-3.858a.666.666 0 0 1 .09-.333.666.666 0 0 1 .245-.243L23 9.58a.667.667 0 0 1 .333-.088.667.667 0 0 1 .333.09.667.667 0 0 1 .244.243.666.666 0 0 1 .089.333v7.014a.667.667 0 0 1-.335.578l-7.893 4.534a.666.666 0 0 1-.662 0l-6.194-3.542a.667.667 0 0 1-.246-.244.667.667 0 0 1-.09-.335v-3.537c0-.004.004-.006.008-.004s.008 0 .008-.005v-.004c0-.003.002-.005.004-.007l5.102-2.93c.004-.003.002-.01-.003-.01a.005.005 0 0 1-.004-.002.005.005 0 0 1-.001-.004l.01-3.467a.667.667 0 0 0-.333-.58.667.667 0 0 0-.667 0L8.912 9.799a.667.667 0 0 1-.665 0l-3.804-2.19a.667.667 0 0 0-.999.577v6.267a.667.667 0 0 1-.332.577.666.666 0 0 1-.332.09.667.667 0 0 1-.333-.088L.336 13.825a.667.667 0 0 1-.246-.244.667.667 0 0 1-.09-.336L.019 2.292a.667.667 0 0 1 .998-.577l7.23 4.153a.667.667 0 0 0 .665 0l7.228-4.153a.666.666 0 0 1 .333-.088.666.666 0 0 1 .333.09.667.667 0 0 1 .244.244.667.667 0 0 1 .088.333V13.25c0 .117-.03.232-.089.334a.667.667 0 0 1-.245.244l-3.785 2.18a.667.667 0 0 0-.245.245.666.666 0 0 0-.089.334.667.667 0 0 0 .09.334.666.666 0 0 0 .247.244l2.088 1.189a.67.67 0 0 0 .33.087.667.667 0 0 0 .332-.089l4.457-2.56Zm.438-9.828a.666.666 0 0 0 .09.335.666.666 0 0 0 .248.244.667.667 0 0 0 .67-.008l2.001-1.2a.666.666 0 0 0 .237-.243.667.667 0 0 0 .087-.329V2.32a.667.667 0 0 0-.091-.335.667.667 0 0 0-.584-.33.667.667 0 0 0-.334.094l-2 1.2a.666.666 0 0 0-.238.243.668.668 0 0 0-.086.329v2.445Z"},bootstrap:{hex:"7952B3",path:"M11.77 11.24H9.956V8.202h2.152c1.17 0 1.834.522 1.834 1.466 0 1.008-.773 1.572-2.174 1.572zm.324 1.206H9.957v3.348h2.231c1.459 0 2.232-.585 2.232-1.685s-.795-1.663-2.326-1.663zM24 11.39v1.218c-1.128.108-1.817.944-2.226 2.268-.407 1.319-.463 2.937-.42 4.186.045 1.3-.968 2.5-2.337 2.5H4.985c-1.37 0-2.383-1.2-2.337-2.5.043-1.249-.013-2.867-.42-4.186-.41-1.324-1.1-2.16-2.228-2.268V11.39c1.128-.108 1.819-.944 2.227-2.268.408-1.319.464-2.937.42-4.186-.045-1.3.968-2.5 2.338-2.5h14.032c1.37 0 2.382 1.2 2.337 2.5-.043 1.249.013 2.867.42 4.186.409 1.324 1.098 2.16 2.226 2.268zm-7.927 2.817c0-1.354-.953-2.333-2.368-2.488v-.057c1.04-.169 1.856-1.135 1.856-2.213 0-1.537-1.213-2.538-3.062-2.538h-4.16v10.172h4.181c2.218 0 3.553-1.086 3.553-2.876z"},sass:{hex:"CC6699",path:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zM9.615 15.998c.175.645.156 1.248-.024 1.792l-.065.18c-.024.061-.052.12-.078.176-.14.29-.326.56-.555.81-.698.759-1.672 1.047-2.09.805-.45-.262-.226-1.335.584-2.19.871-.918 2.12-1.509 2.12-1.509v-.003l.108-.061zm9.911-10.861c-.542-2.133-4.077-2.834-7.422-1.645-1.989.707-4.144 1.818-5.693 3.267C4.568 8.48 4.275 9.98 4.396 10.607c.427 2.211 3.457 3.657 4.703 4.73v.006c-.367.18-3.056 1.529-3.686 2.925-.675 1.47.105 2.521.615 2.655 1.575.436 3.195-.36 4.065-1.649.84-1.261.766-2.881.404-3.676.496-.135 1.08-.195 1.83-.104 2.101.24 2.521 1.56 2.43 2.1-.09.539-.523.854-.674.944-.15.091-.195.12-.181.181.015.09.091.09.21.075.165-.03 1.096-.45 1.141-1.471.045-1.29-1.186-2.729-3.375-2.7-.9.016-1.471.091-1.875.256-.03-.045-.061-.075-.105-.105-1.35-1.455-3.855-2.475-3.75-4.41.03-.705.285-2.564 4.8-4.814 3.705-1.846 6.661-1.335 7.171-.21.733 1.604-1.576 4.59-5.431 5.024-1.47.165-2.235-.404-2.431-.615-.209-.225-.239-.24-.314-.194-.12.06-.045.255 0 .375.12.3.585.825 1.396 1.095.704.225 2.43.359 4.5-.45 2.324-.899 4.139-3.405 3.614-5.505l.073.067z"},drizzle:{hex:"C5F74F",path:"M5.353 11.823a1.036 1.036 0 0 0-.395-1.422 1.063 1.063 0 0 0-1.437.399L.138 16.702a1.035 1.035 0 0 0 .395 1.422 1.063 1.063 0 0 0 1.437-.398l3.383-5.903Zm11.216 0a1.036 1.036 0 0 0-.394-1.422 1.064 1.064 0 0 0-1.438.399l-3.382 5.902a1.036 1.036 0 0 0 .394 1.422c.506.283 1.15.104 1.438-.398l3.382-5.903Zm7.293-4.525a1.036 1.036 0 0 0-.395-1.422 1.062 1.062 0 0 0-1.437.399l-3.383 5.902a1.036 1.036 0 0 0 .395 1.422 1.063 1.063 0 0 0 1.437-.399l3.383-5.902Zm-11.219 0a1.035 1.035 0 0 0-.394-1.422 1.064 1.064 0 0 0-1.438.398l-3.382 5.903a1.036 1.036 0 0 0 .394 1.422c.506.282 1.15.104 1.438-.399l3.382-5.902Z"},supabase:{hex:"3FCF8E",path:"M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"},firebase:{hex:"DD2C00",path:"M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"},bun:{hex:"000000",path:"M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083 5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"},deno:{hex:"70FFAF",path:"M1.105 18.02A11.9 11.9 0 0 1 0 12.985q0-.698.078-1.376a12 12 0 0 1 .231-1.34A12 12 0 0 1 4.025 4.02a12 12 0 0 1 5.46-2.771 12 12 0 0 1 3.428-.23c1.452.112 2.825.477 4.077 1.05a12 12 0 0 1 2.78 1.774 12.02 12.02 0 0 1 4.053 7.078A12 12 0 0 1 24 12.985q0 .454-.036.914a12 12 0 0 1-.728 3.305 12 12 0 0 1-2.38 3.875c-1.33 1.357-3.02 1.962-4.43 1.936a4.4 4.4 0 0 1-2.724-1.024c-.99-.853-1.391-1.83-1.53-2.919a5 5 0 0 1 .128-1.518c.105-.38.37-1.116.76-1.437-.455-.197-1.04-.624-1.226-.829-.045-.05-.04-.13 0-.183a.155.155 0 0 1 .177-.053c.392.134.869.267 1.372.35.66.111 1.484.25 2.317.292 2.03.1 4.153-.813 4.812-2.627s.403-3.609-1.96-4.685-3.454-2.356-5.363-3.128c-1.247-.505-2.636-.205-4.06.582-3.838 2.121-7.277 8.822-5.69 15.032a.191.191 0 0 1-.315.19 12 12 0 0 1-1.25-1.634 12 12 0 0 1-.769-1.404M11.57 6.087c.649-.051 1.214.501 1.31 1.236.13.979-.228 1.99-1.41 2.013-1.01.02-1.315-.997-1.248-1.614.066-.616.574-1.575 1.35-1.635"},nuxt:{hex:"00DC82",path:"M13.4642 19.8295h8.9218c.2834 0 .5618-.0723.8072-.2098a1.5899 1.5899 0 0 0 .5908-.5732 1.5293 1.5293 0 0 0 .216-.783 1.529 1.529 0 0 0-.2167-.7828L17.7916 7.4142a1.5904 1.5904 0 0 0-.5907-.573 1.6524 1.6524 0 0 0-.807-.2099c-.2833 0-.5616.0724-.807.2098a1.5904 1.5904 0 0 0-.5907.5731L13.4642 9.99l-2.9954-5.0366a1.5913 1.5913 0 0 0-.591-.573 1.6533 1.6533 0 0 0-.8071-.2098c-.2834 0-.5617.0723-.8072.2097a1.5913 1.5913 0 0 0-.591.573L.2168 17.4808A1.5292 1.5292 0 0 0 0 18.2635c-.0001.2749.0744.545.216.783a1.59 1.59 0 0 0 .5908.5732c.2454.1375.5238.2098.8072.2098h5.6003c2.219 0 3.8554-.9454 4.9813-2.7899l2.7337-4.5922L16.3935 9.99l4.3944 7.382h-5.8586ZM7.123 17.3694l-3.9083-.0009 5.8586-9.8421 2.9232 4.921-1.9572 3.2892c-.7478 1.1967-1.5972 1.6328-2.9163 1.6328z"},stripe:{hex:"635BFF",path:"M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"},twilio:{hex:"F22F46",path:"M12 0C5.381-.008.008 5.352 0 11.971V12c0 6.64 5.359 12 12 12 6.64 0 12-5.36 12-12 0-6.641-5.36-12-12-12zm0 20.801c-4.846.015-8.786-3.904-8.801-8.75V12c-.014-4.846 3.904-8.786 8.75-8.801H12c4.847-.014 8.786 3.904 8.801 8.75V12c.015 4.847-3.904 8.786-8.75 8.801H12zm5.44-11.76c0 1.359-1.12 2.479-2.481 2.479-1.366-.007-2.472-1.113-2.479-2.479 0-1.361 1.12-2.481 2.479-2.481 1.361 0 2.481 1.12 2.481 2.481zm0 5.919c0 1.36-1.12 2.48-2.481 2.48-1.367-.008-2.473-1.114-2.479-2.48 0-1.359 1.12-2.479 2.479-2.479 1.361-.001 2.481 1.12 2.481 2.479zm-5.919 0c0 1.36-1.12 2.48-2.479 2.48-1.368-.007-2.475-1.113-2.481-2.48 0-1.359 1.12-2.479 2.481-2.479 1.358-.001 2.479 1.12 2.479 2.479zm0-5.919c0 1.359-1.12 2.479-2.479 2.479-1.367-.007-2.475-1.112-2.481-2.479 0-1.361 1.12-2.481 2.481-2.481 1.358 0 2.479 1.12 2.479 2.481z"},reactquery:{hex:"FF4154",path:"M6.9297 13.6875c.164-.0938.375-.0352.4687.1328l.0625.1055c.4805.8515.9805 1.6601 1.5 2.4258.6133.9023 1.3047 1.8164 2.0743 2.7421a.3455.3455 0 0 1-.0391.4844l-.0742.0664c-2.543 2.2227-4.1914 2.664-4.9532 1.332-.746-1.3046-.4765-3.6718.8086-7.1093a.3437.3437 0 0 1 .1524-.1797ZM17.75 16.3008c.1836-.0313.3594.086.3945.2695l.0196.1016c.6289 3.2851.1875 4.9297-1.3243 4.9297-1.4804 0-3.3593-1.4024-5.6484-4.2032a.3271.3271 0 0 1-.0742-.2226c0-.1875.1562-.3399.3437-.3399h.1211a32.9838 32.9838 0 0 0 2.8086-.0976c1.0703-.086 2.1914-.2305 3.3594-.4375zm.871-6.9766a.3528.3528 0 0 1 .4454-.211l.1016.0352c3.2617 1.1094 4.5039 2.332 3.7187 3.6641-.7656 1.3047-2.9922 2.254-6.6836 2.8477-.082.0117-.168-.004-.2383-.047-.168-.0976-.2265-.3085-.125-.4765l.0625-.1054c.504-.8438.957-1.6836 1.3672-2.5235.4766-.9883.9297-2.0508 1.3516-3.1836zM7.797 8.3398c.082-.0117.168.004.2383.047.168.0976.2265.3085.125.4765l-.0625.1054a34.0882 34.0882 0 0 0-1.3672 2.5235c-.4766.9883-.9297 2.0508-1.3516 3.1836a.3528.3528 0 0 1-.4453.211l-.1016-.0352c-3.2617-1.1094-4.5039-2.332-3.7187-3.6641.7656-1.3047 2.9922-2.254 6.6836-2.8477Zm5.2812-3.9843c2.543-2.2227 4.1914-2.664 4.9532-1.332.746 1.3046.4765 3.6718-.8086 7.1093a.3436.3436 0 0 1-.1524.1797c-.164.0938-.375.0352-.4687-.1328l-.0625-.1055c-.4805-.8515-.9805-1.6601-1.5-2.4258-.6133-.9023-1.3047-1.8164-2.0743-2.7421a.3455.3455 0 0 1 .0391-.4844Zm-5.793-2.082c1.4805 0 3.3633 1.4023 5.6485 4.203a.3488.3488 0 0 1 .0781.2188c-.0039.1914-.1562.3438-.3476.3438l-.1172-.004a34.5835 34.5835 0 0 0-2.8086.1016c-1.0742.086-2.1953.2305-3.3633.4375a.343.343 0 0 1-.3945-.2734l-.0196-.0977c-.629-3.2851-.1876-4.9297 1.3242-4.9297Zm2.8711 5.8124h3.6875a.638.638 0 0 1 .5508.3164l1.8477 3.2188a.6437.6437 0 0 1 0 .6289l-1.8477 3.2227a.638.638 0 0 1-.5507.3164h-3.6875c-.2266 0-.4375-.1211-.547-.3164L7.7579 12.25a.6437.6437 0 0 1 0-.629l1.8516-3.2187c.1093-.1953.3203-.3164.5468-.3164Zm3.2305.793a.638.638 0 0 1 .5508.3164l1.3906 2.4258a.6437.6437 0 0 1 0 .6289l-1.3906 2.4297a.638.638 0 0 1-.5508.3164h-2.7734c-.2266 0-.4375-.1211-.5469-.3164L8.672 12.25a.6437.6437 0 0 1 0-.629l1.3945-2.4257c.1094-.1953.3203-.3164.5469-.3164Zm-.4922.8672h-1.789c-.2266 0-.4336.1172-.547.3164l-.8983 1.5586a.6437.6437 0 0 0 0 .6289l.8984 1.5625a.6317.6317 0 0 0 .5469.3164h1.789a.6317.6317 0 0 0 .547-.3164l.8983-1.5625a.6437.6437 0 0 0 0-.629l-.8984-1.5585c-.1133-.1992-.3203-.3164-.5469-.3164Zm-.4765.8281c.2265 0 .4375.1211.5468.3164l.422.7305c.1132.1953.1132.4375 0 .6289l-.422.7344c-.1093.1953-.3203.3164-.5468.3164h-.836a.6317.6317 0 0 1-.5468-.3164l-.422-.7344c-.1132-.1914-.1132-.4336 0-.629l.422-.7304a.6317.6317 0 0 1 .5468-.3164zm-.418.8164a.548.548 0 0 0-.4727.2735c-.0976.168-.0976.375 0 .5468a.5444.5444 0 0 0 .4727.2696.5444.5444 0 0 0 .4727-.2696c.0976-.1718.0976-.3789 0-.5468A.548.548 0 0 0 12 11.3906Zm-4.4219.5469h.9805M18.9805 7.75c.3906-1.8945.4765-3.3438.2226-4.3984-.1484-.629-.4218-1.1368-.8398-1.5078-.4414-.3907-1-.582-1.625-.582-1.0352 0-2.1211.4726-3.2813 1.3671-.4726.3633-.9648.8047-1.4726 1.3164-.043-.0508-.086-.1015-.1367-.1445-1.4454-1.2852-2.6602-2.082-3.6993-2.3906-.6171-.1836-1.1953-.1993-1.7226-.0235-.5586.1875-1.004.5742-1.3164 1.1172-.5156.8945-.6524 2.0742-.461 3.5274.0782.5898.2149 1.2343.4024 1.9335a1.1187 1.1187 0 0 0-.2149.047C3.008 8.621 1.711 9.2694.9258 10.0155c-.4649.4414-.7695.9375-.8828 1.4805-.1133.5781 0 1.1562.3125 1.6992.5156.8945 1.4648 1.5977 2.8164 2.1563.543.2226 1.1562.4257 1.8437.6093a1.0227 1.0227 0 0 0-.0703.2266c-.3906 1.8906-.4765 3.3438-.2226 4.3945.1484.629.4257 1.1407.8398 1.5078.4414.3907 1 .582 1.625.582 1.0352 0 2.121-.4726 3.2813-1.3632.4765-.3711.9726-.8164 1.4882-1.336a1.2 1.2 0 0 0 .1953.2266c1.4454 1.2852 2.6602 2.082 3.6993 2.3906.6172.1836 1.1953.1993 1.7226.0235.5586-.1875 1.004-.5742 1.3164-1.1172.5157-.8945.6524-2.0742.461-3.5273-.082-.6133-.2227-1.2813-.4258-2.0118a1.2248 1.2248 0 0 0 .2383-.0468c1.828-.6094 3.125-1.2578 3.9101-2.004.4649-.4413.7696-.9374.8828-1.4804.1133-.5781 0-1.1563-.3125-1.6992-.5156-.8946-1.4648-1.5977-2.8164-2.1563-.5586-.2304-1.1953-.4414-1.9062-.625a.8647.8647 0 0 0 .0586-.1953z"},reacthookform:{hex:"EC5990",path:"M10.7754 17.3477H5.8065a.2815.2815 0 1 0 0 .563h4.9689a.2815.2815 0 1 0 0-.563zm7.3195 0h-4.9688a.2815.2815 0 1 0 0 .563h4.9688a.2815.2815 0 0 0 0-.563zm-7.3336-6.475H5.8065a.2815.2815 0 1 0 0 .563h4.9548a.2815.2815 0 1 0 0-.563zm7.3195 0h-4.9547a.2815.2815 0 1 0 0 .563h4.9547a.2815.2815 0 0 0 0-.563zm.5518-9.2001h-4.341a2.4042 2.4042 0 0 0-4.5804 0H5.3674c-1.7103 0-3.0968 1.3864-3.0968 3.0967v16.134C2.2706 22.6135 3.6571 24 5.3674 24h13.2652c1.7103 0 3.0968-1.3865 3.0968-3.0967V4.7693c0-1.7103-1.3865-3.0967-3.0968-3.0967zm-8.7046.563a.2815.2815 0 0 0 .2815-.2224 1.8411 1.8411 0 0 1 3.5979 0 .2815.2815 0 0 0 .2815.2224h1.5146v1.844a.8446.8446 0 0 1-.8446.8446H9.2552a.8446.8446 0 0 1-.8446-.8446v-1.844Zm11.2383 18.6677c0 1.3993-1.1344 2.5337-2.5337 2.5337H5.3674c-1.3993 0-2.5337-1.1344-2.5337-2.5337V4.7693c0-1.3993 1.1344-2.5337 2.5337-2.5337h2.4802v1.844c0 .7774.6302 1.4076 1.4076 1.4076h5.4896c.7774 0 1.4076-.6302 1.4076-1.4076v-1.844h2.4802c1.3993 0 2.5337 1.1344 2.5337 2.5337z"}},Bd={shipped:"Released",merged:"Merged, not released yet",building:"Being built",designed:"Designed, not built yet",coming:"Coming"};function JT(){const e=j8(),t=xa({from:"/architecture"}),n=Ys(),s=t.view??"map",[i,a]=j.useState(new Set),[o,l]=j.useState(null),[c,u]=j.useState(!1),[h,d]=j.useState(null),f=t.adr?t.adr.startsWith("ADR-")?{kind:"adr",id:t.adr}:{kind:"ticket",id:t.adr}:null,p=R=>void n({to:"/architecture",search:{...(R.view??s)!=="map"?{view:R.view??s}:{},..."pick"in R?R.pick?{adr:R.pick.id}:{}:t.adr?{adr:t.adr}:{}},replace:!0}),m=R=>p({pick:f?.id===R?.id?null:R}),g=e.data?.decisions??[],v=e.data?.tickets??[],y=j.useMemo(()=>pP(g,v),[g,v]),x=y.cols.length,k=o??x;if(j.useEffect(()=>{if(!c)return;const R=setInterval(()=>{l(L=>{const $=(L??0)+1;return $>=x?(u(!1),null):$})},700);return()=>clearInterval(R)},[c,x]),!e.data)return r.jsx("div",{className:"top",children:r.jsx("h1",{children:"Architecture"})});const b=g.filter(R=>y.colOf(R.from)<k),T=b.filter(R=>!R.replacedBy||y.colOf(b3(g,R.replacedBy))>=k),w=y.cols.slice(0,k).reduce((R,L)=>R+(L.t?.follows.length??0),0),E=h?h.startsWith("ADR-")?{kind:"adr",id:h}:{kind:"ticket",id:h}:f,S=fP(E,g,v),A=s==="map"||s==="timeline",C=e.data.lessons??[];return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"top",children:[r.jsx("h1",{children:"Architecture"}),r.jsx("span",{className:"note",children:"Every technical choice the squad made, why, and what it shaped. Every new ticket follows the rules in force."})]}),r.jsx("div",{className:"ptabs",role:"tablist",children:[["map","Map"],["timeline","Timeline"],["stack","Stack",e.data.stack.length],["list","All decisions",g.length],["project","Project map"],["lessons","Lessons",C.length]].map(([R,L,$])=>r.jsxs("button",{role:"tab","aria-selected":s===R,className:s===R?"on":"",onClick:()=>p({view:R}),children:[L," ",$!==void 0&&r.jsx("span",{className:"n",children:$})]},R))}),r.jsxs("div",{className:"split",children:[r.jsx("div",{className:"scroll",children:r.jsxs("div",{className:"arch",children:[A&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"arch-stats",children:[r.jsx(lo,{n:T.length,label:"Rules in force",hint:"Every new design must follow these"}),r.jsx(lo,{n:b.length-T.length,label:"Replaced",hint:"Changed by a newer decision"}),r.jsx(lo,{n:T.filter(R=>R.checkedBy?.passing).length,label:"Checked by a test",hint:"Break one and nothing ships"}),r.jsx(lo,{n:w,label:"Times a design followed one",hint:"Past choices shaping new work"})]}),r.jsxs("div",{className:"arch-bar",children:[r.jsxs("button",{className:"btn",onClick:()=>c?u(!1):(l(o===null||o>=x?1:o),u(!0)),children:[c?r.jsx(gy,{size:14}):r.jsx(Zh,{size:14})," ",c?"Pause":"Play the history"]}),r.jsx("input",{type:"range",min:1,max:x,value:k,"aria-label":"Show the project up to this ticket",onChange:R=>{u(!1);const L=Number(R.target.value);l(L>=x?null:L)}}),r.jsx("span",{className:"note mono",style:{minWidth:110},children:k>=x?"Today":`Up to ${y.cols[k-1]?.label??""}`}),r.jsx("span",{className:"grow"}),[...sc,"Other"].filter(R=>g.some(L=>(L.area??"Other")===R)).map(R=>r.jsxs("button",{className:`chip area-${R.toLowerCase()} ${i.has(R)?"on":""}`,onClick:()=>a(L=>{const $=new Set(L);return $.has(R)?$.delete(R):$.add(R),$}),children:[r.jsx("i",{})," ",R]},R))]})]}),s==="map"&&r.jsx(iP,{decisions:g.filter(R=>i.size===0||i.has(R.area??"Other")),tickets:v,visible:R=>y.colOf(R.from)<k,related:S,picked:f?.id??null,onPick:m,onHover:d}),s==="timeline"&&r.jsx(lP,{decisions:g,tickets:v,areas:i,shown:k,related:S,picked:f?.id??null,onPick:m,g:y}),A&&r.jsx(rP,{view:s}),s==="map"&&r.jsx(cP,{decisions:g,tickets:v,onPick:m}),s==="stack"&&r.jsx(eP,{data:e.data,picked:f?.id??null,onPick:m}),s==="list"&&r.jsx(uP,{decisions:g,picked:f?.id??null,onPick:m}),s==="project"&&r.jsxs("div",{style:{maxWidth:820},children:[r.jsxs("p",{className:"note",style:{marginBottom:8,display:"flex",gap:8,alignItems:"center"},children:[r.jsx(l8,{size:15})," The Architect writes this from the code and reads it again after every merge. Every agent reads it first, then opens only the files it needs."]}),r.jsx(w3,{reading:e.data.reading}),e.data.map.map(R=>r.jsxs("div",{className:"maprow",children:[r.jsx("b",{children:R.area}),r.jsx("span",{children:R.detail})]},R.area))]}),s==="lessons"&&r.jsxs("div",{style:{maxWidth:820},children:[r.jsx("p",{className:"note",style:{marginBottom:8},children:"Learned from bugs and reviews. Each lesson makes the next ticket better."}),C.length===0&&r.jsx("p",{className:"note",children:"No lessons yet."}),C.map(R=>r.jsxs("div",{className:"lesson",children:[r.jsx("span",{className:"glyph sm",children:r.jsx(i8,{size:12})}),r.jsxs("span",{children:[R.text," ",r.jsxs("span",{className:"note",children:["From ",R.from]})]}),r.jsx("span",{className:"mono",children:Zs(R.date)})]},R.id))]})]})}),s!=="project"&&s!=="lessons"&&r.jsx(dP,{pick:f,decisions:g,tickets:v,impact:e.data.impact??[],onPick:m})]})]})}const k3=[{role:"Language",label:"Language and runtime"},{role:"Framework",label:"App framework"},{role:"Interface",label:"Screens"},{role:"Data",label:"Data"},{role:"Services",label:"Outside services"},{role:"Testing",label:"Testing"},{role:"Tooling",label:"Tooling"}];function eP({data:e,picked:t,onPick:n}){const s=e.stack.filter(a=>!a.decisions.length&&!a.via).length,i=e.stack.filter(a=>!a.decisions.length&&a.via).length;return r.jsxs("div",{className:"stackv",children:[r.jsx(w3,{reading:e.reading}),r.jsxs("div",{className:"stack-sum",children:[r.jsxs("span",{children:[r.jsx("b",{children:e.stack.length})," technologies in the code"]}),r.jsxs("span",{children:[r.jsx("b",{children:e.stack.length-s-i})," chosen by a saved decision"]}),i>0&&r.jsxs("span",{children:[r.jsx("b",{children:i})," came with one of those"]}),s>0&&r.jsxs("span",{className:"ahead",children:[r.jsx("b",{children:s})," picked while building, no decision yet"]}),r.jsxs("span",{children:[r.jsx("b",{children:e.patterns.length})," design patterns"]})]}),e.stack.length===0&&r.jsx("p",{className:"note",children:"None found yet. The Architect lists them when it reads the code."}),r.jsxs("section",{className:"stack-group",children:[r.jsx("h3",{children:"Technologies"}),r.jsx("div",{className:"techs",children:k3.flatMap(a=>e.stack.filter(o=>o.role===a.role)).map(a=>r.jsx(tP,{t:a,picked:t,onPick:n},a.name))})]}),r.jsxs("section",{className:"stack-group",children:[r.jsx("h3",{children:"Design patterns the code follows"}),e.patterns.length===0&&r.jsx("p",{className:"note",children:"Not read yet. Press Read the code again, and the Architect lists the patterns a new developer must keep."}),r.jsx("div",{className:"patterns",children:e.patterns.map(a=>r.jsxs("div",{className:"pattern",children:[r.jsx("span",{className:"glyph sm",children:r.jsx(m8,{size:13})}),r.jsxs("div",{children:[r.jsx("b",{children:a.name}),r.jsx("p",{children:a.what}),r.jsxs("div",{className:"where",children:[a.where.map(o=>r.jsx("code",{children:o},o)),a.decision&&r.jsxs("button",{className:`pill click ${t===a.decision?"on":""}`,onClick:()=>n({kind:"adr",id:a.decision}),children:["From ",a.decision]})]})]})]},a.name))})]})]})}function tP({t:e,picked:t,onPick:n}){const s=e.icon?XT[e.icon]:void 0;return r.jsxs("div",{className:`tech ${e.decisions.some(i=>i===t)?"picked":""}`,children:[r.jsxs("div",{className:"tech-head",children:[r.jsx("span",{className:"logo",style:s?{"--brand":`#${s.hex}`}:void 0,children:s?r.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:sP(s.hex)?"ink":"",children:r.jsx("path",{d:s.path})}):r.jsx("span",{className:"mono",children:e.name.slice(0,2)})}),r.jsxs("span",{className:"tech-name",children:[r.jsx("b",{children:e.name}),e.version&&r.jsxs("span",{className:"mono",children:["v",e.version]})]}),r.jsx("span",{className:"tech-role",children:k3.find(i=>i.role===e.role)?.label})]}),r.jsx("p",{className:e.why?"":"note",children:e.why??"Not explained yet. The Architect fills this in when it reads the code."}),r.jsx("div",{className:"tech-foot",children:e.decisions.length?e.decisions.map(i=>r.jsxs("button",{className:`pill click ${t===i?"on":""}`,onClick:()=>n({kind:"adr",id:i}),children:["Chosen in ",i]},i)):e.via?e.via.decisions.map(i=>r.jsxs("button",{className:`pill click ${t===i?"on":""}`,onClick:()=>n({kind:"adr",id:i}),title:`Choosing ${e.via.name} chose ${e.name} too`,children:["Comes with ",e.via.name," · ",i]},i)):r.jsx(nP,{t:e})})]})}function nP({t:e}){const t=Y(),n=(i,a)=>t.mutate({path:"/api/v1/architecture/decide",body:{tech:e.name,do:i},done:a}),s=e.draft;if(s?.status==="writing"||t.isPending&&!s)return r.jsxs("span",{className:"pill nodecision",children:[r.jsx(hn,{size:12,className:"spin"})," The Architect is writing it"]});if(s?.status==="ready"&&s.decision){const i=s.decision;return r.jsxs("div",{className:"techdraft",children:[r.jsx("span",{className:"lbl",children:"Decision for you to approve"}),r.jsx("b",{children:i.title}),r.jsxs("p",{children:[r.jsx("span",{className:"note",children:"Chosen:"})," ",i.chosen]}),r.jsx("p",{children:i.why}),i.options.filter(a=>a!==i.chosen).length>0&&r.jsxs("p",{className:"note",children:["Also looked at: ",i.options.filter(a=>a!==i.chosen).join("; ")]}),r.jsxs("div",{className:"row",children:[r.jsxs("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>n("approve","Saved as a decision. Every new ticket follows it now."),children:[r.jsx(J,{size:13})," Approve"]}),r.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>n("discard"),children:"Discard"})]})]})}return r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"pill nodecision",title:s?.status==="failed"?`The last try stopped: ${s.error??""}`:"The Builder added it while building; nobody wrote down why.",children:s?.status==="failed"?"Writing stopped, try again":"Picked while building"}),r.jsx("button",{className:"btn sm",onClick:()=>n("write",`The Architect is writing a decision for ${e.name}.`),children:"Save as a decision"})]})}function sP(e){const t=parseInt(e,16);return(t>>16&255)*.299+(t>>8&255)*.587+(t&255)*.114<60}function w3({reading:e}){const t=Y(),n=e?.status==="pending"||e?.status==="running"||t.isPending;return r.jsxs("div",{className:`reading ${e?.status==="failed"?"bad":""}`,children:[n?r.jsx(hn,{size:15,className:"spin"}):r.jsx(hl,{size:15}),r.jsx("span",{children:n?"The Architect is reading the code. This takes a minute or two.":e?.status==="failed"?`The last read stopped: ${e.error??"unknown error"}`:e?.at?`Read from the code ${An(e.at)}. It is read again after every merge.`:"Not read from the code yet."}),r.jsx("span",{className:"grow"}),r.jsxs("button",{className:"btn sm",disabled:n,onClick:()=>t.mutate({path:"/api/v1/architecture/read",done:"The Architect is reading the code."}),children:[r.jsx(hl,{size:13})," Read the code again"]})]})}function lo({n:e,label:t,hint:n}){return r.jsxs("div",{className:"arch-stat",title:n,children:[r.jsx("b",{children:e}),r.jsx("span",{children:t}),r.jsx("small",{children:n})]})}function rP({view:e}){return e==="map"?r.jsxs("div",{className:"arch-legend note",children:[r.jsxs("span",{children:[r.jsx("i",{className:"lg arrow"})," Built on"]}),r.jsxs("span",{children:[r.jsx("i",{className:"lg arrow replaces"})," Replaces"]}),r.jsxs("span",{children:[r.jsx("i",{className:"lg chip made"})," Ticket that made it"]}),r.jsxs("span",{children:[r.jsx("i",{className:"lg chip"})," Ticket that followed it"]}),r.jsxs("span",{children:[r.jsx("i",{className:"lg chip ahead"})," Will follow it, not built yet"]}),r.jsxs("span",{children:[r.jsx(J,{size:12,strokeWidth:3})," Checked by a test"]})]}):r.jsxs("div",{className:"arch-legend note",children:[r.jsxs("span",{children:[r.jsx("i",{className:"lg node"})," Made the decision"]}),r.jsxs("span",{children:[r.jsx("i",{className:"lg dot"})," Its design followed it"]}),r.jsxs("span",{children:[r.jsx("i",{className:"lg dot open"})," Will follow it, not built yet"]}),r.jsxs("span",{children:[r.jsx("i",{className:"lg link"})," Built on an older one"]}),r.jsxs("span",{children:[r.jsx("i",{className:"lg link replaces"})," Replaces an older one"]})]})}const ar=112,uu=18,gi=16,im=34;function iP({decisions:e,tickets:t,visible:n,related:s,picked:i,onPick:a,onHover:o}){const[l,c]=j.useState(1100),u=j.useRef(null);j.useEffect(()=>{const S=u.current;if(!S)return;const A=new ResizeObserver(()=>c(S.clientWidth));return A.observe(S),()=>A.disconnect()},[]);const h=new Set(e.map(S=>S.id)),d=S=>[...S.buildsOn??[],...S.replaces?[S.replaces]:[]].filter(A=>h.has(A)),f=new Map,p=(S,A=new Set)=>{if(f.has(S.id))return f.get(S.id);if(A.has(S.id))return 0;A.add(S.id);const C=d(S).map(L=>e.find($=>$.id===L)),R=C.length?1+Math.max(...C.map(L=>p(L,A))):0;return f.set(S.id,R),R},m=[...sc,"Other"],g=[];for(const S of e)(g[p(S)]??=[]).push(S);const v=g.length>4?30:46,y=Math.max(150,Math.min(270,(l-gi*2-Math.max(0,g.length-1)*v)/Math.max(1,g.length)));for(const S of g)S?.sort((A,C)=>m.indexOf(A.area??"Other")-m.indexOf(C.area??"Other")||am(A.id)-am(C.id));const x=Math.max(1,...g.map(S=>S?.length??0)),k=im+x*(ar+uu)+gi,b=new Map;g.forEach((S,A)=>{const C=(x-(S?.length??0))*(ar+uu)/2;S?.forEach((R,L)=>b.set(R.id,{x:gi+A*(y+v),y:im+C+L*(ar+uu)}))});const T=gi*2+g.length*y+Math.max(0,g.length-1)*v,w=S=>s!==null&&!s.has(S),E=["Starting points","Built on them","One more level","And on those","And further"];return r.jsx("div",{className:"dmap",ref:u,onMouseLeave:()=>o(null),children:r.jsxs("div",{className:"dmap-canvas",style:{width:T,height:k},children:[g.map((S,A)=>r.jsx("span",{className:"dmap-layer",style:{left:gi+A*(y+v),width:y},children:E[A]??`Level ${A+1}`},A)),r.jsxs("svg",{width:T,height:k,className:"dmap-edges",children:[r.jsxs("defs",{children:[r.jsx("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:r.jsx("path",{d:"M0 1 L9 5 L0 9 z",className:"arrhead"})}),r.jsx("marker",{id:"arr-r",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:r.jsx("path",{d:"M0 1 L9 5 L0 9 z",className:"arrhead replaces"})})]}),e.flatMap(S=>{const A=b.get(S.id);return!A||!n(S)?[]:[...(S.buildsOn??[]).map(R=>({p:R,kind:"built"})),...S.replaces?[{p:S.replaces,kind:"replaces"}]:[]].map(({p:R,kind:L})=>{const $=b.get(R),U=e.find(V=>V.id===R);if(!$||!U||!n(U))return null;const W=$.x+y,ee=$.y+ar/2,Q=A.x-2,_=A.y+ar/2,B=Math.max(40,(Q-W)/2),N=s!==null&&s.has(S.id)&&s.has(R);return r.jsx("path",{className:`edge ${L} ${w(S.id)||w(R)?"off":""} ${N?"lit":""}`,d:`M${W} ${ee} C${W+B} ${ee}, ${Q-B} ${_}, ${Q} ${_}`,markerEnd:`url(#${L==="replaces"?"arr-r":"arr"})`},`${R}-${S.id}-${L}`)})})]}),e.map(S=>{const A=b.get(S.id),C=S.tickets.filter(U=>U!==S.from),R=t.filter(U=>(U.state==="designed"||U.state==="coming")&&U.follows.includes(S.id)&&!C.includes(U.id)),L=[S.from==="Project scan"?"Scan":S.from,...C],$=L.length+R.length-6;return r.jsxs("button",{className:`dcard area-${(S.area??"Other").toLowerCase()} ${n(S)?"":"later"} ${w(S.id)?"off":""} ${i===S.id?"picked":""} ${S.replacedBy?"old":""}`,style:{left:A.x,top:A.y,width:y,height:ar},onClick:()=>a({kind:"adr",id:S.id}),onMouseEnter:()=>o(S.id),children:[r.jsxs("span",{className:"dhead",children:[r.jsx("i",{}),r.jsx("span",{className:"mono",children:S.id}),r.jsx("span",{className:"darea",children:S.area??"Other"}),S.checkedBy?.passing&&r.jsx(J,{size:13,strokeWidth:3,className:"dtest","aria-label":"Checked by a test"})]}),r.jsx("b",{className:"dtitle",children:S.title}),r.jsx("span",{className:"dchips",children:S.replacedBy?r.jsxs("span",{className:"dchip ahead",children:["Replaced by ",S.replacedBy]}):r.jsxs(r.Fragment,{children:[L.slice(0,6).map((U,W)=>r.jsx("span",{className:`dchip ${W===0?"made":""}`,title:W===0?"Made this decision":"Its design followed it",children:U},U)),R.slice(0,Math.max(0,6-L.length)).map(U=>r.jsx("span",{className:"dchip ahead",title:"Designed, not built yet: will follow it",children:U.id},U.id)),$>0&&r.jsxs("span",{className:"dchip",children:["+",$]})]})})]},S.id)})]})})}const du=30,aP=26,co=250,oP=62;function lP({decisions:e,areas:t,shown:n,related:s,picked:i,onPick:a,g:o}){const[l,c]=j.useState(1e3),u=j.useRef(null);j.useEffect(()=>{const w=u.current;if(!w)return;const E=new ResizeObserver(()=>c(w.clientWidth));return E.observe(w),()=>E.disconnect()},[]);const h=o.cols.length,d=Math.max(40,Math.min(64,(l-co-24)/Math.max(1,h))),f=o.rows.filter(w=>t.size===0||t.has(w.area)),p=new Map;let m=oP+8,g="";const v=[];for(const w of f)w.area!==g&&(g=w.area,m+=aP,v.push({area:w.area,y:m-18})),p.set(w.d.id,m),m+=du;const y=m+12,x=co+h*d+16,k=w=>co+w*d+d/2,b=w=>w<n,T=w=>s!==null&&!s.has(w);return r.jsx("div",{className:"arch-graph",ref:u,children:r.jsxs("svg",{width:x,height:y,role:"img","aria-label":"Decisions over time, and the tickets that followed them",children:[o.cols.map((w,E)=>r.jsxs("g",{className:`col state-${w.t?.state??"scan"} ${b(E)?"":"later"} ${T(w.key)?"dim":""}`,onClick:()=>w.t&&a({kind:"ticket",id:w.key}),children:[r.jsx("rect",{className:"colbg",x:co+E*d+2,y:6,width:d-4,height:y-12,rx:10}),r.jsx("text",{className:"colid",x:k(E),y:26,textAnchor:"middle",children:w.label}),r.jsx("circle",{className:"colstate",cx:k(E),cy:42,r:4}),r.jsx("title",{children:w.t?`${w.t.id} · ${w.t.title}
|
|
499
|
-
${Bd[w.t.state]}`:"What the Architect found when it first read the project"})]},w.key)),v.map(w=>r.jsx("text",{className:`lane area-${w.area.toLowerCase()}`,x:14,y:w.y,children:w.area.toUpperCase()},w.area)),f.map(w=>{const E=p.get(w.d.id),S=o.colOf(w.d.from);if(!b(S))return null;const A=w.d.replacedBy?o.colOf(b3(e,w.d.replacedBy)):h-1,C=Math.min(A,n-1),R=`track area-${w.area.toLowerCase()} ${T(w.d.id)?"dim":""} ${i===w.d.id?"picked":""}`;return r.jsxs("g",{className:R,onClick:()=>a({kind:"adr",id:w.d.id}),children:[r.jsx("rect",{className:"hit",x:0,y:E-du/2,width:x,height:du}),r.jsxs("text",{className:"name",x:14,y:E+4,children:[r.jsx("tspan",{className:"rid",children:w.d.id})," ",mP(w.d.title,28)]}),r.jsx("line",{className:`rail ${w.d.replacedBy&&A<n?"gone":""}`,x1:k(S),x2:k(C)+(w.d.replacedBy?0:d/2),y1:E,y2:E}),o.cols.map((L,$)=>$>S&&b($)&&L.t?.follows.includes(w.d.id)?r.jsx("circle",{className:`dot ${L.t.state==="designed"||L.t.state==="coming"?"open":""}`,cx:k($),cy:E,r:5,children:r.jsx("title",{children:`${L.t.id} followed ${w.d.id}`})},L.key):null),r.jsx("circle",{className:`node ${w.d.replacedBy?"old":""}`,cx:k(S),cy:E,r:8}),w.d.checkedBy?.passing&&r.jsx("path",{className:"tick",d:`M${k(S)-3.5} ${E} l2.5 2.6 l4.8 -5`}),r.jsx("title",{children:`${w.d.id} · ${w.d.title}
|
|
500
|
-
Chosen: ${w.d.chosen}`})]},w.d.id)}),f.flatMap(w=>{const E=p.get(w.d.id),S=o.colOf(w.d.from);return b(S)?[...(w.d.buildsOn??[]).map(C=>({b:C,kind:"built"})),...w.d.replaces?[{b:w.d.replaces,kind:"replaces"}]:[]].map(({b:C,kind:R})=>{const L=p.get(C);if(L===void 0)return null;const $=E>L?1:-1;return r.jsxs("g",{className:`link ${R} ${T(w.d.id)||T(C)?"dim":""}`,children:[r.jsx("path",{d:`M${k(S)} ${L+6*$} L${k(S)} ${E-9*$}`}),r.jsx("circle",{cx:k(S),cy:L,r:3.2})]},`${w.d.id}-${C}-${R}`)}):[]})]})})}function cP({decisions:e,tickets:t,onPick:n}){return r.jsxs("div",{className:"arch-cards",children:[r.jsxs("div",{className:"arch-card",children:[r.jsx("h4",{children:"What a new ticket inherits today"}),r.jsx("p",{className:"note",children:"The Architect, the Builder and the Reviewer read all of these before they start."}),[...sc,"Other"].map(s=>{const i=e.filter(a=>!a.replacedBy&&(a.area??"Other")===s);return i.length?r.jsxs("div",{className:`inherit area-${s.toLowerCase()}`,children:[r.jsxs("b",{children:[r.jsx("i",{})," ",s]}),i.map(a=>r.jsxs("button",{onClick:()=>n({kind:"adr",id:a.id}),children:[r.jsx("span",{className:"mono",children:a.id})," ",a.title]},a.id))]},s):null})]}),r.jsxs("div",{className:"arch-card",children:[r.jsx("h4",{children:"Coming next"}),r.jsx("p",{className:"note",children:"Tickets not built yet, and the past decisions that will shape them."}),t.filter(s=>s.state==="designed"||s.state==="coming").map(s=>r.jsxs("div",{className:"coming",children:[r.jsxs("button",{onClick:()=>n({kind:"ticket",id:s.id}),children:[r.jsx("span",{className:"mono",children:s.id})," ",s.title]}),r.jsx("span",{className:"pills",children:s.follows.length?s.follows.map(i=>r.jsx("button",{className:"pill click",onClick:()=>n({kind:"adr",id:i}),children:i},i)):r.jsxs("span",{className:"note",children:["Not designed yet. Will read the ",e.filter(i=>!i.replacedBy).length," rules in force."]})})]},s.id))]})]})}function uP({decisions:e,picked:t,onPick:n}){return r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{style:{width:90},children:"ID"}),r.jsx("th",{children:"Decision"}),r.jsx("th",{style:{width:110},children:"Area"}),r.jsx("th",{style:{width:120},children:"From"}),r.jsx("th",{style:{width:150},children:"Checked by"})]})}),r.jsx("tbody",{children:[...e].reverse().map(s=>r.jsxs("tr",{className:`click ${t===s.id?"on":""}`,onClick:()=>n({kind:"adr",id:s.id}),children:[r.jsx("td",{className:"mono",children:s.id}),r.jsxs("td",{style:{fontWeight:t===s.id?600:500,color:s.replacedBy?"var(--dim)":void 0},children:[s.replacedBy?r.jsx("s",{children:s.title}):s.title," ",s.replacedBy&&r.jsxs("span",{className:"pill wait",children:["Replaced by ",s.replacedBy]})]}),r.jsx("td",{children:r.jsxs("span",{className:`areatag area-${(s.area??"Other").toLowerCase()}`,children:[r.jsx("i",{})," ",s.area??"Other"]})}),r.jsx("td",{style:{color:"var(--muted)",fontSize:13},children:s.from}),r.jsx("td",{children:s.checkedBy?s.checkedBy.passing?r.jsxs("span",{className:"pill ok",children:[r.jsx(J,{size:13,strokeWidth:2.5})," A ",s.checkedBy.kind]}):r.jsx("span",{className:"pill you",children:"Test being written"}):r.jsx("span",{className:"pill wait",children:"Not checkable"})})]},s.id))})]})}function dP({pick:e,decisions:t,tickets:n,impact:s,onPick:i}){const a=d=>r.jsx("button",{className:"pill click",onClick:()=>i({kind:"adr",id:d}),children:d},d),o=d=>{const f=n.find(p=>p.id===d);return r.jsx("button",{className:`pill click st-${f?.state??"shipped"}`,title:f?`${f.title} · ${Bd[f.state]}`:d,onClick:()=>i({kind:"ticket",id:d}),children:d},d)};if(e?.kind==="ticket"){const d=n.find(f=>f.id===e.id);return d?r.jsxs("aside",{className:"sidepanel arch-side",children:[r.jsxs("span",{className:"note mono",children:[d.id," · ",Bd[d.state],d.release?` · ${d.release}`:""]}),r.jsx("h3",{children:d.title}),r.jsx("div",{className:"lbl",children:"Decision it made"}),d.made?r.jsxs("p",{style:{fontSize:13.5},children:[a(d.made)," ",t.find(f=>f.id===d.made)?.title]}):r.jsx("p",{className:"note",children:"None. It worked inside the rules it had."}),r.jsx("div",{className:"lbl",children:"Past decisions its design followed"}),d.follows.length?r.jsx("div",{className:"pills",children:d.follows.map(a)}):r.jsx("p",{className:"note",children:d.state==="coming"?"Not designed yet. When it is, it reads every rule in force.":"None recorded."}),r.jsx("p",{style:{marginTop:18},children:r.jsx(Pe,{to:"/board",search:{ticket:d.id},className:"btn",children:"Open the ticket"})})]}):r.jsx("aside",{className:"sidepanel arch-side",children:r.jsx("p",{className:"note",children:"That ticket is not on this board."})})}const l=e?.kind==="adr"?t.find(d=>d.id===e.id):void 0;if(!l)return r.jsxs("aside",{className:"sidepanel arch-side",children:[r.jsx("span",{className:"note mono",children:"HOW IT WORKS"}),r.jsx("h3",{children:"Every choice is remembered"}),r.jsx("p",{style:{fontSize:13.5,marginTop:8},children:"When a ticket needs a technical choice, the Architect writes it with the options and the why. You approve it with the design. From then on it is a rule: every later ticket reads it, and the tickets whose design used it are linked here."}),r.jsx("p",{style:{fontSize:13.5,marginTop:10},children:"A new decision can build on an older one, or replace it. A replaced decision stops being a rule, but its history stays."}),r.jsx("p",{className:"note",style:{marginTop:14},children:"Point at a decision to light up what it touched. Click it for the full story. Press Play to watch the project grow."})]});const c=t.filter(d=>d.buildsOn?.includes(l.id)),u=l.tickets.filter(d=>d!==l.from),h=n.filter(d=>(d.state==="designed"||d.state==="coming")&&d.follows.includes(l.id)&&!u.includes(d.id));return r.jsxs("aside",{className:"sidepanel arch-side",children:[r.jsxs("span",{className:"note mono",children:[l.id," · ",l.area??"Other"," · approved by ",l.approvedBy," · ",Zs(l.date)]}),r.jsx("h3",{children:l.title}),l.replacedBy&&r.jsxs("div",{className:"box",style:{borderColor:"var(--you-line)",background:"var(--you-soft)",marginTop:8},children:[r.jsx("b",{children:"No longer a rule."})," Replaced by ",a(l.replacedBy),"."]}),r.jsx("div",{className:"lbl",children:"Chosen"}),r.jsx("p",{style:{fontSize:13.5,fontWeight:600},children:l.chosen}),r.jsx("div",{className:"lbl",children:"Why"}),r.jsx("p",{style:{fontSize:13.5},children:l.why}),l.options.length>1&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Also looked at"}),l.options.filter(d=>d!==l.chosen).map(d=>r.jsx("p",{className:"note",style:{fontSize:13},children:d},d))]}),r.jsx("div",{className:"lbl",children:"Where it came from"}),r.jsxs("div",{className:"pills",style:{alignItems:"center"},children:[l.from==="Project scan"?r.jsx("span",{className:"pill",children:"Project scan"}):o(l.from),(l.buildsOn??[]).length>0&&r.jsx("span",{className:"note",children:"built on"}),(l.buildsOn??[]).map(a),l.replaces&&r.jsx("span",{className:"note",children:"replaces"}),l.replaces&&a(l.replaces)]}),r.jsx("div",{className:"lbl",children:"What it shaped"}),u.length||c.length?r.jsxs(r.Fragment,{children:[u.length>0&&r.jsx("p",{className:"note",style:{marginBottom:6},children:"Tickets whose design followed it"}),r.jsx("div",{className:"pills",children:u.map(o)}),c.length>0&&r.jsx("p",{className:"note",style:{margin:"10px 0 6px"},children:"Decisions built on it"}),r.jsx("div",{className:"pills",children:c.map(d=>a(d.id))})]}):r.jsx("p",{className:"note",children:"Nothing yet. Every new ticket reads it."}),h.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Still ahead"}),r.jsx("p",{className:"note",style:{marginBottom:6},children:"Designed, not built yet. They will follow it."}),r.jsx("div",{className:"pills",children:h.map(d=>o(d.id))})]}),r.jsx(hP,{d:l,check:s.find(d=>d.adr===l.id),tk:o}),r.jsx("div",{className:"lbl",children:"Checked by"}),l.checkedBy?r.jsxs("div",{className:"box",children:[r.jsx("b",{style:{color:l.checkedBy.passing?"var(--accent)":"var(--you-ink)"},children:l.checkedBy.passing?"Passing":"Being written"})," ",r.jsx("span",{className:"mono",style:{fontSize:12},children:l.checkedBy.name}),r.jsx("p",{className:"note",style:{marginTop:4},children:"If someone breaks this decision, the checks fail and nothing ships."})]}):r.jsx("p",{className:"note",children:"A fact about the project, nothing to test."})]})}function hP({d:e,check:t,tk:n}){const s=Y();if(e.replacedBy)return null;const i=t?.status==="pending"||t?.status==="running"||s.isPending,a=()=>s.mutate({path:"/api/v1/architecture/impact",body:{adr:e.id},done:`The Architect is checking the open tickets against ${e.id}.`});return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"lbl",children:"Tickets planned before it"}),i?r.jsxs("p",{className:"note",style:{display:"flex",gap:8,alignItems:"center"},children:[r.jsx(hn,{size:13,className:"spin"})," The Architect is checking the open tickets."]}):t?.status==="done"?r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"note",style:{marginBottom:6},children:t.checked?.length?`Checked ${t.checked.length} open ${t.checked.length===1?"ticket":"tickets"} ${t.at?An(t.at):""}. ${t.affected?.length?"These need a change, waiting for you:":"None need a change."}`:"No open ticket was planned before it."}),r.jsx("div",{className:"pills",children:(t.affected??[]).map(n)}),r.jsx("button",{className:"btn sm quiet",style:{marginTop:8},onClick:a,children:"Check again"})]}):r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"note",style:{marginBottom:8},children:t?.status==="failed"?`The last check stopped: ${t.error??""}`:"Not checked yet. Plans written before it may still do it the old way."}),r.jsx("button",{className:"btn sm",onClick:a,children:"Check open tickets"})]})]})}function pP(e,t){const n=[];e.some(o=>!t.some(l=>l.id===o.from))&&n.push({key:"scan",label:"Scan"});for(const o of t)n.push({key:o.id,label:o.id,t:o});const s=o=>{const l=n.findIndex(c=>c.key===o);return l<0?0:l},i=[...sc,"Other"],a=e.map(o=>({d:o,area:o.area??"Other"})).sort((o,l)=>i.indexOf(o.area)-i.indexOf(l.area)||s(o.d.from)-s(l.d.from));return{cols:n,rows:a,colOf:s}}function b3(e,t){return e.find(n=>n.id===t)?.from??""}function fP(e,t,n){if(!e)return null;const s=new Set([e.id]),i=l=>[...l.buildsOn??[],...l.replaces?[l.replaces]:[]];if(e.kind==="ticket"){const l=n.find(c=>c.id===e.id);for(const c of l?.follows??[])s.add(c);return l?.made&&s.add(l.made),s}const a=[e.id];for(;a.length;){const l=a.pop(),c=t.find(u=>u.id===l);for(const u of c?i(c):[])s.has(u)||(s.add(u),a.push(u))}const o=[e.id];for(;o.length;){const l=o.pop();for(const c of t)i(c).includes(l)&&!s.has(c.id)&&(s.add(c.id),o.push(c.id))}for(const l of[...s]){const c=t.find(u=>u.id===l);if(c&&l===e.id)for(const u of c.tickets)s.add(u);c&&s.add(c.from)}for(const l of n)l.follows.includes(e.id)&&s.add(l.id);return s}function mP(e,t){return e.length>t?`${e.slice(0,t-1).trimEnd()}…`:e}function am(e){return Number(e.replace(/\D/g,""))||0}function gP(){const e=ft(),t=e.data?.ready?e.data.tickets.filter(n=>n.waiting||n.outdated?.length||on(n)):[];return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"top",children:[r.jsx("h1",{children:"Waiting for you"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:"squad inbox"})]}),r.jsx("div",{className:"scroll",children:r.jsx("div",{className:"page",children:t.length===0?r.jsxs("div",{className:"calm",children:[r.jsx("span",{className:"ring",children:r.jsx(J,{size:18,strokeWidth:2.5})}),r.jsxs("div",{children:[r.jsx("b",{children:"Nothing needs you right now"}),r.jsx("span",{children:"The squad is working. Questions, plans, proof and decisions land here."})]})]}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:t.map(n=>r.jsxs("div",{className:"wcard",style:{padding:"16px 18px 16px 22px"},children:[r.jsxs("div",{className:"grow",children:[r.jsxs("div",{className:"meta",children:[r.jsx("span",{className:"id",children:n.id}),r.jsx("span",{children:cs[n.stage]}),r.jsx("span",{children:An(n.activity[0]?.at??n.createdAt)})]}),r.jsx("h3",{children:n.title}),r.jsx("p",{children:n.waiting?.summary??(on(n)?`Change ${Sa(n).id} to the spec waits for you`:ep(n))})]}),r.jsx(Z,{text:!n.waiting&&on(n)?`squad propose ${n.id} --approve`:Jh(n)}),n.waiting?.kind==="proof"?r.jsx(Pe,{to:"/tickets/$id/proof",params:{id:n.id},className:"btn pri sm",children:fl(n)}):r.jsx(Pe,{to:"/board",search:{ticket:n.id},className:"btn pri sm",children:n.waiting?fl(n):on(n)?"Check the change":"Check it"})]},n.id))})})})]})}function yP(){const e=ft(),[t,n]=j.useState(!1),s=e.data?.ready?e.data.tickets.filter(i=>i.kind==="bug"):[];return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"top",children:[r.jsx("h1",{children:"Bugs"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:'squad bug "What happened"'}),r.jsxs("button",{className:"btn pri",onClick:()=>n(!0),children:[r.jsx(Tn,{size:15})," Report a bug"]})]}),r.jsx("div",{className:"scroll",children:r.jsxs("div",{className:"page",children:[r.jsx("p",{className:"note",style:{marginBottom:12},children:"Each bug is a ticket linked to the release it was found in. It goes around the same loop, and the Tester adds a check so it can't come back."}),s.length===0?r.jsx("p",{className:"note",children:"No open bugs."}):r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{style:{width:90},children:"ID"}),r.jsx("th",{children:"What happened"}),r.jsx("th",{style:{width:120},children:"Found in"}),r.jsx("th",{style:{width:120},children:"Stage"}),r.jsx("th",{style:{width:240},children:"Now"})]})}),r.jsx("tbody",{children:s.map(i=>r.jsxs("tr",{children:[r.jsx("td",{className:"mono",children:i.id}),r.jsx("td",{children:r.jsx(Pe,{to:"/board",search:{ticket:i.id},style:{fontWeight:600},children:i.title})}),r.jsx("td",{children:i.foundIn??""}),r.jsx("td",{children:cs[i.stage]}),r.jsx("td",{style:{color:i.waiting?"var(--you-ink)":"var(--muted)"},children:i.waiting?.summary??i.status})]},i.id))})]})]})}),t&&r.jsx(Mp,{onClose:()=>n(!1)})]})}const xP={claude:"Claude Code",codex:"Codex"};function vP(){const e=ft(),t=Sy(),n=e.data?.ready?e.data.meta:void 0,s=he({queryKey:["agents"],queryFn:()=>de("/api/v1/agents"),refetchInterval:2e3}),[i,a]=j.useState(null);return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"top",children:r.jsx("h1",{children:"Squad and AI"})}),r.jsx("div",{className:"scroll",children:r.jsxs("div",{className:"page",style:{maxWidth:900},children:[r.jsx("h2",{children:"The squad"}),r.jsx("p",{className:"note",style:{marginTop:2},children:"squad-kit is the lead. Each role is its own agent with its own session and tools, and the Reviewer always starts fresh, so every change gets a real second opinion. Strong models where a mistake is expensive, cheaper ones where the work is already clear. Edit an agent to give it house rules or change its models."}),r.jsx(kP,{}),r.jsx("div",{style:{marginTop:10},children:(s.data??[]).map(o=>r.jsxs("div",{className:"maprow",style:{gridTemplateColumns:"34px 120px 1fr 250px 70px",alignItems:"center"},children:[r.jsx(Qr,{role:o.role}),r.jsx("b",{children:o.name}),r.jsxs("span",{style:{fontSize:13},children:[r.jsx("span",{className:"note",children:o.job}),o.working.length>0&&r.jsx("span",{style:{display:"block",marginTop:3},children:o.working.map(l=>r.jsxs(Pe,{to:"/board",search:{ticket:l.id},style:{display:"block",color:"var(--accent)"},children:[r.jsx("b",{className:"mono",children:l.id})," ",l.status]},l.id))})]}),r.jsxs("span",{className:"pills",children:[r.jsx("span",{className:"pill",children:xP[o.tool]}),(()=>{const l=o.stepList.find(u=>u.id==="design")??o.stepList[0],c=o.levels?.find(u=>u.step===l?.id)?.now;return c?r.jsxs("span",{className:`pill ${c.from==="squad-kit"?"wait":""}`,title:`${l?.name}: ${j3(c)}`,children:[c.modelName||c.level,c.effort&&o.supportsEffort?` · ${zi[c.effort]}`:""]}):null})(),o.instructions.replace(/<!--[\s\S]*?-->/g,"").trim()&&r.jsx("span",{className:"pill ok",children:"House rules"})]}),r.jsx("button",{className:"btn sm",onClick:()=>a(o),children:"Edit"})]},o.role))}),r.jsxs("div",{className:"maprow",style:{marginTop:4},children:[r.jsx("b",{children:"Tickets at once"}),r.jsxs("span",{className:"note",children:["Up to ",t.data?.parallel??n?.parallel??2,", shared by all your projects. Change it in Settings."]})]}),r.jsx(hT,{}),r.jsx("h2",{style:{marginTop:30},children:"Your AI tools"}),r.jsx("p",{className:"note",style:{marginTop:2},children:"squad-kit uses the logins you already have. Nothing new to buy."}),(n?.tools??[]).map(o=>r.jsxs("div",{className:"toolrow",children:[r.jsx("span",{className:"logo",children:r.jsx(pl,{size:18})}),r.jsxs("span",{children:[r.jsx("b",{children:o.name}),r.jsx("br",{}),r.jsx("span",{className:"note",children:o.name==="Codex"?"Your ChatGPT subscription":"Your Claude subscription"})]}),r.jsx("span",{className:`pill ${o.ready?"ok":"wait"}`,children:o.ready?"Ready":"Not found"})]},o.name)),r.jsxs("div",{className:"toolrow off",children:[r.jsx("span",{className:"logo",children:r.jsx(pl,{size:18})}),r.jsxs("span",{children:[r.jsx("b",{children:"Gemini CLI, Copilot CLI, Cursor"}),r.jsx("br",{}),r.jsx("span",{className:"note",children:"Coming next"})]}),r.jsx("span",{})]})]})}),i&&r.jsx(wP,{agent:i,onClose:()=>a(null)})]})}const om=[{id:"best",name:"Best",note:"The strongest model builds and reviews. Uses your plan's limits faster."},{id:"balanced",name:"Balanced",note:"The strongest model at medium effort."},{id:"thrifty",name:"Thrifty",note:"A lighter model builds. Cheapest."}];function kP(){const e=ft(),t=Y(),n=e.data?.ready?e.data.meta:void 0;if(!n)return null;const s=n.quality??"best";return r.jsxs("div",{className:"maprow",style:{marginTop:6},children:[r.jsx("b",{style:{paddingTop:4},children:"Quality"}),r.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:6,minWidth:0},children:[r.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[om.map(i=>r.jsx("button",{className:`btn sm ${i.id===s?"pri":""}`,"aria-pressed":i.id===s,onClick:()=>t.mutate({path:"/api/v1/settings",method:"PUT",body:{quality:i.id},done:`Quality is ${i.name} now. The squad uses it from its next step.`}),children:i.name},i.id)),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad config set quality ${s}`})]}),om.map(i=>r.jsxs("span",{className:"note",style:{fontSize:12.5,...i.id===s?{color:"var(--text)"}:{}},children:[r.jsxs("b",{children:[i.name,":"]})," ",i.note]},i.id))]})]})}function wP({agent:e,onClose:t}){const n=Y(),s=b=>(b??"").replace(/<!--[\s\S]*?-->/g,"").trim(),[i,a]=j.useState(e.tool),[o,l]=j.useState(e.model),[c,u]=j.useState(e.youRole?.model??""),[h,d]=j.useState(()=>Object.fromEntries(e.levels.map(b=>[b.step,b.team??{}]))),[f,p]=j.useState(()=>Object.fromEntries(e.levels.map(b=>[b.step,b.you??{}]))),[m,g]=j.useState(s(e.instructions)),[v,y]=j.useState(()=>Object.fromEntries(e.stepList.map(b=>[b.id,s(e.steps?.[b.id])]))),x=he({queryKey:["core-prompts",e.role],queryFn:()=>de(`/api/v1/agents/${e.role}/prompts`)}),k=async()=>{const b=(w,E)=>(w?.level??"")===(E.level??"")&&(w?.effort??"")===(E.effort??"");try{for(const w of e.levels)b(w.you,f[w.step])||await St("/api/v1/me/levels","PUT",{key:`${e.role}.${w.step}`,...f[w.step]});(e.youRole?.model??"")!==c.trim()&&await St("/api/v1/me/levels","PUT",{key:e.role,...e.youRole,model:c.trim()})}catch(w){return n.reset(),alert(w instanceof Error?w.message:String(w))}const T={};(e.teamRole?.level||e.teamRole?.effort)&&(T[e.role]={level:e.teamRole.level,effort:e.teamRole.effort});for(const[w,E]of Object.entries(h))(E.level||E.effort)&&(T[`${e.role}.${w}`]=E);n.mutate({path:`/api/v1/agents/${e.role}`,method:"PUT",body:{tool:i,model:o,instructions:m,steps:v,levels:T},done:`${e.name} saved. It uses this from its next step.`},{onSuccess:t})};return r.jsxs(it,{title:`Edit the ${e.name}`,wide:!0,onClose:t,footer:r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"btn pri",disabled:n.isPending,onClick:k,children:"Save"}),r.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),r.jsx("span",{className:"grow"}),r.jsx("span",{className:"note mono",style:{fontSize:12},children:e.file})]}),children:[r.jsxs("p",{className:"note",style:{marginTop:0},children:[e.job,"."]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"AI tool"}),r.jsxs("select",{className:"input",value:i,onChange:b=>a(b.target.value),children:[r.jsx("option",{value:"claude",children:"Claude Code"}),r.jsx("option",{value:"codex",disabled:!0,children:"Codex (coming soon)"})]})]}),r.jsx(jP,{agent:e,team:h,setTeam:d,you:f,setYou:p}),r.jsxs("details",{style:{marginTop:8},children:[r.jsx("summary",{className:"note",children:"Pin exact models (advanced)"}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"For the team"}),r.jsx("input",{className:"input mono",style:{fontSize:13},value:o,placeholder:"Empty: use the levels above",onChange:b=>l(b.target.value)})]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Just for me"}),r.jsx("input",{className:"input mono",style:{fontSize:13},value:c,placeholder:"Empty: use the levels above",onChange:b=>u(b.target.value)})]}),r.jsx("p",{className:"note",style:{fontSize:12.5},children:"A pinned model wins over every level. Levels are better for the team: they work whatever AI tool each person uses."})]}),r.jsxs("div",{style:{marginTop:12},children:[r.jsx("b",{style:{display:"block",marginBottom:6},children:"House rules for every step"}),r.jsx("textarea",{className:"input",rows:4,style:{width:"100%",resize:"vertical"},value:m,placeholder:`Extra instructions the ${e.name} reads in every step, in plain words.`,onChange:b=>g(b.target.value)})]}),r.jsxs("p",{className:"note",style:{fontSize:12.5},children:["Each step has a core prompt that squad-kit keeps and improves with every release. Your instructions are added to it, never instead of it.",x.data&&` The prompts below are filled in from ${x.data.ticket.id} "${x.data.ticket.title}".`]}),e.stepList.map(b=>{const T=x.data?.prompts.find(w=>w.step===b.id);return r.jsxs("div",{className:"agentstep",children:[r.jsx("b",{children:b.name}),r.jsx("textarea",{className:"input",rows:2,style:{width:"100%",resize:"vertical"},value:v[b.id]??"",placeholder:`Only for the ${b.name} step. For example: ${SP[b.id]??"keep it short"}.`,onChange:w=>y({...v,[b.id]:w.target.value})}),r.jsxs("details",{children:[r.jsxs("summary",{children:["Core prompt for ",b.name,", read only"]}),r.jsx("pre",{className:"coreprompt",children:T?T.prompt:x.isLoading?"Loading…":"Not available."})]})]},b.id)})]})}function j3(e){const t=e.from==="project"?"set by the team":e.from==="you"?"set by you":"squad-kit's default";return`${e.modelName||e.level} (${e.model?"pinned":e.level}${e.effort?`, ${zi[e.effort]} effort`:""}), ${t}${e.why?`, ${e.why}`:""}`}const bP={strongest:"Strongest",balanced:"Balanced",fast:"Fast"},zi={xhigh:"extra high",high:"high",medium:"medium",low:"low"};function lm({value:e,onChange:t,below:n,agent:s}){return r.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:4,minWidth:0},children:[r.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.level??"",onChange:i=>t({...e,level:i.target.value||void 0}),"aria-label":"Level",children:[r.jsxs("option",{value:"",children:["Default",n.level?` (${n.level})`:""]}),["strongest","balanced","fast"].map(i=>r.jsxs("option",{value:i,children:[bP[i],s.modelOf[i]?` · ${s.modelOf[i]}`:""]},i))]}),s.supportsEffort&&r.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.effort??"",onChange:i=>t({...e,effort:i.target.value||void 0}),"aria-label":"Effort",children:[r.jsxs("option",{value:"",children:["Default",n.effort?` (${zi[n.effort]} effort)`:""]}),s.efforts.map(i=>r.jsxs("option",{value:i,children:[zi[i].charAt(0).toUpperCase(),zi[i].slice(1)," effort"]},i))]})]})}function jP({agent:e,team:t,setTeam:n,you:s,setYou:i}){return r.jsxs("div",{style:{marginTop:12},children:[r.jsx("b",{style:{display:"block",marginBottom:2},children:"Models"}),r.jsx("p",{className:"note",style:{marginTop:0,fontSize:12.5},children:"squad-kit picks a level for each step from the Quality setting: strongest where a mistake is expensive, cheaper where the work is clear. Change it for the whole team, or just for you. After a failed try, the Builder moves up a level on its own."}),r.jsxs("div",{className:"levels",role:"table",children:[r.jsxs("div",{className:"levrow head",role:"row",children:[r.jsx("span",{children:"Step"}),r.jsx("span",{children:"For the team"}),r.jsx("span",{children:"Just for me"}),r.jsx("span",{children:"Now"})]}),e.levels.map(a=>r.jsxs("div",{className:"levrow",role:"row",children:[r.jsx("span",{children:a.name}),r.jsx(lm,{agent:e,value:t[a.step]??{},below:a.standard,onChange:o=>n({...t,[a.step]:o})}),r.jsx(lm,{agent:e,value:s[a.step]??{},below:{...a.standard,...t[a.step]??{}},onChange:o=>i({...s,[a.step]:o})}),r.jsx("span",{className:"note",style:{fontSize:12.5},children:j3(a.now)})]},a.step))]})]})}const SP={questions:"always ask who will use it",spec:'write "done when" items a clerk can check by hand',scan:"the old /legacy folder is not used",design:"prefer the existing service layer over new packages",build:"use our logger, never console.log",fix:"never turn a failing test off",review:"check every query for missing tenant filters",proof:"take screenshots in Arabic too"},NP=[{key:"setup",label:"Set up",hint:"Installs what the project needs, e.g. npm install"},{key:"test",label:"Test",hint:"Runs the tests, e.g. npm test"},{key:"lint",label:"Lint",hint:"Checks code style, e.g. npm run lint"},{key:"build",label:"Build",hint:"Builds the project, e.g. npm run build"},{key:"start",label:"Start",hint:"Runs the app for screenshots, e.g. npm start"},{key:"url",label:"App address",hint:"Where the app opens, e.g. http://localhost:3000"},{key:"deploy",label:"Pipeline",hint:"Runs after a release, e.g. az pipelines run …"}];function CP(){const e=ft(),t=e.data?.ready?e.data.meta:void 0;if(!t)return null;const n=t.repos?.length?t.repos:[{path:".",base:t.git?.base??"main",remote:t.git?.remote??"",commands:t.commands??{}}],s=!!t.repos?.length;return r.jsxs(r.Fragment,{children:[r.jsx("h2",{style:{marginTop:6},children:"How the squad checks and runs this project"}),r.jsxs("p",{className:"note",style:{margin:"2px 0 10px"},children:["The Architect filled these in when it read the project. squad-kit runs Test, Lint and Build itself before anything ships.",s&&" This workspace has several code repos; each ticket works in one of them."]}),n.map(i=>r.jsx(EP,{repo:i,multi:s},i.path)),r.jsx(_P,{})]})}function EP({repo:e,multi:t}){const n=Y(),[s,i]=j.useState(null),[a,o]=j.useState(null),l=s??e.commands,c=a??{base:e.base,remote:e.remote},u=()=>{const h=t?{repos:[{path:e.path,...c,commands:l}]}:{commands:l,git:c};n.mutate({path:"/api/v1/settings",method:"PUT",body:h,done:"Settings saved"},{onSuccess:()=>{i(null),o(null)}})};return r.jsxs("div",{style:{marginBottom:24},children:[t&&r.jsxs("h3",{className:"mono",style:{fontSize:14,margin:"18px 0 2px"},children:[e.path,e.summary&&r.jsx("span",{className:"note",style:{fontFamily:"inherit",marginLeft:8},children:e.summary})]}),NP.map(h=>r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:h.label}),r.jsx("input",{className:"input mono",style:{fontSize:13},value:l[h.key]??"",placeholder:h.hint,onChange:d=>i({...l,[h.key]:d.target.value})})]},h.key)),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Release branch"}),r.jsx("input",{className:"input mono",style:{fontSize:13},value:c.base,onChange:h=>o({...c,base:h.target.value})})]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Push to"}),r.jsx("input",{className:"input mono",style:{fontSize:13},value:c.remote,placeholder:"origin (empty: no push)",onChange:h=>o({...c,remote:h.target.value})})]}),r.jsx("div",{style:{marginTop:12},children:r.jsxs("button",{className:"btn pri sm",disabled:!s&&!a,onClick:u,children:["Save",t?` ${e.path}`:""]})})]})}function TP(){const e=Y(),t=he({queryKey:["tracker"],queryFn:()=>de("/api/v1/tracker"),refetchInterval:6e4}),[n,s]=j.useState(null),i=t.data,a=n??{organization:i?.organization??"",project:i?.project??"",token:""},o=i?.type==="azure"&&i.user;return r.jsxs("div",{style:{marginBottom:26},children:[r.jsx("h2",{style:{marginTop:6},children:"Azure DevOps"}),r.jsx("p",{className:"note",style:{margin:"2px 0 10px"},children:"Stories and bugs come from Azure Boards. squad-kit moves them along as the squad works, opens a pull request for each finished ticket, and merges it when you release. Your token stays on this computer."}),i&&r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Status"}),r.jsx("span",{children:o?r.jsxs("span",{className:"pill ok",children:["Connected as ",i.user]}):i.type==="azure"?r.jsx("span",{className:"pill bug",children:i.error??(i.hasToken?"Not connected":"Needs a token")}):r.jsx("span",{className:"pill wait",children:"Not set up"})})]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Organization"}),r.jsx("input",{className:"input mono",style:{fontSize:13},value:a.organization,placeholder:"e.g. momenysr",onChange:l=>s({...a,organization:l.target.value})})]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Project"}),r.jsx("input",{className:"input mono",style:{fontSize:13},value:a.project,placeholder:"e.g. Mawid",onChange:l=>s({...a,project:l.target.value})})]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Token"}),r.jsx("input",{className:"input mono",style:{fontSize:13},type:"password",autoComplete:"off",value:a.token,placeholder:i?.hasToken?"Saved. Paste a new one to replace it":"Personal access token from Azure DevOps",onChange:l=>s({...a,token:l.target.value})})]}),r.jsxs("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:[r.jsx("button",{className:"btn pri sm",disabled:!n||e.isPending,onClick:()=>e.mutate({path:"/api/v1/tracker",method:"PUT",body:a,done:"Azure DevOps is connected"},{onSuccess:()=>{s(null),t.refetch()}}),children:e.isPending?"Checking…":"Save and check"}),r.jsx("span",{className:"note",children:"Token scopes: Work Items and Code (read, write and manage)."}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:"squad config set tracker"})]})]})}function PP(){const e=Y(),t=he({queryKey:["speech"],queryFn:()=>de("/api/v1/speech")}),[n,s]=j.useState(""),i=t.data?.hasKey,a=(o,l)=>e.mutate({path:"/api/v1/speech",method:"PUT",body:o,done:l},{onSuccess:()=>{s(""),t.refetch()}});return r.jsxs("div",{style:{marginBottom:26},children:[r.jsx("h2",{style:{marginTop:6},children:"Speech to text"}),r.jsx("p",{className:"note",style:{margin:"2px 0 10px"},children:"Agents cannot listen. With a Munsit key, squad-kit writes out every voice and video note you attach, in Arabic or English, and takes pictures of the screen in videos. Without a key, notes stay attached but nobody hears them. Your key stays on this computer."}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Status"}),r.jsx("span",{children:i?r.jsx("span",{className:"pill ok",children:"Munsit is set up"}):r.jsx("span",{className:"pill wait",children:"Not set up"})})]}),r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Munsit key"}),r.jsx("input",{className:"input mono",style:{fontSize:13},type:"password",autoComplete:"off",value:n,placeholder:i?"Saved. Paste a new one to replace it":"API key from munsit.com",onChange:o=>s(o.target.value)})]}),r.jsxs("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:[r.jsx("button",{className:"btn pri sm",disabled:!n.trim()||e.isPending,onClick:()=>a({munsit:n},"Munsit is set up"),children:"Save"}),i&&r.jsx("button",{className:"btn sm",disabled:e.isPending,onClick:()=>a({remove:!0},"Munsit key removed"),children:"Remove"})]})]})}function RP(){const{restarting:e,restart:t}=Ny();return r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Board"}),r.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[r.jsx("button",{className:"btn sm",disabled:e,onClick:()=>void t(),children:e?"Restarting…":"Restart the board"}),r.jsx("span",{className:"note",children:"Same link. Running work picks up where it stopped."}),r.jsx(Z,{text:"squad console --restart"})]})]})}function AP(){const e=ft(),t=Y(),n=e.data?.ready?e.data.meta:void 0;if(!n)return null;const s=n.runner??"acp",i=(a,o)=>t.mutate({path:"/api/v1/settings",method:"PUT",body:{runner:a},done:o});return r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Talk to Claude"}),r.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[r.jsx("button",{className:`btn sm ${s==="acp"?"pri":""}`,onClick:()=>i("acp","The squad talks to Claude through ACP"),children:"Agent Client Protocol"}),r.jsx("button",{className:`btn sm ${s==="direct"?"pri":""}`,onClick:()=>i("direct","The squad runs Claude Code directly"),children:"Directly"}),r.jsx("span",{className:"note",style:{marginLeft:6},children:"ACP is the open standard for agents. If it cannot start, a step runs Claude Code directly."})]})]})}function LP(){const e=Sy(),t=Y(),n=e.data;return n?r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Tickets at once"}),r.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[Array.from({length:n.max},(s,i)=>i+1).map(s=>r.jsx("button",{className:`btn sm ${s===n.parallel?"pri":""}`,onClick:()=>t.mutate({path:"/api/v1/app/settings",method:"PUT",body:{parallel:s},done:`Up to ${s} tickets at once, across all your projects`}),children:s},s)),r.jsx("span",{className:"note",style:{marginLeft:6},children:"How many tickets the squads work on at the same time, across all your projects. They share your AI accounts."})]})]}):null}function IP({on:e}){const t=Y();return r.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[r.jsx("b",{children:"Project documents in git"}),r.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[r.jsx("button",{className:"btn sm",onClick:()=>t.mutate({path:"/api/v1/settings",method:"PUT",body:{documentsInGit:!e},done:e?"Project documents stay out of git":"Project documents go into git with each ticket"}),children:e?"On: turn it off":"Off: turn it on"}),r.jsx("span",{className:"note",children:"On: each ticket's spec, design and decisions are committed with its code, so they reach the team through the pull request. Hand over needs it on."})]})]})}function _P(){const e=Y();return r.jsx("div",{style:{margin:"4px 0 26px"},children:r.jsx("button",{className:"btn sm",onClick:()=>e.mutate({path:"/api/v1/scan",done:"The Architect is reading the project again"}),children:"Read the project again"})})}function zP(){const e=ft(),{theme:t,toggleTheme:n,showCommands:s,toggleCommands:i}=Ce(),a=Y(),[o,l]=j.useState(!1),c=e.data?.ready?e.data.meta:void 0;return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"top",children:r.jsx("h1",{children:"Settings"})}),r.jsx("div",{className:"scroll",children:r.jsxs("div",{className:"page",style:{maxWidth:760},children:[r.jsxs("div",{className:"maprow",children:[r.jsx("b",{children:"Theme"}),r.jsx("span",{children:r.jsx("button",{className:"btn sm",onClick:n,children:t==="light"?"Switch to dark":"Switch to light"})})]}),r.jsxs("div",{className:"maprow",children:[r.jsx("b",{children:"Terminal commands"}),r.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center"},children:[r.jsx("button",{className:"btn sm",onClick:i,children:s?"Hide them":"Show them"}),r.jsx("span",{className:"note",children:"Every button shows the command that does the same thing."})]})]}),r.jsxs("div",{className:"maprow",children:[r.jsx("b",{children:"Project files"}),r.jsxs("span",{className:"note",children:[r.jsx("span",{className:"mono",style:{fontSize:13},children:".squad/"})," in the project folder: specs, decisions and releases, shared with the team. Live progress, chats and sign-ins stay on this computer."]})]}),c?.engine==="live"&&r.jsx(IP,{on:c.documentsInGit!==!1}),r.jsx(RP,{}),c?.engine==="live"&&r.jsx(LP,{}),c?.engine==="live"&&r.jsx(AP,{}),c?.engine==="live"&&r.jsx(TP,{}),c?.engine==="live"&&r.jsx(PP,{}),c?.engine==="live"&&r.jsx(CP,{}),c?.engine==="demo"&&r.jsxs("div",{className:"maprow",children:[r.jsx("b",{children:"Demo board"}),r.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[r.jsxs("button",{className:"btn sm danger",onClick:()=>l(!0),children:[r.jsx(xd,{size:13})," Start the demo over"]}),r.jsxs("span",{className:"note",children:["The squad plays back a recorded run at ",c.speed,"x speed."]})]})]}),r.jsx("h2",{style:{marginTop:26},children:"About squad-kit"}),r.jsx(Py,{})]})}),o&&r.jsx(it,{title:"Start the demo over?",onClose:()=>l(!1),footer:r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn pri",onClick:()=>a.mutate({path:"/api/v1/demo/reset",done:"The demo board is fresh again."},{onSuccess:()=>l(!1)}),children:[r.jsx(xd,{size:15})," Start over"]}),r.jsx("button",{className:"btn",onClick:()=>l(!1),children:"Cancel"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:"squad demo"})]}),children:r.jsx("p",{children:"Every ticket, release and decision goes back to how the demo starts."})})]})}const cm=2e3,um=e=>`/p/${encodeURIComponent(e)}`;function FP(e,t){const n=/\s/.test(t)?`"${t}"`:t;return e.replace(/\bsquad ([a-z-]+) (\S+)/g,`squad $1 $2 --project ${n}`)}function MP(e,t){return t&&e.startsWith(t)?`~${e.slice(t.length)}`:e}function OP(){const{theme:e,toggleTheme:t}=Ce(),n=he({queryKey:["app","projects"],queryFn:()=>de("/api/v1/app/projects"),refetchInterval:cm}),s=he({queryKey:["app","waiting"],queryFn:()=>de("/api/v1/app/waiting"),refetchInterval:cm}),[i,a]=j.useState(!1),[o,l]=j.useState(null),c=n.data?.projects??[],u=s.data?.items??[];return r.jsxs("div",{className:"home",children:[r.jsxs("header",{className:"home-top",children:[r.jsx("img",{src:"/logo.svg",alt:""}),r.jsx("b",{children:"squad-kit"}),r.jsx("span",{className:"grow"}),n.data&&r.jsx($P,{s:n.data}),r.jsx(I8,{}),r.jsx("button",{className:"theme",onClick:t,"aria-label":e==="light"?"Switch to dark":"Switch to light",children:e==="light"?r.jsx(Hl,{size:15}):r.jsx(Vl,{size:15})})]}),r.jsx(Ty,{}),r.jsx("div",{className:"scroll",children:r.jsxs("div",{className:"page home-page",children:[r.jsxs("section",{className:"home-projects",children:[r.jsxs("div",{className:"home-h",children:[r.jsx("h2",{children:"Projects"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:"squad projects"}),r.jsxs("button",{className:"btn pri",onClick:()=>a(!0),children:[r.jsx(Yt,{size:15})," Add project"]})]}),n.isLoading?null:c.length===0?r.jsxs("button",{className:"home-empty",onClick:()=>a(!0),children:[r.jsx(my,{size:22}),r.jsx("b",{children:"Add your first project"}),r.jsx("span",{children:"Pick its folder: one repo, a folder with several repos, or a new, empty folder for a new project."})]}):r.jsx("div",{className:"pcards",children:c.map(h=>r.jsx(DP,{p:h,onRemove:()=>l(h)},h.id))})]}),r.jsxs("section",{className:"home-inbox",children:[r.jsxs("div",{className:"home-h",children:[r.jsx("h2",{children:"Waiting for you"}),u.length>0&&r.jsx("span",{className:"badge you",children:u.length}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:"squad inbox"})]}),u.length===0?r.jsxs("div",{className:"calm",children:[r.jsx("span",{className:"ring",children:r.jsx(J,{size:18,strokeWidth:2.5})}),r.jsxs("div",{children:[r.jsx("b",{children:"Nothing needs you right now"}),r.jsx("span",{children:c.length?"The squads are working. Questions, plans, proof and decisions from every project land here.":"Add a project to start."})]})]}):r.jsx("div",{className:"home-waiting",children:u.map(({project:h,ticket:d})=>r.jsxs("div",{className:"wcard",children:[r.jsxs("div",{className:"grow",children:[r.jsxs("div",{className:"meta",children:[r.jsx("span",{className:"pill sm",children:h.name}),r.jsx("span",{className:"id",children:d.id}),r.jsx("span",{children:cs[d.stage]}),r.jsx("span",{children:An(d.activity[0]?.at??d.createdAt)})]}),r.jsx("h3",{children:d.title}),r.jsx("p",{children:d.waiting?.summary??(d.outdated?.length?ep(d):`Looks stuck: ${d.quiet?.detail??""}`)})]}),r.jsx(Z,{text:FP(Jh(d),h.name)}),r.jsx("a",{className:"btn pri sm",href:d.waiting?.kind==="proof"?`${um(h.id)}/tickets/${encodeURIComponent(d.id)}/proof`:`${um(h.id)}/board?ticket=${encodeURIComponent(d.id)}`,children:d.waiting?fl(d):"Check it"})]},`${h.id}/${d.id}`))})]})]})}),i&&r.jsx(UP,{onClose:()=>a(!1)}),o&&r.jsx(WP,{p:o,onClose:()=>l(null)})]})}function $P({s:e}){const t=Qs(),{toast:n}=Ce(),s=async i=>{try{await St("/api/v1/app/settings","PUT",{parallel:i}),t.invalidateQueries({queryKey:["app"]}),n(`Up to ${i} tickets at once, across all projects`)}catch(a){n(a instanceof Error?a.message:String(a),"err")}};return r.jsxs("label",{className:"shared",title:"Shared by all your projects, because they use the same AI accounts",children:[r.jsxs("span",{children:["Tickets at once: ",r.jsx("b",{children:e.running})," of"]}),r.jsx("select",{className:"select sm",value:e.parallel,onChange:i=>void s(Number(i.target.value)),"aria-label":"Tickets at once, across all projects",children:Array.from({length:e.max},(i,a)=>a+1).map(i=>r.jsx("option",{value:i,children:i},i))})]})}function DP({p:e,onRemove:t}){const n=Qs(),{toast:s}=Ce(),[i,a]=j.useState(!1),o=e.setup&&e.setup.status!=="done"?e.setup:null,l=async()=>{a(!0);try{await St("/api/v1/app/projects","POST",{folder:e.root}),s(`${e.name} is open`)}catch(u){s(u instanceof Error?u.message:String(u),"err")}finally{a(!1),n.invalidateQueries({queryKey:["app"]})}},c=e.open?o?.status==="failed"?r.jsx("span",{className:"bad",children:"The Architect could not read the project"}):o?r.jsxs("span",{className:"you",children:["Setting up: ",o.status==="running"?o.now??"the Architect reads the project":"the Architect reads the project next"]}):r.jsxs("span",{children:[e.tickets," open",e.working>0&&r.jsxs(r.Fragment,{children:[" · ",e.working," working"]}),e.waiting>0&&r.jsxs("span",{className:"you",children:[" · ",e.waiting," waiting for you"]})]}):r.jsxs("span",{className:"bad",children:["Could not open: ",e.why]});return r.jsxs("div",{className:`pcard ${e.open?"":"off"}`,children:[r.jsx("span",{className:"pm",children:e.name.charAt(0).toUpperCase()}),r.jsxs("div",{className:"grow",children:[r.jsxs("b",{children:[e.name,e.engine==="demo"&&r.jsx("small",{className:"demo",children:"Demo"})]}),r.jsx("span",{className:"mono path",title:e.root,children:e.root}),r.jsx("span",{className:"state",children:c})]}),r.jsxs("div",{className:"acts",children:[e.open?r.jsx("a",{className:"btn sm pri",href:e.url,children:"Open board"}):r.jsx("button",{className:"btn sm",disabled:i,onClick:()=>void l(),children:"Try again"}),r.jsx("button",{className:"btn sm quiet",onClick:t,children:"Remove"})]})]})}const BP={project:()=>"This folder has squad-kit already. Adding it opens its board.",repo:()=>"A code repo. The Architect reads its code first, then you write the first ticket.",repos:e=>`A folder with ${e.repos} code ${e.repos===1?"repo":"repos"} inside. The squad works across them; the Architect reads them first.`,empty:()=>"An empty folder: a new project. squad-kit makes a repo here, and the Architect picks the stack with you.",files:()=>"Files that are not in a repo yet. squad-kit makes one, with these files in its first commit, then the Architect reads them."};function UP({onClose:e}){const[t,n]=j.useState(""),[s,i]=j.useState(null),[a,o]=j.useState(null),[l,c]=j.useState(!1),u=he({queryKey:["app","folders",t],queryFn:()=>de(`/api/v1/app/folders${t?`?path=${encodeURIComponent(t)}`:""}`)}),h=u.data,d=g=>{o(null),i(null),n(g)},f=async()=>{if(h){c(!0),o(null);try{const g=await St("/api/v1/app/projects","POST",{folder:h.path});window.location.assign(g.url)}catch(g){c(!1),o(g instanceof Error?g.message:String(g))}}},p=async()=>{if(!(!h||!s?.trim()))try{const g=await St("/api/v1/app/folders","POST",{parent:h.path,name:s.trim()});d(g.path)}catch(g){o(g instanceof Error?g.message:String(g))}},m=h?qP(h.path):[];return r.jsxs(it,{title:"Add a project",wide:!0,onClose:e,footer:r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"btn pri",disabled:!h?.canAdd||l||u.isFetching,onClick:()=>void f(),children:l?"Adding…":"Add this folder"}),r.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),r.jsx("span",{className:"grow"}),h&&r.jsx(Z,{text:`cd "${h.path}" && squad console`})]}),children:[r.jsx("p",{className:"note",children:"Pick the project's folder: one repo, a folder with several repos, or a new, empty folder for a new project."}),h&&r.jsx("div",{className:"places",children:h.places.map(g=>r.jsx("button",{className:`btn sm ${g.path===h.path?"pri":""}`,onClick:()=>d(g.path),children:g.name},g.path))}),r.jsxs("div",{className:"fb",children:[r.jsxs("div",{className:"fb-bar",children:[r.jsx("button",{className:"iconbtn",disabled:!h?.parent,onClick:()=>h?.parent&&d(h.parent),"aria-label":"Up one folder",title:"Up one folder",children:r.jsx(Gk,{size:15})}),r.jsx("span",{className:"crumbs mono",children:m.map((g,v)=>r.jsxs("span",{children:[v>0&&r.jsx(Qh,{size:12}),r.jsx("button",{onClick:()=>d(g.path),children:g.name})]},g.path))})]}),r.jsxs("div",{className:"fb-list",role:"list",children:[u.isError&&r.jsx("p",{className:"note bad",children:u.error.message}),h&&h.folders.length===0&&r.jsx("p",{className:"note",children:"No folders inside."}),h?.folders.map(g=>r.jsxs("button",{role:"listitem",className:"fb-row",onClick:()=>d(g.path),children:[g.kind==="project"?r.jsx(Zk,{size:16}):g.kind==="repo"?r.jsx(Xk,{size:16}):r.jsx(Jk,{size:16}),r.jsx("span",{className:"nm",children:g.name}),g.kind==="project"&&r.jsx("span",{className:"pill ok sm",children:"squad-kit project"}),g.kind==="repo"&&r.jsx("span",{className:"pill sm",children:"code repo"})]},g.path))]}),r.jsx("div",{className:"fb-new",children:s===null?r.jsxs("button",{className:"btn sm",disabled:!h,onClick:()=>i(""),children:[r.jsx(my,{size:14})," New folder here"]}):r.jsxs(r.Fragment,{children:[r.jsx("input",{className:"input",autoFocus:!0,placeholder:"Name of the new folder",value:s,onChange:g=>i(g.target.value),onKeyDown:g=>g.key==="Enter"&&void p()}),r.jsx("button",{className:"btn sm pri",disabled:!s.trim(),onClick:()=>void p(),children:"Make it"}),r.jsx("button",{className:"btn sm",onClick:()=>i(null),children:"Cancel"})]})})]}),h&&r.jsxs("p",{className:"fb-kind",children:[r.jsx("b",{children:MP(h.path,h.home)}),r.jsx("span",{children:h.canAdd?BP[h.kind](h):"This folder can't be a project. Open a folder inside it, or make a new one here."})]}),a&&r.jsx("p",{className:"fb-error",children:a})]})}function qP(e){const t=e.split("/").filter(Boolean);return[{name:"/",path:"/"},...t.map((n,s)=>({name:n,path:`/${t.slice(0,s+1).join("/")}`}))]}function WP({p:e,onClose:t}){const n=Qs(),{toast:s}=Ce(),[i,a]=j.useState(!1),o=async()=>{a(!0);try{await St(`/api/v1/app/projects/${encodeURIComponent(e.id)}`,"DELETE"),n.invalidateQueries({queryKey:["app"]}),s(`${e.name} is out of squad-kit. Its files stay in its folder.`),t()}catch(c){a(!1),s(c instanceof Error?c.message:String(c),"err")}},l=/\s/.test(e.name)?`"${e.name}"`:e.name;return r.jsx(it,{title:`Take ${e.name} out of squad-kit?`,onClose:t,footer:r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"btn danger",disabled:i,onClick:()=>void o(),children:"Take it out"}),r.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),r.jsx("span",{className:"grow"}),r.jsx(Z,{text:`squad projects --remove ${l}`})]}),children:r.jsxs("p",{children:["Its squad stops. Nothing is deleted: its files stay in ",r.jsx("span",{className:"mono",children:e.root}),". Add it again any time."]})})}function HP(){const e=xa({from:"/conversations"}),t=Ys({from:"/conversations"}),n=ap(op),[s,i]=j.useState(""),a=da(s),l=da().data??[],c=e.ticket??l.find(p=>p.open)?.id??l[0]?.id,[u,h]=j.useState(null),d=p=>{h(null),t({search:{ticket:p}})},f=p=>{Kt.show(p),t({to:"/board"})};return n?r.jsx(XP,{id:c,all:l,pick:d,doc:u,setDoc:h}):r.jsxs("div",{className:"cpage",children:[r.jsx(VP,{q:s,setQ:i}),r.jsxs("div",{className:"cpage-b",children:[r.jsx(QP,{list:a.data??[],id:c,pick:d,searching:!!s.trim()}),r.jsx("section",{className:"ccenter","aria-label":"Conversation",children:c?r.jsx(Dp,{id:c,size:"full",onOpenDoc:h,onPanel:()=>f(c)},c):r.jsxs("div",{className:"cempty",children:[r.jsx("p",{children:"No talks yet. Start one with any agent on any ticket."}),r.jsx(c3,{})]})}),u?r.jsx(zp,{doc:u,onClose:()=>h(null)}):c?r.jsx(GP,{id:c,onOpenDoc:h}):null]})]})}function VP({q:e,setQ:t}){const n=ft(),{theme:s,toggleTheme:i}=Ce(),a=n.data?.ready?n.data.meta.project:"";return r.jsxs("header",{className:"cpage-h",children:[r.jsxs(Pe,{to:"/board",className:"btn",children:[r.jsx(Hk,{size:15})," Back to the board"]}),r.jsx("h1",{children:"Conversations"}),r.jsx("span",{className:"cdim",children:a}),r.jsx("span",{className:"grow"}),r.jsxs("label",{className:"search cpage-search",children:[r.jsx(Kr,{size:15}),r.jsx("input",{value:e,onChange:o=>t(o.target.value),placeholder:"Search all conversations","aria-label":"Search all conversations",dir:"auto"})]}),r.jsx("button",{className:"iconbtn",onClick:i,"aria-label":s==="light"?"Switch to dark":"Switch to light",children:s==="light"?r.jsx(Hl,{size:16}):r.jsx(Vl,{size:16})})]})}function S3(e){return new Date(e).toDateString()===new Date().toDateString()?qs(e):Zs(e)}function KP(e){const n=(e.match??e.last?.text??"").replace(/[*_`#>]+/g,"").replace(/\s+/g," ").trim(),s=dn(n);return{text:`${e.last?.who==="you"&&!e.match?"You: ":""}${n}`,dir:s.dir,cls:Ln(s)}}function QP({list:e,id:t,pick:n,searching:s}){const i=Kl(),a=[["Waiting for you",e.filter(o=>o.open&&o.yourTurn)],["Talking now",e.filter(o=>o.open&&!o.yourTurn)],["Earlier",e.filter(o=>!o.open)]];return r.jsx("nav",{className:"clist","aria-label":"All conversations",children:r.jsxs("div",{className:"clist-s",children:[s&&!e.length&&r.jsx("p",{className:"cdim",style:{padding:"14px 18px"},children:"Nothing found."}),a.map(([o,l])=>l.length?r.jsxs("div",{children:[r.jsx("div",{className:"csec",children:o}),l.map(c=>{const u=c.id===t,h=KP(c),d=Bp(c,i.seen);return r.jsxs("button",{className:`crow-i ${u?"on":""}`,onClick:()=>n(c.id),"aria-current":u,children:[r.jsx(ps,{role:c.with,live:c.thinking}),r.jsxs("span",{className:"rt",children:[r.jsx("span",{className:"cid",children:c.id}),r.jsx("b",{children:Ie[c.with]}),c.yourTurn&&r.jsx("span",{className:"cwait",children:"Your turn"})]}),r.jsx("span",{className:"rtime",children:c.thinking?"now":S3(c.at)}),r.jsx("span",{className:`rp ${c.thinking?"t-en":h.cls}`,dir:c.thinking?"ltr":h.dir,children:c.thinking?r.jsxs("span",{className:`rtyping c-${c.with}`,children:[r.jsxs("span",{className:"cdots sm",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]}),r.jsx("span",{className:"shim",children:"Writing"})]}):h.text||c.title}),d>0&&!u&&r.jsx("span",{className:"cbadge rb",children:d})]},c.id)})]},o):null)]})})}function GP({id:e,onOpenDoc:t}){const n=ba(e).data,[s,i]=j.useState("spec");if(!n)return r.jsx("aside",{className:"cspec"});const a=[...new Set([...(n.chat?.messages??[]).flatMap(o=>o.files??[]),...n.attachments??[]])];return r.jsxs("aside",{className:"cspec","aria-label":"The ticket's spec",children:[r.jsxs("div",{className:"cstabs",role:"tablist",children:[r.jsx("button",{className:`cstab ${s==="spec"?"on":""}`,role:"tab","aria-selected":s==="spec",onClick:()=>i("spec"),children:n.chat?.open&&!n.chat.beside&&n.chat.with==="analyst"?"Spec draft":"Spec"}),r.jsxs("button",{className:`cstab ${s==="files"?"on":""}`,role:"tab","aria-selected":s==="files",onClick:()=>i("files"),children:["Files · ",a.length]}),r.jsx("button",{className:`cstab ${s==="activity"?"on":""}`,role:"tab","aria-selected":s==="activity",onClick:()=>i("activity"),children:"Activity"})]}),r.jsxs("div",{className:"csbody",children:[s==="spec"&&r.jsx(ZP,{t:n}),s==="files"&&(a.length?r.jsx(_p,{ticket:n.id,files:a,onOpen:t}):r.jsx("p",{className:"cdim",children:"No files yet. Paste or drop screenshots into the chat."})),s==="activity"&&r.jsx("div",{className:"cact-list",children:n.activity.slice(0,60).map((o,l)=>r.jsxs("div",{className:"cact-row",children:[r.jsx("span",{className:"cdim",children:S3(o.at)}),r.jsxs("span",{children:[r.jsx("b",{children:zs[o.who]})," ",r.jsx(YP,{text:o.text})]})]},l))})]})]})}function YP({text:e}){const t=dn(e);return r.jsx("span",{dir:t.dir,className:Ln(t),children:e})}function uo({text:e,fresh:t,chk:n,tone:s}){const i=dn(e);return r.jsxs("div",{className:`citem ${t?"new":""} ${s??""}`,children:[n&&r.jsx("span",{className:"cchk"}),r.jsx("span",{className:`grow ${Ln(i)}`,dir:i.dir,lang:i.dir==="rtl"?"ar":"en",children:e}),t&&r.jsx("span",{className:"ctag",children:"From chat"})]})}function ZP({t:e}){const t=e.chat?.messages[0]?.at??"",n=e.notes??[],s=d=>!!t&&d>=t,i=e.chat?.open&&!e.chat.beside&&e.chat.with==="analyst",a=[...(e.criteria??[]).map(d=>({text:d.then,at:""})),...(e.brief?.criteria??[]).map(d=>({text:d,at:""})),...n.filter(d=>d.kind==="criterion").map(d=>({text:d.text,at:d.at}))],o=[...(e.brief?.rules??[]).map(d=>({text:d,at:""})),...n.filter(d=>d.kind==="rule").map(d=>({text:d.text,at:d.at}))],l=n.filter(d=>d.kind==="note"&&!d.to),c=(e.questions??[]).filter(d=>!d.answer).map(d=>d.text),u=e.story??e.ask,h=dn(u);return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"cdim",children:i?"Grows while you talk. Add to it from any message. The spec is written when you press Write the spec.":"What the squad works from. Add to it from any message with Add to spec."}),r.jsx("h3",{children:"Story"}),r.jsx("div",{className:Ln(h),dir:h.dir,children:u}),r.jsx("h3",{children:"Done when"}),a.length?a.map((d,f)=>r.jsx(uo,{text:d.text,chk:!0,fresh:s(d.at)},f)):r.jsx("p",{className:"cdim",children:"Nothing yet."}),o.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("h3",{children:"Rules"}),o.map((d,f)=>r.jsx(uo,{text:d.text,fresh:s(d.at)},f))]}),l.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("h3",{children:"Notes"}),l.map((d,f)=>r.jsx(uo,{text:d.text,fresh:s(d.at)},f))]}),c.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("h3",{children:"Still open"}),c.map((d,f)=>r.jsx(uo,{text:d,tone:"open"},f))]})]})}function XP({id:e,all:t,pick:n,doc:s,setDoc:i}){const a=ba(e).data,o=Kl(),l=Ys(),{theme:c,toggleTheme:u}=Ce(),h=a?.chat,d=a?r3(a):null,f=t.filter(m=>m.open||m.id===e),p=j.useRef(null);return j.useEffect(()=>{p.current?.querySelector(".cv.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[e,f.length]),r.jsxs("div",{className:"cphone",children:[r.jsxs("header",{className:"cph-h",children:[r.jsx("button",{className:"ib",onClick:()=>s?i(null):void l({to:"/board"}),"aria-label":s?"Close the document":"Back to the board",children:r.jsx(hy,{size:22})}),h&&r.jsx(ps,{role:h.with,live:h.thinking}),r.jsxs("div",{className:"cph-who",children:[r.jsxs("div",{children:[r.jsx("b",{children:h?Ie[h.with]:"Conversations"})," ",a&&r.jsx("span",{className:"cid",children:a.id})]}),d&&r.jsx("div",{className:`cph-stage ${d.tone}`,children:d.text})]}),r.jsx("span",{className:"grow"}),r.jsx("button",{className:"ib",onClick:u,"aria-label":c==="light"?"Switch to dark":"Switch to light",children:c==="light"?r.jsx(Hl,{size:18}):r.jsx(Vl,{size:18})})]}),f.length>1&&r.jsx("div",{className:"cph-convs",role:"tablist","aria-label":"Conversations",ref:p,children:f.map(m=>{const g=m.id===e,v=Bp(m,o.seen);return r.jsxs("button",{className:`cv ${g?"on":""}`,role:"tab","aria-selected":g,"aria-label":`${Ie[m.with]} on ${m.id}`,onClick:()=>n(m.id),children:[r.jsx(ps,{role:m.with,small:!0}),m.id,m.thinking&&!g&&r.jsxs("span",{className:`cdots sm c-${m.with}`,children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]}),v>0&&!g&&r.jsx("span",{className:"cbadge",children:v})]},m.id)})}),e?r.jsx(Dp,{id:e,size:"phone",onOpenDoc:i},e):r.jsx("div",{className:"cempty",children:"No talks yet."}),s&&r.jsx("div",{className:"cph-doc",children:r.jsx(zp,{doc:s,onClose:()=>i(null)})})]})}const Rt=Sk({component:aa?qE:OP,beforeLoad:({location:e})=>{if(!aa&&e.pathname!=="/")throw $l({to:"/"})}}),JP=$t({getParentRoute:()=>Rt,path:"/",beforeLoad:()=>{if(aa)throw $l({to:"/board"})}}),eR=$t({getParentRoute:()=>Rt,path:"/board",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0,view:e.view==="mine"||e.view==="bugs"?e.view:void 0}),component:UT}),tR=$t({getParentRoute:()=>Rt,path:"/tickets/$id/proof",component:KT}),nR=$t({getParentRoute:()=>Rt,path:"/backlog",component:YT}),sR=$t({getParentRoute:()=>Rt,path:"/inbox",component:gP}),rR=$t({getParentRoute:()=>Rt,path:"/releases",component:QT}),iR=$t({getParentRoute:()=>Rt,path:"/decisions",beforeLoad:()=>{throw $l({to:"/architecture",search:{view:"list"}})}}),aR=$t({getParentRoute:()=>Rt,path:"/architecture",validateSearch:e=>({adr:typeof e.adr=="string"&&e.adr?e.adr:void 0,view:["timeline","stack","list","project","lessons"].includes(e.view)?e.view:void 0}),component:JT}),oR=$t({getParentRoute:()=>Rt,path:"/conversations",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0}),component:HP}),lR=$t({getParentRoute:()=>Rt,path:"/bugs",component:yP}),cR=$t({getParentRoute:()=>Rt,path:"/squad",component:vP}),uR=$t({getParentRoute:()=>Rt,path:"/settings",component:zP}),dR=Rt.addChildren([JP,eR,nR,tR,sR,oR,rR,iR,aR,lR,cR,uR]),hR=zk({routeTree:dR,defaultPreload:!1,basepath:gd||"/"});document.documentElement.dataset.theme=by();const pR=new b5({defaultOptions:{queries:{staleTime:500,retry:1,refetchOnWindowFocus:!0}}}),N3=document.getElementById("root");if(!N3)throw new Error("missing #root");const fR=Dk();S2(N3).render(r.jsx(j.StrictMode,{children:fR?r.jsx(j5,{client:pR,children:r.jsx(k8,{children:r.jsx(Ok,{router:hR})})}):r.jsx("div",{className:"center",style:{height:"100%"},children:r.jsxs("div",{children:[r.jsx("h2",{children:"Open the board from the terminal"}),r.jsxs("p",{children:["This page needs the link that ",r.jsx("span",{className:"mono",children:"squad console"})," or ",r.jsx("span",{className:"mono",children:"squad demo"})," prints."]})]})})}));
|