byterover-cli 3.8.2 → 3.9.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.
Files changed (53) hide show
  1. package/README.md +8 -34
  2. package/dist/agent/infra/llm/providers/google.js +1 -1
  3. package/dist/oclif/commands/login.d.ts +15 -2
  4. package/dist/oclif/commands/login.js +106 -29
  5. package/dist/oclif/commands/providers/list.js +3 -0
  6. package/dist/oclif/commands/vc/diff.d.ts +12 -0
  7. package/dist/oclif/commands/vc/diff.js +40 -0
  8. package/dist/oclif/commands/vc/remote/remove.d.ts +9 -0
  9. package/dist/oclif/commands/vc/remote/remove.js +23 -0
  10. package/dist/server/core/domain/entities/brv-config.d.ts +4 -0
  11. package/dist/server/core/domain/entities/brv-config.js +12 -0
  12. package/dist/server/core/domain/entities/provider-registry.js +3 -3
  13. package/dist/server/core/interfaces/services/i-git-service.d.ts +55 -4
  14. package/dist/server/infra/context-tree/summary-frontmatter.js +2 -2
  15. package/dist/server/infra/dream/operations/consolidate.js +5 -4
  16. package/dist/server/infra/dream/operations/synthesize.js +1 -1
  17. package/dist/server/infra/git/isomorphic-git-service.d.ts +24 -1
  18. package/dist/server/infra/git/isomorphic-git-service.js +207 -7
  19. package/dist/server/infra/transport/handlers/config-handler.js +1 -0
  20. package/dist/server/infra/transport/handlers/locations-handler.d.ts +1 -0
  21. package/dist/server/infra/transport/handlers/locations-handler.js +25 -1
  22. package/dist/server/infra/transport/handlers/reveal-command.d.ts +9 -0
  23. package/dist/server/infra/transport/handlers/reveal-command.js +7 -0
  24. package/dist/server/infra/transport/handlers/vc-handler.d.ts +11 -0
  25. package/dist/server/infra/transport/handlers/vc-handler.js +143 -9
  26. package/dist/server/infra/webui/webui-middleware.js +10 -4
  27. package/dist/shared/transport/events/config-events.d.ts +1 -0
  28. package/dist/shared/transport/events/index.d.ts +1 -0
  29. package/dist/shared/transport/events/locations-events.d.ts +7 -0
  30. package/dist/shared/transport/events/locations-events.js +1 -0
  31. package/dist/shared/transport/events/vc-events.d.ts +56 -5
  32. package/dist/shared/transport/events/vc-events.js +7 -0
  33. package/dist/tui/features/commands/definitions/vc-diff.d.ts +2 -0
  34. package/dist/tui/features/commands/definitions/vc-diff.js +23 -0
  35. package/dist/tui/features/commands/definitions/vc-remote.js +16 -7
  36. package/dist/tui/features/commands/definitions/vc.js +2 -0
  37. package/dist/tui/features/vc/diff/api/execute-vc-diff.d.ts +8 -0
  38. package/dist/tui/features/vc/diff/api/execute-vc-diff.js +13 -0
  39. package/dist/tui/features/vc/diff/components/vc-diff-flow.d.ts +8 -0
  40. package/dist/tui/features/vc/diff/components/vc-diff-flow.js +31 -0
  41. package/dist/tui/features/vc/diff/utils/format-diff.d.ts +2 -0
  42. package/dist/tui/features/vc/diff/utils/format-diff.js +83 -0
  43. package/dist/tui/features/vc/diff/utils/parse-mode.d.ts +2 -0
  44. package/dist/tui/features/vc/diff/utils/parse-mode.js +16 -0
  45. package/dist/tui/features/vc/remote/components/vc-remote-flow.js +23 -8
  46. package/dist/webui/assets/index-CvcqpMYn.css +1 -0
  47. package/dist/webui/assets/index-thSZZahh.js +130 -0
  48. package/dist/webui/index.html +3 -3
  49. package/dist/webui/sw.js +1 -1
  50. package/oclif.manifest.json +1009 -933
  51. package/package.json +3 -1
  52. package/dist/webui/assets/index-Cti7S_1o.js +0 -130
  53. package/dist/webui/assets/index-Dpw6osIL.css +0 -1
@@ -0,0 +1,130 @@
1
+ function mj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).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 r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jg={exports:{}},yu={};var M5;function gj(){if(M5)return yu;M5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var l=null;if(a!==void 0&&(l=""+a),i.key!==void 0&&(l=""+i.key),"key"in i){a={};for(var c in i)c!=="key"&&(a[c]=i[c])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:a}}return yu.Fragment=t,yu.jsx=n,yu.jsxs=n,yu}var L5;function yj(){return L5||(L5=1,Jg.exports=gj()),Jg.exports}var h=yj(),e1={exports:{}},xu={},t1={exports:{}},n1={};var _5;function xj(){return _5||(_5=1,(function(e){function t(F,q){var W=F.length;F.push(q);e:for(;0<W;){var ie=W-1>>>1,_=F[ie];if(0<i(_,q))F[ie]=q,F[W]=_,W=ie;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var q=F[0],W=F.pop();if(W!==q){F[0]=W;e:for(var ie=0,_=F.length,z=_>>>1;ie<z;){var Y=2*(ie+1)-1,L=F[Y],ee=Y+1,te=F[ee];if(0>i(L,W))ee<_&&0>i(te,L)?(F[ie]=te,F[ee]=W,ie=ee):(F[ie]=L,F[Y]=W,ie=Y);else if(ee<_&&0>i(te,W))F[ie]=te,F[ee]=W,ie=ee;else break e}}return q}function i(F,q){var W=F.sortIndex-q.sortIndex;return W!==0?W:F.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],g=1,p=null,y=3,x=!1,v=!1,S=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function M(F){for(var q=n(f);q!==null;){if(q.callback===null)r(f);else if(q.startTime<=F)r(f),q.sortIndex=q.expirationTime,t(d,q);else break;q=n(f)}}function O(F){if(S=!1,M(F),!v)if(n(d)!==null)v=!0,A||(A=!0,$());else{var q=n(f);q!==null&&B(O,q.startTime-F)}}var A=!1,N=-1,D=5,H=-1;function I(){return E?!0:!(e.unstable_now()-H<D)}function U(){if(E=!1,A){var F=e.unstable_now();H=F;var q=!0;try{e:{v=!1,S&&(S=!1,T(N),N=-1),x=!0;var W=y;try{t:{for(M(F),p=n(d);p!==null&&!(p.expirationTime>F&&I());){var ie=p.callback;if(typeof ie=="function"){p.callback=null,y=p.priorityLevel;var _=ie(p.expirationTime<=F);if(F=e.unstable_now(),typeof _=="function"){p.callback=_,M(F),q=!0;break t}p===n(d)&&r(d),M(F)}else r(d);p=n(d)}if(p!==null)q=!0;else{var z=n(f);z!==null&&B(O,z.startTime-F),q=!1}}break e}finally{p=null,y=W,x=!1}q=void 0}}finally{q?$():A=!1}}}var $;if(typeof R=="function")$=function(){R(U)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,G=V.port2;V.port1.onmessage=U,$=function(){G.postMessage(null)}}else $=function(){k(U,0)};function B(F,q){N=k(function(){F(e.unstable_now())},q)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(F){switch(y){case 1:case 2:case 3:var q=3;break;default:q=y}var W=y;y=q;try{return F()}finally{y=W}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(F,q){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var W=y;y=F;try{return q()}finally{y=W}},e.unstable_scheduleCallback=function(F,q,W){var ie=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ie+W:ie):W=ie,F){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=W+_,F={id:g++,callback:q,priorityLevel:F,startTime:W,expirationTime:_,sortIndex:-1},W>ie?(F.sortIndex=W,t(f,F),n(d)===null&&F===n(f)&&(S?(T(N),N=-1):S=!0,B(O,W-ie))):(F.sortIndex=_,t(d,F),v||x||(v=!0,A||(A=!0,$()))),F},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(F){var q=y;return function(){var W=y;y=q;try{return F.apply(this,arguments)}finally{y=W}}}})(n1)),n1}var D5;function bj(){return D5||(D5=1,t1.exports=xj()),t1.exports}var r1={exports:{}},ft={};var I5;function vj(){if(I5)return ft;I5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function x(z){return z===null||typeof z!="object"?null:(z=y&&z[y]||z["@@iterator"],typeof z=="function"?z:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function k(z,Y,L){this.props=z,this.context=Y,this.refs=E,this.updater=L||v}k.prototype.isReactComponent={},k.prototype.setState=function(z,Y){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,Y,"setState")},k.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function T(){}T.prototype=k.prototype;function R(z,Y,L){this.props=z,this.context=Y,this.refs=E,this.updater=L||v}var M=R.prototype=new T;M.constructor=R,S(M,k.prototype),M.isPureReactComponent=!0;var O=Array.isArray;function A(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function H(z,Y,L){var ee=L.ref;return{$$typeof:e,type:z,key:Y,ref:ee!==void 0?ee:null,props:L}}function I(z,Y){return H(z.type,Y,z.props)}function U(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function $(z){var Y={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(L){return Y[L]})}var V=/\/+/g;function G(z,Y){return typeof z=="object"&&z!==null&&z.key!=null?$(""+z.key):Y.toString(36)}function B(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(A,A):(z.status="pending",z.then(function(Y){z.status==="pending"&&(z.status="fulfilled",z.value=Y)},function(Y){z.status==="pending"&&(z.status="rejected",z.reason=Y)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function F(z,Y,L,ee,te){var Q=typeof z;(Q==="undefined"||Q==="boolean")&&(z=null);var de=!1;if(z===null)de=!0;else switch(Q){case"bigint":case"string":case"number":de=!0;break;case"object":switch(z.$$typeof){case e:case t:de=!0;break;case g:return de=z._init,F(de(z._payload),Y,L,ee,te)}}if(de)return te=te(z),de=ee===""?"."+G(z,0):ee,O(te)?(L="",de!=null&&(L=de.replace(V,"$&/")+"/"),F(te,Y,L,"",function(Ee){return Ee})):te!=null&&(U(te)&&(te=I(te,L+(te.key==null||z&&z.key===te.key?"":(""+te.key).replace(V,"$&/")+"/")+de)),Y.push(te)),1;de=0;var ue=ee===""?".":ee+":";if(O(z))for(var Se=0;Se<z.length;Se++)ee=z[Se],Q=ue+G(ee,Se),de+=F(ee,Y,L,Q,te);else if(Se=x(z),typeof Se=="function")for(z=Se.call(z),Se=0;!(ee=z.next()).done;)ee=ee.value,Q=ue+G(ee,Se++),de+=F(ee,Y,L,Q,te);else if(Q==="object"){if(typeof z.then=="function")return F(B(z),Y,L,ee,te);throw Y=String(z),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return de}function q(z,Y,L){if(z==null)return z;var ee=[],te=0;return F(z,ee,"","",function(Q){return Y.call(L,Q,te++)}),ee}function W(z){if(z._status===-1){var Y=z._result;Y=Y(),Y.then(function(L){(z._status===0||z._status===-1)&&(z._status=1,z._result=L)},function(L){(z._status===0||z._status===-1)&&(z._status=2,z._result=L)}),z._status===-1&&(z._status=0,z._result=Y)}if(z._status===1)return z._result.default;throw z._result}var ie=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},_={map:q,forEach:function(z,Y,L){q(z,function(){Y.apply(this,arguments)},L)},count:function(z){var Y=0;return q(z,function(){Y++}),Y},toArray:function(z){return q(z,function(Y){return Y})||[]},only:function(z){if(!U(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return ft.Activity=p,ft.Children=_,ft.Component=k,ft.Fragment=n,ft.Profiler=i,ft.PureComponent=R,ft.StrictMode=r,ft.Suspense=d,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,ft.__COMPILER_RUNTIME={__proto__:null,c:function(z){return N.H.useMemoCache(z)}},ft.cache=function(z){return function(){return z.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(z,Y,L){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ee=S({},z.props),te=z.key;if(Y!=null)for(Q in Y.key!==void 0&&(te=""+Y.key),Y)!D.call(Y,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&Y.ref===void 0||(ee[Q]=Y[Q]);var Q=arguments.length-2;if(Q===1)ee.children=L;else if(1<Q){for(var de=Array(Q),ue=0;ue<Q;ue++)de[ue]=arguments[ue+2];ee.children=de}return H(z.type,te,ee)},ft.createContext=function(z){return z={$$typeof:l,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:a,_context:z},z},ft.createElement=function(z,Y,L){var ee,te={},Q=null;if(Y!=null)for(ee in Y.key!==void 0&&(Q=""+Y.key),Y)D.call(Y,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(te[ee]=Y[ee]);var de=arguments.length-2;if(de===1)te.children=L;else if(1<de){for(var ue=Array(de),Se=0;Se<de;Se++)ue[Se]=arguments[Se+2];te.children=ue}if(z&&z.defaultProps)for(ee in de=z.defaultProps,de)te[ee]===void 0&&(te[ee]=de[ee]);return H(z,Q,te)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(z){return{$$typeof:c,render:z}},ft.isValidElement=U,ft.lazy=function(z){return{$$typeof:g,_payload:{_status:-1,_result:z},_init:W}},ft.memo=function(z,Y){return{$$typeof:f,type:z,compare:Y===void 0?null:Y}},ft.startTransition=function(z){var Y=N.T,L={};N.T=L;try{var ee=z(),te=N.S;te!==null&&te(L,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(A,ie)}catch(Q){ie(Q)}finally{Y!==null&&L.types!==null&&(Y.types=L.types),N.T=Y}},ft.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},ft.use=function(z){return N.H.use(z)},ft.useActionState=function(z,Y,L){return N.H.useActionState(z,Y,L)},ft.useCallback=function(z,Y){return N.H.useCallback(z,Y)},ft.useContext=function(z){return N.H.useContext(z)},ft.useDebugValue=function(){},ft.useDeferredValue=function(z,Y){return N.H.useDeferredValue(z,Y)},ft.useEffect=function(z,Y){return N.H.useEffect(z,Y)},ft.useEffectEvent=function(z){return N.H.useEffectEvent(z)},ft.useId=function(){return N.H.useId()},ft.useImperativeHandle=function(z,Y,L){return N.H.useImperativeHandle(z,Y,L)},ft.useInsertionEffect=function(z,Y){return N.H.useInsertionEffect(z,Y)},ft.useLayoutEffect=function(z,Y){return N.H.useLayoutEffect(z,Y)},ft.useMemo=function(z,Y){return N.H.useMemo(z,Y)},ft.useOptimistic=function(z,Y){return N.H.useOptimistic(z,Y)},ft.useReducer=function(z,Y,L){return N.H.useReducer(z,Y,L)},ft.useRef=function(z){return N.H.useRef(z)},ft.useState=function(z){return N.H.useState(z)},ft.useSyncExternalStore=function(z,Y,L){return N.H.useSyncExternalStore(z,Y,L)},ft.useTransition=function(){return N.H.useTransition()},ft.version="19.2.4",ft}var z5;function kd(){return z5||(z5=1,r1.exports=vj()),r1.exports}var i1={exports:{}},gr={};var P5;function wj(){if(P5)return gr;P5=1;var e=kd();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)f+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(d,f,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:d,containerInfo:f,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return gr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,gr.createPortal=function(d,f){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(d,f,null,g)},gr.flushSync=function(d){var f=l.T,g=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=g,r.d.f()}},gr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},gr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},gr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var g=f.as,p=c(g,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,x=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;g==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:x}):g==="script"&&r.d.X(d,{crossOrigin:p,integrity:y,fetchPriority:x,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},gr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var g=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},gr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var g=f.as,p=c(g,f.crossOrigin);r.d.L(d,g,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},gr.preloadModule=function(d,f){if(typeof d=="string")if(f){var g=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},gr.requestFormReset=function(d){r.d.r(d)},gr.unstable_batchedUpdates=function(d,f){return d(f)},gr.useFormState=function(d,f,g){return l.H.useFormState(d,f,g)},gr.useFormStatus=function(){return l.H.useHostTransitionStatus()},gr.version="19.2.4",gr}var F5;function ak(){if(F5)return i1.exports;F5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),i1.exports=wj(),i1.exports}var B5;function Sj(){if(B5)return xu;B5=1;var e=bj(),t=kd(),n=ak();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function a(o){var s=o,u=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(u=s.return),o=s.return;while(o)}return s.tag===3?u:null}function l(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function c(o){if(o.tag===31){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function d(o){if(a(o)!==o)throw Error(r(188))}function f(o){var s=o.alternate;if(!s){if(s=a(o),s===null)throw Error(r(188));return s!==o?null:o}for(var u=o,m=s;;){var b=u.return;if(b===null)break;var w=b.alternate;if(w===null){if(m=b.return,m!==null){u=m;continue}break}if(b.child===w.child){for(w=b.child;w;){if(w===u)return d(b),o;if(w===m)return d(b),s;w=w.sibling}throw Error(r(188))}if(u.return!==m.return)u=b,m=w;else{for(var j=!1,P=b.child;P;){if(P===u){j=!0,u=b,m=w;break}if(P===m){j=!0,m=b,u=w;break}P=P.sibling}if(!j){for(P=w.child;P;){if(P===u){j=!0,u=w,m=b;break}if(P===m){j=!0,m=w,u=b;break}P=P.sibling}if(!j)throw Error(r(189))}}if(u.alternate!==m)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?o:s}function g(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o;for(o=o.child;o!==null;){if(s=g(o),s!==null)return s;o=o.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),R=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function $(o){return o===null||typeof o!="object"?null:(o=U&&o[U]||o["@@iterator"],typeof o=="function"?o:null)}var V=Symbol.for("react.client.reference");function G(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===V?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case S:return"Fragment";case k:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case H:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case v:return"Portal";case R:return o.displayName||"Context";case T:return(o._context.displayName||"Context")+".Consumer";case M:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return s=o.displayName||null,s!==null?s:G(o.type)||"Memo";case D:s=o._payload,o=o._init;try{return G(o(s))}catch{}}return null}var B=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ie=[],_=-1;function z(o){return{current:o}}function Y(o){0>_||(o.current=ie[_],ie[_]=null,_--)}function L(o,s){_++,ie[_]=o.current,o.current=s}var ee=z(null),te=z(null),Q=z(null),de=z(null);function ue(o,s){switch(L(Q,s),L(te,o),L(ee,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?t5(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=t5(s),o=n5(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}Y(ee),L(ee,o)}function Se(){Y(ee),Y(te),Y(Q)}function Ee(o){o.memoizedState!==null&&L(de,o);var s=ee.current,u=n5(s,o.type);s!==u&&(L(te,o),L(ee,u))}function ze(o){te.current===o&&(Y(ee),Y(te)),de.current===o&&(Y(de),hu._currentValue=W)}var Ye,Me;function Ie(o){if(Ye===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);Ye=s&&s[1]||"",Me=-1<u.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ye+o+Me}var xe=!1;function We(o,s){if(!o||xe)return"";xe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(fe){var ce=fe}Reflect.construct(o,[],ye)}else{try{ye.call()}catch(fe){ce=fe}o.call(ye.prototype)}}else{try{throw Error()}catch(fe){ce=fe}(ye=o())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(fe){if(fe&&ce&&typeof fe.stack=="string")return[fe.stack,ce.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=m.DetermineComponentFrameRoot(),j=w[0],P=w[1];if(j&&P){var X=j.split(`
4
+ `),se=P.split(`
5
+ `);for(b=m=0;m<X.length&&!X[m].includes("DetermineComponentFrameRoot");)m++;for(;b<se.length&&!se[b].includes("DetermineComponentFrameRoot");)b++;if(m===X.length||b===se.length)for(m=X.length-1,b=se.length-1;1<=m&&0<=b&&X[m]!==se[b];)b--;for(;1<=m&&0<=b;m--,b--)if(X[m]!==se[b]){if(m!==1||b!==1)do if(m--,b--,0>b||X[m]!==se[b]){var he=`
6
+ `+X[m].replace(" at new "," at ");return o.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",o.displayName)),he}while(1<=m&&0<=b);break}}}finally{xe=!1,Error.prepareStackTrace=u}return(u=o?o.displayName||o.name:"")?Ie(u):""}function Te(o,s){switch(o.tag){case 26:case 27:case 5:return Ie(o.type);case 16:return Ie("Lazy");case 13:return o.child!==s&&s!==null?Ie("Suspense Fallback"):Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 15:return We(o.type,!1);case 11:return We(o.type.render,!1);case 1:return We(o.type,!0);case 31:return Ie("Activity");default:return""}}function Ae(o){try{var s="",u=null;do s+=Te(o,u),u=o,o=o.return;while(o);return s}catch(m){return`
7
+ Error generating stack: `+m.message+`
8
+ `+m.stack}}var pe=Object.prototype.hasOwnProperty,Ce=e.unstable_scheduleCallback,re=e.unstable_cancelCallback,be=e.unstable_shouldYield,Pe=e.unstable_requestPaint,Ue=e.unstable_now,wt=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,we=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Le=e.unstable_LowPriority,He=e.unstable_IdlePriority,kt=e.log,Bt=e.unstable_setDisableYieldValue,Xe=null,Ve=null;function pt(o){if(typeof kt=="function"&&Bt(o),Ve&&typeof Ve.setStrictMode=="function")try{Ve.setStrictMode(Xe,o)}catch{}}var mt=Math.clz32?Math.clz32:Ft,Qe=Math.log,yt=Math.LN2;function Ft(o){return o>>>=0,o===0?32:31-(Qe(o)/yt|0)|0}var Kt=256,xn=262144,fn=4194304;function In(o){var s=o&42;if(s!==0)return s;switch(o&-o){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function nt(o,s,u){var m=o.pendingLanes;if(m===0)return 0;var b=0,w=o.suspendedLanes,j=o.pingedLanes;o=o.warmLanes;var P=m&134217727;return P!==0?(m=P&~w,m!==0?b=In(m):(j&=P,j!==0?b=In(j):u||(u=P&~o,u!==0&&(b=In(u))))):(P=m&~w,P!==0?b=In(P):j!==0?b=In(j):u||(u=m&~o,u!==0&&(b=In(u)))),b===0?0:s!==0&&s!==b&&(s&w)===0&&(w=b&-b,u=s&-s,w>=u||w===32&&(u&4194048)!==0)?s:b}function qt(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function hn(o,s){switch(o){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pn(){var o=fn;return fn<<=1,(fn&62914560)===0&&(fn=4194304),o}function ar(o){for(var s=[],u=0;31>u;u++)s.push(o);return s}function tn(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function zn(o,s,u,m,b,w){var j=o.pendingLanes;o.pendingLanes=u,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=u,o.entangledLanes&=u,o.errorRecoveryDisabledLanes&=u,o.shellSuspendCounter=0;var P=o.entanglements,X=o.expirationTimes,se=o.hiddenUpdates;for(u=j&~u;0<u;){var he=31-mt(u),ye=1<<he;P[he]=0,X[he]=-1;var ce=se[he];if(ce!==null)for(se[he]=null,he=0;he<ce.length;he++){var fe=ce[he];fe!==null&&(fe.lane&=-536870913)}u&=~ye}m!==0&&yi(o,m,0),w!==0&&b===0&&o.tag!==0&&(o.suspendedLanes|=w&~(j&~s))}function yi(o,s,u){o.pendingLanes|=s,o.suspendedLanes&=~s;var m=31-mt(s);o.entangledLanes|=s,o.entanglements[m]=o.entanglements[m]|1073741824|u&261930}function K(o,s){var u=o.entangledLanes|=s;for(o=o.entanglements;u;){var m=31-mt(u),b=1<<m;b&s|o[m]&s&&(o[m]|=s),u&=~b}}function J(o,s){var u=s&-s;return u=(u&42)!==0?1:le(u),(u&(o.suspendedLanes|s))!==0?0:u}function le(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function ve(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function je(){var o=q.p;return o!==0?o:(o=window.event,o===void 0?32:k5(o.type))}function Ze(o,s){var u=q.p;try{return q.p=o,s()}finally{q.p=u}}var Fe=Math.random().toString(36).slice(2),_e="__reactFiber$"+Fe,Be="__reactProps$"+Fe,et="__reactContainer$"+Fe,ct="__reactEvents$"+Fe,tt="__reactListeners$"+Fe,zt="__reactHandles$"+Fe,Ot="__reactResources$"+Fe,Cn="__reactMarker$"+Fe;function En(o){delete o[_e],delete o[Be],delete o[ct],delete o[tt],delete o[zt]}function kn(o){var s=o[_e];if(s)return s;for(var u=o.parentNode;u;){if(s=u[et]||u[_e]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(o=c5(o);o!==null;){if(u=o[_e])return u;o=c5(o)}return s}o=u,u=o.parentNode}return null}function Mt(o){if(o=o[_e]||o[et]){var s=o.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return o}return null}function tr(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function _r(o){var s=o[Ot];return s||(s=o[Ot]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function bn(o){o[Cn]=!0}var Pi=new Set,Kr={};function Fi(o,s){xi(o,s),xi(o+"Capture",s)}function xi(o,s){for(Kr[o]=s,o=0;o<s.length;o++)Pi.add(s[o])}var bo=RegExp("^[: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]*$"),is={},os={};function Lt(o){return pe.call(os,o)?!0:pe.call(is,o)?!1:bo.test(o)?os[o]=!0:(is[o]=!0,!1)}function Mn(o,s,u){if(Lt(s))if(u===null)o.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":o.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){o.removeAttribute(s);return}}o.setAttribute(s,""+u)}}function Bi(o,s,u){if(u===null)o.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+u)}}function sr(o,s,u,m){if(m===null)o.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttributeNS(s,u,""+m)}}function _t(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function as(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function sf(o,s,u){var m=Object.getOwnPropertyDescriptor(o.constructor.prototype,s);if(!o.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var b=m.get,w=m.set;return Object.defineProperty(o,s,{configurable:!0,get:function(){return b.call(this)},set:function(j){u=""+j,w.call(this,j)}}),Object.defineProperty(o,s,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(j){u=""+j},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function Ac(o){if(!o._valueTracker){var s=as(o)?"checked":"value";o._valueTracker=sf(o,s,""+o[s])}}function Wb(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return o&&(m=as(o)?o.checked?"true":"false":o.value),o=m,o!==u?(s.setValue(o),!0):!1}function lf(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var cA=/[\n"\\]/g;function bi(o){return o.replace(cA,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Ym(o,s,u,m,b,w,j,P){o.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?o.type=j:o.removeAttribute("type"),s!=null?j==="number"?(s===0&&o.value===""||o.value!=s)&&(o.value=""+_t(s)):o.value!==""+_t(s)&&(o.value=""+_t(s)):j!=="submit"&&j!=="reset"||o.removeAttribute("value"),s!=null?Wm(o,j,_t(s)):u!=null?Wm(o,j,_t(u)):m!=null&&o.removeAttribute("value"),b==null&&w!=null&&(o.defaultChecked=!!w),b!=null&&(o.checked=b&&typeof b!="function"&&typeof b!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?o.name=""+_t(P):o.removeAttribute("name")}function Kb(o,s,u,m,b,w,j,P){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(o.type=w),s!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||s!=null)){Ac(o);return}u=u!=null?""+_t(u):"",s=s!=null?""+_t(s):u,P||s===o.value||(o.value=s),o.defaultValue=s}m=m??b,m=typeof m!="function"&&typeof m!="symbol"&&!!m,o.checked=P?o.checked:!!m,o.defaultChecked=!!m,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(o.name=j),Ac(o)}function Wm(o,s,u){s==="number"&&lf(o.ownerDocument)===o||o.defaultValue===""+u||(o.defaultValue=""+u)}function tl(o,s,u,m){if(o=o.options,s){s={};for(var b=0;b<u.length;b++)s["$"+u[b]]=!0;for(u=0;u<o.length;u++)b=s.hasOwnProperty("$"+o[u].value),o[u].selected!==b&&(o[u].selected=b),b&&m&&(o[u].defaultSelected=!0)}else{for(u=""+_t(u),s=null,b=0;b<o.length;b++){if(o[b].value===u){o[b].selected=!0,m&&(o[b].defaultSelected=!0);return}s!==null||o[b].disabled||(s=o[b])}s!==null&&(s.selected=!0)}}function Qb(o,s,u){if(s!=null&&(s=""+_t(s),s!==o.value&&(o.value=s),u==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=u!=null?""+_t(u):""}function Xb(o,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(r(92));if(B(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),s=u}u=_t(s),o.defaultValue=u,m=o.textContent,m===u&&m!==""&&m!==null&&(o.value=m),Ac(o)}function nl(o,s){if(s){var u=o.firstChild;if(u&&u===o.lastChild&&u.nodeType===3){u.nodeValue=s;return}}o.textContent=s}var uA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Zb(o,s,u){var m=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":m?o.setProperty(s,u):typeof u!="number"||u===0||uA.has(s)?s==="float"?o.cssFloat=u:o[s]=(""+u).trim():o[s]=u+"px"}function Jb(o,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?o.setProperty(m,""):m==="float"?o.cssFloat="":o[m]="");for(var b in s)m=s[b],s.hasOwnProperty(b)&&u[b]!==m&&Zb(o,b,m)}else for(var w in s)s.hasOwnProperty(w)&&Zb(o,w,s[w])}function Km(o){if(o.indexOf("-")===-1)return!1;switch(o){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 dA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),fA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function cf(o){return fA.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function vo(){}var Qm=null;function Xm(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var rl=null,il=null;function ev(o){var s=Mt(o);if(s&&(o=s.stateNode)){var u=o[Be]||null;e:switch(o=s.stateNode,s.type){case"input":if(Ym(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=o;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+bi(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var m=u[s];if(m!==o&&m.form===o.form){var b=m[Be]||null;if(!b)throw Error(r(90));Ym(m,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===o.form&&Wb(m)}break e;case"textarea":Qb(o,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&tl(o,!!u.multiple,s,!1)}}}var Zm=!1;function tv(o,s,u){if(Zm)return o(s,u);Zm=!0;try{var m=o(s);return m}finally{if(Zm=!1,(rl!==null||il!==null)&&(Qf(),rl&&(s=rl,o=il,il=rl=null,ev(s),o)))for(s=0;s<o.length;s++)ev(o[s])}}function jc(o,s){var u=o.stateNode;if(u===null)return null;var m=u[Be]||null;if(m===null)return null;u=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(o=o.type,m=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!m;break e;default:o=!1}if(o)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var wo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jm=!1;if(wo)try{var Oc={};Object.defineProperty(Oc,"passive",{get:function(){Jm=!0}}),window.addEventListener("test",Oc,Oc),window.removeEventListener("test",Oc,Oc)}catch{Jm=!1}var ea=null,e0=null,uf=null;function nv(){if(uf)return uf;var o,s=e0,u=s.length,m,b="value"in ea?ea.value:ea.textContent,w=b.length;for(o=0;o<u&&s[o]===b[o];o++);var j=u-o;for(m=1;m<=j&&s[u-m]===b[w-m];m++);return uf=b.slice(o,1<m?1-m:void 0)}function df(o){var s=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&s===13&&(o=13)):o=s,o===10&&(o=13),32<=o||o===13?o:0}function ff(){return!0}function rv(){return!1}function Dr(o){function s(u,m,b,w,j){this._reactName=u,this._targetInst=b,this.type=m,this.nativeEvent=w,this.target=j,this.currentTarget=null;for(var P in o)o.hasOwnProperty(P)&&(u=o[P],this[P]=u?u(w):w[P]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?ff:rv,this.isPropagationStopped=rv,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=ff)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=ff)},persist:function(){},isPersistent:ff}),s}var ss={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hf=Dr(ss),Mc=p({},ss,{view:0,detail:0}),hA=Dr(Mc),t0,n0,Lc,pf=p({},Mc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:i0,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Lc&&(Lc&&o.type==="mousemove"?(t0=o.screenX-Lc.screenX,n0=o.screenY-Lc.screenY):n0=t0=0,Lc=o),t0)},movementY:function(o){return"movementY"in o?o.movementY:n0}}),iv=Dr(pf),pA=p({},pf,{dataTransfer:0}),mA=Dr(pA),gA=p({},Mc,{relatedTarget:0}),r0=Dr(gA),yA=p({},ss,{animationName:0,elapsedTime:0,pseudoElement:0}),xA=Dr(yA),bA=p({},ss,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),vA=Dr(bA),wA=p({},ss,{data:0}),ov=Dr(wA),SA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},CA={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"},EA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kA(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=EA[o])?!!s[o]:!1}function i0(){return kA}var TA=p({},Mc,{key:function(o){if(o.key){var s=SA[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=df(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?CA[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:i0,charCode:function(o){return o.type==="keypress"?df(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?df(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),NA=Dr(TA),RA=p({},pf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),av=Dr(RA),AA=p({},Mc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:i0}),jA=Dr(AA),OA=p({},ss,{propertyName:0,elapsedTime:0,pseudoElement:0}),MA=Dr(OA),LA=p({},pf,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),_A=Dr(LA),DA=p({},ss,{newState:0,oldState:0}),IA=Dr(DA),zA=[9,13,27,32],o0=wo&&"CompositionEvent"in window,_c=null;wo&&"documentMode"in document&&(_c=document.documentMode);var PA=wo&&"TextEvent"in window&&!_c,sv=wo&&(!o0||_c&&8<_c&&11>=_c),lv=" ",cv=!1;function uv(o,s){switch(o){case"keyup":return zA.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dv(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var ol=!1;function FA(o,s){switch(o){case"compositionend":return dv(s);case"keypress":return s.which!==32?null:(cv=!0,lv);case"textInput":return o=s.data,o===lv&&cv?null:o;default:return null}}function BA(o,s){if(ol)return o==="compositionend"||!o0&&uv(o,s)?(o=nv(),uf=e0=ea=null,ol=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return sv&&s.locale!=="ko"?null:s.data;default:return null}}var HA={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 fv(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!HA[o.type]:s==="textarea"}function hv(o,s,u,m){rl?il?il.push(m):il=[m]:rl=m,s=rh(s,"onChange"),0<s.length&&(u=new hf("onChange","change",null,u,m),o.push({event:u,listeners:s}))}var Dc=null,Ic=null;function UA(o){K3(o,0)}function mf(o){var s=tr(o);if(Wb(s))return o}function pv(o,s){if(o==="change")return s}var mv=!1;if(wo){var a0;if(wo){var s0="oninput"in document;if(!s0){var gv=document.createElement("div");gv.setAttribute("oninput","return;"),s0=typeof gv.oninput=="function"}a0=s0}else a0=!1;mv=a0&&(!document.documentMode||9<document.documentMode)}function yv(){Dc&&(Dc.detachEvent("onpropertychange",xv),Ic=Dc=null)}function xv(o){if(o.propertyName==="value"&&mf(Ic)){var s=[];hv(s,Ic,o,Xm(o)),tv(UA,s)}}function qA(o,s,u){o==="focusin"?(yv(),Dc=s,Ic=u,Dc.attachEvent("onpropertychange",xv)):o==="focusout"&&yv()}function VA(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return mf(Ic)}function $A(o,s){if(o==="click")return mf(s)}function GA(o,s){if(o==="input"||o==="change")return mf(s)}function YA(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var Qr=typeof Object.is=="function"?Object.is:YA;function zc(o,s){if(Qr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var u=Object.keys(o),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var b=u[m];if(!pe.call(s,b)||!Qr(o[b],s[b]))return!1}return!0}function bv(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function vv(o,s){var u=bv(o);o=0;for(var m;u;){if(u.nodeType===3){if(m=o+u.textContent.length,o<=s&&m>=s)return{node:u,offset:s-o};o=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=bv(u)}}function wv(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?wv(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Sv(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=lf(o.document);s instanceof o.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)o=s.contentWindow;else break;s=lf(o.document)}return s}function l0(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s&&(s==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||s==="textarea"||o.contentEditable==="true")}var WA=wo&&"documentMode"in document&&11>=document.documentMode,al=null,c0=null,Pc=null,u0=!1;function Cv(o,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;u0||al==null||al!==lf(m)||(m=al,"selectionStart"in m&&l0(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Pc&&zc(Pc,m)||(Pc=m,m=rh(c0,"onSelect"),0<m.length&&(s=new hf("onSelect","select",null,s,u),o.push({event:s,listeners:m}),s.target=al)))}function ls(o,s){var u={};return u[o.toLowerCase()]=s.toLowerCase(),u["Webkit"+o]="webkit"+s,u["Moz"+o]="moz"+s,u}var sl={animationend:ls("Animation","AnimationEnd"),animationiteration:ls("Animation","AnimationIteration"),animationstart:ls("Animation","AnimationStart"),transitionrun:ls("Transition","TransitionRun"),transitionstart:ls("Transition","TransitionStart"),transitioncancel:ls("Transition","TransitionCancel"),transitionend:ls("Transition","TransitionEnd")},d0={},Ev={};wo&&(Ev=document.createElement("div").style,"AnimationEvent"in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),"TransitionEvent"in window||delete sl.transitionend.transition);function cs(o){if(d0[o])return d0[o];if(!sl[o])return o;var s=sl[o],u;for(u in s)if(s.hasOwnProperty(u)&&u in Ev)return d0[o]=s[u];return o}var kv=cs("animationend"),Tv=cs("animationiteration"),Nv=cs("animationstart"),KA=cs("transitionrun"),QA=cs("transitionstart"),XA=cs("transitioncancel"),Rv=cs("transitionend"),Av=new Map,f0="abort auxClick beforeToggle 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(" ");f0.push("scrollEnd");function Hi(o,s){Av.set(o,s),Fi(s,[o])}var gf=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},vi=[],ll=0,h0=0;function yf(){for(var o=ll,s=h0=ll=0;s<o;){var u=vi[s];vi[s++]=null;var m=vi[s];vi[s++]=null;var b=vi[s];vi[s++]=null;var w=vi[s];if(vi[s++]=null,m!==null&&b!==null){var j=m.pending;j===null?b.next=b:(b.next=j.next,j.next=b),m.pending=b}w!==0&&jv(u,b,w)}}function xf(o,s,u,m){vi[ll++]=o,vi[ll++]=s,vi[ll++]=u,vi[ll++]=m,h0|=m,o.lanes|=m,o=o.alternate,o!==null&&(o.lanes|=m)}function p0(o,s,u,m){return xf(o,s,u,m),bf(o)}function us(o,s){return xf(o,null,null,s),bf(o)}function jv(o,s,u){o.lanes|=u;var m=o.alternate;m!==null&&(m.lanes|=u);for(var b=!1,w=o.return;w!==null;)w.childLanes|=u,m=w.alternate,m!==null&&(m.childLanes|=u),w.tag===22&&(o=w.stateNode,o===null||o._visibility&1||(b=!0)),o=w,w=w.return;return o.tag===3?(w=o.stateNode,b&&s!==null&&(b=31-mt(u),o=w.hiddenUpdates,m=o[b],m===null?o[b]=[s]:m.push(s),s.lane=u|536870912),w):null}function bf(o){if(50<au)throw au=0,Cg=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var cl={};function ZA(o,s,u,m){this.tag=o,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(o,s,u,m){return new ZA(o,s,u,m)}function m0(o){return o=o.prototype,!(!o||!o.isReactComponent)}function So(o,s){var u=o.alternate;return u===null?(u=Xr(o.tag,s,o.key,o.mode),u.elementType=o.elementType,u.type=o.type,u.stateNode=o.stateNode,u.alternate=o,o.alternate=u):(u.pendingProps=s,u.type=o.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=o.flags&65011712,u.childLanes=o.childLanes,u.lanes=o.lanes,u.child=o.child,u.memoizedProps=o.memoizedProps,u.memoizedState=o.memoizedState,u.updateQueue=o.updateQueue,s=o.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=o.sibling,u.index=o.index,u.ref=o.ref,u.refCleanup=o.refCleanup,u}function Ov(o,s){o.flags&=65011714;var u=o.alternate;return u===null?(o.childLanes=0,o.lanes=s,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,s=u.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function vf(o,s,u,m,b,w){var j=0;if(m=o,typeof o=="function")m0(o)&&(j=1);else if(typeof o=="string")j=rj(o,u,ee.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case H:return o=Xr(31,u,s,b),o.elementType=H,o.lanes=w,o;case S:return ds(u.children,b,w,s);case E:j=8,b|=24;break;case k:return o=Xr(12,u,s,b|2),o.elementType=k,o.lanes=w,o;case O:return o=Xr(13,u,s,b),o.elementType=O,o.lanes=w,o;case A:return o=Xr(19,u,s,b),o.elementType=A,o.lanes=w,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case R:j=10;break e;case T:j=9;break e;case M:j=11;break e;case N:j=14;break e;case D:j=16,m=null;break e}j=29,u=Error(r(130,o===null?"null":typeof o,"")),m=null}return s=Xr(j,u,s,b),s.elementType=o,s.type=m,s.lanes=w,s}function ds(o,s,u,m){return o=Xr(7,o,m,s),o.lanes=u,o}function g0(o,s,u){return o=Xr(6,o,null,s),o.lanes=u,o}function Mv(o){var s=Xr(18,null,null,0);return s.stateNode=o,s}function y0(o,s,u){return s=Xr(4,o.children!==null?o.children:[],o.key,s),s.lanes=u,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var Lv=new WeakMap;function wi(o,s){if(typeof o=="object"&&o!==null){var u=Lv.get(o);return u!==void 0?u:(s={value:o,source:s,stack:Ae(s)},Lv.set(o,s),s)}return{value:o,source:s,stack:Ae(s)}}var ul=[],dl=0,wf=null,Fc=0,Si=[],Ci=0,ta=null,Zi=1,Ji="";function Co(o,s){ul[dl++]=Fc,ul[dl++]=wf,wf=o,Fc=s}function _v(o,s,u){Si[Ci++]=Zi,Si[Ci++]=Ji,Si[Ci++]=ta,ta=o;var m=Zi;o=Ji;var b=32-mt(m)-1;m&=~(1<<b),u+=1;var w=32-mt(s)+b;if(30<w){var j=b-b%5;w=(m&(1<<j)-1).toString(32),m>>=j,b-=j,Zi=1<<32-mt(s)+b|u<<b|m,Ji=w+o}else Zi=1<<w|u<<b|m,Ji=o}function x0(o){o.return!==null&&(Co(o,1),_v(o,1,0))}function b0(o){for(;o===wf;)wf=ul[--dl],ul[dl]=null,Fc=ul[--dl],ul[dl]=null;for(;o===ta;)ta=Si[--Ci],Si[Ci]=null,Ji=Si[--Ci],Si[Ci]=null,Zi=Si[--Ci],Si[Ci]=null}function Dv(o,s){Si[Ci++]=Zi,Si[Ci++]=Ji,Si[Ci++]=ta,Zi=s.id,Ji=s.overflow,ta=o}var lr=null,mn=null,Dt=!1,na=null,Ei=!1,v0=Error(r(519));function ra(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bc(wi(s,o)),v0}function Iv(o){var s=o.stateNode,u=o.type,m=o.memoizedProps;switch(s[_e]=o,s[Be]=m,u){case"dialog":Nt("cancel",s),Nt("close",s);break;case"iframe":case"object":case"embed":Nt("load",s);break;case"video":case"audio":for(u=0;u<lu.length;u++)Nt(lu[u],s);break;case"source":Nt("error",s);break;case"img":case"image":case"link":Nt("error",s),Nt("load",s);break;case"details":Nt("toggle",s);break;case"input":Nt("invalid",s),Kb(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Nt("invalid",s);break;case"textarea":Nt("invalid",s),Xb(s,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||m.suppressHydrationWarning===!0||J3(s.textContent,u)?(m.popover!=null&&(Nt("beforetoggle",s),Nt("toggle",s)),m.onScroll!=null&&Nt("scroll",s),m.onScrollEnd!=null&&Nt("scrollend",s),m.onClick!=null&&(s.onclick=vo),s=!0):s=!1,s||ra(o,!0)}function zv(o){for(lr=o.return;lr;)switch(lr.tag){case 5:case 31:case 13:Ei=!1;return;case 27:case 3:Ei=!0;return;default:lr=lr.return}}function fl(o){if(o!==lr)return!1;if(!Dt)return zv(o),Dt=!0,!1;var s=o.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=o.type,u=!(u!=="form"&&u!=="button")||Pg(o.type,o.memoizedProps)),u=!u),u&&mn&&ra(o),zv(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));mn=l5(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));mn=l5(o)}else s===27?(s=mn,ya(o.type)?(o=qg,qg=null,mn=o):mn=s):mn=lr?Ti(o.stateNode.nextSibling):null;return!0}function fs(){mn=lr=null,Dt=!1}function w0(){var o=na;return o!==null&&(Fr===null?Fr=o:Fr.push.apply(Fr,o),na=null),o}function Bc(o){na===null?na=[o]:na.push(o)}var S0=z(null),hs=null,Eo=null;function ia(o,s,u){L(S0,s._currentValue),s._currentValue=u}function ko(o){o._currentValue=S0.current,Y(S0)}function C0(o,s,u){for(;o!==null;){var m=o.alternate;if((o.childLanes&s)!==s?(o.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),o===u)break;o=o.return}}function E0(o,s,u,m){var b=o.child;for(b!==null&&(b.return=o);b!==null;){var w=b.dependencies;if(w!==null){var j=b.child;w=w.firstContext;e:for(;w!==null;){var P=w;w=b;for(var X=0;X<s.length;X++)if(P.context===s[X]){w.lanes|=u,P=w.alternate,P!==null&&(P.lanes|=u),C0(w.return,u,o),m||(j=null);break e}w=P.next}}else if(b.tag===18){if(j=b.return,j===null)throw Error(r(341));j.lanes|=u,w=j.alternate,w!==null&&(w.lanes|=u),C0(j,u,o),j=null}else j=b.child;if(j!==null)j.return=b;else for(j=b;j!==null;){if(j===o){j=null;break}if(b=j.sibling,b!==null){b.return=j.return,j=b;break}j=j.return}b=j}}function hl(o,s,u,m){o=null;for(var b=s,w=!1;b!==null;){if(!w){if((b.flags&524288)!==0)w=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var j=b.alternate;if(j===null)throw Error(r(387));if(j=j.memoizedProps,j!==null){var P=b.type;Qr(b.pendingProps.value,j.value)||(o!==null?o.push(P):o=[P])}}else if(b===de.current){if(j=b.alternate,j===null)throw Error(r(387));j.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(o!==null?o.push(hu):o=[hu])}b=b.return}o!==null&&E0(s,o,u,m),s.flags|=262144}function Sf(o){for(o=o.firstContext;o!==null;){if(!Qr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function ps(o){hs=o,Eo=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function cr(o){return Pv(hs,o)}function Cf(o,s){return hs===null&&ps(o),Pv(o,s)}function Pv(o,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},Eo===null){if(o===null)throw Error(r(308));Eo=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else Eo=Eo.next=s;return u}var JA=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(u,m){o.push(m)}};this.abort=function(){s.aborted=!0,o.forEach(function(u){return u()})}},e7=e.unstable_scheduleCallback,t7=e.unstable_NormalPriority,Pn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function k0(){return{controller:new JA,data:new Map,refCount:0}}function Hc(o){o.refCount--,o.refCount===0&&e7(t7,function(){o.controller.abort()})}var Uc=null,T0=0,pl=0,ml=null;function n7(o,s){if(Uc===null){var u=Uc=[];T0=0,pl=Ag(),ml={status:"pending",value:void 0,then:function(m){u.push(m)}}}return T0++,s.then(Fv,Fv),s}function Fv(){if(--T0===0&&Uc!==null){ml!==null&&(ml.status="fulfilled");var o=Uc;Uc=null,pl=0,ml=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function r7(o,s){var u=[],m={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return o.then(function(){m.status="fulfilled",m.value=s;for(var b=0;b<u.length;b++)(0,u[b])(s)},function(b){for(m.status="rejected",m.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),m}var Bv=F.S;F.S=function(o,s){C3=Ue(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&n7(o,s),Bv!==null&&Bv(o,s)};var ms=z(null);function N0(){var o=ms.current;return o!==null?o:sn.pooledCache}function Ef(o,s){s===null?L(ms,ms.current):L(ms,s.pool)}function Hv(){var o=N0();return o===null?null:{parent:Pn._currentValue,pool:o}}var gl=Error(r(460)),R0=Error(r(474)),kf=Error(r(542)),Tf={then:function(){}};function Uv(o){return o=o.status,o==="fulfilled"||o==="rejected"}function qv(o,s,u){switch(u=o[u],u===void 0?o.push(s):u!==s&&(s.then(vo,vo),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,$v(o),o;default:if(typeof s.status=="string")s.then(vo,vo);else{if(o=sn,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=s,o.status="pending",o.then(function(m){if(s.status==="pending"){var b=s;b.status="fulfilled",b.value=m}},function(m){if(s.status==="pending"){var b=s;b.status="rejected",b.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,$v(o),o}throw ys=s,gl}}function gs(o){try{var s=o._init;return s(o._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ys=u,gl):u}}var ys=null;function Vv(){if(ys===null)throw Error(r(459));var o=ys;return ys=null,o}function $v(o){if(o===gl||o===kf)throw Error(r(483))}var yl=null,qc=0;function Nf(o){var s=qc;return qc+=1,yl===null&&(yl=[]),qv(yl,o,s)}function Vc(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function Rf(o,s){throw s.$$typeof===y?Error(r(525)):(o=Object.prototype.toString.call(s),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o)))}function Gv(o){function s(ne,Z){if(o){var oe=ne.deletions;oe===null?(ne.deletions=[Z],ne.flags|=16):oe.push(Z)}}function u(ne,Z){if(!o)return null;for(;Z!==null;)s(ne,Z),Z=Z.sibling;return null}function m(ne){for(var Z=new Map;ne!==null;)ne.key!==null?Z.set(ne.key,ne):Z.set(ne.index,ne),ne=ne.sibling;return Z}function b(ne,Z){return ne=So(ne,Z),ne.index=0,ne.sibling=null,ne}function w(ne,Z,oe){return ne.index=oe,o?(oe=ne.alternate,oe!==null?(oe=oe.index,oe<Z?(ne.flags|=67108866,Z):oe):(ne.flags|=67108866,Z)):(ne.flags|=1048576,Z)}function j(ne){return o&&ne.alternate===null&&(ne.flags|=67108866),ne}function P(ne,Z,oe,me){return Z===null||Z.tag!==6?(Z=g0(oe,ne.mode,me),Z.return=ne,Z):(Z=b(Z,oe),Z.return=ne,Z)}function X(ne,Z,oe,me){var at=oe.type;return at===S?he(ne,Z,oe.props.children,me,oe.key):Z!==null&&(Z.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===D&&gs(at)===Z.type)?(Z=b(Z,oe.props),Vc(Z,oe),Z.return=ne,Z):(Z=vf(oe.type,oe.key,oe.props,null,ne.mode,me),Vc(Z,oe),Z.return=ne,Z)}function se(ne,Z,oe,me){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==oe.containerInfo||Z.stateNode.implementation!==oe.implementation?(Z=y0(oe,ne.mode,me),Z.return=ne,Z):(Z=b(Z,oe.children||[]),Z.return=ne,Z)}function he(ne,Z,oe,me,at){return Z===null||Z.tag!==7?(Z=ds(oe,ne.mode,me,at),Z.return=ne,Z):(Z=b(Z,oe),Z.return=ne,Z)}function ye(ne,Z,oe){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=g0(""+Z,ne.mode,oe),Z.return=ne,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:return oe=vf(Z.type,Z.key,Z.props,null,ne.mode,oe),Vc(oe,Z),oe.return=ne,oe;case v:return Z=y0(Z,ne.mode,oe),Z.return=ne,Z;case D:return Z=gs(Z),ye(ne,Z,oe)}if(B(Z)||$(Z))return Z=ds(Z,ne.mode,oe,null),Z.return=ne,Z;if(typeof Z.then=="function")return ye(ne,Nf(Z),oe);if(Z.$$typeof===R)return ye(ne,Cf(ne,Z),oe);Rf(ne,Z)}return null}function ce(ne,Z,oe,me){var at=Z!==null?Z.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return at!==null?null:P(ne,Z,""+oe,me);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:return oe.key===at?X(ne,Z,oe,me):null;case v:return oe.key===at?se(ne,Z,oe,me):null;case D:return oe=gs(oe),ce(ne,Z,oe,me)}if(B(oe)||$(oe))return at!==null?null:he(ne,Z,oe,me,null);if(typeof oe.then=="function")return ce(ne,Z,Nf(oe),me);if(oe.$$typeof===R)return ce(ne,Z,Cf(ne,oe),me);Rf(ne,oe)}return null}function fe(ne,Z,oe,me,at){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ne=ne.get(oe)||null,P(Z,ne,""+me,at);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case x:return ne=ne.get(me.key===null?oe:me.key)||null,X(Z,ne,me,at);case v:return ne=ne.get(me.key===null?oe:me.key)||null,se(Z,ne,me,at);case D:return me=gs(me),fe(ne,Z,oe,me,at)}if(B(me)||$(me))return ne=ne.get(oe)||null,he(Z,ne,me,at,null);if(typeof me.then=="function")return fe(ne,Z,oe,Nf(me),at);if(me.$$typeof===R)return fe(ne,Z,oe,Cf(Z,me),at);Rf(Z,me)}return null}function $e(ne,Z,oe,me){for(var at=null,Ht=null,Je=Z,xt=Z=0,jt=null;Je!==null&&xt<oe.length;xt++){Je.index>xt?(jt=Je,Je=null):jt=Je.sibling;var Ut=ce(ne,Je,oe[xt],me);if(Ut===null){Je===null&&(Je=jt);break}o&&Je&&Ut.alternate===null&&s(ne,Je),Z=w(Ut,Z,xt),Ht===null?at=Ut:Ht.sibling=Ut,Ht=Ut,Je=jt}if(xt===oe.length)return u(ne,Je),Dt&&Co(ne,xt),at;if(Je===null){for(;xt<oe.length;xt++)Je=ye(ne,oe[xt],me),Je!==null&&(Z=w(Je,Z,xt),Ht===null?at=Je:Ht.sibling=Je,Ht=Je);return Dt&&Co(ne,xt),at}for(Je=m(Je);xt<oe.length;xt++)jt=fe(Je,ne,xt,oe[xt],me),jt!==null&&(o&&jt.alternate!==null&&Je.delete(jt.key===null?xt:jt.key),Z=w(jt,Z,xt),Ht===null?at=jt:Ht.sibling=jt,Ht=jt);return o&&Je.forEach(function(Sa){return s(ne,Sa)}),Dt&&Co(ne,xt),at}function ut(ne,Z,oe,me){if(oe==null)throw Error(r(151));for(var at=null,Ht=null,Je=Z,xt=Z=0,jt=null,Ut=oe.next();Je!==null&&!Ut.done;xt++,Ut=oe.next()){Je.index>xt?(jt=Je,Je=null):jt=Je.sibling;var Sa=ce(ne,Je,Ut.value,me);if(Sa===null){Je===null&&(Je=jt);break}o&&Je&&Sa.alternate===null&&s(ne,Je),Z=w(Sa,Z,xt),Ht===null?at=Sa:Ht.sibling=Sa,Ht=Sa,Je=jt}if(Ut.done)return u(ne,Je),Dt&&Co(ne,xt),at;if(Je===null){for(;!Ut.done;xt++,Ut=oe.next())Ut=ye(ne,Ut.value,me),Ut!==null&&(Z=w(Ut,Z,xt),Ht===null?at=Ut:Ht.sibling=Ut,Ht=Ut);return Dt&&Co(ne,xt),at}for(Je=m(Je);!Ut.done;xt++,Ut=oe.next())Ut=fe(Je,ne,xt,Ut.value,me),Ut!==null&&(o&&Ut.alternate!==null&&Je.delete(Ut.key===null?xt:Ut.key),Z=w(Ut,Z,xt),Ht===null?at=Ut:Ht.sibling=Ut,Ht=Ut);return o&&Je.forEach(function(pj){return s(ne,pj)}),Dt&&Co(ne,xt),at}function on(ne,Z,oe,me){if(typeof oe=="object"&&oe!==null&&oe.type===S&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:e:{for(var at=oe.key;Z!==null;){if(Z.key===at){if(at=oe.type,at===S){if(Z.tag===7){u(ne,Z.sibling),me=b(Z,oe.props.children),me.return=ne,ne=me;break e}}else if(Z.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===D&&gs(at)===Z.type){u(ne,Z.sibling),me=b(Z,oe.props),Vc(me,oe),me.return=ne,ne=me;break e}u(ne,Z);break}else s(ne,Z);Z=Z.sibling}oe.type===S?(me=ds(oe.props.children,ne.mode,me,oe.key),me.return=ne,ne=me):(me=vf(oe.type,oe.key,oe.props,null,ne.mode,me),Vc(me,oe),me.return=ne,ne=me)}return j(ne);case v:e:{for(at=oe.key;Z!==null;){if(Z.key===at)if(Z.tag===4&&Z.stateNode.containerInfo===oe.containerInfo&&Z.stateNode.implementation===oe.implementation){u(ne,Z.sibling),me=b(Z,oe.children||[]),me.return=ne,ne=me;break e}else{u(ne,Z);break}else s(ne,Z);Z=Z.sibling}me=y0(oe,ne.mode,me),me.return=ne,ne=me}return j(ne);case D:return oe=gs(oe),on(ne,Z,oe,me)}if(B(oe))return $e(ne,Z,oe,me);if($(oe)){if(at=$(oe),typeof at!="function")throw Error(r(150));return oe=at.call(oe),ut(ne,Z,oe,me)}if(typeof oe.then=="function")return on(ne,Z,Nf(oe),me);if(oe.$$typeof===R)return on(ne,Z,Cf(ne,oe),me);Rf(ne,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,Z!==null&&Z.tag===6?(u(ne,Z.sibling),me=b(Z,oe),me.return=ne,ne=me):(u(ne,Z),me=g0(oe,ne.mode,me),me.return=ne,ne=me),j(ne)):u(ne,Z)}return function(ne,Z,oe,me){try{qc=0;var at=on(ne,Z,oe,me);return yl=null,at}catch(Je){if(Je===gl||Je===kf)throw Je;var Ht=Xr(29,Je,null,ne.mode);return Ht.lanes=me,Ht.return=ne,Ht}}}var xs=Gv(!0),Yv=Gv(!1),oa=!1;function A0(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function j0(o,s){o=o.updateQueue,s.updateQueue===o&&(s.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function aa(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function sa(o,s,u){var m=o.updateQueue;if(m===null)return null;if(m=m.shared,(Vt&2)!==0){var b=m.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),m.pending=s,s=bf(o),jv(o,null,u),s}return xf(o,m,s,u),bf(o)}function $c(o,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var m=s.lanes;m&=o.pendingLanes,u|=m,s.lanes=u,K(o,u)}}function O0(o,s){var u=o.updateQueue,m=o.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var b=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var j={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?b=w=j:w=w.next=j,u=u.next}while(u!==null);w===null?b=w=s:w=w.next=s}else b=w=s;u={baseState:m.baseState,firstBaseUpdate:b,lastBaseUpdate:w,shared:m.shared,callbacks:m.callbacks},o.updateQueue=u;return}o=u.lastBaseUpdate,o===null?u.firstBaseUpdate=s:o.next=s,u.lastBaseUpdate=s}var M0=!1;function Gc(){if(M0){var o=ml;if(o!==null)throw o}}function Yc(o,s,u,m){M0=!1;var b=o.updateQueue;oa=!1;var w=b.firstBaseUpdate,j=b.lastBaseUpdate,P=b.shared.pending;if(P!==null){b.shared.pending=null;var X=P,se=X.next;X.next=null,j===null?w=se:j.next=se,j=X;var he=o.alternate;he!==null&&(he=he.updateQueue,P=he.lastBaseUpdate,P!==j&&(P===null?he.firstBaseUpdate=se:P.next=se,he.lastBaseUpdate=X))}if(w!==null){var ye=b.baseState;j=0,he=se=X=null,P=w;do{var ce=P.lane&-536870913,fe=ce!==P.lane;if(fe?(At&ce)===ce:(m&ce)===ce){ce!==0&&ce===pl&&(M0=!0),he!==null&&(he=he.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var $e=o,ut=P;ce=s;var on=u;switch(ut.tag){case 1:if($e=ut.payload,typeof $e=="function"){ye=$e.call(on,ye,ce);break e}ye=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=ut.payload,ce=typeof $e=="function"?$e.call(on,ye,ce):$e,ce==null)break e;ye=p({},ye,ce);break e;case 2:oa=!0}}ce=P.callback,ce!==null&&(o.flags|=64,fe&&(o.flags|=8192),fe=b.callbacks,fe===null?b.callbacks=[ce]:fe.push(ce))}else fe={lane:ce,tag:P.tag,payload:P.payload,callback:P.callback,next:null},he===null?(se=he=fe,X=ye):he=he.next=fe,j|=ce;if(P=P.next,P===null){if(P=b.shared.pending,P===null)break;fe=P,P=fe.next,fe.next=null,b.lastBaseUpdate=fe,b.shared.pending=null}}while(!0);he===null&&(X=ye),b.baseState=X,b.firstBaseUpdate=se,b.lastBaseUpdate=he,w===null&&(b.shared.lanes=0),fa|=j,o.lanes=j,o.memoizedState=ye}}function Wv(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function Kv(o,s){var u=o.callbacks;if(u!==null)for(o.callbacks=null,o=0;o<u.length;o++)Wv(u[o],s)}var xl=z(null),Af=z(0);function Qv(o,s){o=_o,L(Af,o),L(xl,s),_o=o|s.baseLanes}function L0(){L(Af,_o),L(xl,xl.current)}function _0(){_o=Af.current,Y(xl),Y(Af)}var Zr=z(null),ki=null;function la(o){var s=o.alternate;L(Ln,Ln.current&1),L(Zr,o),ki===null&&(s===null||xl.current!==null||s.memoizedState!==null)&&(ki=o)}function D0(o){L(Ln,Ln.current),L(Zr,o),ki===null&&(ki=o)}function Xv(o){o.tag===22?(L(Ln,Ln.current),L(Zr,o),ki===null&&(ki=o)):ca()}function ca(){L(Ln,Ln.current),L(Zr,Zr.current)}function Jr(o){Y(Zr),ki===o&&(ki=null),Y(Ln)}var Ln=z(0);function jf(o){for(var s=o;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Hg(u)||Ug(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var To=0,gt=null,nn=null,Fn=null,Of=!1,bl=!1,bs=!1,Mf=0,Wc=0,vl=null,i7=0;function Tn(){throw Error(r(321))}function I0(o,s){if(s===null)return!1;for(var u=0;u<s.length&&u<o.length;u++)if(!Qr(o[u],s[u]))return!1;return!0}function z0(o,s,u,m,b,w){return To=w,gt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,F.H=o===null||o.memoizedState===null?_w:Z0,bs=!1,w=u(m,b),bs=!1,bl&&(w=Jv(s,u,m,b)),Zv(o),w}function Zv(o){F.H=Xc;var s=nn!==null&&nn.next!==null;if(To=0,Fn=nn=gt=null,Of=!1,Wc=0,vl=null,s)throw Error(r(300));o===null||Bn||(o=o.dependencies,o!==null&&Sf(o)&&(Bn=!0))}function Jv(o,s,u,m){gt=o;var b=0;do{if(bl&&(vl=null),Wc=0,bl=!1,25<=b)throw Error(r(301));if(b+=1,Fn=nn=null,o.updateQueue!=null){var w=o.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}F.H=Dw,w=s(u,m)}while(bl);return w}function o7(){var o=F.H,s=o.useState()[0];return s=typeof s.then=="function"?Kc(s):s,o=o.useState()[0],(nn!==null?nn.memoizedState:null)!==o&&(gt.flags|=1024),s}function P0(){var o=Mf!==0;return Mf=0,o}function F0(o,s,u){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~u}function B0(o){if(Of){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}Of=!1}To=0,Fn=nn=gt=null,bl=!1,Wc=Mf=0,vl=null}function Cr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fn===null?gt.memoizedState=Fn=o:Fn=Fn.next=o,Fn}function _n(){if(nn===null){var o=gt.alternate;o=o!==null?o.memoizedState:null}else o=nn.next;var s=Fn===null?gt.memoizedState:Fn.next;if(s!==null)Fn=s,nn=o;else{if(o===null)throw gt.alternate===null?Error(r(467)):Error(r(310));nn=o,o={memoizedState:nn.memoizedState,baseState:nn.baseState,baseQueue:nn.baseQueue,queue:nn.queue,next:null},Fn===null?gt.memoizedState=Fn=o:Fn=Fn.next=o}return Fn}function Lf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kc(o){var s=Wc;return Wc+=1,vl===null&&(vl=[]),o=qv(vl,o,s),s=gt,(Fn===null?s.memoizedState:Fn.next)===null&&(s=s.alternate,F.H=s===null||s.memoizedState===null?_w:Z0),o}function _f(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Kc(o);if(o.$$typeof===R)return cr(o)}throw Error(r(438,String(o)))}function H0(o){var s=null,u=gt.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var m=gt.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(b){return b.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=Lf(),gt.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(o),m=0;m<o;m++)u[m]=I;return s.index++,u}function No(o,s){return typeof s=="function"?s(o):s}function Df(o){var s=_n();return U0(s,nn,o)}function U0(o,s,u){var m=o.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var b=o.baseQueue,w=m.pending;if(w!==null){if(b!==null){var j=b.next;b.next=w.next,w.next=j}s.baseQueue=b=w,m.pending=null}if(w=o.baseState,b===null)o.memoizedState=w;else{s=b.next;var P=j=null,X=null,se=s,he=!1;do{var ye=se.lane&-536870913;if(ye!==se.lane?(At&ye)===ye:(To&ye)===ye){var ce=se.revertLane;if(ce===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),ye===pl&&(he=!0);else if((To&ce)===ce){se=se.next,ce===pl&&(he=!0);continue}else ye={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(P=X=ye,j=w):X=X.next=ye,gt.lanes|=ce,fa|=ce;ye=se.action,bs&&u(w,ye),w=se.hasEagerState?se.eagerState:u(w,ye)}else ce={lane:ye,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(P=X=ce,j=w):X=X.next=ce,gt.lanes|=ye,fa|=ye;se=se.next}while(se!==null&&se!==s);if(X===null?j=w:X.next=P,!Qr(w,o.memoizedState)&&(Bn=!0,he&&(u=ml,u!==null)))throw u;o.memoizedState=w,o.baseState=j,o.baseQueue=X,m.lastRenderedState=w}return b===null&&(m.lanes=0),[o.memoizedState,m.dispatch]}function q0(o){var s=_n(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=o;var m=u.dispatch,b=u.pending,w=s.memoizedState;if(b!==null){u.pending=null;var j=b=b.next;do w=o(w,j.action),j=j.next;while(j!==b);Qr(w,s.memoizedState)||(Bn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),u.lastRenderedState=w}return[w,m]}function ew(o,s,u){var m=gt,b=_n(),w=Dt;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=s();var j=!Qr((nn||b).memoizedState,u);if(j&&(b.memoizedState=u,Bn=!0),b=b.queue,G0(rw.bind(null,m,b,o),[o]),b.getSnapshot!==s||j||Fn!==null&&Fn.memoizedState.tag&1){if(m.flags|=2048,wl(9,{destroy:void 0},nw.bind(null,m,b,u,s),null),sn===null)throw Error(r(349));w||(To&127)!==0||tw(m,s,u)}return u}function tw(o,s,u){o.flags|=16384,o={getSnapshot:s,value:u},s=gt.updateQueue,s===null?(s=Lf(),gt.updateQueue=s,s.stores=[o]):(u=s.stores,u===null?s.stores=[o]:u.push(o))}function nw(o,s,u,m){s.value=u,s.getSnapshot=m,iw(s)&&ow(o)}function rw(o,s,u){return u(function(){iw(s)&&ow(o)})}function iw(o){var s=o.getSnapshot;o=o.value;try{var u=s();return!Qr(o,u)}catch{return!0}}function ow(o){var s=us(o,2);s!==null&&Br(s,o,2)}function V0(o){var s=Cr();if(typeof o=="function"){var u=o;if(o=u(),bs){pt(!0);try{u()}finally{pt(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:o},s}function aw(o,s,u,m){return o.baseState=u,U0(o,nn,typeof m=="function"?m:No)}function a7(o,s,u,m,b){if(Pf(o))throw Error(r(485));if(o=s.action,o!==null){var w={payload:b,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){w.listeners.push(j)}};F.T!==null?u(!0):w.isTransition=!1,m(w),u=s.pending,u===null?(w.next=s.pending=w,sw(s,w)):(w.next=u.next,s.pending=u.next=w)}}function sw(o,s){var u=s.action,m=s.payload,b=o.state;if(s.isTransition){var w=F.T,j={};F.T=j;try{var P=u(b,m),X=F.S;X!==null&&X(j,P),lw(o,s,P)}catch(se){$0(o,s,se)}finally{w!==null&&j.types!==null&&(w.types=j.types),F.T=w}}else try{w=u(b,m),lw(o,s,w)}catch(se){$0(o,s,se)}}function lw(o,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){cw(o,s,m)},function(m){return $0(o,s,m)}):cw(o,s,u)}function cw(o,s,u){s.status="fulfilled",s.value=u,uw(s),o.state=u,s=o.pending,s!==null&&(u=s.next,u===s?o.pending=null:(u=u.next,s.next=u,sw(o,u)))}function $0(o,s,u){var m=o.pending;if(o.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,uw(s),s=s.next;while(s!==m)}o.action=null}function uw(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function dw(o,s){return s}function fw(o,s){if(Dt){var u=sn.formState;if(u!==null){e:{var m=gt;if(Dt){if(mn){t:{for(var b=mn,w=Ei;b.nodeType!==8;){if(!w){b=null;break t}if(b=Ti(b.nextSibling),b===null){b=null;break t}}w=b.data,b=w==="F!"||w==="F"?b:null}if(b){mn=Ti(b.nextSibling),m=b.data==="F!";break e}}ra(m)}m=!1}m&&(s=u[0])}}return u=Cr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dw,lastRenderedState:s},u.queue=m,u=Ow.bind(null,gt,m),m.dispatch=u,m=V0(!1),w=X0.bind(null,gt,!1,m.queue),m=Cr(),b={state:s,dispatch:null,action:o,pending:null},m.queue=b,u=a7.bind(null,gt,b,w,u),b.dispatch=u,m.memoizedState=o,[s,u,!1]}function hw(o){var s=_n();return pw(s,nn,o)}function pw(o,s,u){if(s=U0(o,s,dw)[0],o=Df(No)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Kc(s)}catch(j){throw j===gl?kf:j}else m=s;s=_n();var b=s.queue,w=b.dispatch;return u!==s.memoizedState&&(gt.flags|=2048,wl(9,{destroy:void 0},s7.bind(null,b,u),null)),[m,w,o]}function s7(o,s){o.action=s}function mw(o){var s=_n(),u=nn;if(u!==null)return pw(s,u,o);_n(),s=s.memoizedState,u=_n();var m=u.queue.dispatch;return u.memoizedState=o,[s,m,!1]}function wl(o,s,u,m){return o={tag:o,create:u,deps:m,inst:s,next:null},s=gt.updateQueue,s===null&&(s=Lf(),gt.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=o.next=o:(m=u.next,u.next=o,o.next=m,s.lastEffect=o),o}function gw(){return _n().memoizedState}function If(o,s,u,m){var b=Cr();gt.flags|=o,b.memoizedState=wl(1|s,{destroy:void 0},u,m===void 0?null:m)}function zf(o,s,u,m){var b=_n();m=m===void 0?null:m;var w=b.memoizedState.inst;nn!==null&&m!==null&&I0(m,nn.memoizedState.deps)?b.memoizedState=wl(s,w,u,m):(gt.flags|=o,b.memoizedState=wl(1|s,w,u,m))}function yw(o,s){If(8390656,8,o,s)}function G0(o,s){zf(2048,8,o,s)}function l7(o){gt.flags|=4;var s=gt.updateQueue;if(s===null)s=Lf(),gt.updateQueue=s,s.events=[o];else{var u=s.events;u===null?s.events=[o]:u.push(o)}}function xw(o){var s=_n().memoizedState;return l7({ref:s,nextImpl:o}),function(){if((Vt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function bw(o,s){return zf(4,2,o,s)}function vw(o,s){return zf(4,4,o,s)}function ww(o,s){if(typeof s=="function"){o=o();var u=s(o);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function Sw(o,s,u){u=u!=null?u.concat([o]):null,zf(4,4,ww.bind(null,s,o),u)}function Y0(){}function Cw(o,s){var u=_n();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&I0(s,m[1])?m[0]:(u.memoizedState=[o,s],o)}function Ew(o,s){var u=_n();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&I0(s,m[1]))return m[0];if(m=o(),bs){pt(!0);try{o()}finally{pt(!1)}}return u.memoizedState=[m,s],m}function W0(o,s,u){return u===void 0||(To&1073741824)!==0&&(At&261930)===0?o.memoizedState=s:(o.memoizedState=u,o=k3(),gt.lanes|=o,fa|=o,u)}function kw(o,s,u,m){return Qr(u,s)?u:xl.current!==null?(o=W0(o,u,m),Qr(o,s)||(Bn=!0),o):(To&42)===0||(To&1073741824)!==0&&(At&261930)===0?(Bn=!0,o.memoizedState=u):(o=k3(),gt.lanes|=o,fa|=o,s)}function Tw(o,s,u,m,b){var w=q.p;q.p=w!==0&&8>w?w:8;var j=F.T,P={};F.T=P,X0(o,!1,s,u);try{var X=b(),se=F.S;if(se!==null&&se(P,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var he=r7(X,m);Qc(o,s,he,ni(o))}else Qc(o,s,m,ni(o))}catch(ye){Qc(o,s,{then:function(){},status:"rejected",reason:ye},ni())}finally{q.p=w,j!==null&&P.types!==null&&(j.types=P.types),F.T=j}}function c7(){}function K0(o,s,u,m){if(o.tag!==5)throw Error(r(476));var b=Nw(o).queue;Tw(o,b,s,W,u===null?c7:function(){return Rw(o),u(m)})}function Nw(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:W},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:u},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function Rw(o){var s=Nw(o);s.next===null&&(s=o.alternate.memoizedState),Qc(o,s.next.queue,{},ni())}function Q0(){return cr(hu)}function Aw(){return _n().memoizedState}function jw(){return _n().memoizedState}function u7(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var u=ni();o=aa(u);var m=sa(s,o,u);m!==null&&(Br(m,s,u),$c(m,s,u)),s={cache:k0()},o.payload=s;return}s=s.return}}function d7(o,s,u){var m=ni();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Pf(o)?Mw(s,u):(u=p0(o,s,u,m),u!==null&&(Br(u,o,m),Lw(u,s,m)))}function Ow(o,s,u){var m=ni();Qc(o,s,u,m)}function Qc(o,s,u,m){var b={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Pf(o))Mw(s,b);else{var w=o.alternate;if(o.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var j=s.lastRenderedState,P=w(j,u);if(b.hasEagerState=!0,b.eagerState=P,Qr(P,j))return xf(o,s,b,0),sn===null&&yf(),!1}catch{}if(u=p0(o,s,b,m),u!==null)return Br(u,o,m),Lw(u,s,m),!0}return!1}function X0(o,s,u,m){if(m={lane:2,revertLane:Ag(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Pf(o)){if(s)throw Error(r(479))}else s=p0(o,u,m,2),s!==null&&Br(s,o,2)}function Pf(o){var s=o.alternate;return o===gt||s!==null&&s===gt}function Mw(o,s){bl=Of=!0;var u=o.pending;u===null?s.next=s:(s.next=u.next,u.next=s),o.pending=s}function Lw(o,s,u){if((u&4194048)!==0){var m=s.lanes;m&=o.pendingLanes,u|=m,s.lanes=u,K(o,u)}}var Xc={readContext:cr,use:_f,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useLayoutEffect:Tn,useInsertionEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useSyncExternalStore:Tn,useId:Tn,useHostTransitionStatus:Tn,useFormState:Tn,useActionState:Tn,useOptimistic:Tn,useMemoCache:Tn,useCacheRefresh:Tn};Xc.useEffectEvent=Tn;var _w={readContext:cr,use:_f,useCallback:function(o,s){return Cr().memoizedState=[o,s===void 0?null:s],o},useContext:cr,useEffect:yw,useImperativeHandle:function(o,s,u){u=u!=null?u.concat([o]):null,If(4194308,4,ww.bind(null,s,o),u)},useLayoutEffect:function(o,s){return If(4194308,4,o,s)},useInsertionEffect:function(o,s){If(4,2,o,s)},useMemo:function(o,s){var u=Cr();s=s===void 0?null:s;var m=o();if(bs){pt(!0);try{o()}finally{pt(!1)}}return u.memoizedState=[m,s],m},useReducer:function(o,s,u){var m=Cr();if(u!==void 0){var b=u(s);if(bs){pt(!0);try{u(s)}finally{pt(!1)}}}else b=s;return m.memoizedState=m.baseState=b,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:b},m.queue=o,o=o.dispatch=d7.bind(null,gt,o),[m.memoizedState,o]},useRef:function(o){var s=Cr();return o={current:o},s.memoizedState=o},useState:function(o){o=V0(o);var s=o.queue,u=Ow.bind(null,gt,s);return s.dispatch=u,[o.memoizedState,u]},useDebugValue:Y0,useDeferredValue:function(o,s){var u=Cr();return W0(u,o,s)},useTransition:function(){var o=V0(!1);return o=Tw.bind(null,gt,o.queue,!0,!1),Cr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,u){var m=gt,b=Cr();if(Dt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),sn===null)throw Error(r(349));(At&127)!==0||tw(m,s,u)}b.memoizedState=u;var w={value:u,getSnapshot:s};return b.queue=w,yw(rw.bind(null,m,w,o),[o]),m.flags|=2048,wl(9,{destroy:void 0},nw.bind(null,m,w,u,s),null),u},useId:function(){var o=Cr(),s=sn.identifierPrefix;if(Dt){var u=Ji,m=Zi;u=(m&~(1<<32-mt(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=Mf++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=i7++,s="_"+s+"r_"+u.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:Q0,useFormState:fw,useActionState:fw,useOptimistic:function(o){var s=Cr();s.memoizedState=s.baseState=o;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=X0.bind(null,gt,!0,u),u.dispatch=s,[o,s]},useMemoCache:H0,useCacheRefresh:function(){return Cr().memoizedState=u7.bind(null,gt)},useEffectEvent:function(o){var s=Cr(),u={impl:o};return s.memoizedState=u,function(){if((Vt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Z0={readContext:cr,use:_f,useCallback:Cw,useContext:cr,useEffect:G0,useImperativeHandle:Sw,useInsertionEffect:bw,useLayoutEffect:vw,useMemo:Ew,useReducer:Df,useRef:gw,useState:function(){return Df(No)},useDebugValue:Y0,useDeferredValue:function(o,s){var u=_n();return kw(u,nn.memoizedState,o,s)},useTransition:function(){var o=Df(No)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Kc(o),s]},useSyncExternalStore:ew,useId:Aw,useHostTransitionStatus:Q0,useFormState:hw,useActionState:hw,useOptimistic:function(o,s){var u=_n();return aw(u,nn,o,s)},useMemoCache:H0,useCacheRefresh:jw};Z0.useEffectEvent=xw;var Dw={readContext:cr,use:_f,useCallback:Cw,useContext:cr,useEffect:G0,useImperativeHandle:Sw,useInsertionEffect:bw,useLayoutEffect:vw,useMemo:Ew,useReducer:q0,useRef:gw,useState:function(){return q0(No)},useDebugValue:Y0,useDeferredValue:function(o,s){var u=_n();return nn===null?W0(u,o,s):kw(u,nn.memoizedState,o,s)},useTransition:function(){var o=q0(No)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Kc(o),s]},useSyncExternalStore:ew,useId:Aw,useHostTransitionStatus:Q0,useFormState:mw,useActionState:mw,useOptimistic:function(o,s){var u=_n();return nn!==null?aw(u,nn,o,s):(u.baseState=o,[o,u.queue.dispatch])},useMemoCache:H0,useCacheRefresh:jw};Dw.useEffectEvent=xw;function J0(o,s,u,m){s=o.memoizedState,u=u(m,s),u=u==null?s:p({},s,u),o.memoizedState=u,o.lanes===0&&(o.updateQueue.baseState=u)}var eg={enqueueSetState:function(o,s,u){o=o._reactInternals;var m=ni(),b=aa(m);b.payload=s,u!=null&&(b.callback=u),s=sa(o,b,m),s!==null&&(Br(s,o,m),$c(s,o,m))},enqueueReplaceState:function(o,s,u){o=o._reactInternals;var m=ni(),b=aa(m);b.tag=1,b.payload=s,u!=null&&(b.callback=u),s=sa(o,b,m),s!==null&&(Br(s,o,m),$c(s,o,m))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var u=ni(),m=aa(u);m.tag=2,s!=null&&(m.callback=s),s=sa(o,m,u),s!==null&&(Br(s,o,u),$c(s,o,u))}};function Iw(o,s,u,m,b,w,j){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(m,w,j):s.prototype&&s.prototype.isPureReactComponent?!zc(u,m)||!zc(b,w):!0}function zw(o,s,u,m){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,m),s.state!==o&&eg.enqueueReplaceState(s,s.state,null)}function vs(o,s){var u=s;if("ref"in s){u={};for(var m in s)m!=="ref"&&(u[m]=s[m])}if(o=o.defaultProps){u===s&&(u=p({},u));for(var b in o)u[b]===void 0&&(u[b]=o[b])}return u}function Pw(o){gf(o)}function Fw(o){console.error(o)}function Bw(o){gf(o)}function Ff(o,s){try{var u=o.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function Hw(o,s,u){try{var m=o.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function tg(o,s,u){return u=aa(u),u.tag=3,u.payload={element:null},u.callback=function(){Ff(o,s)},u}function Uw(o){return o=aa(o),o.tag=3,o}function qw(o,s,u,m){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var w=m.value;o.payload=function(){return b(w)},o.callback=function(){Hw(s,u,m)}}var j=u.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(o.callback=function(){Hw(s,u,m),typeof b!="function"&&(ha===null?ha=new Set([this]):ha.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function f7(o,s,u,m,b){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&hl(s,u,b,!0),u=Zr.current,u!==null){switch(u.tag){case 31:case 13:return ki===null?Xf():u.alternate===null&&Nn===0&&(Nn=3),u.flags&=-257,u.flags|=65536,u.lanes=b,m===Tf?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),Tg(o,m,b)),!1;case 22:return u.flags|=65536,m===Tf?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([m]):u.add(m)),Tg(o,m,b)),!1}throw Error(r(435,u.tag))}return Tg(o,m,b),Xf(),!1}if(Dt)return s=Zr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=b,m!==v0&&(o=Error(r(422),{cause:m}),Bc(wi(o,u)))):(m!==v0&&(s=Error(r(423),{cause:m}),Bc(wi(s,u))),o=o.current.alternate,o.flags|=65536,b&=-b,o.lanes|=b,m=wi(m,u),b=tg(o.stateNode,m,b),O0(o,b),Nn!==4&&(Nn=2)),!1;var w=Error(r(520),{cause:m});if(w=wi(w,u),ou===null?ou=[w]:ou.push(w),Nn!==4&&(Nn=2),s===null)return!0;m=wi(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,o=b&-b,u.lanes|=o,o=tg(u.stateNode,m,o),O0(u,o),!1;case 1:if(s=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ha===null||!ha.has(w))))return u.flags|=65536,b&=-b,u.lanes|=b,b=Uw(b),qw(b,o,u,m),O0(u,b),!1}u=u.return}while(u!==null);return!1}var ng=Error(r(461)),Bn=!1;function ur(o,s,u,m){s.child=o===null?Yv(s,null,u,m):xs(s,o.child,u,m)}function Vw(o,s,u,m,b){u=u.render;var w=s.ref;if("ref"in m){var j={};for(var P in m)P!=="ref"&&(j[P]=m[P])}else j=m;return ps(s),m=z0(o,s,u,j,w,b),P=P0(),o!==null&&!Bn?(F0(o,s,b),Ro(o,s,b)):(Dt&&P&&x0(s),s.flags|=1,ur(o,s,m,b),s.child)}function $w(o,s,u,m,b){if(o===null){var w=u.type;return typeof w=="function"&&!m0(w)&&w.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=w,Gw(o,s,w,m,b)):(o=vf(u.type,null,m,s,s.mode,b),o.ref=s.ref,o.return=s,s.child=o)}if(w=o.child,!ug(o,b)){var j=w.memoizedProps;if(u=u.compare,u=u!==null?u:zc,u(j,m)&&o.ref===s.ref)return Ro(o,s,b)}return s.flags|=1,o=So(w,m),o.ref=s.ref,o.return=s,s.child=o}function Gw(o,s,u,m,b){if(o!==null){var w=o.memoizedProps;if(zc(w,m)&&o.ref===s.ref)if(Bn=!1,s.pendingProps=m=w,ug(o,b))(o.flags&131072)!==0&&(Bn=!0);else return s.lanes=o.lanes,Ro(o,s,b)}return rg(o,s,u,m,b)}function Yw(o,s,u,m){var b=m.children,w=o!==null?o.memoizedState:null;if(o===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,o!==null){for(m=s.child=o.child,b=0;m!==null;)b=b|m.lanes|m.childLanes,m=m.sibling;m=b&~w}else m=0,s.child=null;return Ww(o,s,w,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&Ef(s,w!==null?w.cachePool:null),w!==null?Qv(s,w):L0(),Xv(s);else return m=s.lanes=536870912,Ww(o,s,w!==null?w.baseLanes|u:u,u,m)}else w!==null?(Ef(s,w.cachePool),Qv(s,w),ca(),s.memoizedState=null):(o!==null&&Ef(s,null),L0(),ca());return ur(o,s,b,u),s.child}function Zc(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Ww(o,s,u,m,b){var w=N0();return w=w===null?null:{parent:Pn._currentValue,pool:w},s.memoizedState={baseLanes:u,cachePool:w},o!==null&&Ef(s,null),L0(),Xv(s),o!==null&&hl(o,s,m,!0),s.childLanes=b,null}function Bf(o,s){return s=Uf({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function Kw(o,s,u){return xs(s,o.child,null,u),o=Bf(s,s.pendingProps),o.flags|=2,Jr(s),s.memoizedState=null,o}function h7(o,s,u){var m=s.pendingProps,b=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(Dt){if(m.mode==="hidden")return o=Bf(s,m),s.lanes=536870912,Zc(null,o);if(D0(s),(o=mn)?(o=s5(o,Ei),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:ta!==null?{id:Zi,overflow:Ji}:null,retryLane:536870912,hydrationErrors:null},u=Mv(o),u.return=s,s.child=u,lr=s,mn=null)):o=null,o===null)throw ra(s);return s.lanes=536870912,null}return Bf(s,m)}var w=o.memoizedState;if(w!==null){var j=w.dehydrated;if(D0(s),b)if(s.flags&256)s.flags&=-257,s=Kw(o,s,u);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(Bn||hl(o,s,u,!1),b=(u&o.childLanes)!==0,Bn||b){if(m=sn,m!==null&&(j=J(m,u),j!==0&&j!==w.retryLane))throw w.retryLane=j,us(o,j),Br(m,o,j),ng;Xf(),s=Kw(o,s,u)}else o=w.treeContext,mn=Ti(j.nextSibling),lr=s,Dt=!0,na=null,Ei=!1,o!==null&&Dv(s,o),s=Bf(s,m),s.flags|=4096;return s}return o=So(o.child,{mode:m.mode,children:m.children}),o.ref=s.ref,s.child=o,o.return=s,o}function Hf(o,s){var u=s.ref;if(u===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(o===null||o.ref!==u)&&(s.flags|=4194816)}}function rg(o,s,u,m,b){return ps(s),u=z0(o,s,u,m,void 0,b),m=P0(),o!==null&&!Bn?(F0(o,s,b),Ro(o,s,b)):(Dt&&m&&x0(s),s.flags|=1,ur(o,s,u,b),s.child)}function Qw(o,s,u,m,b,w){return ps(s),s.updateQueue=null,u=Jv(s,m,u,b),Zv(o),m=P0(),o!==null&&!Bn?(F0(o,s,w),Ro(o,s,w)):(Dt&&m&&x0(s),s.flags|=1,ur(o,s,u,w),s.child)}function Xw(o,s,u,m,b){if(ps(s),s.stateNode===null){var w=cl,j=u.contextType;typeof j=="object"&&j!==null&&(w=cr(j)),w=new u(m,w),s.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=eg,s.stateNode=w,w._reactInternals=s,w=s.stateNode,w.props=m,w.state=s.memoizedState,w.refs={},A0(s),j=u.contextType,w.context=typeof j=="object"&&j!==null?cr(j):cl,w.state=s.memoizedState,j=u.getDerivedStateFromProps,typeof j=="function"&&(J0(s,u,j,m),w.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(j=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),j!==w.state&&eg.enqueueReplaceState(w,w.state,null),Yc(s,m,w,b),Gc(),w.state=s.memoizedState),typeof w.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(o===null){w=s.stateNode;var P=s.memoizedProps,X=vs(u,P);w.props=X;var se=w.context,he=u.contextType;j=cl,typeof he=="object"&&he!==null&&(j=cr(he));var ye=u.getDerivedStateFromProps;he=typeof ye=="function"||typeof w.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,he||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P||se!==j)&&zw(s,w,m,j),oa=!1;var ce=s.memoizedState;w.state=ce,Yc(s,m,w,b),Gc(),se=s.memoizedState,P||ce!==se||oa?(typeof ye=="function"&&(J0(s,u,ye,m),se=s.memoizedState),(X=oa||Iw(s,u,X,m,ce,se,j))?(he||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(s.flags|=4194308)):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=se),w.props=m,w.state=se,w.context=j,m=X):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{w=s.stateNode,j0(o,s),j=s.memoizedProps,he=vs(u,j),w.props=he,ye=s.pendingProps,ce=w.context,se=u.contextType,X=cl,typeof se=="object"&&se!==null&&(X=cr(se)),P=u.getDerivedStateFromProps,(se=typeof P=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(j!==ye||ce!==X)&&zw(s,w,m,X),oa=!1,ce=s.memoizedState,w.state=ce,Yc(s,m,w,b),Gc();var fe=s.memoizedState;j!==ye||ce!==fe||oa||o!==null&&o.dependencies!==null&&Sf(o.dependencies)?(typeof P=="function"&&(J0(s,u,P,m),fe=s.memoizedState),(he=oa||Iw(s,u,he,m,ce,fe,X)||o!==null&&o.dependencies!==null&&Sf(o.dependencies))?(se||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(m,fe,X),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(m,fe,X)),typeof w.componentDidUpdate=="function"&&(s.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof w.componentDidUpdate!="function"||j===o.memoizedProps&&ce===o.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||j===o.memoizedProps&&ce===o.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=fe),w.props=m,w.state=fe,w.context=X,m=he):(typeof w.componentDidUpdate!="function"||j===o.memoizedProps&&ce===o.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||j===o.memoizedProps&&ce===o.memoizedState||(s.flags|=1024),m=!1)}return w=m,Hf(o,s),m=(s.flags&128)!==0,w||m?(w=s.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:w.render(),s.flags|=1,o!==null&&m?(s.child=xs(s,o.child,null,b),s.child=xs(s,null,u,b)):ur(o,s,u,b),s.memoizedState=w.state,o=s.child):o=Ro(o,s,b),o}function Zw(o,s,u,m){return fs(),s.flags|=256,ur(o,s,u,m),s.child}var ig={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function og(o){return{baseLanes:o,cachePool:Hv()}}function ag(o,s,u){return o=o!==null?o.childLanes&~u:0,s&&(o|=ti),o}function Jw(o,s,u){var m=s.pendingProps,b=!1,w=(s.flags&128)!==0,j;if((j=w)||(j=o!==null&&o.memoizedState===null?!1:(Ln.current&2)!==0),j&&(b=!0,s.flags&=-129),j=(s.flags&32)!==0,s.flags&=-33,o===null){if(Dt){if(b?la(s):ca(),(o=mn)?(o=s5(o,Ei),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:ta!==null?{id:Zi,overflow:Ji}:null,retryLane:536870912,hydrationErrors:null},u=Mv(o),u.return=s,s.child=u,lr=s,mn=null)):o=null,o===null)throw ra(s);return Ug(o)?s.lanes=32:s.lanes=536870912,null}var P=m.children;return m=m.fallback,b?(ca(),b=s.mode,P=Uf({mode:"hidden",children:P},b),m=ds(m,b,u,null),P.return=s,m.return=s,P.sibling=m,s.child=P,m=s.child,m.memoizedState=og(u),m.childLanes=ag(o,j,u),s.memoizedState=ig,Zc(null,m)):(la(s),sg(s,P))}var X=o.memoizedState;if(X!==null&&(P=X.dehydrated,P!==null)){if(w)s.flags&256?(la(s),s.flags&=-257,s=lg(o,s,u)):s.memoizedState!==null?(ca(),s.child=o.child,s.flags|=128,s=null):(ca(),P=m.fallback,b=s.mode,m=Uf({mode:"visible",children:m.children},b),P=ds(P,b,u,null),P.flags|=2,m.return=s,P.return=s,m.sibling=P,s.child=m,xs(s,o.child,null,u),m=s.child,m.memoizedState=og(u),m.childLanes=ag(o,j,u),s.memoizedState=ig,s=Zc(null,m));else if(la(s),Ug(P)){if(j=P.nextSibling&&P.nextSibling.dataset,j)var se=j.dgst;j=se,m=Error(r(419)),m.stack="",m.digest=j,Bc({value:m,source:null,stack:null}),s=lg(o,s,u)}else if(Bn||hl(o,s,u,!1),j=(u&o.childLanes)!==0,Bn||j){if(j=sn,j!==null&&(m=J(j,u),m!==0&&m!==X.retryLane))throw X.retryLane=m,us(o,m),Br(j,o,m),ng;Hg(P)||Xf(),s=lg(o,s,u)}else Hg(P)?(s.flags|=192,s.child=o.child,s=null):(o=X.treeContext,mn=Ti(P.nextSibling),lr=s,Dt=!0,na=null,Ei=!1,o!==null&&Dv(s,o),s=sg(s,m.children),s.flags|=4096);return s}return b?(ca(),P=m.fallback,b=s.mode,X=o.child,se=X.sibling,m=So(X,{mode:"hidden",children:m.children}),m.subtreeFlags=X.subtreeFlags&65011712,se!==null?P=So(se,P):(P=ds(P,b,u,null),P.flags|=2),P.return=s,m.return=s,m.sibling=P,s.child=m,Zc(null,m),m=s.child,P=o.child.memoizedState,P===null?P=og(u):(b=P.cachePool,b!==null?(X=Pn._currentValue,b=b.parent!==X?{parent:X,pool:X}:b):b=Hv(),P={baseLanes:P.baseLanes|u,cachePool:b}),m.memoizedState=P,m.childLanes=ag(o,j,u),s.memoizedState=ig,Zc(o.child,m)):(la(s),u=o.child,o=u.sibling,u=So(u,{mode:"visible",children:m.children}),u.return=s,u.sibling=null,o!==null&&(j=s.deletions,j===null?(s.deletions=[o],s.flags|=16):j.push(o)),s.child=u,s.memoizedState=null,u)}function sg(o,s){return s=Uf({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function Uf(o,s){return o=Xr(22,o,null,s),o.lanes=0,o}function lg(o,s,u){return xs(s,o.child,null,u),o=sg(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function e3(o,s,u){o.lanes|=s;var m=o.alternate;m!==null&&(m.lanes|=s),C0(o.return,s,u)}function cg(o,s,u,m,b,w){var j=o.memoizedState;j===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:b,treeForkCount:w}:(j.isBackwards=s,j.rendering=null,j.renderingStartTime=0,j.last=m,j.tail=u,j.tailMode=b,j.treeForkCount=w)}function t3(o,s,u){var m=s.pendingProps,b=m.revealOrder,w=m.tail;m=m.children;var j=Ln.current,P=(j&2)!==0;if(P?(j=j&1|2,s.flags|=128):j&=1,L(Ln,j),ur(o,s,m,u),m=Dt?Fc:0,!P&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&e3(o,u,s);else if(o.tag===19)e3(o,u,s);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(b){case"forwards":for(u=s.child,b=null;u!==null;)o=u.alternate,o!==null&&jf(o)===null&&(b=u),u=u.sibling;u=b,u===null?(b=s.child,s.child=null):(b=u.sibling,u.sibling=null),cg(s,!1,b,u,w,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=s.child,s.child=null;b!==null;){if(o=b.alternate,o!==null&&jf(o)===null){s.child=b;break}o=b.sibling,b.sibling=u,u=b,b=o}cg(s,!0,u,null,w,m);break;case"together":cg(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function Ro(o,s,u){if(o!==null&&(s.dependencies=o.dependencies),fa|=s.lanes,(u&s.childLanes)===0)if(o!==null){if(hl(o,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(o!==null&&s.child!==o.child)throw Error(r(153));if(s.child!==null){for(o=s.child,u=So(o,o.pendingProps),s.child=u,u.return=s;o.sibling!==null;)o=o.sibling,u=u.sibling=So(o,o.pendingProps),u.return=s;u.sibling=null}return s.child}function ug(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&Sf(o)))}function p7(o,s,u){switch(s.tag){case 3:ue(s,s.stateNode.containerInfo),ia(s,Pn,o.memoizedState.cache),fs();break;case 27:case 5:Ee(s);break;case 4:ue(s,s.stateNode.containerInfo);break;case 10:ia(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,D0(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(la(s),s.flags|=128,null):(u&s.child.childLanes)!==0?Jw(o,s,u):(la(s),o=Ro(o,s,u),o!==null?o.sibling:null);la(s);break;case 19:var b=(o.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(hl(o,s,u,!1),m=(u&s.childLanes)!==0),b){if(m)return t3(o,s,u);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),L(Ln,Ln.current),m)break;return null;case 22:return s.lanes=0,Yw(o,s,u,s.pendingProps);case 24:ia(s,Pn,o.memoizedState.cache)}return Ro(o,s,u)}function n3(o,s,u){if(o!==null)if(o.memoizedProps!==s.pendingProps)Bn=!0;else{if(!ug(o,u)&&(s.flags&128)===0)return Bn=!1,p7(o,s,u);Bn=(o.flags&131072)!==0}else Bn=!1,Dt&&(s.flags&1048576)!==0&&_v(s,Fc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(o=gs(s.elementType),s.type=o,typeof o=="function")m0(o)?(m=vs(o,m),s.tag=1,s=Xw(null,s,o,m,u)):(s.tag=0,s=rg(null,s,o,m,u));else{if(o!=null){var b=o.$$typeof;if(b===M){s.tag=11,s=Vw(null,s,o,m,u);break e}else if(b===N){s.tag=14,s=$w(null,s,o,m,u);break e}}throw s=G(o)||o,Error(r(306,s,""))}}return s;case 0:return rg(o,s,s.type,s.pendingProps,u);case 1:return m=s.type,b=vs(m,s.pendingProps),Xw(o,s,m,b,u);case 3:e:{if(ue(s,s.stateNode.containerInfo),o===null)throw Error(r(387));m=s.pendingProps;var w=s.memoizedState;b=w.element,j0(o,s),Yc(s,m,null,u);var j=s.memoizedState;if(m=j.cache,ia(s,Pn,m),m!==w.cache&&E0(s,[Pn],u,!0),Gc(),m=j.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:j.cache},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){s=Zw(o,s,m,u);break e}else if(m!==b){b=wi(Error(r(424)),s),Bc(b),s=Zw(o,s,m,u);break e}else for(o=s.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,mn=Ti(o.firstChild),lr=s,Dt=!0,na=null,Ei=!0,u=Yv(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(fs(),m===b){s=Ro(o,s,u);break e}ur(o,s,m,u)}s=s.child}return s;case 26:return Hf(o,s),o===null?(u=h5(s.type,null,s.pendingProps,null))?s.memoizedState=u:Dt||(u=s.type,o=s.pendingProps,m=ih(Q.current).createElement(u),m[_e]=s,m[Be]=o,dr(m,u,o),bn(m),s.stateNode=m):s.memoizedState=h5(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return Ee(s),o===null&&Dt&&(m=s.stateNode=u5(s.type,s.pendingProps,Q.current),lr=s,Ei=!0,b=mn,ya(s.type)?(qg=b,mn=Ti(m.firstChild)):mn=b),ur(o,s,s.pendingProps.children,u),Hf(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&Dt&&((b=m=mn)&&(m=V7(m,s.type,s.pendingProps,Ei),m!==null?(s.stateNode=m,lr=s,mn=Ti(m.firstChild),Ei=!1,b=!0):b=!1),b||ra(s)),Ee(s),b=s.type,w=s.pendingProps,j=o!==null?o.memoizedProps:null,m=w.children,Pg(b,w)?m=null:j!==null&&Pg(b,j)&&(s.flags|=32),s.memoizedState!==null&&(b=z0(o,s,o7,null,null,u),hu._currentValue=b),Hf(o,s),ur(o,s,m,u),s.child;case 6:return o===null&&Dt&&((o=u=mn)&&(u=$7(u,s.pendingProps,Ei),u!==null?(s.stateNode=u,lr=s,mn=null,o=!0):o=!1),o||ra(s)),null;case 13:return Jw(o,s,u);case 4:return ue(s,s.stateNode.containerInfo),m=s.pendingProps,o===null?s.child=xs(s,null,m,u):ur(o,s,m,u),s.child;case 11:return Vw(o,s,s.type,s.pendingProps,u);case 7:return ur(o,s,s.pendingProps,u),s.child;case 8:return ur(o,s,s.pendingProps.children,u),s.child;case 12:return ur(o,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,ia(s,s.type,m.value),ur(o,s,m.children,u),s.child;case 9:return b=s.type._context,m=s.pendingProps.children,ps(s),b=cr(b),m=m(b),s.flags|=1,ur(o,s,m,u),s.child;case 14:return $w(o,s,s.type,s.pendingProps,u);case 15:return Gw(o,s,s.type,s.pendingProps,u);case 19:return t3(o,s,u);case 31:return h7(o,s,u);case 22:return Yw(o,s,u,s.pendingProps);case 24:return ps(s),m=cr(Pn),o===null?(b=N0(),b===null&&(b=sn,w=k0(),b.pooledCache=w,w.refCount++,w!==null&&(b.pooledCacheLanes|=u),b=w),s.memoizedState={parent:m,cache:b},A0(s),ia(s,Pn,b)):((o.lanes&u)!==0&&(j0(o,s),Yc(s,null,null,u),Gc()),b=o.memoizedState,w=s.memoizedState,b.parent!==m?(b={parent:m,cache:m},s.memoizedState=b,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=b),ia(s,Pn,m)):(m=w.cache,ia(s,Pn,m),m!==b.cache&&E0(s,[Pn],u,!0))),ur(o,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Ao(o){o.flags|=4}function dg(o,s,u,m,b){if((s=(o.mode&32)!==0)&&(s=!1),s){if(o.flags|=16777216,(b&335544128)===b)if(o.stateNode.complete)o.flags|=8192;else if(A3())o.flags|=8192;else throw ys=Tf,R0}else o.flags&=-16777217}function r3(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!x5(s))if(A3())o.flags|=8192;else throw ys=Tf,R0}function qf(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?pn():536870912,o.lanes|=s,kl|=s)}function Jc(o,s){if(!Dt)switch(o.tailMode){case"hidden":s=o.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?o.tail=null:u.sibling=null;break;case"collapsed":u=o.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:m.sibling=null}}function gn(o){var s=o.alternate!==null&&o.alternate.child===o.child,u=0,m=0;if(s)for(var b=o.child;b!==null;)u|=b.lanes|b.childLanes,m|=b.subtreeFlags&65011712,m|=b.flags&65011712,b.return=o,b=b.sibling;else for(b=o.child;b!==null;)u|=b.lanes|b.childLanes,m|=b.subtreeFlags,m|=b.flags,b.return=o,b=b.sibling;return o.subtreeFlags|=m,o.childLanes=u,s}function m7(o,s,u){var m=s.pendingProps;switch(b0(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gn(s),null;case 1:return gn(s),null;case 3:return u=s.stateNode,m=null,o!==null&&(m=o.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),ko(Pn),Se(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(o===null||o.child===null)&&(fl(s)?Ao(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,w0())),gn(s),null;case 26:var b=s.type,w=s.memoizedState;return o===null?(Ao(s),w!==null?(gn(s),r3(s,w)):(gn(s),dg(s,b,null,m,u))):w?w!==o.memoizedState?(Ao(s),gn(s),r3(s,w)):(gn(s),s.flags&=-16777217):(o=o.memoizedProps,o!==m&&Ao(s),gn(s),dg(s,b,o,m,u)),null;case 27:if(ze(s),u=Q.current,b=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==m&&Ao(s);else{if(!m){if(s.stateNode===null)throw Error(r(166));return gn(s),null}o=ee.current,fl(s)?Iv(s):(o=u5(b,m,u),s.stateNode=o,Ao(s))}return gn(s),null;case 5:if(ze(s),b=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==m&&Ao(s);else{if(!m){if(s.stateNode===null)throw Error(r(166));return gn(s),null}if(w=ee.current,fl(s))Iv(s);else{var j=ih(Q.current);switch(w){case 1:w=j.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:w=j.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":w=j.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":w=j.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":w=j.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof m.is=="string"?j.createElement("select",{is:m.is}):j.createElement("select"),m.multiple?w.multiple=!0:m.size&&(w.size=m.size);break;default:w=typeof m.is=="string"?j.createElement(b,{is:m.is}):j.createElement(b)}}w[_e]=s,w[Be]=m;e:for(j=s.child;j!==null;){if(j.tag===5||j.tag===6)w.appendChild(j.stateNode);else if(j.tag!==4&&j.tag!==27&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===s)break e;for(;j.sibling===null;){if(j.return===null||j.return===s)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}s.stateNode=w;e:switch(dr(w,b,m),b){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Ao(s)}}return gn(s),dg(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,u),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==m&&Ao(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(r(166));if(o=Q.current,fl(s)){if(o=s.stateNode,u=s.memoizedProps,m=null,b=lr,b!==null)switch(b.tag){case 27:case 5:m=b.memoizedProps}o[_e]=s,o=!!(o.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||J3(o.nodeValue,u)),o||ra(s,!0)}else o=ih(o).createTextNode(m),o[_e]=s,s.stateNode=o}return gn(s),null;case 31:if(u=s.memoizedState,o===null||o.memoizedState!==null){if(m=fl(s),u!==null){if(o===null){if(!m)throw Error(r(318));if(o=s.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[_e]=s}else fs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;gn(s),o=!1}else u=w0(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=u),o=!0;if(!o)return s.flags&256?(Jr(s),s):(Jr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return gn(s),null;case 13:if(m=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(b=fl(s),m!==null&&m.dehydrated!==null){if(o===null){if(!b)throw Error(r(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[_e]=s}else fs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;gn(s),b=!1}else b=w0(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=b),b=!0;if(!b)return s.flags&256?(Jr(s),s):(Jr(s),null)}return Jr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,o=o!==null&&o.memoizedState!==null,u&&(m=s.child,b=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(b=m.alternate.memoizedState.cachePool.pool),w=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(w=m.memoizedState.cachePool.pool),w!==b&&(m.flags|=2048)),u!==o&&u&&(s.child.flags|=8192),qf(s,s.updateQueue),gn(s),null);case 4:return Se(),o===null&&Lg(s.stateNode.containerInfo),gn(s),null;case 10:return ko(s.type),gn(s),null;case 19:if(Y(Ln),m=s.memoizedState,m===null)return gn(s),null;if(b=(s.flags&128)!==0,w=m.rendering,w===null)if(b)Jc(m,!1);else{if(Nn!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(w=jf(o),w!==null){for(s.flags|=128,Jc(m,!1),o=w.updateQueue,s.updateQueue=o,qf(s,o),s.subtreeFlags=0,o=u,u=s.child;u!==null;)Ov(u,o),u=u.sibling;return L(Ln,Ln.current&1|2),Dt&&Co(s,m.treeForkCount),s.child}o=o.sibling}m.tail!==null&&Ue()>Wf&&(s.flags|=128,b=!0,Jc(m,!1),s.lanes=4194304)}else{if(!b)if(o=jf(w),o!==null){if(s.flags|=128,b=!0,o=o.updateQueue,s.updateQueue=o,qf(s,o),Jc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!w.alternate&&!Dt)return gn(s),null}else 2*Ue()-m.renderingStartTime>Wf&&u!==536870912&&(s.flags|=128,b=!0,Jc(m,!1),s.lanes=4194304);m.isBackwards?(w.sibling=s.child,s.child=w):(o=m.last,o!==null?o.sibling=w:s.child=w,m.last=w)}return m.tail!==null?(o=m.tail,m.rendering=o,m.tail=o.sibling,m.renderingStartTime=Ue(),o.sibling=null,u=Ln.current,L(Ln,b?u&1|2:u&1),Dt&&Co(s,m.treeForkCount),o):(gn(s),null);case 22:case 23:return Jr(s),_0(),m=s.memoizedState!==null,o!==null?o.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(u&536870912)!==0&&(s.flags&128)===0&&(gn(s),s.subtreeFlags&6&&(s.flags|=8192)):gn(s),u=s.updateQueue,u!==null&&qf(s,u.retryQueue),u=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==u&&(s.flags|=2048),o!==null&&Y(ms),null;case 24:return u=null,o!==null&&(u=o.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),ko(Pn),gn(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function g7(o,s){switch(b0(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return ko(Pn),Se(),o=s.flags,(o&65536)!==0&&(o&128)===0?(s.flags=o&-65537|128,s):null;case 26:case 27:case 5:return ze(s),null;case 31:if(s.memoizedState!==null){if(Jr(s),s.alternate===null)throw Error(r(340));fs()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 13:if(Jr(s),o=s.memoizedState,o!==null&&o.dehydrated!==null){if(s.alternate===null)throw Error(r(340));fs()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return Y(Ln),null;case 4:return Se(),null;case 10:return ko(s.type),null;case 22:case 23:return Jr(s),_0(),o!==null&&Y(ms),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return ko(Pn),null;case 25:return null;default:return null}}function i3(o,s){switch(b0(s),s.tag){case 3:ko(Pn),Se();break;case 26:case 27:case 5:ze(s);break;case 4:Se();break;case 31:s.memoizedState!==null&&Jr(s);break;case 13:Jr(s);break;case 19:Y(Ln);break;case 10:ko(s.type);break;case 22:case 23:Jr(s),_0(),o!==null&&Y(ms);break;case 24:ko(Pn)}}function eu(o,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var b=m.next;u=b;do{if((u.tag&o)===o){m=void 0;var w=u.create,j=u.inst;m=w(),j.destroy=m}u=u.next}while(u!==b)}}catch(P){Zt(s,s.return,P)}}function ua(o,s,u){try{var m=s.updateQueue,b=m!==null?m.lastEffect:null;if(b!==null){var w=b.next;m=w;do{if((m.tag&o)===o){var j=m.inst,P=j.destroy;if(P!==void 0){j.destroy=void 0,b=s;var X=u,se=P;try{se()}catch(he){Zt(b,X,he)}}}m=m.next}while(m!==w)}}catch(he){Zt(s,s.return,he)}}function o3(o){var s=o.updateQueue;if(s!==null){var u=o.stateNode;try{Kv(s,u)}catch(m){Zt(o,o.return,m)}}}function a3(o,s,u){u.props=vs(o.type,o.memoizedProps),u.state=o.memoizedState;try{u.componentWillUnmount()}catch(m){Zt(o,s,m)}}function tu(o,s){try{var u=o.ref;if(u!==null){switch(o.tag){case 26:case 27:case 5:var m=o.stateNode;break;case 30:m=o.stateNode;break;default:m=o.stateNode}typeof u=="function"?o.refCleanup=u(m):u.current=m}}catch(b){Zt(o,s,b)}}function eo(o,s){var u=o.ref,m=o.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(b){Zt(o,s,b)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(b){Zt(o,s,b)}else u.current=null}function s3(o){var s=o.type,u=o.memoizedProps,m=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(b){Zt(o,o.return,b)}}function fg(o,s,u){try{var m=o.stateNode;P7(m,o.type,u,s),m[Be]=s}catch(b){Zt(o,o.return,b)}}function l3(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ya(o.type)||o.tag===4}function hg(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||l3(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ya(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function pg(o,s,u){var m=o.tag;if(m===5||m===6)o=o.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(o,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(o),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=vo));else if(m!==4&&(m===27&&ya(o.type)&&(u=o.stateNode,s=null),o=o.child,o!==null))for(pg(o,s,u),o=o.sibling;o!==null;)pg(o,s,u),o=o.sibling}function Vf(o,s,u){var m=o.tag;if(m===5||m===6)o=o.stateNode,s?u.insertBefore(o,s):u.appendChild(o);else if(m!==4&&(m===27&&ya(o.type)&&(u=o.stateNode),o=o.child,o!==null))for(Vf(o,s,u),o=o.sibling;o!==null;)Vf(o,s,u),o=o.sibling}function c3(o){var s=o.stateNode,u=o.memoizedProps;try{for(var m=o.type,b=s.attributes;b.length;)s.removeAttributeNode(b[0]);dr(s,m,u),s[_e]=o,s[Be]=u}catch(w){Zt(o,o.return,w)}}var jo=!1,Hn=!1,mg=!1,u3=typeof WeakSet=="function"?WeakSet:Set,nr=null;function y7(o,s){if(o=o.containerInfo,Ig=dh,o=Sv(o),l0(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{u=(u=o.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var b=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var j=0,P=-1,X=-1,se=0,he=0,ye=o,ce=null;t:for(;;){for(var fe;ye!==u||b!==0&&ye.nodeType!==3||(P=j+b),ye!==w||m!==0&&ye.nodeType!==3||(X=j+m),ye.nodeType===3&&(j+=ye.nodeValue.length),(fe=ye.firstChild)!==null;)ce=ye,ye=fe;for(;;){if(ye===o)break t;if(ce===u&&++se===b&&(P=j),ce===w&&++he===m&&(X=j),(fe=ye.nextSibling)!==null)break;ye=ce,ce=ye.parentNode}ye=fe}u=P===-1||X===-1?null:{start:P,end:X}}else u=null}u=u||{start:0,end:0}}else u=null;for(zg={focusedElem:o,selectionRange:u},dh=!1,nr=s;nr!==null;)if(s=nr,o=s.child,(s.subtreeFlags&1028)!==0&&o!==null)o.return=s,nr=o;else for(;nr!==null;){switch(s=nr,w=s.alternate,o=s.flags,s.tag){case 0:if((o&4)!==0&&(o=s.updateQueue,o=o!==null?o.events:null,o!==null))for(u=0;u<o.length;u++)b=o[u],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&w!==null){o=void 0,u=s,b=w.memoizedProps,w=w.memoizedState,m=u.stateNode;try{var $e=vs(u.type,b);o=m.getSnapshotBeforeUpdate($e,w),m.__reactInternalSnapshotBeforeUpdate=o}catch(ut){Zt(u,u.return,ut)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,u=o.nodeType,u===9)Bg(o);else if(u===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":Bg(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=s.sibling,o!==null){o.return=s.return,nr=o;break}nr=s.return}}function d3(o,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Mo(o,u),m&4&&eu(5,u);break;case 1:if(Mo(o,u),m&4)if(o=u.stateNode,s===null)try{o.componentDidMount()}catch(j){Zt(u,u.return,j)}else{var b=vs(u.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(b,s,o.__reactInternalSnapshotBeforeUpdate)}catch(j){Zt(u,u.return,j)}}m&64&&o3(u),m&512&&tu(u,u.return);break;case 3:if(Mo(o,u),m&64&&(o=u.updateQueue,o!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{Kv(o,s)}catch(j){Zt(u,u.return,j)}}break;case 27:s===null&&m&4&&c3(u);case 26:case 5:Mo(o,u),s===null&&m&4&&s3(u),m&512&&tu(u,u.return);break;case 12:Mo(o,u);break;case 31:Mo(o,u),m&4&&p3(o,u);break;case 13:Mo(o,u),m&4&&m3(o,u),m&64&&(o=u.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(u=T7.bind(null,u),G7(o,u))));break;case 22:if(m=u.memoizedState!==null||jo,!m){s=s!==null&&s.memoizedState!==null||Hn,b=jo;var w=Hn;jo=m,(Hn=s)&&!w?Lo(o,u,(u.subtreeFlags&8772)!==0):Mo(o,u),jo=b,Hn=w}break;case 30:break;default:Mo(o,u)}}function f3(o){var s=o.alternate;s!==null&&(o.alternate=null,f3(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&En(s)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var vn=null,Ir=!1;function Oo(o,s,u){for(u=u.child;u!==null;)h3(o,s,u),u=u.sibling}function h3(o,s,u){if(Ve&&typeof Ve.onCommitFiberUnmount=="function")try{Ve.onCommitFiberUnmount(Xe,u)}catch{}switch(u.tag){case 26:Hn||eo(u,s),Oo(o,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Hn||eo(u,s);var m=vn,b=Ir;ya(u.type)&&(vn=u.stateNode,Ir=!1),Oo(o,s,u),uu(u.stateNode),vn=m,Ir=b;break;case 5:Hn||eo(u,s);case 6:if(m=vn,b=Ir,vn=null,Oo(o,s,u),vn=m,Ir=b,vn!==null)if(Ir)try{(vn.nodeType===9?vn.body:vn.nodeName==="HTML"?vn.ownerDocument.body:vn).removeChild(u.stateNode)}catch(w){Zt(u,s,w)}else try{vn.removeChild(u.stateNode)}catch(w){Zt(u,s,w)}break;case 18:vn!==null&&(Ir?(o=vn,o5(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,u.stateNode),Ll(o)):o5(vn,u.stateNode));break;case 4:m=vn,b=Ir,vn=u.stateNode.containerInfo,Ir=!0,Oo(o,s,u),vn=m,Ir=b;break;case 0:case 11:case 14:case 15:ua(2,u,s),Hn||ua(4,u,s),Oo(o,s,u);break;case 1:Hn||(eo(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&a3(u,s,m)),Oo(o,s,u);break;case 21:Oo(o,s,u);break;case 22:Hn=(m=Hn)||u.memoizedState!==null,Oo(o,s,u),Hn=m;break;default:Oo(o,s,u)}}function p3(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Ll(o)}catch(u){Zt(s,s.return,u)}}}function m3(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Ll(o)}catch(u){Zt(s,s.return,u)}}function x7(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new u3),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new u3),s;default:throw Error(r(435,o.tag))}}function $f(o,s){var u=x7(o);s.forEach(function(m){if(!u.has(m)){u.add(m);var b=N7.bind(null,o,m);m.then(b,b)}})}function zr(o,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var b=u[m],w=o,j=s,P=j;e:for(;P!==null;){switch(P.tag){case 27:if(ya(P.type)){vn=P.stateNode,Ir=!1;break e}break;case 5:vn=P.stateNode,Ir=!1;break e;case 3:case 4:vn=P.stateNode.containerInfo,Ir=!0;break e}P=P.return}if(vn===null)throw Error(r(160));h3(w,j,b),vn=null,Ir=!1,w=b.alternate,w!==null&&(w.return=null),b.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)g3(s,o),s=s.sibling}var Ui=null;function g3(o,s){var u=o.alternate,m=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:zr(s,o),Pr(o),m&4&&(ua(3,o,o.return),eu(3,o),ua(5,o,o.return));break;case 1:zr(s,o),Pr(o),m&512&&(Hn||u===null||eo(u,u.return)),m&64&&jo&&(o=o.updateQueue,o!==null&&(m=o.callbacks,m!==null&&(u=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var b=Ui;if(zr(s,o),Pr(o),m&512&&(Hn||u===null||eo(u,u.return)),m&4){var w=u!==null?u.memoizedState:null;if(m=o.memoizedState,u===null)if(m===null)if(o.stateNode===null){e:{m=o.type,u=o.memoizedProps,b=b.ownerDocument||b;t:switch(m){case"title":w=b.getElementsByTagName("title")[0],(!w||w[Cn]||w[_e]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=b.createElement(m),b.head.insertBefore(w,b.querySelector("head > title"))),dr(w,m,u),w[_e]=o,bn(w),m=w;break e;case"link":var j=g5("link","href",b).get(m+(u.href||""));if(j){for(var P=0;P<j.length;P++)if(w=j[P],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){j.splice(P,1);break t}}w=b.createElement(m),dr(w,m,u),b.head.appendChild(w);break;case"meta":if(j=g5("meta","content",b).get(m+(u.content||""))){for(P=0;P<j.length;P++)if(w=j[P],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){j.splice(P,1);break t}}w=b.createElement(m),dr(w,m,u),b.head.appendChild(w);break;default:throw Error(r(468,m))}w[_e]=o,bn(w),m=w}o.stateNode=m}else y5(b,o.type,o.stateNode);else o.stateNode=m5(b,m,o.memoizedProps);else w!==m?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,m===null?y5(b,o.type,o.stateNode):m5(b,m,o.memoizedProps)):m===null&&o.stateNode!==null&&fg(o,o.memoizedProps,u.memoizedProps)}break;case 27:zr(s,o),Pr(o),m&512&&(Hn||u===null||eo(u,u.return)),u!==null&&m&4&&fg(o,o.memoizedProps,u.memoizedProps);break;case 5:if(zr(s,o),Pr(o),m&512&&(Hn||u===null||eo(u,u.return)),o.flags&32){b=o.stateNode;try{nl(b,"")}catch($e){Zt(o,o.return,$e)}}m&4&&o.stateNode!=null&&(b=o.memoizedProps,fg(o,b,u!==null?u.memoizedProps:b)),m&1024&&(mg=!0);break;case 6:if(zr(s,o),Pr(o),m&4){if(o.stateNode===null)throw Error(r(162));m=o.memoizedProps,u=o.stateNode;try{u.nodeValue=m}catch($e){Zt(o,o.return,$e)}}break;case 3:if(sh=null,b=Ui,Ui=oh(s.containerInfo),zr(s,o),Ui=b,Pr(o),m&4&&u!==null&&u.memoizedState.isDehydrated)try{Ll(s.containerInfo)}catch($e){Zt(o,o.return,$e)}mg&&(mg=!1,y3(o));break;case 4:m=Ui,Ui=oh(o.stateNode.containerInfo),zr(s,o),Pr(o),Ui=m;break;case 12:zr(s,o),Pr(o);break;case 31:zr(s,o),Pr(o),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,$f(o,m)));break;case 13:zr(s,o),Pr(o),o.child.flags&8192&&o.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Yf=Ue()),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,$f(o,m)));break;case 22:b=o.memoizedState!==null;var X=u!==null&&u.memoizedState!==null,se=jo,he=Hn;if(jo=se||b,Hn=he||X,zr(s,o),Hn=he,jo=se,Pr(o),m&8192)e:for(s=o.stateNode,s._visibility=b?s._visibility&-2:s._visibility|1,b&&(u===null||X||jo||Hn||ws(o)),u=null,s=o;;){if(s.tag===5||s.tag===26){if(u===null){X=u=s;try{if(w=X.stateNode,b)j=w.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{P=X.stateNode;var ye=X.memoizedProps.style,ce=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;P.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch($e){Zt(X,X.return,$e)}}}else if(s.tag===6){if(u===null){X=s;try{X.stateNode.nodeValue=b?"":X.memoizedProps}catch($e){Zt(X,X.return,$e)}}}else if(s.tag===18){if(u===null){X=s;try{var fe=X.stateNode;b?a5(fe,!0):a5(X.stateNode,!1)}catch($e){Zt(X,X.return,$e)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===o)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=o.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,$f(o,u))));break;case 19:zr(s,o),Pr(o),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,$f(o,m)));break;case 30:break;case 21:break;default:zr(s,o),Pr(o)}}function Pr(o){var s=o.flags;if(s&2){try{for(var u,m=o.return;m!==null;){if(l3(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var b=u.stateNode,w=hg(o);Vf(o,w,b);break;case 5:var j=u.stateNode;u.flags&32&&(nl(j,""),u.flags&=-33);var P=hg(o);Vf(o,P,j);break;case 3:case 4:var X=u.stateNode.containerInfo,se=hg(o);pg(o,se,X);break;default:throw Error(r(161))}}catch(he){Zt(o,o.return,he)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function y3(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;y3(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function Mo(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)d3(o,s.alternate,s),s=s.sibling}function ws(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:ua(4,s,s.return),ws(s);break;case 1:eo(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&a3(s,s.return,u),ws(s);break;case 27:uu(s.stateNode);case 26:case 5:eo(s,s.return),ws(s);break;case 22:s.memoizedState===null&&ws(s);break;case 30:ws(s);break;default:ws(s)}o=o.sibling}}function Lo(o,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,b=o,w=s,j=w.flags;switch(w.tag){case 0:case 11:case 15:Lo(b,w,u),eu(4,w);break;case 1:if(Lo(b,w,u),m=w,b=m.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(se){Zt(m,m.return,se)}if(m=w,b=m.updateQueue,b!==null){var P=m.stateNode;try{var X=b.shared.hiddenCallbacks;if(X!==null)for(b.shared.hiddenCallbacks=null,b=0;b<X.length;b++)Wv(X[b],P)}catch(se){Zt(m,m.return,se)}}u&&j&64&&o3(w),tu(w,w.return);break;case 27:c3(w);case 26:case 5:Lo(b,w,u),u&&m===null&&j&4&&s3(w),tu(w,w.return);break;case 12:Lo(b,w,u);break;case 31:Lo(b,w,u),u&&j&4&&p3(b,w);break;case 13:Lo(b,w,u),u&&j&4&&m3(b,w);break;case 22:w.memoizedState===null&&Lo(b,w,u),tu(w,w.return);break;case 30:break;default:Lo(b,w,u)}s=s.sibling}}function gg(o,s){var u=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==u&&(o!=null&&o.refCount++,u!=null&&Hc(u))}function yg(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Hc(o))}function qi(o,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)x3(o,s,u,m),s=s.sibling}function x3(o,s,u,m){var b=s.flags;switch(s.tag){case 0:case 11:case 15:qi(o,s,u,m),b&2048&&eu(9,s);break;case 1:qi(o,s,u,m);break;case 3:qi(o,s,u,m),b&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Hc(o)));break;case 12:if(b&2048){qi(o,s,u,m),o=s.stateNode;try{var w=s.memoizedProps,j=w.id,P=w.onPostCommit;typeof P=="function"&&P(j,s.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(X){Zt(s,s.return,X)}}else qi(o,s,u,m);break;case 31:qi(o,s,u,m);break;case 13:qi(o,s,u,m);break;case 23:break;case 22:w=s.stateNode,j=s.alternate,s.memoizedState!==null?w._visibility&2?qi(o,s,u,m):nu(o,s):w._visibility&2?qi(o,s,u,m):(w._visibility|=2,Sl(o,s,u,m,(s.subtreeFlags&10256)!==0||!1)),b&2048&&gg(j,s);break;case 24:qi(o,s,u,m),b&2048&&yg(s.alternate,s);break;default:qi(o,s,u,m)}}function Sl(o,s,u,m,b){for(b=b&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var w=o,j=s,P=u,X=m,se=j.flags;switch(j.tag){case 0:case 11:case 15:Sl(w,j,P,X,b),eu(8,j);break;case 23:break;case 22:var he=j.stateNode;j.memoizedState!==null?he._visibility&2?Sl(w,j,P,X,b):nu(w,j):(he._visibility|=2,Sl(w,j,P,X,b)),b&&se&2048&&gg(j.alternate,j);break;case 24:Sl(w,j,P,X,b),b&&se&2048&&yg(j.alternate,j);break;default:Sl(w,j,P,X,b)}s=s.sibling}}function nu(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=o,m=s,b=m.flags;switch(m.tag){case 22:nu(u,m),b&2048&&gg(m.alternate,m);break;case 24:nu(u,m),b&2048&&yg(m.alternate,m);break;default:nu(u,m)}s=s.sibling}}var ru=8192;function Cl(o,s,u){if(o.subtreeFlags&ru)for(o=o.child;o!==null;)b3(o,s,u),o=o.sibling}function b3(o,s,u){switch(o.tag){case 26:Cl(o,s,u),o.flags&ru&&o.memoizedState!==null&&ij(u,Ui,o.memoizedState,o.memoizedProps);break;case 5:Cl(o,s,u);break;case 3:case 4:var m=Ui;Ui=oh(o.stateNode.containerInfo),Cl(o,s,u),Ui=m;break;case 22:o.memoizedState===null&&(m=o.alternate,m!==null&&m.memoizedState!==null?(m=ru,ru=16777216,Cl(o,s,u),ru=m):Cl(o,s,u));break;default:Cl(o,s,u)}}function v3(o){var s=o.alternate;if(s!==null&&(o=s.child,o!==null)){s.child=null;do s=o.sibling,o.sibling=null,o=s;while(o!==null)}}function iu(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];nr=m,S3(m,o)}v3(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)w3(o),o=o.sibling}function w3(o){switch(o.tag){case 0:case 11:case 15:iu(o),o.flags&2048&&ua(9,o,o.return);break;case 3:iu(o);break;case 12:iu(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,Gf(o)):iu(o);break;default:iu(o)}}function Gf(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];nr=m,S3(m,o)}v3(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:ua(8,s,s.return),Gf(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Gf(s));break;default:Gf(s)}o=o.sibling}}function S3(o,s){for(;nr!==null;){var u=nr;switch(u.tag){case 0:case 11:case 15:ua(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Hc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,nr=m;else e:for(u=o;nr!==null;){m=nr;var b=m.sibling,w=m.return;if(f3(m),m===u){nr=null;break e}if(b!==null){b.return=w,nr=b;break e}nr=w}}}var b7={getCacheForType:function(o){var s=cr(Pn),u=s.data.get(o);return u===void 0&&(u=o(),s.data.set(o,u)),u},cacheSignal:function(){return cr(Pn).controller.signal}},v7=typeof WeakMap=="function"?WeakMap:Map,Vt=0,sn=null,Tt=null,At=0,Xt=0,ei=null,da=!1,El=!1,xg=!1,_o=0,Nn=0,fa=0,Ss=0,bg=0,ti=0,kl=0,ou=null,Fr=null,vg=!1,Yf=0,C3=0,Wf=1/0,Kf=null,ha=null,Wn=0,pa=null,Tl=null,Do=0,wg=0,Sg=null,E3=null,au=0,Cg=null;function ni(){return(Vt&2)!==0&&At!==0?At&-At:F.T!==null?Ag():je()}function k3(){if(ti===0)if((At&536870912)===0||Dt){var o=xn;xn<<=1,(xn&3932160)===0&&(xn=262144),ti=o}else ti=536870912;return o=Zr.current,o!==null&&(o.flags|=32),ti}function Br(o,s,u){(o===sn&&(Xt===2||Xt===9)||o.cancelPendingCommit!==null)&&(Nl(o,0),ma(o,At,ti,!1)),tn(o,u),((Vt&2)===0||o!==sn)&&(o===sn&&((Vt&2)===0&&(Ss|=u),Nn===4&&ma(o,At,ti,!1)),to(o))}function T3(o,s,u){if((Vt&6)!==0)throw Error(r(327));var m=!u&&(s&127)===0&&(s&o.expiredLanes)===0||qt(o,s),b=m?C7(o,s):kg(o,s,!0),w=m;do{if(b===0){El&&!m&&ma(o,s,0,!1);break}else{if(u=o.current.alternate,w&&!w7(u)){b=kg(o,s,!1),w=!1;continue}if(b===2){if(w=s,o.errorRecoveryDisabledLanes&w)var j=0;else j=o.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){s=j;e:{var P=o;b=ou;var X=P.current.memoizedState.isDehydrated;if(X&&(Nl(P,j).flags|=256),j=kg(P,j,!1),j!==2){if(xg&&!X){P.errorRecoveryDisabledLanes|=w,Ss|=w,b=4;break e}w=Fr,Fr=b,w!==null&&(Fr===null?Fr=w:Fr.push.apply(Fr,w))}b=j}if(w=!1,b!==2)continue}}if(b===1){Nl(o,0),ma(o,s,0,!0);break}e:{switch(m=o,w=b,w){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:ma(m,s,ti,!da);break e;case 2:Fr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(b=Yf+300-Ue(),10<b)){if(ma(m,s,ti,!da),nt(m,0,!0)!==0)break e;Do=s,m.timeoutHandle=r5(N3.bind(null,m,u,Fr,Kf,vg,s,ti,Ss,kl,da,w,"Throttled",-0,0),b);break e}N3(m,u,Fr,Kf,vg,s,ti,Ss,kl,da,w,null,-0,0)}}break}while(!0);to(o)}function N3(o,s,u,m,b,w,j,P,X,se,he,ye,ce,fe){if(o.timeoutHandle=-1,ye=s.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vo},b3(s,w,ye);var $e=(w&62914560)===w?Yf-Ue():(w&4194048)===w?C3-Ue():0;if($e=oj(ye,$e),$e!==null){Do=w,o.cancelPendingCommit=$e(D3.bind(null,o,s,w,u,m,b,j,P,X,he,ye,null,ce,fe)),ma(o,w,j,!se);return}}D3(o,s,w,u,m,b,j,P,X)}function w7(o){for(var s=o;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var b=u[m],w=b.getSnapshot;b=b.value;try{if(!Qr(w(),b))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ma(o,s,u,m){s&=~bg,s&=~Ss,o.suspendedLanes|=s,o.pingedLanes&=~s,m&&(o.warmLanes|=s),m=o.expirationTimes;for(var b=s;0<b;){var w=31-mt(b),j=1<<w;m[w]=-1,b&=~j}u!==0&&yi(o,u,s)}function Qf(){return(Vt&6)===0?(su(0),!1):!0}function Eg(){if(Tt!==null){if(Xt===0)var o=Tt.return;else o=Tt,Eo=hs=null,B0(o),yl=null,qc=0,o=Tt;for(;o!==null;)i3(o.alternate,o),o=o.return;Tt=null}}function Nl(o,s){var u=o.timeoutHandle;u!==-1&&(o.timeoutHandle=-1,H7(u)),u=o.cancelPendingCommit,u!==null&&(o.cancelPendingCommit=null,u()),Do=0,Eg(),sn=o,Tt=u=So(o.current,null),At=s,Xt=0,ei=null,da=!1,El=qt(o,s),xg=!1,kl=ti=bg=Ss=fa=Nn=0,Fr=ou=null,vg=!1,(s&8)!==0&&(s|=s&32);var m=o.entangledLanes;if(m!==0)for(o=o.entanglements,m&=s;0<m;){var b=31-mt(m),w=1<<b;s|=o[b],m&=~w}return _o=s,yf(),u}function R3(o,s){gt=null,F.H=Xc,s===gl||s===kf?(s=Vv(),Xt=3):s===R0?(s=Vv(),Xt=4):Xt=s===ng?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,ei=s,Tt===null&&(Nn=1,Ff(o,wi(s,o.current)))}function A3(){var o=Zr.current;return o===null?!0:(At&4194048)===At?ki===null:(At&62914560)===At||(At&536870912)!==0?o===ki:!1}function j3(){var o=F.H;return F.H=Xc,o===null?Xc:o}function O3(){var o=F.A;return F.A=b7,o}function Xf(){Nn=4,da||(At&4194048)!==At&&Zr.current!==null||(El=!0),(fa&134217727)===0&&(Ss&134217727)===0||sn===null||ma(sn,At,ti,!1)}function kg(o,s,u){var m=Vt;Vt|=2;var b=j3(),w=O3();(sn!==o||At!==s)&&(Kf=null,Nl(o,s)),s=!1;var j=Nn;e:do try{if(Xt!==0&&Tt!==null){var P=Tt,X=ei;switch(Xt){case 8:Eg(),j=6;break e;case 3:case 2:case 9:case 6:Zr.current===null&&(s=!0);var se=Xt;if(Xt=0,ei=null,Rl(o,P,X,se),u&&El){j=0;break e}break;default:se=Xt,Xt=0,ei=null,Rl(o,P,X,se)}}S7(),j=Nn;break}catch(he){R3(o,he)}while(!0);return s&&o.shellSuspendCounter++,Eo=hs=null,Vt=m,F.H=b,F.A=w,Tt===null&&(sn=null,At=0,yf()),j}function S7(){for(;Tt!==null;)M3(Tt)}function C7(o,s){var u=Vt;Vt|=2;var m=j3(),b=O3();sn!==o||At!==s?(Kf=null,Wf=Ue()+500,Nl(o,s)):El=qt(o,s);e:do try{if(Xt!==0&&Tt!==null){s=Tt;var w=ei;t:switch(Xt){case 1:Xt=0,ei=null,Rl(o,s,w,1);break;case 2:case 9:if(Uv(w)){Xt=0,ei=null,L3(s);break}s=function(){Xt!==2&&Xt!==9||sn!==o||(Xt=7),to(o)},w.then(s,s);break e;case 3:Xt=7;break e;case 4:Xt=5;break e;case 7:Uv(w)?(Xt=0,ei=null,L3(s)):(Xt=0,ei=null,Rl(o,s,w,7));break;case 5:var j=null;switch(Tt.tag){case 26:j=Tt.memoizedState;case 5:case 27:var P=Tt;if(j?x5(j):P.stateNode.complete){Xt=0,ei=null;var X=P.sibling;if(X!==null)Tt=X;else{var se=P.return;se!==null?(Tt=se,Zf(se)):Tt=null}break t}}Xt=0,ei=null,Rl(o,s,w,5);break;case 6:Xt=0,ei=null,Rl(o,s,w,6);break;case 8:Eg(),Nn=6;break e;default:throw Error(r(462))}}E7();break}catch(he){R3(o,he)}while(!0);return Eo=hs=null,F.H=m,F.A=b,Vt=u,Tt!==null?0:(sn=null,At=0,yf(),Nn)}function E7(){for(;Tt!==null&&!be();)M3(Tt)}function M3(o){var s=n3(o.alternate,o,_o);o.memoizedProps=o.pendingProps,s===null?Zf(o):Tt=s}function L3(o){var s=o,u=s.alternate;switch(s.tag){case 15:case 0:s=Qw(u,s,s.pendingProps,s.type,void 0,At);break;case 11:s=Qw(u,s,s.pendingProps,s.type.render,s.ref,At);break;case 5:B0(s);default:i3(u,s),s=Tt=Ov(s,_o),s=n3(u,s,_o)}o.memoizedProps=o.pendingProps,s===null?Zf(o):Tt=s}function Rl(o,s,u,m){Eo=hs=null,B0(s),yl=null,qc=0;var b=s.return;try{if(f7(o,b,s,u,At)){Nn=1,Ff(o,wi(u,o.current)),Tt=null;return}}catch(w){if(b!==null)throw Tt=b,w;Nn=1,Ff(o,wi(u,o.current)),Tt=null;return}s.flags&32768?(Dt||m===1?o=!0:El||(At&536870912)!==0?o=!1:(da=o=!0,(m===2||m===9||m===3||m===6)&&(m=Zr.current,m!==null&&m.tag===13&&(m.flags|=16384))),_3(s,o)):Zf(s)}function Zf(o){var s=o;do{if((s.flags&32768)!==0){_3(s,da);return}o=s.return;var u=m7(s.alternate,s,_o);if(u!==null){Tt=u;return}if(s=s.sibling,s!==null){Tt=s;return}Tt=s=o}while(s!==null);Nn===0&&(Nn=5)}function _3(o,s){do{var u=g7(o.alternate,o);if(u!==null){u.flags&=32767,Tt=u;return}if(u=o.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(o=o.sibling,o!==null)){Tt=o;return}Tt=o=u}while(o!==null);Nn=6,Tt=null}function D3(o,s,u,m,b,w,j,P,X){o.cancelPendingCommit=null;do Jf();while(Wn!==0);if((Vt&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(w=s.lanes|s.childLanes,w|=h0,zn(o,u,w,j,P,X),o===sn&&(Tt=sn=null,At=0),Tl=s,pa=o,Do=u,wg=w,Sg=b,E3=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,R7(Oe,function(){return B3(),null})):(o.callbackNode=null,o.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=F.T,F.T=null,b=q.p,q.p=2,j=Vt,Vt|=4;try{y7(o,s,u)}finally{Vt=j,q.p=b,F.T=m}}Wn=1,I3(),z3(),P3()}}function I3(){if(Wn===1){Wn=0;var o=pa,s=Tl,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=F.T,F.T=null;var m=q.p;q.p=2;var b=Vt;Vt|=4;try{g3(s,o);var w=zg,j=Sv(o.containerInfo),P=w.focusedElem,X=w.selectionRange;if(j!==P&&P&&P.ownerDocument&&wv(P.ownerDocument.documentElement,P)){if(X!==null&&l0(P)){var se=X.start,he=X.end;if(he===void 0&&(he=se),"selectionStart"in P)P.selectionStart=se,P.selectionEnd=Math.min(he,P.value.length);else{var ye=P.ownerDocument||document,ce=ye&&ye.defaultView||window;if(ce.getSelection){var fe=ce.getSelection(),$e=P.textContent.length,ut=Math.min(X.start,$e),on=X.end===void 0?ut:Math.min(X.end,$e);!fe.extend&&ut>on&&(j=on,on=ut,ut=j);var ne=vv(P,ut),Z=vv(P,on);if(ne&&Z&&(fe.rangeCount!==1||fe.anchorNode!==ne.node||fe.anchorOffset!==ne.offset||fe.focusNode!==Z.node||fe.focusOffset!==Z.offset)){var oe=ye.createRange();oe.setStart(ne.node,ne.offset),fe.removeAllRanges(),ut>on?(fe.addRange(oe),fe.extend(Z.node,Z.offset)):(oe.setEnd(Z.node,Z.offset),fe.addRange(oe))}}}}for(ye=[],fe=P;fe=fe.parentNode;)fe.nodeType===1&&ye.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<ye.length;P++){var me=ye[P];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}dh=!!Ig,zg=Ig=null}finally{Vt=b,q.p=m,F.T=u}}o.current=s,Wn=2}}function z3(){if(Wn===2){Wn=0;var o=pa,s=Tl,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=F.T,F.T=null;var m=q.p;q.p=2;var b=Vt;Vt|=4;try{d3(o,s.alternate,s)}finally{Vt=b,q.p=m,F.T=u}}Wn=3}}function P3(){if(Wn===4||Wn===3){Wn=0,Pe();var o=pa,s=Tl,u=Do,m=E3;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Wn=5:(Wn=0,Tl=pa=null,F3(o,o.pendingLanes));var b=o.pendingLanes;if(b===0&&(ha=null),ve(u),s=s.stateNode,Ve&&typeof Ve.onCommitFiberRoot=="function")try{Ve.onCommitFiberRoot(Xe,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=F.T,b=q.p,q.p=2,F.T=null;try{for(var w=o.onRecoverableError,j=0;j<m.length;j++){var P=m[j];w(P.value,{componentStack:P.stack})}}finally{F.T=s,q.p=b}}(Do&3)!==0&&Jf(),to(o),b=o.pendingLanes,(u&261930)!==0&&(b&42)!==0?o===Cg?au++:(au=0,Cg=o):au=0,su(0)}}function F3(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,Hc(s)))}function Jf(){return I3(),z3(),P3(),B3()}function B3(){if(Wn!==5)return!1;var o=pa,s=wg;wg=0;var u=ve(Do),m=F.T,b=q.p;try{q.p=32>u?32:u,F.T=null,u=Sg,Sg=null;var w=pa,j=Do;if(Wn=0,Tl=pa=null,Do=0,(Vt&6)!==0)throw Error(r(331));var P=Vt;if(Vt|=4,w3(w.current),x3(w,w.current,j,u),Vt=P,su(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot=="function")try{Ve.onPostCommitFiberRoot(Xe,w)}catch{}return!0}finally{q.p=b,F.T=m,F3(o,s)}}function H3(o,s,u){s=wi(u,s),s=tg(o.stateNode,s,2),o=sa(o,s,2),o!==null&&(tn(o,2),to(o))}function Zt(o,s,u){if(o.tag===3)H3(o,o,u);else for(;s!==null;){if(s.tag===3){H3(s,o,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ha===null||!ha.has(m))){o=wi(u,o),u=Uw(2),m=sa(s,u,2),m!==null&&(qw(u,m,s,o),tn(m,2),to(m));break}}s=s.return}}function Tg(o,s,u){var m=o.pingCache;if(m===null){m=o.pingCache=new v7;var b=new Set;m.set(s,b)}else b=m.get(s),b===void 0&&(b=new Set,m.set(s,b));b.has(u)||(xg=!0,b.add(u),o=k7.bind(null,o,s,u),s.then(o,o))}function k7(o,s,u){var m=o.pingCache;m!==null&&m.delete(s),o.pingedLanes|=o.suspendedLanes&u,o.warmLanes&=~u,sn===o&&(At&u)===u&&(Nn===4||Nn===3&&(At&62914560)===At&&300>Ue()-Yf?(Vt&2)===0&&Nl(o,0):bg|=u,kl===At&&(kl=0)),to(o)}function U3(o,s){s===0&&(s=pn()),o=us(o,s),o!==null&&(tn(o,s),to(o))}function T7(o){var s=o.memoizedState,u=0;s!==null&&(u=s.retryLane),U3(o,u)}function N7(o,s){var u=0;switch(o.tag){case 31:case 13:var m=o.stateNode,b=o.memoizedState;b!==null&&(u=b.retryLane);break;case 19:m=o.stateNode;break;case 22:m=o.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(s),U3(o,u)}function R7(o,s){return Ce(o,s)}var eh=null,Al=null,Ng=!1,th=!1,Rg=!1,ga=0;function to(o){o!==Al&&o.next===null&&(Al===null?eh=Al=o:Al=Al.next=o),th=!0,Ng||(Ng=!0,j7())}function su(o,s){if(!Rg&&th){Rg=!0;do for(var u=!1,m=eh;m!==null;){if(o!==0){var b=m.pendingLanes;if(b===0)var w=0;else{var j=m.suspendedLanes,P=m.pingedLanes;w=(1<<31-mt(42|o)+1)-1,w&=b&~(j&~P),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,G3(m,w))}else w=At,w=nt(m,m===sn?w:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(w&3)===0||qt(m,w)||(u=!0,G3(m,w));m=m.next}while(u);Rg=!1}}function A7(){q3()}function q3(){th=Ng=!1;var o=0;ga!==0&&B7()&&(o=ga);for(var s=Ue(),u=null,m=eh;m!==null;){var b=m.next,w=V3(m,s);w===0?(m.next=null,u===null?eh=b:u.next=b,b===null&&(Al=u)):(u=m,(o!==0||(w&3)!==0)&&(th=!0)),m=b}Wn!==0&&Wn!==5||su(o),ga!==0&&(ga=0)}function V3(o,s){for(var u=o.suspendedLanes,m=o.pingedLanes,b=o.expirationTimes,w=o.pendingLanes&-62914561;0<w;){var j=31-mt(w),P=1<<j,X=b[j];X===-1?((P&u)===0||(P&m)!==0)&&(b[j]=hn(P,s)):X<=s&&(o.expiredLanes|=P),w&=~P}if(s=sn,u=At,u=nt(o,o===s?u:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),m=o.callbackNode,u===0||o===s&&(Xt===2||Xt===9)||o.cancelPendingCommit!==null)return m!==null&&m!==null&&re(m),o.callbackNode=null,o.callbackPriority=0;if((u&3)===0||qt(o,u)){if(s=u&-u,s===o.callbackPriority)return s;switch(m!==null&&re(m),ve(u)){case 2:case 8:u=we;break;case 32:u=Oe;break;case 268435456:u=He;break;default:u=Oe}return m=$3.bind(null,o),u=Ce(u,m),o.callbackPriority=s,o.callbackNode=u,s}return m!==null&&m!==null&&re(m),o.callbackPriority=2,o.callbackNode=null,2}function $3(o,s){if(Wn!==0&&Wn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var u=o.callbackNode;if(Jf()&&o.callbackNode!==u)return null;var m=At;return m=nt(o,o===sn?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),m===0?null:(T3(o,m,s),V3(o,Ue()),o.callbackNode!=null&&o.callbackNode===u?$3.bind(null,o):null)}function G3(o,s){if(Jf())return null;T3(o,s,!0)}function j7(){U7(function(){(Vt&6)!==0?Ce(ae,A7):q3()})}function Ag(){if(ga===0){var o=pl;o===0&&(o=Kt,Kt<<=1,(Kt&261888)===0&&(Kt=256)),ga=o}return ga}function Y3(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:cf(""+o)}function W3(o,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,o.id&&u.setAttribute("form",o.id),s.parentNode.insertBefore(u,s),o=new FormData(o),u.parentNode.removeChild(u),o}function O7(o,s,u,m,b){if(s==="submit"&&u&&u.stateNode===b){var w=Y3((b[Be]||null).action),j=m.submitter;j&&(s=(s=j[Be]||null)?Y3(s.formAction):j.getAttribute("formAction"),s!==null&&(w=s,j=null));var P=new hf("action","action",null,m,b);o.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ga!==0){var X=j?W3(b,j):new FormData(b);K0(u,{pending:!0,data:X,method:b.method,action:w},null,X)}}else typeof w=="function"&&(P.preventDefault(),X=j?W3(b,j):new FormData(b),K0(u,{pending:!0,data:X,method:b.method,action:w},w,X))},currentTarget:b}]})}}for(var jg=0;jg<f0.length;jg++){var Og=f0[jg],M7=Og.toLowerCase(),L7=Og[0].toUpperCase()+Og.slice(1);Hi(M7,"on"+L7)}Hi(kv,"onAnimationEnd"),Hi(Tv,"onAnimationIteration"),Hi(Nv,"onAnimationStart"),Hi("dblclick","onDoubleClick"),Hi("focusin","onFocus"),Hi("focusout","onBlur"),Hi(KA,"onTransitionRun"),Hi(QA,"onTransitionStart"),Hi(XA,"onTransitionCancel"),Hi(Rv,"onTransitionEnd"),xi("onMouseEnter",["mouseout","mouseover"]),xi("onMouseLeave",["mouseout","mouseover"]),xi("onPointerEnter",["pointerout","pointerover"]),xi("onPointerLeave",["pointerout","pointerover"]),Fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lu="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(" "),_7=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lu));function K3(o,s){s=(s&4)!==0;for(var u=0;u<o.length;u++){var m=o[u],b=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var j=m.length-1;0<=j;j--){var P=m[j],X=P.instance,se=P.currentTarget;if(P=P.listener,X!==w&&b.isPropagationStopped())break e;w=P,b.currentTarget=se;try{w(b)}catch(he){gf(he)}b.currentTarget=null,w=X}else for(j=0;j<m.length;j++){if(P=m[j],X=P.instance,se=P.currentTarget,P=P.listener,X!==w&&b.isPropagationStopped())break e;w=P,b.currentTarget=se;try{w(b)}catch(he){gf(he)}b.currentTarget=null,w=X}}}}function Nt(o,s){var u=s[ct];u===void 0&&(u=s[ct]=new Set);var m=o+"__bubble";u.has(m)||(Q3(s,o,2,!1),u.add(m))}function Mg(o,s,u){var m=0;s&&(m|=4),Q3(u,o,m,s)}var nh="_reactListening"+Math.random().toString(36).slice(2);function Lg(o){if(!o[nh]){o[nh]=!0,Pi.forEach(function(u){u!=="selectionchange"&&(_7.has(u)||Mg(u,!1,o),Mg(u,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[nh]||(s[nh]=!0,Mg("selectionchange",!1,s))}}function Q3(o,s,u,m){switch(k5(s)){case 2:var b=lj;break;case 8:b=cj;break;default:b=Wg}u=b.bind(null,s,u,o),b=void 0,!Jm||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(b=!0),m?b!==void 0?o.addEventListener(s,u,{capture:!0,passive:b}):o.addEventListener(s,u,!0):b!==void 0?o.addEventListener(s,u,{passive:b}):o.addEventListener(s,u,!1)}function _g(o,s,u,m,b){var w=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var j=m.tag;if(j===3||j===4){var P=m.stateNode.containerInfo;if(P===b)break;if(j===4)for(j=m.return;j!==null;){var X=j.tag;if((X===3||X===4)&&j.stateNode.containerInfo===b)return;j=j.return}for(;P!==null;){if(j=kn(P),j===null)return;if(X=j.tag,X===5||X===6||X===26||X===27){m=w=j;continue e}P=P.parentNode}}m=m.return}tv(function(){var se=w,he=Xm(u),ye=[];e:{var ce=Av.get(o);if(ce!==void 0){var fe=hf,$e=o;switch(o){case"keypress":if(df(u)===0)break e;case"keydown":case"keyup":fe=NA;break;case"focusin":$e="focus",fe=r0;break;case"focusout":$e="blur",fe=r0;break;case"beforeblur":case"afterblur":fe=r0;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=iv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=mA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=jA;break;case kv:case Tv:case Nv:fe=xA;break;case Rv:fe=MA;break;case"scroll":case"scrollend":fe=hA;break;case"wheel":fe=_A;break;case"copy":case"cut":case"paste":fe=vA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=av;break;case"toggle":case"beforetoggle":fe=IA}var ut=(s&4)!==0,on=!ut&&(o==="scroll"||o==="scrollend"),ne=ut?ce!==null?ce+"Capture":null:ce;ut=[];for(var Z=se,oe;Z!==null;){var me=Z;if(oe=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||oe===null||ne===null||(me=jc(Z,ne),me!=null&&ut.push(cu(Z,me,oe))),on)break;Z=Z.return}0<ut.length&&(ce=new fe(ce,$e,null,u,he),ye.push({event:ce,listeners:ut}))}}if((s&7)===0){e:{if(ce=o==="mouseover"||o==="pointerover",fe=o==="mouseout"||o==="pointerout",ce&&u!==Qm&&($e=u.relatedTarget||u.fromElement)&&(kn($e)||$e[et]))break e;if((fe||ce)&&(ce=he.window===he?he:(ce=he.ownerDocument)?ce.defaultView||ce.parentWindow:window,fe?($e=u.relatedTarget||u.toElement,fe=se,$e=$e?kn($e):null,$e!==null&&(on=a($e),ut=$e.tag,$e!==on||ut!==5&&ut!==27&&ut!==6)&&($e=null)):(fe=null,$e=se),fe!==$e)){if(ut=iv,me="onMouseLeave",ne="onMouseEnter",Z="mouse",(o==="pointerout"||o==="pointerover")&&(ut=av,me="onPointerLeave",ne="onPointerEnter",Z="pointer"),on=fe==null?ce:tr(fe),oe=$e==null?ce:tr($e),ce=new ut(me,Z+"leave",fe,u,he),ce.target=on,ce.relatedTarget=oe,me=null,kn(he)===se&&(ut=new ut(ne,Z+"enter",$e,u,he),ut.target=oe,ut.relatedTarget=on,me=ut),on=me,fe&&$e)t:{for(ut=D7,ne=fe,Z=$e,oe=0,me=ne;me;me=ut(me))oe++;me=0;for(var at=Z;at;at=ut(at))me++;for(;0<oe-me;)ne=ut(ne),oe--;for(;0<me-oe;)Z=ut(Z),me--;for(;oe--;){if(ne===Z||Z!==null&&ne===Z.alternate){ut=ne;break t}ne=ut(ne),Z=ut(Z)}ut=null}else ut=null;fe!==null&&X3(ye,ce,fe,ut,!1),$e!==null&&on!==null&&X3(ye,on,$e,ut,!0)}}e:{if(ce=se?tr(se):window,fe=ce.nodeName&&ce.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ce.type==="file")var Ht=pv;else if(fv(ce))if(mv)Ht=GA;else{Ht=VA;var Je=qA}else fe=ce.nodeName,!fe||fe.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?se&&Km(se.elementType)&&(Ht=pv):Ht=$A;if(Ht&&(Ht=Ht(o,se))){hv(ye,Ht,u,he);break e}Je&&Je(o,ce,se),o==="focusout"&&se&&ce.type==="number"&&se.memoizedProps.value!=null&&Wm(ce,"number",ce.value)}switch(Je=se?tr(se):window,o){case"focusin":(fv(Je)||Je.contentEditable==="true")&&(al=Je,c0=se,Pc=null);break;case"focusout":Pc=c0=al=null;break;case"mousedown":u0=!0;break;case"contextmenu":case"mouseup":case"dragend":u0=!1,Cv(ye,u,he);break;case"selectionchange":if(WA)break;case"keydown":case"keyup":Cv(ye,u,he)}var xt;if(o0)e:{switch(o){case"compositionstart":var jt="onCompositionStart";break e;case"compositionend":jt="onCompositionEnd";break e;case"compositionupdate":jt="onCompositionUpdate";break e}jt=void 0}else ol?uv(o,u)&&(jt="onCompositionEnd"):o==="keydown"&&u.keyCode===229&&(jt="onCompositionStart");jt&&(sv&&u.locale!=="ko"&&(ol||jt!=="onCompositionStart"?jt==="onCompositionEnd"&&ol&&(xt=nv()):(ea=he,e0="value"in ea?ea.value:ea.textContent,ol=!0)),Je=rh(se,jt),0<Je.length&&(jt=new ov(jt,o,null,u,he),ye.push({event:jt,listeners:Je}),xt?jt.data=xt:(xt=dv(u),xt!==null&&(jt.data=xt)))),(xt=PA?FA(o,u):BA(o,u))&&(jt=rh(se,"onBeforeInput"),0<jt.length&&(Je=new ov("onBeforeInput","beforeinput",null,u,he),ye.push({event:Je,listeners:jt}),Je.data=xt)),O7(ye,o,se,u,he)}K3(ye,s)})}function cu(o,s,u){return{instance:o,listener:s,currentTarget:u}}function rh(o,s){for(var u=s+"Capture",m=[];o!==null;){var b=o,w=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||w===null||(b=jc(o,u),b!=null&&m.unshift(cu(o,b,w)),b=jc(o,s),b!=null&&m.push(cu(o,b,w))),o.tag===3)return m;o=o.return}return[]}function D7(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function X3(o,s,u,m,b){for(var w=s._reactName,j=[];u!==null&&u!==m;){var P=u,X=P.alternate,se=P.stateNode;if(P=P.tag,X!==null&&X===m)break;P!==5&&P!==26&&P!==27||se===null||(X=se,b?(se=jc(u,w),se!=null&&j.unshift(cu(u,se,X))):b||(se=jc(u,w),se!=null&&j.push(cu(u,se,X)))),u=u.return}j.length!==0&&o.push({event:s,listeners:j})}var I7=/\r\n?/g,z7=/\u0000|\uFFFD/g;function Z3(o){return(typeof o=="string"?o:""+o).replace(I7,`
9
+ `).replace(z7,"")}function J3(o,s){return s=Z3(s),Z3(o)===s}function rn(o,s,u,m,b,w){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||nl(o,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&nl(o,""+m);break;case"className":Bi(o,"class",m);break;case"tabIndex":Bi(o,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Bi(o,u,m);break;case"style":Jb(o,m,w);break;case"data":if(s!=="object"){Bi(o,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||u!=="href")){o.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){o.removeAttribute(u);break}m=cf(""+m),o.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){o.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof w=="function"&&(u==="formAction"?(s!=="input"&&rn(o,s,"name",b.name,b,null),rn(o,s,"formEncType",b.formEncType,b,null),rn(o,s,"formMethod",b.formMethod,b,null),rn(o,s,"formTarget",b.formTarget,b,null)):(rn(o,s,"encType",b.encType,b,null),rn(o,s,"method",b.method,b,null),rn(o,s,"target",b.target,b,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){o.removeAttribute(u);break}m=cf(""+m),o.setAttribute(u,m);break;case"onClick":m!=null&&(o.onclick=vo);break;case"onScroll":m!=null&&Nt("scroll",o);break;case"onScrollEnd":m!=null&&Nt("scrollend",o);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(b.children!=null)throw Error(r(60));o.innerHTML=u}}break;case"multiple":o.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":o.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){o.removeAttribute("xlink:href");break}u=cf(""+m),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(u,""+m):o.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(u,""):o.removeAttribute(u);break;case"capture":case"download":m===!0?o.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(u,m):o.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?o.setAttribute(u,m):o.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?o.removeAttribute(u):o.setAttribute(u,m);break;case"popover":Nt("beforetoggle",o),Nt("toggle",o),Mn(o,"popover",m);break;case"xlinkActuate":sr(o,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":sr(o,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":sr(o,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":sr(o,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":sr(o,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":sr(o,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":sr(o,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":sr(o,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":sr(o,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Mn(o,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=dA.get(u)||u,Mn(o,u,m))}}function Dg(o,s,u,m,b,w){switch(u){case"style":Jb(o,m,w);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(b.children!=null)throw Error(r(60));o.innerHTML=u}}break;case"children":typeof m=="string"?nl(o,m):(typeof m=="number"||typeof m=="bigint")&&nl(o,""+m);break;case"onScroll":m!=null&&Nt("scroll",o);break;case"onScrollEnd":m!=null&&Nt("scrollend",o);break;case"onClick":m!=null&&(o.onclick=vo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kr.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),s=u.slice(2,b?u.length-7:void 0),w=o[Be]||null,w=w!=null?w[u]:null,typeof w=="function"&&o.removeEventListener(s,w,b),typeof m=="function")){typeof w!="function"&&w!==null&&(u in o?o[u]=null:o.hasAttribute(u)&&o.removeAttribute(u)),o.addEventListener(s,m,b);break e}u in o?o[u]=m:m===!0?o.setAttribute(u,""):Mn(o,u,m)}}}function dr(o,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Nt("error",o),Nt("load",o);var m=!1,b=!1,w;for(w in u)if(u.hasOwnProperty(w)){var j=u[w];if(j!=null)switch(w){case"src":m=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:rn(o,s,w,j,u,null)}}b&&rn(o,s,"srcSet",u.srcSet,u,null),m&&rn(o,s,"src",u.src,u,null);return;case"input":Nt("invalid",o);var P=w=j=b=null,X=null,se=null;for(m in u)if(u.hasOwnProperty(m)){var he=u[m];if(he!=null)switch(m){case"name":b=he;break;case"type":j=he;break;case"checked":X=he;break;case"defaultChecked":se=he;break;case"value":w=he;break;case"defaultValue":P=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,s));break;default:rn(o,s,m,he,u,null)}}Kb(o,w,P,X,se,j,b,!1);return;case"select":Nt("invalid",o),m=j=w=null;for(b in u)if(u.hasOwnProperty(b)&&(P=u[b],P!=null))switch(b){case"value":w=P;break;case"defaultValue":j=P;break;case"multiple":m=P;default:rn(o,s,b,P,u,null)}s=w,u=j,o.multiple=!!m,s!=null?tl(o,!!m,s,!1):u!=null&&tl(o,!!m,u,!0);return;case"textarea":Nt("invalid",o),w=b=m=null;for(j in u)if(u.hasOwnProperty(j)&&(P=u[j],P!=null))switch(j){case"value":m=P;break;case"defaultValue":b=P;break;case"children":w=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:rn(o,s,j,P,u,null)}Xb(o,m,b,w);return;case"option":for(X in u)u.hasOwnProperty(X)&&(m=u[X],m!=null)&&(X==="selected"?o.selected=m&&typeof m!="function"&&typeof m!="symbol":rn(o,s,X,m,u,null));return;case"dialog":Nt("beforetoggle",o),Nt("toggle",o),Nt("cancel",o),Nt("close",o);break;case"iframe":case"object":Nt("load",o);break;case"video":case"audio":for(m=0;m<lu.length;m++)Nt(lu[m],o);break;case"image":Nt("error",o),Nt("load",o);break;case"details":Nt("toggle",o);break;case"embed":case"source":case"link":Nt("error",o),Nt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in u)if(u.hasOwnProperty(se)&&(m=u[se],m!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:rn(o,s,se,m,u,null)}return;default:if(Km(s)){for(he in u)u.hasOwnProperty(he)&&(m=u[he],m!==void 0&&Dg(o,s,he,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&&rn(o,s,P,m,u,null))}function P7(o,s,u,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,w=null,j=null,P=null,X=null,se=null,he=null;for(fe in u){var ye=u[fe];if(u.hasOwnProperty(fe)&&ye!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":X=ye;default:m.hasOwnProperty(fe)||rn(o,s,fe,null,m,ye)}}for(var ce in m){var fe=m[ce];if(ye=u[ce],m.hasOwnProperty(ce)&&(fe!=null||ye!=null))switch(ce){case"type":w=fe;break;case"name":b=fe;break;case"checked":se=fe;break;case"defaultChecked":he=fe;break;case"value":j=fe;break;case"defaultValue":P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,s));break;default:fe!==ye&&rn(o,s,ce,fe,m,ye)}}Ym(o,j,P,X,se,he,w,b);return;case"select":fe=j=P=ce=null;for(w in u)if(X=u[w],u.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":fe=X;default:m.hasOwnProperty(w)||rn(o,s,w,null,m,X)}for(b in m)if(w=m[b],X=u[b],m.hasOwnProperty(b)&&(w!=null||X!=null))switch(b){case"value":ce=w;break;case"defaultValue":P=w;break;case"multiple":j=w;default:w!==X&&rn(o,s,b,w,m,X)}s=P,u=j,m=fe,ce!=null?tl(o,!!u,ce,!1):!!m!=!!u&&(s!=null?tl(o,!!u,s,!0):tl(o,!!u,u?[]:"",!1));return;case"textarea":fe=ce=null;for(P in u)if(b=u[P],u.hasOwnProperty(P)&&b!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:rn(o,s,P,null,m,b)}for(j in m)if(b=m[j],w=u[j],m.hasOwnProperty(j)&&(b!=null||w!=null))switch(j){case"value":ce=b;break;case"defaultValue":fe=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==w&&rn(o,s,j,b,m,w)}Qb(o,ce,fe);return;case"option":for(var $e in u)ce=u[$e],u.hasOwnProperty($e)&&ce!=null&&!m.hasOwnProperty($e)&&($e==="selected"?o.selected=!1:rn(o,s,$e,null,m,ce));for(X in m)ce=m[X],fe=u[X],m.hasOwnProperty(X)&&ce!==fe&&(ce!=null||fe!=null)&&(X==="selected"?o.selected=ce&&typeof ce!="function"&&typeof ce!="symbol":rn(o,s,X,ce,m,fe));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ut in u)ce=u[ut],u.hasOwnProperty(ut)&&ce!=null&&!m.hasOwnProperty(ut)&&rn(o,s,ut,null,m,ce);for(se in m)if(ce=m[se],fe=u[se],m.hasOwnProperty(se)&&ce!==fe&&(ce!=null||fe!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,s));break;default:rn(o,s,se,ce,m,fe)}return;default:if(Km(s)){for(var on in u)ce=u[on],u.hasOwnProperty(on)&&ce!==void 0&&!m.hasOwnProperty(on)&&Dg(o,s,on,void 0,m,ce);for(he in m)ce=m[he],fe=u[he],!m.hasOwnProperty(he)||ce===fe||ce===void 0&&fe===void 0||Dg(o,s,he,ce,m,fe);return}}for(var ne in u)ce=u[ne],u.hasOwnProperty(ne)&&ce!=null&&!m.hasOwnProperty(ne)&&rn(o,s,ne,null,m,ce);for(ye in m)ce=m[ye],fe=u[ye],!m.hasOwnProperty(ye)||ce===fe||ce==null&&fe==null||rn(o,s,ye,ce,m,fe)}function e5(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function F7(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var b=u[m],w=b.transferSize,j=b.initiatorType,P=b.duration;if(w&&P&&e5(j)){for(j=0,P=b.responseEnd,m+=1;m<u.length;m++){var X=u[m],se=X.startTime;if(se>P)break;var he=X.transferSize,ye=X.initiatorType;he&&e5(ye)&&(X=X.responseEnd,j+=he*(X<P?1:(P-se)/(X-se)))}if(--m,s+=8*(w+j)/(b.duration/1e3),o++,10<o)break}}if(0<o)return s/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Ig=null,zg=null;function ih(o){return o.nodeType===9?o:o.ownerDocument}function t5(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function n5(o,s){if(o===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&s==="foreignObject"?0:o}function Pg(o,s){return o==="textarea"||o==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Fg=null;function B7(){var o=window.event;return o&&o.type==="popstate"?o===Fg?!1:(Fg=o,!0):(Fg=null,!1)}var r5=typeof setTimeout=="function"?setTimeout:void 0,H7=typeof clearTimeout=="function"?clearTimeout:void 0,i5=typeof Promise=="function"?Promise:void 0,U7=typeof queueMicrotask=="function"?queueMicrotask:typeof i5<"u"?function(o){return i5.resolve(null).then(o).catch(q7)}:r5;function q7(o){setTimeout(function(){throw o})}function ya(o){return o==="head"}function o5(o,s){var u=s,m=0;do{var b=u.nextSibling;if(o.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(m===0){o.removeChild(b),Ll(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")uu(o.ownerDocument.documentElement);else if(u==="head"){u=o.ownerDocument.head,uu(u);for(var w=u.firstChild;w;){var j=w.nextSibling,P=w.nodeName;w[Cn]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=j}}else u==="body"&&uu(o.ownerDocument.body);u=b}while(u);Ll(s)}function a5(o,s){var u=o;o=0;do{var m=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(o===0)break;o--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||o++;u=m}while(u)}function Bg(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Bg(u),En(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}o.removeChild(u)}}function V7(o,s,u,m){for(;o.nodeType===1;){var b=u;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(m){if(!o[Cn])switch(s){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(w=o.getAttribute("rel"),w==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(w!==b.rel||o.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||o.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||o.getAttribute("title")!==(b.title==null?null:b.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(w=o.getAttribute("src"),(w!==(b.src==null?null:b.src)||o.getAttribute("type")!==(b.type==null?null:b.type)||o.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&w&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(s==="input"&&o.type==="hidden"){var w=b.name==null?null:""+b.name;if(b.type==="hidden"&&o.getAttribute("name")===w)return o}else return o;if(o=Ti(o.nextSibling),o===null)break}return null}function $7(o,s,u){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=Ti(o.nextSibling),o===null))return null;return o}function s5(o,s){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!s||(o=Ti(o.nextSibling),o===null))return null;return o}function Hg(o){return o.data==="$?"||o.data==="$~"}function Ug(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function G7(o,s){var u=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||u.readyState!=="loading")s();else{var m=function(){s(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),o._reactRetry=m}}function Ti(o){for(;o!=null;o=o.nextSibling){var s=o.nodeType;if(s===1||s===3)break;if(s===8){if(s=o.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return o}var qg=null;function l5(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var u=o.data;if(u==="/$"||u==="/&"){if(s===0)return Ti(o.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}o=o.nextSibling}return null}function c5(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var u=o.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return o;s--}else u!=="/$"&&u!=="/&"||s++}o=o.previousSibling}return null}function u5(o,s,u){switch(s=ih(u),o){case"html":if(o=s.documentElement,!o)throw Error(r(452));return o;case"head":if(o=s.head,!o)throw Error(r(453));return o;case"body":if(o=s.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function uu(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);En(o)}var Ni=new Map,d5=new Set;function oh(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Io=q.d;q.d={f:Y7,r:W7,D:K7,C:Q7,L:X7,m:Z7,X:ej,S:J7,M:tj};function Y7(){var o=Io.f(),s=Qf();return o||s}function W7(o){var s=Mt(o);s!==null&&s.tag===5&&s.type==="form"?Rw(s):Io.r(o)}var jl=typeof document>"u"?null:document;function f5(o,s,u){var m=jl;if(m&&typeof s=="string"&&s){var b=bi(s);b='link[rel="'+o+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),d5.has(b)||(d5.add(b),o={rel:o,crossOrigin:u,href:s},m.querySelector(b)===null&&(s=m.createElement("link"),dr(s,"link",o),bn(s),m.head.appendChild(s)))}}function K7(o){Io.D(o),f5("dns-prefetch",o,null)}function Q7(o,s){Io.C(o,s),f5("preconnect",o,s)}function X7(o,s,u){Io.L(o,s,u);var m=jl;if(m&&o&&s){var b='link[rel="preload"][as="'+bi(s)+'"]';s==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+bi(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+bi(u.imageSizes)+'"]')):b+='[href="'+bi(o)+'"]';var w=b;switch(s){case"style":w=Ol(o);break;case"script":w=Ml(o)}Ni.has(w)||(o=p({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:o,as:s},u),Ni.set(w,o),m.querySelector(b)!==null||s==="style"&&m.querySelector(du(w))||s==="script"&&m.querySelector(fu(w))||(s=m.createElement("link"),dr(s,"link",o),bn(s),m.head.appendChild(s)))}}function Z7(o,s){Io.m(o,s);var u=jl;if(u&&o){var m=s&&typeof s.as=="string"?s.as:"script",b='link[rel="modulepreload"][as="'+bi(m)+'"][href="'+bi(o)+'"]',w=b;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Ml(o)}if(!Ni.has(w)&&(o=p({rel:"modulepreload",href:o},s),Ni.set(w,o),u.querySelector(b)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(fu(w)))return}m=u.createElement("link"),dr(m,"link",o),bn(m),u.head.appendChild(m)}}}function J7(o,s,u){Io.S(o,s,u);var m=jl;if(m&&o){var b=_r(m).hoistableStyles,w=Ol(o);s=s||"default";var j=b.get(w);if(!j){var P={loading:0,preload:null};if(j=m.querySelector(du(w)))P.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},u),(u=Ni.get(w))&&Vg(o,u);var X=j=m.createElement("link");bn(X),dr(X,"link",o),X._p=new Promise(function(se,he){X.onload=se,X.onerror=he}),X.addEventListener("load",function(){P.loading|=1}),X.addEventListener("error",function(){P.loading|=2}),P.loading|=4,ah(j,s,m)}j={type:"stylesheet",instance:j,count:1,state:P},b.set(w,j)}}}function ej(o,s){Io.X(o,s);var u=jl;if(u&&o){var m=_r(u).hoistableScripts,b=Ml(o),w=m.get(b);w||(w=u.querySelector(fu(b)),w||(o=p({src:o,async:!0},s),(s=Ni.get(b))&&$g(o,s),w=u.createElement("script"),bn(w),dr(w,"link",o),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(b,w))}}function tj(o,s){Io.M(o,s);var u=jl;if(u&&o){var m=_r(u).hoistableScripts,b=Ml(o),w=m.get(b);w||(w=u.querySelector(fu(b)),w||(o=p({src:o,async:!0,type:"module"},s),(s=Ni.get(b))&&$g(o,s),w=u.createElement("script"),bn(w),dr(w,"link",o),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(b,w))}}function h5(o,s,u,m){var b=(b=Q.current)?oh(b):null;if(!b)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=Ol(u.href),u=_r(b).hoistableStyles,m=u.get(s),m||(m={type:"style",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){o=Ol(u.href);var w=_r(b).hoistableStyles,j=w.get(o);if(j||(b=b.ownerDocument||b,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(o,j),(w=b.querySelector(du(o)))&&!w._p&&(j.instance=w,j.state.loading=5),Ni.has(o)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ni.set(o,u),w||nj(b,o,u,j.state))),s&&m===null)throw Error(r(528,""));return j}if(s&&m!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Ml(u),u=_r(b).hoistableScripts,m=u.get(s),m||(m={type:"script",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Ol(o){return'href="'+bi(o)+'"'}function du(o){return'link[rel="stylesheet"]['+o+"]"}function p5(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function nj(o,s,u,m){o.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=o.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),dr(s,"link",u),bn(s),o.head.appendChild(s))}function Ml(o){return'[src="'+bi(o)+'"]'}function fu(o){return"script[async]"+o}function m5(o,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var m=o.querySelector('style[data-href~="'+bi(u.href)+'"]');if(m)return s.instance=m,bn(m),m;var b=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(o.ownerDocument||o).createElement("style"),bn(m),dr(m,"style",b),ah(m,u.precedence,o),s.instance=m;case"stylesheet":b=Ol(u.href);var w=o.querySelector(du(b));if(w)return s.state.loading|=4,s.instance=w,bn(w),w;m=p5(u),(b=Ni.get(b))&&Vg(m,b),w=(o.ownerDocument||o).createElement("link"),bn(w);var j=w;return j._p=new Promise(function(P,X){j.onload=P,j.onerror=X}),dr(w,"link",m),s.state.loading|=4,ah(w,u.precedence,o),s.instance=w;case"script":return w=Ml(u.src),(b=o.querySelector(fu(w)))?(s.instance=b,bn(b),b):(m=u,(b=Ni.get(w))&&(m=p({},u),$g(m,b)),o=o.ownerDocument||o,b=o.createElement("script"),bn(b),dr(b,"link",m),o.head.appendChild(b),s.instance=b);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,ah(m,u.precedence,o));return s.instance}function ah(o,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=m.length?m[m.length-1]:null,w=b,j=0;j<m.length;j++){var P=m[j];if(P.dataset.precedence===s)w=P;else if(w!==b)break}w?w.parentNode.insertBefore(o,w.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(o,s.firstChild))}function Vg(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function $g(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var sh=null;function g5(o,s,u){if(sh===null){var m=new Map,b=sh=new Map;b.set(u,m)}else b=sh,m=b.get(u),m||(m=new Map,b.set(u,m));if(m.has(o))return m;for(m.set(o,null),u=u.getElementsByTagName(o),b=0;b<u.length;b++){var w=u[b];if(!(w[Cn]||w[_e]||o==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var j=w.getAttribute(s)||"";j=o+j;var P=m.get(j);P?P.push(w):m.set(j,[w])}}return m}function y5(o,s,u){o=o.ownerDocument||o,o.head.insertBefore(u,s==="title"?o.querySelector("head > title"):null)}function rj(o,s,u){if(u===1||s.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(o=s.disabled,typeof s.precedence=="string"&&o==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function x5(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function ij(o,s,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=Ol(m.href),w=s.querySelector(du(b));if(w){s=w._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=lh.bind(o),s.then(o,o)),u.state.loading|=4,u.instance=w,bn(w);return}w=s.ownerDocument||s,m=p5(m),(b=Ni.get(b))&&Vg(m,b),w=w.createElement("link"),bn(w);var j=w;j._p=new Promise(function(P,X){j.onload=P,j.onerror=X}),dr(w,"link",m),u.instance=w}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(o.count++,u=lh.bind(o),s.addEventListener("load",u),s.addEventListener("error",u))}}var Gg=0;function oj(o,s){return o.stylesheets&&o.count===0&&uh(o,o.stylesheets),0<o.count||0<o.imgCount?function(u){var m=setTimeout(function(){if(o.stylesheets&&uh(o,o.stylesheets),o.unsuspend){var w=o.unsuspend;o.unsuspend=null,w()}},6e4+s);0<o.imgBytes&&Gg===0&&(Gg=62500*F7());var b=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&uh(o,o.stylesheets),o.unsuspend)){var w=o.unsuspend;o.unsuspend=null,w()}},(o.imgBytes>Gg?50:800)+s);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(m),clearTimeout(b)}}:null}function lh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)uh(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var ch=null;function uh(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,ch=new Map,s.forEach(aj,o),ch=null,lh.call(o))}function aj(o,s){if(!(s.state.loading&4)){var u=ch.get(o);if(u)var m=u.get(null);else{u=new Map,ch.set(o,u);for(var b=o.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<b.length;w++){var j=b[w];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(u.set(j.dataset.precedence,j),m=j)}m&&u.set(null,m)}b=s.instance,j=b.getAttribute("data-precedence"),w=u.get(j)||m,w===m&&u.set(null,b),u.set(j,b),this.count++,m=lh.bind(this),b.addEventListener("load",m),b.addEventListener("error",m),w?w.parentNode.insertBefore(b,w.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(b,o.firstChild)),s.state.loading|=4}}var hu={$$typeof:R,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function sj(o,s,u,m,b,w,j,P,X){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ar(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ar(0),this.hiddenUpdates=ar(null),this.identifierPrefix=m,this.onUncaughtError=b,this.onCaughtError=w,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function b5(o,s,u,m,b,w,j,P,X,se,he,ye){return o=new sj(o,s,u,j,X,se,he,ye,P),s=1,w===!0&&(s|=24),w=Xr(3,null,null,s),o.current=w,w.stateNode=o,s=k0(),s.refCount++,o.pooledCache=s,s.refCount++,w.memoizedState={element:m,isDehydrated:u,cache:s},A0(w),o}function v5(o){return o?(o=cl,o):cl}function w5(o,s,u,m,b,w){b=v5(b),m.context===null?m.context=b:m.pendingContext=b,m=aa(s),m.payload={element:u},w=w===void 0?null:w,w!==null&&(m.callback=w),u=sa(o,m,s),u!==null&&(Br(u,o,s),$c(u,o,s))}function S5(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var u=o.retryLane;o.retryLane=u!==0&&u<s?u:s}}function Yg(o,s){S5(o,s),(o=o.alternate)&&S5(o,s)}function C5(o){if(o.tag===13||o.tag===31){var s=us(o,67108864);s!==null&&Br(s,o,67108864),Yg(o,67108864)}}function E5(o){if(o.tag===13||o.tag===31){var s=ni();s=le(s);var u=us(o,s);u!==null&&Br(u,o,s),Yg(o,s)}}var dh=!0;function lj(o,s,u,m){var b=F.T;F.T=null;var w=q.p;try{q.p=2,Wg(o,s,u,m)}finally{q.p=w,F.T=b}}function cj(o,s,u,m){var b=F.T;F.T=null;var w=q.p;try{q.p=8,Wg(o,s,u,m)}finally{q.p=w,F.T=b}}function Wg(o,s,u,m){if(dh){var b=Kg(m);if(b===null)_g(o,s,m,fh,u),T5(o,m);else if(dj(b,o,s,u,m))m.stopPropagation();else if(T5(o,m),s&4&&-1<uj.indexOf(o)){for(;b!==null;){var w=Mt(b);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var j=In(w.pendingLanes);if(j!==0){var P=w;for(P.pendingLanes|=2,P.entangledLanes|=2;j;){var X=1<<31-mt(j);P.entanglements[1]|=X,j&=~X}to(w),(Vt&6)===0&&(Wf=Ue()+500,su(0))}}break;case 31:case 13:P=us(w,2),P!==null&&Br(P,w,2),Qf(),Yg(w,2)}if(w=Kg(m),w===null&&_g(o,s,m,fh,u),w===b)break;b=w}b!==null&&m.stopPropagation()}else _g(o,s,m,null,u)}}function Kg(o){return o=Xm(o),Qg(o)}var fh=null;function Qg(o){if(fh=null,o=kn(o),o!==null){var s=a(o);if(s===null)o=null;else{var u=s.tag;if(u===13){if(o=l(s),o!==null)return o;o=null}else if(u===31){if(o=c(s),o!==null)return o;o=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return fh=o,null}function k5(o){switch(o){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(wt()){case ae:return 2;case we:return 8;case Oe:case Le:return 32;case He:return 268435456;default:return 32}default:return 32}}var Xg=!1,xa=null,ba=null,va=null,pu=new Map,mu=new Map,wa=[],uj="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".split(" ");function T5(o,s){switch(o){case"focusin":case"focusout":xa=null;break;case"dragenter":case"dragleave":ba=null;break;case"mouseover":case"mouseout":va=null;break;case"pointerover":case"pointerout":pu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(s.pointerId)}}function gu(o,s,u,m,b,w){return o===null||o.nativeEvent!==w?(o={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:w,targetContainers:[b]},s!==null&&(s=Mt(s),s!==null&&C5(s)),o):(o.eventSystemFlags|=m,s=o.targetContainers,b!==null&&s.indexOf(b)===-1&&s.push(b),o)}function dj(o,s,u,m,b){switch(s){case"focusin":return xa=gu(xa,o,s,u,m,b),!0;case"dragenter":return ba=gu(ba,o,s,u,m,b),!0;case"mouseover":return va=gu(va,o,s,u,m,b),!0;case"pointerover":var w=b.pointerId;return pu.set(w,gu(pu.get(w)||null,o,s,u,m,b)),!0;case"gotpointercapture":return w=b.pointerId,mu.set(w,gu(mu.get(w)||null,o,s,u,m,b)),!0}return!1}function N5(o){var s=kn(o.target);if(s!==null){var u=a(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){o.blockedOn=s,Ze(o.priority,function(){E5(u)});return}}else if(s===31){if(s=c(u),s!==null){o.blockedOn=s,Ze(o.priority,function(){E5(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){o.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}o.blockedOn=null}function hh(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var u=Kg(o.nativeEvent);if(u===null){u=o.nativeEvent;var m=new u.constructor(u.type,u);Qm=m,u.target.dispatchEvent(m),Qm=null}else return s=Mt(u),s!==null&&C5(s),o.blockedOn=u,!1;s.shift()}return!0}function R5(o,s,u){hh(o)&&u.delete(s)}function fj(){Xg=!1,xa!==null&&hh(xa)&&(xa=null),ba!==null&&hh(ba)&&(ba=null),va!==null&&hh(va)&&(va=null),pu.forEach(R5),mu.forEach(R5)}function ph(o,s){o.blockedOn===s&&(o.blockedOn=null,Xg||(Xg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,fj)))}var mh=null;function A5(o){mh!==o&&(mh=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){mh===o&&(mh=null);for(var s=0;s<o.length;s+=3){var u=o[s],m=o[s+1],b=o[s+2];if(typeof m!="function"){if(Qg(m||u)===null)continue;break}var w=Mt(u);w!==null&&(o.splice(s,3),s-=3,K0(w,{pending:!0,data:b,method:u.method,action:m},m,b))}}))}function Ll(o){function s(X){return ph(X,o)}xa!==null&&ph(xa,o),ba!==null&&ph(ba,o),va!==null&&ph(va,o),pu.forEach(s),mu.forEach(s);for(var u=0;u<wa.length;u++){var m=wa[u];m.blockedOn===o&&(m.blockedOn=null)}for(;0<wa.length&&(u=wa[0],u.blockedOn===null);)N5(u),u.blockedOn===null&&wa.shift();if(u=(o.ownerDocument||o).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var b=u[m],w=u[m+1],j=b[Be]||null;if(typeof w=="function")j||A5(u);else if(j){var P=null;if(w&&w.hasAttribute("formAction")){if(b=w,j=w[Be]||null)P=j.formAction;else if(Qg(b)!==null)continue}else P=j.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),A5(u)}}}function j5(){function o(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(j){return b=j})},focusReset:"manual",scroll:"manual"})}function s(){b!==null&&(b(),b=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,b=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),b!==null&&(b(),b=null)}}}function Zg(o){this._internalRoot=o}gh.prototype.render=Zg.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,m=ni();w5(u,m,o,s,null,null)},gh.prototype.unmount=Zg.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;w5(o.current,2,null,o,null,null),Qf(),s[et]=null}};function gh(o){this._internalRoot=o}gh.prototype.unstable_scheduleHydration=function(o){if(o){var s=je();o={blockedOn:null,target:o,priority:s};for(var u=0;u<wa.length&&s!==0&&s<wa[u].priority;u++);wa.splice(u,0,o),u===0&&N5(o)}};var O5=t.version;if(O5!=="19.2.4")throw Error(r(527,O5,"19.2.4"));q.findDOMNode=function(o){var s=o._reactInternals;if(s===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(s),o=o!==null?g(o):null,o=o===null?null:o.stateNode,o};var hj={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yh.isDisabled&&yh.supportsFiber)try{Xe=yh.inject(hj),Ve=yh}catch{}}return xu.createRoot=function(o,s){if(!i(o))throw Error(r(299));var u=!1,m="",b=Pw,w=Fw,j=Bw;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(j=s.onRecoverableError)),s=b5(o,1,!1,null,null,u,m,null,b,w,j,j5),o[et]=s.current,Lg(o),new Zg(s)},xu.hydrateRoot=function(o,s,u){if(!i(o))throw Error(r(299));var m=!1,b="",w=Pw,j=Fw,P=Bw,X=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(j=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&(X=u.formState)),s=b5(o,1,!0,s,u??null,m,b,X,w,j,P,j5),s.context=v5(null),u=s.current,m=ni(),m=le(m),b=aa(m),b.callback=null,sa(u,b,m),u=m,s.current.lanes=u,tn(s,u),to(s),o[et]=s.current,Lg(o),new gh(s)},xu.version="19.2.4",xu}var H5;function Cj(){if(H5)return e1.exports;H5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),e1.exports=Sj(),e1.exports}var Ej=Cj(),C=kd();const ke=pc(C),jy=mj({__proto__:null,default:ke},[C]);var kj=(e,t,n,r,i,a,l,c)=>{let d=document.documentElement,f=["light","dark"];function g(x){(Array.isArray(e)?e:[e]).forEach(v=>{let S=v==="class",E=S&&a?i.map(k=>a[k]||k):i;S?(d.classList.remove(...E),d.classList.add(a&&a[x]?a[x]:x)):d.setAttribute(v,x)}),p(x)}function p(x){c&&f.includes(x)&&(d.style.colorScheme=x)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)g(r);else try{let x=localStorage.getItem(t)||n,v=l&&x==="system"?y():x;g(v)}catch{}},Tj=C.createContext(void 0),Nj={setTheme:e=>{},themes:[]},Rj=()=>{var e;return(e=C.useContext(Tj))!=null?e:Nj};C.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:l,themes:c,nonce:d,scriptProps:f})=>{let g=JSON.stringify([n,t,a,e,c,l,r,i]).slice(1,-1);return C.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${kj.toString()})(${g})`}})});var _i=ak();const Aj=pc(_i);function jj(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Oj=e=>{switch(e){case"success":return _j;case"info":return Ij;case"warning":return Dj;case"error":return zj;default:return null}},Mj=Array(12).fill(0),Lj=({visible:e,className:t})=>ke.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ke.createElement("div",{className:"sonner-spinner"},Mj.map((n,r)=>ke.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),_j=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Dj=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Ij=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),zj=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Pj=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ke.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ke.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Fj=()=>{const[e,t]=ke.useState(document.hidden);return ke.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let f2=1;class Bj{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,a=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:f2++,l=this.toasts.find(d=>d.id===a),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),l?this.toasts=this.toasts.map(d=>d.id===a?(this.publish({...d,...t,id:a,title:r}),{...d,...t,id:a,dismissible:c,title:r}):d):this.addToast({title:r,...i,dismissible:c,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,l;const c=i.then(async f=>{if(l=["resolve",f],ke.isValidElement(f))a=!1,this.create({id:r,type:"default",message:f});else if(Uj(f)&&!f.ok){a=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,v=typeof p=="object"&&!ke.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:y,...v})}else if(f instanceof Error){a=!1;const p=typeof n.error=="function"?await n.error(f):n.error,y=typeof n.description=="function"?await n.description(f):n.description,v=typeof p=="object"&&!ke.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:y,...v})}else if(n.success!==void 0){a=!1;const p=typeof n.success=="function"?await n.success(f):n.success,y=typeof n.description=="function"?await n.description(f):n.description,v=typeof p=="object"&&!ke.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:y,...v})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){a=!1;const g=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,x=typeof g=="object"&&!ke.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:p,...x})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,g)=>c.then(()=>l[0]==="reject"?g(l[1]):f(l[1])).catch(g));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||f2++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ur=new Bj,Hj=(e,t)=>{const n=t?.id||f2++;return Ur.addToast({title:e,...t,id:n}),n},Uj=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",qj=Hj,Vj=()=>Ur.toasts,$j=()=>Ur.getActiveToasts(),st=Object.assign(qj,{success:Ur.success,info:Ur.info,warning:Ur.warning,error:Ur.error,custom:Ur.custom,message:Ur.message,promise:Ur.promise,dismiss:Ur.dismiss,loading:Ur.loading},{getHistory:Vj,getToasts:$j});jj("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function xh(e){return e.label!==void 0}const Gj=3,Yj="24px",Wj="16px",U5=4e3,Kj=356,Qj=14,Xj=45,Zj=200;function no(...e){return e.filter(Boolean).join(" ")}function Jj(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const eO=e=>{var t,n,r,i,a,l,c,d,f;const{invert:g,toast:p,unstyled:y,interacting:x,setHeights:v,visibleToasts:S,heights:E,index:k,toasts:T,expanded:R,removeToast:M,defaultRichColors:O,closeButton:A,style:N,cancelButtonStyle:D,actionButtonStyle:H,className:I="",descriptionClassName:U="",duration:$,position:V,gap:G,expandByDefault:B,classNames:F,icons:q,closeButtonAriaLabel:W="Close toast"}=e,[ie,_]=ke.useState(null),[z,Y]=ke.useState(null),[L,ee]=ke.useState(!1),[te,Q]=ke.useState(!1),[de,ue]=ke.useState(!1),[Se,Ee]=ke.useState(!1),[ze,Ye]=ke.useState(!1),[Me,Ie]=ke.useState(0),[xe,We]=ke.useState(0),Te=ke.useRef(p.duration||$||U5),Ae=ke.useRef(null),pe=ke.useRef(null),Ce=k===0,re=k+1<=S,be=p.type,Pe=p.dismissible!==!1,Ue=p.className||"",wt=p.descriptionClassName||"",ae=ke.useMemo(()=>E.findIndex(nt=>nt.toastId===p.id)||0,[E,p.id]),we=ke.useMemo(()=>{var nt;return(nt=p.closeButton)!=null?nt:A},[p.closeButton,A]),Oe=ke.useMemo(()=>p.duration||$||U5,[p.duration,$]),Le=ke.useRef(0),He=ke.useRef(0),kt=ke.useRef(0),Bt=ke.useRef(null),[Xe,Ve]=V.split("-"),pt=ke.useMemo(()=>E.reduce((nt,qt,hn)=>hn>=ae?nt:nt+qt.height,0),[E,ae]),mt=Fj(),Qe=p.invert||g,yt=be==="loading";He.current=ke.useMemo(()=>ae*G+pt,[ae,pt]),ke.useEffect(()=>{Te.current=Oe},[Oe]),ke.useEffect(()=>{ee(!0)},[]),ke.useEffect(()=>{const nt=pe.current;if(nt){const qt=nt.getBoundingClientRect().height;return We(qt),v(hn=>[{toastId:p.id,height:qt,position:p.position},...hn]),()=>v(hn=>hn.filter(pn=>pn.toastId!==p.id))}},[v,p.id]),ke.useLayoutEffect(()=>{if(!L)return;const nt=pe.current,qt=nt.style.height;nt.style.height="auto";const hn=nt.getBoundingClientRect().height;nt.style.height=qt,We(hn),v(pn=>pn.find(tn=>tn.toastId===p.id)?pn.map(tn=>tn.toastId===p.id?{...tn,height:hn}:tn):[{toastId:p.id,height:hn,position:p.position},...pn])},[L,p.title,p.description,v,p.id,p.jsx,p.action,p.cancel]);const Ft=ke.useCallback(()=>{Q(!0),Ie(He.current),v(nt=>nt.filter(qt=>qt.toastId!==p.id)),setTimeout(()=>{M(p)},Zj)},[p,M,v,He]);ke.useEffect(()=>{if(p.promise&&be==="loading"||p.duration===1/0||p.type==="loading")return;let nt;return R||x||mt?(()=>{if(kt.current<Le.current){const pn=new Date().getTime()-Le.current;Te.current=Te.current-pn}kt.current=new Date().getTime()})():Te.current!==1/0&&(Le.current=new Date().getTime(),nt=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Ft()},Te.current)),()=>clearTimeout(nt)},[R,x,p,be,mt,Ft]),ke.useEffect(()=>{p.delete&&(Ft(),p.onDismiss==null||p.onDismiss.call(p,p))},[Ft,p.delete]);function Kt(){var nt;if(q?.loading){var qt;return ke.createElement("div",{className:no(F?.loader,p==null||(qt=p.classNames)==null?void 0:qt.loader,"sonner-loader"),"data-visible":be==="loading"},q.loading)}return ke.createElement(Lj,{className:no(F?.loader,p==null||(nt=p.classNames)==null?void 0:nt.loader),visible:be==="loading"})}const xn=p.icon||q?.[be]||Oj(be);var fn,In;return ke.createElement("li",{tabIndex:0,ref:pe,className:no(I,Ue,F?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,F?.default,F?.[be],p==null||(n=p.classNames)==null?void 0:n[be]),"data-sonner-toast":"","data-rich-colors":(fn=p.richColors)!=null?fn:O,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":L,"data-promise":!!p.promise,"data-swiped":ze,"data-removed":te,"data-visible":re,"data-y-position":Xe,"data-x-position":Ve,"data-index":k,"data-front":Ce,"data-swiping":de,"data-dismissible":Pe,"data-type":be,"data-invert":Qe,"data-swipe-out":Se,"data-swipe-direction":z,"data-expanded":!!(R||B&&L),"data-testid":p.testId,style:{"--index":k,"--toasts-before":k,"--z-index":T.length-k,"--offset":`${te?Me:He.current}px`,"--initial-height":B?"auto":`${xe}px`,...N,...p.style},onDragEnd:()=>{ue(!1),_(null),Bt.current=null},onPointerDown:nt=>{nt.button!==2&&(yt||!Pe||(Ae.current=new Date,Ie(He.current),nt.target.setPointerCapture(nt.pointerId),nt.target.tagName!=="BUTTON"&&(ue(!0),Bt.current={x:nt.clientX,y:nt.clientY})))},onPointerUp:()=>{var nt,qt,hn;if(Se||!Pe)return;Bt.current=null;const pn=Number(((nt=pe.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ar=Number(((qt=pe.current)==null?void 0:qt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tn=new Date().getTime()-((hn=Ae.current)==null?void 0:hn.getTime()),zn=ie==="x"?pn:ar,yi=Math.abs(zn)/tn;if(Math.abs(zn)>=Xj||yi>.11){Ie(He.current),p.onDismiss==null||p.onDismiss.call(p,p),Y(ie==="x"?pn>0?"right":"left":ar>0?"down":"up"),Ft(),Ee(!0);return}else{var K,J;(K=pe.current)==null||K.style.setProperty("--swipe-amount-x","0px"),(J=pe.current)==null||J.style.setProperty("--swipe-amount-y","0px")}Ye(!1),ue(!1),_(null)},onPointerMove:nt=>{var qt,hn,pn;if(!Bt.current||!Pe||((qt=window.getSelection())==null?void 0:qt.toString().length)>0)return;const tn=nt.clientY-Bt.current.y,zn=nt.clientX-Bt.current.x;var yi;const K=(yi=e.swipeDirections)!=null?yi:Jj(V);!ie&&(Math.abs(zn)>1||Math.abs(tn)>1)&&_(Math.abs(zn)>Math.abs(tn)?"x":"y");let J={x:0,y:0};const le=ve=>1/(1.5+Math.abs(ve)/20);if(ie==="y"){if(K.includes("top")||K.includes("bottom"))if(K.includes("top")&&tn<0||K.includes("bottom")&&tn>0)J.y=tn;else{const ve=tn*le(tn);J.y=Math.abs(ve)<Math.abs(tn)?ve:tn}}else if(ie==="x"&&(K.includes("left")||K.includes("right")))if(K.includes("left")&&zn<0||K.includes("right")&&zn>0)J.x=zn;else{const ve=zn*le(zn);J.x=Math.abs(ve)<Math.abs(zn)?ve:zn}(Math.abs(J.x)>0||Math.abs(J.y)>0)&&Ye(!0),(hn=pe.current)==null||hn.style.setProperty("--swipe-amount-x",`${J.x}px`),(pn=pe.current)==null||pn.style.setProperty("--swipe-amount-y",`${J.y}px`)}},we&&!p.jsx&&be!=="loading"?ke.createElement("button",{"aria-label":W,"data-disabled":yt,"data-close-button":!0,onClick:yt||!Pe?()=>{}:()=>{Ft(),p.onDismiss==null||p.onDismiss.call(p,p)},className:no(F?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(In=q?.close)!=null?In:Pj):null,(be||p.icon||p.promise)&&p.icon!==null&&(q?.[be]!==null||p.icon)?ke.createElement("div",{"data-icon":"",className:no(F?.icon,p==null||(i=p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Kt():null,p.type!=="loading"?xn:null):null,ke.createElement("div",{"data-content":"",className:no(F?.content,p==null||(a=p.classNames)==null?void 0:a.content)},ke.createElement("div",{"data-title":"",className:no(F?.title,p==null||(l=p.classNames)==null?void 0:l.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ke.createElement("div",{"data-description":"",className:no(U,wt,F?.description,p==null||(c=p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),ke.isValidElement(p.cancel)?p.cancel:p.cancel&&xh(p.cancel)?ke.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:nt=>{xh(p.cancel)&&Pe&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,nt),Ft())},className:no(F?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ke.isValidElement(p.action)?p.action:p.action&&xh(p.action)?ke.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:nt=>{xh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,nt),!nt.defaultPrevented&&Ft())},className:no(F?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function q5(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function tO(e,t){const n={};return[e,t].forEach((r,i)=>{const a=i===1,l=a?"--mobile-offset":"--offset",c=a?Wj:Yj;function d(f){["top","right","bottom","left"].forEach(g=>{n[`${l}-${g}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${l}-${f}`]=c:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(c)}),n}const nO=ke.forwardRef(function(t,n){const{id:r,invert:i,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:g,mobileOffset:p,theme:y="light",richColors:x,duration:v,style:S,visibleToasts:E=Gj,toastOptions:k,dir:T=q5(),gap:R=Qj,icons:M,containerAriaLabel:O="Notifications"}=t,[A,N]=ke.useState([]),D=ke.useMemo(()=>r?A.filter(L=>L.toasterId===r):A.filter(L=>!L.toasterId),[A,r]),H=ke.useMemo(()=>Array.from(new Set([a].concat(D.filter(L=>L.position).map(L=>L.position)))),[D,a]),[I,U]=ke.useState([]),[$,V]=ke.useState(!1),[G,B]=ke.useState(!1),[F,q]=ke.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=ke.useRef(null),ie=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=ke.useRef(null),z=ke.useRef(!1),Y=ke.useCallback(L=>{N(ee=>{var te;return(te=ee.find(Q=>Q.id===L.id))!=null&&te.delete||Ur.dismiss(L.id),ee.filter(({id:Q})=>Q!==L.id)})},[]);return ke.useEffect(()=>Ur.subscribe(L=>{if(L.dismiss){requestAnimationFrame(()=>{N(ee=>ee.map(te=>te.id===L.id?{...te,delete:!0}:te))});return}setTimeout(()=>{Aj.flushSync(()=>{N(ee=>{const te=ee.findIndex(Q=>Q.id===L.id);return te!==-1?[...ee.slice(0,te),{...ee[te],...L},...ee.slice(te+1)]:[L,...ee]})})})}),[A]),ke.useEffect(()=>{if(y!=="system"){q(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;const L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:ee})=>{q(ee?"dark":"light")})}catch{L.addListener(({matches:te})=>{try{q(te?"dark":"light")}catch(Q){console.error(Q)}})}},[y]),ke.useEffect(()=>{A.length<=1&&V(!1)},[A]),ke.useEffect(()=>{const L=ee=>{var te;if(l.every(ue=>ee[ue]||ee.code===ue)){var de;V(!0),(de=W.current)==null||de.focus()}ee.code==="Escape"&&(document.activeElement===W.current||(te=W.current)!=null&&te.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[l]),ke.useEffect(()=>{if(W.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,z.current=!1)}},[W.current]),ke.createElement("section",{ref:n,"aria-label":`${O} ${ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},H.map((L,ee)=>{var te;const[Q,de]=L.split("-");return D.length?ke.createElement("ol",{key:L,dir:T==="auto"?q5():T,tabIndex:-1,ref:W,className:f,"data-sonner-toaster":!0,"data-sonner-theme":F,"data-y-position":Q,"data-x-position":de,style:{"--front-toast-height":`${((te=I[0])==null?void 0:te.height)||0}px`,"--width":`${Kj}px`,"--gap":`${R}px`,...S,...tO(g,p)},onBlur:ue=>{z.current&&!ue.currentTarget.contains(ue.relatedTarget)&&(z.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||z.current||(z.current=!0,_.current=ue.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{G||V(!1)},onDragEnd:()=>V(!1),onPointerDown:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},D.filter(ue=>!ue.position&&ee===0||ue.position===L).map((ue,Se)=>{var Ee,ze;return ke.createElement(eO,{key:ue.id,icons:M,index:Se,toast:ue,defaultRichColors:x,duration:(Ee=k?.duration)!=null?Ee:v,className:k?.className,descriptionClassName:k?.descriptionClassName,invert:i,visibleToasts:E,closeButton:(ze=k?.closeButton)!=null?ze:d,interacting:G,position:L,style:k?.style,unstyled:k?.unstyled,classNames:k?.classNames,cancelButtonStyle:k?.cancelButtonStyle,actionButtonStyle:k?.actionButtonStyle,closeButtonAriaLabel:k?.closeButtonAriaLabel,removeToast:Y,toasts:D.filter(Ye=>Ye.position==ue.position),heights:I.filter(Ye=>Ye.position==ue.position),setHeights:U,expandByDefault:c,gap:R,expanded:$,swipeDirections:t.swipeDirections})})):null}))});const sk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const rO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const iO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const V5=e=>{const t=iO(e);return t.charAt(0).toUpperCase()+t.slice(1)};var oO={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"};const aO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const sO=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:l,...c},d)=>C.createElement("svg",{ref:d,...oO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:sk("lucide",i),...!a&&!aO(c)&&{"aria-hidden":"true"},...c},[...l.map(([f,g])=>C.createElement(f,g)),...Array.isArray(a)?a:[a]]));const mr=(e,t)=>{const n=C.forwardRef(({className:r,...i},a)=>C.createElement(sO,{ref:a,iconNode:t,className:sk(`lucide-${rO(V5(e))}`,`lucide-${e}`,r),...i}));return n.displayName=V5(e),n};const lO=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],lk=mr("check",lO);const cO=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],uO=mr("chevron-down",cO);const dO=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ck=mr("chevron-right",dO);const fO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],hO=mr("circle-check",fO);const pO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mO=mr("circle",pO);const gO=[["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"}]],yO=mr("copy",gO);const xO=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],bO=mr("ellipsis-vertical",xO);const vO=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],wO=mr("ellipsis",vO);const SO=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],uk=mr("file-text",SO);const CO=[["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"}]],h2=mr("folder",CO);const EO=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],kO=mr("history",EO);const TO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],NO=mr("info",TO);const RO=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],rd=mr("loader-circle",RO);const AO=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],jO=mr("octagon-x",AO);const OO=[["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"}]],MO=mr("pencil",OO);const LO=[["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"}]],_O=mr("triangle-alert",LO);const DO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],im=mr("x",DO),IO=({...e})=>{const{theme:t="system"}=Rj();return h.jsx(nO,{theme:t,className:"toaster group",icons:{success:h.jsx(hO,{className:"size-5 text-green-500"}),info:h.jsx(NO,{className:"size-5 text-blue-500"}),warning:h.jsx(_O,{className:"size-5 text-yellow-500"}),error:h.jsx(jO,{className:"size-5 text-red-500"}),loading:h.jsx(rd,{className:"size-5 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{description:"whitespace-pre-line",toast:"cn-toast"}},...e})};var dk=e=>{throw TypeError(e)},zO=(e,t,n)=>t.has(e)||dk("Cannot "+n),o1=(e,t,n)=>(zO(e,t,"read from private field"),n?n.call(e):t.get(e)),PO=(e,t,n)=>t.has(e)?dk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$5="popstate";function FO(e={}){function t(r,i){let{pathname:a,search:l,hash:c}=r.location;return id("",{pathname:a,search:l,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ho(i)}return HO(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function An(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function BO(){return Math.random().toString(36).substring(2,10)}function G5(e,t){return{usr:e.state,key:e.key,idx:t}}function id(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ga(t):t,state:n,key:t&&t.key||r||BO()}}function ho({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ga(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function HO(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,l=i.history,c="POP",d=null,f=g();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function g(){return(l.state||{idx:null}).idx}function p(){c="POP";let E=g(),k=E==null?null:E-f;f=E,d&&d({action:c,location:S.location,delta:k})}function y(E,k){c="PUSH";let T=id(S.location,E,k);f=g()+1;let R=G5(T,f),M=S.createHref(T);try{l.pushState(R,"",M)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(M)}a&&d&&d({action:c,location:S.location,delta:1})}function x(E,k){c="REPLACE";let T=id(S.location,E,k);f=g();let R=G5(T,f),M=S.createHref(T);l.replaceState(R,"",M),a&&d&&d({action:c,location:S.location,delta:0})}function v(E){return fk(E)}let S={get action(){return c},get location(){return e(i,l)},listen(E){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener($5,p),d=E,()=>{i.removeEventListener($5,p),d=null}},createHref(E){return t(i,E)},createURL:v,encodeLocation(E){let k=v(E);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:y,replace:x,go(E){return l.go(E)}};return S}function fk(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ho(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var Fu,Y5=class{constructor(e){if(PO(this,Fu,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(o1(this,Fu).has(e))return o1(this,Fu).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){o1(this,Fu).set(e,t)}};Fu=new WeakMap;var UO=new Set(["lazy","caseSensitive","path","id","index","children"]);function qO(e){return UO.has(e)}var VO=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function $O(e){return VO.has(e)}function GO(e){return e.index===!0}function od(e,t,n=[],r={},i=!1){return e.map((a,l)=>{let c=[...n,String(l)],d=typeof a.id=="string"?a.id:c.join("-");if(Ct(a.index!==!0||!a.children,"Cannot specify children on an index route"),Ct(i||!r[d],`Found a route id collision on id "${d}". Route id's must be globally unique within Data Router usages`),GO(a)){let f={...a,id:d};return r[d]=W5(f,t(f)),f}else{let f={...a,id:d,children:void 0};return r[d]=W5(f,t(f)),a.children&&(f.children=od(a.children,t,c,r,i)),f}})}function W5(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ra(e,t,n="/"){return Bu(e,t,n,!1)}function Bu(e,t,n,r){let i=typeof t=="string"?Ga(t):t,a=Di(i.pathname||"/",n);if(a==null)return null;let l=hk(e);WO(l);let c=null;for(let d=0;c==null&&d<l.length;++d){let f=oM(a);c=rM(l[d],f,r)}return c}function YO(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function hk(e,t=[],n=[],r="",i=!1){let a=(l,c,d=i,f)=>{let g={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(r)&&d)return;Ct(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length)}let p=ao([r,g.relativePath]),y=n.concat(g);l.children&&l.children.length>0&&(Ct(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),hk(l.children,t,y,p,d)),!(l.path==null&&!l.index)&&t.push({path:p,score:tM(p,l.index),routesMeta:y})};return e.forEach((l,c)=>{if(l.path===""||!l.path?.includes("?"))a(l,c);else for(let d of pk(l.path))a(l,c,!0,d)}),t}function pk(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let l=pk(r.join("/")),c=[];return c.push(...l.map(d=>d===""?a:[a,d].join("/"))),i&&c.push(...l),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function WO(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:nM(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var KO=/^:[\w-]+$/,QO=3,XO=2,ZO=1,JO=10,eM=-2,K5=e=>e==="*";function tM(e,t){let n=e.split("/"),r=n.length;return n.some(K5)&&(r+=eM),t&&(r+=XO),n.filter(i=>!K5(i)).reduce((i,a)=>i+(KO.test(a)?QO:a===""?ZO:JO),r)}function nM(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function rM(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",l=[];for(let c=0;c<r.length;++c){let d=r[c],f=c===r.length-1,g=a==="/"?t:t.slice(a.length)||"/",p=yp({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},g),y=d.route;if(!p&&f&&n&&!r[r.length-1].route.index&&(p=yp({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},g)),!p)return null;Object.assign(i,p.params),l.push({params:i,pathname:ao([a,p.pathname]),pathnameBase:lM(ao([a,p.pathnameBase])),route:y}),p.pathnameBase!=="/"&&(a=ao([a,p.pathnameBase]))}return l}function yp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=iM(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],l=a.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((f,{paramName:g,isOptional:p},y)=>{if(g==="*"){let v=c[y]||"";l=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}const x=c[y];return p&&!x?f[g]=void 0:f[g]=(x||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:l,pattern:e}}function iM(e,t=!1,n=!0){An(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function oM(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return An(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Di(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function aM({basename:e,pathname:t}){return t==="/"?e:ao([e,t])}var mk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oy=e=>mk.test(e);function sM(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ga(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=Q5(n.substring(1),"/"):a=Q5(n,t)):a=t,{pathname:a,search:cM(r),hash:uM(i)}}function Q5(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function a1(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gk(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function om(e){let t=gk(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function am(e,t,n,r=!1){let i;typeof e=="string"?i=Ga(e):(i={...e},Ct(!i.pathname||!i.pathname.includes("?"),a1("?","pathname","search",i)),Ct(!i.pathname||!i.pathname.includes("#"),a1("#","pathname","hash",i)),Ct(!i.search||!i.search.includes("#"),a1("#","search","hash",i)));let a=e===""||i.pathname==="",l=a?"/":i.pathname,c;if(l==null)c=n;else{let p=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),p-=1;i.pathname=y.join("/")}c=p>=0?t[p]:"/"}let d=sM(i,c),f=l&&l!=="/"&&l.endsWith("/"),g=(a||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||g)&&(d.pathname+="/"),d}var ao=e=>e.join("/").replace(/\/\/+/g,"/"),lM=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),cM=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,uM=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Td=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ad(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Nd(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var yk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xk(e,t){let n=e;if(typeof n!="string"||!mk.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(yk)try{let a=new URL(window.location.href),l=n.startsWith("//")?new URL(a.protocol+n):new URL(n),c=Di(l.pathname,t);l.origin===a.origin&&c!=null?n=c+l.search+l.hash:i=!0}catch{An(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var ja=Symbol("Uninstrumented");function dM(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(i=>i({id:t.id,index:t.index,path:t.path,instrument(a){let l=Object.keys(n);for(let c of l)a[c]&&n[c].push(a[c])}}));let r={};if(typeof t.lazy=="function"&&n.lazy.length>0){let i=Vl(n.lazy,t.lazy,()=>{});i&&(r.lazy=i)}if(typeof t.lazy=="object"){let i=t.lazy;["middleware","loader","action"].forEach(a=>{let l=i[a],c=n[`lazy.${a}`];if(typeof l=="function"&&c.length>0){let d=Vl(c,l,()=>{});d&&(r.lazy=Object.assign(r.lazy||{},{[a]:d}))}})}return["loader","action"].forEach(i=>{let a=t[i];if(typeof a=="function"&&n[i].length>0){let l=a[ja]??a,c=Vl(n[i],l,(...d)=>X5(d[0]));c&&(i==="loader"&&l.hydrate===!0&&(c.hydrate=!0),c[ja]=l,r[i]=c)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(i=>{let a=i[ja]??i,l=Vl(n.middleware,a,(...c)=>X5(c[0]));return l?(l[ja]=a,l):i})),r}function fM(e,t){let n={navigate:[],fetch:[]};if(t.forEach(r=>r({instrument(i){let a=Object.keys(i);for(let l of a)i[l]&&n[l].push(i[l])}})),n.navigate.length>0){let r=e.navigate[ja]??e.navigate,i=Vl(n.navigate,r,(...a)=>{let[l,c]=a;return{to:typeof l=="number"||typeof l=="string"?l:l?ho(l):".",...Z5(e,c??{})}});i&&(i[ja]=r,e.navigate=i)}if(n.fetch.length>0){let r=e.fetch[ja]??e.fetch,i=Vl(n.fetch,r,(...a)=>{let[l,,c,d]=a;return{href:c??".",fetcherKey:l,...Z5(e,d??{})}});i&&(i[ja]=r,e.fetch=i)}return e}function Vl(e,t,n){return e.length===0?null:async(...r)=>{let i=await bk(e,n(...r),()=>t(...r),e.length-1);if(i.type==="error")throw i.value;return i.value}}async function bk(e,t,n,r){let i=e[r],a;if(i){let l,c=async()=>(l?console.error("You cannot call instrumented handlers more than once"):l=bk(e,t,n,r-1),a=await l,Ct(a,"Expected a result"),a.type==="error"&&a.value instanceof Error?{status:"error",error:a.value}:{status:"success",error:void 0});try{await i(c,t)}catch(d){console.error("An instrumentation function threw an error:",d)}l||await c(),await l}else try{a={type:"success",value:await n()}}catch(l){a={type:"error",value:l}}return a||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function X5(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:hM(t),params:{...r},unstable_pattern:i,context:pM(n)}}function Z5(e,t){return{currentUrl:ho(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function hM(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function pM(e){if(gM(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var mM=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gM(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===mM}var vk=["POST","PUT","PATCH","DELETE"],yM=new Set(vk),xM=["GET",...vk],bM=new Set(xM),wk=new Set([301,302,303,307,308]),vM=new Set([307,308]),s1={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},SM=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Sk="remix-router-transitions",Ck=Symbol("ResetLoaderData");function CM(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Ct(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||SM,a=i;if(e.unstable_instrumentations){let K=e.unstable_instrumentations;a=J=>({...i(J),...dM(K.map(le=>le.route).filter(Boolean),J)})}let l={},c=od(e.routes,a,void 0,l),d,f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let g=e.dataStrategy||RM,p={...e.future},y=null,x=new Set,v=null,S=null,E=null,k=e.hydrationData!=null,T=Ra(c,e.history.location,f),R=!1,M=null,O;if(T==null&&!e.patchRoutesOnNavigation){let K=Ri(404,{pathname:e.history.location.pathname}),{matches:J,route:le}=bh(c);O=!0,T=J,M={[le.id]:K}}else if(T&&!e.hydrationData&&pn(T,c,e.history.location.pathname).active&&(T=null),T)if(T.some(K=>K.route.lazy))O=!1;else if(!T.some(K=>My(K.route)))O=!0;else{let K=e.hydrationData?e.hydrationData.loaderData:null,J=e.hydrationData?e.hydrationData.errors:null;if(J){let le=T.findIndex(ve=>J[ve.route.id]!==void 0);O=T.slice(0,le+1).every(ve=>!m2(ve.route,K,J))}else O=T.every(le=>!m2(le.route,K,J))}else{O=!1,T=[];let K=pn(null,c,e.history.location.pathname);K.active&&K.matches&&(R=!0,T=K.matches)}let A,N={historyAction:e.history.action,location:e.history.location,matches:T,initialized:O,navigation:s1,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||M,fetchers:new Map,blockers:new Map},D="POP",H=null,I=!1,U,$=!1,V=new Map,G=null,B=!1,F=!1,q=new Set,W=new Map,ie=0,_=-1,z=new Map,Y=new Set,L=new Map,ee=new Map,te=new Set,Q=new Map,de,ue=null;function Se(){if(y=e.history.listen(({action:K,location:J,delta:le})=>{if(de){de(),de=void 0;return}An(Q.size===0||le!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ve=xn({currentLocation:N.location,nextLocation:J,historyAction:K});if(ve&&le!=null){let je=new Promise(Ze=>{de=Ze});e.history.go(le*-1),Kt(ve,{state:"blocked",location:J,proceed(){Kt(ve,{state:"proceeding",proceed:void 0,reset:void 0,location:J}),je.then(()=>e.history.go(le))},reset(){let Ze=new Map(N.blockers);Ze.set(ve,bu),Ye({blockers:Ze})}}),H?.resolve(),H=null;return}return We(K,J)}),n){GM(t,V);let K=()=>YM(t,V);t.addEventListener("pagehide",K),G=()=>t.removeEventListener("pagehide",K)}return N.initialized||We("POP",N.location,{initialHydration:!0}),A}function Ee(){y&&y(),G&&G(),x.clear(),U&&U.abort(),N.fetchers.forEach((K,J)=>Bt(J)),N.blockers.forEach((K,J)=>Ft(J))}function ze(K){return x.add(K),()=>x.delete(K)}function Ye(K,J={}){K.matches&&(K.matches=K.matches.map(je=>{let Ze=l[je.route.id],Fe=je.route;return Fe.element!==Ze.element||Fe.errorElement!==Ze.errorElement||Fe.hydrateFallbackElement!==Ze.hydrateFallbackElement?{...je,route:Ze}:je})),N={...N,...K};let le=[],ve=[];N.fetchers.forEach((je,Ze)=>{je.state==="idle"&&(te.has(Ze)?le.push(Ze):ve.push(Ze))}),te.forEach(je=>{!N.fetchers.has(je)&&!W.has(je)&&le.push(je)}),[...x].forEach(je=>je(N,{deletedFetchers:le,newErrors:K.errors??null,viewTransitionOpts:J.viewTransitionOpts,flushSync:J.flushSync===!0})),le.forEach(je=>Bt(je)),ve.forEach(je=>N.fetchers.delete(je))}function Me(K,J,{flushSync:le}={}){let ve=N.actionData!=null&&N.navigation.formMethod!=null&&xr(N.navigation.formMethod)&&N.navigation.state==="loading"&&K.state?._isRedirect!==!0,je;J.actionData?Object.keys(J.actionData).length>0?je=J.actionData:je=null:ve?je=N.actionData:je=null;let Ze=J.loaderData?lS(N.loaderData,J.loaderData,J.matches||[],J.errors):N.loaderData,Fe=N.blockers;Fe.size>0&&(Fe=new Map(Fe),Fe.forEach((ct,tt)=>Fe.set(tt,bu)));let _e=B?!1:hn(K,J.matches||N.matches),Be=I===!0||N.navigation.formMethod!=null&&xr(N.navigation.formMethod)&&K.state?._isRedirect!==!0;d&&(c=d,d=void 0),B||D==="POP"||(D==="PUSH"?e.history.push(K,K.state):D==="REPLACE"&&e.history.replace(K,K.state));let et;if(D==="POP"){let ct=V.get(N.location.pathname);ct&&ct.has(K.pathname)?et={currentLocation:N.location,nextLocation:K}:V.has(K.pathname)&&(et={currentLocation:K,nextLocation:N.location})}else if($){let ct=V.get(N.location.pathname);ct?ct.add(K.pathname):(ct=new Set([K.pathname]),V.set(N.location.pathname,ct)),et={currentLocation:N.location,nextLocation:K}}Ye({...J,actionData:je,loaderData:Ze,historyAction:D,location:K,initialized:!0,navigation:s1,revalidation:"idle",restoreScrollPosition:_e,preventScrollReset:Be,blockers:Fe},{viewTransitionOpts:et,flushSync:le===!0}),D="POP",I=!1,$=!1,B=!1,F=!1,H?.resolve(),H=null,ue?.resolve(),ue=null}async function Ie(K,J){if(H?.resolve(),H=null,typeof K=="number"){H||(H=fS());let Ot=H.promise;return e.history.go(K),Ot}let le=p2(N.location,N.matches,f,K,J?.fromRouteId,J?.relative),{path:ve,submission:je,error:Ze}=J5(!1,le,J),Fe=N.location,_e=id(N.location,ve,J&&J.state);_e={..._e,...e.history.encodeLocation(_e)};let Be=J&&J.replace!=null?J.replace:void 0,et="PUSH";Be===!0?et="REPLACE":Be===!1||je!=null&&xr(je.formMethod)&&je.formAction===N.location.pathname+N.location.search&&(et="REPLACE");let ct=J&&"preventScrollReset"in J?J.preventScrollReset===!0:void 0,tt=(J&&J.flushSync)===!0,zt=xn({currentLocation:Fe,nextLocation:_e,historyAction:et});if(zt){Kt(zt,{state:"blocked",location:_e,proceed(){Kt(zt,{state:"proceeding",proceed:void 0,reset:void 0,location:_e}),Ie(K,J)},reset(){let Ot=new Map(N.blockers);Ot.set(zt,bu),Ye({blockers:Ot})}});return}await We(et,_e,{submission:je,pendingError:Ze,preventScrollReset:ct,replace:J&&J.replace,enableViewTransition:J&&J.viewTransition,flushSync:tt,callSiteDefaultShouldRevalidate:J&&J.unstable_defaultShouldRevalidate})}function xe(){ue||(ue=fS()),we(),Ye({revalidation:"loading"});let K=ue.promise;return N.navigation.state==="submitting"?K:N.navigation.state==="idle"?(We(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),K):(We(D||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:$===!0}),K)}async function We(K,J,le){U&&U.abort(),U=null,D=K,B=(le&&le.startUninterruptedRevalidation)===!0,qt(N.location,N.matches),I=(le&&le.preventScrollReset)===!0,$=(le&&le.enableViewTransition)===!0;let ve=d||c,je=le&&le.overrideNavigation,Ze=le?.initialHydration&&N.matches&&N.matches.length>0&&!R?N.matches:Ra(ve,J,f),Fe=(le&&le.flushSync)===!0;if(Ze&&N.initialized&&!F&&IM(N.location,J)&&!(le&&le.submission&&xr(le.submission.formMethod))){Me(J,{matches:Ze},{flushSync:Fe});return}let _e=pn(Ze,ve,J.pathname);if(_e.active&&_e.matches&&(Ze=_e.matches),!Ze){let{error:En,notFoundMatches:kn,route:Mt}=fn(J.pathname);Me(J,{matches:kn,loaderData:{},errors:{[Mt.id]:En}},{flushSync:Fe});return}U=new AbortController;let Be=Bl(e.history,J,U.signal,le&&le.submission),et=e.getContext?await e.getContext():new Y5,ct;if(le&&le.pendingError)ct=[Aa(Ze).route.id,{type:"error",error:le.pendingError}];else if(le&&le.submission&&xr(le.submission.formMethod)){let En=await Te(Be,J,le.submission,Ze,et,_e.active,le&&le.initialHydration===!0,{replace:le.replace,flushSync:Fe});if(En.shortCircuited)return;if(En.pendingActionResult){let[kn,Mt]=En.pendingActionResult;if(ii(Mt)&&ad(Mt.error)&&Mt.error.status===404){U=null,Me(J,{matches:En.matches,loaderData:{},errors:{[kn]:Mt.error}});return}}Ze=En.matches||Ze,ct=En.pendingActionResult,je=l1(J,le.submission),Fe=!1,_e.active=!1,Be=Bl(e.history,Be.url,Be.signal)}let{shortCircuited:tt,matches:zt,loaderData:Ot,errors:Cn}=await Ae(Be,J,Ze,et,_e.active,je,le&&le.submission,le&&le.fetcherSubmission,le&&le.replace,le&&le.initialHydration===!0,Fe,ct,le&&le.callSiteDefaultShouldRevalidate);tt||(U=null,Me(J,{matches:zt||Ze,...cS(ct),loaderData:Ot,errors:Cn}))}async function Te(K,J,le,ve,je,Ze,Fe,_e={}){we();let Be=VM(J,le);if(Ye({navigation:Be},{flushSync:_e.flushSync===!0}),Ze){let tt=await ar(ve,J.pathname,K.signal);if(tt.type==="aborted")return{shortCircuited:!0};if(tt.type==="error"){if(tt.partialMatches.length===0){let{matches:Ot,route:Cn}=bh(c);return{matches:Ot,pendingActionResult:[Cn.id,{type:"error",error:tt.error}]}}let zt=Aa(tt.partialMatches).route.id;return{matches:tt.partialMatches,pendingActionResult:[zt,{type:"error",error:tt.error}]}}else if(tt.matches)ve=tt.matches;else{let{notFoundMatches:zt,error:Ot,route:Cn}=fn(J.pathname);return{matches:zt,pendingActionResult:[Cn.id,{type:"error",error:Ot}]}}}let et,ct=Xh(ve,J);if(!ct.route.action&&!ct.route.lazy)et={type:"error",error:Ri(405,{method:K.method,pathname:J.pathname,routeId:ct.route.id})};else{let tt=Wl(a,l,K,ve,ct,Fe?[]:r,je),zt=await wt(K,tt,je,null);if(et=zt[ct.route.id],!et){for(let Ot of ve)if(zt[Ot.route.id]){et=zt[Ot.route.id];break}}if(K.signal.aborted)return{shortCircuited:!0}}if(As(et)){let tt;return _e&&_e.replace!=null?tt=_e.replace:tt=oS(et.response.headers.get("Location"),new URL(K.url),f,e.history)===N.location.pathname+N.location.search,await Ue(K,et,!0,{submission:le,replace:tt}),{shortCircuited:!0}}if(ii(et)){let tt=Aa(ve,ct.route.id);return(_e&&_e.replace)!==!0&&(D="PUSH"),{matches:ve,pendingActionResult:[tt.route.id,et,ct.route.id]}}return{matches:ve,pendingActionResult:[ct.route.id,et]}}async function Ae(K,J,le,ve,je,Ze,Fe,_e,Be,et,ct,tt,zt){let Ot=Ze||l1(J,Fe),Cn=Fe||_e||dS(Ot),En=!B&&!et;if(je){if(En){let Mn=pe(tt);Ye({navigation:Ot,...Mn!==void 0?{actionData:Mn}:{}},{flushSync:ct})}let Lt=await ar(le,J.pathname,K.signal);if(Lt.type==="aborted")return{shortCircuited:!0};if(Lt.type==="error"){if(Lt.partialMatches.length===0){let{matches:Bi,route:sr}=bh(c);return{matches:Bi,loaderData:{},errors:{[sr.id]:Lt.error}}}let Mn=Aa(Lt.partialMatches).route.id;return{matches:Lt.partialMatches,loaderData:{},errors:{[Mn]:Lt.error}}}else if(Lt.matches)le=Lt.matches;else{let{error:Mn,notFoundMatches:Bi,route:sr}=fn(J.pathname);return{matches:Bi,loaderData:{},errors:{[sr.id]:Mn}}}}let kn=d||c,{dsMatches:Mt,revalidatingFetchers:tr}=eS(K,ve,a,l,e.history,N,le,Cn,J,et?[]:r,et===!0,F,q,te,L,Y,kn,f,e.patchRoutesOnNavigation!=null,tt,zt);if(_=++ie,!e.dataStrategy&&!Mt.some(Lt=>Lt.shouldLoad)&&!Mt.some(Lt=>Lt.route.middleware&&Lt.route.middleware.length>0)&&tr.length===0){let Lt=mt();return Me(J,{matches:le,loaderData:{},errors:tt&&ii(tt[1])?{[tt[0]]:tt[1].error}:null,...cS(tt),...Lt?{fetchers:new Map(N.fetchers)}:{}},{flushSync:ct}),{shortCircuited:!0}}if(En){let Lt={};if(!je){Lt.navigation=Ot;let Mn=pe(tt);Mn!==void 0&&(Lt.actionData=Mn)}tr.length>0&&(Lt.fetchers=Ce(tr)),Ye(Lt,{flushSync:ct})}tr.forEach(Lt=>{Ve(Lt.key),Lt.controller&&W.set(Lt.key,Lt.controller)});let _r=()=>tr.forEach(Lt=>Ve(Lt.key));U&&U.signal.addEventListener("abort",_r);let{loaderResults:bn,fetcherResults:Pi}=await ae(Mt,tr,K,ve);if(K.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",_r),tr.forEach(Lt=>W.delete(Lt.key));let Kr=vh(bn);if(Kr)return await Ue(K,Kr.result,!0,{replace:Be}),{shortCircuited:!0};if(Kr=vh(Pi),Kr)return Y.add(Kr.key),await Ue(K,Kr.result,!0,{replace:Be}),{shortCircuited:!0};let{loaderData:Fi,errors:xi}=sS(N,le,bn,tt,tr,Pi);et&&N.errors&&(xi={...N.errors,...xi});let bo=mt(),is=Qe(_),os=bo||is||tr.length>0;return{matches:le,loaderData:Fi,errors:xi,...os?{fetchers:new Map(N.fetchers)}:{}}}function pe(K){if(K&&!ii(K[1]))return{[K[0]]:K[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function Ce(K){return K.forEach(J=>{let le=N.fetchers.get(J.key),ve=vu(void 0,le?le.data:void 0);N.fetchers.set(J.key,ve)}),new Map(N.fetchers)}async function re(K,J,le,ve){Ve(K);let je=(ve&&ve.flushSync)===!0,Ze=d||c,Fe=p2(N.location,N.matches,f,le,J,ve?.relative),_e=Ra(Ze,Fe,f),Be=pn(_e,Ze,Fe);if(Be.active&&Be.matches&&(_e=Be.matches),!_e){Le(K,J,Ri(404,{pathname:Fe}),{flushSync:je});return}let{path:et,submission:ct,error:tt}=J5(!0,Fe,ve);if(tt){Le(K,J,tt,{flushSync:je});return}let zt=e.getContext?await e.getContext():new Y5,Ot=(ve&&ve.preventScrollReset)===!0;if(ct&&xr(ct.formMethod)){await be(K,J,et,_e,zt,Be.active,je,Ot,ct,ve&&ve.unstable_defaultShouldRevalidate);return}L.set(K,{routeId:J,path:et}),await Pe(K,J,et,_e,zt,Be.active,je,Ot,ct)}async function be(K,J,le,ve,je,Ze,Fe,_e,Be,et){we(),L.delete(K);let ct=N.fetchers.get(K);Oe(K,$M(Be,ct),{flushSync:Fe});let tt=new AbortController,zt=Bl(e.history,le,tt.signal,Be);if(Ze){let _t=await ar(ve,new URL(zt.url).pathname,zt.signal,K);if(_t.type==="aborted")return;if(_t.type==="error"){Le(K,J,_t.error,{flushSync:Fe});return}else if(_t.matches)ve=_t.matches;else{Le(K,J,Ri(404,{pathname:le}),{flushSync:Fe});return}}let Ot=Xh(ve,le);if(!Ot.route.action&&!Ot.route.lazy){let _t=Ri(405,{method:Be.formMethod,pathname:le,routeId:J});Le(K,J,_t,{flushSync:Fe});return}W.set(K,tt);let Cn=ie,En=Wl(a,l,zt,ve,Ot,r,je),kn=await wt(zt,En,je,K),Mt=kn[Ot.route.id];if(!Mt){for(let _t of En)if(kn[_t.route.id]){Mt=kn[_t.route.id];break}}if(zt.signal.aborted){W.get(K)===tt&&W.delete(K);return}if(te.has(K)){if(As(Mt)||ii(Mt)){Oe(K,Fo(void 0));return}}else{if(As(Mt))if(W.delete(K),_>Cn){Oe(K,Fo(void 0));return}else return Y.add(K),Oe(K,vu(Be)),Ue(zt,Mt,!1,{fetcherSubmission:Be,preventScrollReset:_e});if(ii(Mt)){Le(K,J,Mt.error);return}}let tr=N.navigation.location||N.location,_r=Bl(e.history,tr,tt.signal),bn=d||c,Pi=N.navigation.state!=="idle"?Ra(bn,N.navigation.location,f):N.matches;Ct(Pi,"Didn't find any matches after fetcher action");let Kr=++ie;z.set(K,Kr);let Fi=vu(Be,Mt.data);N.fetchers.set(K,Fi);let{dsMatches:xi,revalidatingFetchers:bo}=eS(_r,je,a,l,e.history,N,Pi,Be,tr,r,!1,F,q,te,L,Y,bn,f,e.patchRoutesOnNavigation!=null,[Ot.route.id,Mt],et);bo.filter(_t=>_t.key!==K).forEach(_t=>{let as=_t.key,sf=N.fetchers.get(as),Ac=vu(void 0,sf?sf.data:void 0);N.fetchers.set(as,Ac),Ve(as),_t.controller&&W.set(as,_t.controller)}),Ye({fetchers:new Map(N.fetchers)});let is=()=>bo.forEach(_t=>Ve(_t.key));tt.signal.addEventListener("abort",is);let{loaderResults:os,fetcherResults:Lt}=await ae(xi,bo,_r,je);if(tt.signal.aborted)return;if(tt.signal.removeEventListener("abort",is),z.delete(K),W.delete(K),bo.forEach(_t=>W.delete(_t.key)),N.fetchers.has(K)){let _t=Fo(Mt.data);N.fetchers.set(K,_t)}let Mn=vh(os);if(Mn)return Ue(_r,Mn.result,!1,{preventScrollReset:_e});if(Mn=vh(Lt),Mn)return Y.add(Mn.key),Ue(_r,Mn.result,!1,{preventScrollReset:_e});let{loaderData:Bi,errors:sr}=sS(N,Pi,os,void 0,bo,Lt);Qe(Kr),N.navigation.state==="loading"&&Kr>_?(Ct(D,"Expected pending action"),U&&U.abort(),Me(N.navigation.location,{matches:Pi,loaderData:Bi,errors:sr,fetchers:new Map(N.fetchers)})):(Ye({errors:sr,loaderData:lS(N.loaderData,Bi,Pi,sr),fetchers:new Map(N.fetchers)}),F=!1)}async function Pe(K,J,le,ve,je,Ze,Fe,_e,Be){let et=N.fetchers.get(K);Oe(K,vu(Be,et?et.data:void 0),{flushSync:Fe});let ct=new AbortController,tt=Bl(e.history,le,ct.signal);if(Ze){let Mt=await ar(ve,new URL(tt.url).pathname,tt.signal,K);if(Mt.type==="aborted")return;if(Mt.type==="error"){Le(K,J,Mt.error,{flushSync:Fe});return}else if(Mt.matches)ve=Mt.matches;else{Le(K,J,Ri(404,{pathname:le}),{flushSync:Fe});return}}let zt=Xh(ve,le);W.set(K,ct);let Ot=ie,Cn=Wl(a,l,tt,ve,zt,r,je),kn=(await wt(tt,Cn,je,K))[zt.route.id];if(W.get(K)===ct&&W.delete(K),!tt.signal.aborted){if(te.has(K)){Oe(K,Fo(void 0));return}if(As(kn))if(_>Ot){Oe(K,Fo(void 0));return}else{Y.add(K),await Ue(tt,kn,!1,{preventScrollReset:_e});return}if(ii(kn)){Le(K,J,kn.error);return}Oe(K,Fo(kn.data))}}async function Ue(K,J,le,{submission:ve,fetcherSubmission:je,preventScrollReset:Ze,replace:Fe}={}){le||(H?.resolve(),H=null),J.response.headers.has("X-Remix-Revalidate")&&(F=!0);let _e=J.response.headers.get("Location");Ct(_e,"Expected a Location header on the redirect Response"),_e=oS(_e,new URL(K.url),f,e.history);let Be=id(N.location,_e,{_isRedirect:!0});if(n){let Cn=!1;if(J.response.headers.has("X-Remix-Reload-Document"))Cn=!0;else if(Oy(_e)){const En=fk(_e,!0);Cn=En.origin!==t.location.origin||Di(En.pathname,f)==null}if(Cn){Fe?t.location.replace(_e):t.location.assign(_e);return}}U=null;let et=Fe===!0||J.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ct,formAction:tt,formEncType:zt}=N.navigation;!ve&&!je&&ct&&tt&&zt&&(ve=dS(N.navigation));let Ot=ve||je;if(vM.has(J.response.status)&&Ot&&xr(Ot.formMethod))await We(et,Be,{submission:{...Ot,formAction:_e},preventScrollReset:Ze||I,enableViewTransition:le?$:void 0});else{let Cn=l1(Be,ve);await We(et,Be,{overrideNavigation:Cn,fetcherSubmission:je,preventScrollReset:Ze||I,enableViewTransition:le?$:void 0})}}async function wt(K,J,le,ve){let je,Ze={};try{je=await jM(g,K,J,ve,le,!1)}catch(Fe){return J.filter(_e=>_e.shouldLoad).forEach(_e=>{Ze[_e.route.id]={type:"error",error:Fe}}),Ze}if(K.signal.aborted)return Ze;if(!xr(K.method))for(let Fe of J){if(je[Fe.route.id]?.type==="error")break;!je.hasOwnProperty(Fe.route.id)&&!N.loaderData.hasOwnProperty(Fe.route.id)&&(!N.errors||!N.errors.hasOwnProperty(Fe.route.id))&&Fe.shouldCallHandler()&&(je[Fe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Fe.route.id}`)})}for(let[Fe,_e]of Object.entries(je))if(BM(_e)){let Be=_e.result;Ze[Fe]={type:"redirect",response:_M(Be,K,Fe,J,f)}}else Ze[Fe]=await LM(_e);return Ze}async function ae(K,J,le,ve){let je=wt(le,K,ve,null),Ze=Promise.all(J.map(async Be=>{if(Be.matches&&Be.match&&Be.request&&Be.controller){let ct=(await wt(Be.request,Be.matches,ve,Be.key))[Be.match.route.id];return{[Be.key]:ct}}else return Promise.resolve({[Be.key]:{type:"error",error:Ri(404,{pathname:Be.path})}})})),Fe=await je,_e=(await Ze).reduce((Be,et)=>Object.assign(Be,et),{});return{loaderResults:Fe,fetcherResults:_e}}function we(){F=!0,L.forEach((K,J)=>{W.has(J)&&q.add(J),Ve(J)})}function Oe(K,J,le={}){N.fetchers.set(K,J),Ye({fetchers:new Map(N.fetchers)},{flushSync:(le&&le.flushSync)===!0})}function Le(K,J,le,ve={}){let je=Aa(N.matches,J);Bt(K),Ye({errors:{[je.route.id]:le},fetchers:new Map(N.fetchers)},{flushSync:(ve&&ve.flushSync)===!0})}function He(K){return ee.set(K,(ee.get(K)||0)+1),te.has(K)&&te.delete(K),N.fetchers.get(K)||wM}function kt(K,J){Ve(K,J?.reason),Oe(K,Fo(null))}function Bt(K){let J=N.fetchers.get(K);W.has(K)&&!(J&&J.state==="loading"&&z.has(K))&&Ve(K),L.delete(K),z.delete(K),Y.delete(K),te.delete(K),q.delete(K),N.fetchers.delete(K)}function Xe(K){let J=(ee.get(K)||0)-1;J<=0?(ee.delete(K),te.add(K)):ee.set(K,J),Ye({fetchers:new Map(N.fetchers)})}function Ve(K,J){let le=W.get(K);le&&(le.abort(J),W.delete(K))}function pt(K){for(let J of K){let le=He(J),ve=Fo(le.data);N.fetchers.set(J,ve)}}function mt(){let K=[],J=!1;for(let le of Y){let ve=N.fetchers.get(le);Ct(ve,`Expected fetcher: ${le}`),ve.state==="loading"&&(Y.delete(le),K.push(le),J=!0)}return pt(K),J}function Qe(K){let J=[];for(let[le,ve]of z)if(ve<K){let je=N.fetchers.get(le);Ct(je,`Expected fetcher: ${le}`),je.state==="loading"&&(Ve(le),z.delete(le),J.push(le))}return pt(J),J.length>0}function yt(K,J){let le=N.blockers.get(K)||bu;return Q.get(K)!==J&&Q.set(K,J),le}function Ft(K){N.blockers.delete(K),Q.delete(K)}function Kt(K,J){let le=N.blockers.get(K)||bu;Ct(le.state==="unblocked"&&J.state==="blocked"||le.state==="blocked"&&J.state==="blocked"||le.state==="blocked"&&J.state==="proceeding"||le.state==="blocked"&&J.state==="unblocked"||le.state==="proceeding"&&J.state==="unblocked",`Invalid blocker state transition: ${le.state} -> ${J.state}`);let ve=new Map(N.blockers);ve.set(K,J),Ye({blockers:ve})}function xn({currentLocation:K,nextLocation:J,historyAction:le}){if(Q.size===0)return;Q.size>1&&An(!1,"A router only supports one blocker at a time");let ve=Array.from(Q.entries()),[je,Ze]=ve[ve.length-1],Fe=N.blockers.get(je);if(!(Fe&&Fe.state==="proceeding")&&Ze({currentLocation:K,nextLocation:J,historyAction:le}))return je}function fn(K){let J=Ri(404,{pathname:K}),le=d||c,{matches:ve,route:je}=bh(le);return{notFoundMatches:ve,route:je,error:J}}function In(K,J,le){if(v=K,E=J,S=le||null,!k&&N.navigation===s1){k=!0;let ve=hn(N.location,N.matches);ve!=null&&Ye({restoreScrollPosition:ve})}return()=>{v=null,E=null,S=null}}function nt(K,J){return S&&S(K,J.map(ve=>YO(ve,N.loaderData)))||K.key}function qt(K,J){if(v&&E){let le=nt(K,J);v[le]=E()}}function hn(K,J){if(v){let le=nt(K,J),ve=v[le];if(typeof ve=="number")return ve}return null}function pn(K,J,le){if(e.patchRoutesOnNavigation)if(K){if(Object.keys(K[0].params).length>0)return{active:!0,matches:Bu(J,le,f,!0)}}else return{active:!0,matches:Bu(J,le,f,!0)||[]};return{active:!1,matches:null}}async function ar(K,J,le,ve){if(!e.patchRoutesOnNavigation)return{type:"success",matches:K};let je=K;for(;;){let Ze=d==null,Fe=d||c,_e=l;try{await e.patchRoutesOnNavigation({signal:le,path:J,matches:je,fetcherKey:ve,patch:(ct,tt)=>{le.aborted||tS(ct,tt,Fe,_e,a,!1)}})}catch(ct){return{type:"error",error:ct,partialMatches:je}}finally{Ze&&!le.aborted&&(c=[...c])}if(le.aborted)return{type:"aborted"};let Be=Ra(Fe,J,f),et=null;if(Be){if(Object.keys(Be[0].params).length===0)return{type:"success",matches:Be};if(et=Bu(Fe,J,f,!0),!(et&&je.length<et.length&&tn(je,et.slice(0,je.length))))return{type:"success",matches:Be}}if(et||(et=Bu(Fe,J,f,!0)),!et||tn(je,et))return{type:"success",matches:null};je=et}}function tn(K,J){return K.length===J.length&&K.every((le,ve)=>le.route.id===J[ve].route.id)}function zn(K){l={},d=od(K,a,void 0,l)}function yi(K,J,le=!1){let ve=d==null;tS(K,J,d||c,l,a,le),ve&&(c=[...c],Ye({}))}return A={get basename(){return f},get future(){return p},get state(){return N},get routes(){return c},get window(){return t},initialize:Se,subscribe:ze,enableScrollRestoration:In,navigate:Ie,fetch:re,revalidate:xe,createHref:K=>e.history.createHref(K),encodeLocation:K=>e.history.encodeLocation(K),getFetcher:He,resetFetcher:kt,deleteFetcher:Xe,dispose:Ee,getBlocker:yt,deleteBlocker:Ft,patchRoutes:yi,_internalFetchControllers:W,_internalSetRoutes:zn,_internalSetStateDoNotUseOrYouWillBreakYourApp(K){Ye(K)}},e.unstable_instrumentations&&(A=fM(A,e.unstable_instrumentations.map(K=>K.router).filter(Boolean))),A}function EM(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function p2(e,t,n,r,i,a){let l,c;if(i){l=[];for(let f of t)if(l.push(f),f.route.id===i){c=f;break}}else l=t,c=t[t.length-1];let d=am(r||".",om(l),Di(e.pathname,n)||e.pathname,a==="path");if(r==null&&(d.search=e.search,d.hash=e.hash),(r==null||r===""||r===".")&&c){let f=_y(d.search);if(c.route.index&&!f)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&f){let g=new URLSearchParams(d.search),p=g.getAll("index");g.delete("index"),p.filter(x=>x).forEach(x=>g.append("index",x));let y=g.toString();d.search=y?`?${y}`:""}}return n!=="/"&&(d.pathname=aM({basename:n,pathname:d.pathname})),ho(d)}function J5(e,t,n){if(!n||!EM(n))return{path:t};if(n.formMethod&&!qM(n.formMethod))return{path:t,error:Ri(405,{method:n.formMethod})};let r=()=>({path:t,error:Ri(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),l=Ak(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!xr(a))return r();let p=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((y,[x,v])=>`${y}${x}=${v}
10
+ `,""):String(n.body);return{path:t,submission:{formMethod:a,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:p}}}else if(n.formEncType==="application/json"){if(!xr(a))return r();try{let p=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:l,formEncType:n.formEncType,formData:void 0,json:p,text:void 0}}}catch{return r()}}}Ct(typeof FormData=="function","FormData is not available in this environment");let c,d;if(n.formData)c=y2(n.formData),d=n.formData;else if(n.body instanceof FormData)c=y2(n.body),d=n.body;else if(n.body instanceof URLSearchParams)c=n.body,d=aS(c);else if(n.body==null)c=new URLSearchParams,d=new FormData;else try{c=new URLSearchParams(n.body),d=aS(c)}catch{return r()}let f={formMethod:a,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(xr(f.formMethod))return{path:t,submission:f};let g=Ga(t);return e&&g.search&&_y(g.search)&&c.append("index",""),g.search=`?${c}`,{path:ho(g),submission:f}}function eS(e,t,n,r,i,a,l,c,d,f,g,p,y,x,v,S,E,k,T,R,M){let O=R?ii(R[1])?R[1].error:R[1].data:void 0,A=i.createURL(a.location),N=i.createURL(d),D;if(g&&a.errors){let B=Object.keys(a.errors)[0];D=l.findIndex(F=>F.route.id===B)}else if(R&&ii(R[1])){let B=R[0];D=l.findIndex(F=>F.route.id===B)-1}let H=R?R[1].statusCode:void 0,I=H&&H>=400,U={currentUrl:A,currentParams:a.matches[0]?.params||{},nextUrl:N,nextParams:l[0].params,...c,actionResult:O,actionStatus:H},$=Nd(l),V=l.map((B,F)=>{let{route:q}=B,W=null;if(D!=null&&F>D?W=!1:q.lazy?W=!0:My(q)?g?W=m2(q,a.loaderData,a.errors):kM(a.loaderData,a.matches[F],B)&&(W=!0):W=!1,W!==null)return g2(n,r,e,$,B,f,t,W);let ie=!1;typeof M=="boolean"?ie=M:I?ie=!1:(p||A.pathname+A.search===N.pathname+N.search||A.search!==N.search||TM(a.matches[F],B))&&(ie=!0);let _={...U,defaultShouldRevalidate:ie},z=Gu(B,_);return g2(n,r,e,$,B,f,t,z,_,M)}),G=[];return v.forEach((B,F)=>{if(g||!l.some(ee=>ee.route.id===B.routeId)||x.has(F))return;let q=a.fetchers.get(F),W=q&&q.state!=="idle"&&q.data===void 0,ie=Ra(E,B.path,k);if(!ie){if(T&&W)return;G.push({key:F,routeId:B.routeId,path:B.path,matches:null,match:null,request:null,controller:null});return}if(S.has(F))return;let _=Xh(ie,B.path),z=new AbortController,Y=Bl(i,B.path,z.signal),L=null;if(y.has(F))y.delete(F),L=Wl(n,r,Y,ie,_,f,t);else if(W)p&&(L=Wl(n,r,Y,ie,_,f,t));else{let ee;typeof M=="boolean"?ee=M:I?ee=!1:ee=p;let te={...U,defaultShouldRevalidate:ee};Gu(_,te)&&(L=Wl(n,r,Y,ie,_,f,t,te))}L&&G.push({key:F,routeId:B.routeId,path:B.path,matches:L,match:_,request:Y,controller:z})}),{dsMatches:V,revalidatingFetchers:G}}function My(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function m2(e,t,n){if(e.lazy)return!0;if(!My(e))return!1;let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function kM(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function TM(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Gu(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function tS(e,t,n,r,i,a){let l;if(e){let f=r[e];Ct(f,`No route found to patch children into: routeId = ${e}`),f.children||(f.children=[]),l=f.children}else l=n;let c=[],d=[];if(t.forEach(f=>{let g=l.find(p=>Ek(f,p));g?d.push({existingRoute:g,newRoute:f}):c.push(f)}),c.length>0){let f=od(c,i,[e||"_","patch",String(l?.length||"0")],r);l.push(...f)}if(a&&d.length>0)for(let f=0;f<d.length;f++){let{existingRoute:g,newRoute:p}=d[f],y=g,[x]=od([p],i,[],{},!0);Object.assign(y,{element:x.element?x.element:y.element,errorElement:x.errorElement?x.errorElement:y.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:y.hydrateFallbackElement})}}function Ek(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>t.children?.some(i=>Ek(n,i))):!1}var nS=new WeakMap,kk=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(Ct(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let a=i.lazy[e];if(!a)return;let l=nS.get(i);l||(l={},nS.set(i,l));let c=l[e];if(c)return c;let d=(async()=>{let f=qO(e),p=i[e]!==void 0&&e!=="hasErrorBoundary";if(f)An(!f,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),l[e]=Promise.resolve();else if(p)An(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await a();y!=null&&(Object.assign(i,{[e]:y}),Object.assign(i,r(i)))}typeof i.lazy=="object"&&(i.lazy[e]=void 0,Object.values(i.lazy).every(y=>y===void 0)&&(i.lazy=void 0))})();return l[e]=d,d},rS=new WeakMap;function NM(e,t,n,r,i){let a=n[e.id];if(Ct(a,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=rS.get(a);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let p=(async()=>{Ct(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),x={};for(let v in y){let S=y[v];if(S===void 0)continue;let E=$O(v),T=a[v]!==void 0&&v!=="hasErrorBoundary";E?An(!E,"Route property "+v+" is not a supported property to be returned from a lazy route function. This property will be ignored."):T?An(!T,`Route "${a.id}" has a static property "${v}" defined but its lazy function is also returning a value for this property. The lazy route property "${v}" will be ignored.`):x[v]=S}Object.assign(a,x),Object.assign(a,{...r(a),lazy:void 0})})();return rS.set(a,p),p.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:p}}let l=Object.keys(e.lazy),c=[],d;for(let g of l){if(i&&i.includes(g))continue;let p=kk({key:g,route:e,manifest:n,mapRouteProperties:r});p&&(c.push(p),g===t&&(d=p))}let f=c.length>0?Promise.all(c).then(()=>{}):void 0;return f?.catch(()=>{}),d?.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:d}}async function iS(e){let t=e.matches.filter(i=>i.shouldLoad),n={};return(await Promise.all(t.map(i=>i.resolve()))).forEach((i,a)=>{n[t[a].route.id]=i}),n}async function RM(e){return e.matches.some(t=>t.route.middleware)?Tk(e,()=>iS(e)):iS(e)}function Tk(e,t){return AM(e,t,r=>{if(UM(r))throw r;return r},PM,n);function n(r,i,a){if(a)return Promise.resolve(Object.assign(a.value,{[i]:{type:"error",result:r}}));{let{matches:l}=e,c=Math.min(Math.max(l.findIndex(f=>f.route.id===i),0),Math.max(l.findIndex(f=>f.shouldCallHandler()),0)),d=Aa(l,l[c].route.id).route.id;return Promise.resolve({[d]:{type:"error",result:r}})}}}async function AM(e,t,n,r,i){let{matches:a,request:l,params:c,context:d,unstable_pattern:f}=e,g=a.flatMap(y=>y.route.middleware?y.route.middleware.map(x=>[y.route.id,x]):[]);return await Nk({request:l,params:c,context:d,unstable_pattern:f},g,t,n,r,i)}async function Nk(e,t,n,r,i,a,l=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let d=t[l];if(!d)return await n();let[f,g]=d,p,y=async()=>{if(p)throw new Error("You may only call `next()` once per middleware");try{return p={value:await Nk(e,t,n,r,i,a,l+1)},p.value}catch(x){return p={value:await a(x,f,p)},p.value}};try{let x=await g(e,y),v=x!=null?r(x):void 0;return i(v)?v:p?v??p.value:(p={value:await y()},p.value)}catch(x){return await a(x,f,p)}}function Rk(e,t,n,r,i){let a=kk({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),l=NM(r.route,xr(n.method)?"action":"loader",t,e,i);return{middleware:a,route:l.lazyRoutePromise,handler:l.lazyHandlerPromise}}function g2(e,t,n,r,i,a,l,c,d=null,f){let g=!1,p=Rk(e,t,n,i,a);return{...i,_lazyPromises:p,shouldLoad:c,shouldRevalidateArgs:d,shouldCallHandler(y){return g=!0,d?typeof f=="boolean"?Gu(i,{...d,defaultShouldRevalidate:f}):typeof y=="boolean"?Gu(i,{...d,defaultShouldRevalidate:y}):Gu(i,d):c},resolve(y){let{lazy:x,loader:v,middleware:S}=i.route,E=g||c||y&&!xr(n.method)&&(x||v),k=S&&S.length>0&&!v&&!x;return E&&(xr(n.method)||!k)?OM({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:p?.handler,lazyRoutePromise:p?.route,handlerOverride:y,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function Wl(e,t,n,r,i,a,l,c=null){return r.map(d=>d.route.id!==i.route.id?{...d,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Rk(e,t,n,d,a),resolve:()=>Promise.resolve({type:"data",result:void 0})}:g2(e,t,n,Nd(r),d,a,l,!0,c))}async function jM(e,t,n,r,i,a){n.some(f=>f._lazyPromises?.middleware)&&await Promise.all(n.map(f=>f._lazyPromises?.middleware));let l={request:t,unstable_pattern:Nd(n),params:n[0].params,context:i,matches:n},d=await e({...l,fetcherKey:r,runClientMiddleware:f=>{let g=l;return Tk(g,()=>f({...g,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(f=>[f._lazyPromises?.handler,f._lazyPromises?.route]))}catch{}return d}async function OM({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:i,handlerOverride:a,scopedContext:l}){let c,d,f=xr(e.method),g=f?"action":"loader",p=y=>{let x,v=new Promise((k,T)=>x=T);d=()=>x(),e.signal.addEventListener("abort",d);let S=k=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${n.route.id}]`)):y({request:e,unstable_pattern:t,params:n.params,context:l},...k!==void 0?[k]:[]),E=(async()=>{try{return{type:"data",result:await(a?a(T=>S(T)):S())}}catch(k){return{type:"error",result:k}}})();return Promise.race([E,v])};try{let y=f?n.route.action:n.route.loader;if(r||i)if(y){let x,[v]=await Promise.all([p(y).catch(S=>{x=S}),r,i]);if(x!==void 0)throw x;c=v}else{await r;let x=f?n.route.action:n.route.loader;if(x)[c]=await Promise.all([p(x),i]);else if(g==="action"){let v=new URL(e.url),S=v.pathname+v.search;throw Ri(405,{method:e.method,pathname:S,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(y)c=await p(y);else{let x=new URL(e.url),v=x.pathname+x.search;throw Ri(404,{pathname:v})}}catch(y){return{type:"error",result:y}}finally{d&&e.signal.removeEventListener("abort",d)}return c}async function MM(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function LM(e){let{result:t,type:n}=e;if(Ly(t)){let r;try{r=await MM(t)}catch(i){return{type:"error",error:i}}return n==="error"?{type:"error",error:new Td(t.status,t.statusText,r),statusCode:t.status,headers:t.headers}:{type:"data",data:r,statusCode:t.status,headers:t.headers}}return n==="error"?uS(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:zM(t),statusCode:ad(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ad(t)?t.status:void 0}:uS(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function _M(e,t,n,r,i){let a=e.headers.get("Location");if(Ct(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!Oy(a)){let l=r.slice(0,r.findIndex(c=>c.route.id===n)+1);a=p2(new URL(t.url),l,i,a),e.headers.set("Location",a)}return e}function oS(e,t,n,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Oy(e)){let a=e,l=a.startsWith("//")?new URL(t.protocol+a):new URL(a);if(i.includes(l.protocol))throw new Error("Invalid redirect location");let c=Di(l.pathname,n)!=null;if(l.origin===t.origin&&c)return l.pathname+l.search+l.hash}try{let a=r.createURL(e);if(i.includes(a.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Bl(e,t,n,r){let i=e.createURL(Ak(t)).toString(),a={signal:n};if(r&&xr(r.formMethod)){let{formMethod:l,formEncType:c}=r;a.method=l.toUpperCase(),c==="application/json"?(a.headers=new Headers({"Content-Type":c}),a.body=JSON.stringify(r.json)):c==="text/plain"?a.body=r.text:c==="application/x-www-form-urlencoded"&&r.formData?a.body=y2(r.formData):a.body=r.formData}return new Request(i,a)}function y2(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function aS(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function DM(e,t,n,r=!1,i=!1){let a={},l=null,c,d=!1,f={},g=n&&ii(n[1])?n[1].error:void 0;return e.forEach(p=>{if(!(p.route.id in t))return;let y=p.route.id,x=t[y];if(Ct(!As(x),"Cannot handle redirect results in processLoaderData"),ii(x)){let v=x.error;if(g!==void 0&&(v=g,g=void 0),l=l||{},i)l[y]=v;else{let S=Aa(e,y);l[S.route.id]==null&&(l[S.route.id]=v)}r||(a[y]=Ck),d||(d=!0,c=ad(x.error)?x.error.status:500),x.headers&&(f[y]=x.headers)}else a[y]=x.data,x.statusCode&&x.statusCode!==200&&!d&&(c=x.statusCode),x.headers&&(f[y]=x.headers)}),g!==void 0&&n&&(l={[n[0]]:g},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:l,statusCode:c||200,loaderHeaders:f}}function sS(e,t,n,r,i,a){let{loaderData:l,errors:c}=DM(t,n,r);return i.filter(d=>!d.matches||d.matches.some(f=>f.shouldLoad)).forEach(d=>{let{key:f,match:g,controller:p}=d;if(p&&p.signal.aborted)return;let y=a[f];if(Ct(y,"Did not find corresponding fetcher result"),ii(y)){let x=Aa(e.matches,g?.route.id);c&&c[x.route.id]||(c={...c,[x.route.id]:y.error}),e.fetchers.delete(f)}else if(As(y))Ct(!1,"Unhandled fetcher revalidation redirect");else{let x=Fo(y.data);e.fetchers.set(f,x)}}),{loaderData:l,errors:c}}function lS(e,t,n,r){let i=Object.entries(t).filter(([,a])=>a!==Ck).reduce((a,[l,c])=>(a[l]=c,a),{});for(let a of n){let l=a.route.id;if(!t.hasOwnProperty(l)&&e.hasOwnProperty(l)&&a.route.loader&&(i[l]=e[l]),r&&r.hasOwnProperty(l))break}return i}function cS(e){return e?ii(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Aa(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function bh(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ri(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="Bad Request",r&&t&&n?c=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i==="invalid-body"&&(c="Unable to encode submission body")):e===403?(l="Forbidden",c=`Route "${n}" does not match URL "${t}"`):e===404?(l="Not Found",c=`No route matches URL "${t}"`):e===405&&(l="Method Not Allowed",r&&t&&n?c=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(c=`Invalid request method "${r.toUpperCase()}"`)),new Td(e||500,l,new Error(c),!0)}function vh(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(As(i))return{key:r,result:i}}}function Ak(e){let t=typeof e=="string"?Ga(e):e;return ho({...t,hash:""})}function IM(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function zM(e){return new Td(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function PM(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&FM(n))}function FM(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function BM(e){return Ly(e.result)&&wk.has(e.result.status)}function ii(e){return e.type==="error"}function As(e){return(e&&e.type)==="redirect"}function uS(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ly(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function HM(e){return wk.has(e)}function UM(e){return Ly(e)&&HM(e.status)&&e.headers.has("Location")}function qM(e){return bM.has(e.toUpperCase())}function xr(e){return yM.has(e.toUpperCase())}function _y(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Xh(e,t){let n=typeof t=="string"?Ga(t).search:t.search;if(e[e.length-1].route.index&&_y(n||""))return e[e.length-1];let r=gk(e);return r[r.length-1]}function dS(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:l}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function l1(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function VM(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function vu(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function $M(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Fo(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function GM(e,t){try{let n=e.sessionStorage.getItem(Sk);if(n){let r=JSON.parse(n);for(let[i,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(i,new Set(a||[]))}}catch{}}function YM(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(Sk,JSON.stringify(n))}catch(r){An(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function fS(){let e,t,n=new Promise((r,i)=>{e=async a=>{r(a);try{await n}catch{}},t=async a=>{i(a);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Us=C.createContext(null);Us.displayName="DataRouter";var Rd=C.createContext(null);Rd.displayName="DataRouterState";var jk=C.createContext(!1);function WM(){return C.useContext(jk)}var Dy=C.createContext({isTransitioning:!1});Dy.displayName="ViewTransition";var Ok=C.createContext(new Map);Ok.displayName="Fetchers";var KM=C.createContext(null);KM.displayName="Await";var mi=C.createContext(null);mi.displayName="Navigation";var sm=C.createContext(null);sm.displayName="Location";var Xi=C.createContext({outlet:null,matches:[],isDataRoute:!1});Xi.displayName="Route";var Iy=C.createContext(null);Iy.displayName="RouteError";var Mk="REACT_ROUTER_ERROR",QM="REDIRECT",XM="ROUTE_ERROR_RESPONSE";function ZM(e){if(e.startsWith(`${Mk}:${QM}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function JM(e){if(e.startsWith(`${Mk}:${XM}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Td(t.status,t.statusText,t.data)}catch{}}function eL(e,{relative:t}={}){Ct(mc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=C.useContext(mi),{hash:i,pathname:a,search:l}=Ad(e,{relative:t}),c=a;return n!=="/"&&(c=a==="/"?n:ao([n,a])),r.createHref({pathname:c,search:l,hash:i})}function mc(){return C.useContext(sm)!=null}function zi(){return Ct(mc(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(sm).location}var Lk="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _k(e){C.useContext(mi).static||C.useLayoutEffect(e)}function qs(){let{isDataRoute:e}=C.useContext(Xi);return e?mL():tL()}function tL(){Ct(mc(),"useNavigate() may be used only in the context of a <Router> component.");let e=C.useContext(Us),{basename:t,navigator:n}=C.useContext(mi),{matches:r}=C.useContext(Xi),{pathname:i}=zi(),a=JSON.stringify(om(r)),l=C.useRef(!1);return _k(()=>{l.current=!0}),C.useCallback((d,f={})=>{if(An(l.current,Lk),!l.current)return;if(typeof d=="number"){n.go(d);return}let g=am(d,JSON.parse(a),i,f.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:ao([t,g.pathname])),(f.replace?n.replace:n.push)(g,f.state,f)},[t,n,a,i,e])}var nL=C.createContext(null);function rL(e){let t=C.useContext(Xi).outlet;return C.useMemo(()=>t&&C.createElement(nL.Provider,{value:e},t),[t,e])}function Ad(e,{relative:t}={}){let{matches:n}=C.useContext(Xi),{pathname:r}=zi(),i=JSON.stringify(om(n));return C.useMemo(()=>am(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function iL(e,t,n,r,i){Ct(mc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=C.useContext(mi),{matches:l}=C.useContext(Xi),c=l[l.length-1],d=c?c.params:{},f=c?c.pathname:"/",g=c?c.pathnameBase:"/",p=c&&c.route;{let T=p&&p.path||"";Ik(f,!p||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
+
12
+ Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let y=zi(),x;x=y;let v=x.pathname||"/",S=v;if(g!=="/"){let T=g.replace(/^\//,"").split("/");S="/"+v.replace(/^\//,"").split("/").slice(T.length).join("/")}let E=Ra(e,{pathname:S});return An(p||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),An(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),cL(E&&E.map(T=>Object.assign({},T,{params:Object.assign({},d,T.params),pathname:ao([g,a.encodeLocation?a.encodeLocation(T.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?g:ao([g,a.encodeLocation?a.encodeLocation(T.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),l,n,r,i)}function oL(){let e=pL(),t=ad(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:a},"ErrorBoundary")," or"," ",C.createElement("code",{style:a},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:i},n):null,l)}var aL=C.createElement(oL,null),Dk=class extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=JM(e.digest);n&&(e=n)}let t=e!==void 0?C.createElement(Xi.Provider,{value:this.props.routeContext},C.createElement(Iy.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?C.createElement(sL,{error:e},t):t}};Dk.contextType=jk;var c1=new WeakMap;function sL({children:e,error:t}){let{basename:n}=C.useContext(mi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=ZM(t.digest);if(r){let i=c1.get(t);if(i)throw i;let a=xk(r.location,n);if(yk&&!c1.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw c1.set(t,l),l}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function lL({routeContext:e,match:t,children:n}){let r=C.useContext(Us);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),C.createElement(Xi.Provider,{value:e},n)}function cL(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=n?.errors;if(l!=null){let g=a.findIndex(p=>p.route.id&&l?.[p.route.id]!==void 0);Ct(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),a=a.slice(0,Math.min(a.length,g+1))}let c=!1,d=-1;if(n)for(let g=0;g<a.length;g++){let p=a[g];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=g),p.route.id){let{loaderData:y,errors:x}=n,v=p.route.loader&&!y.hasOwnProperty(p.route.id)&&(!x||x[p.route.id]===void 0);if(p.route.lazy||v){c=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}let f=n&&r?(g,p)=>{r(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Nd(n.matches),errorInfo:p})}:void 0;return a.reduceRight((g,p,y)=>{let x,v=!1,S=null,E=null;n&&(x=l&&p.route.id?l[p.route.id]:void 0,S=p.route.errorElement||aL,c&&(d<0&&y===0?(Ik("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,E=null):d===y&&(v=!0,E=p.route.hydrateFallbackElement||null)));let k=t.concat(a.slice(0,y+1)),T=()=>{let R;return x?R=S:v?R=E:p.route.Component?R=C.createElement(p.route.Component,null):p.route.element?R=p.route.element:R=g,C.createElement(lL,{match:p,routeContext:{outlet:g,matches:k,isDataRoute:n!=null},children:R})};return n&&(p.route.ErrorBoundary||p.route.errorElement||y===0)?C.createElement(Dk,{location:n.location,revalidation:n.revalidation,component:S,error:x,children:T(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:f}):T()},null)}function zy(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uL(e){let t=C.useContext(Us);return Ct(t,zy(e)),t}function dL(e){let t=C.useContext(Rd);return Ct(t,zy(e)),t}function fL(e){let t=C.useContext(Xi);return Ct(t,zy(e)),t}function Py(e){let t=fL(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function hL(){return Py("useRouteId")}function pL(){let e=C.useContext(Iy),t=dL("useRouteError"),n=Py("useRouteError");return e!==void 0?e:t.errors?.[n]}function mL(){let{router:e}=uL("useNavigate"),t=Py("useNavigate"),n=C.useRef(!1);return _k(()=>{n.current=!0}),C.useCallback(async(i,a={})=>{An(n.current,Lk),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var hS={};function Ik(e,t,n){!t&&!hS[e]&&(hS[e]=!0,An(!1,n))}var pS={};function mS(e,t){!e&&!pS[t]&&(pS[t]=!0,console.warn(t))}var gL="useOptimistic",gS=jy[gL],yL=()=>{};function xL(e){return gS?gS(e):[e,yL]}function bL(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&An(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:C.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&An(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&An(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var vL=["HydrateFallback","hydrateFallbackElement"],wL=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function SL({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=WM()||r;let[a,l]=C.useState(e.state),[c,d]=xL(a),[f,g]=C.useState(),[p,y]=C.useState({isTransitioning:!1}),[x,v]=C.useState(),[S,E]=C.useState(),[k,T]=C.useState(),R=C.useRef(new Map),M=C.useCallback((D,{deletedFetchers:H,newErrors:I,flushSync:U,viewTransitionOpts:$})=>{I&&n&&Object.values(I).forEach(G=>n(G,{location:D.location,params:D.matches[0]?.params??{},unstable_pattern:Nd(D.matches)})),D.fetchers.forEach((G,B)=>{G.data!==void 0&&R.current.set(B,G.data)}),H.forEach(G=>R.current.delete(G)),mS(U===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let V=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(mS($==null||V,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!$||!V){t&&U?t(()=>l(D)):r===!1?l(D):C.startTransition(()=>{r===!0&&d(G=>yS(G,D)),l(D)});return}if(t&&U){t(()=>{S&&(x?.resolve(),S.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:$.currentLocation,nextLocation:$.nextLocation})});let G=e.window.document.startViewTransition(()=>{t(()=>l(D))});G.finished.finally(()=>{t(()=>{v(void 0),E(void 0),g(void 0),y({isTransitioning:!1})})}),t(()=>E(G));return}S?(x?.resolve(),S.skipTransition(),T({state:D,currentLocation:$.currentLocation,nextLocation:$.nextLocation})):(g(D),y({isTransitioning:!0,flushSync:!1,currentLocation:$.currentLocation,nextLocation:$.nextLocation}))},[e.window,t,S,x,r,d,n]);C.useLayoutEffect(()=>e.subscribe(M),[e,M]),C.useEffect(()=>{p.isTransitioning&&!p.flushSync&&v(new wL)},[p]),C.useEffect(()=>{if(x&&f&&e.window){let D=f,H=x.promise,I=e.window.document.startViewTransition(async()=>{r===!1?l(D):C.startTransition(()=>{r===!0&&d(U=>yS(U,D)),l(D)}),await H});I.finished.finally(()=>{v(void 0),E(void 0),g(void 0),y({isTransitioning:!1})}),E(I)}},[f,x,e.window,r,d]),C.useEffect(()=>{x&&f&&c.location.key===f.location.key&&x.resolve()},[x,S,c.location,f]),C.useEffect(()=>{!p.isTransitioning&&k&&(g(k.state),y({isTransitioning:!0,flushSync:!1,currentLocation:k.currentLocation,nextLocation:k.nextLocation}),T(void 0))},[p.isTransitioning,k]);let O=C.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:D=>e.navigate(D),push:(D,H,I)=>e.navigate(D,{state:H,preventScrollReset:I?.preventScrollReset}),replace:(D,H,I)=>e.navigate(D,{replace:!0,state:H,preventScrollReset:I?.preventScrollReset})}),[e]),A=e.basename||"/",N=C.useMemo(()=>({router:e,navigator:O,static:!1,basename:A,onError:n}),[e,O,A,n]);return C.createElement(C.Fragment,null,C.createElement(Us.Provider,{value:N},C.createElement(Rd.Provider,{value:c},C.createElement(Ok.Provider,{value:R.current},C.createElement(Dy.Provider,{value:p},C.createElement(kL,{basename:A,location:c.location,navigationType:c.historyAction,navigator:O,unstable_useTransitions:r},C.createElement(CL,{routes:e.routes,future:e.future,state:c,onError:n})))))),null)}function yS(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var CL=C.memo(EL);function EL({routes:e,future:t,state:n,onError:r}){return iL(e,void 0,n,r,t)}function zk({to:e,replace:t,state:n,relative:r}){Ct(mc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=C.useContext(mi);An(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=C.useContext(Xi),{pathname:l}=zi(),c=qs(),d=am(e,om(a),l,r==="path"),f=JSON.stringify(d);return C.useEffect(()=>{c(JSON.parse(f),{replace:t,state:n,relative:r})},[c,f,r,t,n]),null}function Pk(e){return rL(e.context)}function kL({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:a=!1,unstable_useTransitions:l}){Ct(!mc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),d=C.useMemo(()=>({basename:c,navigator:i,static:a,unstable_useTransitions:l,future:{}}),[c,i,a,l]);typeof n=="string"&&(n=Ga(n));let{pathname:f="/",search:g="",hash:p="",state:y=null,key:x="default"}=n,v=C.useMemo(()=>{let S=Di(f,c);return S==null?null:{location:{pathname:S,search:g,hash:p,state:y,key:x},navigationType:r}},[c,f,g,p,y,x,r]);return An(v!=null,`<Router basename="${c}"> is not able to match the URL "${f}${g}${p}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:C.createElement(mi.Provider,{value:d},C.createElement(sm.Provider,{children:t,value:v}))}var Zh="get",Jh="application/x-www-form-urlencoded";function lm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function TL(e){return lm(e)&&e.tagName.toLowerCase()==="button"}function NL(e){return lm(e)&&e.tagName.toLowerCase()==="form"}function RL(e){return lm(e)&&e.tagName.toLowerCase()==="input"}function AL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jL(e,t){return e.button===0&&(!t||t==="_self")&&!AL(e)}function x2(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function OL(e,t){let n=x2(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}var wh=null;function ML(){if(wh===null)try{new FormData(document.createElement("form"),0),wh=!1}catch{wh=!0}return wh}var LL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function u1(e){return e!=null&&!LL.has(e)?(An(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jh}"`),null):e}function _L(e,t){let n,r,i,a,l;if(NL(e)){let c=e.getAttribute("action");r=c?Di(c,t):null,n=e.getAttribute("method")||Zh,i=u1(e.getAttribute("enctype"))||Jh,a=new FormData(e)}else if(TL(e)||RL(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||c.getAttribute("action");if(r=d?Di(d,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Zh,i=u1(e.getAttribute("formenctype"))||u1(c.getAttribute("enctype"))||Jh,a=new FormData(c,e),!ML()){let{name:f,type:g,value:p}=e;if(g==="image"){let y=f?`${f}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else f&&a.append(f,p)}}else{if(lm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Zh,r=null,i=Jh,l=e}return a&&i==="text/plain"&&(l=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fy(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function DL(e,t,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:t&&Di(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function IL(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function zL(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function PL(e,t,n){let r=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let l=await IL(a,n);return l.links?l.links():[]}return[]}));return UL(r.flat(1).filter(zL).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function xS(e,t,n,r,i,a){let l=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,c=(d,f)=>n[f].pathname!==d.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==d.params["*"];return a==="assets"?t.filter((d,f)=>l(d,f)||c(d,f)):a==="data"?t.filter((d,f)=>{let g=r.routes[d.route.id];if(!g||!g.hasLoader)return!1;if(l(d,f)||c(d,f))return!0;if(d.route.shouldRevalidate){let p=d.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function FL(e,t,{includeHydrateFallback:n}={}){return BL(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function BL(e){return[...new Set(e)]}function HL(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function UL(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let a=JSON.stringify(HL(i));return n.has(a)||(n.add(a),r.push({key:a,link:i})),r},[])}function Fk(){let e=C.useContext(Us);return Fy(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function qL(){let e=C.useContext(Rd);return Fy(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var By=C.createContext(void 0);By.displayName="FrameworkContext";function Bk(){let e=C.useContext(By);return Fy(e,"You must render this element inside a <HydratedRouter> element"),e}function VL(e,t){let n=C.useContext(By),[r,i]=C.useState(!1),[a,l]=C.useState(!1),{onFocus:c,onBlur:d,onMouseEnter:f,onMouseLeave:g,onTouchStart:p}=t,y=C.useRef(null);C.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=k=>{k.forEach(T=>{l(T.isIntersecting)})},E=new IntersectionObserver(S,{threshold:.5});return y.current&&E.observe(y.current),()=>{E.disconnect()}}},[e]),C.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let x=()=>{i(!0)},v=()=>{i(!1),l(!1)};return n?e!=="intent"?[a,y,{}]:[a,y,{onFocus:wu(c,x),onBlur:wu(d,v),onMouseEnter:wu(f,x),onMouseLeave:wu(g,v),onTouchStart:wu(p,x)}]:[!1,y,{}]}function wu(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $L({page:e,...t}){let{router:n}=Fk(),r=C.useMemo(()=>Ra(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?C.createElement(YL,{page:e,matches:r,...t}):null}function GL(e){let{manifest:t,routeModules:n}=Bk(),[r,i]=C.useState([]);return C.useEffect(()=>{let a=!1;return PL(e,t,n).then(l=>{a||i(l)}),()=>{a=!0}},[e,t,n]),r}function YL({page:e,matches:t,...n}){let r=zi(),{future:i,manifest:a,routeModules:l}=Bk(),{basename:c}=Fk(),{loaderData:d,matches:f}=qL(),g=C.useMemo(()=>xS(e,t,f,a,r,"data"),[e,t,f,a,r]),p=C.useMemo(()=>xS(e,t,f,a,r,"assets"),[e,t,f,a,r]),y=C.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,E=!1;if(t.forEach(T=>{let R=a.routes[T.route.id];!R||!R.hasLoader||(!g.some(M=>M.route.id===T.route.id)&&T.route.id in d&&l[T.route.id]?.shouldRevalidate||R.hasClientLoader?E=!0:S.add(T.route.id))}),S.size===0)return[];let k=DL(e,c,i.unstable_trailingSlashAwareDataRequests,"data");return E&&S.size>0&&k.searchParams.set("_routes",t.filter(T=>S.has(T.route.id)).map(T=>T.route.id).join(",")),[k.pathname+k.search]},[c,i.unstable_trailingSlashAwareDataRequests,d,r,a,g,t,e,l]),x=C.useMemo(()=>FL(p,a),[p,a]),v=GL(p);return C.createElement(C.Fragment,null,y.map(S=>C.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),x.map(S=>C.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),v.map(({key:S,link:E})=>C.createElement("link",{key:S,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function WL(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var KL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{KL&&(window.__reactRouterVersion="7.13.0")}catch{}function QL(e,t){return CM({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:FO({window:t?.window}),hydrationData:XL(),routes:e,mapRouteProperties:bL,hydrationRouteProperties:vL,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function XL(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:ZL(e.errors)}),e}function ZL(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Td(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let l=new a(i.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let a=new Error(i.message);a.stack="",n[r]=a}}else n[r]=i;return n}var Hk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hy=C.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:l,state:c,target:d,to:f,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:y,...x},v){let{basename:S,unstable_useTransitions:E}=C.useContext(mi),k=typeof f=="string"&&Hk.test(f),T=xk(f,S);f=T.to;let R=eL(f,{relative:i}),[M,O,A]=VL(r,x),N=t_(f,{replace:l,state:c,target:d,preventScrollReset:g,relative:i,viewTransition:p,unstable_defaultShouldRevalidate:y,unstable_useTransitions:E});function D(I){t&&t(I),I.defaultPrevented||N(I)}let H=C.createElement("a",{...x,...A,href:T.absoluteURL||R,onClick:T.isExternal||a?t:D,ref:WL(v,O),target:d,"data-discover":!k&&n==="render"?"true":void 0});return M&&!k?C.createElement(C.Fragment,null,H,C.createElement($L,{page:R})):H});Hy.displayName="Link";var Uk=C.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:l,viewTransition:c,children:d,...f},g){let p=Ad(l,{relative:f.relative}),y=zi(),x=C.useContext(Rd),{navigator:v,basename:S}=C.useContext(mi),E=x!=null&&a_(p)&&c===!0,k=v.encodeLocation?v.encodeLocation(p).pathname:p.pathname,T=y.pathname,R=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(T=T.toLowerCase(),R=R?R.toLowerCase():null,k=k.toLowerCase()),R&&S&&(R=Di(R,S)||R);const M=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let O=T===k||!i&&T.startsWith(k)&&T.charAt(M)==="/",A=R!=null&&(R===k||!i&&R.startsWith(k)&&R.charAt(k.length)==="/"),N={isActive:O,isPending:A,isTransitioning:E},D=O?t:void 0,H;typeof r=="function"?H=r(N):H=[r,O?"active":null,A?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let I=typeof a=="function"?a(N):a;return C.createElement(Hy,{...f,"aria-current":D,className:H,ref:g,style:I,to:l,viewTransition:c},typeof d=="function"?d(N):d)});Uk.displayName="NavLink";var JL=C.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:l=Zh,action:c,onSubmit:d,relative:f,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:y,...x},v)=>{let{unstable_useTransitions:S}=C.useContext(mi),E=i_(),k=o_(c,{relative:f}),T=l.toLowerCase()==="get"?"get":"post",R=typeof c=="string"&&Hk.test(c),M=O=>{if(d&&d(O),O.defaultPrevented)return;O.preventDefault();let A=O.nativeEvent.submitter,N=A?.getAttribute("formmethod")||l,D=()=>E(A||O.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:i,state:a,relative:f,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:y});S&&n!==!1?C.startTransition(()=>D()):D()};return C.createElement("form",{ref:v,method:T,action:k,onSubmit:r?d:M,...x,"data-discover":!R&&e==="render"?"true":void 0})});JL.displayName="Form";function e_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qk(e){let t=C.useContext(Us);return Ct(t,e_(e)),t}function t_(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:d}={}){let f=qs(),g=zi(),p=Ad(e,{relative:a});return C.useCallback(y=>{if(jL(y,t)){y.preventDefault();let x=n!==void 0?n:ho(g)===ho(p),v=()=>f(e,{replace:x,state:r,preventScrollReset:i,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:c});d?C.startTransition(()=>v()):v()}},[g,f,p,n,r,t,e,i,a,l,c,d])}function Uy(e){An(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=C.useRef(x2(e)),n=C.useRef(!1),r=zi(),i=C.useMemo(()=>OL(r.search,n.current?null:t.current),[r.search]),a=qs(),l=C.useCallback((c,d)=>{const f=x2(typeof c=="function"?c(new URLSearchParams(i)):c);n.current=!0,a("?"+f,d)},[a,i]);return[i,l]}var n_=0,r_=()=>`__${String(++n_)}__`;function i_(){let{router:e}=qk("useSubmit"),{basename:t}=C.useContext(mi),n=hL(),r=e.fetch,i=e.navigate;return C.useCallback(async(a,l={})=>{let{action:c,method:d,encType:f,formData:g,body:p}=_L(a,t);if(l.navigate===!1){let y=l.fetcherKey||r_();await r(y,n,l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:p,formMethod:l.method||d,formEncType:l.encType||f,flushSync:l.flushSync})}else await i(l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:p,formMethod:l.method||d,formEncType:l.encType||f,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,i,t,n])}function o_(e,{relative:t}={}){let{basename:n}=C.useContext(mi),r=C.useContext(Xi);Ct(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),a={...Ad(e||".",{relative:t})},l=zi();if(e==null){a.search=l.search;let c=new URLSearchParams(a.search),d=c.getAll("index");if(d.some(g=>g==="")){c.delete("index"),d.filter(p=>p).forEach(p=>c.append("index",p));let g=c.toString();a.search=g?`?${g}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:ao([n,a.pathname])),ho(a)}function a_(e,{relative:t}={}){let n=C.useContext(Dy);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=qk("useViewTransitionState"),i=Ad(e,{relative:t});if(!n.isTransitioning)return!1;let a=Di(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Di(n.nextLocation.pathname,r)||n.nextLocation.pathname;return yp(i.pathname,l)!=null||yp(i.pathname,a)!=null}function s_(e){return C.createElement(SL,{flushSync:_i.flushSync,...e})}const bS={};function Jn(e,t){const n=C.useRef(bS);return n.current===bS&&(n.current=e(t)),n}const b2=[];let v2;function l_(){return v2}function c_(e){b2.push(e)}function qy(e){const t=(n,r)=>{const i=Jn(u_).current;let a;try{v2=i;for(const l of b2)l.before(i);a=e(n,r);for(const l of b2)l.after(i);i.didInitialize=!0}finally{v2=void 0}return a};return t.displayName=e.displayName||e.name,t}function Vk(e){return C.forwardRef(qy(e))}function u_(){return{didInitialize:!1}}function Vy(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}const d_=()=>{},qe=typeof document<"u"?C.useLayoutEffect:d_;function f_(e,t){return function(r,...i){const a=new URL(e);return a.searchParams.set("code",r.toString()),i.forEach(l=>a.searchParams.append("args[]",l)),`${t} error #${r}; visit ${a} for the full message.`}}const Yn=f_("https://base-ui.com/production-error","Base UI"),$k=C.createContext(void 0);function jd(e){const t=C.useContext($k);if(t===void 0&&!e)throw new Error(Yn(72));return t}const h_=[];function $y(e){C.useEffect(e,h_)}const Su=0;class Ki{static create(){return new Ki}currentId=Su;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Su,n()},t)}isStarted(){return this.currentId!==Su}clear=()=>{this.currentId!==Su&&(clearTimeout(this.currentId),this.currentId=Su)};disposeEffect=()=>this.clear}function Lr(){const e=Jn(Ki.create).current;return $y(e.disposeEffect),e}function cm(){return typeof window<"u"}function Ya(e){return Gy(e)?(e.nodeName||"").toLowerCase():"#document"}function Gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function go(e){var t;return(t=(Gy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gy(e){return cm()?e instanceof Node||e instanceof Gn(e).Node:!1}function Wt(e){return cm()?e instanceof Element||e instanceof Gn(e).Element:!1}function Rn(e){return cm()?e instanceof HTMLElement||e instanceof Gn(e).HTMLElement:!1}function sd(e){return!cm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gn(e).ShadowRoot}function Wa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=fi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function p_(e){return/^(table|td|th)$/.test(Ya(e))}function um(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const m_=/transform|translate|scale|rotate|perspective|filter/,g_=/paint|layout|strict|content/,Cs=e=>!!e&&e!=="none";let d1;function Yy(e){const t=Wt(e)?fi(e):e;return Cs(t.transform)||Cs(t.translate)||Cs(t.scale)||Cs(t.rotate)||Cs(t.perspective)||!dm()&&(Cs(t.backdropFilter)||Cs(t.filter))||m_.test(t.willChange||"")||g_.test(t.contain||"")}function y_(e){let t=po(e);for(;Rn(t)&&!so(t);){if(Yy(t))return t;if(um(t))return null;t=po(t)}return null}function dm(){return d1==null&&(d1=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),d1}function so(e){return/^(html|body|#document)$/.test(Ya(e))}function fi(e){return Gn(e).getComputedStyle(e)}function fm(e){return Wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function po(e){if(Ya(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sd(e)&&e.host||go(e);return sd(t)?t.host:t}function Gk(e){const t=po(e);return so(t)?e.ownerDocument?e.ownerDocument.body:e.body:Rn(t)&&Wa(t)?t:Gk(t)}function ld(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Gk(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),l=Gn(i);if(a){const c=w2(l);return t.concat(l,l.visualViewport||[],Wa(i)?i:[],c&&n?ld(c):[])}else return t.concat(i,ld(i,[],n))}function w2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const gc=typeof navigator<"u",f1=x_(),Yk=v_(),Wk=b_(),Kk=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Qk=f1.platform==="MacIntel"&&f1.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(f1.platform),Xk=gc&&/apple/i.test(navigator.vendor),S2=gc&&/android/i.test(Yk)||/android/i.test(Wk),Zk=gc&&Yk.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Jk=Wk.includes("jsdom/");function x_(){if(!gc)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function b_(){if(!gc)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function v_(){if(!gc)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const C2="data-base-ui-focusable",e6="active",t6="selected",n6="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ia="ArrowLeft",za="ArrowRight",Wy="ArrowUp",Od="ArrowDown";function si(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ht(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&sd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function xp(e,t){if(!Wt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ht(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Ar(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Vi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function w_(e){return e.matches("html,body")}function hm(e){return Rn(e)&&e.matches(n6)}function E2(e){return e?e.getAttribute("role")==="combobox"&&hm(e):!1}function S_(e){if(!e||Jk)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function bp(e){return e?e.hasAttribute(C2)?e:e.querySelector(`[${C2}]`)||e:null}function qo(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...qo(e,i.id,n)])}function vS(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(a=>a.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function oi(e){e.preventDefault(),e.stopPropagation()}function C_(e){return"nativeEvent"in e}function r6(e){return e.pointerType===""&&e.isTrusted?!0:S2&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function i6(e){return Jk?!1:!S2&&e.width===0&&e.height===0||S2&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function oc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function o6(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const E_=["top","right","bottom","left"],ac=Math.min,li=Math.max,vp=Math.round,js=Math.floor,lo=e=>({x:e,y:e}),k_={left:"right",right:"left",bottom:"top",top:"bottom"};function k2(e,t,n){return li(e,ac(t,n))}function $o(e,t){return typeof e=="function"?e(t):e}function $r(e){return e.split("-")[0]}function Ka(e){return e.split("-")[1]}function Ky(e){return e==="x"?"y":"x"}function Qy(e){return e==="y"?"height":"width"}function Mi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Xy(e){return Ky(Mi(e))}function T_(e,t,n){n===void 0&&(n=!1);const r=Ka(e),i=Xy(e),a=Qy(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=wp(l)),[l,wp(l)]}function N_(e){const t=wp(e);return[T2(e),t,T2(t)]}function T2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const wS=["left","right"],SS=["right","left"],R_=["top","bottom"],A_=["bottom","top"];function j_(e,t,n){switch(e){case"top":case"bottom":return n?t?SS:wS:t?wS:SS;case"left":case"right":return t?R_:A_;default:return[]}}function O_(e,t,n,r){const i=Ka(e);let a=j_($r(e),n==="start",r);return i&&(a=a.map(l=>l+"-"+i),t&&(a=a.concat(a.map(T2)))),a}function wp(e){const t=$r(e);return k_[t]+e.slice(t.length)}function M_(e){return{top:0,right:0,bottom:0,left:0,...e}}function a6(e){return typeof e!="number"?M_(e):{top:e,right:e,bottom:e,left:e}}function Sp(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Sh(e,t,n){return Math.floor(e/t)!==n}function Cp(e,t){return t<0||t>=e.current.length}function h1(e,t){return Tr(e,{disabledIndices:t})}function CS(e,t){return Tr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Tr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.current.length-1&&Kl(e,a,r));return a}function L_(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:a,disabledIndices:l,minIndex:c,maxIndex:d,prevIndex:f,stopEvent:g=!1}){let p=f,y;if(t.key===Wy?y="up":t.key===Od&&(y="down"),y){const x=[],v=[];let S=!1,E=0;{let D=null,H=-1;e.current.forEach((I,U)=>{if(I==null)return;E+=1;const $=I.closest('[role="row"]');$&&(S=!0),($!==D||H===-1)&&(D=$,H+=1,x[H]=[]),x[H].push(U),v[U]=H})}let k=!1,T=0;if(S)for(const D of x){const H=D.length;H>T&&(T=H),H!==a&&(k=!0)}const R=k&&E<e.current.length,M=T||a,O=D=>{if(!k||f===-1)return;const H=v[f];if(H==null)return;const I=x[H].indexOf(f),U=D==="up"?-1:1;for(let $=H+U,V=0;V<x.length;V+=1,$+=U){if($<0||$>=x.length){if(!r||R)return;$=$<0?x.length-1:0}const G=x[$];for(let B=Math.min(I,G.length-1);B>=0;B-=1){const F=G[B];if(!Kl(e,F,l))return F}}},A=D=>{if(!R||f===-1)return;const H=f%M,I=D==="up"?-M:M,U=d-d%M,$=js(d/M)+1;for(let V=f-H+I,G=0;G<$;G+=1,V+=I){if(V<0||V>d){if(!r)return;V=V<0?U:0}const B=Math.min(V+M-1,d);for(let F=Math.min(V+H,B);F>=V;F-=1)if(!Kl(e,F,l))return F}};g&&oi(t);const N=O(y)??A(y);if(N!==void 0)p=N;else if(f===-1)p=y==="up"?d:c;else if(p=Tr(e,{startingIndex:f,amount:M,decrement:y==="up",disabledIndices:l}),r){if(y==="up"&&(f-M<c||p<0)){const D=f%M,H=d%M,I=d-(H-D);H===D?p=d:p=H>D?I:I-M}y==="down"&&f+M>d&&(p=Tr(e,{startingIndex:f%M-M,amount:M,disabledIndices:l}))}Cp(e,p)&&(p=f)}if(n==="both"){const x=js(f/a);t.key===(i?Ia:za)&&(g&&oi(t),f%a!==a-1?(p=Tr(e,{startingIndex:f,disabledIndices:l}),r&&Sh(p,a,x)&&(p=Tr(e,{startingIndex:f-f%a-1,disabledIndices:l}))):r&&(p=Tr(e,{startingIndex:f-f%a-1,disabledIndices:l})),Sh(p,a,x)&&(p=f)),t.key===(i?za:Ia)&&(g&&oi(t),f%a!==0?(p=Tr(e,{startingIndex:f,decrement:!0,disabledIndices:l}),r&&Sh(p,a,x)&&(p=Tr(e,{startingIndex:f+(a-f%a),decrement:!0,disabledIndices:l}))):r&&(p=Tr(e,{startingIndex:f+(a-f%a),decrement:!0,disabledIndices:l})),Sh(p,a,x)&&(p=f));const v=js(d/a)===x;Cp(e,p)&&(r&&v?p=t.key===(i?za:Ia)?d:Tr(e,{startingIndex:f-f%a-1,disabledIndices:l}):p=f)}return p}function __(e,t,n){const r=[];let i=0;return e.forEach(({width:a,height:l},c)=>{let d=!1;for(;!d;){const f=[];for(let g=0;g<a;g+=1)for(let p=0;p<l;p+=1)f.push(i+g+p*t);i%t+a<=t&&f.every(g=>r[g]==null)?(f.forEach(g=>{r[g]=c}),d=!0):i+=1}}),[...r]}function D_(e,t,n,r,i){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(i){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e);default:return-1}}function I_(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Kl(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const i=e.current[t];return i?Zy(i)?!n&&(i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"):!0:!1}function Zy(e){return fi(e).display!=="none"}var z_=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ep=z_.join(","),s6=typeof Element>"u",sc=s6?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,kp=!s6&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Tp=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",l=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Tp(t.parentNode));return l},P_=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},l6=function(t,n,r){if(Tp(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ep));return n&&sc.call(t,Ep)&&i.unshift(t),i=i.filter(r),i},Np=function(t,n,r){for(var i=[],a=Array.from(t);a.length;){var l=a.shift();if(!Tp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),d=c.length?c:l.children,f=Np(d,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:l,candidates:f})}else{var g=sc.call(l,Ep);g&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var p=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),y=!Tp(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(p&&y){var x=Np(p===!0?l.children:p.children,!0,r);r.flatten?i.push.apply(i,x):i.push({scopeParent:l,candidates:x})}else a.unshift.apply(a,l.children)}}return i},c6=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},u6=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||P_(t))&&!c6(t)?0:t.tabIndex},F_=function(t,n){var r=u6(t);return r<0&&n&&!c6(t)?0:r},B_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},d6=function(t){return t.tagName==="INPUT"},H_=function(t){return d6(t)&&t.type==="hidden"},U_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},q_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},V_=function(t){if(!t.name)return!0;var n=t.form||kp(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=q_(i,t.form);return!a||a===t},$_=function(t){return d6(t)&&t.type==="radio"},G_=function(t){return $_(t)&&!V_(t)},Y_=function(t){var n,r=t&&kp(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,d;for(a=!!((l=i)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(i)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&i;){var f,g,p;r=kp(i),i=(f=r)===null||f===void 0?void 0:f.host,a=!!((g=i)!==null&&g!==void 0&&(p=g.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return a},ES=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},W_=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var l=sc.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(sc.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var f=t.parentElement,g=kp(t);if(f&&!f.shadowRoot&&i(f)===!0)return ES(t);t.assignedSlot?t=t.assignedSlot:!f&&g!==t.ownerDocument?t=g.host:t=f}t=d}if(Y_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ES(t);return!1},K_=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return sc.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},N2=function(t,n){return!(n.disabled||H_(n)||W_(n,t)||U_(n)||K_(n))},R2=function(t,n){return!(G_(n)||u6(n)<0||!N2(t,n))},Q_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},f6=function(t){var n=[],r=[];return t.forEach(function(i,a){var l=!!i.scopeParent,c=l?i.scopeParent:i,d=F_(c,l),f=l?f6(i.candidates):c;d===0?l?n.push.apply(n,f):n.push(c):r.push({documentOrder:a,tabIndex:d,item:i,isScope:l,content:f})}),r.sort(B_).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},Md=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Np([t],n.includeContainer,{filter:R2.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Q_}):r=l6(t,n.includeContainer,R2.bind(null,n)),f6(r)},X_=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Np([t],n.includeContainer,{filter:N2.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=l6(t,n.includeContainer,N2.bind(null,n)),r},h6=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return sc.call(t,Ep)===!1?!1:R2(n,t)};function Yt(e){return e?.ownerDocument||document}const yc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function p6(e,t){const n=Md(e,yc()),r=n.length;if(r===0)return;const i=si(Yt(e)),a=n.indexOf(i),l=a===-1?t===1?0:r-1:a+t;return n[l]}function Jy(e){return p6(Yt(e).body,1)||e}function m6(e){return p6(Yt(e).body,-1)||e}function g6(e,t){if(!e)return null;const n=Md(Yt(e).body,yc()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const a=(i+t+r)%r;return n[a]}function Z_(e){return g6(e,1)}function J_(e){return g6(e,-1)}function Ql(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function eD(e){Md(e,yc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function kS(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function tD(e,t){return t!=null&&!oc(t)?0:typeof e=="function"?e():e}function Yu(e,t,n){const r=tD(e,n);return typeof r=="number"?r:r?.[t]}function TS(e){return typeof e=="function"?e():e}function y6(e,t){return t||e==="click"||e==="mousedown"}function hr(){}const A2=Object.freeze([]),Dn=Object.freeze({}),nD=500,rD=500,iD={style:{transition:"none"}},oD="data-base-ui-click-trigger",aD={fallbackAxisSide:"none"},x6={fallbackAxisSide:"end"},sD={clipPath:"inset(50%)",position:"fixed",top:0,left:0},pm="none",lc="trigger-press",jr="trigger-hover",Xl="trigger-focus",ex="outside-press",b6="item-press",lD="close-press",cc="focus-out",mm="escape-key",ep="list-navigation",cD="cancel-open",Hu="sibling-open",uD="disabled",tx="imperative-action";function Et(e,t,n,r){let i=!1,a=!1;const l=Dn;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...l}}const v6=C.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ki,currentIdRef:{current:null},currentContextRef:{current:null}});function dD(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=C.useRef(n),a=C.useRef(n),l=C.useRef(null),c=C.useRef(null),d=Lr();return h.jsx(v6.Provider,{value:C.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:l,timeoutMs:r,currentContextRef:c,timeout:d}),[r,d]),children:t})}function fD(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:i}=t,a=C.useContext(v6),{currentIdRef:l,delayRef:c,timeoutMs:d,initialDelayRef:f,currentContextRef:g,hasProvider:p,timeout:y}=a,[x,v]=C.useState(!1);return qe(()=>{function S(){v(!1),g.current?.setIsInstantPhase(!1),l.current=null,g.current=null,c.current=f.current}if(l.current&&!i&&l.current===r){if(v(!1),d){const E=r;return y.start(d,()=>{n.select("open")||l.current&&l.current!==E||S()}),()=>{y.clear()}}S()}},[i,r,l,c,d,f,g,y,n]),qe(()=>{if(!i)return;const S=g.current,E=l.current;y.clear(),g.current={onOpenChange:n.setOpen,setIsInstantPhase:v},l.current=r,c.current={open:0,close:Yu(f.current,"close")},E!==null&&E!==r?(v(!0),S?.setIsInstantPhase(!0),S?.onOpenChange(!1,Et(pm))):(v(!1),S?.setIsInstantPhase(!1))},[i,r,n,l,c,d,f,g,y]),qe(()=>()=>{g.current=null},[g]),C.useMemo(()=>({hasProvider:p,delayRef:c,isInstantPhase:x}),[p,c,x])}function Ds(e,t,n,r){const i=Jn(w6).current;return pD(i,e,t,n,r)&&S6(i,[e,t,n,r]),i.callback}function hD(e){const t=Jn(w6).current;return mD(t,e)&&S6(t,e),t.callback}function w6(){return{callback:null,cleanup:null,refs:[]}}function pD(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function mD(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function S6(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const a=t[i];if(a!=null)switch(typeof a){case"function":{const l=a(n);typeof l=="function"&&(r[i]=l);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const a=t[i];if(a!=null)switch(typeof a){case"function":{const l=r[i];typeof l=="function"?l():a(null);break}case"object":{a.current=null;break}}}}}}}function Or(e){const t=Jn(gD,e).current;return t.next=e,qe(t.effect),t}function gD(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const p1=jy[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],yD=p1&&p1!==C.useLayoutEffect?p1:e=>e();function lt(e){const t=Jn(xD).current;return t.next=e,yD(t.effect),t.trampoline}function xD(){const e={next:void 0,callback:bD,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function bD(){}const Ch=null;class vD{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i<n.length;i+=1)n[i]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Eh=new vD;class io{static create(){return new io}static request(t){return Eh.request(t)}static cancel(t){return Eh.cancel(t)}currentId=Ch;request(t){this.cancel(),this.currentId=Eh.request(()=>{this.currentId=Ch,t()})}cancel=()=>{this.currentId!==Ch&&(Eh.cancel(this.currentId),this.currentId=Ch)};disposeEffect=()=>this.cancel}function nx(){const e=Jn(io.create).current;return $y(e.disposeEffect),e}const C6={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},E6={...C6,position:"fixed",top:0,left:0},wD={...C6,position:"absolute"},uc=C.forwardRef(function(t,n){const[r,i]=C.useState();qe(()=>{Xk&&i("button")},[]);const a={tabIndex:0,role:r};return h.jsx("span",{...t,ref:n,style:E6,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})});function cd(e){return`data-base-ui-${e}`}let NS=0;function Wu(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(NS);const a=()=>e?.focus({preventScroll:n});i?a():NS=requestAnimationFrame(a)}const m1={inert:new WeakMap,"aria-hidden":new WeakMap},RS="data-base-ui-inert",j2={inert:new WeakSet,"aria-hidden":new WeakSet};let Cu=new WeakMap,g1=0;function SD(e){return j2[e]}function k6(e){return e?sd(e)?e.host:k6(e.parentNode):null}const y1=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=k6(n);return e.contains(r)?r:null}).filter(n=>n!=null),AS=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},jS=(e,t,n)=>{const r=[],i=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Ya(l)!=="script"&&(t.has(l)?i(l):r.push(l))})};return i(e),r};function CD(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){const l=r?"inert":n?"aria-hidden":null;let c=null,d=null;const f=y1(t,e),g=i?y1(t,a):[],p=new Set(g),y=i?jS(t,AS(f),new Set(f)).filter(S=>!p.has(S)):[],x=[],v=[];if(l){const S=m1[l],E=SD(l);d=E,c=S;const k=y1(t,Array.from(t.querySelectorAll("[aria-live]"))),T=f.concat(k);jS(t,AS(T),new Set(T)).forEach(M=>{const O=M.getAttribute(l),A=O!==null&&O!=="false",N=(S.get(M)||0)+1;S.set(M,N),x.push(M),N===1&&A&&E.add(M),A||M.setAttribute(l,l==="inert"?"":"true")})}return i&&y.forEach(S=>{const E=(Cu.get(S)||0)+1;Cu.set(S,E),v.push(S),E===1&&S.setAttribute(RS,"")}),g1+=1,()=>{c&&x.forEach(S=>{const k=(c.get(S)||0)-1;c.set(S,k),k||(!d?.has(S)&&l&&S.removeAttribute(l),d?.delete(S))}),i&&v.forEach(S=>{const E=(Cu.get(S)||0)-1;Cu.set(S,E),E||S.removeAttribute(RS)}),g1-=1,g1||(m1.inert=new WeakMap,m1["aria-hidden"]=new WeakMap,j2.inert=new WeakSet,j2["aria-hidden"]=new WeakSet,Cu=new WeakMap)}}function OS(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,l=Yt(e[0]).body;return CD(e,l,n,r,{mark:i,markerIgnoreElements:a})}const ED={...jy};let MS=0;function kD(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(MS+=1,r(`${t}-${MS}`))},[n,t]),i}const LS=ED.useId;function Vs(e,t){if(LS!==void 0){const n=LS();return e??(t?`${t}-${n}`:n)}return kD(e,t)}const TD=parseInt(C.version,10);function rx(e){return TD>=e}function _S(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(rx(19)?n?.ref:t.ref)??null}function O2(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ND(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const a=t[r](i);a!=null&&Object.assign(n,a);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function RD(e,t){return typeof e=="function"?e(t):e}function AD(e,t){return typeof e=="function"?e(t):e}const Ku={};function Ha(e,t,n,r,i){let a={...M2(e,Ku)};return t&&(a=tp(a,t)),n&&(a=tp(a,n)),r&&(a=tp(a,r)),a}function jD(e){if(e.length===0)return Ku;if(e.length===1)return M2(e[0],Ku);let t={...M2(e[0],Ku)};for(let n=1;n<e.length;n+=1)t=tp(t,e[n]);return t}function tp(e,t){return T6(t)?t(e):OD(e,t)}function OD(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=O2(e.style,r);break}case"className":{e[n]=N6(e.className,r);break}default:MD(n,r)?e[n]=LD(e[n],r):e[n]=r}}return e}function MD(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function T6(e){return typeof e=="function"}function M2(e,t){return T6(e)?e(t):e??Ku}function LD(e,t){return t?e?n=>{if(_D(n)){const i=n;L2(i);const a=t(i);return i.baseUIHandlerPrevented||e?.(i),a}const r=t(n);return e?.(n),r}:t:e}function L2(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function N6(e,t){return t?e?t+" "+e:t:e}function _D(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function cn(e,t,n={}){const r=t.render,i=DD(t,n);if(n.enabled===!1)return null;const a=n.state??Dn;return zD(e,r,i,a)}function DD(e,t={}){const{className:n,style:r,render:i}=e,{state:a=Dn,ref:l,props:c,stateAttributesMapping:d,enabled:f=!0}=t,g=f?RD(n,a):void 0,p=f?AD(r,a):void 0,y=f?ND(a,d):Dn,x=f?O2(y,Array.isArray(c)?jD(c):c)??Dn:Dn;return typeof document<"u"&&(f?Array.isArray(l)?x.ref=hD([x.ref,_S(i),...l]):x.ref=Ds(x.ref,_S(i),l):Ds(null,null)),f?(g!==void 0&&(x.className=N6(x.className,g)),p!==void 0&&(x.style=O2(x.style,p)),x):Dn}const ID=Symbol.for("react.lazy");function zD(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Ha(n,t.props);i.ref=n.ref;let a=t;return a?.$$typeof===ID&&(a=C.Children.toArray(t)[0]),C.cloneElement(a,i)}if(e&&typeof e=="string")return PD(e,n);throw new Error(Yn(8))}function PD(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const R6=C.createContext(null),A6=()=>C.useContext(R6),FD=cd("portal");function j6(e={}){const{ref:t,container:n,componentProps:r=Dn,elementProps:i}=e,a=Vs(),c=A6()?.portalNode,[d,f]=C.useState(null),[g,p]=C.useState(null),y=lt(E=>{E!==null&&p(E)}),x=C.useRef(null);qe(()=>{if(n===null){x.current&&(x.current=null,p(null),f(null));return}if(a==null)return;const E=(n&&(Gy(n)?n:n.current))??c??document.body;if(E==null){x.current&&(x.current=null,p(null),f(null));return}x.current!==E&&(x.current=E,p(null),f(E))},[n,c,a]);const v=cn("div",r,{ref:[t,y],props:[{id:a,[FD]:""},i]});return{portalNode:g,portalSubtree:d&&v?_i.createPortal(v,d):null}}const O6=C.forwardRef(function(t,n){const{children:r,container:i,className:a,render:l,renderGuards:c,...d}=t,{portalNode:f,portalSubtree:g}=j6({container:i,ref:n,componentProps:t,elementProps:d}),p=C.useRef(null),y=C.useRef(null),x=C.useRef(null),v=C.useRef(null),[S,E]=C.useState(null),k=S?.modal,T=S?.open,R=typeof c=="boolean"?c:!!S&&!S.modal&&S.open&&!!f;C.useEffect(()=>{if(!f||k)return;function O(A){f&&A.relatedTarget&&Ql(A)&&(A.type==="focusin"?kS:eD)(f)}return f.addEventListener("focusin",O,!0),f.addEventListener("focusout",O,!0),()=>{f.removeEventListener("focusin",O,!0),f.removeEventListener("focusout",O,!0)}},[f,k]),C.useEffect(()=>{!f||T||kS(f)},[T,f]);const M=C.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:y,beforeInsideRef:x,afterInsideRef:v,portalNode:f,setFocusManagerState:E}),[f]);return h.jsxs(C.Fragment,{children:[g,h.jsxs(R6.Provider,{value:M,children:[R&&f&&h.jsx(uc,{"data-type":"outside",ref:p,onFocus:O=>{if(Ql(O,f))x.current?.focus();else{const A=S?S.domReference:null;m6(A)?.focus()}}}),R&&f&&h.jsx("span",{"aria-owns":f.id,style:sD}),f&&_i.createPortal(r,f),R&&f&&h.jsx(uc,{"data-type":"outside",ref:y,onFocus:O=>{if(Ql(O,f))v.current?.focus();else{const A=S?S.domReference:null;Jy(A)?.focus(),S?.closeOnFocusOut&&S?.onOpenChange(!1,Et(cc,O.nativeEvent))}}})]})]})});function M6(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class ix{nodesRef={current:[]};events=M6();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const L6=C.createContext(null),_6=C.createContext(null),Ko=()=>C.useContext(L6)?.id||null,Qa=e=>{const t=C.useContext(_6);return e??t};function D6(e){const t=Vs(),n=Qa(e),r=Ko();return qe(()=>{if(!t)return;const i={id:t,parentId:r};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,r]),t}function BD(e){const{children:t,id:n}=e,r=Ko();return h.jsx(L6.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function HD(e){const{children:t,externalTree:n}=e,r=Jn(()=>n??new ix).current;return h.jsx(_6.Provider,{value:r,children:t})}function Bo(e){return e==null?e:"current"in e?e.current:e}function UD(e,t){const n=Gn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const DS=20;let Oa=[];function ox(){Oa=Oa.filter(e=>e.deref()?.isConnected)}function qD(e){ox(),e&&Ya(e)!=="body"&&(Oa.push(new WeakRef(e)),Oa.length>DS&&(Oa=Oa.slice(-DS)))}function x1(){return ox(),Oa[Oa.length-1]?.deref()}function VD(e){if(!e)return null;const t=yc();return h6(e,t)?e:Md(e,t)[0]||e}function $D(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Zy(e)}function IS(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=yc(),i=X_(e,n).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return h6(l,n)||l.hasAttribute("data-tabindex")&&!c.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function I6(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:g,previousFocusableElement:p,beforeContentFocusGuardRef:y,externalTree:x,getInsideElements:v}=e,S="rootStore"in t?t.rootStore:t,E=S.useState("open"),k=S.useState("domReferenceElement"),T=S.useState("floatingElement"),{events:R,dataRef:M}=S.context,O=lt(()=>M.current.floatingContext?.nodeId),A=i===!1,N=E2(k)&&A,D=C.useRef(["content"]),H=Or(i),I=Or(a),U=Or(f),$=Qa(x),V=A6(),G=C.useRef(!1),B=C.useRef(!1),F=C.useRef(!1),q=C.useRef(-1),W=C.useRef(""),ie=C.useRef(""),_=C.useRef(null),z=C.useRef(null),Y=Ds(_,y,V?.beforeInsideRef),L=Ds(z,V?.afterInsideRef),ee=Lr(),te=Lr(),Q=nx(),de=V!=null,ue=bp(T),Se=lt((Me=ue)=>Me?Md(Me,yc()):[]),Ee=lt(()=>v?.().filter(Me=>Me!=null)??[]),ze=lt(Me=>{const Ie=Se(Me);return D.current.map(()=>Ie).filter(Boolean).flat()});C.useEffect(()=>{if(r||!c)return;function Me(xe){xe.key==="Tab"&&ht(ue,si(Yt(ue)))&&Se().length===0&&!N&&oi(xe)}const Ie=Yt(ue);return Ie.addEventListener("keydown",Me),()=>{Ie.removeEventListener("keydown",Me)}},[r,k,ue,c,D,N,Se,ze]),C.useEffect(()=>{if(r||!E)return;const Me=Yt(ue);function Ie(){F.current=!1}function xe(Te){const Ae=Ar(Te),pe=Ee(),Ce=ht(T,Ae)||ht(k,Ae)||ht(V?.portalNode,Ae)||pe.some(re=>re===Ae||ht(re,Ae));F.current=!Ce,ie.current=Te.pointerType||"keyboard",Ae?.closest(`[${oD}]`)&&(B.current=!0)}function We(){ie.current="keyboard"}return Me.addEventListener("pointerdown",xe,!0),Me.addEventListener("pointerup",Ie,!0),Me.addEventListener("pointercancel",Ie,!0),Me.addEventListener("keydown",We,!0),()=>{Me.removeEventListener("pointerdown",xe,!0),Me.removeEventListener("pointerup",Ie,!0),Me.removeEventListener("pointercancel",Ie,!0),Me.removeEventListener("keydown",We,!0)}},[r,T,k,ue,E,V,Ee]),C.useEffect(()=>{if(r||!d)return;const Me=Yt(ue);function Ie(){B.current=!0,te.start(0,()=>{B.current=!1})}function xe(Ce){const re=Ar(Ce),Pe=Se().indexOf(re);Pe!==-1&&(q.current=Pe)}function We(Ce){const re=Ce.relatedTarget,be=Ce.currentTarget,Pe=Ar(Ce);queueMicrotask(()=>{const Ue=O(),wt=S.context.triggerElements,ae=Ee(),we=re?.hasAttribute(cd("focus-guard"))&&[_.current,z.current,V?.beforeInsideRef.current,V?.afterInsideRef.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,Bo(p),Bo(g)].includes(re),Oe=!(ht(k,re)||ht(T,re)||ht(re,T)||ht(V?.portalNode,re)||ae.some(Le=>Le===re||ht(Le,re))||re!=null&&wt.hasElement(re)||wt.hasMatchingElement(Le=>ht(Le,re))||we||$&&(qo($.nodesRef.current,Ue).find(Le=>ht(Le.context?.elements.floating,re)||ht(Le.context?.elements.domReference,re))||vS($.nodesRef.current,Ue).find(Le=>[Le.context?.elements.floating,bp(Le.context?.elements.floating)].includes(re)||Le.context?.elements.domReference===re)));if(be===k&&ue&&IS(ue,D),l&&be!==k&&!$D(Pe)&&si(Me)===Me.body){if(Rn(ue)&&(ue.focus(),l==="popup")){Q.request(()=>{ue.focus()});return}const Le=q.current,He=Se(),kt=He[Le]||He[He.length-1]||ue;Rn(kt)&&kt.focus()}if(M.current.insideReactTree){M.current.insideReactTree=!1;return}(N||!c)&&re&&Oe&&!B.current&&(N||re!==x1())&&(G.current=!0,S.setOpen(!1,Et(cc,Ce)))})}function Te(){F.current||(M.current.insideReactTree=!0,ee.start(0,()=>{M.current.insideReactTree=!1}))}const Ae=Rn(k)?k:null,pe=[];if(!(!T&&!Ae))return Ae&&(Ae.addEventListener("focusout",We),Ae.addEventListener("pointerdown",Ie),pe.push(()=>{Ae.removeEventListener("focusout",We),Ae.removeEventListener("pointerdown",Ie)})),T&&(T.addEventListener("focusin",xe),T.addEventListener("focusout",We),V&&(T.addEventListener("focusout",Te,!0),pe.push(()=>{T.removeEventListener("focusout",Te,!0)})),pe.push(()=>{T.removeEventListener("focusin",xe),T.removeEventListener("focusout",We)})),()=>{pe.forEach(Ce=>{Ce()})}},[r,k,T,ue,c,$,V,S,d,l,Se,N,O,D,M,ee,te,Q,g,p,Ee]),C.useEffect(()=>{if(r||!T||!E)return;const Me=Array.from(V?.portalNode?.querySelectorAll(`[${cd("portal")}]`)||[]),xe=($?vS($.nodesRef.current,O()):[]).find(re=>E2(re.context?.elements.domReference||null))?.context?.elements.domReference,Te=[...[T,...Me,_.current,z.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,...Ee()],xe,Bo(p),Bo(g),N?k:null].filter(re=>re!=null),Ae=OS(Te,{ariaHidden:c||N,mark:!1}),pe=[T,...Me].filter(re=>re!=null),Ce=OS(pe);return()=>{Ce(),Ae()}},[E,r,k,T,c,D,V,N,$,O,g,p,Ee]),qe(()=>{if(!E||r||!Rn(ue))return;const Me=Yt(ue),Ie=si(Me);queueMicrotask(()=>{const xe=ze(ue),We=H.current,Te=typeof We=="function"?We(U.current||""):We;if(Te===void 0||Te===!1)return;let Ae;Te===!0||Te===null?Ae=xe[0]||ue:Ae=Bo(Te),Ae=Ae||xe[0]||ue,!ht(ue,Ie)&&Wu(Ae,{preventScroll:Ae===ue})})},[r,E,ue,A,ze,H,U]),qe(()=>{if(r||!ue)return;const Me=Yt(ue),Ie=si(Me);qD(Ie);function xe(Te){if(Te.open||(W.current=UD(Te.nativeEvent,ie.current)),Te.reason===jr&&Te.nativeEvent.type==="mouseleave"&&(G.current=!0),Te.reason===ex)if(Te.nested)G.current=!1;else if(r6(Te.nativeEvent)||i6(Te.nativeEvent))G.current=!1;else{let Ae=!1;document.createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?G.current=!1:G.current=!0}}R.on("openchange",xe);function We(){const Te=I.current;let Ae=typeof Te=="function"?Te(W.current):Te;if(Ae===void 0||Ae===!1)return null;if(Ae===null&&(Ae=!0),typeof Ae=="boolean"){const Ce=k||x1();return Ce&&Ce.isConnected?Ce:null}const pe=k||x1();return Bo(Ae)||pe||null}return()=>{R.off("openchange",xe);const Te=si(Me),Ae=Ee(),pe=ht(T,Te)||Ae.some(re=>re===Te||ht(re,Te))||$&&qo($.nodesRef.current,O(),!1).some(re=>ht(re.context?.elements.floating,Te)),Ce=We();queueMicrotask(()=>{const re=VD(Ce),be=typeof I.current!="boolean";I.current&&!G.current&&Rn(re)&&(!(!be&&re!==Te&&Te!==Me.body)||pe)&&re.focus({preventScroll:!0}),G.current=!1})}},[r,T,ue,I,M,R,$,k,O,Ee]),qe(()=>{if(!Kk||E||!T)return;const Me=si(Yt(T));!Rn(Me)||!hm(Me)||ht(T,Me)&&Me.blur()},[E,T]),qe(()=>{if(!(r||!V))return V.setFocusManagerState({modal:c,closeOnFocusOut:d,open:E,onOpenChange:S.setOpen,domReference:k}),()=>{V.setFocusManagerState(null)}},[r,V,c,E,S,d,k]),qe(()=>{if(!(r||!ue))return IS(ue,D),()=>{queueMicrotask(ox)}},[r,ue,D]);const Ye=!r&&(c?!N:!0)&&(de||c);return h.jsxs(C.Fragment,{children:[Ye&&h.jsx(uc,{"data-type":"inside",ref:Y,onFocus:Me=>{if(c){const Ie=ze();Wu(Ie[Ie.length-1])}else V?.portalNode&&(G.current=!1,Ql(Me,V.portalNode)?Jy(k)?.focus():Bo(p??V.beforeOutsideRef)?.focus())}}),n,Ye&&h.jsx(uc,{"data-type":"inside",ref:L,onFocus:Me=>{c?Wu(ze()[0]):V?.portalNode&&(d&&(G.current=!0),Ql(Me,V.portalNode)?m6(k)?.focus():Bo(g??V.afterOutsideRef)?.focus())}})]})}function z6(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:d=!0,touchOpenDelay:f=0,reason:g=lc}=t,p=C.useRef(void 0),y=nx(),x=Lr(),v=C.useMemo(()=>({onPointerDown(S){p.current=S.pointerType},onMouseDown(S){const E=p.current,k=S.nativeEvent,T=n.select("open");if(S.button!==0||a==="click"||oc(E,!0)&&c)return;const R=r.current.openEvent,M=R?.type,O=n.select("domReferenceElement")!==S.currentTarget,A=T&&O||!(T&&l&&(!(R&&d)||M==="click"||M==="mousedown"));if(hm(k.target)){const D=Et(g,k,k.target);A&&E==="touch"&&f>0?x.start(f,()=>{n.setOpen(!0,D)}):n.setOpen(A,D);return}const N=S.currentTarget;y.request(()=>{const D=Et(g,k,N);A&&E==="touch"&&f>0?x.start(f,()=>{n.setOpen(!0,D)}):n.setOpen(A,D)})},onClick(S){if(a==="mousedown-only")return;const E=p.current;if(a==="mousedown"&&E){p.current=void 0;return}if(oc(E,!0)&&c)return;const k=n.select("open"),T=r.current.openEvent,R=n.select("domReferenceElement")!==S.currentTarget,M=k&&R||!(k&&l&&(!(T&&d)||o6(T))),O=Et(g,S.nativeEvent,S.currentTarget);M&&E==="touch"&&f>0?x.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(M,O)},onKeyDown(){p.current=void 0}}),[r,a,c,n,d,l,y,x,f,g]);return C.useMemo(()=>i?{reference:v}:Dn,[i,v])}function GD(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let f=a.width,g=a.height,p=a.x,y=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),p-=n||0,y-=r||0,f=0,g=0,!i||d?(f=t.axis==="y"?a.width:0,g=t.axis==="x"?a.height:0,p=l&&t.x!=null?t.x:p,y=c&&t.y!=null?t.y:y):i&&!d&&(g=t.axis==="x"?a.height:g,f=t.axis==="y"?a.width:f),i=!0,{width:f,height:g,x:p,y,top:y,right:p+f,bottom:y+g,left:p}}}}function zS(e){return e!=null&&e.clientX!=null}function YD(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:c=!0,axis:d="both"}=t,f=C.useRef(!1),g=C.useRef(null),[p,y]=C.useState(),[x,v]=C.useState([]),S=lt((M,O,A)=>{f.current||l.current.openEvent&&!zS(l.current.openEvent)||n.set("positionReference",GD(A??a,{x:M,y:O,axis:d,dataRef:l,pointerType:p}))}),E=lt(M=>{r?g.current||v([]):S(M.clientX,M.clientY,M.currentTarget)}),k=oc(p)?i:r,T=C.useCallback(()=>{if(!k||!c)return;const M=Gn(i);function O(A){const N=Ar(A);ht(i,N)?(M.removeEventListener("mousemove",O),g.current=null):S(A.clientX,A.clientY)}if(!l.current.openEvent||zS(l.current.openEvent)){M.addEventListener("mousemove",O);const A=()=>{M.removeEventListener("mousemove",O),g.current=null};return g.current=A,A}n.set("positionReference",a)},[k,c,i,l,a,n,S]);C.useEffect(()=>T(),[T,x]),C.useEffect(()=>{c&&!i&&(f.current=!1)},[c,i]),C.useEffect(()=>{!c&&r&&(f.current=!0)},[c,r]);const R=C.useMemo(()=>{function M(O){y(O.pointerType)}return{onPointerDown:M,onPointerEnter:M,onMouseMove:E,onMouseEnter:E}},[E]);return C.useMemo(()=>c?{reference:R,trigger:R}:{},[c,R])}const WD={intentional:"onClick",sloppy:"onPointerDown"};function KD(){return!1}function QD(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ax(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),{dataRef:a}=n.context,{enabled:l=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:f="sloppy",referencePress:g=KD,referencePressEvent:p="sloppy",bubbles:y,externalTree:x}=t,v=Qa(x),S=lt(typeof d=="function"?d:()=>!1),E=typeof d=="function"?S:d,k=E!==!1,T=lt(()=>f),R=C.useRef(!1),M=C.useRef(!1),O=C.useRef(!1),{escapeKey:A,outsidePress:N}=QD(y),D=C.useRef(null),H=Lr(),I=Lr(),U=lt(()=>{I.clear(),a.current.insideReactTree=!1}),$=C.useRef(!1),V=C.useRef(""),G=lt(g),B=lt(z=>{if(!r||!l||!c||z.key!=="Escape"||$.current)return;const Y=a.current.floatingContext?.nodeId,L=v?qo(v.nodesRef.current,Y):[];if(!A&&L.length>0){let Q=!0;if(L.forEach(de=>{de.context?.open&&!de.context.dataRef.current.__escapeKeyBubbles&&(Q=!1)}),!Q)return}const ee=C_(z)?z.nativeEvent:z,te=Et(mm,ee);n.setOpen(!1,te),!A&&!te.isPropagationAllowed&&z.stopPropagation()}),F=lt(()=>{a.current.insideReactTree=!0,I.start(0,U)});C.useEffect(()=>{if(!r||!l)return;a.current.__escapeKeyBubbles=A,a.current.__outsidePressBubbles=N;const z=new Ki,Y=new Ki;function L(){z.clear(),$.current=!0}function ee(){z.start(dm()?5:0,()=>{$.current=!1})}function te(){O.current=!0,Y.start(0,()=>{O.current=!1})}function Q(){R.current=!1,M.current=!1}function de(){const re=V.current,be=re==="pen"||!re?"mouse":re,Pe=T(),Ue=typeof Pe=="function"?Pe():Pe;return typeof Ue=="string"?Ue:Ue[be]}function ue(re){const be=de();return be==="intentional"&&re.type!=="click"||be==="sloppy"&&re.type==="click"}function Se(re){const be=a.current.floatingContext?.nodeId,Pe=v&&qo(v.nodesRef.current,be).some(Ue=>Vi(re,Ue.context?.elements.floating));return Vi(re,n.select("floatingElement"))||Vi(re,n.select("domReferenceElement"))||Pe}function Ee(re){if(ue(re)){U();return}if(a.current.insideReactTree){U();return}const be=Ar(re),Pe=`[${cd("inert")}]`;let Ue=Array.from(Yt(n.select("floatingElement")).querySelectorAll(Pe));const wt=Wt(be)?be.getRootNode():null;sd(wt)&&(Ue=Ue.concat(Array.from(wt.querySelectorAll(Pe))));const ae=n.context.triggerElements;if(be&&(ae.hasElement(be)||ae.hasMatchingElement(He=>ht(He,be))))return;let we=Wt(be)?be:null;for(;we&&!so(we);){const He=po(we);if(so(He)||!Wt(He))break;we=He}if(Ue.length&&Wt(be)&&!w_(be)&&!ht(be,n.select("floatingElement"))&&Ue.every(He=>!ht(we,He)))return;if(Rn(be)&&!("touches"in re)){const He=so(be),kt=fi(be),Bt=/auto|scroll/,Xe=He||Bt.test(kt.overflowX),Ve=He||Bt.test(kt.overflowY),pt=Xe&&be.clientWidth>0&&be.scrollWidth>be.clientWidth,mt=Ve&&be.clientHeight>0&&be.scrollHeight>be.clientHeight,Qe=kt.direction==="rtl",yt=mt&&(Qe?re.offsetX<=be.offsetWidth-be.clientWidth:re.offsetX>be.clientWidth),Ft=pt&&re.offsetY>be.clientHeight;if(yt||Ft)return}if(Se(re))return;if(de()==="intentional"&&O.current){Y.clear(),O.current=!1;return}if(typeof E=="function"&&!E(re))return;const Oe=a.current.floatingContext?.nodeId,Le=v?qo(v.nodesRef.current,Oe):[];if(Le.length>0){let He=!0;if(Le.forEach(kt=>{kt.context?.open&&!kt.context.dataRef.current.__outsidePressBubbles&&(He=!1)}),!He)return}n.setOpen(!1,Et(ex,re)),U()}function ze(re){de()!=="sloppy"||re.pointerType==="touch"||!n.select("open")||!l||Vi(re,n.select("floatingElement"))||Vi(re,n.select("domReferenceElement"))||Ee(re)}function Ye(re){if(de()!=="sloppy"||!n.select("open")||!l||Vi(re,n.select("floatingElement"))||Vi(re,n.select("domReferenceElement")))return;const be=re.touches[0];be&&(D.current={startTime:Date.now(),startX:be.clientX,startY:be.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},H.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function Me(re){V.current="touch";const be=Ar(re);function Pe(){Ye(re),be?.removeEventListener(re.type,Pe)}be?.addEventListener(re.type,Pe)}function Ie(re){if(H.clear(),re.type==="pointerdown"&&(V.current=re.pointerType),re.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)return;const be=Ar(re);function Pe(){re.type==="pointerdown"?ze(re):Ee(re),be?.removeEventListener(re.type,Pe)}be?.addEventListener(re.type,Pe)}function xe(re){if(!R.current)return;const be=M.current;if(Q(),de()==="intentional"){if(re.type==="pointercancel"){be&&te();return}if(!Se(re)){if(be){te();return}typeof E=="function"&&!E(re)||(Y.clear(),O.current=!0,U())}}}function We(re){if(de()!=="sloppy"||!D.current||Vi(re,n.select("floatingElement"))||Vi(re,n.select("domReferenceElement")))return;const be=re.touches[0];if(!be)return;const Pe=Math.abs(be.clientX-D.current.startX),Ue=Math.abs(be.clientY-D.current.startY),wt=Math.sqrt(Pe*Pe+Ue*Ue);wt>5&&(D.current.dismissOnTouchEnd=!0),wt>10&&(Ee(re),H.clear(),D.current=null)}function Te(re){const be=Ar(re);function Pe(){We(re),be?.removeEventListener(re.type,Pe)}be?.addEventListener(re.type,Pe)}function Ae(re){de()!=="sloppy"||!D.current||Vi(re,n.select("floatingElement"))||Vi(re,n.select("domReferenceElement"))||(D.current.dismissOnTouchEnd&&Ee(re),H.clear(),D.current=null)}function pe(re){const be=Ar(re);function Pe(){Ae(re),be?.removeEventListener(re.type,Pe)}be?.addEventListener(re.type,Pe)}const Ce=Yt(i);return c&&(Ce.addEventListener("keydown",B),Ce.addEventListener("compositionstart",L),Ce.addEventListener("compositionend",ee)),k&&(Ce.addEventListener("click",Ie,!0),Ce.addEventListener("pointerdown",Ie,!0),Ce.addEventListener("pointerup",xe,!0),Ce.addEventListener("pointercancel",xe,!0),Ce.addEventListener("mousedown",Ie,!0),Ce.addEventListener("mouseup",xe,!0),Ce.addEventListener("touchstart",Me,!0),Ce.addEventListener("touchmove",Te,!0),Ce.addEventListener("touchend",pe,!0)),()=>{c&&(Ce.removeEventListener("keydown",B),Ce.removeEventListener("compositionstart",L),Ce.removeEventListener("compositionend",ee)),k&&(Ce.removeEventListener("click",Ie,!0),Ce.removeEventListener("pointerdown",Ie,!0),Ce.removeEventListener("pointerup",xe,!0),Ce.removeEventListener("pointercancel",xe,!0),Ce.removeEventListener("mousedown",Ie,!0),Ce.removeEventListener("mouseup",xe,!0),Ce.removeEventListener("touchstart",Me,!0),Ce.removeEventListener("touchmove",Te,!0),Ce.removeEventListener("touchend",pe,!0)),z.clear(),Y.clear(),Q(),O.current=!1}},[a,i,c,k,E,r,l,A,N,B,U,T,v,n,H]),C.useEffect(U,[E,U]);const q=C.useMemo(()=>({onKeyDown:B,[WD[p]]:z=>{G()&&n.setOpen(!1,Et(lc,z.nativeEvent))},...p!=="intentional"&&{onClick(z){G()&&n.setOpen(!1,Et(lc,z.nativeEvent))}}}),[B,n,p,G]),W=lt(z=>{if(!r||!l||z.button!==0)return;const Y=Ar(z.nativeEvent);ht(n.select("floatingElement"),Y)&&(R.current||(R.current=!0,M.current=!1))}),ie=lt(z=>{!r||!l||(z.defaultPrevented||z.nativeEvent.defaultPrevented)&&R.current&&(M.current=!0)}),_=C.useMemo(()=>({onKeyDown:B,onPointerDown:ie,onMouseDown:ie,onClickCapture:F,onMouseDownCapture(z){F(),W(z)},onPointerDownCapture(z){F(),W(z)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[B,F,W,ie]);return C.useMemo(()=>l?{reference:q,floating:_,trigger:q}:{},[l,q,_])}function PS(e,t,n){let{reference:r,floating:i}=e;const a=Mi(t),l=Xy(t),c=Qy(l),d=$r(t),f=a==="y",g=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,y=r[c]/2-i[c]/2;let x;switch(d){case"top":x={x:g,y:r.y-i.height};break;case"bottom":x={x:g,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:p};break;case"left":x={x:r.x-i.width,y:p};break;default:x={x:r.x,y:r.y}}switch(Ka(t)){case"start":x[l]-=y*(n&&f?-1:1);break;case"end":x[l]+=y*(n&&f?-1:1);break}return x}async function XD(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:y=!1,padding:x=0}=$o(t,e),v=a6(x),E=c[y?p==="floating"?"reference":"floating":p],k=Sp(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:g,strategy:d})),T=p==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),M=await(a.isElement==null?void 0:a.isElement(R))?await(a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},O=Sp(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:R,strategy:d}):T);return{top:(k.top-O.top+v.top)/M.y,bottom:(O.bottom-k.bottom+v.bottom)/M.y,left:(k.left-O.left+v.left)/M.x,right:(O.right-k.right+v.right)/M.x}}const ZD=50,JD=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:XD},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:p}=PS(f,r,d),y=r,x=0;const v={};for(let S=0;S<a.length;S++){const E=a[S];if(!E)continue;const{name:k,fn:T}=E,{x:R,y:M,data:O,reset:A}=await T({x:g,y:p,initialPlacement:r,placement:y,strategy:i,middlewareData:v,rects:f,platform:c,elements:{reference:e,floating:t}});g=R??g,p=M??p,v[k]={...v[k],...O},A&&x<ZD&&(x++,typeof A=="object"&&(A.placement&&(y=A.placement),A.rects&&(f=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:g,y:p}=PS(f,y,d)),S=-1)}return{x:g,y:p,placement:y,strategy:i,middlewareData:v}},eI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:S=!0,...E}=$o(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const k=$r(i),T=Mi(c),R=$r(c)===c,M=await(d.isRTL==null?void 0:d.isRTL(f.floating)),O=y||(R||!S?[wp(c)]:N_(c)),A=v!=="none";!y&&A&&O.push(...O_(c,S,v,M));const N=[c,...O],D=await d.detectOverflow(t,E),H=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(g&&H.push(D[k]),p){const G=T_(i,l,M);H.push(D[G[0]],D[G[1]])}if(I=[...I,{placement:i,overflows:H}],!H.every(G=>G<=0)){var U,$;const G=(((U=a.flip)==null?void 0:U.index)||0)+1,B=N[G];if(B&&(!(p==="alignment"?T!==Mi(B):!1)||I.every(W=>Mi(W.placement)===T?W.overflows[0]>0:!0)))return{data:{index:G,overflows:I},reset:{placement:B}};let F=($=I.filter(q=>q.overflows[0]<=0).sort((q,W)=>q.overflows[1]-W.overflows[1])[0])==null?void 0:$.placement;if(!F)switch(x){case"bestFit":{var V;const q=(V=I.filter(W=>{if(A){const ie=Mi(W.placement);return ie===T||ie==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ie=>ie>0).reduce((ie,_)=>ie+_,0)]).sort((W,ie)=>W[1]-ie[1])[0])==null?void 0:V[0];q&&(F=q);break}case"initialPlacement":F=c;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function FS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BS(e){return E_.some(t=>e[t]>=0)}const tI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=$o(e,t);switch(i){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=FS(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:BS(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=FS(l,n.floating);return{data:{escapedOffsets:c,escaped:BS(c)}}}default:return{}}}}},P6=new Set(["left","top"]);async function nI(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=$r(n),c=Ka(n),d=Mi(n)==="y",f=P6.has(l)?-1:1,g=a&&d?-1:1,p=$o(t,e);let{mainAxis:y,crossAxis:x,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof v=="number"&&(x=c==="end"?v*-1:v),d?{x:x*g,y:y*f}:{x:y*f,y:x*g}}const rI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:l,middlewareData:c}=t,d=await nI(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:a+d.y,data:{...d,placement:l}}}}},iI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:k=>{let{x:T,y:R}=k;return{x:T,y:R}}},...f}=$o(e,t),g={x:n,y:r},p=await a.detectOverflow(t,f),y=Mi($r(i)),x=Ky(y);let v=g[x],S=g[y];if(l){const k=x==="y"?"top":"left",T=x==="y"?"bottom":"right",R=v+p[k],M=v-p[T];v=k2(R,v,M)}if(c){const k=y==="y"?"top":"left",T=y==="y"?"bottom":"right",R=S+p[k],M=S-p[T];S=k2(R,S,M)}const E=d.fn({...t,[x]:v,[y]:S});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[x]:l,[y]:c}}}}}},oI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=$o(e,t),g={x:n,y:r},p=Mi(i),y=Ky(p);let x=g[y],v=g[p];const S=$o(c,t),E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const R=y==="y"?"height":"width",M=a.reference[y]-a.floating[R]+E.mainAxis,O=a.reference[y]+a.reference[R]-E.mainAxis;x<M?x=M:x>O&&(x=O)}if(f){var k,T;const R=y==="y"?"width":"height",M=P6.has($r(i)),O=a.reference[p]-a.floating[R]+(M&&((k=l.offset)==null?void 0:k[p])||0)+(M?0:E.crossAxis),A=a.reference[p]+a.reference[R]+(M?0:((T=l.offset)==null?void 0:T[p])||0)-(M?E.crossAxis:0);v<O?v=O:v>A&&(v=A)}return{[y]:x,[p]:v}}}},aI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:l,elements:c}=t,{apply:d=()=>{},...f}=$o(e,t),g=await l.detectOverflow(t,f),p=$r(i),y=Ka(i),x=Mi(i)==="y",{width:v,height:S}=a.floating;let E,k;p==="top"||p==="bottom"?(E=p,k=y===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(k=p,E=y==="end"?"top":"bottom");const T=S-g.top-g.bottom,R=v-g.left-g.right,M=ac(S-g[E],T),O=ac(v-g[k],R),A=!t.middlewareData.shift;let N=M,D=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=T),A&&!y){const I=li(g.left,0),U=li(g.right,0),$=li(g.top,0),V=li(g.bottom,0);x?D=v-2*(I!==0||U!==0?I+U:li(g.left,g.right)):N=S-2*($!==0||V!==0?$+V:li(g.top,g.bottom))}await d({...t,availableWidth:D,availableHeight:N});const H=await l.getDimensions(c.floating);return v!==H.width||S!==H.height?{reset:{rects:!0}}:{}}}};function F6(e){const t=fi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Rn(e),a=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=vp(n)!==a||vp(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function sx(e){return Wt(e)?e:e.contextElement}function Zl(e){const t=sx(e);if(!Rn(t))return lo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=F6(t);let l=(a?vp(n.width):n.width)/r,c=(a?vp(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const sI=lo(0);function B6(e){const t=Gn(e);return!dm()||!t.visualViewport?sI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gn(e)?!1:t}function Is(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=sx(e);let l=lo(1);t&&(r?Wt(r)&&(l=Zl(r)):l=Zl(e));const c=lI(a,n,r)?B6(a):lo(0);let d=(i.left+c.x)/l.x,f=(i.top+c.y)/l.y,g=i.width/l.x,p=i.height/l.y;if(a){const y=Gn(a),x=r&&Wt(r)?Gn(r):r;let v=y,S=w2(v);for(;S&&r&&x!==v;){const E=Zl(S),k=S.getBoundingClientRect(),T=fi(S),R=k.left+(S.clientLeft+parseFloat(T.paddingLeft))*E.x,M=k.top+(S.clientTop+parseFloat(T.paddingTop))*E.y;d*=E.x,f*=E.y,g*=E.x,p*=E.y,d+=R,f+=M,v=Gn(S),S=w2(v)}}return Sp({width:g,height:p,x:d,y:f})}function gm(e,t){const n=fm(e).scrollLeft;return t?t.left+n:Is(go(e)).left+n}function H6(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gm(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function cI(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",l=go(r),c=t?um(t.floating):!1;if(r===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=lo(1);const g=lo(0),p=Rn(r);if((p||!p&&!a)&&((Ya(r)!=="body"||Wa(l))&&(d=fm(r)),p)){const x=Is(r);f=Zl(r),g.x=x.x+r.clientLeft,g.y=x.y+r.clientTop}const y=l&&!p&&!a?H6(l,d):lo(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+g.x+y.x,y:n.y*f.y-d.scrollTop*f.y+g.y+y.y}}function uI(e){return Array.from(e.getClientRects())}function dI(e){const t=go(e),n=fm(e),r=e.ownerDocument.body,i=li(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=li(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+gm(e);const c=-n.scrollTop;return fi(r).direction==="rtl"&&(l+=li(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:l,y:c}}const HS=25;function fI(e,t){const n=Gn(e),r=go(e),i=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,d=0;if(i){a=i.width,l=i.height;const g=dm();(!g||g&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const f=gm(r);if(f<=0){const g=r.ownerDocument,p=g.body,y=getComputedStyle(p),x=g.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,v=Math.abs(r.clientWidth-p.clientWidth-x);v<=HS&&(a-=v)}else f<=HS&&(a+=f);return{width:a,height:l,x:c,y:d}}function hI(e,t){const n=Is(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Rn(e)?Zl(e):lo(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,d=i*a.x,f=r*a.y;return{width:l,height:c,x:d,y:f}}function US(e,t,n){let r;if(t==="viewport")r=fI(e,n);else if(t==="document")r=dI(go(e));else if(Wt(t))r=hI(t,n);else{const i=B6(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Sp(r)}function U6(e,t){const n=po(e);return n===t||!Wt(n)||so(n)?!1:fi(n).position==="fixed"||U6(n,t)}function pI(e,t){const n=t.get(e);if(n)return n;let r=ld(e,[],!1).filter(c=>Wt(c)&&Ya(c)!=="body"),i=null;const a=fi(e).position==="fixed";let l=a?po(e):e;for(;Wt(l)&&!so(l);){const c=fi(l),d=Yy(l);!d&&c.position==="fixed"&&(i=null),(a?!d&&!i:!d&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Wa(l)&&!d&&U6(e,l))?r=r.filter(g=>g!==l):i=c,l=po(l)}return t.set(e,r),r}function mI(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?um(t)?[]:pI(t,this._c):[].concat(n),r],c=US(t,l[0],i);let d=c.top,f=c.right,g=c.bottom,p=c.left;for(let y=1;y<l.length;y++){const x=US(t,l[y],i);d=li(x.top,d),f=ac(x.right,f),g=ac(x.bottom,g),p=li(x.left,p)}return{width:f-p,height:g-d,x:p,y:d}}function gI(e){const{width:t,height:n}=F6(e);return{width:t,height:n}}function yI(e,t,n){const r=Rn(t),i=go(t),a=n==="fixed",l=Is(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=lo(0);function f(){d.x=gm(i)}if(r||!r&&!a)if((Ya(t)!=="body"||Wa(i))&&(c=fm(t)),r){const x=Is(t,!0,a,t);d.x=x.x+t.clientLeft,d.y=x.y+t.clientTop}else i&&f();a&&!r&&i&&f();const g=i&&!r&&!a?H6(i,c):lo(0),p=l.left+c.scrollLeft-d.x-g.x,y=l.top+c.scrollTop-d.y-g.y;return{x:p,y,width:l.width,height:l.height}}function b1(e){return fi(e).position==="static"}function qS(e,t){if(!Rn(e)||fi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return go(e)===n&&(n=n.ownerDocument.body),n}function q6(e,t){const n=Gn(e);if(um(e))return n;if(!Rn(e)){let i=po(e);for(;i&&!so(i);){if(Wt(i)&&!b1(i))return i;i=po(i)}return n}let r=qS(e,t);for(;r&&p_(r)&&b1(r);)r=qS(r,t);return r&&so(r)&&b1(r)&&!Yy(r)?n:r||y_(e)||n}const xI=async function(e){const t=this.getOffsetParent||q6,n=this.getDimensions,r=await n(e.floating);return{reference:yI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bI(e){return fi(e).direction==="rtl"}const vI={convertOffsetParentRelativeRectToViewportRelativeRect:cI,getDocumentElement:go,getClippingRect:mI,getOffsetParent:q6,getElementRects:xI,getClientRects:uI,getDimensions:gI,getScale:Zl,isElement:Wt,isRTL:bI};function V6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wI(e,t){let n=null,r;const i=go(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:g,top:p,width:y,height:x}=f;if(c||t(),!y||!x)return;const v=js(p),S=js(i.clientWidth-(g+y)),E=js(i.clientHeight-(p+x)),k=js(g),R={rootMargin:-v+"px "+-S+"px "+-E+"px "+-k+"px",threshold:li(0,ac(1,d))||1};let M=!0;function O(A){const N=A[0].intersectionRatio;if(N!==d){if(!M)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!V6(f,e.getBoundingClientRect())&&l(),M=!1}try{n=new IntersectionObserver(O,{...R,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,R)}n.observe(e)}return l(!0),a}function VS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=sx(e),g=i||a?[...f?ld(f):[],...t?ld(t):[]]:[];g.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const p=f&&c?wI(f,n):null;let y=-1,x=null;l&&(x=new ResizeObserver(k=>{let[T]=k;T&&T.target===f&&x&&t&&(x.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var R;(R=x)==null||R.observe(t)})),n()}),f&&!d&&x.observe(f),t&&x.observe(t));let v,S=d?Is(e):null;d&&E();function E(){const k=Is(e);S&&!V6(S,k)&&n(),S=k,v=requestAnimationFrame(E)}return n(),()=>{var k;g.forEach(T=>{i&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),p?.(),(k=x)==null||k.disconnect(),x=null,d&&cancelAnimationFrame(v)}}const SI=rI,CI=iI,EI=eI,kI=aI,TI=tI,NI=oI,RI=(e,t,n)=>{const r=new Map,i={platform:vI,...n},a={...i.platform,_c:r};return JD(e,t,{...i,platform:a})};var AI=typeof document<"u",jI=function(){},np=AI?C.useLayoutEffect:jI;function Rp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Rp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Rp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function $6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $S(e,t){const n=$6(e);return Math.round(t*n)/n}function v1(e){const t=C.useRef(e);return np(()=>{t.current=e}),t}function OI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[g,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,x]=C.useState(r);Rp(y,r)||x(r);const[v,S]=C.useState(null),[E,k]=C.useState(null),T=C.useCallback(W=>{W!==A.current&&(A.current=W,S(W))},[]),R=C.useCallback(W=>{W!==N.current&&(N.current=W,k(W))},[]),M=a||v,O=l||E,A=C.useRef(null),N=C.useRef(null),D=C.useRef(g),H=d!=null,I=v1(d),U=v1(i),$=v1(f),V=C.useCallback(()=>{if(!A.current||!N.current)return;const W={placement:t,strategy:n,middleware:y};U.current&&(W.platform=U.current),RI(A.current,N.current,W).then(ie=>{const _={...ie,isPositioned:$.current!==!1};G.current&&!Rp(D.current,_)&&(D.current=_,_i.flushSync(()=>{p(_)}))})},[y,t,n,U,$]);np(()=>{f===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(W=>({...W,isPositioned:!1})))},[f]);const G=C.useRef(!1);np(()=>(G.current=!0,()=>{G.current=!1}),[]),np(()=>{if(M&&(A.current=M),O&&(N.current=O),M&&O){if(I.current)return I.current(M,O,V);V()}},[M,O,V,I,H]);const B=C.useMemo(()=>({reference:A,floating:N,setReference:T,setFloating:R}),[T,R]),F=C.useMemo(()=>({reference:M,floating:O}),[M,O]),q=C.useMemo(()=>{const W={position:n,left:0,top:0};if(!F.floating)return W;const ie=$S(F.floating,g.x),_=$S(F.floating,g.y);return c?{...W,transform:"translate("+ie+"px, "+_+"px)",...$6(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ie,top:_}},[n,c,F.floating,g.x,g.y]);return C.useMemo(()=>({...g,update:V,refs:B,elements:F,floatingStyles:q}),[g,V,B,F,q])}const MI=(e,t)=>{const n=SI(e);return{name:n.name,fn:n.fn,options:[e,t]}},LI=(e,t)=>{const n=CI(e);return{name:n.name,fn:n.fn,options:[e,t]}},_I=(e,t)=>({fn:NI(e).fn,options:[e,t]}),DI=(e,t)=>{const n=EI(e);return{name:n.name,fn:n.fn,options:[e,t]}},II=(e,t)=>{const n=kI(e);return{name:n.name,fn:n.fn,options:[e,t]}},zI=(e,t)=>{const n=TI(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ap=Symbol("NOT_FOUND");function PI(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function FI(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function BI(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var GS=e=>Array.isArray(e)?e:[e];function HI(e){const t=Array.isArray(e[0])?e[0]:e;return BI(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function UI(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function qI(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Ap},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function VI(e,t){let n=[];function r(c){const d=n.findIndex(f=>t(c,f.key));if(d>-1){const f=n[d];return d>0&&(n.splice(d,1),n.unshift(f)),f.value}return Ap}function i(c,d){r(c)===Ap&&(n.unshift({key:c,value:d}),n.length>e&&n.pop())}function a(){return n}function l(){n=[]}return{get:r,put:i,getEntries:a,clear:l}}var $I=(e,t)=>e===t;function GI(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let a=0;a<i;a++)if(!e(n[a],r[a]))return!1;return!0}}function YI(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=$I,maxSize:i=1,resultEqualityCheck:a}=n,l=GI(r);let c=0;const d=i<=1?qI(l):VI(i,l);function f(){let g=d.get(arguments);if(g===Ap){if(g=e.apply(null,arguments),c++,a){const y=d.getEntries().find(x=>a(x.value,g));y&&(g=y.value,c!==0&&c--)}d.put(arguments,g)}return g}return f.clearCache=()=>{d.clear(),f.resetResultsCount()},f.resultsCount=()=>c,f.resetResultsCount=()=>{c=0},f}var WI=class{constructor(e){this.value=e}deref(){return this.value}},KI=typeof WeakRef<"u"?WeakRef:WI,QI=0,YS=1;function kh(){return{s:QI,v:void 0,o:null,p:null}}function G6(e,t={}){let n=kh();const{resultEqualityCheck:r}=t;let i,a=0;function l(){let c=n;const{length:d}=arguments;for(let p=0,y=d;p<y;p++){const x=arguments[p];if(typeof x=="function"||typeof x=="object"&&x!==null){let v=c.o;v===null&&(c.o=v=new WeakMap);const S=v.get(x);S===void 0?(c=kh(),v.set(x,c)):c=S}else{let v=c.p;v===null&&(c.p=v=new Map);const S=v.get(x);S===void 0?(c=kh(),v.set(x,c)):c=S}}const f=c;let g;if(c.s===YS)g=c.v;else if(g=e.apply(null,arguments),a++,r){const p=i?.deref?.()??i;p!=null&&r(p,g)&&(g=p,a!==0&&a--),i=typeof g=="object"&&g!==null||typeof g=="function"?new KI(g):g}return f.s=YS,f.v=g,g}return l.clearCache=()=>{n=kh(),l.resetResultsCount()},l.resultsCount=()=>a,l.resetResultsCount=()=>{a=0},l}function Y6(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let a=0,l=0,c,d={},f=i.pop();typeof f=="object"&&(d=f,f=i.pop()),PI(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const g={...n,...d},{memoize:p,memoizeOptions:y=[],argsMemoize:x=G6,argsMemoizeOptions:v=[]}=g,S=GS(y),E=GS(v),k=HI(i),T=p(function(){return a++,f.apply(null,arguments)},...S),R=x(function(){l++;const O=UI(k,arguments);return c=T.apply(null,O),c},...E);return Object.assign(R,{resultFunc:f,memoizedResultFunc:T,dependencies:k,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:p,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var XI=Y6(G6),ZI=Object.assign((e,t=XI)=>{FI(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((l,c,d)=>(l[n[d]]=c,l),{}))},{withTypes:()=>ZI});Y6({memoize:YI,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const rt=(e,t,n,r,i,a,...l)=>{if(l.length>0)throw new Error(Yn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var w1={exports:{}},S1={};var WS;function JI(){if(WS)return S1;WS=1;var e=kd();function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(p,y){var x=y(),v=r({inst:{value:x,getSnapshot:y}}),S=v[0].inst,E=v[1];return a(function(){S.value=x,S.getSnapshot=y,d(S)&&E({inst:S})},[p,x,y]),i(function(){return d(S)&&E({inst:S}),p(function(){d(S)&&E({inst:S})})},[p]),l(x),x}function d(p){var y=p.getSnapshot;p=p.value;try{var x=y();return!n(p,x)}catch{return!0}}function f(p,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return S1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,S1}var KS;function W6(){return KS||(KS=1,w1.exports=JI()),w1.exports}var K6=W6(),C1={exports:{}},E1={};var QS;function ez(){if(QS)return E1;QS=1;var e=kd(),t=W6();function n(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return E1.useSyncExternalStoreWithSelector=function(f,g,p,y,x){var v=a(null);if(v.current===null){var S={hasValue:!1,value:null};v.current=S}else S=v.current;v=c(function(){function k(A){if(!T){if(T=!0,R=A,A=y(A),x!==void 0&&S.hasValue){var N=S.value;if(x(N,A))return M=N}return M=A}if(N=M,r(R,A))return N;var D=y(A);return x!==void 0&&x(N,D)?(R=A,N):(R=A,M=D)}var T=!1,R,M,O=p===void 0?null:p;return[function(){return k(g())},O===null?void 0:function(){return k(O())}]},[g,p,y,x]);var E=i(f,v[0],v[1]);return l(function(){S.hasValue=!0,S.value=E},[E]),d(E),E},E1}var XS;function tz(){return XS||(XS=1,C1.exports=ez()),C1.exports}var nz=tz();const rz=rx(19),iz=rz?az:sz;function Q6(e,t,n,r,i){return iz(e,t,n,r,i)}function oz(e,t,n,r,i){const a=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return K6.useSyncExternalStore(e.subscribe,a,a)}c_({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),K6.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function az(e,t,n,r,i){const a=l_();if(!a)return oz(e,t,n,r,i);const l=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,i))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=i,c.didChange=!0)):(c={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(c)),c.value}function sz(e,t,n,r,i){return nz.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,i))}class lz{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return Q6(this,t,n,r,i)}}class ym extends lz{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),qe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;qe(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);qe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;qe(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,i){const a=this.selectors[t];return a(this.state,n,r,i)}useState(t,n,r,i){return C.useDebugValue(t),Q6(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=lt(n??hr);this.context[t]=r}useStateSetter(t){const n=C.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(a=>{const l=r(a);if(!Object.is(i,l)){const c=i;i=l,n(l,c,this)}})}}const cz={open:rt(e=>e.open),domReferenceElement:rt(e=>e.domReferenceElement),referenceElement:rt(e=>e.positionReference??e.referenceElement),floatingElement:rt(e=>e.floatingElement),floatingId:rt(e=>e.floatingId)};class lx extends ym{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:a,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:M6(),nested:n,noEmit:r,triggerElements:a},cz)}setOpen=(t,n)=>{if((!t||!this.state.open||o6(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function cx(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[a,l]=C.useState(e);return e&&!a&&(l(!0),i("starting")),!e&&a&&r!=="ending"&&!n&&i("ending"),!e&&!a&&r==="ending"&&i(void 0),qe(()=>{if(!e&&a&&r!=="ending"&&n){const c=io.request(()=>{i("ending")});return()=>{io.cancel(c)}}},[e,a,r,n]),qe(()=>{if(!e||t)return;const c=io.request(()=>{i(void 0)});return()=>{io.cancel(c)}},[t,e]),qe(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&i("starting");const c=io.request(()=>{i("idle")});return()=>{io.cancel(c)}},[t,e,a,i,r]),C.useMemo(()=>({mounted:a,setMounted:l,transitionStatus:r}),[a,r])}let ud=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const uz={[ud.startingStyle]:""},dz={[ud.endingStyle]:""},xc={transitionStatus(e){return e==="starting"?uz:e==="ending"?dz:null}};function X6(e,t=!1,n=!0){const r=nx();return lt((i,a=null)=>{r.cancel();function l(){_i.flushSync(i)}const c=Bo(e);if(c==null)return;const d=c;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let p=function(){const x=ud.startingStyle;if(!d.hasAttribute(x)){r.request(y);return}const v=new MutationObserver(()=>{d.hasAttribute(x)||(v.disconnect(),y())});v.observe(d,{attributes:!0,attributeFilter:[x]}),a?.addEventListener("abort",()=>v.disconnect(),{once:!0})},y=function(){Promise.all(d.getAnimations().map(x=>x.finished)).then(()=>{a?.aborted||l()}).catch(()=>{const x=d.getAnimations();if(n){if(a?.aborted)return;l()}else x.length>0&&x.some(v=>v.pending||v.playState!=="finished")&&y()})};var f=p,g=y;if(t){p();return}r.request(y)}})}function bc(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=lt(i),l=X6(r,n,!1);C.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}function Z6(e,t){const n=C.useRef(null),r=C.useRef(null);return C.useCallback(i=>{if(e!==void 0){if(n.current!==null){const a=n.current,l=r.current,c=t.context.triggerElements.getById(a);l&&c===l&&t.context.triggerElements.delete(a),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function J6(e,t,n,r){const i=n.useState("isMountedByTrigger",e),a=Z6(e,n),l=lt(c=>{if(a(c),!c||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:c,...r});return}d==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return qe(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:i}}function ux(e){const t=e.useState("open");qe(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function dx(e,t,n){const{mounted:r,setMounted:i,transitionStatus:a}=cx(e);t.useSyncedValues({mounted:r,transitionStatus:a});const l=lt(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return bc({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:a}}class Ld{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function fz(){return new lx({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Ld,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function fx(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:fz(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Dn,inactiveTriggerProps:Dn,popupProps:Dn}}const Th=rt(e=>e.triggerIdProp??e.activeTriggerId),hx={open:rt(e=>e.openProp??e.open),mounted:rt(e=>e.mounted),transitionStatus:rt(e=>e.transitionStatus),floatingRootContext:rt(e=>e.floatingRootContext),preventUnmountingOnClose:rt(e=>e.preventUnmountingOnClose),payload:rt(e=>e.payload),activeTriggerId:Th,activeTriggerElement:rt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:rt((e,t)=>t!==void 0&&Th(e)===t),isOpenedByTrigger:rt((e,t)=>t!==void 0&&Th(e)===t&&e.open),isMountedByTrigger:rt((e,t)=>t!==void 0&&Th(e)===t&&e.mounted),triggerProps:rt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:rt(e=>e.popupProps),popupElement:rt(e=>e.popupElement),positionerElement:rt(e=>e.positionerElement)};function hz(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Vs(),a=Ko()!=null,l=Jn(()=>new lx({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Ld,floatingId:i,nested:a,noEmit:!1})).current;return qe(()=>{const c={open:t,floatingId:i};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=Wt(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=a,l.context.noEmit=!1,l}function pz(e={}){const{nodeId:t,externalTree:n}=e,r=hz(e),i=e.rootContext||r,a={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,c]=C.useState(null),d=C.useRef(null),f=Qa(n);qe(()=>{a.domReference&&(d.current=a.domReference)},[a.domReference]);const g=OI({...e,elements:{...a,...l&&{reference:l}}}),p=C.useCallback(N=>{const D=Wt(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),getClientRects:()=>N.getClientRects(),contextElement:N}:N;c(D),g.refs.setReference(D)},[g.refs]),[y,x]=C.useState(null),[v,S]=C.useState(null);i.useSyncedValue("referenceElement",y),i.useSyncedValue("domReferenceElement",Wt(y)?y:null),i.useSyncedValue("floatingElement",v);const E=C.useCallback(N=>{(Wt(N)||N===null)&&(d.current=N,x(N)),(Wt(g.refs.reference.current)||g.refs.reference.current===null||N!==null&&!Wt(N))&&g.refs.setReference(N)},[g.refs,x]),k=C.useCallback(N=>{S(N),g.refs.setFloating(N)},[g.refs]),T=C.useMemo(()=>({...g.refs,setReference:E,setFloating:k,setPositionReference:p,domReference:d}),[g.refs,E,k,p]),R=C.useMemo(()=>({...g.elements,domReference:a.domReference}),[g.elements,a.domReference]),M=i.useState("open"),O=i.useState("floatingId"),A=C.useMemo(()=>({...g,dataRef:i.context.dataRef,open:M,onOpenChange:i.setOpen,events:i.context.events,floatingId:O,refs:T,elements:R,nodeId:t,rootStore:i}),[g,T,R,t,i,M,O]);return qe(()=>{i.context.dataRef.current.floatingContext=A;const N=f?.nodesRef.current.find(D=>D.id===t);N&&(N.context=A)}),C.useMemo(()=>({...g,context:A,refs:T,elements:R,rootStore:i}),[g,T,R,A,i])}function px(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,a=Vs(),l=Ko()!=null,c=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),g=t.context.triggerElements,p=Jn(()=>new lx({open:c,referenceElement:d,floatingElement:f,triggerElements:g,onOpenChange:i,floatingId:a,nested:l,noEmit:n})).current;return qe(()=>{const y={open:c,floatingId:a,referenceElement:d,floatingElement:f};Wt(d)&&(y.domReferenceElement=d),p.state.positionReference===p.state.referenceElement&&(y.positionReference=d),p.update(y)},[c,a,d,f,p]),p.context.onOpenChange=i,p.context.nested=l,p.context.noEmit=n,p}const k1=Zk&&Xk;function eT(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:a=!0,delay:l}=t,c=C.useRef(!1),d=C.useRef(null),f=Lr(),g=C.useRef(!0);C.useEffect(()=>{const y=n.select("domReferenceElement");if(!a)return;const x=Gn(y);function v(){const k=n.select("domReferenceElement");!n.select("open")&&Rn(k)&&k===si(Yt(k))&&(c.current=!0)}function S(){g.current=!0}function E(){g.current=!1}return x.addEventListener("blur",v),k1&&(x.addEventListener("keydown",S,!0),x.addEventListener("pointerdown",E,!0)),()=>{x.removeEventListener("blur",v),k1&&(x.removeEventListener("keydown",S,!0),x.removeEventListener("pointerdown",E,!0))}},[n,a]),C.useEffect(()=>{if(!a)return;function y(x){if(x.reason===lc||x.reason===mm){const v=n.select("domReferenceElement");Wt(v)&&(d.current=v,c.current=!0)}}return r.on("openchange",y),()=>{r.off("openchange",y)}},[r,a,n]);const p=C.useMemo(()=>({onMouseLeave(){c.current=!1,d.current=null},onFocus(y){const x=y.currentTarget;if(c.current){if(d.current===x)return;c.current=!1,d.current=null}const v=Ar(y.nativeEvent);if(Wt(v)){if(k1&&!y.relatedTarget){if(!g.current&&!hm(v))return}else if(!S_(v))return}const S=xp(y.relatedTarget,n.context.triggerElements),{nativeEvent:E,currentTarget:k}=y,T=typeof l=="function"?l():l;if(n.select("open")&&S||T===0||T===void 0){n.setOpen(!0,Et(Xl,E,k));return}f.start(T,()=>{c.current||n.setOpen(!0,Et(Xl,E,k))})},onBlur(y){c.current=!1,d.current=null;const x=y.relatedTarget,v=y.nativeEvent,S=Wt(x)&&x.hasAttribute(cd("focus-guard"))&&x.getAttribute("data-type")==="outside";f.start(0,()=>{const E=n.select("domReferenceElement"),k=si(E?E.ownerDocument:document);!x&&k===E||ht(i.current.floatingContext?.refs.floating.current,k)||ht(E,k)||S||xp(x??k,n.context.triggerElements)||n.setOpen(!1,Et(Xl,v))})}}),[i,n,f,l]);return C.useMemo(()=>a?{reference:p,trigger:p}:{},[a,p])}const mz=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${n6}`;function gz(e){return e?!!e.closest(mz):!1}class mx{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ki,this.restTimeout=new Ki,this.handleCloseOptions=void 0}static create(){return new mx}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function gx(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function yz(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t;gx(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}function tT(e){const t=Jn(mx.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),$y(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function nT(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:c=!0,closeDelay:d=0}=t,f=tT(n),g=Qa(),p=Ko(),y=lt(()=>y6(l.current.openEvent?.type,f.interactedInside)),x=lt(()=>{const R=l.current.openEvent?.type;return R?.includes("mouse")&&R!=="mousedown"}),v=lt(R=>xp(R,n.context.triggerElements)),S=C.useCallback(R=>{const M=Yu(d,"close",f.pointerType),O=()=>{n.setOpen(!1,Et(jr,R)),g?.events.emit("floating.closed",R)};M?f.openChangeTimeout.start(M,O):(f.openChangeTimeout.clear(),O())},[d,n,f,g]),E=lt(()=>{gx(f)}),k=lt(R=>{const M=Ar(R);if(!gz(M)){f.interactedInside=!1;return}f.interactedInside=M?.closest("[aria-haspopup]")!=null});qe(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,E())},[r,f,E]),C.useEffect(()=>E,[E]),qe(()=>{if(c&&r&&f.handleCloseOptions?.blockPointerEvents&&x()&&Wt(a)&&i){const R=a,M=i,O=Yt(i),A=g?.nodesRef.current.find(D=>D.id===p)?.context?.elements.floating;A&&(A.style.pointerEvents="");const N=f.handleCloseOptions?.getScope?.()??f.pointerEventsScopeElement??A??R.closest("[data-rootownerid]")??O.body;return yz(f,{scopeElement:N,referenceElement:R,floatingElement:M}),()=>{E()}}},[c,r,a,i,f,x,g,p,E]);const T=Lr();C.useEffect(()=>{if(!c)return;function R(){f.openChangeTimeout.clear(),T.clear(),g?.events.off("floating.closed",O),E()}function M(N){if(g&&p&&qo(g.nodesRef.current,p).length>0){g.events.on("floating.closed",O);return}if(!v(N.relatedTarget)){if(f.handler){f.handler(N);return}E(),y()||S(N)}}function O(N){!g||!p||qo(g.nodesRef.current,p).length>0||T.start(0,()=>{g.events.off("floating.closed",O),n.setOpen(!1,Et(jr,N)),g.events.emit("floating.closed",N)})}const A=i;return A&&(A.addEventListener("mouseenter",R),A.addEventListener("mouseleave",M),A.addEventListener("pointerdown",k,!0)),()=>{A&&(A.removeEventListener("mouseenter",R),A.removeEventListener("mouseleave",M),A.removeEventListener("pointerdown",k,!0)),g?.events.off("floating.closed",O)}},[c,i,n,l,y,v,S,E,k,f,g,p,T])}const xz={current:null};function yx(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:d=!1,restMs:f=0,move:g=!0,triggerElementRef:p=xz,externalTree:y,isActiveTrigger:x=!0,getHandleCloseContext:v}=t,S=Qa(y),E=tT(n),k=Or(c),T=Or(l),R=Or(f),M=Or(a);x&&(E.handleCloseOptions=k.current?.__options);const O=lt(()=>y6(r.current.openEvent?.type,E.interactedInside)),A=lt(U=>xp(U,n.context.triggerElements)),N=lt((U,$,V)=>{const G=n.context.triggerElements;if(G.hasElement($))return!U||!ht(U,$);if(!Wt(V))return!1;const B=V;return G.hasMatchingElement(F=>ht(F,B))&&(!U||!ht(U,B))}),D=C.useCallback((U,$=!0)=>{const V=Yu(T.current,"close",E.pointerType);V?E.openChangeTimeout.start(V,()=>{n.setOpen(!1,Et(jr,U)),S?.events.emit("floating.closed",U)}):$&&(E.openChangeTimeout.clear(),n.setOpen(!1,Et(jr,U)),S?.events.emit("floating.closed",U))},[T,n,E,S]),H=lt(()=>{if(!E.handler)return;Yt(n.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0});C.useEffect(()=>H,[H]);const I=lt(()=>{gx(E)});return C.useEffect(()=>{if(!a)return;function U($){$.open||(H(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return i.on("openchange",U),()=>{i.off("openchange",U)}},[a,i,E,H]),C.useEffect(()=>{if(!a)return;const U=p.current??(x?n.select("domReferenceElement"):null);if(!Wt(U))return;function $(G){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,d&&!oc(E.pointerType)||TS(R.current)>0&&!Yu(T.current,"open"))return;const F=Yu(T.current,"open",E.pointerType),q=G.currentTarget??null,W=n.select("domReferenceElement"),ie=q==null?!1:N(W,q,G.target),_=n.select("open"),z=!_||ie;ie&&_?n.setOpen(!0,Et(jr,G,q)):F?E.openChangeTimeout.start(F,()=>{z&&n.setOpen(!0,Et(jr,G,q))}):z&&n.setOpen(!0,Et(jr,G,q))}function V(G){if(O()){I();return}H();const B=n.select("domReferenceElement"),F=Yt(B);E.restTimeout.clear(),E.restTimeoutPending=!1;const q=r.current.floatingContext??v?.();if(A(G.relatedTarget))return;if(k.current&&q){n.select("open")||E.openChangeTimeout.clear();const _=p.current;E.handler=k.current({...q,tree:S,x:G.clientX,y:G.clientY,onClose(){I(),H(),M.current&&!O()&&_===n.select("domReferenceElement")&&D(G,!0)}}),F.addEventListener("mousemove",E.handler),E.handler(G);return}(E.pointerType!=="touch"||!ht(n.select("floatingElement"),G.relatedTarget))&&D(G)}return g&&U.addEventListener("mousemove",$,{once:!0}),U.addEventListener("mouseenter",$),U.addEventListener("mouseleave",V),()=>{g&&U.removeEventListener("mousemove",$),U.removeEventListener("mouseenter",$),U.removeEventListener("mouseleave",V)}},[H,I,r,T,D,n,a,k,E,x,N,O,A,d,g,R,p,S,M,v]),C.useMemo(()=>{if(!a)return;function U($){E.pointerType=$.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove($){const{nativeEvent:V}=$,G=$.currentTarget,B=n.select("domReferenceElement"),F=n.select("open"),q=N(B,G,$.target);if(d&&!oc(E.pointerType))return;const W=TS(R.current);if(F&&!q||W===0||!q&&E.restTimeoutPending&&$.movementX**2+$.movementY**2<2)return;E.restTimeout.clear();function ie(){if(E.restTimeoutPending=!1,O())return;const _=n.select("open");!E.blockMouseMove&&(!_||q)&&n.setOpen(!0,Et(jr,V,G))}E.pointerType==="touch"?_i.flushSync(()=>{ie()}):q&&F?ie():(E.restTimeoutPending=!0,E.restTimeout.start(W,ie))}}},[a,E,O,N,d,n,R])}function _d(e=[]){const t=e.map(f=>f?.reference),n=e.map(f=>f?.floating),r=e.map(f=>f?.item),i=e.map(f=>f?.trigger),a=C.useCallback(f=>Nh(f,e,"reference"),t),l=C.useCallback(f=>Nh(f,e,"floating"),n),c=C.useCallback(f=>Nh(f,e,"item"),r),d=C.useCallback(f=>Nh(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:a,getFloatingProps:l,getItemProps:c,getTriggerProps:d}),[a,l,c,d])}function Nh(e,t,n){const r=new Map,i=n==="item",a={};n==="floating"&&(a.tabIndex=-1,a[C2]="");for(const l in e)i&&e&&(l===e6||l===t6)||(a[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const d=t[l]?.[n];typeof d=="function"?c=e?d(e):null:c=d,c&&ZS(a,c,i,r)}return ZS(a,e,i,r),a}function ZS(e,t,n,r){for(const i in t){const a=t[i];n&&(i===e6||i===t6)||(i.startsWith("on")?(r.has(i)||r.set(i,[]),typeof a=="function"&&(r.get(i)?.push(a),e[i]=(...l)=>r.get(i)?.map(c=>c(...l)).find(c=>c!==void 0))):e[i]=a)}}const bz="Escape";function xm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Rh(e,t){return xm(t,e===Wy||e===Od,e===Ia||e===za)}function T1(e,t,n){return xm(t,e===Od,n?e===Ia:e===za)||e==="Enter"||e===" "||e===""}function vz(e,t,n){return xm(t,n?e===Ia:e===za,e===Od)}function wz(e,t,n,r){const i=n?e===za:e===Ia,a=e===Wy;return t==="both"||t==="horizontal"&&r&&r>1?e===bz:xm(t,i,a)}function Sz(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:d,onNavigate:f=()=>{},enabled:g=!0,selectedIndex:p=null,allowEscape:y=!1,loopFocus:x=!1,nested:v=!1,rtl:S=!1,virtual:E=!1,focusItemOnOpen:k="auto",focusItemOnHover:T=!0,openOnArrowKeyDown:R=!0,disabledIndices:M=void 0,orientation:O="vertical",parentOrientation:A,cols:N=1,id:D,resetOnPointerLeave:H=!0,externalTree:I}=t,U=bp(i),$=Or(U),V=Ko(),G=Qa(I);qe(()=>{l.current.orientation=O},[l,O]);const B=E2(a),F=C.useRef(k),q=C.useRef(p??-1),W=C.useRef(null),ie=C.useRef(!0),_=lt(pe=>{f(q.current===-1?null:q.current,pe)}),z=C.useRef(_),Y=C.useRef(!!i),L=C.useRef(r),ee=C.useRef(!1),te=C.useRef(!1),Q=Or(M),de=Or(r),ue=Or(p),Se=Or(H),Ee=lt(()=>{function pe(Pe){E?G?.events.emit("virtualfocus",Pe):Wu(Pe,{sync:ee.current,preventScroll:!0})}const Ce=c.current[q.current],re=te.current;Ce&&pe(Ce),(ee.current?Pe=>Pe():requestAnimationFrame)(()=>{const Pe=c.current[q.current]||Ce;if(!Pe)return;Ce||pe(Pe),Ye&&(re||!ie.current)&&Pe.scrollIntoView?.({block:"nearest",inline:"nearest"})})});qe(()=>{g&&(r&&i?(q.current=p??-1,F.current&&p!=null&&(te.current=!0,_())):Y.current&&(q.current=-1,z.current()))},[g,r,i,p,_]),qe(()=>{if(g){if(!r){ee.current=!1;return}if(i)if(d==null){if(ee.current=!1,ue.current!=null)return;if(Y.current&&(q.current=-1,Ee()),(!L.current||!Y.current)&&F.current&&(W.current!=null||F.current===!0&&W.current==null)){let pe=0;const Ce=()=>{c.current[0]==null?(pe<2&&(pe?requestAnimationFrame:queueMicrotask)(Ce),pe+=1):(q.current=W.current==null||T1(W.current,O,S)||v?h1(c):CS(c),W.current=null,_())};Ce()}}else Cp(c,d)||(q.current=d,Ee(),te.current=!1)}},[g,r,i,d,ue,v,c,O,S,_,Ee,Q]),qe(()=>{if(!g||i||!G||E||!Y.current)return;const pe=G.nodesRef.current,Ce=pe.find(Pe=>Pe.id===V)?.context?.elements.floating,re=si(Yt(i)),be=pe.some(Pe=>Pe.context&&ht(Pe.context.elements.floating,re));Ce&&!be&&ie.current&&Ce.focus({preventScroll:!0})},[g,i,G,V,E]),qe(()=>{z.current=_,L.current=r,Y.current=!!i}),qe(()=>{r||(W.current=null,F.current=k)},[r,k]);const ze=d!=null,Ye=C.useMemo(()=>{function pe(re){if(!de.current)return;const be=c.current.indexOf(re.currentTarget);be!==-1&&q.current!==be&&(q.current=be,_(re))}return{onFocus(re){ee.current=!0,pe(re)},onClick:({currentTarget:re})=>re.focus({preventScroll:!0}),onMouseMove(re){ee.current=!0,te.current=!1,T&&pe(re)},onPointerLeave(re){if(!de.current||!ie.current||re.pointerType==="touch")return;ee.current=!0;const be=re.relatedTarget;if(!(!T||c.current.includes(be))&&Se.current&&(Wu(null,{sync:!0}),q.current=-1,_(re),!E)){const Pe=$.current,Ue=si(Yt(Pe));Pe&&ht(Pe,Ue)&&Pe.focus({preventScroll:!0})}}}},[de,$,T,c,_,Se,E]),Me=C.useCallback(()=>A??G?.nodesRef.current.find(pe=>pe.id===V)?.context?.dataRef?.current.orientation,[V,G,A]),Ie=lt(pe=>{if(ie.current=!1,ee.current=!0,pe.which===229||!de.current&&pe.currentTarget===$.current)return;if(v&&wz(pe.key,O,S,N)){Rh(pe.key,Me())||oi(pe),n.setOpen(!1,Et(ep,pe.nativeEvent)),Rn(a)&&(E?G?.events.emit("virtualfocus",a):a.focus());return}const Ce=q.current,re=h1(c,M),be=CS(c,M);if(B||(pe.key==="Home"&&(oi(pe),q.current=re,_(pe)),pe.key==="End"&&(oi(pe),q.current=be,_(pe))),N>1){const Pe=Array.from({length:c.current.length},()=>({width:1,height:1})),Ue=__(Pe,N),wt=Ue.findIndex(Oe=>Oe!=null&&!Kl(c,Oe,M)),ae=Ue.reduce((Oe,Le,He)=>Le!=null&&!Kl(c,Le,M)?He:Oe,-1),we=Ue[L_({current:Ue.map(Oe=>Oe!=null?c.current[Oe]:null)},{event:pe,orientation:O,loopFocus:x,rtl:S,cols:N,disabledIndices:I_([...(typeof M!="function"?M:null)||c.current.map((Oe,Le)=>Kl(c,Le,M)?Le:void 0),void 0],Ue),minIndex:wt,maxIndex:ae,prevIndex:D_(q.current>be?re:q.current,Pe,Ue,N,pe.key===Od?"bl":pe.key===(S?Ia:za)?"tr":"tl"),stopEvent:!0})];if(we!=null&&(q.current=we,_(pe)),O==="both")return}if(Rh(pe.key,O)){if(oi(pe),r&&!E&&si(pe.currentTarget.ownerDocument)===pe.currentTarget){q.current=T1(pe.key,O,S)?re:be,_(pe);return}T1(pe.key,O,S)?x?Ce>=be?y&&Ce!==c.current.length?q.current=-1:(ee.current=!1,q.current=re):q.current=Tr(c,{startingIndex:Ce,disabledIndices:M}):q.current=Math.min(be,Tr(c,{startingIndex:Ce,disabledIndices:M})):x?Ce<=re?y&&Ce!==-1?q.current=c.current.length:(ee.current=!1,q.current=be):q.current=Tr(c,{startingIndex:Ce,decrement:!0,disabledIndices:M}):q.current=Math.max(re,Tr(c,{startingIndex:Ce,decrement:!0,disabledIndices:M})),Cp(c,q.current)&&(q.current=-1),_(pe)}}),xe=C.useMemo(()=>E&&r&&ze&&{"aria-activedescendant":`${D}-${d}`},[E,r,ze,D,d]),We=C.useMemo(()=>({"aria-orientation":O==="both"?void 0:O,...B?{}:xe,onKeyDown(pe){if(pe.key==="Tab"&&pe.shiftKey&&r&&!E){const Ce=Ar(pe.nativeEvent);if(Ce&&!ht($.current,Ce))return;oi(pe),n.setOpen(!1,Et(cc,pe.nativeEvent)),Rn(a)&&a.focus();return}Ie(pe)},onPointerMove(){ie.current=!0}}),[xe,Ie,$,O,B,n,r,E,a]),Te=C.useMemo(()=>{function pe(re){k==="auto"&&r6(re.nativeEvent)&&(F.current=!E)}function Ce(re){F.current=k,k==="auto"&&i6(re.nativeEvent)&&(F.current=!0)}return{onKeyDown(re){const be=n.select("open");ie.current=!1;const Pe=re.key.startsWith("Arrow"),Ue=vz(re.key,Me(),S),wt=Rh(re.key,O),ae=(v?Ue:wt)||re.key==="Enter"||re.key.trim()==="";if(E&&be)return Ie(re);if(!(!be&&!R&&Pe)){if(ae){const we=Rh(re.key,Me());W.current=v&&we?null:re.key}if(v){Ue&&(oi(re),be?(q.current=h1(c,Q.current),_(re)):n.setOpen(!0,Et(ep,re.nativeEvent,re.currentTarget)));return}wt&&(ue.current!=null&&(q.current=ue.current),oi(re),!be&&R?n.setOpen(!0,Et(ep,re.nativeEvent,re.currentTarget)):Ie(re),be&&_(re))}},onFocus(re){n.select("open")&&!E&&(q.current=-1,_(re))},onPointerDown:Ce,onPointerEnter:Ce,onMouseDown:pe,onClick:pe}},[Ie,Q,k,c,v,_,n,R,O,Me,S,ue,E]),Ae=C.useMemo(()=>({...xe,...Te}),[xe,Te]);return C.useMemo(()=>g?{reference:Ae,floating:We,item:Ye,trigger:Te}:{},[g,Ae,We,Te,Ye])}const Cz=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function rT(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),a=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{role:c="dialog"}=t,d=Vs(),f=a?.id||d,g=C.useMemo(()=>bp(l)?.id||i,[l,i]),p=Cz.get(c)??c,x=Ko()!=null,v=C.useMemo(()=>p==="tooltip"||c==="label"?Dn:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&x&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[p,x,c]),S=C.useMemo(()=>p==="tooltip"||c==="label"?{[`aria-${c==="label"?"labelledby":"describedby"}`]:r?g:void 0}:{...v,"aria-expanded":r?"true":"false","aria-controls":r?g:void 0,...p==="menu"&&{id:f}},[p,g,r,f,c,v]),E=C.useMemo(()=>{const T={id:g,...p&&{role:p}};return p==="tooltip"||c==="label"?T:{...T,...p==="menu"&&{"aria-labelledby":f}}},[p,g,f,c]),k=C.useCallback(({active:T,selected:R})=>{const M={role:"option",...T&&{id:`${g}-fui-option`}};switch(c){case"select":case"combobox":return{...M,"aria-selected":R}}return{}},[g,c]);return C.useMemo(()=>({reference:S,floating:E,item:k,trigger:v}),[S,E,v,k])}function Ez(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,i=n.useState("open"),{listRef:a,elementsRef:l,activeIndex:c,onMatch:d,onTypingChange:f,enabled:g=!0,resetMs:p=750,selectedIndex:y=null}=t,x=Lr(),v=C.useRef(""),S=C.useRef(y??c??-1),E=C.useRef(null);qe(()=>{!i&&y!==null||(x.clear(),E.current=null,v.current!==""&&(v.current=""))},[i,y,x]),qe(()=>{i&&v.current===""&&(S.current=y??c??-1)},[i,y,c]);const k=lt(A=>{A?r.current.typing||(r.current.typing=A,f?.(A)):r.current.typing&&(r.current.typing=A,f?.(A))}),T=lt(A=>{function N(B){const F=l?.current[B];return!F||Zy(F)}function D(B,F,q=0){if(B.length===0)return-1;const W=(q%B.length+B.length)%B.length,ie=F.toLocaleLowerCase();for(let _=0;_<B.length;_+=1){const z=(W+_)%B.length;if(!(!B[z]?.toLocaleLowerCase().startsWith(ie)||!N(z)))return z}return-1}const H=a.current;if(v.current.length>0&&A.key===" "&&(oi(A),k(!0)),v.current.length>0&&v.current[0]!==" "&&D(H,v.current)===-1&&A.key!==" "&&k(!1),H==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;i&&A.key!==" "&&(oi(A),k(!0));const I=v.current==="";I&&(S.current=y??c??-1),H.every(B=>B?B[0]?.toLocaleLowerCase()!==B[1]?.toLocaleLowerCase():!0)&&v.current===A.key&&(v.current="",S.current=E.current),v.current+=A.key,x.start(p,()=>{v.current="",S.current=E.current,k(!1)});const V=((I?y??c??-1:S.current)??0)+1,G=D(H,v.current,V);G!==-1?(d?.(G),E.current=G):A.key!==" "&&(v.current="",k(!1))}),R=lt(A=>{const N=A.relatedTarget,D=n.select("domReferenceElement"),H=n.select("floatingElement"),I=ht(D,N),U=ht(H,N);I||U||(x.clear(),v.current="",S.current=E.current,k(!1))}),M=C.useMemo(()=>({onKeyDown:T,onBlur:R}),[T,R]),O=C.useMemo(()=>({onKeyDown:T,onBlur:R}),[T,R]);return C.useMemo(()=>g?{reference:M,floating:O}:{},[g,M,O])}const JS=.1,kz=JS*JS,an=.5;function Ah(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function jh(e,t,n,r,i,a,l,c,d,f){let g=!1;return Ah(e,t,n,r,i,a)&&(g=!g),Ah(e,t,i,a,l,c)&&(g=!g),Ah(e,t,l,c,d,f)&&(g=!g),Ah(e,t,d,f,n,r)&&(g=!g),g}function Tz(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Oh(e,t,n,r,i,a){const l=Math.min(n,i),c=Math.max(n,i),d=Math.min(r,a),f=Math.max(r,a);return e>=l&&e<=c&&t>=d&&t<=f}function xx(e={}){const{blockPointerEvents:t=!1}=e,n=new Ki,r=({x:i,y:a,placement:l,elements:c,onClose:d,nodeId:f,tree:g})=>{const p=l?.split("-")[0];let y=!1,x=null,v=null,S=typeof performance<"u"?performance.now():0;function E(T,R){const M=performance.now(),O=M-S;if(x===null||v===null||O===0)return x=T,v=R,S=M,!1;const A=T-x,N=R-v,D=A*A+N*N,H=O*O*kz;return x=T,v=R,S=M,D<H}function k(){n.clear(),d()}return function(R){n.clear();const M=c.domReference,O=c.floating;if(!M||!O||p==null||i==null||a==null)return;const{clientX:A,clientY:N}=R,D=Ar(R),H=R.type==="mouseleave",I=ht(O,D),U=ht(M,D);if(I&&(y=!0,!H))return;if(U&&(y=!1,!H)){y=!0;return}if(H&&Wt(R.relatedTarget)&&ht(O,R.relatedTarget))return;function $(){return!!(g&&qo(g.nodesRef.current,f).length>0)}function V(){$()||k()}if($())return;const G=M.getBoundingClientRect(),B=O.getBoundingClientRect(),F=i>B.right-B.width/2,q=a>B.bottom-B.height/2,W=B.width>G.width,ie=B.height>G.height,_=(W?G:B).left,z=(W?G:B).right,Y=(ie?G:B).top,L=(ie?G:B).bottom;if(p==="top"&&a>=G.bottom-1||p==="bottom"&&a<=G.top+1||p==="left"&&i>=G.right-1||p==="right"&&i<=G.left+1){V();return}let ee=!1;switch(p){case"top":ee=Oh(A,N,_,G.top+1,z,B.bottom-1);break;case"bottom":ee=Oh(A,N,_,B.top+1,z,G.bottom-1);break;case"left":ee=Oh(A,N,B.right-1,L,G.left+1,Y);break;case"right":ee=Oh(A,N,G.right-1,L,B.left+1,Y);break}if(ee)return;if(y&&!Tz(A,N,G)){V();return}if(!H&&E(A,N)){V();return}let te=!1;switch(p){case"top":{const Q=W?an/2:an*4,de=W||F?i+Q:i-Q,ue=W?i-Q:F?i+Q:i-Q,Se=a+an+1,Ee=F||W?B.bottom-an:B.top,ze=F?W?B.bottom-an:B.top:B.bottom-an;te=jh(A,N,de,Se,ue,Se,B.left,Ee,B.right,ze);break}case"bottom":{const Q=W?an/2:an*4,de=W||F?i+Q:i-Q,ue=W?i-Q:F?i+Q:i-Q,Se=a-an,Ee=F||W?B.top+an:B.bottom,ze=F?W?B.top+an:B.bottom:B.top+an;te=jh(A,N,de,Se,ue,Se,B.left,Ee,B.right,ze);break}case"left":{const Q=ie?an/2:an*4,de=ie||q?a+Q:a-Q,ue=ie?a-Q:q?a+Q:a-Q,Se=i+an+1,Ee=q||ie?B.right-an:B.left,ze=q?ie?B.right-an:B.left:B.right-an;te=jh(A,N,Ee,B.top,ze,B.bottom,Se,de,Se,ue);break}case"right":{const Q=ie?an/2:an*4,de=ie||q?a+Q:a-Q,ue=ie?a-Q:q?a+Q:a-Q,Se=i-an,Ee=q||ie?B.left+an:B.right,ze=q?ie?B.left+an:B.right:B.left+an;te=jh(A,N,Se,de,Se,ue,Ee,B.top,ze,B.bottom);break}}te?y||n.start(40,V):V()}};return r.__options={blockPointerEvents:t},r}const Nz={...hx,disabled:rt(e=>e.disabled),instantType:rt(e=>e.instantType),isInstantPhase:rt(e=>e.isInstantPhase),trackCursorAxis:rt(e=>e.trackCursorAxis),disableHoverablePopup:rt(e=>e.disableHoverablePopup),lastOpenChangeReason:rt(e=>e.openChangeReason),closeOnClick:rt(e=>e.closeOnClick),closeDelay:rt(e=>e.closeDelay),hasViewport:rt(e=>e.hasViewport)};class bx extends ym{constructor(t){super({...Rz(),...t},{popupRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Ld},Nz)}setOpen=(t,n)=>{const r=n.reason,i=r===jr,a=t&&r===Xl,l=!t&&(r===lc||r===mm);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const c=()=>{const d={open:t,openChangeReason:r};a?d.instantType="focus":l?d.instantType="dismiss":r===jr&&(d.instantType=void 0);const f=n.trigger?.id??null;(f||t)&&(d.activeTriggerId=f,d.activeTriggerElement=n.trigger??null),this.update(d)};i?_i.flushSync(c):c()};static useStore(t,n){const r=Jn(()=>new bx(n)).current,i=t??r,a=px({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}}function Rz(){return{...fx(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const Az=qy(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:d,onOpenChangeComplete:f,handle:g,triggerId:p,defaultTriggerId:y=null,children:x}=t,v=bx.useStore(g?.store,{open:r,openProp:i,activeTriggerId:y,triggerIdProp:p});Vy(()=>{i===void 0&&v.state.open===!1&&r===!0&&v.update({open:!0,activeTriggerId:y})}),v.useControlledProp("openProp",i),v.useControlledProp("triggerIdProp",p),v.useContextCallback("onOpenChange",d),v.useContextCallback("onOpenChangeComplete",f);const S=v.useState("open"),E=!n&&S,k=v.useState("activeTriggerId"),T=v.useState("payload");v.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),qe(()=>{S&&n&&v.setOpen(!1,Et(uD))},[S,n,v]),v.useSyncedValue("disabled",n),ux(v);const{forceUnmount:R,transitionStatus:M}=dx(E,v),O=v.useState("isInstantPhase"),A=v.useState("instantType"),N=v.useState("lastOpenChangeReason"),D=C.useRef(null);qe(()=>{M==="ending"&&N===pm||M!=="ending"&&O?(A!=="delay"&&(D.current=A),v.set("instantType","delay")):D.current!==null&&(v.set("instantType",D.current),D.current=null)},[M,O,N,A,v]),qe(()=>{E&&k==null&&v.set("payload",void 0)},[v,k,E]);const H=C.useCallback(()=>{v.setOpen(!1,jz(v,tx))},[v]);C.useImperativeHandle(c,()=>({unmount:R,close:H}),[R,H]);const I=v.useState("floatingRootContext"),U=ax(I,{enabled:!n,referencePress:()=>v.select("closeOnClick")}),$=YD(I,{enabled:!n&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:V,getFloatingProps:G,getTriggerProps:B}=_d([U,$]),F=C.useMemo(()=>V(),[V]),q=C.useMemo(()=>B(),[B]),W=C.useMemo(()=>G(),[G]);return v.useSyncedValues({activeTriggerProps:F,inactiveTriggerProps:q,popupProps:W}),h.jsx($k.Provider,{value:v,children:typeof x=="function"?x({payload:T}):x})});function jz(e,t){const n=Et(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}let Os=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ud.startingStyle]="startingStyle",e[e.endingStyle=ud.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),jp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Oz={[jp.popupOpen]:""},Mz={[jp.popupOpen]:"",[jp.pressed]:""},Lz={[Os.open]:""},_z={[Os.closed]:""},Dz={[Os.anchorHidden]:""},iT={open(e){return e?Oz:null}},eC={open(e){return e?Mz:null}},$s={open(e){return e?Lz:_z},anchorHidden(e){return e?Dz:null}};function Qi(e){return Vs(e,"base-ui")}const oT=C.createContext(void 0);function Iz(){return C.useContext(oT)}let zz=(function(e){return e[e.popupOpen=jp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const Pz=600,Fz=Vk(function(t,n){const{className:r,render:i,handle:a,payload:l,disabled:c,delay:d,closeOnClick:f=!0,closeDelay:g,id:p,...y}=t,x=jd(!0),v=a?.store??x;if(!v)throw new Error(Yn(82));const S=Qi(p),E=v.useState("isTriggerActive",S),k=v.useState("isOpenedByTrigger",S),T=v.useState("floatingRootContext"),R=C.useRef(null),M=d??Pz,O=g??0,{registerTrigger:A,isMountedByThisTrigger:N}=J6(S,R,v,{payload:l,closeOnClick:f,closeDelay:O}),D=Iz(),{delayRef:H,isInstantPhase:I,hasProvider:U}=fD(T,{open:k});v.useSyncedValue("isInstantPhase",I);const $=v.useState("disabled"),V=c??$,G=v.useState("trackCursorAxis"),B=v.useState("disableHoverablePopup"),F=yx(T,{enabled:!V,mouseOnly:!0,move:!1,handleClose:!B&&G!=="both"?xx():null,restMs(){const z=D?.delay,Y=typeof H.current=="object"?H.current.open:void 0;let L=M;return U&&(Y!==0?L=d??z??M:L=0),L},delay(){const z=typeof H.current=="object"?H.current.close:void 0;let Y=O;return g==null&&U&&(Y=z),{close:Y}},triggerElementRef:R,isActiveTrigger:E}),q=eT(T,{enabled:!V}).reference,W={open:k},ie=v.useState("triggerProps",N);return cn("button",t,{state:W,ref:[n,A,R],props:[F,q,ie,{onPointerDown(){v.set("closeOnClick",f)},id:S,[zz.triggerDisabled]:V?"":void 0},y],stateAttributesMapping:iT})}),aT=C.createContext(void 0);function Bz(){const e=C.useContext(aT);if(e===void 0)throw new Error(Yn(70));return e}const Hz=C.forwardRef(function(t,n){const{children:r,container:i,className:a,render:l,...c}=t,{portalNode:d,portalSubtree:f}=j6({container:i,ref:n,componentProps:t,elementProps:c});return!f&&!d?null:h.jsxs(C.Fragment,{children:[f,d&&_i.createPortal(r,d)]})}),Uz=C.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return jd().useState("mounted")||r?h.jsx(aT.Provider,{value:r,children:h.jsx(Hz,{ref:n,...i})}):null}),sT=C.createContext(void 0);function lT(){const e=C.useContext(sT);if(e===void 0)throw new Error(Yn(71));return e}const qz=C.createContext(void 0);function cT(){return C.useContext(qz)?.direction??"ltr"}const Vz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:g=0,offsetParent:p="real"}=$o(e,t)||{};if(f==null)return{};const y=a6(g),x={x:n,y:r},v=Xy(i),S=Qy(v),E=await l.getDimensions(f),k=v==="y",T=k?"top":"left",R=k?"bottom":"right",M=k?"clientHeight":"clientWidth",O=a.reference[S]+a.reference[v]-x[v]-a.floating[S],A=x[v]-a.reference[v],N=p==="real"?await l.getOffsetParent?.(f):c.floating;let D=c.floating[M]||a.floating[S];(!D||!await l.isElement?.(N))&&(D=c.floating[M]||a.floating[S]);const H=O/2-A/2,I=D/2-E[S]/2-1,U=Math.min(y[T],I),$=Math.min(y[R],I),V=U,G=D-E[S]-$,B=D/2-E[S]/2+H,F=k2(V,B,G),q=!d.arrow&&Ka(i)!=null&&B!==F&&a.reference[S]/2-(B<V?U:$)-E[S]/2<0,W=q?B<V?B-V:B-G:0;return{[v]:x[v]+W,data:{[v]:F,centerOffset:B-F-W,...q&&{alignmentOffset:W}},reset:q}}}),$z=(e,t)=>({...Vz(e),options:[e,t]}),Gz={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await zI().fn(e)).data?.referenceHidden||a}}}},rp={sideX:"left",sideY:"top"},uT={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:l,placement:c}=e,d=Gn(i),f=d.getComputedStyle(i);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:rp};const p=await a.getOffsetParent?.(i);let y={width:0,height:0};if(l==="fixed"&&d?.visualViewport)y={width:d.visualViewport.width,height:d.visualViewport.height};else if(p===d){const T=Yt(i);y={width:T.documentElement.clientWidth,height:T.documentElement.clientHeight}}else await a.isElement?.(p)&&(y=await a.getDimensions(p));const x=$r(c);let v=t,S=n;x==="left"&&(v=y.width-(t+r.width)),x==="top"&&(S=y.height-(n+r.height));const E=x==="left"?"right":rp.sideX,k=x==="top"?"bottom":rp.sideY;return{x:v,y:S,data:{sideX:E,sideY:k}}}};function dT(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function tC(e,t,n){const{rects:r,placement:i}=e;return{side:dT(t,$r(i),n),align:Ka(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function fT(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:d=5,sticky:f=!1,arrowPadding:g=5,disableAnchorTracking:p=!1,keepMounted:y=!1,floatingRootContext:x,mounted:v,collisionAvoidance:S,shiftCrossAxis:E=!1,nodeId:k,adaptiveOrigin:T,lazyFlip:R=!1,externalTree:M}=e,[O,A]=C.useState(null);!v&&O!==null&&A(null);const N=S.side||"flip",D=S.align||"flip",H=S.fallbackAxisSide||"end",I=typeof t=="function"?t:void 0,U=lt(I),$=I?U:t,V=Or(t),B=cT()==="rtl",F=O||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":B?"left":"right","inline-start":B?"right":"left"}[r],q=a==="center"?F:`${F}-${a}`;let W=d;const ie=1,_=r==="bottom"?ie:0,z=r==="top"?ie:0,Y=r==="right"?ie:0,L=r==="left"?ie:0;typeof W=="number"?W={top:W+_,right:W+L,bottom:W+z,left:W+Y}:W&&(W={top:(W.top||0)+_,right:(W.right||0)+L,bottom:(W.bottom||0)+z,left:(W.left||0)+Y});const ee={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:W},te=C.useRef(null),Q=Or(i),de=Or(l),Ee=[MI(Qe=>{const yt=tC(Qe,r,B),Ft=typeof Q.current=="function"?Q.current(yt):Q.current,Kt=typeof de.current=="function"?de.current(yt):de.current;return{mainAxis:Ft,crossAxis:Kt,alignmentAxis:Kt}},[typeof i!="function"?i:0,typeof l!="function"?l:0,B,r])],ze=D==="none"&&N!=="shift",Ye=!ze&&(f||E||N==="shift"),Me=N==="none"?null:DI({...ee,padding:{top:W.top+ie,right:W.right+ie,bottom:W.bottom+ie,left:W.left+ie},mainAxis:!E&&N==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:H}),Ie=ze?null:LI(Qe=>{const yt=Yt(Qe.elements.floating).documentElement;return{...ee,rootBoundary:E?{x:0,y:0,width:yt.clientWidth,height:yt.clientHeight}:void 0,mainAxis:D!=="none",crossAxis:Ye,limiter:f||E?void 0:_I(Ft=>{if(!te.current)return{};const{width:Kt,height:xn}=te.current.getBoundingClientRect(),fn=Mi($r(Ft.placement)),In=fn==="y"?Kt:xn,nt=fn==="y"?W.left+W.right:W.top+W.bottom;return{offset:In/2+nt/2}})}},[ee,f,E,W,D]);N==="shift"||D==="shift"||a==="center"?Ee.push(Ie,Me):Ee.push(Me,Ie),Ee.push(II({...ee,apply({elements:{floating:Qe},availableWidth:yt,availableHeight:Ft,rects:Kt}){const xn=Qe.style;xn.setProperty("--available-width",`${yt}px`),xn.setProperty("--available-height",`${Ft}px`);const fn=window.devicePixelRatio||1,{x:In,y:nt,width:qt,height:hn}=Kt.reference,pn=(Math.round((In+qt)*fn)-Math.round(In*fn))/fn,ar=(Math.round((nt+hn)*fn)-Math.round(nt*fn))/fn;xn.setProperty("--anchor-width",`${pn}px`),xn.setProperty("--anchor-height",`${ar}px`)}}),$z(()=>({element:te.current||document.createElement("div"),padding:g,offsetParent:"floating"}),[g]),{name:"transformOrigin",fn(Qe){const{elements:yt,middlewareData:Ft,placement:Kt,rects:xn,y:fn}=Qe,In=$r(Kt),nt=Mi(In),qt=te.current,hn=Ft.arrow?.x||0,pn=Ft.arrow?.y||0,ar=qt?.clientWidth||0,tn=qt?.clientHeight||0,zn=hn+ar/2,yi=pn+tn/2,K=Math.abs(Ft.shift?.y||0),J=xn.reference.height/2,le=typeof i=="function"?i(tC(Qe,r,B)):i,ve=K>le,je={top:`${zn}px calc(100% + ${le}px)`,bottom:`${zn}px ${-le}px`,left:`calc(100% + ${le}px) ${yi}px`,right:`${-le}px ${yi}px`}[In],Ze=`${zn}px ${xn.reference.y+J-fn}px`;return yt.floating.style.setProperty("--transform-origin",Ye&&nt==="y"&&ve?Ze:je),{}}},Gz,T),qe(()=>{!v&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[v,x]);const xe=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:We,elements:Te,x:Ae,y:pe,middlewareData:Ce,update:re,placement:be,context:Pe,isPositioned:Ue,floatingStyles:wt}=pz({rootContext:x,placement:q,middleware:Ee,strategy:n,whileElementsMounted:y?void 0:(...Qe)=>VS(...Qe,xe),nodeId:k,externalTree:M}),{sideX:ae,sideY:we}=Ce.adaptiveOrigin||rp,Oe=Ue?n:"fixed",Le=C.useMemo(()=>{const Qe=T?{position:Oe,[ae]:Ae,[we]:pe}:{position:Oe,...wt};return Ue||(Qe.opacity=0),Qe},[T,Oe,ae,Ae,we,pe,wt,Ue]),He=C.useRef(null);qe(()=>{if(!v)return;const Qe=V.current,yt=typeof Qe=="function"?Qe():Qe,Kt=(nC(yt)?yt.current:yt)||null||null;Kt!==He.current&&(We.setPositionReference(Kt),He.current=Kt)},[v,We,$,V]),C.useEffect(()=>{if(!v)return;const Qe=V.current;typeof Qe!="function"&&nC(Qe)&&Qe.current!==He.current&&(We.setPositionReference(Qe.current),He.current=Qe.current)},[v,We,$,V]),C.useEffect(()=>{if(y&&v&&Te.domReference&&Te.floating)return VS(Te.domReference,Te.floating,re,xe)},[y,v,Te,re,xe]);const kt=$r(be),Bt=dT(r,kt,B),Xe=Ka(be)||"center",Ve=!!Ce.hide?.referenceHidden;qe(()=>{R&&v&&Ue&&A(kt)},[R,v,Ue,kt]);const pt=C.useMemo(()=>({position:"absolute",top:Ce.arrow?.y,left:Ce.arrow?.x}),[Ce.arrow]),mt=Ce.arrow?.centerOffset!==0;return C.useMemo(()=>({positionerStyles:Le,arrowStyles:pt,arrowRef:te,arrowUncentered:mt,side:Bt,align:Xe,physicalSide:kt,anchorHidden:Ve,refs:We,context:Pe,isPositioned:Ue,update:re}),[Le,pt,te,mt,Bt,Xe,kt,Ve,We,Pe,Ue,re])}function nC(e){return e!=null&&"current"in e}function bm(e){return e==="starting"?iD:Dn}const Yz=C.forwardRef(function(t,n){const{render:r,className:i,anchor:a,positionMethod:l="absolute",side:c="top",align:d="center",sideOffset:f=0,alignOffset:g=0,collisionBoundary:p="clipping-ancestors",collisionPadding:y=5,arrowPadding:x=5,sticky:v=!1,disableAnchorTracking:S=!1,collisionAvoidance:E=x6,...k}=t,T=jd(),R=Bz(),M=T.useState("open"),O=T.useState("mounted"),A=T.useState("trackCursorAxis"),N=T.useState("disableHoverablePopup"),D=T.useState("floatingRootContext"),H=T.useState("instantType"),I=T.useState("transitionStatus"),U=T.useState("hasViewport"),$=fT({anchor:a,positionMethod:l,floatingRootContext:D,mounted:O,side:c,sideOffset:f,align:d,alignOffset:g,collisionBoundary:p,collisionPadding:y,sticky:v,arrowPadding:x,disableAnchorTracking:S,keepMounted:R,collisionAvoidance:E,adaptiveOrigin:U?uT:void 0}),V=C.useMemo(()=>{const q={};return(!M||A==="both"||N)&&(q.pointerEvents="none"),{role:"presentation",hidden:!O,style:{...$.positionerStyles,...q}}},[M,A,N,O,$.positionerStyles]),G=C.useMemo(()=>({open:M,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:A!=="none"?"tracking-cursor":H}),[M,$.side,$.align,$.anchorHidden,A,H]),B=C.useMemo(()=>({...G,arrowRef:$.arrowRef,arrowStyles:$.arrowStyles,arrowUncentered:$.arrowUncentered}),[G,$.arrowRef,$.arrowStyles,$.arrowUncentered]),F=cn("div",t,{state:G,props:[V,bm(I),k],ref:[n,T.useStateSetter("positionerElement")],stateAttributesMapping:$s});return h.jsx(sT.Provider,{value:B,children:F})}),Wz={...$s,...xc},Kz=C.forwardRef(function(t,n){const{className:r,render:i,...a}=t,l=jd(),{side:c,align:d}=lT(),f=l.useState("open"),g=l.useState("instantType"),p=l.useState("transitionStatus"),y=l.useState("popupProps"),x=l.useState("floatingRootContext");bc({open:f,ref:l.context.popupRef,onComplete(){f&&l.context.onOpenChangeComplete?.(!0)}});const v=l.useState("disabled"),S=l.useState("closeDelay");return nT(x,{enabled:!v,closeDelay:S}),cn("div",t,{state:{open:f,side:c,align:d,instant:g,transitionStatus:p},ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[y,bm(p),a],stateAttributesMapping:Wz})}),Qz=C.forwardRef(function(t,n){const{className:r,render:i,...a}=t,c=jd().useState("instantType"),{open:d,arrowRef:f,side:g,align:p,arrowUncentered:y,arrowStyles:x}=lT();return cn("div",t,{state:{open:d,side:g,align:p,uncentered:y,instant:c},ref:[n,f],props:[{style:x,"aria-hidden":!0},a],stateAttributesMapping:$s})}),Xz=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,a=C.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=C.useMemo(()=>({open:n,close:r}),[n,r]);return h.jsx(oT.Provider,{value:a,children:h.jsx(dD,{delay:l,timeoutMs:i,children:t.children})})};function hT(e){return rx(19)?e:e?"true":void 0}function pT(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=pT(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mT(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=pT(e))&&(r&&(r+=" "),r+=t);return r}const Zz=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Jz=(e,t)=>({classGroupId:e,validator:t}),gT=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Op="-",rC=[],eP="arbitrary..",tP=e=>{const t=rP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return nP(l);const c=l.split(Op),d=c[0]===""&&c.length>1?1:0;return yT(c,d,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=r[l],f=n[l];return d?f?Zz(f,d):d:f||rC}return n[l]||rC}}},yT=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const f=yT(e,t+1,a);if(f)return f}const l=n.validators;if(l===null)return;const c=t===0?e.join(Op):e.slice(t).join(Op),d=l.length;for(let f=0;f<d;f++){const g=l[f];if(g.validator(c))return g.classGroupId}},nP=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?eP+r:void 0})(),rP=e=>{const{theme:t,classGroups:n}=e;return iP(n,t)},iP=(e,t)=>{const n=gT();for(const r in e){const i=e[r];vx(i,n,r,t)}return n},vx=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const l=e[a];oP(l,t,n,r)}},oP=(e,t,n,r)=>{if(typeof e=="string"){aP(e,t,n);return}if(typeof e=="function"){sP(e,t,n,r);return}lP(e,t,n,r)},aP=(e,t,n)=>{const r=e===""?t:xT(t,e);r.classGroupId=n},sP=(e,t,n,r)=>{if(cP(e)){vx(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Jz(n,e))},lP=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let l=0;l<a;l++){const[c,d]=i[l];vx(d,xT(t,c),n,r)}},xT=(e,t)=>{let n=e;const r=t.split(Op),i=r.length;for(let a=0;a<i;a++){const l=r[a];let c=n.nextPart.get(l);c||(c=gT(),n.nextPart.set(l,c)),n=c}return n},cP=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,uP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,l)=>{n[a]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return i(a,l),l},set(a,l){a in n?n[a]=l:i(a,l)}}},_2="!",iC=":",dP=[],oC=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),fP=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let l=0,c=0,d=0,f;const g=i.length;for(let S=0;S<g;S++){const E=i[S];if(l===0&&c===0){if(E===iC){a.push(i.slice(d,S)),d=S+1;continue}if(E==="/"){f=S;continue}}E==="["?l++:E==="]"?l--:E==="("?c++:E===")"&&c--}const p=a.length===0?i:i.slice(d);let y=p,x=!1;p.endsWith(_2)?(y=p.slice(0,-1),x=!0):p.startsWith(_2)&&(y=p.slice(1),x=!0);const v=f&&f>d?f-d:void 0;return oC(a,x,y,v)};if(t){const i=t+iC,a=r;r=l=>l.startsWith(i)?a(l.slice(i.length)):oC(dP,!1,l,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},hP=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const l=n[a],c=l[0]==="[",d=t.has(l);c||d?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},pP=e=>({cache:uP(e.cacheSize),parseClassName:fP(e),sortModifiers:hP(e),...tP(e)}),mP=/\s+/,gP=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,l=[],c=e.trim().split(mP);let d="";for(let f=c.length-1;f>=0;f-=1){const g=c[f],{isExternal:p,modifiers:y,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:S}=n(g);if(p){d=g+(d.length>0?" "+d:d);continue}let E=!!S,k=r(E?v.substring(0,S):v);if(!k){if(!E){d=g+(d.length>0?" "+d:d);continue}if(k=r(v),!k){d=g+(d.length>0?" "+d:d);continue}E=!1}const T=y.length===0?"":y.length===1?y[0]:a(y).join(":"),R=x?T+_2:T,M=R+k;if(l.indexOf(M)>-1)continue;l.push(M);const O=i(k,E);for(let A=0;A<O.length;++A){const N=O[A];l.push(R+N)}d=g+(d.length>0?" "+d:d)}return d},yP=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=bT(n))&&(i&&(i+=" "),i+=r);return i},bT=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bT(e[r]))&&(n&&(n+=" "),n+=t);return n},xP=(e,...t)=>{let n,r,i,a;const l=d=>{const f=t.reduce((g,p)=>p(g),e());return n=pP(f),r=n.cache.get,i=n.cache.set,a=c,c(d)},c=d=>{const f=r(d);if(f)return f;const g=gP(d,n);return i(d,g),g};return a=l,(...d)=>a(yP(...d))},bP=[],Kn=e=>{const t=n=>n[e]||bP;return t.isThemeGetter=!0,t},vT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vP=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,wP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SP=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,CP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,EP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ca=e=>vP.test(e),St=e=>!!e&&!Number.isNaN(Number(e)),Ea=e=>!!e&&Number.isInteger(Number(e)),N1=e=>e.endsWith("%")&&St(e.slice(0,-1)),zo=e=>wP.test(e),ST=()=>!0,TP=e=>SP.test(e)&&!CP.test(e),wx=()=>!1,NP=e=>EP.test(e),RP=e=>kP.test(e),AP=e=>!Ge(e)&&!Ke(e),jP=e=>Xa(e,kT,wx),Ge=e=>vT.test(e),Es=e=>Xa(e,TT,TP),aC=e=>Xa(e,PP,St),OP=e=>Xa(e,RT,ST),MP=e=>Xa(e,NT,wx),sC=e=>Xa(e,CT,wx),LP=e=>Xa(e,ET,RP),Mh=e=>Xa(e,AT,NP),Ke=e=>wT.test(e),Eu=e=>Gs(e,TT),_P=e=>Gs(e,NT),lC=e=>Gs(e,CT),DP=e=>Gs(e,kT),IP=e=>Gs(e,ET),Lh=e=>Gs(e,AT,!0),zP=e=>Gs(e,RT,!0),Xa=(e,t,n)=>{const r=vT.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Gs=(e,t,n=!1)=>{const r=wT.exec(e);return r?r[1]?t(r[1]):n:!1},CT=e=>e==="position"||e==="percentage",ET=e=>e==="image"||e==="url",kT=e=>e==="length"||e==="size"||e==="bg-size",TT=e=>e==="length",PP=e=>e==="number",NT=e=>e==="family-name",RT=e=>e==="number"||e==="weight",AT=e=>e==="shadow",FP=()=>{const e=Kn("color"),t=Kn("font"),n=Kn("text"),r=Kn("font-weight"),i=Kn("tracking"),a=Kn("leading"),l=Kn("breakpoint"),c=Kn("container"),d=Kn("spacing"),f=Kn("radius"),g=Kn("shadow"),p=Kn("inset-shadow"),y=Kn("text-shadow"),x=Kn("drop-shadow"),v=Kn("blur"),S=Kn("perspective"),E=Kn("aspect"),k=Kn("ease"),T=Kn("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...M(),Ke,Ge],A=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],D=()=>[Ke,Ge,d],H=()=>[Ca,"full","auto",...D()],I=()=>[Ea,"none","subgrid",Ke,Ge],U=()=>["auto",{span:["full",Ea,Ke,Ge]},Ea,Ke,Ge],$=()=>[Ea,"auto",Ke,Ge],V=()=>["auto","min","max","fr",Ke,Ge],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...D()],q=()=>[Ca,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],W=()=>[Ca,"screen","full","dvw","lvw","svw","min","max","fit",...D()],ie=()=>[Ca,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],_=()=>[e,Ke,Ge],z=()=>[...M(),lC,sC,{position:[Ke,Ge]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",DP,jP,{size:[Ke,Ge]}],ee=()=>[N1,Eu,Es],te=()=>["","none","full",f,Ke,Ge],Q=()=>["",St,Eu,Es],de=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>[St,N1,lC,sC],Ee=()=>["","none",v,Ke,Ge],ze=()=>["none",St,Ke,Ge],Ye=()=>["none",St,Ke,Ge],Me=()=>[St,Ke,Ge],Ie=()=>[Ca,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zo],breakpoint:[zo],color:[ST],container:[zo],"drop-shadow":[zo],ease:["in","out","in-out"],font:[AP],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zo],shadow:[zo],spacing:["px",St],text:[zo],"text-shadow":[zo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ca,Ge,Ke,E]}],container:["container"],columns:[{columns:[St,Ge,Ke,c]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{"inset-s":H(),start:H()}],end:[{"inset-e":H(),end:H()}],"inset-bs":[{"inset-bs":H()}],"inset-be":[{"inset-be":H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Ea,"auto",Ke,Ge]}],basis:[{basis:[Ca,"full","auto",c,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[St,Ca,"auto","initial","none",Ge]}],grow:[{grow:["",St,Ke,Ge]}],shrink:[{shrink:["",St,Ke,Ge]}],order:[{order:[Ea,"first","last","none",Ke,Ge]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[c,"screen",...q()]}],"min-w":[{"min-w":[c,"screen","none",...q()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Eu,Es]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,zP,OP]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",N1,Ge]}],"font-family":[{font:[_P,MP,t]}],"font-features":[{"font-features":[Ge]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ke,Ge]}],"line-clamp":[{"line-clamp":[St,"none",Ke,aC]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",Ke,Ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ke,Ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[St,"from-font","auto",Ke,Es]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[St,"auto",Ke,Ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ke,Ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ke,Ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ea,Ke,Ge],radial:["",Ke,Ge],conic:[Ea,Ke,Ge]},IP,LP]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-bs":[{"border-bs":_()}],"border-color-be":[{"border-be":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[St,Ke,Ge]}],"outline-w":[{outline:["",St,Eu,Es]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",g,Lh,Mh]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",p,Lh,Mh]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[St,Es]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",y,Lh,Mh]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[St,Ke,Ge]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[St]}],"mask-image-linear-from-pos":[{"mask-linear-from":Se()}],"mask-image-linear-to-pos":[{"mask-linear-to":Se()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":Se()}],"mask-image-t-to-pos":[{"mask-t-to":Se()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":Se()}],"mask-image-r-to-pos":[{"mask-r-to":Se()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":Se()}],"mask-image-b-to-pos":[{"mask-b-to":Se()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":Se()}],"mask-image-l-to-pos":[{"mask-l-to":Se()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":Se()}],"mask-image-x-to-pos":[{"mask-x-to":Se()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":Se()}],"mask-image-y-to-pos":[{"mask-y-to":Se()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[Ke,Ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":Se()}],"mask-image-radial-to-pos":[{"mask-radial-to":Se()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[St]}],"mask-image-conic-from-pos":[{"mask-conic-from":Se()}],"mask-image-conic-to-pos":[{"mask-conic-to":Se()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ke,Ge]}],filter:[{filter:["","none",Ke,Ge]}],blur:[{blur:Ee()}],brightness:[{brightness:[St,Ke,Ge]}],contrast:[{contrast:[St,Ke,Ge]}],"drop-shadow":[{"drop-shadow":["","none",x,Lh,Mh]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",St,Ke,Ge]}],"hue-rotate":[{"hue-rotate":[St,Ke,Ge]}],invert:[{invert:["",St,Ke,Ge]}],saturate:[{saturate:[St,Ke,Ge]}],sepia:[{sepia:["",St,Ke,Ge]}],"backdrop-filter":[{"backdrop-filter":["","none",Ke,Ge]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[St,Ke,Ge]}],"backdrop-contrast":[{"backdrop-contrast":[St,Ke,Ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",St,Ke,Ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[St,Ke,Ge]}],"backdrop-invert":[{"backdrop-invert":["",St,Ke,Ge]}],"backdrop-opacity":[{"backdrop-opacity":[St,Ke,Ge]}],"backdrop-saturate":[{"backdrop-saturate":[St,Ke,Ge]}],"backdrop-sepia":[{"backdrop-sepia":["",St,Ke,Ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ke,Ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[St,"initial",Ke,Ge]}],ease:[{ease:["linear","initial",k,Ke,Ge]}],delay:[{delay:[St,Ke,Ge]}],animate:[{animate:["none",T,Ke,Ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ke,Ge]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ze()}],"rotate-x":[{"rotate-x":ze()}],"rotate-y":[{"rotate-y":ze()}],"rotate-z":[{"rotate-z":ze()}],scale:[{scale:Ye()}],"scale-x":[{"scale-x":Ye()}],"scale-y":[{"scale-y":Ye()}],"scale-z":[{"scale-z":Ye()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[Ke,Ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ke,Ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ke,Ge]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[St,Eu,Es,aC]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},BP=xP(FP);function ge(...e){return BP(mT(e))}function Sx({delay:e=0,...t}){return h.jsx(Xz,{"data-slot":"tooltip-provider",delay:e,...t})}function Ua({...e}){return h.jsx(Az,{"data-slot":"tooltip",...e})}function qa({...e}){return h.jsx(Fz,{"data-slot":"tooltip-trigger",...e})}function Va({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:i=0,children:a,...l}){return h.jsx(Uz,{children:h.jsx(Yz,{align:r,alignOffset:i,side:t,sideOffset:n,className:"isolate z-50",children:h.jsxs(Kz,{"data-slot":"tooltip-content",className:ge("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-popover px-3 py-1.5 text-xs text-foreground has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l,children:[a,h.jsx(Qz,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-popover fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}var vc=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(){}},HP={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},UP=class{#e=HP;#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)}},Ms=new UP;function qP(e){setTimeout(e,0)}var zs=typeof window>"u"||"Deno"in globalThis;function Nr(){}function VP(e,t){return typeof e=="function"?e(t):e}function D2(e){return typeof e=="number"&&e>=0&&e!==1/0}function jT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pa(e,t){return typeof e=="function"?e(t):e}function Ai(e,t){return typeof e=="function"?e(t):e}function cC(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Cx(l,t.options))return!1}else if(!dd(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||a&&!a(t))}function uC(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Ps(t.options.mutationKey)!==Ps(a))return!1}else if(!dd(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Cx(e,t){return(t?.queryKeyHashFn||Ps)(e)}function Ps(e){return JSON.stringify(e,(t,n)=>I2(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function dd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>dd(e[n],t[n])):!1}var $P=Object.prototype.hasOwnProperty;function OT(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=dC(e)&&dC(t);if(!r&&!(I2(e)&&I2(t)))return t;const a=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let g=0;g<c;g++){const p=r?g:l[g],y=e[p],x=t[p];if(y===x){d[p]=y,(r?g<a:$P.call(e,p))&&f++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){d[p]=x;continue}const v=OT(y,x,n+1);d[p]=v,v===y&&f++}return a===c&&f===a?e:d}function Mp(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 dC(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function I2(e){if(!fC(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!fC(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function fC(e){return Object.prototype.toString.call(e)==="[object Object]"}function GP(e){return new Promise(t=>{Ms.setTimeout(t,e)})}function z2(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?OT(e,t):t}function YP(e){return e}function WP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function KP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ex=Symbol();function MT(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ex?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function kx(e,t){return typeof e=="function"?e(...t):!!e}function QP(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var XP=class extends vc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!zs&&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"}},Tx=new XP;function P2(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var ZP=qP;function JP(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=ZP;const a=c=>{t?e.push(c):i(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{a(()=>{c(...d)})},schedule:a,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var Qn=JP(),eF=class extends vc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!zs&&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}},Lp=new eF;function tF(e){return Math.min(1e3*2**e,3e4)}function LT(e){return(e??"online")==="online"?Lp.isOnline():!0}var F2=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function _T(e){let t=!1,n=0,r;const i=P2(),a=()=>i.status!=="pending",l=S=>{if(!a()){const E=new F2(S);y(E),e.onCancel?.(E)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>Tx.isFocused()&&(e.networkMode==="always"||Lp.isOnline())&&e.canRun(),g=()=>LT(e.networkMode)&&e.canRun(),p=S=>{a()||(r?.(),i.resolve(S))},y=S=>{a()||(r?.(),i.reject(S))},x=()=>new Promise(S=>{r=E=>{(a()||f())&&S(E)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),v=()=>{if(a())return;let S;const E=n===0?e.initialPromise:void 0;try{S=E??e.fn()}catch(k){S=Promise.reject(k)}Promise.resolve(S).then(p).catch(k=>{if(a())return;const T=e.retry??(zs?0:3),R=e.retryDelay??tF,M=typeof R=="function"?R(n,k):R,O=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,k);if(t||!O){y(k);return}n++,e.onFail?.(n,k),GP(M).then(()=>f()?void 0:x()).then(()=>{t?y(k):v()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:d,canStart:g,start:()=>(g()?v():x().then(v),i)}}var DT=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),D2(this.gcTime)&&(this.#e=Ms.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zs?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ms.clearTimeout(this.#e),this.#e=void 0)}},nF=class extends DT{#e;#t;#n;#i;#r;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=pC(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=pC(this.options);t.data!==void 0&&(this.setState(hC(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=z2(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Nr).catch(Nr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ai(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ex||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pa(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:!jT(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.#n.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.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({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(d=>d.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{const c=MT(this.options,t),f=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(g),g})();return this.#s=!1,this.options.persister?this.options.persister(c,f,this):c(f)},l=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(c),c})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=_T({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:c=>{c instanceof F2&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{this.#o({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.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.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof F2){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#o({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#o(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,...IT(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...hC(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;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),Qn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function IT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:LT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hC(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function pC(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var zT=class extends vc{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#s=P2(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#a;#s;#o;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),mC(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return B2(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return B2(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),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 Ai(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Mp(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&gC(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Ai(this.options.enabled,this.#t)!==Ai(t.enabled,this.#t)||Pa(this.options.staleTime,this.#t)!==Pa(t.staleTime,this.#t))&&this.#g();const i=this.#y();r&&(this.#t!==n||Ai(this.options.enabled,this.#t)!==Ai(t.enabled,this.#t)||i!==this.#l)&&this.#x(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return iF(this,n)&&(this.#i=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.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.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Nr)),t}#g(){this.#v();const e=Pa(this.options.staleTime,this.#t);if(zs||this.#i.isStale||!D2(e))return;const n=jT(this.#i.dataUpdatedAt,e)+1;this.#c=Ms.setTimeout(()=>{this.#i.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.#l=e,!(zs||Ai(this.options.enabled,this.#t)===!1||!D2(this.#l)||this.#l===0)&&(this.#u=Ms.setInterval(()=>{(this.options.refetchIntervalInBackground||Tx.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#x(this.#y())}#v(){this.#c&&(Ms.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Ms.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,a=this.#r,l=this.#a,d=e!==n?e.state:this.#n,{state:f}=e;let g={...f},p=!1,y;if(t._optimisticResults){const D=this.hasListeners(),H=!D&&mC(e,t),I=D&&gC(e,n,t,r);(H||I)&&(g={...g,...IT(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:v,status:S}=g;y=g.data;let E=!1;if(t.placeholderData!==void 0&&y===void 0&&S==="pending"){let D;i?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(D=i.data,E=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(S="success",y=z2(i?.data,D,t),p=!0)}if(t.select&&y!==void 0&&!E)if(i&&y===a?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=z2(i?.data,y,t),this.#f=y,this.#o=null}catch(D){this.#o=D}this.#o&&(x=this.#o,y=this.#f,v=Date.now(),S="error");const k=g.fetchStatus==="fetching",T=S==="pending",R=S==="error",M=T&&k,O=y!==void 0,N={status:S,fetchStatus:g.fetchStatus,isPending:T,isSuccess:S==="success",isError:R,isInitialLoading:M,isLoading:M,data:y,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:k,isRefetching:k&&!T,isLoadingError:R&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:R&&O,isStale:Nx(e,t),refetch:this.refetch,promise:this.#s,isEnabled:Ai(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=N.data!==void 0,H=N.status==="error"&&!D,I=V=>{H?V.reject(N.error):D&&V.resolve(N.data)},U=()=>{const V=this.#s=N.promise=P2();I(V)},$=this.#s;switch($.status){case"pending":e.queryHash===n.queryHash&&I($);break;case"fulfilled":(H||N.data!==$.value)&&U();break;case"rejected":(!H||N.error!==$.reason)&&U();break}}return N}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Mp(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#p.size)return!0;const a=new Set(i??this.#p);return this.options.throwOnError&&a.add("error"),Object.keys(this.#i).some(l=>{const c=l;return this.#i[c]!==e[c]&&a.has(c)})};this.#C({listeners:n()})}#S(){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.#b()}#C(e){Qn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function rF(e,t){return Ai(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mC(e,t){return rF(e,t)||e.state.data!==void 0&&B2(e,t,t.refetchOnMount)}function B2(e,t,n){if(Ai(t.enabled,e)!==!1&&Pa(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Nx(e,t)}return!1}function gC(e,t,n,r){return(e!==t||Ai(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Nx(e,n)}function Nx(e,t){return Ai(t.enabled,e)!==!1&&e.isStaleByTime(Pa(t.staleTime,e))}function iF(e,t){return!Mp(e.getCurrentResult(),t)}function _p(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let g=!1;const p=v=>{QP(v,()=>t.signal,()=>g=!0)},y=MT(t.options,t.fetchOptions),x=async(v,S,E)=>{if(g)return Promise.reject();if(S==null&&v.pages.length)return Promise.resolve(v);const T=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return p(A),A})(),R=await y(T),{maxPages:M}=t.options,O=E?KP:WP;return{pages:O(v.pages,R,M),pageParams:O(v.pageParams,S,M)}};if(i&&a.length){const v=i==="backward",S=v?PT:H2,E={pages:a,pageParams:l},k=S(r,E);c=await x(E,k,v)}else{const v=e??a.length;do{const S=d===0?l[0]??r.initialPageParam:H2(r,c);if(d>0&&S==null)break;c=await x(c,S),d++}while(d<v)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function H2(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function PT(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function oF(e,t){return t?H2(e,t)!=null:!1}function aF(e,t){return!t||!e.getPreviousPageParam?!1:PT(e,t)!=null}var sF=class extends zT{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:_p()})}getOptimisticResult(e){return e.behavior=_p(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:l,isRefetchError:c}=r,d=n.fetchMeta?.fetchMore?.direction,f=l&&d==="forward",g=i&&d==="forward",p=l&&d==="backward",y=i&&d==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:oF(t,n.data),hasPreviousPage:aF(t,n.data),isFetchNextPageError:f,isFetchingNextPage:g,isFetchPreviousPageError:p,isFetchingPreviousPage:y,isRefetchError:c&&!f&&!p,isRefetching:a&&!g&&!y}}},lF=class extends DT{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||FT(),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.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=_T({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,l)=>{this.#r({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:i})}const a=await this.#i.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.#r({type:"success",data:a}),a}catch(a){try{await this.#n.config.onError?.(a,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(a,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,a,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#r({type:"error",error:a}),a}finally{this.#n.runNext(this)}}#r(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),Qn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function FT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cF=class extends vc{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 r=new lF({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=_h(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=_h(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=_h(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=_h(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Qn.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=>uC(t,n))}findAll(e={}){return this.getAll().filter(t=>uC(e,t))}notify(e){Qn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Qn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Nr))))}};function _h(e){return e.options.scope?.id}var uF=class extends vc{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}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),Mp(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Ps(n.mutationKey)!==Ps(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.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??FT();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}}#a(t){Qn.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,r,i)}catch(a){Promise.reject(a)}try{this.#i.onSettled?.(t.data,null,n,r,i)}catch(a){Promise.reject(a)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,r,i)}catch(a){Promise.reject(a)}try{this.#i.onSettled?.(void 0,t.error,n,r,i)}catch(a){Promise.reject(a)}}}this.listeners.forEach(n=>{n(this.#t)})})}},dF=class extends vc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Cx(r,t);let a=this.get(i);return a||(a=new nF({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),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(){Qn.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=>cC(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>cC(e,n)):t}notify(e){Qn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Qn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},fF=class{#e;#t;#n;#i;#r;#a;#s;#o;constructor(e={}){this.#e=e.queryCache||new dF,this.#t=e.mutationCache||new cF,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=Tx.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Lp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=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),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pa(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(r.queryHash)?.state.data,l=VP(t,a);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Qn.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Qn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Qn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qn.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Nr).catch(Nr)}invalidateQueries(e,t={}){return Qn.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},r=Qn.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(Nr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Nr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nr).catch(Nr)}fetchInfiniteQuery(e){return e.behavior=_p(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nr).catch(Nr)}ensureInfiniteQueryData(e){return e.behavior=_p(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lp.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.#i.set(Ps(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{dd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Ps(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{dd(e,r.mutationKey)&&Object.assign(n,r.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=Cx(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===Ex&&(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()}},BT=C.createContext(void 0),en=e=>{const t=C.useContext(BT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hF=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(BT.Provider,{value:e,children:t})),HT=C.createContext(!1),pF=()=>C.useContext(HT);HT.Provider;function mF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gF=C.createContext(mF()),yF=()=>C.useContext(gF),xF=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?kx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},bF=e=>{C.useEffect(()=>{e.clearReset()},[e])},vF=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||kx(n,[e.error,r])),wF=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},SF=(e,t)=>e.isLoading&&e.isFetching&&!t,CF=(e,t)=>e?.suspense&&t.isPending,yC=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function UT(e,t,n){const r=pF(),i=yF(),a=en(),l=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=a.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",wF(l),xF(l,i,c),bF(i);const d=!a.getQueryCache().get(l.queryHash),[f]=C.useState(()=>new t(a,l)),g=f.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(y=>{const x=p?f.subscribe(Qn.batchCalls(y)):Nr;return f.updateResult(),x},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),C.useEffect(()=>{f.setOptions(l)},[l,f]),CF(l,g))throw yC(l,f,i);if(vF({result:g,errorResetBoundary:i,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw g.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(l,g),l.experimental_prefetchInRender&&!zs&&SF(g,r)&&(d?yC(l,f,i):c?.promise)?.catch(Nr).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?g:f.trackResult(g)}function er(e,t){return UT(e,zT)}function un(e,t){const n=en(),[r]=C.useState(()=>new uF(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(l=>r.subscribe(Qn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=C.useCallback((l,c)=>{r.mutate(l,c).catch(Nr)},[r]);if(i.error&&kx(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function EF(e,t){return UT(e,sF)}const kF={queries:{gcTime:0,refetchOnWindowFocus:!1,retry:!1,staleTime:0}};function qT(e){return cn(e.defaultTagName??"div",e,e)}const xC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bC=mT,vm=(e,t)=>n=>{var r;if(t?.variants==null)return bC(e,n?.class,n?.className);const{variants:i,defaultVariants:a}=t,l=Object.keys(i).map(f=>{const g=n?.[f],p=a?.[f];if(g===null)return null;const y=xC(g)||xC(p);return i[f][y]}),c=n&&Object.entries(n).reduce((f,g)=>{let[p,y]=g;return y===void 0||(f[p]=y),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,g)=>{let{class:p,className:y,...x}=g;return Object.entries(x).every(v=>{let[S,E]=v;return Array.isArray(E)?E.includes({...a,...c}[S]):{...a,...c}[S]===E})?[...f,p,y]:f},[]);return bC(e,l,d,n?.class,n?.className)},TF=vm("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function yo({className:e,variant:t="default",render:n,...r}){return qT({defaultTagName:"span",props:Ha({className:ge(TF({variant:t}),e)},r),render:n,state:{slot:"badge",variant:t}})}const Rx="/assets/logo-DJvq-PY2.svg",vC=e=>{let t;const n=new Set,r=(f,g)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const y=t;t=g??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(x=>x(t,y))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,i,c);return c},NF=(e=>e?vC(e):vC),RF=e=>e;function AF(e,t=RF){const n=ke.useSyncExternalStore(e.subscribe,ke.useCallback(()=>t(e.getState()),[e,t]),ke.useCallback(()=>t(e.getInitialState()),[e,t]));return ke.useDebugValue(n),n}const wC=e=>{const t=NF(e),n=r=>AF(t,r);return Object.assign(n,t),n},Ys=(e=>e?wC(e):wC);function wm(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const l=d=>d===null?null:JSON.parse(d,void 0),c=(a=n.getItem(i))!=null?a:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const U2=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return U2(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return U2(r)(n)}}}},jF=(e,t)=>(n,r,i)=>{let a={storage:wm(()=>window.localStorage),partialize:E=>E,version:0,merge:(E,k)=>({...k,...E}),...t},l=!1,c=0;const d=new Set,f=new Set;let g=a.storage;if(!g)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...E)},r,i);const p=()=>{const E=a.partialize({...r()});return g.setItem(a.name,{state:E,version:a.version})},y=i.setState;i.setState=(E,k)=>(y(E,k),p());const x=e((...E)=>(n(...E),p()),r,i);i.getInitialState=()=>x;let v;const S=()=>{var E,k;if(!g)return;const T=++c;l=!1,d.forEach(M=>{var O;return M((O=r())!=null?O:x)});const R=((k=a.onRehydrateStorage)==null?void 0:k.call(a,(E=r())!=null?E:x))||void 0;return U2(g.getItem.bind(g))(a.name).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==a.version){if(a.migrate){const O=a.migrate(M.state,M.version);return O instanceof Promise?O.then(A=>[!0,A]):[!0,O]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,M.state];return[!1,void 0]}).then(M=>{var O;if(T!==c)return;const[A,N]=M;if(v=a.merge(N,(O=r())!=null?O:x),n(v,!0),A)return p()}).then(()=>{T===c&&(R?.(v,void 0),v=r(),l=!0,f.forEach(M=>M(v)))}).catch(M=>{T===c&&R?.(void 0,M)})};return i.persist={setOptions:E=>{a={...a,...E},E.storage&&(g=E.storage)},clearStorage:()=>{g?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>S(),hasHydrated:()=>l,onHydrate:E=>(d.add(E),()=>{d.delete(E)}),onFinishHydration:E=>(f.add(E),()=>{f.delete(E)})},a.skipHydration||S(),v||x},Ax=jF,OF=5e3;class MF{constructor(t){this.socket=t}on(t,n){return this.socket.on(t,n),()=>{this.socket.off(t,n)}}async request(t,n,r){return new Promise((i,a)=>{let l=!1;const c=r?.timeout??OF,d=globalThis.setTimeout(()=>{l=!0,a(new Error(`Request timed out after ${c}ms`))},c);this.socket.emit(t,n,f=>{if(!l)if(l=!0,globalThis.clearTimeout(d),f.success)i(f.data);else{const g=Object.assign(new Error(f.error??"Request failed"),f.code?{code:f.code}:{});a(g)}})})}}const SC={apiClient:null,connectionState:"disconnected",error:null,isConnected:!1,projectCwd:"",reconnectCount:0,selectedProject:"",socket:null,version:""},De=Ys()(Ax(e=>({...SC,incrementReconnectCount:()=>e(t=>({reconnectCount:t.reconnectCount+1})),reset:()=>e({...SC,selectedProject:""}),setConnectionState:t=>e({connectionState:t,isConnected:t==="connected"}),setError:t=>e({connectionState:"disconnected",error:t,isConnected:!1}),setSelectedProject:t=>e({selectedProject:t}),setSocket:(t,n)=>e({apiClient:new MF(t),connectionState:"connected",error:null,isConnected:!0,projectCwd:n.projectCwd,reconnectCount:0,socket:t,version:n.version})}),{name:"brv-transport",partialize:e=>({selectedProject:e.selectedProject}),storage:wm(()=>sessionStorage)})),LF={destructive:"border-red-500/20 bg-red-500/10 text-red-600 dark:text-red-400",info:"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400",warn:"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400"},CC={destructive:"bg-red-500",info:"bg-blue-500",warn:"bg-orange-500"};function _F({className:e}){return h.jsx("img",{alt:"Byterover",className:e,src:Rx})}function VT({children:e,tone:t}){return h.jsxs(yo,{className:ge("h-auto gap-1.5 px-2 py-0.5 text-[11px]",LF[t]),variant:"outline",children:[h.jsx("span",{className:ge("relative size-1.5 rounded-full",CC[t]),children:h.jsx("span",{className:ge("absolute inset-0 animate-ping rounded-full opacity-50",CC[t])})}),e]})}function $T(){const e=De(t=>t.version);return e?h.jsxs("span",{className:"text-muted-foreground/70 ml-auto font-mono text-[10px]",children:["v",e]}):null}function GT({body:e,footer:t,pill:n,title:r}){return h.jsx("div",{className:"bg-background fixed inset-0 flex items-center justify-center p-6",children:h.jsxs("div",{className:"border-border bg-card text-card-foreground w-full max-w-md overflow-hidden rounded-xl border shadow-[0_1px_0_0_rgba(0,0,0,0.02),0_8px_28px_-10px_rgba(0,0,0,0.12)] dark:shadow-[0_1px_0_0_rgba(0,0,0,0.4),0_8px_32px_-10px_rgba(0,0,0,0.6)]",children:[h.jsxs("div",{className:"flex items-center justify-between gap-4 px-5 pt-4",children:[h.jsxs("div",{className:"inline-flex min-w-0 items-center gap-2.5",children:[h.jsx(_F,{className:"size-8"}),h.jsx("h2",{className:"text-sm leading-tight font-semibold",children:r})]}),n]}),h.jsx("div",{className:"px-5 pt-2 pb-4",children:e}),t&&h.jsx("div",{className:"border-border bg-foreground/1.5 flex items-center gap-2 border-t px-5 py-2.5",children:t})]})})}function DF(){return h.jsx(GT,{body:h.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:"Establishing a connection to the ByteRover daemon. This usually takes less than a second."}),footer:h.jsxs(h.Fragment,{children:[h.jsx("span",{"aria-hidden":!0,className:"bg-blue-500/70 size-1.5 animate-pulse rounded-full"}),h.jsx("span",{className:"text-muted-foreground text-xs",children:"Waiting for the daemon…"}),h.jsx($T,{})]}),pill:h.jsx(VT,{tone:"info",children:"Connecting"}),title:"Connecting to ByteRover"})}function IF({textToCopy:e,className:t,showCopiedText:n=!0,onCopied:r}){const[i,a]=C.useState(!1),l=async()=>{try{await navigator.clipboard.writeText(e),a(!0),r?.(),setTimeout(()=>a(!1),2e3)}catch(c){console.error("Failed to copy text: ",c)}};return h.jsx("button",{type:"button",onClick:()=>{l()},className:ge("box-border flex shrink-0 cursor-pointer items-center justify-center gap-1 overflow-clip rounded-md p-1","hover:bg-input text-muted-foreground transition-colors",t),children:i?h.jsxs("div",{className:"flex items-center gap-1.5",children:[n&&h.jsx("span",{className:"pl-0.5 text-xs font-medium",children:"Copied!"}),h.jsx(lk,{className:"size-4 text-green-500"})]}):h.jsx(yO,{className:"size-4"})})}const mo=Object.create(null);mo.open="0";mo.close="1";mo.ping="2";mo.pong="3";mo.message="4";mo.upgrade="5";mo.noop="6";const ip=Object.create(null);Object.keys(mo).forEach(e=>{ip[mo[e]]=e});const q2={type:"error",data:"parser error"},YT=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",WT=typeof ArrayBuffer=="function",KT=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jx=({type:e,data:t},n,r)=>YT&&t instanceof Blob?n?r(t):EC(t,r):WT&&(t instanceof ArrayBuffer||KT(t))?n?r(t):EC(new Blob([t]),r):r(mo[e]+(t||"")),EC=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function kC(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let R1;function zF(e,t){if(YT&&e.data instanceof Blob)return e.data.arrayBuffer().then(kC).then(t);if(WT&&(e.data instanceof ArrayBuffer||KT(e.data)))return t(kC(e.data));jx(e,!1,n=>{R1||(R1=new TextEncoder),t(R1.encode(n))})}const TC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<TC.length;e++)Uu[TC.charCodeAt(e)]=e;const PF=e=>{let t=e.length*.75,n=e.length,r,i=0,a,l,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),g=new Uint8Array(f);for(r=0;r<n;r+=4)a=Uu[e.charCodeAt(r)],l=Uu[e.charCodeAt(r+1)],c=Uu[e.charCodeAt(r+2)],d=Uu[e.charCodeAt(r+3)],g[i++]=a<<2|l>>4,g[i++]=(l&15)<<4|c>>2,g[i++]=(c&3)<<6|d&63;return f},FF=typeof ArrayBuffer=="function",Ox=(e,t)=>{if(typeof e!="string")return{type:"message",data:QT(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:BF(e.substring(1),t)}:ip[n]?e.length>1?{type:ip[n],data:e.substring(1)}:{type:ip[n]}:q2},BF=(e,t)=>{if(FF){const n=PF(e);return QT(n,t)}else return{base64:!0,data:e}},QT=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,XT="",HF=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((a,l)=>{jx(a,!1,c=>{r[l]=c,++i===n&&t(r.join(XT))})})},UF=(e,t)=>{const n=e.split(XT),r=[];for(let i=0;i<n.length;i++){const a=Ox(n[i],t);if(r.push(a),a.type==="error")break}return r};function qF(){return new TransformStream({transform(e,t){zF(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let A1;function Dh(e){return e.reduce((t,n)=>t+n.length,0)}function Ih(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function VF(e,t){A1||(A1=new TextDecoder);const n=[];let r=0,i=-1,a=!1;return new TransformStream({transform(l,c){for(n.push(l);;){if(r===0){if(Dh(n)<1)break;const d=Ih(n,1);a=(d[0]&128)===128,i=d[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Dh(n)<2)break;const d=Ih(n,2);i=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Dh(n)<8)break;const d=Ih(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),g=f.getUint32(0);if(g>Math.pow(2,21)-1){c.enqueue(q2);break}i=g*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Dh(n)<i)break;const d=Ih(n,i);c.enqueue(Ox(a?d:A1.decode(d),t)),r=0}if(i===0||i>e){c.enqueue(q2);break}}}})}const ZT=4;function $n(e){if(e)return $F(e)}function $F(e){for(var t in $n.prototype)e[t]=$n.prototype[t];return e}$n.prototype.on=$n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};$n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};$n.prototype.off=$n.prototype.removeListener=$n.prototype.removeAllListeners=$n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};$n.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};$n.prototype.emitReserved=$n.prototype.emit;$n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};$n.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Sm=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ji=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),GF="arraybuffer";function JT(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const YF=ji.setTimeout,WF=ji.clearTimeout;function Cm(e,t){t.useNativeTimers?(e.setTimeoutFn=YF.bind(ji),e.clearTimeoutFn=WF.bind(ji)):(e.setTimeoutFn=ji.setTimeout.bind(ji),e.clearTimeoutFn=ji.clearTimeout.bind(ji))}const KF=1.33;function QF(e){return typeof e=="string"?XF(e):Math.ceil((e.byteLength||e.size)*KF)}function XF(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function e9(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function ZF(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function JF(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class eB extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Mx extends $n{constructor(t){super(),this.writable=!1,Cm(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new eB(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Ox(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=ZF(t);return n.length?"?"+n:""}}class tB extends Mx{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};UF(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,HF(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=e9()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let t9=!1;try{t9=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nB=t9;function rB(){}class iB extends tB{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Jl=class op extends $n{constructor(t,n,r){super(),this.createRequest=t,Cm(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=JT(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=op.requestsCount++,op.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=rB,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete op.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Jl.requestsCount=0;Jl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",NC);else if(typeof addEventListener=="function"){const e="onpagehide"in ji?"pagehide":"unload";addEventListener(e,NC,!1)}}function NC(){for(let e in Jl.requests)Jl.requests.hasOwnProperty(e)&&Jl.requests[e].abort()}const oB=(function(){const e=n9({xdomain:!1});return e&&e.responseType!==null})();class aB extends iB{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=oB&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Jl(n9,this.uri(),t)}}function n9(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||nB))return new XMLHttpRequest}catch{}if(!t)try{return new ji[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const r9=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class sB extends Mx{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=r9?{}:JT(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;jx(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}i&&Sm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=e9()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const j1=ji.WebSocket||ji.MozWebSocket;class lB extends sB{createSocket(t,n,r){return r9?new j1(t,n,r):n?new j1(t,n):new j1(t)}doWrite(t,n){this.ws.send(n)}}class cB extends Mx{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=VF(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=qF();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Sm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const uB={websocket:lB,webtransport:cB,polling:aB},dB=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fB=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function V2(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=dB.exec(e||""),a={},l=14;for(;l--;)a[fB[l]]=i[l]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=hB(a,a.path),a.queryKey=pB(a,a.query),a}function hB(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function pB(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,a){i&&(n[i]=a)}),n}const $2=typeof addEventListener=="function"&&typeof removeEventListener=="function",ap=[];$2&&addEventListener("offline",()=>{ap.forEach(e=>e())},!1);class Fa extends $n{constructor(t,n){if(super(),this.binaryType=GF,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=V2(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=V2(n.host).host);Cm(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=JF(this.opts.query)),$2&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ap.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=ZT,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Fa.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Fa.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=QF(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Sm(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Fa.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),$2&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ap.indexOf(this._offlineEventListener);r!==-1&&ap.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Fa.protocol=ZT;class mB extends Fa{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Fa.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fa.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=n.name,this.emitReserved("upgradeError",y)}}))};function a(){r||(r=!0,g(),n.close(),n=null)}const l=p=>{const y=new Error("probe error: "+p);y.transport=n.name,a(),this.emitReserved("upgradeError",y)};function c(){l("transport closed")}function d(){l("socket closed")}function f(p){n&&p.name!==n.name&&a()}const g=()=>{n.removeListener("open",i),n.removeListener("error",l),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",i),n.once("error",l),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let gB=class extends mB{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>uB[i]).filter(i=>!!i)),super(t,r)}};function yB(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=V2(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const xB=typeof ArrayBuffer=="function",bB=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,i9=Object.prototype.toString,vB=typeof Blob=="function"||typeof Blob<"u"&&i9.call(Blob)==="[object BlobConstructor]",wB=typeof File=="function"||typeof File<"u"&&i9.call(File)==="[object FileConstructor]";function Lx(e){return xB&&(e instanceof ArrayBuffer||bB(e))||vB&&e instanceof Blob||wB&&e instanceof File}function sp(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(sp(e[n]))return!0;return!1}if(Lx(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return sp(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&sp(e[n]))return!0;return!1}function SB(e){const t=[],n=e.data,r=e;return r.data=G2(n,t),r.attachments=t.length,{packet:r,buffers:t}}function G2(e,t){if(!e)return e;if(Lx(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=G2(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=G2(e[r],t));return n}return e}function CB(e,t){return e.data=Y2(e.data,t),delete e.attachments,e}function Y2(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Y2(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Y2(e[n],t));return e}const EB=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var It;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(It||(It={}));class kB{constructor(t){this.replacer=t}encode(t){return(t.type===It.EVENT||t.type===It.ACK)&&sp(t)?this.encodeAsBinary({type:t.type===It.EVENT?It.BINARY_EVENT:It.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===It.BINARY_EVENT||t.type===It.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=SB(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class _x extends $n{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===It.BINARY_EVENT;r||n.type===It.BINARY_ACK?(n.type=r?It.EVENT:It.ACK,this.reconstructor=new TB(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Lx(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(It[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===It.BINARY_EVENT||r.type===It.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(a,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(l);if(!NB(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const a=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(_x.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case It.CONNECT:return RC(n);case It.DISCONNECT:return n===void 0;case It.CONNECT_ERROR:return typeof n=="string"||RC(n);case It.EVENT:case It.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&EB.indexOf(n[0])===-1);case It.ACK:case It.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class TB{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=CB(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const NB=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function RC(e){return Object.prototype.toString.call(e)==="[object Object]"}const RB=Object.freeze(Object.defineProperty({__proto__:null,Decoder:_x,Encoder:kB,get PacketType(){return It}},Symbol.toStringTag,{value:"Module"}));function Yi(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const AB=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class o9 extends $n{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Yi(t,"open",this.onopen.bind(this)),Yi(t,"packet",this.onpacket.bind(this)),Yi(t,"error",this.onerror.bind(this)),Yi(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,a;if(AB.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const l={type:It.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,p=n.pop();this._registerAckCallback(g,p),l.id=g}const c=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},i),l=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((r,i)=>{const a=(l,c)=>l?i(l):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...a)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:It.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case It.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case It.EVENT:case It.BINARY_EVENT:this.onevent(t);break;case It.ACK:case It.BINARY_ACK:this.onack(t);break;case It.DISCONNECT:this.ondisconnect();break;case It.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:It.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:It.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function wc(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}wc.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};wc.prototype.reset=function(){this.attempts=0};wc.prototype.setMin=function(e){this.ms=e};wc.prototype.setMax=function(e){this.max=e};wc.prototype.setJitter=function(e){this.jitter=e};class W2 extends $n{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Cm(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new wc({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||RB;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new gB(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Yi(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=Yi(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(i),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Yi(t,"ping",this.onping.bind(this)),Yi(t,"data",this.ondata.bind(this)),Yi(t,"error",this.onerror.bind(this)),Yi(t,"close",this.onclose.bind(this)),Yi(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Sm(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new o9(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ku={};function lp(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=yB(e,t.path||"/socket.io"),r=n.source,i=n.id,a=n.path,l=ku[i]&&a in ku[i].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let d;return c?d=new W2(r,t):(ku[i]||(ku[i]=new W2(r,t)),d=ku[i]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(lp,{Manager:W2,Socket:o9,io:lp,connect:lp});class a9 extends Error{constructor(t){super(t),this.name="UiConfigError"}}async function jB(){const e=await fetch("/api/ui/config");if(!e.ok)throw new a9(`Failed to fetch UI config: ${e.statusText}`);return e.json()}function OB(e,t){e.emit("client:register",{clientType:"webui",projectPath:t},()=>{}),e.emit("room:join","broadcast-room")}async function MB(e){const t=await jB(),n=lp(`http://127.0.0.1:${t.daemonPort}`,{reconnection:!0,reconnectionAttempts:30,reconnectionDelay:50,reconnectionDelayMax:1e3,transports:["websocket"]});return n.on("connect",()=>OB(n,e)),await new Promise((r,i)=>{const a=()=>{clearTimeout(d),n.off("connect",l),n.off("connect_error",c)},l=()=>{a(),r()},c=f=>{a(),i(f)},d=setTimeout(()=>{a(),i(new Error("Connection timeout"))},5e3);n.once("connect",l),n.once("connect_error",c)}),{config:t,socket:n}}function AC({error:e}){const t=e instanceof a9,n=De(a=>a.reconnectCount),r=t?"brv restart":"brv webui",i=t?"Web UI server not available":"ByteRover is not running";return h.jsx(GT,{body:h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:t?h.jsxs(h.Fragment,{children:["Could not load"," ",h.jsx("code",{className:"bg-muted text-foreground rounded px-1.5 py-0.5 font-mono text-xs",children:"/api/ui-config"}),". The dev server may have stopped or moved to a different port. Restart it from your terminal:"]}):"Could not connect to the ByteRover daemon. Start it from your terminal:"}),h.jsxs("div",{className:"bg-muted mt-3 flex items-center justify-between gap-3 rounded-md px-3.5 py-2.5 font-mono text-xs",children:[h.jsxs("span",{children:[h.jsx("span",{className:"text-muted-foreground",children:"$"})," ",r]}),h.jsx(IF,{className:"-mr-1",showCopiedText:!1,textToCopy:r})]})]}),footer:h.jsxs(h.Fragment,{children:[t?h.jsx("span",{className:"text-muted-foreground/80 text-xs",children:"Refresh once the host is back."}):h.jsxs(h.Fragment,{children:[h.jsx("span",{"aria-hidden":!0,className:"bg-muted-foreground/60 size-1.5 animate-pulse rounded-full"}),h.jsxs("span",{className:"text-muted-foreground text-xs",children:["Reconnecting",h.jsx("span",{className:"opacity-60",children:" · attempt "}),h.jsx("span",{className:"text-foreground tabular-nums",children:n})]})]}),h.jsx($T,{})]}),pill:h.jsx(VT,{tone:t?"destructive":"warn",children:t?"Unreachable":"Offline"}),title:i})}function LB({children:e}){const t=De(f=>f.incrementReconnectCount),n=De(f=>f.setConnectionState),r=De(f=>f.setError),i=De(f=>f.setSocket),a=De(f=>f.selectedProject);C.useEffect(()=>{let f=!0,g=null,p=null;async function y(){try{n("connecting");const{config:x,socket:v}=await MB(a);if(!f){v.disconnect();return}g=v,i(v,x),v.on("disconnect",()=>{f&&n("disconnected")}),v.io.on("reconnect_attempt",()=>{f&&(t(),n("reconnecting"))}),v.io.on("reconnect",()=>{f&&n("connected")})}catch(x){if(!f)return;r(x instanceof Error?x:new Error(String(x))),t(),p=setTimeout(y,3e3)}}return y(),()=>{f=!1,g?.disconnect(),p!==null&&clearTimeout(p)}},[a,t,n,r,i]);const l=De(f=>f.connectionState),c=De(f=>f.error),d=De(f=>f.apiClient);return c?h.jsx(AC,{error:c}):l==="connecting"?h.jsx(DF,{}):d?h.jsx(h.Fragment,{children:e}):h.jsx(AC,{})}const _B=new fF({defaultOptions:kF});function DB({children:e}){return h.jsx(hF,{client:_B,children:h.jsx(LB,{children:h.jsx(Sx,{delay:0,children:e})})})}const Dd={GET_STATE:"auth:getState",LOGIN_COMPLETED:"auth:loginCompleted",LOGOUT:"auth:logout",START_LOGIN:"auth:startLogin",STATE_CHANGED:"auth:stateChanged"},IB={GET_ENVIRONMENT:"config:getEnvironment"},Dx={GET_AGENTS:"connectors:getAgents",INSTALL:"connectors:install",LIST:"connectors:list"},Id={GET_FILE:"contextTree:getFile",GET_FILE_METADATA:"contextTree:getFileMetadata",GET_HISTORY:"contextTree:getHistory",GET_NODES:"contextTree:getNodes",UPDATE_FILE:"contextTree:updateFile"},_l={CHUNK:"llmservice:chunk",ERROR:"llmservice:error",RESPONSE:"llmservice:response",THINKING:"llmservice:thinking",TOOL_CALL:"llmservice:toolCall",TOOL_RESULT:"llmservice:toolResult"},s9={GET:"locations:get",REVEAL:"locations:reveal"},l9={LIST:"model:list",SET_ACTIVE:"model:setActive"},Qo={AWAIT_OAUTH_CALLBACK:"provider:awaitOAuthCallback",CONNECT:"provider:connect",DISCONNECT:"provider:disconnect",GET_ACTIVE:"provider:getActive",LIST:"provider:list",SET_ACTIVE:"provider:setActive",START_OAUTH:"provider:startOAuth",UPDATED:"provider:updated",VALIDATE_API_KEY:"provider:validateApiKey"},Rs={CANCELLED:"task:cancelled",COMPLETED:"task:completed",CREATE:"task:create",CREATED:"task:created",ERROR:"task:error",LIST:"task:list",STARTED:"task:started"},kr={ALREADY_INITIALIZED:"ERR_VC_ALREADY_INITIALIZED",AUTH_FAILED:"ERR_VC_AUTH_FAILED",BRANCH_NOT_FOUND:"ERR_VC_BRANCH_NOT_FOUND",CONFIG_KEY_NOT_SET:"ERR_VC_CONFIG_KEY_NOT_SET",GIT_NOT_INITIALIZED:"ERR_VC_GIT_NOT_INITIALIZED",NO_COMMITS:"ERR_VC_NO_COMMITS",NO_REMOTE:"ERR_VC_NO_REMOTE",NO_UPSTREAM:"ERR_VC_NO_UPSTREAM",NON_FAST_FORWARD:"ERR_VC_NON_FAST_FORWARD",NOTHING_TO_PUSH:"ERR_VC_NOTHING_TO_PUSH",REMOTE_ALREADY_EXISTS:"ERR_VC_REMOTE_ALREADY_EXISTS",USER_NOT_CONFIGURED:"ERR_VC_USER_NOT_CONFIGURED"},On={ADD:"vc:add",BRANCH:"vc:branch",CHECKOUT:"vc:checkout",CLONE:"vc:clone",CLONE_PROGRESS:"vc:clone:progress",COMMIT:"vc:commit",CONFIG:"vc:config",DIFF:"vc:diff",DIFFS:"vc:diffs",DISCARD:"vc:discard",FETCH:"vc:fetch",INIT:"vc:init",LOG:"vc:log",MERGE:"vc:merge",PULL:"vc:pull",PUSH:"vc:push",REMOTE:"vc:remote",RESET:"vc:reset",STATUS:"vc:status"},jC={activeModel:null,favorites:[],isLoading:!1,models:[],recent:[]},zB=Ys()(e=>({...jC,reset:()=>e(jC),setActiveModel:t=>e({activeModel:t}),setLoading:t=>e({isLoading:t}),setModels:t=>e({activeModel:t.activeModel??null,favorites:t.favorites,models:t.models,recent:t.recent})})),OC={activeProviderId:null,isDialogOpen:!1,isLoading:!1,providers:[]},Dp=Ys()(e=>({...OC,closeProviderDialog:()=>e({isDialogOpen:!1}),openProviderDialog:()=>e({isDialogOpen:!0}),reset:()=>e(OC),setActiveProviderId:t=>e({activeProviderId:t}),setLoading:t=>e({isLoading:t}),setProviders:t=>e({providers:t}),updateProvider:(t,n)=>e(r=>({providers:r.providers.map(i=>i.id===t?{...i,...n}:i)}))})),PB=()=>{const{apiClient:e}=De.getState();return e?e.request(Dd.GET_STATE,void 0,{timeout:5e3}):Promise.reject(new Error("Not connected"))},co=()=>({gcTime:300*1e3,queryFn:PB,queryKey:["auth","state"],staleTime:60*1e3}),FB=({queryConfig:e}={})=>er({...co(),...e}),MC={brvConfig:null,isAuthorized:!1,isLoadingInitial:!0,isLoggingIn:!1,user:null},ci=Ys()(e=>({...MC,reset:()=>e(MC),setLoggingIn:t=>e({isLoggingIn:t}),setState:t=>e(n=>({brvConfig:t.isAuthorized?t.brvConfig===void 0?n.brvConfig:t.brvConfig:null,isAuthorized:t.isAuthorized,isLoggingIn:!1,user:t.isAuthorized?t.user===void 0?n.user:t.user:null}))}));function BB({children:e}){const t=De(f=>f.apiClient),n=De(f=>f.connectionState),r=De(f=>f.reconnectCount),i=en(),a=ci(f=>f.setState),{data:l,isFetched:c,isLoading:d}=FB({queryConfig:{enabled:t!==null,retry:5,retryDelay:f=>Math.min(500*2**f,2e3),staleTime:120*1e3}});return C.useEffect(()=>{l?(a({brvConfig:l.brvConfig??null,isAuthorized:l.isAuthorized,user:l.user??null}),ci.setState({isLoadingInitial:!1})):c&&!d&&ci.setState({isLoadingInitial:!1})},[l,c,d,a]),C.useEffect(()=>t?t.on(Dd.STATE_CHANGED,g=>{a({brvConfig:g.brvConfig,isAuthorized:g.isAuthorized,user:g.user}),g.isAuthorized||(Dp.getState().reset(),zB.getState().reset()),g.isAuthorized&&i.invalidateQueries({queryKey:co().queryKey}).catch(()=>{})}):void 0,[t,i,a]),C.useEffect(()=>{t&&n==="connected"&&r!==0&&i.invalidateQueries({queryKey:co().queryKey}).catch(()=>{})},[t,n,i,r]),h.jsx(h.Fragment,{children:e})}const HB=()=>{const{apiClient:e}=De.getState();return e?e.request(Qo.GET_ACTIVE):Promise.reject(new Error("Not connected"))},Ix=()=>({queryFn:HB,queryKey:["getActiveProviderConfig"]}),zx=({queryConfig:e}={})=>er({...Ix(),...e}),UB=()=>{const{apiClient:e}=De.getState();return e?e.request(Qo.LIST):Promise.reject(new Error("Not connected"))},Sc=()=>({queryFn:UB,queryKey:["providers"]}),c9=({queryConfig:e}={})=>er({...Sc(),...e});function qB(){const e=De(n=>n.apiClient),t=en();C.useEffect(()=>e?e.on(Qo.UPDATED,()=>{t.invalidateQueries({queryKey:Sc().queryKey}),t.invalidateQueries({queryKey:Ix().queryKey})}):void 0,[e,t])}function VB(){return qB(),null}const $B=e=>{const{apiClient:t}=De.getState();return t?t.request(Rs.LIST,e):Promise.reject(new Error("Not connected"))},GB=e=>({queryFn:()=>$B(e?{projectPath:e}:void 0),queryKey:["tasks","list",e??""]}),u9=({projectPath:e,queryConfig:t}={})=>er({...GB(e),...t});function LC(e,t){if(t.length===0)return e;const n=new Map(t.map(i=>[i.taskId,i])),r=e.map(i=>{const a=n.get(i.taskId);return a?(n.delete(i.taskId),WB(i,a)):i});for(const i of n.values())r.push(i);return r}function YB(e,t){const n=e.filter(r=>r.taskId!==t);return n.length===e.length?e:n}function WB(e,t){return{...e,...KB(t)}}function KB(e){const t={};for(const[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function QB(e,t){const n=e.toolCalls??[],r=t.callId?n.findIndex(i=>i.callId===t.callId):-1;if(r>=0){const i=n[r],a=t.args&&Object.keys(t.args).length>0,l=[...n];return l[r]={...i,args:a?t.args:i.args,sessionId:t.sessionId},{...e,sessionId:t.sessionId,toolCalls:l}}return{...e,sessionId:t.sessionId,toolCalls:[...n,t]}}function XB(e,t){const n=e.toolCalls??[];if(n.length===0)return e;let r=-1;if(t.callId&&(r=n.findIndex(a=>a.callId===t.callId)),r===-1&&t.toolName){for(let a=n.length-1;a>=0;a--)if(n[a].toolName===t.toolName&&n[a].status==="running"){r=a;break}}if(r===-1)return e;const i=[...n];return i[r]={...i[r],error:t.error,errorType:t.errorType,result:t.result,status:t.success?"completed":"error"},{...e,toolCalls:i}}function ZB(e,t){const n=e.reasoningContents??[],r=n.at(-1);return t.isThinking&&r?.isThinking?e:{...e,reasoningContents:[...n,t]}}function JB(e,t){if(t.type==="reasoning"){const n=e.reasoningContents??[],r=n.length-1,i=n[r];if(i){const a=[...n];return a[r]={...i,content:i.content+t.content,isThinking:!1},{...e,isStreaming:!t.isComplete,reasoningContents:a,sessionId:t.sessionId??e.sessionId}}return{...e,isStreaming:!t.isComplete,reasoningContents:[{content:t.content,isThinking:!1,timestamp:Date.now()}],sessionId:t.sessionId??e.sessionId}}return{...e,isStreaming:!t.isComplete,sessionId:t.sessionId??e.sessionId,streamingContent:(e.streamingContent??"")+t.content}}function eH(e,t){return{...e,isStreaming:!1,responseContent:t.content,sessionId:t.sessionId??e.sessionId,streamingContent:void 0}}function d9(e){return e==="curate-folder"?"curate":e}const f9=new Set(["cancelled","completed","error"]);function Ma(e){return f9.has(e)}function zd(e){return!f9.has(e)}const _C={searchQuery:"",statusFilter:"all",tasks:[],typeFilter:"all"};function Dl(e,t,n){const r=e.tasks.findIndex(l=>l.taskId===t);if(r===-1)return;const i=n(e.tasks[r]);if(i===e.tasks[r])return;const a=[...e.tasks];return a[r]=i,{tasks:a}}const ai=Ys()(Ax((e,t)=>({..._C,addReasoningContent:(n,r)=>e(i=>Dl(i,n,a=>ZB(a,r))??{}),addToolCall:(n,r)=>e(i=>Dl(i,n,a=>QB(a,r))??{}),appendStreamingContent:({content:n,isComplete:r,sessionId:i,taskId:a,type:l})=>e(c=>Dl(c,a,d=>JB(d,{content:n,isComplete:r,sessionId:i,type:l}))??{}),clearCompleted:()=>e(n=>({tasks:n.tasks.filter(r=>!Ma(r.status))})),markLlmServiceError:n=>e(r=>Dl(r,n,i=>({...i,hadLlmServiceError:!0}))??{}),mergeTasks:n=>e(r=>({tasks:LC(r.tasks,n)})),removeTask:n=>e(r=>({tasks:YB(r.tasks,n)})),reset:()=>e({..._C}),setResponse:(n,r,i)=>e(a=>Dl(a,n,l=>eH(l,{content:r,sessionId:i}))??{}),setSearchQuery:n=>e({searchQuery:n}),setStatusFilter:n=>e({statusFilter:n}),setTypeFilter:n=>e({typeFilter:n}),updateToolCallResult:({callId:n,error:r,errorType:i,result:a,success:l,taskId:c,toolName:d})=>e(f=>Dl(f,c,g=>XB(g,{callId:n,error:r,errorType:i,result:a,success:l,toolName:d}))??{}),upsertStatus(n,r){const i=t().tasks.find(l=>l.taskId===n),a=i?{...i,...r}:{content:"",createdAt:Date.now(),type:"unknown",...r,taskId:n};e(l=>({tasks:LC(l.tasks,[a])}))}}),{name:"brv-tasks",partialize:e=>({tasks:e.tasks}),storage:wm(()=>sessionStorage)})),tH=["all","running","completed","failed","cancelled"];function nH(e,t){return t==="all"?!0:t==="running"?e==="started"||e==="created":t==="completed"?e==="completed":t==="failed"?e==="error":t==="cancelled"?e==="cancelled":!0}function rH(e,t){if(!t)return!0;const n=t.toLowerCase();return e.content.toLowerCase().includes(n)||e.taskId.toLowerCase().includes(n)||e.type.toLowerCase().includes(n)}const iH=e=>ai(t=>e?t.tasks.find(n=>n.taskId===e):void 0),oH=()=>{const e=ai(n=>n.tasks),t={all:e.length,cancelled:0,completed:0,failed:0,running:0};for(const n of e)switch(n.status){case"cancelled":{t.cancelled++;break}case"completed":{t.completed++;break}case"created":case"started":{t.running++;break}case"error":{t.failed++;break}}return t},aH=()=>{const e=ai(i=>i.tasks);let t=0,n=0,r=0;for(const i of e)i.status==="created"?t++:i.status==="started"?n++:r++;return{completed:r,inProgress:n,pending:t,total:e.length}};function sH(){const e=De(t=>t.apiClient);C.useEffect(()=>{if(!e)return;const t=ai.getState(),n=[];return n.push(e.on(Rs.CREATED,r=>{t.upsertStatus(r.taskId,{content:r.content,createdAt:Date.now(),...r.files?.length?{files:r.files}:{},...r.folderPath?{folderPath:r.folderPath}:{},status:"created",type:r.type})}),e.on(Rs.STARTED,r=>{t.upsertStatus(r.taskId,{startedAt:Date.now(),status:"started"})}),e.on(Rs.COMPLETED,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),result:r.result,status:"completed"})}),e.on(Rs.ERROR,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),error:r.error,status:"error"})}),e.on(Rs.CANCELLED,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),status:"cancelled"})}),e.on(_l.TOOL_CALL,r=>{r.taskId&&t.addToolCall(r.taskId,{args:r.args,callId:r.callId,sessionId:r.sessionId,status:"running",timestamp:Date.now(),toolName:r.toolName})}),e.on(_l.TOOL_RESULT,r=>{r.taskId&&t.updateToolCallResult({callId:r.callId,error:r.error,errorType:r.errorType,result:r.result,success:r.success,taskId:r.taskId,toolName:r.toolName})}),e.on(_l.CHUNK,r=>{r.taskId&&t.appendStreamingContent({content:r.content,isComplete:r.isComplete??!1,sessionId:r.sessionId,taskId:r.taskId,type:r.type==="reasoning"?"reasoning":"text"})}),e.on(_l.RESPONSE,r=>{r.taskId&&t.setResponse(r.taskId,r.content,r.sessionId)}),e.on(_l.THINKING,r=>{r.taskId&&t.addReasoningContent(r.taskId,{content:"",isThinking:!0,timestamp:Date.now()})}),e.on(_l.ERROR,r=>{r.taskId&&t.markLlmServiceError(r.taskId)})),()=>{for(const r of n)r()}},[e])}function lH(){const e=De(a=>a.selectedProject),t=ai(a=>a.reset),n=ai(a=>a.mergeTasks),r=C.useRef(e);sH(),C.useEffect(()=>{r.current!==e&&(t(),r.current=e)},[e,t]);const{data:i}=u9({projectPath:e||void 0});return C.useEffect(()=>{i&&n(i.tasks)},[i,n]),null}function cH(){const e=zi();return De(n=>n.selectedProject)?h.jsxs(BB,{children:[h.jsx(VB,{}),h.jsx(lH,{}),h.jsx(Pk,{})]}):h.jsx(zk,{replace:!0,state:{from:e},to:"/projects"})}const Qu=["provider","curate","query","connector"],uH={seenWelcome:!1,tourActive:!1,tourCompleted:!1,tourStep:null,tourTaskId:null},Rt=Ys()(Ax((e,t)=>({...uH,advanceTour(){const{tourStep:n}=t();if(!n)return;const r=Qu.indexOf(n),i=Qu[r+1];e(i?{tourStep:i,tourTaskId:null}:{tourActive:!1,tourCompleted:!0,tourStep:null,tourTaskId:null})},dismissWelcome:()=>e({seenWelcome:!0}),exitTour:()=>e({tourActive:!1,tourStep:null,tourTaskId:null}),goToStep:n=>e({tourActive:!0,tourStep:n,tourTaskId:null}),setTourTaskId:n=>e({tourTaskId:n}),startTour:(n="provider")=>e({seenWelcome:!0,tourActive:!0,tourStep:n,tourTaskId:null})}),{name:"brv:onboarding",partialize:e=>({seenWelcome:e.seenWelcome,tourCompleted:e.tourCompleted}),storage:wm(()=>globalThis.localStorage)}));function dH(){const e=Rt(a=>a.tourActive),t=Rt(a=>a.tourStep),n=Rt(a=>a.tourTaskId);return e&&(t==="curate"||t==="query")&&!n?h.jsx("div",{"aria-hidden":!0,className:"bg-background/50 fixed inset-0 z-40 backdrop-blur-xs"}):null}const fH={connector:"Connect to your AI tool",curate:"Curate your first knowledge",provider:"Connect a provider",query:"Ask your first question"};function hH(){const[e,t]=C.useState(0);return C.useEffect(()=>{const n='[data-slot="sheet-content"][data-side="right"]';let r=null;const i=()=>{const c=document.querySelectorAll(n);let d=0;for(const f of c){const g=f.getBoundingClientRect();g.width>d&&(d=g.width)}t(f=>f===d?f:d)},a=()=>{r?.disconnect();const c=document.querySelectorAll(n);if(c.length===0){i();return}r=new globalThis.ResizeObserver(i);for(const d of c)r.observe(d);i()},l=new globalThis.MutationObserver(a);return l.observe(document.body,{childList:!0,subtree:!0}),a(),()=>{r?.disconnect(),l.disconnect()}},[]),e}function pH(){const e=Rt(g=>g.tourActive),t=Rt(g=>g.tourStep),n=Rt(g=>g.exitTour),r=hH();if(!e||!t)return null;const i=Qu.indexOf(t),l=t==="curate"||t==="query"?"top-4":"bottom-4",c=r>0,d=ge("pointer-events-none fixed z-100 flex",l,c?"":"inset-x-0 justify-center px-4"),f=c?{right:`${r+16}px`}:void 0;return h.jsx("div",{className:d,style:f,children:h.jsxs("div",{className:"border-border bg-card text-card-foreground pointer-events-auto inline-flex items-center gap-3 rounded-full border px-3 py-2 pl-3.5 shadow-[0_8px_28px_-10px_rgba(0,0,0,0.25)]",children:[h.jsx("div",{className:"inline-flex items-center gap-1",children:Qu.map((g,p)=>h.jsx("span",{"aria-hidden":!0,className:ge("h-1.5 rounded-full transition-all",p<i&&"bg-muted-foreground w-1.5",p===i&&"bg-primary-foreground w-4",p>i&&"bg-border w-1.5")},g))}),h.jsxs("span",{className:"text-foreground text-xs font-medium",children:[h.jsxs("span",{className:"text-muted-foreground mono mr-1.5 text-[10.5px]",children:[i+1,"/",Qu.length]}),fH[t]]}),h.jsx("span",{"aria-hidden":!0,className:"bg-border h-4 w-px"}),h.jsx("button",{className:"text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[11px] transition-colors",onClick:()=>n(),type:"button",children:"Exit tour"})]})})}const Px=C.createContext(void 0);function Za(e){const t=C.useContext(Px);if(e===!1&&t===void 0)throw new Error(Yn(27));return t}const mH={...$s,...xc},Fx=C.forwardRef(function(t,n){const{render:r,className:i,forceRender:a=!1,...l}=t,{store:c}=Za(),d=c.useState("open"),f=c.useState("nested"),g=c.useState("mounted"),p=c.useState("transitionStatus");return cn("div",t,{state:{open:d,transitionStatus:p},ref:[c.context.backdropRef,n],stateAttributesMapping:mH,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:a||!f})}),gH=C.createContext(void 0);function Bx(e=!1){const t=C.useContext(gH);if(t===void 0&&!e)throw new Error(Yn(16));return t}function yH(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:C.useMemo(()=>{const f={onKeyDown(g){n&&t&&g.key!=="Tab"&&g.preventDefault()}};return r||(f.tabIndex=i,!a&&n&&(f.tabIndex=t?i:-1)),(a&&(t||l)||!a&&n)&&(f["aria-disabled"]=n),a&&(!t||c)&&(f.disabled=n),f},[r,n,t,l,c,a,i])}}function Pd(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,l=C.useRef(null),c=Bx(!0),d=a??c!==void 0,{props:f}=yH({focusableWhenDisabled:n,disabled:t,composite:d,tabIndex:r,isNativeButton:i}),g=C.useCallback(()=>{const x=l.current;O1(x)&&d&&t&&f.disabled===void 0&&x.disabled&&(x.disabled=!1)},[t,f.disabled,d]);qe(g,[g]);const p=C.useCallback((x={})=>{const{onClick:v,onMouseDown:S,onKeyUp:E,onKeyDown:k,onPointerDown:T,...R}=x;return Ha({type:i?"button":void 0,onClick(O){if(t){O.preventDefault();return}v?.(O)},onMouseDown(O){t||S?.(O)},onKeyDown(O){if(t||(L2(O),k?.(O),O.baseUIHandlerPrevented))return;const A=O.target===O.currentTarget,N=O.currentTarget,D=O1(N),H=!i&&xH(N),I=A&&(i?D:!H),U=O.key==="Enter",$=O.key===" ",V=N.getAttribute("role"),G=V?.startsWith("menuitem")||V==="option"||V==="gridcell";if(A&&d&&$){if(O.defaultPrevented&&G)return;O.preventDefault(),H||i&&D?(N.click(),O.preventBaseUIHandler()):I&&(v?.(O),O.preventBaseUIHandler());return}I&&(!i&&($||U)&&O.preventDefault(),!i&&U&&v?.(O))},onKeyUp(O){if(!t){if(L2(O),E?.(O),O.target===O.currentTarget&&i&&d&&O1(O.currentTarget)&&O.key===" "){O.preventDefault();return}O.baseUIHandlerPrevented||O.target===O.currentTarget&&!i&&!d&&O.key===" "&&v?.(O)}},onPointerDown(O){if(t){O.preventDefault();return}T?.(O)}},i?void 0:{role:"button"},f,R)},[t,f,d,i]),y=lt(x=>{l.current=x,g()});return{getButtonProps:p,buttonRef:y}}function O1(e){return Rn(e)&&e.tagName==="BUTTON"}function xH(e){return!!(e?.tagName==="A"&&e?.href)}const Fd=C.forwardRef(function(t,n){const{render:r,className:i,disabled:a=!1,nativeButton:l=!0,...c}=t,{store:d}=Za(),f=d.useState("open");function g(v){f&&d.setOpen(!1,Et(lD,v.nativeEvent))}const{getButtonProps:p,buttonRef:y}=Pd({disabled:a,native:l});return cn("button",t,{state:{disabled:a},ref:[n,y],props:[{onClick:g},c,p]})}),h9=C.forwardRef(function(t,n){const{render:r,className:i,id:a,...l}=t,{store:c}=Za(),d=Qi(a);return c.useSyncedValueWithCleanup("descriptionElementId",d),cn("p",t,{ref:n,props:[{id:d},l]})});let bH=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),vH=(function(e){return e[e.open=Os.open]="open",e[e.closed=Os.closed]="closed",e[e.startingStyle=Os.startingStyle]="startingStyle",e[e.endingStyle=Os.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const p9=C.createContext(void 0);function wH(){const e=C.useContext(p9);if(e===void 0)throw new Error(Yn(26));return e}const m9="ArrowUp",g9="ArrowDown",y9="ArrowLeft",x9="ArrowRight",b9="Home",v9="End",SH=new Set([y9,x9]),CH=new Set([m9,g9]),EH=new Set([...SH,...CH]);[...EH];const w9=new Set([m9,g9,y9,x9,b9,v9]),kH={...$s,...xc,nestedDialogOpen(e){return e?{[vH.nestedDialogOpen]:""}:null}},Hx=C.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:a,render:l,...c}=t,{store:d}=Za(),f=d.useState("descriptionElementId"),g=d.useState("disablePointerDismissal"),p=d.useState("floatingRootContext"),y=d.useState("popupProps"),x=d.useState("modal"),v=d.useState("mounted"),S=d.useState("nested"),E=d.useState("nestedOpenDialogCount"),k=d.useState("open"),T=d.useState("openMethod"),R=d.useState("titleElementId"),M=d.useState("transitionStatus"),O=d.useState("role");wH(),bc({open:k,ref:d.context.popupRef,onComplete(){k&&d.context.onOpenChangeComplete?.(!0)}});function A(U){return U==="touch"?d.context.popupRef.current:!0}const N=a===void 0?A:a,D=E>0,I=cn("div",t,{state:{open:k,nested:S,transitionStatus:M,nestedDialogOpen:D},props:[y,{"aria-labelledby":R??void 0,"aria-describedby":f??void 0,role:O,tabIndex:-1,hidden:!v,onKeyDown(U){w9.has(U.key)&&U.stopPropagation()},style:{[bH.nestedDialogs]:E}},c],ref:[n,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:kH});return h.jsx(I6,{context:p,openInteractionType:T,disabled:!v,closeOnFocusOut:!g,initialFocus:N,returnFocus:i,modal:x!==!1,restoreFocus:"popup",children:I})}),S9=C.forwardRef(function(t,n){const{cutout:r,...i}=t;let a;if(r){const l=r?.getBoundingClientRect();a=`polygon(
13
+ 0% 0%,
14
+ 100% 0%,
15
+ 100% 100%,
16
+ 0% 100%,
17
+ 0% 0%,
18
+ ${l.left}px ${l.top}px,
19
+ ${l.left}px ${l.bottom}px,
20
+ ${l.right}px ${l.bottom}px,
21
+ ${l.right}px ${l.top}px,
22
+ ${l.left}px ${l.top}px
23
+ )`}return h.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})}),Ux=C.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:a}=Za(),l=a.useState("mounted"),c=a.useState("modal"),d=a.useState("open");return l||r?h.jsx(p9.Provider,{value:r,children:h.jsxs(O6,{ref:n,...i,children:[l&&c===!0&&h.jsx(S9,{ref:a.context.internalBackdropRef,inert:hT(!d)}),t.children]})}):null});let DC={},IC={},zC="";function TH(e){if(typeof document>"u")return!1;const t=Yt(e);return Gn(t).innerWidth-t.documentElement.clientWidth>0}function NH(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Yt(e),r=n.documentElement,i=n.body,a=Wa(r)?r:i,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const d=a.offsetWidth;a.style.overflowY="hidden";const f=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,d===f}function RH(e){const t=Yt(e),n=t.documentElement,r=t.body,i=Wa(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,a)}}function AH(e){const t=Yt(e),n=t.documentElement,r=t.body,i=Gn(n);let a=0,l=0,c=!1;const d=io.create();if(Kk&&(i.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=i.getComputedStyle(n),x=i.getComputedStyle(r),E=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,DC={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},zC=n.style.scrollBehavior,IC={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const k=n.scrollHeight>n.clientHeight,T=n.scrollWidth>n.clientWidth,R=y.overflowY==="scroll"||x.overflowY==="scroll",M=y.overflowX==="scroll"||x.overflowX==="scroll",O=Math.max(0,i.innerWidth-r.clientWidth),A=Math.max(0,i.innerHeight-r.clientHeight),N=parseFloat(x.marginTop)+parseFloat(x.marginBottom),D=parseFloat(x.marginLeft)+parseFloat(x.marginRight),H=Wa(n)?n:r;if(c=NH(e),c){n.style.scrollbarGutter=E,H.style.overflowY="hidden",H.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(k||R)&&(n.style.overflowY="scroll"),(T||M)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:N||A?`calc(100dvh - ${N+A}px)`:"100dvh",width:D||O?`calc(100vw - ${D+O}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function g(){Object.assign(n.style,DC),Object.assign(r.style,IC),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=zC)}function p(){g(),d.request(f)}return f(),i.addEventListener("resize",p),()=>{d.cancel(),g(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class jH{lockCount=0;restore=null;timeoutLock=Ki.create();timeoutUnlock=Ki.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Yt(t).documentElement,i=Gn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=hr;return}const a=Qk||!TH(t);this.restore=a?RH(t):AH(t)}}const OH=new jH;function C9(e=!0,t=null){qe(()=>{if(e)return OH.acquire(t)},[e,t])}function MH(e){const t=C.useRef(""),n=C.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:C.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function E9(e,t){const n=C.useRef(e),r=lt(t);qe(()=>{n.current!==e&&r(n.current)},[e,r]),qe(()=>{n.current=e},[e])}function k9(e){const[t,n]=C.useState(null),r=lt((l,c)=>{e||n(c||(Qk?"touch":""))});E9(e,l=>{l&&!e&&n(null)});const{onClick:i,onPointerDown:a}=MH(r);return C.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function T9(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),a=t.useState("disablePointerDismissal"),l=t.useState("modal"),c=t.useState("popupElement"),{openMethod:d,triggerProps:f}=k9(i);ux(t);const{forceUnmount:g}=dx(i,t),p=lt(H=>{const I=Et(H);return I.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},I}),y=C.useCallback(()=>{t.setOpen(!1,p(tx))},[t,p]);C.useImperativeHandle(r,()=>({unmount:g,close:y}),[g,y]);const x=px({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,S]=C.useState(0),E=v===0,k=rT(x),T=ax(x,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(H){if(!t.context.outsidePressEnabledRef.current||"button"in H&&H.button!==0||"touches"in H&&H.touches.length!==1)return!1;const I=Ar(H);if(E&&!a){const U=I;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===U||t.context.backdropRef.current===U||ht(U,c)&&!U?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:E});C9(i&&l===!0,c);const{getReferenceProps:R,getFloatingProps:M,getTriggerProps:O}=_d([k,T]);t.useContextCallback("onNestedDialogOpen",H=>{S(H+1)}),t.useContextCallback("onNestedDialogClose",()=>{S(0)}),C.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(v),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,v]);const A=C.useMemo(()=>R(f),[R,f]),N=C.useMemo(()=>O(f),[O,f]),D=C.useMemo(()=>M(),[M]);t.useSyncedValues({openMethod:d,activeTriggerProps:A,inactiveTriggerProps:N,popupProps:D,floatingRootContext:x,nestedOpenDialogCount:v})}const LH={...hx,modal:rt(e=>e.modal),nested:rt(e=>e.nested),nestedOpenDialogCount:rt(e=>e.nestedOpenDialogCount),disablePointerDismissal:rt(e=>e.disablePointerDismissal),openMethod:rt(e=>e.openMethod),descriptionElementId:rt(e=>e.descriptionElementId),titleElementId:rt(e=>e.titleElementId),viewportElement:rt(e=>e.viewportElement),role:rt(e=>e.role)};class N9 extends ym{constructor(t){super(_H(t),{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Ld,onOpenChange:void 0,onOpenChangeComplete:void 0},LH)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const i={open:t},a=n.trigger?.id??null;(a||t)&&(i.activeTriggerId=a,i.activeTriggerElement=n.trigger??null),this.update(i)}}function _H(e={}){return{...fx(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function R9(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:l=!1,modal:c=!0,actionsRef:d,handle:f,triggerId:g,defaultTriggerId:p=null}=e,y=Za(!0),x=!!y,v=Jn(()=>f?.store??new N9({open:r,openProp:n,activeTriggerId:p,triggerIdProp:g,modal:c,disablePointerDismissal:l,nested:x})).current;Vy(()=>{n===void 0&&v.state.open===!1&&r===!0&&v.update({open:!0,activeTriggerId:p})}),v.useControlledProp("openProp",n),v.useControlledProp("triggerIdProp",g),v.useSyncedValues({disablePointerDismissal:l,nested:x,modal:c}),v.useContextCallback("onOpenChange",i),v.useContextCallback("onOpenChangeComplete",a);const S=v.useState("payload");T9({store:v,actionsRef:d,parentContext:y?.store.context});const E=C.useMemo(()=>({store:v}),[v]);return h.jsx(Px.Provider,{value:E,children:typeof t=="function"?t({payload:S}):t})}const A9=C.forwardRef(function(t,n){const{render:r,className:i,id:a,...l}=t,{store:c}=Za(),d=Qi(a);return c.useSyncedValueWithCleanup("titleElementId",d),cn("h2",t,{ref:n,props:[{id:d},l]})}),DH=C.forwardRef(function(t,n){const{render:r,className:i,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,...d}=t,{getButtonProps:f,buttonRef:g}=Pd({disabled:a,focusableWhenDisabled:l,native:c});return cn("button",t,{state:{disabled:a},ref:[n,g],props:[d,f]})}),IH=vm("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 cursor-pointer",{variants:{variant:{default:"bg-primary text-foreground font-medium hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-background dark:hover:bg-muted",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive text-foreground hover:bg-destructive/80 focus-visible:border-destructive/40 focus-visible:ring-destructive/20",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Re({className:e,variant:t="default",size:n="default",...r}){return h.jsx(DH,{"data-slot":"button",className:ge(IH({variant:t,size:n,className:e})),...r})}function Ws({...e}){return h.jsx(R9,{"data-slot":"dialog",...e})}function zH({...e}){return h.jsx(Ux,{"data-slot":"dialog-portal",...e})}function K2({...e}){return h.jsx(Fd,{"data-slot":"dialog-close",...e})}function PH({className:e,...t}){return h.jsx(Fx,{"data-slot":"dialog-overlay",className:ge("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function Ks({className:e,children:t,showCloseButton:n=!0,...r}){return h.jsxs(zH,{children:[h.jsx(PH,{}),h.jsxs(Hx,{"data-slot":"dialog-content",className:ge("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-background p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[t,n&&h.jsxs(Fd,{"data-slot":"dialog-close",render:h.jsx(Re,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[h.jsx(im,{}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function hi({className:e,...t}){return h.jsx("div",{"data-slot":"dialog-header",className:ge("flex flex-col gap-2",e),...t})}function Ja({className:e,showCloseButton:t=!1,children:n,...r}){return h.jsxs("div",{"data-slot":"dialog-footer",className:ge("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&h.jsx(Fd,{render:h.jsx(Re,{variant:"outline"}),children:"Close"})]})}function pi({className:e,...t}){return h.jsx(A9,{"data-slot":"dialog-title",className:ge("leading-none text-lg font-semibold text-foreground",e),...t})}function Bd({className:e,...t}){return h.jsx(h9,{"data-slot":"dialog-description",className:ge("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const j9=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const FH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const BH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const PC=e=>{const t=BH(e);return t.charAt(0).toUpperCase()+t.slice(1)};var M1={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"};const HH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},UH=C.createContext({}),qH=()=>C.useContext(UH),VH=C.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:a,iconNode:l,...c},d)=>{const{size:f=24,strokeWidth:g=2,absoluteStrokeWidth:p=!1,color:y="currentColor",className:x=""}=qH()??{},v=r??p?Number(n??g)*24/Number(t??f):n??g;return C.createElement("svg",{ref:d,...M1,width:t??f??M1.width,height:t??f??M1.height,stroke:e??y,strokeWidth:v,className:j9("lucide",x,i),...!a&&!HH(c)&&{"aria-hidden":"true"},...c},[...l.map(([S,E])=>C.createElement(S,E)),...Array.isArray(a)?a:[a]])});const dt=(e,t)=>{const n=C.forwardRef(({className:r,...i},a)=>C.createElement(VH,{ref:a,iconNode:t,className:j9(`lucide-${FH(PC(e))}`,`lucide-${e}`,r),...i}));return n.displayName=PC(e),n};const $H=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],GH=dt("arrow-down-left",$H);const YH=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],WH=dt("arrow-down",YH);const KH=[["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"}]],QH=dt("arrow-right-left",KH);const XH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],O9=dt("arrow-right",XH);const ZH=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],JH=dt("arrow-up",ZH);const eU=[["path",{d:"M13.5 10.5 15 9",key:"1nsxvm"}],["path",{d:"M4 4v15a1 1 0 0 0 1 1h15",key:"1w6lkd"}],["path",{d:"M4.293 19.707 6 18",key:"3g1p8c"}],["path",{d:"m9 15 1.5-1.5",key:"1xfbes"}]],tU=dt("axis-3d",eU);const nU=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],rU=dt("book-open",nU);const iU=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],oU=dt("bug",iU);const aU=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qs=dt("check",aU);const sU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Hd=dt("chevron-down",sU);const lU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Fs=dt("chevron-left",lU);const cU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],M9=dt("chevron-right",cU);const uU=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],dU=dt("chevron-up",uU);const fU=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],hU=dt("chevrons-left",fU);const pU=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],mU=dt("chevrons-right",pU);const gU=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],yU=dt("circle-play",gU);const xU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],bU=dt("circle-x",xU);const vU=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],wU=dt("command",vU);const SU=[["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"}]],CU=dt("copy",SU);const EU=[["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"}]],Ip=dt("external-link",EU);const kU=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],TU=dt("file-diff",kU);const NU=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Em=dt("file-text",NU);const RU=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],AU=dt("folder-open",RU);const jU=[["path",{d:"M10.7 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 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],OU=dt("folder-search",jU);const MU=[["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"}]],L9=dt("folder",MU);const LU=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],_U=dt("git-commit-horizontal",LU);const DU=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],qx=dt("git-branch",DU);const IU=[["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"}]],zU=dt("globe",IU);const PU=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],_9=dt("house",PU);const FU=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],BU=dt("key",FU);const HU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],UU=dt("life-buoy",HU);const qU=[["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"}]],VU=dt("lightbulb",qU);const $U=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],GU=dt("list-todo",$U);const YU=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gr=dt("loader-circle",YU);const WU=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],KU=dt("log-out",WU);const QU=[["path",{d:"M5 12h14",key:"1ays0h"}]],Vx=dt("minus",QU);const XU=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],ZU=dt("paperclip",XU);const JU=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],D9=dt("plug",JU);const eq=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],es=dt("plus",eq);const tq=[["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"}]],nq=dt("rotate-ccw",tq);const rq=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Cc=dt("search",rq);const iq=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],oq=dt("sparkles",iq);const aq=[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],sq=dt("square-arrow-out-up-right",aq);const lq=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],cq=dt("trash-2",lq);const uq=[["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"}]],dq=dt("triangle-alert",uq);const fq=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],I9=dt("undo-2",fq);const hq=[["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"}]],$x=dt("user",hq);const pq=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],z9=dt("x",pq),mq={ERR_NOT_AUTHENTICATED:"Please sign in to continue.",ERR_PROVIDER_NOT_CONFIGURED:"No provider is connected, or its credentials are missing or expired.",[kr.ALREADY_INITIALIZED]:"Version control is already initialized for this project.",[kr.AUTH_FAILED]:"Authentication failed. Please sign in and try again.",[kr.BRANCH_NOT_FOUND]:"Branch not found. You can create a new branch if needed.",[kr.NO_COMMITS]:"Make at least one commit before continuing.",[kr.NO_REMOTE]:"No remote configured for this project.",[kr.NO_UPSTREAM]:"This branch has no upstream configured yet. Use the Push button to publish it and set upstream in one step.",[kr.NON_FAST_FORWARD]:"The remote has changes. Pull first, then try again.",[kr.NOTHING_TO_PUSH]:"Nothing to push — stage and commit your changes first.",[kr.REMOTE_ALREADY_EXISTS]:"A remote named 'origin' already exists. Remove or rename it before adding a new one.",[kr.USER_NOT_CONFIGURED]:"Commit author is not configured."},gq="Something went wrong";function FC(e,t){return typeof e=="object"&&e!==null&&t in e&&typeof e[t]=="string"}function Sn(e,t=gq,n={}){if(FC(e,"code")){const r=mq[e.code];if(r!==void 0)return typeof r=="function"?r(n):r}return FC(e,"message")?e.message:t}const yq=async({contextLength:e,modelId:t,providerId:n})=>{const{apiClient:r}=De.getState();if(!r)throw new Error("Not connected");const i=await r.request(l9.SET_ACTIVE,{contextLength:e,modelId:t,providerId:n});if(!i.success&&i.error)throw new Error(i.error);return i},xq=({mutationConfig:e}={})=>un({...e,mutationFn:yq});function km({label:e}){return h.jsx(yo,{className:"mono border-primary-foreground bg-primary-foreground/20 inline-flex h-6 w-fit items-center gap-1 px-2 text-[10px] leading-none tracking-[0.08em] uppercase",variant:"outline",children:e})}const bq=3e5,vq=({providerId:e})=>{const{apiClient:t}=De.getState();return t?t.request(Qo.AWAIT_OAUTH_CALLBACK,{providerId:e},{timeout:bq}):Promise.reject(new Error("Not connected"))},wq=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:Sc().queryKey}),n?.(...i)},...r,mutationFn:vq})},Sq=({apiKey:e,baseUrl:t,providerId:n})=>{const{apiClient:r}=De.getState();return r?r.request(Qo.CONNECT,{apiKey:e,baseUrl:t,providerId:n}):Promise.reject(new Error("Not connected"))},Cq=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:Sc().queryKey}),n?.(...i)},...r,mutationFn:Sq})},Eq=({providerId:e})=>{const{apiClient:t}=De.getState();return t?t.request(Qo.DISCONNECT,{providerId:e}):Promise.reject(new Error("Not connected"))},kq=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:Sc().queryKey}),n?.(...i)},...r,mutationFn:Eq})},Tq=({providerId:e})=>{const{apiClient:t}=De.getState();return t?t.request(Qo.SET_ACTIVE,{providerId:e}):Promise.reject(new Error("Not connected"))},Nq=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:Sc().queryKey}),t.invalidateQueries({queryKey:Ix().queryKey}),n?.(...i)},...r,mutationFn:Tq})},Rq=({providerId:e})=>{const{apiClient:t}=De.getState();return t?t.request(Qo.START_OAUTH,{providerId:e}):Promise.reject(new Error("Not connected"))},Aq=({mutationConfig:e}={})=>un({...e,mutationFn:Rq}),jq=({apiKey:e,providerId:t})=>{const{apiClient:n}=De.getState();return n?n.request(Qo.VALIDATE_API_KEY,{apiKey:e,providerId:t}):Promise.reject(new Error("Not connected"))},Oq=({mutationConfig:e}={})=>un({...e,mutationFn:jq});let BC=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Mq={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},qu={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Lq={disabled:!1,...qu},Gx={valid(e){return e===null?null:e?{[BC.valid]:""}:{[BC.invalid]:""}}},_q=C.createContext({invalid:void 0,name:void 0,validityData:{state:Mq,errors:[],error:"",value:"",initialValue:null},setValidityData:hr,disabled:void 0,touched:qu.touched,setTouched:hr,dirty:qu.dirty,setDirty:hr,filled:qu.filled,setFilled:hr,focused:qu.focused,setFocused:hr,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Lq,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Dn)=>e,getInputValidationProps:(e=Dn)=>e,inputRef:{current:null},commit:async()=>{}}});function Yx(e=!0){const t=C.useContext(_q);if(t.setValidityData===hr&&!e)throw new Error(Yn(28));return t}const Dq=C.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:hr,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function P9(){return C.useContext(Dq)}const Iq=C.createContext({controlId:void 0,registerControlId:hr,labelId:void 0,setLabelId:hr,messageIds:[],setMessageIds:hr,getDescriptionProps:e=>e});function Wx(){return C.useContext(Iq)}function zq(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function F9({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[a,l]=C.useState(t),c=i?e:a,d=C.useCallback(f=>{i||l(f)},[]);return[c,d]}function Pq(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=Wx(),l=Qi(t),c=n?i:void 0,d=Jn(()=>Symbol("labelable-control")),f=C.useRef(!1),g=C.useRef(t!=null),p=lt(()=>{!f.current||a===hr||(f.current=!1,a(d.current,void 0))});return qe(()=>{if(a===hr)return;let y;if(n){const x=r?.current;Wt(x)&&x.closest("label")!=null?y=t??null:y=c??l}else if(t!=null)g.current=!0,y=t;else if(g.current)y=l;else{p();return}if(y===void 0){p();return}f.current=!0,a(d.current,y)},[t,r,c,a,n,l,d,p]),C.useEffect(()=>p,[p]),i??l}function B9(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:l}=e,{formRef:c}=P9(),{invalid:d,markedDirtyRef:f,validityData:g,setValidityData:p}=Yx(),y=lt(e.getValue);qe(()=>{if(!t)return;let x=n;x===void 0&&(x=y()),g.initialValue===null&&x!==null&&p(v=>({...v,initialValue:x}))},[t,p,n,g.initialValue,y]),qe(()=>{!t||!r||c.current.fields.set(r,{getValue:y,name:i,controlRef:a,validityData:zq(g,d),validate(x=!0){let v=n;v===void 0&&(v=y()),f.current=!0,x?_i.flushSync(()=>l(v)):l(v)}})},[l,a,t,c,y,r,d,f,i,g,n]),qe(()=>{const x=c.current.fields;return()=>{r&&x.delete(r)}},[c,r])}const Fq=C.forwardRef(function(t,n){const{render:r,className:i,id:a,name:l,value:c,disabled:d=!1,onValueChange:f,defaultValue:g,autoFocus:p=!1,...y}=t,{state:x,name:v,disabled:S,setTouched:E,setDirty:k,validityData:T,setFocused:R,setFilled:M,validationMode:O,validation:A}=Yx(),N=S||d,D=v??l,H={...x,disabled:N},{labelId:I}=Wx(),U=Pq({id:a});qe(()=>{const q=c!=null;A.inputRef.current?.value||q&&c!==""?M(!0):q&&c===""&&M(!1)},[A.inputRef,M,c]);const $=C.useRef(null);qe(()=>{p&&$.current===si(Yt($.current))&&R(!0)},[p,R]);const[V]=F9({controlled:c,default:g,name:"FieldControl",state:"value"}),G=c!==void 0,B=G?V:void 0;return B9({id:U,name:D,commit:A.commit,value:B,getValue:()=>A.inputRef.current?.value,controlRef:A.inputRef}),cn("input",t,{ref:[n,$],state:H,props:[{id:U,disabled:N,name:D,ref:A.inputRef,"aria-labelledby":I,autoFocus:p,...G?{value:B}:{defaultValue:g},onChange(q){const W=q.currentTarget.value;f?.(W,Et(pm,q.nativeEvent)),k(W!==T.initialValue),M(W!=="")},onFocus(){R(!0)},onBlur(q){E(!0),R(!1),O==="onBlur"&&A.commit(q.currentTarget.value)},onKeyDown(q){q.currentTarget.tagName==="INPUT"&&q.key==="Enter"&&(E(!0),A.commit(q.currentTarget.value))}},A.getInputValidationProps(),y],stateAttributesMapping:Gx})}),Bq=C.createContext({disabled:!1});function Hq(){return C.useContext(Bq)}const Uq=C.createContext(void 0);function qq(e=!0){const t=C.useContext(Uq);if(t===void 0&&!e)throw new Error(Yn(3));return t}const Vq=C.forwardRef(function(t,n){return h.jsx(Fq,{ref:n,...t})});function Ii({className:e,type:t,...n}){return h.jsx(Vq,{type:t,"data-slot":"input",className:ge("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}function $q({error:e,isOptional:t,isValidating:n,onBack:r,onSubmit:i,provider:a}){const[l,c]=C.useState("");return h.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[h.jsx(hi,{children:h.jsxs(pi,{className:"flex items-center gap-2",children:[h.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:r,type:"button",children:h.jsx(Fs,{className:"size-5"})}),"Selecting ",a.name]})}),h.jsxs("div",{className:"flex flex-col gap-4",children:[a.apiKeyUrl&&h.jsxs("p",{className:"text-muted-foreground text-sm",children:["Get your API key at"," ",h.jsx("a",{className:"underline hover:text-foreground",href:a.apiKeyUrl,rel:"noopener noreferrer",target:"_blank",children:a.apiKeyUrl})]}),e&&h.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:e}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsxs("label",{className:"text-foreground text-sm font-medium",htmlFor:"api-key",children:["Enter your ",a.name," API key"]}),h.jsx(Ii,{id:"api-key",onChange:d=>c(d.target.value),placeholder:"Enter key",type:"password",value:l})]})]}),h.jsxs(Ja,{className:"mt-auto",children:[h.jsx(Re,{onClick:r,variant:"secondary",children:"Cancel"}),h.jsx(Re,{disabled:!t&&!l.trim()||n,onClick:()=>i(l.trim()),children:n?"Validating...":"Change"})]})]})}function Gq({onBack:e,onSelect:t,provider:n}){return h.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[h.jsx(hi,{children:h.jsxs(pi,{className:"flex items-center gap-2",children:[h.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:h.jsx(Fs,{className:"size-5"})}),"Connect ",n.name]})}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsxs("button",{className:"hover:bg-muted flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-3 text-left transition-colors",onClick:()=>t("oauth"),type:"button",children:[h.jsx(zU,{className:"text-muted-foreground size-5"}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:n.oauthLabel??"Sign in with browser"}),h.jsx("span",{className:"text-muted-foreground text-xs",children:"Authenticate via OAuth in your browser"})]})]}),h.jsxs("button",{className:"hover:bg-muted flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-3 text-left transition-colors",onClick:()=>t("api-key"),type:"button",children:[h.jsx(BU,{className:"text-muted-foreground size-5"}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:"Enter API key"}),h.jsx("span",{className:"text-muted-foreground text-xs",children:"Paste your API key manually"})]})]})]}),h.jsx(Ja,{className:"mt-auto",children:h.jsx(Re,{onClick:e,variant:"secondary",children:"Cancel"})})]})}function Yq(e){if(!e)return"Base URL is required";try{const t=new URL(e);return["http:","https:"].includes(t.protocol)?void 0:"URL must start with http:// or https://"}catch{return"Invalid URL format"}}function Wq({error:e,onBack:t,onSubmit:n,provider:r}){const[i,a]=C.useState(""),[l,c]=C.useState(),d=l??e,f=C.useCallback(()=>{const g=i.trim().replace(/\/+$/,""),p=Yq(g);if(p){c(p);return}c(void 0),n(g)},[i,n]);return h.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[h.jsx(hi,{children:h.jsxs(pi,{className:"flex items-center gap-2",children:[h.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:t,type:"button",children:h.jsx(Fs,{className:"size-5"})}),"Selecting ",r.name]})}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx("label",{className:"text-foreground text-sm font-medium",htmlFor:"base-url",children:"Enter endpoint manually"}),h.jsx(Ii,{id:"base-url",onChange:g=>{a(g.target.value),c(void 0)},placeholder:"http://localhost:11434/v1",value:i}),d&&h.jsx("p",{className:"text-destructive text-sm",children:d})]}),h.jsxs(Ja,{className:"mt-auto",children:[h.jsx(Re,{onClick:t,variant:"secondary",children:"Cancel"}),h.jsx(Re,{disabled:!i.trim(),onClick:f,children:"Change"})]})]})}const H9=()=>{const{apiClient:e}=De.getState();return e?e.request(Dd.START_LOGIN,{skipBrowserLaunch:!0}):Promise.reject(new Error("Not connected"))},U9=e=>{const{apiClient:t}=De.getState();return t?t.on(Dd.LOGIN_COMPLETED,e):()=>{}};function Kx(e){try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}const Kq=2500,Qq=800;function Xq(e){return new Promise(t=>{setTimeout(t,e)})}function Zq({onAuthenticated:e,onBack:t,popup:n}){const r=en(),i=ci(y=>y.isAuthorized),a=ci(y=>y.setLoggingIn),[l,c]=C.useState({type:"starting"}),[d,f]=C.useState(0),g=C.useRef(!1);C.useEffect(()=>{if(g.current)return;g.current=!0,a(!0);let y=!1;async function x(){try{const[v]=await Promise.all([H9(),Xq(Qq)]);if(y)return;if(!Kx(v.authUrl)){n?.close(),c({message:"Received an unsafe OAuth URL from the daemon",type:"error"}),a(!1);return}n&&!n.closed?(n.location.href=v.authUrl,c({authUrl:v.authUrl,type:"waiting"})):c({authUrl:v.authUrl,type:"blocked"})}catch(v){if(y)return;a(!1),c({message:v instanceof Error?v.message:"Unable to start login",type:"error"})}}return x().catch(()=>{}),()=>{y=!0}},[n,a,d]),C.useEffect(()=>{i&&l.type==="waiting"&&(a(!1),e())},[i,e,a,l.type]),C.useEffect(()=>l.type!=="waiting"?void 0:U9(x=>{x.success&&x.user?r.invalidateQueries({queryKey:co().queryKey}):c({message:x.error??"Authentication failed",type:"error"}),a(!1)}),[r,a,l.type]),C.useEffect(()=>{if(l.type!=="waiting")return;let y=!1;async function x(){try{const S=await r.fetchQuery(co());if(y)return;S.isAuthorized&&(r.invalidateQueries({queryKey:co().queryKey}),a(!1))}catch{}}const v=globalThis.setInterval(x,Kq);return()=>{y=!0,globalThis.clearInterval(v)}},[r,a,l.type]);function p(){g.current=!1,c({type:"starting"}),f(y=>y+1)}return h.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[h.jsx(hi,{children:h.jsxs(pi,{className:"flex items-center gap-2",children:[h.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:t,type:"button",children:h.jsx(Fs,{className:"size-5"})}),"Signing in to ByteRover"]})}),h.jsxs("div",{className:"flex flex-col gap-4",children:[l.type==="starting"&&h.jsxs("div",{className:"border-primary/30 bg-primary/5 flex items-center gap-2 rounded-lg border p-3 text-sm",children:[h.jsx(Gr,{className:"text-primary-foreground size-4 animate-spin"}),"Preparing sign-in…"]}),l.type==="waiting"&&h.jsxs("div",{className:"border-primary/30 bg-primary/5 flex flex-col gap-1 rounded-lg border p-3",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(Gr,{className:"text-primary-foreground size-4 animate-spin"}),"Finish signing in in the new tab."]}),h.jsxs("div",{className:"text-muted-foreground pl-6 text-xs",children:["If the tab didn’t open,"," ",h.jsx("a",{className:"underline underline-offset-2",href:l.authUrl,rel:"noopener noreferrer",target:"_blank",children:"click this link"}),"."]})]}),l.type==="blocked"&&h.jsxs("div",{className:"border-border bg-muted text-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[h.jsx(Ip,{className:"size-4 shrink-0"}),"Your browser blocked the sign-in popup."]}),l.type==="error"&&h.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:l.message})]}),h.jsxs(Ja,{className:"mt-auto",children:[h.jsx(Re,{onClick:t,variant:"secondary",children:"Use a different provider"}),l.type==="error"&&h.jsx(Re,{onClick:p,children:"Retry sign-in"}),l.type==="blocked"&&h.jsxs(Re,{onClick:()=>{window.open(l.authUrl,"_blank","noopener,noreferrer"),c({authUrl:l.authUrl,type:"waiting"})},children:[h.jsx(Ip,{className:"size-3.5"}),"Open sign-in page"]}),(l.type==="starting"||l.type==="waiting")&&h.jsx(Re,{disabled:!0,children:"Waiting…"})]})]})}const Jq=({providerId:e})=>{const{apiClient:t}=De.getState();return t?t.request(l9.LIST,{providerId:e}):Promise.reject(new Error("Not connected"))},eV=e=>({queryFn:()=>Jq({providerId:e}),queryKey:["models",e]}),q9=({providerId:e,queryConfig:t})=>er({...eV(e),...t});function tV({onBack:e,onSelect:t,providerId:n}){const[r,i]=C.useState(""),{data:a,isLoading:l}=q9({providerId:n}),[c,d]=C.useState(),f=C.useMemo(()=>a?.models??[],[a?.models]);C.useEffect(()=>{a?.activeModel&&!c&&d(a.activeModel)},[a?.activeModel,c]);const g=C.useMemo(()=>{if(!r)return f;const y=r.toLowerCase();return f.filter(x=>x.name.toLowerCase().includes(y)||x.id.toLowerCase().includes(y))},[f,r]),p=C.useMemo(()=>f.find(y=>y.id===c),[f,c]);return l?h.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[h.jsx(hi,{children:h.jsxs(pi,{className:"flex items-center gap-2",children:[h.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:h.jsx(Fs,{className:"size-5"})}),"Choose model"]})}),h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx(Gr,{className:"text-muted-foreground size-5 animate-spin"})})]}):h.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[h.jsx(hi,{children:h.jsxs(pi,{className:"flex items-center gap-2",children:[h.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:h.jsx(Fs,{className:"size-5"})}),"Choose model"]})}),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsxs("div",{className:"relative",children:[h.jsx(Cc,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),h.jsx(Ii,{className:"pl-9",onChange:y=>i(y.target.value),placeholder:"Search...",value:r})]}),h.jsxs("div",{className:"max-h-96 overflow-y-auto",children:[g.map(y=>{const x=y.id===c;return h.jsxs("button",{className:`border-border flex w-full cursor-pointer items-center justify-between border-b px-3 py-2.5 text-left transition-colors last:border-b-0 ${x?"bg-primary/10":"hover:bg-muted"}`,onClick:()=>d(y.id),type:"button",children:[h.jsx("span",{className:"text-foreground text-sm",children:y.name}),x&&h.jsx(Qs,{className:"text-primary size-4"})]},y.id)}),g.length===0&&h.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No models found"})]})]}),h.jsxs(Ja,{className:"mt-auto",children:[h.jsx(Re,{onClick:e,variant:"secondary",children:"Cancel"}),h.jsx(Re,{disabled:!p,onClick:()=>p&&t(p),children:"Confirm"})]})]})}function nV({error:e,onAction:t,onBack:n,provider:r}){const{data:i}=q9({providerId:r.id}),a=i?.activeModel,l=r.id==="byterover";return h.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[h.jsx(hi,{children:h.jsxs(pi,{className:"flex items-center gap-2",children:[h.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:n,type:"button",children:h.jsx(Fs,{className:"size-5"})}),r.name]})}),h.jsxs("div",{className:"flex flex-col gap-4",children:[e&&h.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:e}),l?h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:"Status"}),h.jsx("span",{className:"text-muted-foreground text-sm",children:r.isConnected?"Connected":"Not connected"})]}),r.isConnected&&h.jsx(Re,{onClick:()=>t("disconnect"),size:"sm",variant:"outline",children:"Disconnect"})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:"Model"}),h.jsx("span",{className:"text-muted-foreground text-sm",children:a??"Not selected"})]}),h.jsx(Re,{onClick:()=>t("change_model"),size:"sm",variant:"outline",children:"Change"})]}),h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:r.authMethod==="oauth"?"OAuth":"API Key"}),h.jsx("span",{className:"text-muted-foreground text-sm",children:r.authMethod==="oauth"?"Authenticated via browser":"****************"})]}),h.jsx(Re,{onClick:()=>t("disconnect"),size:"sm",variant:"outline",children:"Disconnect"})]})]})]}),!r.isCurrent&&h.jsxs(Ja,{className:"mt-auto",children:[h.jsx(Re,{onClick:n,variant:"secondary",children:"Cancel"}),h.jsx(Re,{onClick:()=>t("activate"),children:"Active"})]})]})}const rV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.53096%2012.97L8.07285%2010.9839L8.13242%2010.8115L8.07285%2010.7155H7.90026L7.30833%2010.679L5.28456%2010.6244L3.5294%2010.5515L1.82897%2010.4604L1.4011%2010.3693L1%209.84087L1.04132%209.57726L1.40112%209.33553L1.91647%209.38047L3.05537%209.45823L4.76433%209.57605L6.00411%209.64894L7.8407%209.83964H8.13242L8.17374%209.72182L8.07407%209.64894L7.99629%209.57605L6.22776%208.37831L4.31339%207.11255L3.31063%206.38372L2.76851%206.01443L2.49504%205.66823L2.37713%204.91268L2.86941%204.3709L3.53062%204.41585L3.69958%204.46079L4.3693%204.97583L5.79991%206.08247L7.66811%207.45754L7.94158%207.68469L8.05098%207.60696L8.06435%207.55229L7.94158%207.34701L6.92544%205.51154L5.84125%203.64449L5.35869%202.8707L5.23107%202.40667C5.1861%202.21595%205.15329%202.05561%205.15329%201.86003L5.71361%201.09961L6.02356%201L6.77108%201.09961L7.0859%201.37293L7.55021%202.43462L8.30258%204.10609L9.46944%206.37885L9.81099%207.05303L9.9933%207.67741L10.0614%207.86813H10.1793V7.75881L10.2753%206.47848L10.4528%204.9066L10.6254%202.88406L10.6849%202.31435L10.9669%201.63166L11.5272%201.2624L11.9648%201.47133L12.3246%201.98638L12.2748%202.31922L12.0608%203.70888L11.6415%205.8857L11.368%207.34338H11.5272L11.7095%207.16118L12.4474%206.18209L13.6871%204.6333L14.2341%204.01864L14.8722%203.3396L15.2818%203.01648H16.0561L16.6262%203.86316L16.3709%204.73776L15.5736%205.74843L14.9123%206.60483L13.9643%207.88029L13.3723%208.90067L13.427%208.98206L13.568%208.96869L15.7097%208.51317L16.8668%208.30424L18.2476%208.06736L18.8724%208.3589L18.9404%208.65528L18.6949%209.26145L17.2181%209.62586L15.4861%209.97207L12.9068%2010.5819L12.8752%2010.605L12.9117%2010.6499L14.0737%2010.7592L14.5708%2010.7859H15.7875L18.0531%2010.9548L18.6451%2011.3459L19%2011.8246L18.9404%2012.189L18.0288%2012.653L16.7988%2012.3614L13.9278%2011.6788L12.9433%2011.4334H12.8072V11.5148L13.6276%2012.3165L15.1311%2013.6734L17.0139%2015.4226L17.1099%2015.855L16.8681%2016.1964L16.6128%2016.1599L14.9585%2014.9161L14.3204%2014.3561L12.8752%2013.1401H12.7792V13.2676L13.1122%2013.7548L14.871%2016.3968L14.9622%2017.2071L14.8346%2017.4706L14.3788%2017.6298L13.878%2017.5387L12.8485%2016.0944L11.7861%2014.4678L10.9292%2013.0101L10.8247%2013.0697L10.3191%2018.5129L10.0821%2018.7911L9.53507%2019L9.07927%2018.6538L8.83739%2018.0938L9.07927%2016.9872L9.37099%2015.5429L9.608%2014.3949L9.82193%2012.9688L9.94955%2012.4951L9.94105%2012.4635L9.83651%2012.4769L8.76081%2013.9528L7.12479%2016.1624L5.83031%2017.5472L5.52036%2017.6699L4.98312%2017.3917L5.03294%2016.8949L5.33317%2016.4527L7.12479%2014.1751L8.20535%2012.7635L8.90303%2011.9485L8.89817%2011.8306H8.85684L4.09825%2014.9185L3.25106%2015.0278L2.88643%2014.6865L2.9314%2014.1265L3.10398%2013.9443L4.5346%2012.9603L4.52974%2012.9652L4.53096%2012.97Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",iV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%2020C15.5228%2020%2020%2015.5228%2020%2010C20%204.47715%2015.5228%200%2010%200C4.47715%200%200%204.47715%200%2010C0%2015.5228%204.47715%2020%2010%2020Z'%20fill='black'/%3e%3cpath%20d='M10.001%2019.002C14.9715%2019.002%2019.001%2014.9725%2019.001%2010.002C19.001%205.03139%2014.9715%201.00195%2010.001%201.00195C5.03042%201.00195%201.00098%205.03139%201.00098%2010.002C1.00098%2014.9725%205.03042%2019.002%2010.001%2019.002Z'%20fill='%23FAFAFA'/%3e%3cpath%20d='M9.99951%2017.998C14.4178%2017.998%2017.9995%2014.4163%2017.9995%209.99805C17.9995%205.57977%2014.4178%201.99805%209.99951%201.99805C5.58123%201.99805%201.99951%205.57977%201.99951%209.99805C1.99951%2014.4163%205.58123%2017.998%209.99951%2017.998Z'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.31787%209.29102C3.31787%209.29102%2018.082%209.72982%2016.6512%2015.291C15.9389%2016.4198%2015.8512%2015.691%2015.8512%2015.691C15.8512%2015.691%2018.2852%2011.1457%203.31787%209.29102Z'%20fill='%23FAFAFA'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.27588%205.86523C5.27588%205.86523%2020.04%206.30403%2018.6092%2011.8652C17.8969%2012.994%2017.8092%2012.2652%2017.8092%2012.2652C17.8092%2012.2652%2020.2432%207.7199%205.27588%205.86523Z'%20fill='%23FAFAFA'/%3e%3cpath%20d='M8.72058%203.59961C8.75064%203.60051%2016.4092%203.83385%2017.83%206.39648L17.3895%206.91504C16.922%205.87794%2015.0863%204.38843%208.72058%203.59961Z'%20fill='%23FAFAFA'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.45898%2013.9904C5.48859%2013.9908%2013.7293%2014.1055%2013.9676%2017.2002L13.4287%2017.5307C13.2582%2016.5898%2011.9628%2014.9484%205.45898%2013.9904Z'%20fill='%23FAFAFA'/%3e%3c/svg%3e",oV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.7675%202.25036C9.71229%202.25036%207.74126%203.06679%206.28801%204.52004C4.83476%205.97329%204.01833%207.94432%204.01833%209.99953C4.01833%2012.0547%204.83476%2014.0258%206.28801%2015.479C7.74126%2016.9323%209.71229%2017.7487%2011.7675%2017.7487V18.9162C6.8425%2018.9162%202.85083%2014.9237%202.85083%209.9987C2.85083%205.0737%206.84166%201.08203%2011.7667%201.08203V2.24953L11.7675%202.25036ZM15.7275%205.31453C15.1118%204.79188%2014.3989%204.3961%2013.6297%204.14994C12.8605%203.90378%2012.0503%203.8121%2011.2455%203.88018C10.4408%203.94825%209.65746%204.17474%208.94056%204.54661C8.22366%204.91848%207.58735%205.42841%207.06821%206.04706C6.54907%206.6657%206.15735%207.38088%205.91557%208.15144C5.6738%208.92201%205.58673%209.73277%205.65938%2010.5371C5.73204%2011.3414%205.96298%2012.1235%206.33892%2012.8382C6.71487%2013.553%207.2284%2014.1864%207.85%2014.702L7.09916%2015.597C6.36511%2014.9813%205.75953%2014.227%205.31702%2013.3772C4.87452%2012.5274%204.60374%2011.5987%204.52017%2010.6443C4.43659%209.68983%204.54185%208.72826%204.82994%207.81448C5.11802%206.90071%205.58329%206.05264%206.19916%205.3187C6.81497%204.58461%207.56935%203.97902%208.41922%203.5365C9.26909%203.09398%2010.1978%202.8232%2011.1523%202.73963C12.1069%202.65606%2013.0685%202.76132%2013.9823%203.04942C14.8962%203.33752%2015.7443%203.8028%2016.4783%204.4187L15.7275%205.31453ZM13.8483%206.01786C12.7928%205.47266%2011.5646%205.36641%2010.4311%205.72223C9.29756%206.07806%208.35044%206.86716%207.79583%207.91781C7.24123%208.96847%207.12401%2010.1956%207.4697%2011.3323C7.81539%2012.4689%208.596%2013.4231%209.64166%2013.987L9.095%2015.0204C7.7889%2014.3042%206.81675%2013.1032%206.38832%2011.6766C5.95989%2010.25%206.10954%208.7121%206.80498%207.39485C7.50041%206.07759%208.68587%205.08657%2010.1055%204.63564C11.5252%204.1847%2013.0652%204.31001%2014.3933%204.98453L13.8483%206.01786ZM11.7667%207.11536C11.0017%207.11536%2010.2681%207.41923%209.72725%207.96012C9.18636%208.501%208.8825%209.2346%208.8825%209.99953C8.8825%2010.7645%209.18636%2011.4981%209.72725%2012.0389C10.2681%2012.5798%2011.0017%2012.8837%2011.7667%2012.8837V14.052C10.6919%2014.052%209.6611%2013.6251%208.90111%2012.8651C8.14112%2012.1051%207.71416%2011.0743%207.71416%209.99953C7.71416%208.92474%208.14112%207.89397%208.90111%207.13398C9.6611%206.37399%2010.6919%205.94703%2011.7667%205.94703V7.11536Z'%20fill='%23D4D4D4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.8392%209.03094C12.715%208.89716%2012.5718%208.78232%2012.4142%208.69011C12.277%208.60856%2012.1205%208.56486%2011.9609%208.56344C11.7484%208.56344%2011.5584%208.60261%2011.3909%208.68011C11.229%208.75304%2011.0835%208.85797%2010.9632%208.98857C10.8429%209.11918%2010.7503%209.27277%2010.6909%209.44011C10.6292%209.60927%2010.5992%209.78677%2010.5992%209.96594C10.5992%2010.1476%2010.6292%2010.3243%2010.6909%2010.4918C10.7508%2010.6589%2010.8436%2010.8124%2010.9638%2010.9431C11.0841%2011.0738%2011.2293%2011.179%2011.3909%2011.2526C11.5576%2011.3301%2011.7492%2011.3693%2011.9609%2011.3693C12.1409%2011.3693%2012.3084%2011.3309%2012.4626%2011.2568C12.6192%2011.1818%2012.7542%2011.0693%2012.8584%2010.9301L13.6317%2011.7684C13.5151%2011.8851%2013.3817%2011.9859%2013.2301%2012.0709C12.9496%2012.2274%2012.6443%2012.3345%2012.3276%2012.3876C12.1859%2012.4093%2012.0634%2012.4209%2011.9609%2012.4209C11.6246%2012.423%2011.2908%2012.3637%2010.9759%2012.2459C10.6781%2012.1358%2010.4057%2011.9666%2010.1751%2011.7484C9.94568%2011.5293%209.76311%2011.2659%209.63839%2010.9743C9.50286%2010.6556%209.43531%2010.3122%209.44005%209.96594C9.44005%209.59594%209.50672%209.26011%209.63839%208.95761C9.76339%208.66594%209.94505%208.40261%2010.1742%208.18344C10.4059%207.96594%2010.6784%207.79677%2010.9759%207.68677C11.2908%207.56898%2011.6246%207.50967%2011.9609%207.51177C12.2567%207.51177%2012.5542%207.56844%2012.8542%207.68177C13.1551%207.79677%2013.4251%207.98177%2013.6409%208.22261L12.8392%209.03094Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",aV="data:image/svg+xml,%3csvg%20width='154'%20height='154'%20viewBox='0%200%20154%20154'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_2024_36638'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='155'%20height='155'%3e%3cpath%20d='M0%200H154.006V154.006H0V0Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_2024_36638)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M49.8953%2091.6962C54.0408%2091.6962%2062.2864%2091.4688%2073.6847%2086.7762C86.9655%2081.308%20113.39%2071.381%20132.453%2061.1848C145.784%2054.0535%20151.628%2044.621%20151.628%2031.9191C151.628%2014.2909%20137.337%200%20119.709%200H45.8476C20.5281%200%200%2020.5272%200%2045.8485C0%2071.169%2019.2191%2091.6962%2049.8953%2091.6962Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M62.3879%20123.269C62.388%20117.199%2064.1868%20111.266%2067.5572%20106.218C70.9276%20101.17%2075.7184%2097.2344%2081.3244%2094.908L104.585%2085.2545C128.112%2075.4896%20154.009%2092.78%20154.009%20118.254C154.009%20137.99%20138.007%20153.987%20118.27%20153.982L93.0868%20153.976C76.1307%20153.971%2062.3879%20140.225%2062.3879%20123.269Z'%20fill='white'/%3e%3cpath%20d='M26.4302%2097.7402C11.8322%2097.7402%200%20109.572%200%20124.17V127.593C0%20142.189%2011.8331%20154.022%2026.4293%20154.022C41.0263%20154.022%2052.8595%20142.189%2052.8595%20127.593V124.17C52.8595%20109.572%2041.0263%2097.7402%2026.4302%2097.7402Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",sV="/assets/deepinfra-provider-C9hH_wkN.svg",lV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.05%209.04649C15.6632%208.44953%2014.4499%207.63057%2013.4094%206.59059C12.3695%205.55064%2011.5505%204.33675%2010.9535%202.94998C10.7243%202.4185%2010.5402%201.87217%2010.399%201.31204C10.353%201.12891%2010.1888%201%2010%201C9.81124%201%209.64703%201.12891%209.60102%201.31204C9.45981%201.87217%209.27566%202.41798%209.04649%202.94998C8.44953%204.33675%207.63057%205.55064%206.59059%206.59059C5.55064%207.63057%204.33675%208.44953%202.94998%209.04649C2.41849%209.27566%201.87217%209.4598%201.31204%209.60102C1.12891%209.64703%201%209.81124%201%2010C1%2010.1888%201.12891%2010.353%201.31204%2010.399C1.87217%2010.5402%202.41798%2010.7243%202.94998%2010.9535C4.33675%2011.5505%205.55014%2012.3695%206.59059%2013.4094C7.63107%2014.4494%208.44953%2015.6632%209.04649%2017.05C9.27566%2017.5815%209.45981%2018.1278%209.60102%2018.688C9.64703%2018.8711%209.81124%2019%2010%2019C10.1888%2019%2010.353%2018.8711%2010.399%2018.688C10.5402%2018.1278%2010.7243%2017.582%2010.9535%2017.05C11.5505%2015.6632%2012.3695%2014.4499%2013.4094%2013.4094C14.4494%2012.3695%2015.6632%2011.5505%2017.05%2010.9535C17.5815%2010.7243%2018.1278%2010.5402%2018.688%2010.399C18.8711%2010.353%2019%2010.1888%2019%2010C19%209.81124%2018.8711%209.64703%2018.688%209.60102C18.1278%209.4598%2017.582%209.27566%2017.05%209.04649Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",cV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.03%201.66627C6.81913%201.6371%204.19663%204.16627%204.16663%207.3171C4.13746%2010.4688%206.71246%2013.0438%209.92329%2013.0729H11.94V10.9346H10.03C8.02413%2010.9579%206.37996%209.3796%206.35663%207.4096C6.33246%205.44127%207.94079%203.82793%209.94663%203.8046H10.03C12.0358%203.8046%2013.6616%205.40043%2013.6675%207.3696V12.6238C13.6675%2014.5754%2012.0475%2016.1654%2010.065%2016.1896C9.11901%2016.1829%208.2127%2015.8088%207.53746%2015.1463L5.99496%2016.6613C7.07129%2017.7186%208.51543%2018.3177%2010.0241%2018.3329H10.1008C13.27%2018.2863%2015.8158%2015.7638%2015.8333%2012.6529V7.23627C15.7558%204.13543%2013.1808%201.66627%2010.03%201.66627Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",uV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.205%200C18.63%200%2019.0377%200.168834%2019.3382%200.469361C19.6387%200.769888%2019.8075%201.17749%2019.8075%201.6025C19.8075%202.02751%2019.6387%202.43511%2019.3382%202.73564C19.0377%203.03617%2018.63%203.205%2018.205%203.205H16.7917C16.7669%203.20511%2016.7423%203.20032%2016.7194%203.1909C16.6964%203.18149%2016.6756%203.16763%2016.658%203.15013C16.6404%203.13263%2016.6265%203.11184%2016.617%203.08893C16.6074%203.06603%2016.6025%203.04147%2016.6025%203.01667V1.6025C16.6025%200.7175%2017.32%200%2018.205%200Z'%20fill='%23D4D4D4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.22083%209.3319L15.2683%203.3319C15.3825%203.21857%2015.3183%202.99023%2015.1717%202.99023H11.9167C11.8984%202.99044%2011.8804%202.99431%2011.8636%203.00161C11.8469%203.00891%2011.8318%203.01949%2011.8192%203.03273L5.3025%209.49607C5.20083%209.59607%205.05083%209.5069%205.05083%209.3469V3.18273C5.05083%203.0769%204.98167%202.99107%204.89667%202.99107H2.655C2.56917%202.99107%202.5%203.0769%202.5%203.18273V16.4744C2.5%2016.5811%202.56917%2016.6661%202.655%2016.6661H4.89667C4.9825%2016.6661%205.05167%2016.5811%205.05167%2016.4744V13.7661C5.05167%2013.7086%205.0725%2013.6536%205.10917%2013.6177L7.12917%2011.6127C7.15062%2011.5896%207.17967%2011.5749%207.21102%2011.5714C7.24238%2011.5679%207.27395%2011.5758%207.3%2011.5936L12.7033%2015.5702C13.5615%2016.1549%2014.5491%2016.5218%2015.5808%2016.6394C15.6708%2016.6494%2015.7475%2016.5602%2015.7475%2016.4477V13.8977C15.7475%2013.8002%2015.6892%2013.7211%2015.6108%2013.7086C15.0053%2013.6107%2014.4287%2013.3812%2013.9217%2013.0361L9.24417%209.6494C9.14667%209.5844%209.13417%209.4169%209.22083%209.3319Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",dV="/assets/minimax-provider-BqW25BvT.svg",fV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.85667%202.83398H5.71417V5.69065H8.57167V8.54815H8.57H11.4292V5.69065H14.285V2.83398H17.1433V14.2623H20V17.1198H11.4283V14.2632H8.57167V11.4057H5.71333V14.2623L8.57167%2014.2632V17.1198H0V14.2623H2.85667V2.83398ZM11.4283%2014.2632H14.285V11.4057H11.4292V14.2632H11.4283Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",HC="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.813%208.3673C18.2269%207.14159%2018.0844%205.79887%2017.4226%204.68397C16.4272%202.97394%2014.4263%202.09417%2012.4721%202.50818C11.6027%201.54178%2010.3537%200.992208%209.04425%201.00008C7.04673%200.995583%205.27439%202.26461%204.65985%204.14003C3.37663%204.39934%202.26898%205.19192%201.62082%206.31526C0.618065%208.0208%200.846663%2010.1707%202.18632%2011.6332C1.77245%2012.859%201.91497%2014.2017%202.57682%2015.3166C3.57216%2017.0266%205.5731%2017.9064%207.5273%2017.4924C8.39608%2018.4588%209.64567%2019.0083%2010.9551%2018.9999C12.9538%2019.005%2014.7267%2017.7348%2015.3412%2015.8577C16.6245%2015.5984%2017.7321%2014.8058%2018.3803%2013.6825C19.3819%2011.9769%2019.1527%209.82871%2017.8136%208.36618L17.813%208.3673ZM10.9563%2017.8237C10.1565%2017.8248%209.38173%2017.5486%208.76777%2017.0429C8.7957%2017.0283%208.84416%2017.0019%208.87551%2016.9827L12.508%2014.9127C12.6938%2014.8086%2012.8078%2014.6134%2012.8067%2014.4025V9.34945L14.3419%2010.2242C14.3584%2010.232%2014.3693%2010.2478%2014.3715%2010.2658V14.4503C14.3693%2016.3111%2012.8421%2017.8198%2010.9563%2017.8237ZM3.6115%2014.7282C3.21074%2014.0453%203.06651%2013.2448%203.2039%2012.468C3.23069%2012.4838%203.27801%2012.5125%203.31164%2012.5316L6.94412%2014.6016C7.12825%2014.7079%207.35628%2014.7079%207.54098%2014.6016L11.9755%2012.0748V13.8242C11.9767%2013.8422%2011.9681%2013.8597%2011.9539%2013.8709L8.28207%2015.9629C6.64654%2016.8922%204.55781%2016.3398%203.61207%2014.7282H3.6115ZM2.65549%206.90421C3.05454%206.2202%203.68447%205.69706%204.43468%205.42537C4.43468%205.4563%204.43297%205.51087%204.43297%205.54912V9.68977C4.43183%209.90015%204.54584%2010.0953%204.73111%2010.1994L9.16568%2012.7256L7.63048%2013.6004C7.61509%2013.6105%207.59571%2013.6122%207.57861%2013.6049L3.90622%2011.5112C2.27412%2010.5785%201.71431%208.51806%202.65492%206.90477L2.65549%206.90421ZM15.2688%209.80058L10.8343%207.27378L12.3695%206.39964C12.3849%206.38951%2012.4042%206.38782%2012.4213%206.39514L16.0937%208.48712C17.7287%209.4192%2018.2891%2011.4831%2017.3445%2013.0963C16.9448%2013.7792%2016.3155%2014.3024%2015.5658%2014.5746V10.3102C15.5675%2010.0998%2015.4541%209.90521%2015.2694%209.80058H15.2688ZM16.7966%207.53141C16.7698%207.5151%2016.7225%207.48697%2016.6889%207.46785L13.0564%205.3978C12.8723%205.29149%2012.6442%205.29149%2012.4595%205.3978L8.02497%207.92461V6.17519C8.02383%206.15719%208.03238%206.13976%208.04663%206.12851L11.7184%204.03821C13.354%203.10725%2015.445%203.66133%2016.3879%205.27574C16.7864%205.9575%2016.9306%206.75571%2016.7955%207.53141H16.7966ZM7.19039%2010.6494L5.65462%209.77471C5.63809%209.76683%205.62726%209.75108%205.62498%209.73308V5.54856C5.62612%203.68552%207.1579%202.17573%209.04596%202.17686C9.84463%202.17686%2010.6176%202.45361%2011.2316%202.95763C11.2037%202.97225%2011.1558%202.99869%2011.1239%203.01781L7.49138%205.08786C7.30554%205.19192%207.19153%205.38655%207.19267%205.59749L7.19039%2010.6483V10.6494ZM8.0244%208.87525L9.99969%207.74967L11.975%208.87469V11.1253L9.99969%2012.2503L8.0244%2011.1253V8.87525Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",hV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_1940_35557'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='2'%20y='2'%20width='16'%20height='16'%3e%3cpath%20d='M2%202H18V18H2V2Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1940_35557)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.2027%203.30472L18.016%206.04138V6.09938L13.1533%208.80669L13.1647%207.39538L12.6173%207.37538C11.9113%207.35669%2011.5433%207.37669%2011.1053%207.44869C10.396%207.56538%209.74666%207.83337%209.00734%208.35003L7.56334%209.35338C7.374%209.48338%207.23334%209.57738%207.11%209.65669L6.76666%209.87138L6.502%2010.0274L6.75866%2010.1807L7.112%2010.406C7.42934%2010.6154%207.892%2010.9367%208.91266%2011.65C9.65266%2012.1667%2010.3013%2012.4347%2011.0107%2012.5514L11.2107%2012.5814C11.6733%2012.642%2012.1273%2012.644%2013.094%2012.6034L13.1087%2011.164L17.922%2013.9007V13.9587L13.0593%2016.6667L13.0687%2015.4254L12.6453%2015.44C11.7213%2015.468%2011.2207%2015.4414%2010.5533%2015.332C9.424%2015.1454%208.38%2014.7147%207.29934%2013.9594L5.86066%2012.9594C5.69519%2012.8453%205.52738%2012.7346%205.35734%2012.6274L5.046%2012.4407C4.87788%2012.3438%204.70897%2012.2483%204.53934%2012.154C3.93866%2011.82%202.37531%2011.4107%202%2011.4107V8.59203L2.09334%208.59469C2.46934%208.59003%204.03334%208.18003%204.63266%207.84538L5.31%207.45869L5.602%207.27603C5.88734%207.08938%206.31666%206.79203%207.39266%206.04069C8.47334%205.28537%209.51666%204.85403%2010.6467%204.66803C11.4147%204.54138%2011.9627%204.52603%2013.1893%204.57603L13.2027%203.30472Z'%20fill='%23D4D4D4'/%3e%3c/g%3e%3c/svg%3e",pV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.4875%200V6.06H18.75V14.6833H16.3042V20L10.44%2014.8383V19.9592H9.53083V14.8325L3.66%2020V14.6125H1.25V5.99H3.65333V0L9.53083%205.41167V0.158333H10.4392V5.56667L16.4875%200ZM10.44%207.53667V13.6358L15.395%2017.9975V12.0333L10.44%207.53667ZM9.52417%207.47L4.56917%2011.9683V17.9975L9.52417%2013.6358V7.47083V7.47ZM16.3042%2013.7867H17.8408V6.9575H11.2167L16.3042%2011.5742V13.7867ZM8.81917%206.88667H2.15833V13.7158H3.65833V11.5692L8.81833%206.88583L8.81917%206.88667ZM4.5625%202.06333V5.98833H8.825L4.5625%202.06333ZM15.5783%202.06333L11.3158%205.98833H15.5783V2.06333Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",mV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1940_35595)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.3308%203.75216C19.0025%203.18344%2018.5654%202.68496%2018.0444%202.28519C17.5234%201.88543%2016.9288%201.5922%2016.2945%201.42227C15.6601%201.25233%2014.9986%201.20901%2014.3475%201.29479C13.6964%201.38056%2013.0686%201.59374%2012.5%201.92216C11.7706%202.34073%2011.1591%202.93729%2010.7227%203.65615C10.2862%204.37502%2010.039%205.19274%2010.0042%206.033L15.0008%206.03966V6.46883H10.0042C10.0367%207.24966%2010.2525%208.02716%2010.6708%208.75216C10.9925%209.33338%2011.4267%209.84468%2011.9482%2010.2562C12.4696%2010.6677%2013.0679%2010.9712%2013.708%2011.1489C14.348%2011.3266%2015.0171%2011.375%2015.6761%2011.2912C16.3351%2011.2075%2016.9707%2010.9932%2017.546%2010.661C18.1213%2010.3288%2018.6245%209.88533%2019.0265%209.35644C19.4284%208.82755%2019.7209%208.22387%2019.8869%207.58067C20.0529%206.93746%2020.0891%206.26762%2019.9934%205.61028C19.8976%204.95293%2019.6718%204.32126%2019.3292%203.75216H19.3308Z'%20fill='%23D4D4D4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.670785%203.74946C0.342331%204.31807%200.129098%204.94582%200.0432647%205.59684C-0.042569%206.24787%200.00067736%206.90943%200.170534%207.54374C0.340391%208.17806%200.633531%208.7727%201.03322%209.29371C1.4329%209.81473%201.9313%2010.2519%202.49995%2010.5803C3.22718%2011.0028%204.04963%2011.2341%204.89049%2011.2526C5.73134%2011.2711%206.56317%2011.0762%207.30829%2010.6861L4.81579%206.35529L5.18745%206.14113L7.68495%2010.4678C8.32417%2010.0608%208.86254%209.51393%209.25936%208.86837C9.65619%208.22281%209.90109%207.4955%209.97556%206.7414C10.05%205.9873%209.95213%205.22614%209.68925%204.51543C9.42637%203.80472%209.00539%203.16306%208.45812%202.63893C7.91085%202.11481%207.25161%201.72193%206.53021%201.48999C5.80881%201.25804%205.04413%201.1931%204.29395%201.30007C3.54377%201.40704%202.82771%201.68312%202.1999%202.10745C1.57208%202.53178%201.04975%203.09326%200.670785%203.74946Z'%20fill='%23D4D4D4'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.99996%2019.9121C11.3259%2019.9119%2012.5975%2019.385%2013.535%2018.4473C14.4725%2017.5097%2014.9991%2016.238%2014.9991%2014.9121C14.9991%2013.1371%2014.0825%2011.5821%2012.6866%2010.6954L10.1825%2015.0196L9.81246%2014.8046L12.31%2010.4779C11.6379%2010.1278%2010.895%209.93492%2010.1375%209.91401C9.37993%209.8931%208.62755%2010.0447%207.93719%2010.3572C7.24683%2010.6698%206.63655%2011.1352%206.15248%2011.7183C5.66841%2012.3014%205.32321%2012.9869%205.14298%2013.723C4.96274%2014.459%204.95219%2015.2265%205.11211%2015.9672C5.27203%2016.708%205.59824%2017.4027%206.06609%2017.9989C6.53394%2018.5951%207.13119%2019.0771%207.8127%2019.4085C8.4942%2019.74%209.24213%2019.9122%209.99996%2019.9121Z'%20fill='%23D4D4D4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1940_35595'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",gV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%203L18%2017H2L10%203Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",yV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.1283%207.65527L13.1584%2018H10.0336L3.0035%207.65527H6.1283ZM6.1255%2013.4007L7.6886%2015.7018L6.1269%2018H3L6.1255%2013.4007ZM17%203.15055V18H14.4387V6.91927L17%203.15055ZM17%202L10.0336%2012.2509L8.4705%209.95055L13.8731%202H17Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",xV="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.5744%203L9.03162%205.0671H2.46254L4.00458%203H10.5751H10.5744ZM18.4716%2014.9336L16.9302%2017H10.3838L11.9237%2014.9336H18.4716ZM19%203L8.562%2017H2L12.438%203H19Z'%20fill='%23D4D4D4'/%3e%3c/svg%3e",bV={anthropic:rV,byterover:iV,cerebras:oV,cohere:aV,deepinfra:sV,glm:xV,google:lV,groq:cV,minimax:dV,mistral:fV,moonshot:uV,openai:HC,"openai-compatible":HC,openrouter:hV,perplexity:pV,togetherai:mV,vercel:gV,xai:yV},Q2="byterover";function vV(e){const t=e.find(n=>n.id===Q2);return t?[t,...e.filter(n=>n.id!==Q2)]:e}function wV({onSelect:e,providers:t}){const[n,r]=C.useState(""),i=C.useMemo(()=>{const a=vV(t);if(!n)return a;const l=n.toLowerCase();return a.filter(c=>c.name.toLowerCase().includes(l))},[t,n]);return h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-5",children:[h.jsxs(hi,{children:[h.jsx(pi,{children:"Pick a provider to power curate & query"}),h.jsx(Bd,{children:"ByteRover routes LLM calls through your chosen provider. You can change this later."})]}),h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3",children:[h.jsxs("div",{className:"relative",children:[h.jsx(Cc,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),h.jsx(Ii,{className:"pl-9",onChange:a=>r(a.target.value),placeholder:"Search...",value:n})]}),h.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pr-4 -mr-4 [scrollbar-gutter:stable]",children:i.map(a=>{const l=bV[a.id],c=a.isCurrent,d=a.id===Q2;return h.jsxs("button",{className:ge("group/row flex w-full cursor-pointer items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",c?"border-primary-foreground/40 bg-primary/5":"border-border hover:border-foreground/25"),onClick:()=>e(a),title:a.description,type:"button",children:[h.jsx("div",{className:"bg-muted/50 grid size-7 shrink-0 place-items-center overflow-hidden rounded-md",children:l&&h.jsx("img",{alt:"",className:"size-5",src:l})}),h.jsxs("div",{className:"min-w-0 flex-1 space-y-0.5",children:[h.jsxs("div",{className:"text-foreground flex flex-wrap items-center gap-1.5 text-sm",children:[h.jsx("span",{className:"font-medium truncate",children:a.name}),d&&h.jsx(yo,{className:"border-amber-500/50 bg-amber-500/15 text-amber-400 h-[18px] rounded-sm px-1.5 text-[11px] font-medium leading-none",variant:"outline",children:"Native"})]}),h.jsx("div",{className:"text-muted-foreground min-h-lh truncate text-xs",children:a.description})]}),h.jsx("div",{className:ge("grid size-[18px] shrink-0 place-items-center rounded-full border transition-colors",c?"bg-primary-foreground border-primary-foreground":"border-border"),children:c&&h.jsx(Qs,{className:"text-background size-3",strokeWidth:3})})]},a.id)})})]})]})}const L1="byterover",SV=6,CV=1e3;function EV(e){return new Promise(t=>{setTimeout(t,e)})}function Tm({onOpenChange:e,onProviderActivated:t,open:n,tourStepLabel:r}){const[i,a]=C.useState("select"),[l,c]=C.useState(),[d,f]=C.useState(),[g,p]=C.useState(),[y,x]=C.useState(!1),v=C.useRef(null),S=ci(z=>z.isAuthorized),{data:E}=c9(),k=Cq(),T=kq(),R=Nq(),M=Oq(),O=Aq(),A=wq(),N=xq(),D=E?.providers??[],H=C.useCallback(()=>{a("select"),c(void 0),f(void 0),p(void 0),x(!1)},[]),I=C.useCallback(()=>{e(!1),setTimeout(H,150)},[e,H]),U=C.useCallback(z=>{z?e(!0):(e(!1),setTimeout(H,150))},[e,H]),$=C.useCallback(async z=>{a("connecting");try{let Y=await k.mutateAsync({providerId:z.id});for(let L=0;!Y.success&&L<SV;L++)await EV(CV),Y=await k.mutateAsync({providerId:z.id});if(!Y.success){st.error(Y.error??"Failed to connect ByteRover"),a("select");return}await R.mutateAsync({providerId:z.id}),st.success(`Connected to ${z.name}`),t?.(),I()}catch(Y){st.error(Sn(Y,"Connection failed")),a("select")}},[k,t,I,R]),V=C.useCallback(async z=>{if(c(z),p(void 0),z.id===L1&&!S){v.current=window.open("about:blank","_blank"),a("login_prompt");return}if(z.id===L1&&z.isCurrent){t?.(),I();return}if(z.isConnected){a("provider_actions");return}if(z.id===L1){await $(z);return}if(z.id==="openai-compatible"){a("base_url");return}if(z.supportsOAuth){a("auth_method");return}if(z.requiresApiKey){a("api_key");return}a("connecting");try{await k.mutateAsync({providerId:z.id}),x(!0),a("model_select")}catch(Y){st.error(Sn(Y,"Connection failed")),a("select")}},[$,k,S,t,I]),G=C.useCallback(async z=>{a("connecting");try{const Y=await O.mutateAsync({providerId:z.id});if(!Y.success){st.error(Y.error??"Failed to start OAuth"),a("select");return}const L=await A.mutateAsync({providerId:z.id});L.success?(x(!0),a("model_select")):(st.error(L.error??"OAuth failed"),a("select"))}catch(Y){st.error(Sn(Y,"OAuth failed")),a("select")}},[A,O]),B=C.useCallback(async z=>{if(l)switch(z){case"activate":{a("connecting");try{await R.mutateAsync({providerId:l.id}),st.success(`Activated ${l.name}`),t?.(),I()}catch(Y){p(Sn(Y,"Failed")),a("provider_actions")}break}case"change_model":{a("model_select");break}case"disconnect":{a("connecting");try{await T.mutateAsync({providerId:l.id}),st.success(`Disconnected ${l.name}`),a("select"),c(void 0),p(void 0)}catch(Y){p(Sn(Y,"Failed")),a("provider_actions")}break}case"reconfigure":{a("base_url");break}case"reconnect_oauth":{await G(l);break}case"replace":{a("api_key");break}}},[T,G,t,I,l,R]),F=C.useCallback(z=>{f(z),a("api_key")},[]),q=C.useCallback(async z=>{if(l){if(l.id!=="openai-compatible"&&z)try{const Y=await M.mutateAsync({apiKey:z,providerId:l.id});if(!Y.isValid){p(Y.error??"Invalid API key");return}}catch(Y){p(Sn(Y,"Validation failed"));return}a("connecting");try{await k.mutateAsync({apiKey:z||void 0,baseUrl:d??void 0,providerId:l.id}),x(!0),a("model_select")}catch(Y){p(Sn(Y,"Connection failed")),a("api_key")}}},[d,k,l,M]),W=C.useCallback(async z=>{if(l)try{await N.mutateAsync({contextLength:z.contextLength,modelId:z.id,providerId:l.id}),y?(st.success(`Connected to ${l.name}`),t?.(),I()):(st.success(`Model set to ${z.name}`),a("provider_actions"))}catch(Y){st.error(Sn(Y,"Failed to set model"))}},[y,t,I,l,N]),ie=C.useCallback(()=>{p(void 0),l?.id==="openai-compatible"?a("base_url"):l?.supportsOAuth?a("auth_method"):a("select")},[l]),_=()=>{switch(i){case"api_key":return l?h.jsx($q,{error:g,isOptional:l.id==="openai-compatible",isValidating:M.isPending,onBack:ie,onSubmit:z=>q(z),provider:l}):null;case"auth_method":return l?h.jsx(Gq,{onBack:()=>{a("select"),c(void 0),p(void 0)},onSelect:z=>{z==="oauth"?G(l):a("api_key")},provider:l}):null;case"base_url":return l?h.jsx(Wq,{error:g,onBack:()=>{a("select"),p(void 0)},onSubmit:F,provider:l}):null;case"connecting":return h.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[h.jsx(Gr,{className:"text-primary size-6 animate-spin"}),h.jsxs("p",{className:"text-muted-foreground text-sm",children:["Connecting to ",l?.name,"..."]})]});case"login_prompt":return l?h.jsx(Zq,{onAuthenticated:()=>{$(l)},onBack:()=>{a("select"),c(void 0)},popup:v.current}):null;case"model_select":return l?h.jsx(tV,{onBack:()=>{a(y?"select":"provider_actions")},onSelect:W,providerId:l.id}):null;case"provider_actions":return l?h.jsx(nV,{error:g,onAction:B,onBack:()=>{a("select"),c(void 0),p(void 0)},provider:l}):null;case"select":return h.jsx(wV,{onSelect:z=>V(z),providers:D});default:return null}};return h.jsx(Ws,{onOpenChange:U,open:n,children:h.jsxs(Ks,{className:"flex h-150 flex-col sm:max-w-lg",showCloseButton:i==="select"||i==="model_select"||i==="connecting"||i==="login_prompt",children:[r&&h.jsx(km,{label:r}),_()]})})}function kV(){const e=Rt(c=>c.tourActive),t=Rt(c=>c.tourStep),n=Rt(c=>c.advanceTour),r=Rt(c=>c.exitTour),i=qs(),a=e&&t==="connector",l=()=>{n(),i("/configuration")};return h.jsx(Ws,{onOpenChange:c=>!c&&r(),open:a,children:h.jsxs(Ks,{className:"flex flex-col gap-5 p-6 sm:max-w-[460px]",children:[h.jsx(km,{label:"Step 4 of 4 · Optional"}),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx("div",{className:"bg-primary/12 text-primary-foreground grid size-10 place-items-center rounded-lg",children:h.jsx(D9,{className:"size-5"})}),h.jsx("h2",{className:"text-foreground text-base font-semibold",children:"Use ByteRover from your AI agent"}),h.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["Connect a tool like Claude Code, Cursor, or any MCP client and you can curate & query the context tree without leaving your chat. It's optional — you can always come back via the"," ",h.jsx("span",{className:"text-foreground font-medium",children:"Configuration"})," tab."]})]}),h.jsxs("div",{className:"border-border -mx-6 -mb-6 mt-2 flex items-center gap-2 border-t px-6 py-4",children:[h.jsx(Re,{onClick:()=>n(),type:"button",variant:"ghost",children:"Maybe later"}),h.jsx("div",{className:"flex-1"}),h.jsxs(Re,{onClick:l,type:"button",children:["Open Configuration",h.jsx(O9,{className:"size-4"})]})]})]})})}function TV(){return Rt.getState().tourStep==="provider"}function NV(){const e=Rt(i=>i.tourActive),t=Rt(i=>i.tourStep),n=Rt(i=>i.exitTour),r=Rt(i=>i.advanceTour);return!e||!t?null:h.jsxs(h.Fragment,{children:[t==="provider"&&h.jsx(Tm,{onOpenChange:i=>{i||TV()&&n()},onProviderActivated:()=>r(),open:!0,tourStepLabel:"Step 1 of 4"}),h.jsx(kV,{})]})}function RV({className:e,curveFrom:t,direction:n}){const r=t==="right";return h.jsx("svg",{"aria-hidden":!0,className:ge("h-12 w-6",e),fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 48",children:n==="up"?r?h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M 18 46 Q 4 30 12 4",stroke:"currentColor"}),h.jsx("path",{d:"M 7 9 L 12 4 L 13 11",stroke:"currentColor"})]}):h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M 6 46 Q 20 30 12 4",stroke:"currentColor"}),h.jsx("path",{d:"M 11 11 L 12 4 L 17 9",stroke:"currentColor"})]}):r?h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M 18 2 Q 4 18 12 44",stroke:"currentColor"}),h.jsx("path",{d:"M 7 39 L 12 44 L 13 37",stroke:"currentColor"})]}):h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M 6 2 Q 20 18 12 44",stroke:"currentColor"}),h.jsx("path",{d:"M 11 37 L 12 44 L 17 39",stroke:"currentColor"})]})})}function Qx({active:e,align:t="center",children:n,className:r,label:i,side:a="bottom"}){if(!e)return h.jsx(h.Fragment,{children:n});const l=t==="end"?"left":"right";return h.jsxs("span",{className:ge("relative z-50 inline-flex",r),children:[h.jsx("span",{className:"rounded-md shadow-[0_0_0_2px_var(--primary-foreground),0_0_24px_4px_color-mix(in_oklch,var(--primary-foreground)_45%,transparent)]",children:n}),h.jsx("span",{"aria-hidden":!0,className:ge("pointer-events-none absolute left-1/2 -translate-x-1/2",a==="bottom"?"top-full mt-1":"bottom-full mb-1"),children:h.jsx(RV,{curveFrom:l,direction:a==="bottom"?"up":"down"})}),h.jsx("span",{"aria-hidden":!0,className:ge("pointer-events-none absolute",a==="bottom"?"top-[calc(100%+3.25rem)]":"bottom-[calc(100%+3.25rem)]",t==="start"&&"left-0",t==="center"&&"left-1/2 -translate-x-1/2",t==="end"&&"right-0"),children:h.jsx("span",{className:"text-xl whitespace-nowrap font-medium tracking-wide leading-tight",children:i})})]})}function AV(){const e=Rt(i=>i.seenWelcome),t=Rt(i=>i.dismissWelcome),n=Rt(i=>i.startTour),r=De(i=>i.selectedProject);return e?null:h.jsx(Ws,{onOpenChange:i=>!i&&t(),open:!0,children:h.jsxs(Ks,{className:"flex max-w-[420px] flex-col items-center gap-6 p-8 text-center sm:max-w-[420px]",showCloseButton:!1,children:[h.jsx("img",{alt:"Byterover",className:"size-11",src:Rx}),h.jsxs(hi,{className:"flex flex-col gap-2.5",children:[h.jsx(pi,{className:"text-foreground text-xl font-semibold tracking-tight",children:"Welcome to ByteRover"}),h.jsxs(Bd,{className:"text-muted-foreground text-sm leading-relaxed",children:["A 3-minute tour will get you from zero to your first answer. You can restart it any time from the"," ",h.jsx("span",{className:"text-foreground font-medium",children:"Help"})," menu in the top-right."]})]}),h.jsxs("div",{className:"flex w-full max-w-[300px] flex-col gap-2",children:[h.jsxs(Re,{onClick:()=>n(),size:"lg",children:[h.jsx(oq,{className:"size-4"}),"Take the tour"]}),h.jsx(Re,{className:"text-muted-foreground hover:text-foreground text-xs",onClick:()=>t(),variant:"link",children:"Skip — take me in"})]}),r&&h.jsx("p",{className:"text-identifier mono max-w-full truncate text-[10px] tracking-wider",title:r,children:r})]})})}function jV(){const e=Rt(l=>l.tourActive),t=Rt(l=>l.tourStep),n=Rt(l=>l.tourTaskId),r=Rt(l=>l.advanceTour),[,i]=Uy(),{data:a}=zx({queryConfig:{enabled:e&&t==="provider"}});C.useEffect(()=>{!e||t!=="provider"||a?.activeModel&&r()},[e,t,a?.activeModel,r]),C.useEffect(()=>{!e||t!=="query"||n||i(l=>{if(!l.has("task"))return l;const c=new URLSearchParams(l);return c.delete("task"),c},{replace:!0})},[e,t,n,i])}function OV(){const e=Dp(n=>n.isDialogOpen),t=Dp(n=>n.closeProviderDialog);return h.jsx(Tm,{onOpenChange:n=>!n&&t(),open:e})}const MV=()=>{const{apiClient:e}=De.getState();return e?e.request(On.STATUS):Promise.reject(new Error("Not connected"))},gi=()=>({queryFn:MV,queryKey:["vc","status"],refetchInterval:3e3,refetchIntervalInBackground:!1,staleTime:2e3}),Xx=({queryConfig:e}={})=>er({...gi(),...e}),LV=["both_added","both_modified","deleted_modified"];function _V(e){return LV.includes(e)?e:void 0}function V9(e){if(!e)return{staged:[],unmerged:[],unstaged:[]};const t=new Set(e.conflictMarkerFiles??[]),n=(e.unmerged??[]).map(({path:l,type:c})=>({conflictType:_V(c),hasMarkers:t.has(l),isStaged:!1,path:l,status:"unmerged"})),r=[...e.staged.added.map(l=>({isStaged:!0,path:l,status:"added"})),...e.staged.modified.map(l=>({isStaged:!0,path:l,status:"modified"})),...e.staged.deleted.map(l=>({isStaged:!0,path:l,status:"deleted"}))],i=[...e.unstaged.modified.map(l=>({isStaged:!1,path:l,status:"modified"})),...e.unstaged.deleted.map(l=>({isStaged:!1,path:l,status:"deleted"})),...e.untracked.map(l=>({isStaged:!1,path:l,status:"untracked"}))],a=(l,c)=>l.path.localeCompare(c.path);return{staged:r.sort(a),unmerged:n.sort(a),unstaged:i.sort(a)}}const DV="/assets/logo-byterover-DB7H7faH.svg",IV={amber:"bg-amber-500",destructive:"bg-destructive",info:"bg-blue-500",success:"bg-primary-foreground"};function UC({className:e,pulsing:t=!1,tone:n}){const r=IV[n];return t?h.jsxs("span",{className:ge("relative inline-flex size-1.5 shrink-0",e),children:[h.jsx("span",{className:ge("absolute inline-flex size-full animate-ping rounded-full opacity-75",r)}),h.jsx("span",{className:ge("relative inline-flex size-full rounded-full",r)})]}):h.jsx("span",{className:ge("inline-block size-1.5 shrink-0 rounded-full",r,e)})}const $9=C.createContext(void 0);function G9(){const e=C.useContext($9);if(e===void 0)throw new Error(Yn(13));return e}const Zx={imageLoadingStatus:()=>null},zV=C.forwardRef(function(t,n){const{className:r,render:i,...a}=t,[l,c]=C.useState("idle"),d={imageLoadingStatus:l},f=C.useMemo(()=>({imageLoadingStatus:l,setImageLoadingStatus:c}),[l,c]),g=cn("span",t,{state:d,ref:n,props:a,stateAttributesMapping:Zx});return h.jsx($9.Provider,{value:f,children:g})});function PV(e,{referrerPolicy:t,crossOrigin:n}){const[r,i]=C.useState("idle");return qe(()=>{if(!e)return i("error"),hr;let a=!0;const l=new window.Image,c=d=>()=>{a&&i(d)};return i("loading"),l.onload=c("loaded"),l.onerror=c("error"),t&&(l.referrerPolicy=t),l.crossOrigin=n??null,l.src=e,()=>{a=!1}},[e,n,t]),r}const FV={...Zx,...xc},BV=C.forwardRef(function(t,n){const{className:r,render:i,onLoadingStatusChange:a,referrerPolicy:l,crossOrigin:c,...d}=t,f=G9(),g=PV(t.src,{referrerPolicy:l,crossOrigin:c}),p=g==="loaded",{mounted:y,transitionStatus:x,setMounted:v}=cx(p),S=C.useRef(null),E=lt(R=>{a?.(R),f.setImageLoadingStatus(R)});qe(()=>{g!=="idle"&&E(g)},[g,E]);const k={imageLoadingStatus:g,transitionStatus:x};bc({open:p,ref:S,onComplete(){p||v(!1)}});const T=cn("img",t,{state:k,ref:[n,S],props:d,stateAttributesMapping:FV,enabled:y});return y?T:null}),HV=C.forwardRef(function(t,n){const{className:r,render:i,delay:a,...l}=t,{imageLoadingStatus:c}=G9(),[d,f]=C.useState(a===void 0),g=Lr();return C.useEffect(()=>(a!==void 0&&g.start(a,()=>f(!0)),g.clear),[g,a]),cn("span",t,{state:{imageLoadingStatus:c},ref:n,props:l,stateAttributesMapping:Zx,enabled:c!=="loaded"&&d})});function Ud({className:e,size:t="default",...n}){return h.jsx(zV,{"data-slot":"avatar","data-size":t,className:ge("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...n})}function Nm({className:e,...t}){return h.jsx(BV,{"data-slot":"avatar-image",className:ge("aspect-square size-full rounded-full object-cover",e),...t})}function qd({className:e,...t}){return h.jsx(HV,{"data-slot":"avatar-fallback",className:ge("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}const Y9=C.createContext(void 0);function Jx(e){const t=C.useContext(Y9);if(t===void 0&&!e)throw new Error(Yn(33));return t}const W9=C.createContext(void 0);function Xo(e){const t=C.useContext(W9);if(t===void 0&&!e)throw new Error(Yn(36));return t}const UV=C.createContext(void 0);function Rm(e=!0){const t=C.useContext(UV);if(t===void 0&&!e)throw new Error(Yn(25));return t}function qV(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:l,itemRef:c,itemMetadata:d}=e,{events:f}=a.useState("floatingTreeRoot"),g=Rm(!0),p=g!==void 0;return C.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onKeyDown(y){y.key===" "&&l?.current&&y.preventDefault()},onMouseMove(y){i&&f.emit("itemhover",{nodeId:i,target:y.currentTarget})},onClick(y){t&&f.emit("close",{domEvent:y,reason:b6})},onMouseUp(y){if(g){const x=g.initialCursorPointRef.current;if(g.initialCursorPointRef.current=null,p&&x&&Math.abs(y.clientX-x.x)<=1&&Math.abs(y.clientY-x.y)<=1||p&&!Zk&&y.button===2)return}c.current&&a.context.allowMouseUpTriggerRef.current&&(!p||y.button===2)&&(!d||d.type==="regular-item")&&c.current.click()}}),[t,n,r,f,i,a,l,c,g,p,d])}const VV={type:"regular-item"};function K9(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:a,typingRef:l=a.context.typingRef,nativeButton:c,itemMetadata:d,nodeId:f}=e,g=C.useRef(null),{getButtonProps:p,buttonRef:y}=Pd({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),x=qV({closeOnClick:t,highlighted:r,id:i,nodeId:f,store:a,typingRef:l,itemRef:g,itemMetadata:d}),v=C.useCallback(E=>Ha(x,{onMouseEnter(){d.type==="submenu-trigger"&&d.setActive()}},E,p),[x,p,d]),S=Ds(g,y);return C.useMemo(()=>({getItemProps:v,itemRef:S}),[v,S])}const Q9=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function $V(){return C.useContext(Q9)}let GV=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function eb(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:l,unregister:c,subscribeMapChange:d,elementsRef:f,labelsRef:g,nextIndexRef:p}=$V(),y=C.useRef(-1),[x,v]=C.useState(a??(i===GV.GuessFromOrder?()=>{if(y.current===-1){const k=p.current;p.current+=1,y.current=k}return y.current}:-1)),S=C.useRef(null),E=C.useCallback(k=>{if(S.current=k,x!==-1&&k!==null&&(f.current[x]=k,g)){const T=t!==void 0;g.current[x]=T?t:r?.current?.textContent??k.textContent}},[x,f,g,t,r]);return qe(()=>{if(a!=null)return;const k=S.current;if(k)return l(k,n),()=>{c(k)}},[a,l,c,n]),qe(()=>{if(a==null)return d(k=>{const T=S.current?k.get(S.current)?.index:null;T!=null&&v(T)})},[a,d,v]),C.useMemo(()=>({ref:E,index:x}),[x,E])}const X9=C.createContext(void 0);function YV(){const e=C.useContext(X9);if(e===void 0)throw new Error(Yn(31));return e}const WV=C.forwardRef(function(t,n){const{render:r,className:i,...a}=t,[l,c]=C.useState(void 0),d=C.useMemo(()=>({setLabelId:c}),[c]),f=cn("div",t,{ref:n,props:{role:"group","aria-labelledby":l,...a}});return h.jsx(X9.Provider,{value:d,children:f})}),KV=C.forwardRef(function(t,n){const{className:r,render:i,id:a,...l}=t,c=Qi(a),{setLabelId:d}=YV();return qe(()=>(d(c),()=>{d(void 0)}),[d,c]),cn("div",t,{ref:n,props:{id:c,role:"presentation",...l}})}),QV=C.forwardRef(function(t,n){const{render:r,className:i,id:a,label:l,nativeButton:c=!1,disabled:d=!1,closeOnClick:f=!0,...g}=t,p=eb({label:l}),y=Jx(!0),x=Qi(a),{store:v}=Xo(),S=v.useState("isActive",p.index),E=v.useState("itemProps"),{getItemProps:k,itemRef:T}=K9({closeOnClick:f,disabled:d,highlighted:S,id:x,store:v,nativeButton:c,nodeId:y?.nodeId,itemMetadata:VV});return cn("div",t,{state:{disabled:d,highlighted:S},props:[E,g,k],ref:[T,n,p.ref]})}),XV=C.createContext(void 0);function ZV(e){return C.useContext(XV)}const JV={...$s,...xc},e$=C.forwardRef(function(t,n){const{render:r,className:i,finalFocus:a,...l}=t,{store:c}=Xo(),{side:d,align:f}=Jx(),g=ZV()!=null,p=c.useState("open"),y=c.useState("transitionStatus"),x=c.useState("popupProps"),v=c.useState("mounted"),S=c.useState("instantType"),E=c.useState("activeTriggerElement"),k=c.useState("parent"),T=c.useState("lastOpenChangeReason"),R=c.useState("rootId"),M=c.useState("floatingRootContext"),O=c.useState("floatingTreeRoot"),A=c.useState("closeDelay"),N=c.useState("activeTriggerElement"),D=k.type==="context-menu";bc({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),C.useEffect(()=>{function B(F){c.setOpen(!1,Et(F.reason,F.domEvent))}return O.events.on("close",B),()=>{O.events.off("close",B)}},[O.events,c]);const H=c.useState("hoverEnabled"),I=c.useState("disabled");nT(M,{enabled:H&&!I&&!D&&k.type!=="menubar",closeDelay:A});const U={transitionStatus:y,side:d,align:f,open:p,nested:k.type==="menu",instant:S},$=C.useCallback(B=>{c.set("popupElement",B)},[c]),V=cn("div",t,{state:U,ref:[n,c.context.popupRef,$],stateAttributesMapping:JV,props:[x,{onKeyDown(B){g&&w9.has(B.key)&&B.stopPropagation()}},bm(y),l,{"data-rootownerid":R}]});let G=k.type===void 0||D;return(E||k.type==="menubar"&&T!==ex)&&(G=!0),h.jsx(I6,{context:M,modal:D,disabled:!v,returnFocus:a===void 0?G:a,initialFocus:k.type!=="menu",restoreFocus:!0,externalTree:k.type!=="menubar"?O:void 0,previousFocusableElement:N,nextFocusableElement:k.type===void 0?c.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:k.type===void 0?c.context.beforeContentFocusGuardRef:void 0,children:V})}),Z9=C.createContext(void 0);function t$(){const e=C.useContext(Z9);if(e===void 0)throw new Error(Yn(32));return e}const n$=C.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:a}=Xo();return a.useState("mounted")||r?h.jsx(Z9.Provider,{value:r,children:h.jsx(O6,{ref:n,...i})}):null});function r$(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=lt(i),l=C.useRef(0),c=Jn(o$).current,d=Jn(i$).current,[f,g]=C.useState(0),p=C.useRef(f),y=lt((k,T)=>{d.set(k,T??null),p.current+=1,g(p.current)}),x=lt(k=>{d.delete(k),p.current+=1,g(p.current)}),v=C.useMemo(()=>{const k=new Map;return Array.from(d.keys()).filter(R=>R.isConnected).sort(a$).forEach((R,M)=>{const O=d.get(R)??{};k.set(R,{...O,index:M})}),k},[d,f]);qe(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const k=new MutationObserver(T=>{const R=new Set,M=O=>R.has(O)?R.delete(O):R.add(O);T.forEach(O=>{O.removedNodes.forEach(M),O.addedNodes.forEach(M)}),R.size===0&&(p.current+=1,g(p.current))});return v.forEach((T,R)=>{R.parentElement&&k.observe(R.parentElement,{childList:!0})}),()=>{k.disconnect()}},[v]),qe(()=>{p.current===f&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),l.current=v.size),a(v)},[a,v,n,r,f]),qe(()=>()=>{n.current=[]},[n]),qe(()=>()=>{r&&(r.current=[])},[r]);const S=lt(k=>(c.add(k),()=>{c.delete(k)}));qe(()=>{c.forEach(k=>k(v))},[c,v]);const E=C.useMemo(()=>({register:y,unregister:x,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[y,x,S,n,r,l]);return h.jsx(Q9.Provider,{value:E,children:t})}function i$(){return new Map}function o$(){return new Set}function a$(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const s$=C.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:a,render:l,side:c,align:d,sideOffset:f=0,alignOffset:g=0,collisionBoundary:p="clipping-ancestors",collisionPadding:y=5,arrowPadding:x=5,sticky:v=!1,disableAnchorTracking:S=!1,collisionAvoidance:E=aD,...k}=t,{store:T}=Xo(),R=t$(),M=Rm(!0),O=T.useState("parent"),A=T.useState("floatingRootContext"),N=T.useState("floatingTreeRoot"),D=T.useState("mounted"),H=T.useState("open"),I=T.useState("modal"),U=T.useState("activeTriggerElement"),$=T.useState("transitionStatus"),V=T.useState("positionerElement"),G=T.useState("instantType"),B=T.useState("hasViewport"),F=T.useState("lastOpenChangeReason"),q=T.useState("floatingNodeId"),W=T.useState("floatingParentNodeId"),ie=A.useState("domReferenceElement"),_=C.useRef(null),z=X6(V,!1,!1);let Y=r,L=f,ee=g,te=d,Q=E;O.type==="context-menu"&&(Y=r??O.context?.anchor,te=te??"start",!c&&te!=="center"&&(ee=t.alignOffset??2,L=t.sideOffset??-5));let de=c,ue=te;O.type==="menu"?(de=de??"inline-end",ue=ue??"start",Q=t.collisionAvoidance??x6):O.type==="menubar"&&(de=de??"bottom",ue=ue??"start");const Se=O.type==="context-menu",Ee=fT({anchor:Y,floatingRootContext:A,positionMethod:M?"fixed":i,mounted:D,side:de,sideOffset:L,align:ue,alignOffset:ee,arrowPadding:Se?0:x,collisionBoundary:p,collisionPadding:y,sticky:v,nodeId:q,keepMounted:R,disableAnchorTracking:S,collisionAvoidance:Q,shiftCrossAxis:Se&&!("side"in Q&&Q.side==="flip"),externalTree:N,adaptiveOrigin:B?uT:void 0}),ze=C.useMemo(()=>{const Ae={};return H||(Ae.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...Ee.positionerStyles,...Ae}}},[H,D,Ee.positionerStyles]);C.useEffect(()=>{function Ae(pe){pe.open&&(pe.parentNodeId===q&&T.set("hoverEnabled",!1),pe.nodeId!==q&&pe.parentNodeId===T.select("floatingParentNodeId")&&T.setOpen(!1,Et(Hu)))}return N.events.on("menuopenchange",Ae),()=>{N.events.off("menuopenchange",Ae)}},[T,N.events,q]),C.useEffect(()=>{if(T.select("floatingParentNodeId")==null)return;function Ae(pe){if(pe.open||pe.nodeId!==T.select("floatingParentNodeId"))return;const Ce=pe.reason??Hu;T.setOpen(!1,Et(Ce))}return N.events.on("menuopenchange",Ae),()=>{N.events.off("menuopenchange",Ae)}},[N.events,T]);const Ye=Lr();C.useEffect(()=>{H||Ye.clear()},[H,Ye]),C.useEffect(()=>{function Ae(pe){if(!(!H||pe.nodeId!==T.select("floatingParentNodeId")))if(pe.target&&U&&U!==pe.target){const Ce=T.select("closeDelay");Ce>0?Ye.isStarted()||Ye.start(Ce,()=>{T.setOpen(!1,Et(Hu))}):T.setOpen(!1,Et(Hu))}else Ye.clear()}return N.events.on("itemhover",Ae),()=>{N.events.off("itemhover",Ae)}},[N.events,H,U,T,Ye]),C.useEffect(()=>{const Ae={open:H,nodeId:q,parentNodeId:W,reason:T.select("lastOpenChangeReason")};N.events.emit("menuopenchange",Ae)},[N.events,H,T,q,W]),qe(()=>{const Ae=ie,pe=_.current;if(Ae&&(_.current=Ae),pe&&Ae&&Ae!==pe){T.set("instantType",void 0);const Ce=new AbortController;return z(()=>{T.set("instantType","trigger-change")},Ce.signal),()=>{Ce.abort()}}},[ie,z,T]);const Me={open:H,side:Ee.side,align:Ee.align,anchorHidden:Ee.anchorHidden,nested:O.type==="menu",instant:G},Ie=C.useMemo(()=>({side:Ee.side,align:Ee.align,arrowRef:Ee.arrowRef,arrowUncentered:Ee.arrowUncentered,arrowStyles:Ee.arrowStyles,nodeId:Ee.context.nodeId}),[Ee.side,Ee.align,Ee.arrowRef,Ee.arrowUncentered,Ee.arrowStyles,Ee.context.nodeId]),xe=cn("div",t,{state:Me,stateAttributesMapping:$s,ref:[n,T.useStateSetter("positionerElement")],props:[ze,bm($),k]}),We=D&&O.type!=="menu"&&(O.type!=="menubar"&&I&&F!==jr||O.type==="menubar"&&O.context.modal);let Te=null;return O.type==="menubar"?Te=O.context.contentElement:O.type===void 0&&(Te=U),h.jsxs(Y9.Provider,{value:Ie,children:[We&&h.jsx(S9,{ref:O.type==="context-menu"||O.type==="nested-context-menu"?O.context.internalBackdropRef:null,inert:hT(!H),cutout:Te}),h.jsx(BD,{id:q,children:h.jsx(r$,{elementsRef:T.context.itemDomElements,labelsRef:T.context.itemLabels,children:xe})})]})}),l$=C.createContext(null);function J9(e){return C.useContext(l$)}const c$={...hx,disabled:rt(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:rt(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:rt(e=>e.allowMouseEnter),stickIfOpen:rt(e=>e.stickIfOpen),parent:rt(e=>e.parent),rootId:rt(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:rt(e=>e.activeIndex),isActive:rt((e,t)=>e.activeIndex===t),hoverEnabled:rt(e=>e.hoverEnabled),instantType:rt(e=>e.instantType),lastOpenChangeReason:rt(e=>e.openChangeReason),floatingTreeRoot:rt(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:rt(e=>e.floatingNodeId),floatingParentNodeId:rt(e=>e.floatingParentNodeId),itemProps:rt(e=>e.itemProps),closeDelay:rt(e=>e.closeDelay),hasViewport:rt(e=>e.hasViewport),keyboardEventRelay:rt(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class tb extends ym{constructor(t){super({...u$(),...t},{positionerRef:C.createRef(),popupRef:C.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:C.createRef(),beforeContentFocusGuardRef:C.createRef(),onOpenChangeComplete:void 0,triggerElements:new Ld},c$),this.unsubscribeParentListener=this.observe("parent",n=>{if(this.unsubscribeParentListener?.(),n.type==="menu"){let r=n.store.select("rootId"),i=n.store.select("floatingTreeRoot"),a=n.store.select("keyboardEventRelay");this.unsubscribeParentListener=n.store.subscribe(()=>{const l=n.store.select("rootId"),c=n.store.select("floatingTreeRoot"),d=n.store.select("keyboardEventRelay");r===l&&i===c&&a===d||(r=l,i=c,a=d,this.notifyAll())}),this.context.allowMouseUpTriggerRef=n.store.context.allowMouseUpTriggerRef;return}n.type!==void 0&&(this.context.allowMouseUpTriggerRef=n.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(t,n){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:n})}static useStore(t,n){const r=Jn(()=>new tb(n)).current;return t??r}unsubscribeParentListener=null}function u$(){return{...fx(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new ix,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Dn,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}const eN=C.createContext(void 0);function tN(){return C.useContext(eN)}const nN=qy(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:a,defaultOpen:l=!1,disabled:c=!1,modal:d,loopFocus:f=!0,orientation:g="vertical",actionsRef:p,closeParentOnEsc:y=!1,handle:x,triggerId:v,defaultTriggerId:S=null,highlightItemOnHover:E=!0}=t,k=Rm(!0),T=Xo(!0),R=J9(!0),M=tN(),O=C.useMemo(()=>M&&T?{type:"menu",store:T.store}:R?{type:"menubar",context:R}:k&&!T?{type:"context-menu",context:k}:{type:void 0},[k,T,R,M]),A=tb.useStore(x?.store,{open:l,openProp:r,activeTriggerId:S,triggerIdProp:v,parent:O});Vy(()=>{r===void 0&&A.state.open===!1&&l===!0&&A.update({open:!0,activeTriggerId:S})}),A.useControlledProp("openProp",r),A.useControlledProp("triggerIdProp",v),A.useContextCallback("onOpenChangeComplete",a);const N=A.useState("floatingTreeRoot"),D=D6(N),H=Ko();qe(()=>{k&&!T?A.update({parent:{type:"context-menu",context:k},floatingNodeId:D,floatingParentNodeId:H}):T&&A.update({floatingNodeId:D,floatingParentNodeId:H})},[k,T,D,H,A]);const I=A.useState("open"),U=A.useState("activeTriggerElement"),$=A.useState("positionerElement"),V=A.useState("hoverEnabled"),G=A.useState("modal"),B=A.useState("disabled"),F=A.useState("lastOpenChangeReason"),q=A.useState("parent"),W=A.useState("activeIndex"),ie=A.useState("payload"),_=A.useState("floatingParentNodeId"),z=C.useRef(null),Y=_!=null;let L;A.useSyncedValues({disabled:c,modal:q.type===void 0?d:void 0,rootId:Vs()});const{openMethod:ee,triggerProps:te}=k9(I);ux(A);const{forceUnmount:Q}=dx(I,A,()=>{A.update({allowMouseEnter:!1,stickIfOpen:!0})}),de=C.useRef(q.type!=="context-menu"),ue=Lr();C.useEffect(()=>{if(I||(z.current=null),q.type==="context-menu"){if(!I){ue.clear(),de.current=!1;return}ue.start(500,()=>{de.current=!0})}},[ue,I,q.type]),C9(I&&G&&F!==jr&&ee!=="touch",$),qe(()=>{!I&&!V&&A.set("hoverEnabled",!0)},[I,V,A]);const Se=C.useRef(!0),Ee=Lr(),ze=lt((Xe,Ve)=>{const pt=Ve.reason;if(I===Xe&&Ve.trigger===U&&F===pt||(Ve.preventUnmountOnClose=()=>{A.set("preventUnmountingOnClose",!0)},!Xe&&Ve.trigger==null&&(Ve.trigger=U??void 0),i?.(Xe,Ve),Ve.isCanceled))return;const mt={open:Xe,nativeEvent:Ve.event,reason:Ve.reason,nested:Y};L?.emit("openchange",mt);const Qe=Ve.event;if(Xe===!1&&Qe?.type==="click"&&Qe.pointerType==="touch"&&!Se.current)return;if(!Xe&&W!==null){const fn=A.context.itemDomElements.current[W];queueMicrotask(()=>{fn?.setAttribute("tabindex","-1")})}Xe&&pt===Xl?(Se.current=!1,Ee.start(300,()=>{Se.current=!0})):(Se.current=!0,Ee.clear());const yt=(pt===lc||pt===b6)&&Qe.detail===0&&Qe?.isTrusted,Ft=!Xe&&(pt===mm||pt==null),Kt={open:Xe,openChangeReason:pt};z.current=Ve.event??null;const xn=Ve.trigger?.id??null;(xn||Xe)&&(Kt.activeTriggerId=xn,Kt.activeTriggerElement=Ve.trigger??null),A.update(Kt),q.type==="menubar"&&(pt===Xl||pt===cc||pt===jr||pt===ep||pt===Hu)?A.set("instantType","group"):yt||Ft?A.set("instantType",yt?"click":"dismiss"):A.set("instantType",void 0)}),Ye=C.useCallback(Xe=>{const Ve=Et(Xe);return Ve.preventUnmountOnClose=()=>{A.set("preventUnmountingOnClose",!0)},Ve},[A]),Me=C.useCallback(()=>{A.setOpen(!1,Ye(tx))},[A,Ye]);C.useImperativeHandle(p,()=>({unmount:Q,close:Me}),[Q,Me]);let Ie;q.type==="context-menu"&&(Ie=q.context),C.useImperativeHandle(Ie?.positionerRef,()=>$,[$]),C.useImperativeHandle(Ie?.actionsRef,()=>({setOpen:ze}),[ze]);const xe=px({popupStore:A,onOpenChange:ze});L=xe.context.events,C.useEffect(()=>{const Xe=({open:Ve,eventDetails:pt})=>ze(Ve,pt);return L.on("setOpen",Xe),()=>{L?.off("setOpen",Xe)}},[L,ze]);const We=ax(xe,{enabled:!B,bubbles:{escapeKey:y&&q.type==="menu"},outsidePress(){return q.type!=="context-menu"||z.current?.type==="contextmenu"?!0:de.current},externalTree:Y?N:void 0}),Te=rT(xe,{role:"menu"}),Ae=cT(),pe=C.useCallback(Xe=>{A.select("activeIndex")!==Xe&&A.set("activeIndex",Xe)},[A]),Ce=Sz(xe,{enabled:!B,listRef:A.context.itemDomElements,activeIndex:W,nested:q.type!==void 0,loopFocus:f,orientation:g,parentOrientation:q.type==="menubar"?q.context.orientation:void 0,rtl:Ae==="rtl",disabledIndices:A2,onNavigate:pe,openOnArrowKeyDown:q.type!=="context-menu",externalTree:Y?N:void 0,focusItemOnHover:E}),re=C.useCallback(Xe=>{A.context.typingRef.current=Xe},[A]),be=Ez(xe,{listRef:A.context.itemLabels,elementsRef:A.context.itemDomElements,activeIndex:W,resetMs:nD,onMatch:Xe=>{I&&Xe!==W&&A.set("activeIndex",Xe)},onTypingChange:re}),{getReferenceProps:Pe,getFloatingProps:Ue,getItemProps:wt,getTriggerProps:ae}=_d([We,Te,Ce,be]),we=C.useMemo(()=>{const Xe=Ha(Pe(),{onMouseMove(){A.set("allowMouseEnter",!0)}},te);return delete Xe.role,Xe},[Pe,A,te]),Oe=C.useMemo(()=>{const Xe=ae();if(!Xe)return Xe;const Ve=Ha(Xe,te);return delete Ve.role,delete Ve["aria-controls"],Ve},[ae,te]),Le=C.useMemo(()=>Ue({onMouseMove(){A.set("allowMouseEnter",!0),q.type==="menu"&&A.set("hoverEnabled",!1)},onClick(){A.select("hoverEnabled")&&A.set("hoverEnabled",!1)},onKeyDown(Xe){const Ve=A.select("keyboardEventRelay");Ve&&!Xe.isPropagationStopped()&&Ve(Xe)}}),[Ue,q.type,A]),He=C.useMemo(()=>wt(),[wt]);A.useSyncedValues({floatingRootContext:xe,activeTriggerProps:we,inactiveTriggerProps:Oe,popupProps:Le,itemProps:He});const kt=C.useMemo(()=>({store:A,parent:O}),[A,O]),Bt=h.jsx(W9.Provider,{value:kt,children:typeof n=="function"?n({payload:ie}):n});return q.type===void 0||q.type==="context-menu"?h.jsx(HD,{externalTree:N,children:Bt}):Bt});function d$(e){const t=Xo().store,n=C.useMemo(()=>({parentMenu:t}),[t]);return h.jsx(eN.Provider,{value:n,children:h.jsx(nN,{...e})})}function f$(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const a=parseFloat(n.width)||0,l=parseFloat(n.height)||0,c=parseFloat(r.width)||0,d=parseFloat(r.height)||0,f=Math.max(t.width,a,c),g=Math.max(t.height,l,d),p=f-t.width,y=g-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-y/2,bottom:t.bottom+y/2}}function h$(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Bx(),{ref:i,index:a}=eb(e),l=n===a,c=C.useRef(null),d=Ds(i,c);return{compositeProps:C.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(a)},onMouseMove(){const g=c.current;if(!t||!g)return;const p=g.hasAttribute("disabled")||g.ariaDisabled==="true";!l&&!p&&g.focus()}}),[l,r,a,t]),compositeRef:d,index:a}}function p$(e){const{render:t,className:n,state:r=Dn,props:i=A2,refs:a=A2,metadata:l,stateAttributesMapping:c,tag:d="div",...f}=e,{compositeProps:g,compositeRef:p}=h$({metadata:l});return cn(d,e,{state:r,ref:[...a,p],props:[g,...i,f],stateAttributesMapping:c})}function rN(e){if(Rn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!so(e))return rN(po(e))}function m$(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=C.useRef(!1);return C.useMemo(()=>t?{onMouseDown:a=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,Yt(a.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:a=>{i.current&&(i.current=!1,a.preventBaseUIHandler())}}:Dn,[t,n,r])}const zh=2,g$=Vk(function(t,n){const{render:r,className:i,disabled:a=!1,nativeButton:l=!0,id:c,openOnHover:d,delay:f=100,closeDelay:g=0,handle:p,payload:y,...x}=t,v=Xo(!0),S=p?.store??v?.store;if(!S)throw new Error(Yn(85));const E=Qi(c),k=S.useState("isTriggerActive",E),T=S.useState("floatingRootContext"),R=S.useState("isOpenedByTrigger",E),M=C.useRef(null),O=x$(),A=Bx(!0),N=Qa(),D=C.useMemo(()=>N??new ix,[N]),H=D6(D),I=Ko(),{registerTrigger:U,isMountedByThisTrigger:$}=J6(E,M,S,{payload:y,closeDelay:g,parent:O,floatingTreeRoot:D,floatingNodeId:H,floatingParentNodeId:I,keyboardEventRelay:A?.relayKeyboardEvent}),V=O.type==="menubar",G=S.useState("disabled"),B=a||G||V&&O.context.disabled,{getButtonProps:F,buttonRef:q}=Pd({disabled:B,native:l});C.useEffect(()=>{!R&&O.type===void 0&&(S.context.allowMouseUpTriggerRef.current=!1)},[S,R,O.type]);const W=C.useRef(null),ie=Lr(),_=lt(Te=>{if(!W.current)return;ie.clear(),S.context.allowMouseUpTriggerRef.current=!1;const Ae=Te.target;if(ht(W.current,Ae)||ht(S.select("positionerElement"),Ae)||Ae===W.current||Ae!=null&&rN(Ae)===S.select("rootId"))return;const pe=f$(W.current);Te.clientX>=pe.left-zh&&Te.clientX<=pe.right+zh&&Te.clientY>=pe.top-zh&&Te.clientY<=pe.bottom+zh||D.events.emit("close",{domEvent:Te,reason:cD})});C.useEffect(()=>{R&&S.select("lastOpenChangeReason")===jr&&Yt(W.current).addEventListener("mouseup",_,{once:!0})},[R,_,S]);const z=V&&O.context.hasSubmenuOpen,L=yx(T,{enabled:(d??z)&&!B&&O.type!=="context-menu"&&(!V||z&&!$),handleClose:xx({blockPointerEvents:!V}),mouseOnly:!0,move:!1,restMs:O.type===void 0?f:void 0,delay:{close:g},triggerElementRef:M,externalTree:D,isActiveTrigger:k}),ee=y$(R,S.select("lastOpenChangeReason")),te=z6(T,{enabled:!B&&O.type!=="context-menu",event:R&&V?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:O.type===void 0?ee:!1}),Q=eT(T,{enabled:!B&&z}),de=m$({open:R,enabled:V,mouseDownAction:"open"}),ue=_d([te,Q]),Se={disabled:B,open:R},Ee=S.useState("triggerProps",$),ze=[W,n,q,U,M],Ye=[ue.getReferenceProps(),L??Dn,Ee,{"aria-haspopup":"menu",id:E,onMouseDown:Te=>{if(S.select("open"))return;ie.start(200,()=>{S.context.allowMouseUpTriggerRef.current=!0}),Yt(Te.currentTarget).addEventListener("mouseup",_,{once:!0})}},V?{role:"menuitem"}:{},de,x,F],Me=C.useRef(null),Ie=lt(Te=>{_i.flushSync(()=>{S.setOpen(!1,Et(cc,Te.nativeEvent,Te.currentTarget))}),J_(Me.current)?.focus()}),xe=lt(Te=>{const Ae=S.select("positionerElement");if(Ae&&Ql(Te,Ae))S.context.beforeContentFocusGuardRef.current?.focus();else{_i.flushSync(()=>{S.setOpen(!1,Et(cc,Te.nativeEvent,Te.currentTarget))});let pe=Z_(S.context.triggerFocusTargetRef.current||M.current);for(;pe!==null&&ht(Ae,pe);){const Ce=pe;if(pe=Jy(pe),pe===Ce)break}pe?.focus()}}),We=cn("button",t,{enabled:!V,stateAttributesMapping:eC,state:Se,ref:ze,props:Ye});return V?h.jsx(p$,{tag:"button",render:r,className:i,state:Se,refs:ze,props:Ye,stateAttributesMapping:eC}):R?h.jsxs(C.Fragment,{children:[h.jsx(uc,{ref:Me,onFocus:Ie},`${E}-pre-focus-guard`),h.jsx(C.Fragment,{children:We},E),h.jsx(uc,{ref:S.context.triggerFocusTargetRef,onFocus:xe},`${E}-post-focus-guard`)]}):h.jsx(C.Fragment,{children:We},E)});function y$(e,t){const n=Lr(),[r,i]=C.useState(!1);return qe(()=>{e&&t==="trigger-hover"?(i(!0),n.start(rD,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function x$(){const e=Rm(!0),t=Xo(!0),n=J9();return C.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const b$=C.forwardRef(function(t,n){const{className:r,render:i,orientation:a="horizontal",...l}=t;return cn("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},l]})}),v$=C.forwardRef(function(t,n){const{render:r,className:i,label:a,id:l,nativeButton:c=!1,openOnHover:d=!0,delay:f=100,closeDelay:g=0,disabled:p=!1,...y}=t,x=eb(),v=Jx(),{store:S}=Xo(),E=Qi(l),k=S.useState("open"),T=S.useState("floatingRootContext"),R=S.useState("floatingTreeRoot"),M=Z6(E,S),O=C.useCallback(te=>{const Q=M(te);return te!==null&&S.select("open")&&S.select("activeTriggerId")==null&&S.update({activeTriggerId:E,activeTriggerElement:te,closeDelay:g}),Q},[M,g,S,E]),A=C.useRef(null),N=C.useCallback(te=>{A.current=te,S.set("activeTriggerElement",te)},[S]),D=tN();if(!D?.parentMenu)throw new Error(Yn(37));S.useSyncedValue("closeDelay",g);const H=D.parentMenu,I=H.useState("itemProps"),U=H.useState("isActive",x.index),$=C.useMemo(()=>({type:"submenu-trigger",setActive(){H.set("activeIndex",x.index)}}),[H,x.index]),V=S.useState("disabled"),G=p||V,{getItemProps:B,itemRef:F}=K9({closeOnClick:!1,disabled:G,highlighted:U,id:E,store:S,typingRef:H.context.typingRef,nativeButton:c,itemMetadata:$,nodeId:v?.nodeId}),q=S.useState("hoverEnabled"),W=H.useState("allowMouseEnter"),ie=yx(T,{enabled:q&&d&&!G,handleClose:xx({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:f,delay:W?{open:f,close:g}:0,triggerElementRef:A,externalTree:R}),_=z6(T,{enabled:!G,event:"mousedown",toggle:!d,ignoreMouse:d,stickIfOpen:!1}),z=_d([_]),Y=S.useState("triggerProps",!0);return delete Y.id,cn("div",t,{state:{disabled:G,highlighted:U,open:k},stateAttributesMapping:iT,props:[z.getReferenceProps(),ie,Y,I,{tabIndex:k||U?0:-1,onBlur(){U&&H.set("activeIndex",null)}},y,B],ref:[n,x.ref,F,O,N]})});function Xs({...e}){return h.jsx(nN,{"data-slot":"dropdown-menu",...e})}function Zs({...e}){return h.jsx(g$,{"data-slot":"dropdown-menu-trigger",...e})}function ts({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:i,...a}){return h.jsx(n$,{children:h.jsx(s$,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:h.jsx(e$,{"data-slot":"dropdown-menu-content",className:ge("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-neutral-900 p-1 text-foreground shadow-md ring-0 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...a})})})}function Ls({...e}){return h.jsx(WV,{"data-slot":"dropdown-menu-group",...e})}function ec({className:e,inset:t,...n}){return h.jsx(KV,{"data-slot":"dropdown-menu-label","data-inset":t,className:ge("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",e),...n})}function jn({className:e,inset:t,variant:n="default",...r}){return h.jsx(QV,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ge("group/dropdown-menu-item relative flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm text-foreground outline-hidden select-none hover:bg-neutral-800 focus:bg-neutral-800 not-data-[variant=destructive]:focus:**:text-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function nb({...e}){return h.jsx(d$,{"data-slot":"dropdown-menu-sub",...e})}function rb({className:e,inset:t,children:n,...r}){return h.jsxs(v$,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:ge("flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm text-foreground outline-hidden select-none hover:bg-neutral-800 focus:bg-neutral-800 data-inset:pl-8 data-popup-open:bg-neutral-800 data-open:bg-neutral-800 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,h.jsx(ck,{className:"ml-auto"})]})}function ib({align:e="start",alignOffset:t=-3,side:n="right",sideOffset:r=0,className:i,...a}){return h.jsx(ts,{"data-slot":"dropdown-menu-sub-content",className:ge("w-auto min-w-24 rounded-lg border border-border bg-neutral-900 p-1 text-foreground shadow-lg ring-0 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),align:e,alignOffset:t,side:n,sideOffset:r,...a})}function Uo({className:e,...t}){return h.jsx(b$,{"data-slot":"dropdown-menu-separator",className:ge("-mx-1 my-1 h-px bg-border",e),...t})}function ob(e){const t=e.split(/[-_\s]+/).filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():e.slice(0,2).toUpperCase()}const w$=()=>{const{apiClient:e}=De.getState();return e?e.request(Dd.LOGOUT):Promise.reject(new Error("Not connected"))},S$=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:co().queryKey}),n?.(...i)},...r,mutationFn:w$})};function La({className:e,size:t="default",...n}){return h.jsx("div",{"data-slot":"card","data-size":t,className:ge("group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})}function C$({className:e,...t}){return h.jsx("div",{"data-slot":"card-title",className:ge("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...t})}function Ph({className:e,...t}){return h.jsx("div",{"data-slot":"card-description",className:ge("text-sm text-muted-foreground",e),...t})}const E$=2500;function k$({onOpenChange:e,open:t}){const n=en(),r=ci(p=>p.isLoggingIn),i=ci(p=>p.setLoggingIn),a=De(p=>p.connectionState),[l,c]=C.useState({type:"idle"});C.useEffect(()=>{t||(c({type:"idle"}),i(!1))},[t,i]),C.useEffect(()=>l.type!=="waiting"?void 0:U9(y=>{y.success&&y.user?(st.success(`Logged in as ${y.user.email}`),n.invalidateQueries({queryKey:co().queryKey}),e(!1)):c({message:y.error??"Authentication failed",type:"error"}),i(!1)}),[e,n,i,l.type]),C.useEffect(()=>{if(l.type!=="waiting")return;let p=!1;async function y(){try{const v=await n.fetchQuery(co());if(p)return;v.isAuthorized&&v.user&&(st.success(`Logged in as ${v.user.email}`),i(!1),e(!1))}catch{}}const x=globalThis.setInterval(y,E$);return()=>{p=!0,globalThis.clearInterval(x)}},[e,n,i,l.type]);async function d(){i(!0),c({type:"starting"});try{const p=await H9();if(!Kx(p.authUrl))throw new Error("Received an unsafe OAuth URL from the daemon");window.open(p.authUrl,"_blank","noopener,noreferrer"),c({authUrl:p.authUrl,type:"waiting"})}catch(p){i(!1),c({message:p instanceof Error?p.message:"Unable to start login",type:"error"})}}function f(){c({type:"idle"})}const g=a!=="connected"||r;return h.jsx(Ws,{onOpenChange:e,open:t,children:h.jsxs(Ks,{children:[h.jsxs(hi,{children:[h.jsx(pi,{children:"Redirecting to ByteRover"}),h.jsxs(Bd,{children:["Please sign in to your ",h.jsx("span",{className:"text-foreground",children:"byterover.dev"})," account to continue."]})]}),l.type==="starting"&&h.jsx("div",{className:"rounded-lg border border-blue-500/20 bg-blue-500/5 p-3 text-sm text-blue-700",children:"Starting authentication…"}),l.type==="waiting"&&h.jsxs(La,{className:"p-4 gap-2",children:[h.jsx("div",{children:"Finish signing in in the new tab."}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["If the tab didn’t open,"," ",h.jsx("a",{className:"underline underline-offset-2",href:l.authUrl,rel:"noopener noreferrer",target:"_blank",children:"click this link"}),"."]})]}),l.type==="error"&&h.jsx("div",{className:"rounded-lg border border-destructive/20 bg-destructive/5 p-3 text-sm text-destructive",children:l.message}),h.jsx(Ja,{children:l.type==="error"?h.jsxs(h.Fragment,{children:[h.jsx(K2,{render:h.jsx(Re,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),h.jsx(Re,{className:"cursor-pointer",onClick:f,children:"Try again"})]}):h.jsxs(h.Fragment,{children:[h.jsx(K2,{render:h.jsx(Re,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),h.jsx(Re,{className:"cursor-pointer",disabled:g,onClick:d,children:l.type==="waiting"?"Waiting for authentication…":"Proceed to Login"})]})})]})})}function T$(){const[e,t]=C.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsx(Re,{className:"h-auto rounded-full p-0",onClick:()=>t(!0),variant:"ghost",children:h.jsx(Ud,{children:h.jsx(qd,{className:"bg-transparent",children:h.jsx($x,{className:"size-4 shrink-0"})})})}),h.jsx(k$,{onOpenChange:t,open:e})]})}function N$(){const e=ci(i=>i.user),t=S$(),n=en();if(C.useEffect(()=>{e||n.invalidateQueries({queryKey:co().queryKey}).catch(()=>{})},[n,e]),!e)return h.jsxs(Re,{disabled:!0,size:"sm",variant:"outline",children:[h.jsx($x,{className:"size-4 shrink-0 text-muted-foreground"}),h.jsx("span",{children:"Signed in"})]});const r=e.name??e.email;return h.jsxs(Xs,{children:[h.jsx(Zs,{children:h.jsxs(Ud,{className:"cursor-pointer",children:[h.jsx(Nm,{alt:r,src:e.avatarUrl}),h.jsx(qd,{children:ob(r)})]})}),h.jsxs(ts,{align:"start",className:"w-(--anchor-width) min-w-56",sideOffset:6,children:[h.jsx(Ls,{children:h.jsxs(ec,{className:"flex flex-col gap-0.5",children:[h.jsx("span",{className:"text-xs tracking-widest text-muted-foreground",children:"Signed in"}),h.jsx("span",{className:"truncate text-sm font-medium text-card-foreground!",children:e.email})]})}),h.jsx(Uo,{}),h.jsxs(jn,{disabled:t.isPending,onClick:()=>t.mutate(),children:[h.jsx(KU,{className:"size-4 text-muted-foreground!"}),h.jsx("span",{className:"text-sm",children:t.isPending?"Logging out…":"Log out"})]})]})]})}function R$(){const e=ci(n=>n.isAuthorized);return ci(n=>n.isLoadingInitial)?h.jsx(Re,{disabled:!0,size:"icon",variant:"outline",children:h.jsx($x,{className:"size-4 shrink-0 text-muted-foreground animate-pulse"})}):e?h.jsx(N$,{}):h.jsx(T$,{})}function A$(){const e=Rt(i=>i.seenWelcome),t=Rt(i=>i.tourCompleted),n=Rt(i=>i.startTour),r=!e&&!t;return h.jsxs(Xs,{children:[h.jsx(Zs,{render:h.jsxs(Re,{size:"sm",variant:"ghost",children:[h.jsx(UU,{className:"size-4 mr-1"}),"Help",r&&h.jsx("span",{"aria-hidden":!0,className:ge("size-1.5 rounded-full bg-orange-500")})]})}),h.jsxs(ts,{align:"end",className:"w-56",children:[h.jsxs(jn,{className:"bg-primary/8 hover:bg-primary/12 focus:bg-primary/12",onClick:()=>n(),children:[h.jsx(yU,{className:"text-primary-foreground"}),h.jsx("span",{children:t?"Restart the tour":"Take the tour"})]}),h.jsx(Uo,{}),h.jsx(jn,{render:h.jsxs("a",{href:"https://docs.byterover.dev",rel:"noopener noreferrer",target:"_blank",children:[h.jsx(rU,{}),h.jsx("span",{children:"Documentation"})]})}),h.jsx(jn,{render:h.jsxs("a",{href:"https://github.com/campfirein/byterover-cli/issues",rel:"noopener noreferrer",target:"_blank",children:[h.jsx(oU,{}),h.jsx("span",{children:"Report an issue"})]})})]})]})}function j$(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,actionsRef:l,handle:c,triggerId:d,defaultTriggerId:f=null}=e,g=Za(),p=!!g,y=Jn(()=>c?.store??new N9({open:r,openProp:n,activeTriggerId:f,triggerIdProp:d,modal:!0,disablePointerDismissal:!0,nested:p,role:"alertdialog"})).current;y.useControlledProp("openProp",n),y.useControlledProp("triggerIdProp",d),y.useSyncedValue("nested",p),y.useContextCallback("onOpenChange",i),y.useContextCallback("onOpenChangeComplete",a);const x=y.useState("payload");T9({store:y,actionsRef:l,parentContext:g?.store.context});const v=C.useMemo(()=>({store:y}),[y]);return h.jsx(Px.Provider,{value:v,children:typeof t=="function"?t({payload:x}):t})}function Vd({...e}){return h.jsx(j$,{"data-slot":"alert-dialog",...e})}function O$({...e}){return h.jsx(Ux,{"data-slot":"alert-dialog-portal",...e})}function M$({className:e,...t}){return h.jsx(Fx,{"data-slot":"alert-dialog-overlay",className:ge("fixed inset-0 isolate z-50 bg-background/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function $d({className:e,size:t="default",...n}){return h.jsxs(O$,{children:[h.jsx(M$,{}),h.jsx(Hx,{"data-slot":"alert-dialog-content","data-size":t,className:ge("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-background p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function Gd({className:e,...t}){return h.jsx("div",{"data-slot":"alert-dialog-header",className:ge("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function Yd({className:e,...t}){return h.jsx("div",{"data-slot":"alert-dialog-footer",className:ge("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function Wd({className:e,...t}){return h.jsx(A9,{"data-slot":"alert-dialog-title",className:ge("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function Kd({className:e,...t}){return h.jsx(h9,{"data-slot":"alert-dialog-description",className:ge("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}function Qd({className:e,variant:t="outline",size:n="default",...r}){return h.jsx(Fd,{"data-slot":"alert-dialog-cancel",className:ge(e),render:h.jsx(Re,{variant:t,size:n}),...r})}const L$="state:getProjectConfig",_$=e=>{const{apiClient:t}=De.getState();return t?t.request(L$,{projectPath:e}):Promise.reject(new Error("Not connected"))},D$=e=>({enabled:e.length>0,queryFn:()=>_$(e),queryKey:["project-config",e]}),iN=({projectPath:e,queryConfig:t})=>er({...t,...D$(e)}),I$=()=>{const{apiClient:e}=De.getState();return e?e.request(s9.GET):Promise.reject(new Error("Not connected"))},z$=()=>({queryFn:I$,queryKey:["projects"]}),oN=({queryConfig:e}={})=>er({...z$(),...e}),P$=e=>{const{apiClient:t}=De.getState();return t?t.request(s9.REVEAL,e):Promise.reject(new Error("Not connected"))},F$=({mutationConfig:e}={})=>un({...e,mutationFn:P$}),B$=/^(?:\/Users\/|\/home\/|[A-Za-z]:[/\\]Users[/\\])[^/\\]+([/\\].*)$/;function aN(e){const t=B$.exec(e);return t?`~${t[1]}`:e}function Am(e){return e.replace(/[/\\]+$/,"").split(/[/\\]/).at(-1)||e}const qC=["bg-gradient-to-br from-red-600 to-red-500 text-white","bg-gradient-to-br from-orange-400 to-pink-500 text-white","bg-gradient-to-br from-teal-500 to-emerald-500 text-white","bg-gradient-to-br from-blue-800 to-blue-600 text-white","bg-gradient-to-br from-sky-400 to-sky-300 text-white","bg-gradient-to-br from-purple-500 to-pink-500 text-white","bg-gradient-to-br from-green-500 to-lime-300 text-white","bg-gradient-to-br from-yellow-300 to-orange-400 text-white","bg-gradient-to-br from-orange-500 to-red-600 text-white","bg-gradient-to-br from-cyan-400 to-cyan-300 text-white"];function H$(e){let t=0;for(let n=0;n<e.length;n++){const r=e.codePointAt(n)??0;t=Math.abs(Math.trunc(t*31+r))}return qC[t%qC.length]}const U$={lg:"size-7 text-xs",md:"size-6 text-xs",sm:"size-5 text-[10px]"};function ab({name:e,seed:t,size:n="md"}){return h.jsx("span",{className:ge("relative flex shrink-0 items-center justify-center overflow-hidden rounded font-extrabold leading-4",'before:absolute before:inset-0 before:bg-black/10 before:content-[""]',U$[n],H$(t??e)),children:h.jsx("span",{className:"relative",children:ob(e)})})}function sN({onClick:e,project:t}){const n=Am(t.projectPath);return h.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md p-2 text-left transition-colors hover:bg-accent cursor-pointer",onClick:e,type:"button",children:[h.jsx(ab,{name:n,seed:t.projectPath,size:"lg"}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[h.jsx("span",{className:"truncate text-sm font-medium leading-5 text-card-foreground",children:n}),h.jsx("span",{className:"truncate text-xs leading-4 text-muted-foreground",children:aN(t.projectPath)})]})]})}function lN({onOpenChange:e,onSelect:t,open:n,projects:r}){const[i,a]=C.useState(""),l=C.useMemo(()=>{const d=i.trim().toLowerCase();return d?r.filter(f=>f.projectPath.toLowerCase().includes(d)):r},[r,i]);function c(d){t(d),e(!1)}return h.jsx(Ws,{onOpenChange:e,open:n,children:h.jsxs(Ks,{className:"gap-2 sm:max-w-lg",children:[h.jsxs(hi,{children:[h.jsx(pi,{children:"All projects"}),h.jsx(Bd,{children:h.jsxs("div",{className:"relative",children:[h.jsx(Cc,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),h.jsx(Ii,{autoFocus:!0,className:"pl-9",onChange:d=>a(d.target.value),placeholder:"Search...",value:i})]})})]}),h.jsx("div",{className:"-mx-4 no-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto px-4 mt-2",children:l.length===0?h.jsx("p",{className:"px-2 py-4 text-center text-xs text-muted-foreground",children:"No projects match your search."}):l.map(d=>h.jsx(sN,{onClick:()=>c(d),project:d},d.projectPath))})]})})}const VC=5;function cN({name:e,project:t,remoteLabel:n}){return h.jsxs(h.Fragment,{children:[h.jsx(ab,{name:e,seed:t.projectPath}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[h.jsx("span",{className:"truncate text-sm font-medium leading-5 text-card-foreground!",children:e}),h.jsx("span",{className:"truncate text-xs leading-4 text-muted-foreground!",children:aN(t.projectPath)}),n&&h.jsx("span",{className:"text-muted-foreground! mono flex items-start gap-1 text-[10px] leading-4",children:h.jsxs("span",{className:"min-w-0 wrap-break-word",children:[h.jsx("span",{children:"Remote space: "}),h.jsx("span",{className:"text-primary-foreground! font-medium",children:n})]})})]})]})}function q$({onSelect:e,project:t,showRemote:n=!1}){const r=Am(t.projectPath),{data:i}=iN({projectPath:t.projectPath,queryConfig:{enabled:n}}),a=i?.brvConfig?.teamName,l=i?.brvConfig?.spaceName,c=a&&l?`${a} / ${l}`:void 0;return h.jsx(jn,{className:"gap-2 rounded-md",onClick:e,children:h.jsx(cN,{name:r,project:t,remoteLabel:c})})}function V$({isSelected:e,onSelect:t,project:n}){const r=Am(n.projectPath),{data:i}=iN({projectPath:n.projectPath}),a=F$(),l=i?.brvConfig?.teamName,c=i?.brvConfig?.spaceName,d=l&&c?`${l} / ${c}`:void 0,f=i?.remoteUrl&&Kx(i.remoteUrl)?i.remoteUrl:void 0;function g(){a.mutate({projectPath:n.projectPath},{onError(p){st.error(p instanceof Error?p.message:"Failed to open folder.")}})}return h.jsxs(nb,{children:[h.jsx(rb,{className:"gap-2 rounded-md",children:h.jsx(cN,{name:r,project:n,remoteLabel:d})}),h.jsxs(ib,{className:"min-w-56",children:[h.jsxs(jn,{disabled:e,onClick:t,children:[h.jsx(QH,{className:"size-4"}),h.jsx("span",{className:"text-sm",children:e?"Current project":"Switch to this project"})]}),h.jsxs(jn,{disabled:!f,onClick:()=>{f&&window.open(f,"_blank","noopener,noreferrer")},children:[h.jsx(sq,{className:"size-4"}),h.jsx("span",{className:"text-sm",children:"Open Remote space"})]}),h.jsxs(jn,{disabled:a.isPending,onClick:g,children:[h.jsx(OU,{className:"size-4"}),h.jsx("span",{className:"text-sm",children:"Open local folder"})]})]})]})}function $$(){const e=De(v=>v.selectedProject),t=De(v=>v.setSelectedProject),{data:n}=oN({queryConfig:{refetchInterval:3e3,refetchIntervalInBackground:!1,staleTime:30*1e3}}),r=C.useMemo(()=>n?.locations??[],[n]),{openProjects:i,recentProjects:a}=C.useMemo(()=>{const v=[],S=[];for(const E of r)E.isActive?v.push(E):S.push(E);return{openProjects:v,recentProjects:S}},[r]),[l,c]=C.useState(!1),[d,f]=C.useState(!1),[g,p]=C.useState(!1),y=Am(e);function x(v){v.projectPath!==e&&t(v.projectPath)}return h.jsxs(h.Fragment,{children:[h.jsxs(Xs,{onOpenChange:c,open:l,children:[h.jsxs(Zs,{render:h.jsx(Re,{variant:"ghost"}),children:[e?h.jsx(ab,{name:y,seed:e,size:"sm"}):null,h.jsx("span",{className:"truncate",children:y||"No project selected"}),h.jsx(Hd,{className:"size-4 shrink-0"})]}),h.jsxs(ts,{align:"start",className:"w-(--anchor-width) min-w-72",sideOffset:6,children:[h.jsxs(jn,{onClick:()=>f(!0),children:[h.jsx(AU,{className:"size-4"}),h.jsx("span",{className:"text-sm",children:"Open Project"})]}),h.jsx(Uo,{}),i.length>0&&h.jsxs(Ls,{children:[h.jsx(ec,{children:"Open Projects"}),i.map(v=>h.jsx(V$,{isSelected:v.projectPath===e,onSelect:()=>x(v),project:v},v.projectPath)),h.jsx(Uo,{})]}),a.length>0&&h.jsxs(Ls,{children:[h.jsx(ec,{children:"Recent Projects"}),a.slice(0,VC).map(v=>h.jsx(q$,{onSelect:()=>x(v),project:v},v.projectPath)),a.length>VC&&h.jsx(jn,{onClick:()=>p(!0),children:h.jsx("span",{className:"text-xs",children:"See all"})})]})]})]}),h.jsx(Vd,{onOpenChange:f,open:d,children:h.jsxs($d,{children:[h.jsxs(Gd,{children:[h.jsx(Wd,{children:"Add a project"}),h.jsxs(Kd,{children:["To add a project, run ",h.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm",children:"brv webui"})," in that folder from your terminal. Once registered, it will appear here."]})]}),h.jsx(Yd,{children:h.jsx(Qd,{children:"Got it"})})]})}),h.jsx(lN,{onOpenChange:p,onSelect:x,open:g,projects:r})]})}const G$=()=>{const{apiClient:e}=De.getState();return e?e.request(On.BRANCH,{action:"list",all:!0}).then(t=>{if(t.action!=="list")throw new Error(`Unexpected branch response action: ${t.action}`);return t.branches}):Promise.reject(new Error("Not connected"))},ns=()=>({queryFn:G$,queryKey:["vc","branches","all"],refetchInterval:1e4,refetchIntervalInBackground:!1,staleTime:5e3}),Y$=({queryConfig:e}={})=>er({...ns(),...e}),W$=e=>{const{apiClient:t}=De.getState();return t?t.request(On.BRANCH,{action:"set-upstream",upstream:e}):Promise.reject(new Error("Not connected"))},K$=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),t.invalidateQueries({queryKey:ns().queryKey}),n?.(...i)},...r,mutationFn:W$})},Q$=e=>{const{apiClient:t}=De.getState();return t?t.request(On.CHECKOUT,e):Promise.reject(new Error("Not connected"))},uN=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),t.invalidateQueries({queryKey:ns().queryKey}),n?.(...i)},...r,mutationFn:Q$})},X$=(e={})=>{const{apiClient:t}=De.getState();return t?t.request(On.FETCH,e):Promise.reject(new Error("Not connected"))},Z$=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),t.invalidateQueries({queryKey:ns().queryKey}),n?.(...i)},...r,mutationFn:X$})},J$=(e={})=>{const{apiClient:t}=De.getState();return t?t.request(On.PULL,e):Promise.reject(new Error("Not connected"))},dN=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),t.invalidateQueries({queryKey:ns().queryKey}),n?.(...i)},...r,mutationFn:J$})};function eG(e,t){const n=t.trim().toLowerCase();return n===""?[...e]:e.filter(r=>r.name.toLowerCase().includes(n))}const $C="refs/remotes/";function tG(e){const t=e.startsWith($C)?e.slice($C.length):e,n=t.indexOf("/");return n===-1?"unknown":t.slice(0,n)}function nG(e){const t=[],n=new Map;for(const r of e)if(r.isRemote){const i=tG(r.name),a=n.get(i);a?a.push(r):n.set(i,[r])}else t.push(r);return{locals:t,remotesByHost:n}}function rG(e,t){return t?e.some(r=>!r.isRemote&&r.name===t)?[...e]:[{isCurrent:!0,isRemote:!1,name:t},...e]:[...e]}const iG=e=>{const{apiClient:t}=De.getState();return t?t.request(On.BRANCH,{action:"delete",name:e}):Promise.reject(new Error("Not connected"))},oG=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:ns().queryKey}),n?.(...i)},...r,mutationFn:iG})};function aG({branchName:e,onOpenChange:t,open:n}){const r=oG();async function i(){try{await r.mutateAsync(e),st.success(`Deleted ${e}`),t(!1)}catch(a){st.error(a instanceof Error?a.message:"Failed to delete branch")}}return h.jsx(Vd,{onOpenChange:t,open:n,children:h.jsxs($d,{children:[h.jsxs(Gd,{children:[h.jsx(Wd,{children:"Delete branch?"}),h.jsxs(Kd,{children:["Branch ",h.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm",children:e})," will be removed. Unmerged commits on this branch will be lost unless they are reachable from another ref."]})]}),h.jsxs(Yd,{children:[h.jsx(Qd,{children:"Cancel"}),h.jsx(Re,{disabled:r.isPending,onClick:i,variant:"destructive",children:r.isPending?"Deleting…":"Delete branch"})]})]})})}function fN(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="string"}const sG=async()=>{const{apiClient:e}=De.getState();if(!e)throw new Error("Not connected");try{return{gitInitialized:!0,url:(await e.request(On.REMOTE,{subcommand:"show"})).url}}catch(t){if(fN(t)&&t.code===kr.GIT_NOT_INITIALIZED)return{gitInitialized:!1,url:void 0};throw t}},sb=()=>({queryFn:sG,queryKey:["vc","remote"],staleTime:5e3}),lG=({queryConfig:e}={})=>er({...sb(),...e}),cG=()=>{const{apiClient:e}=De.getState();return e?e.request(On.INIT):Promise.reject(new Error("Not connected"))},uG=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),t.invalidateQueries({queryKey:ns().queryKey}),t.invalidateQueries({queryKey:sb().queryKey}),n?.(...i)},...r,mutationFn:cG})};function lb(){const e=uG();async function t(){try{const n=await e.mutateAsync();st.success(n.reinitialized?"Reinitialized version control":"Initialized version control")}catch(n){st.error(n instanceof Error?n.message:"Failed to initialize")}}return h.jsxs(Re,{disabled:e.isPending,onClick:()=>{t().catch(()=>{})},size:"sm",variant:"outline",children:[h.jsx(qx,{className:"size-4 shrink-0"}),h.jsx("span",{children:e.isPending?"Initializing…":"Initialize Version Control"})]})}function dG({className:e,...t}){return h.jsx("label",{"data-slot":"label",className:ge("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const fG=vm("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function zp({className:e,orientation:t="vertical",...n}){return h.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:ge(fG({orientation:t}),e),...n})}function Pp({className:e,...t}){return h.jsx(dG,{"data-slot":"field-label",className:ge("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}function X2({className:e,...t}){return h.jsx("p",{"data-slot":"field-description",className:ge("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function hN({className:e,children:t,errors:n,...r}){const i=C.useMemo(()=>{if(t)return t;if(!n?.length)return null;const a=[...new Map(n.map(l=>[l?.message,l])).values()];return a?.length==1?a[0]?.message:h.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:a.map((l,c)=>l?.message&&h.jsx("li",{children:l.message},c))})},[t,n]);return i?h.jsx("div",{role:"alert","data-slot":"field-error",className:ge("text-sm font-normal text-destructive",e),...r,children:i}):null}function hG({initialName:e="",onOpenChange:t,open:n,startPoint:r}){const i=C.useId(),[a,l]=C.useState(e),[c,d]=C.useState(),f=uN();C.useEffect(()=>{n&&(l(e),d(void 0))},[e,n]);async function g(){const p=a.trim();if(p){d(void 0);try{await f.mutateAsync({branch:p,create:!0,startPoint:r}),st.success(r?`Created ${p} from ${r} and switched to it`:`Created and switched to ${p}`),t(!1)}catch(y){d(y instanceof Error?y.message:"Failed to create branch")}}}return h.jsx(Ws,{onOpenChange:t,open:n,children:h.jsxs(Ks,{children:[h.jsxs(hi,{children:[h.jsx(pi,{children:"New branch"}),h.jsx(Bd,{children:r?`Create a branch based on ${r} and switch to it.`:"Create a branch from the current HEAD and switch to it."})]}),h.jsxs(zp,{"data-invalid":!!c,children:[h.jsx(Pp,{htmlFor:i,children:"Branch name"}),h.jsx(Ii,{"aria-invalid":!!c,autoFocus:!0,id:i,onChange:p=>{l(p.target.value),c&&d(void 0)},onKeyDown:p=>{p.key==="Enter"&&g()},placeholder:"Branch name",value:a}),h.jsx(X2,{children:c})]}),h.jsxs(Ja,{children:[h.jsx(K2,{render:h.jsx(Re,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),h.jsx(Re,{className:"cursor-pointer",disabled:a.trim().length===0||f.isPending,onClick:g,children:f.isPending?"Creating…":"Create branch"})]})]})})}function pG(e){return e?e.initialized?e.branch?e.branch:"detached":"No git repo":"branch"}function Z2(e){const t=e.startsWith("refs/remotes/")?e.slice(13):e,n=t.indexOf("/");return n===-1?t:t.slice(n+1)}function mG(){const e=qs(),[t,n]=C.useState(!1),[r,i]=C.useState(""),[a,l]=C.useState(null),[c,d]=C.useState(""),[f,g]=C.useState(),[p,y]=C.useState(null),[x,v]=C.useState(new Set(["origin"])),S=Xx(),E=Y$({queryConfig:{enabled:S.data?.initialized??!1}}),k=uN(),T=Z$(),R=dN(),M=K$(),{locals:O,remotesByHost:A}=C.useMemo(()=>{const L=rG(E.data??[],S.data?.branch),ee=r.trim()===""?L:eG(L,r);return nG(ee)},[E.data,r,S.data?.branch]),{currentLocal:N,hasLocals:D,hasOtherLocals:H,otherLocals:I}=C.useMemo(()=>{let L;const ee=[];for(const te of O)te.isCurrent&&!L?L=te:ee.push(te);return{currentLocal:L,hasLocals:O.length>0,hasOtherLocals:ee.length>0,otherLocals:ee}},[O]),U=A.size>0;function $(L,ee=""){n(!1),d(ee),g(void 0),l(L)}function V(L){n(!1),d(Z2(L)),g(L),l("new-branch")}async function G(L,ee){n(!1);try{await k.mutateAsync({branch:L}),st.success(ee)}catch(te){st.error("Failed to switch branch",{description:Sn(te)})}}function B(L){n(!1),y({branchName:L})}async function F(L){const ee=Z2(L.name),te=(E.data??[]).find(Q=>!Q.isRemote&&Q.name===ee);if(te){G(te.name,`Switched to ${te.name}`).catch(()=>{});return}n(!1);try{await k.mutateAsync({branch:ee,create:!0,startPoint:L.name});try{await M.mutateAsync(L.name)}catch{}st.success(`Switched to ${ee} (tracking ${L.name})`)}catch(Q){st.error("Failed to checkout remote branch",{description:Sn(Q)})}}function q(L){v(ee=>{const te=new Set(ee);return te.has(L)?te.delete(L):te.add(L),te})}function W(){n(!1),st.promise(T.mutateAsync({}),{error:L=>({description:Sn(L),message:"Fetch failed"}),loading:"Fetching from remote…",success:"Fetched from remote"})}function ie(){n(!1),st.promise(R.mutateAsync({}),{error:L=>({description:Sn(L),message:"Pull failed"}),loading:"Updating project…",success:L=>L.alreadyUpToDate?`${L.branch} is up to date`:`Pulled ${L.branch}`})}const _=S.data!==void 0,z=S.data?.initialized??!1,Y=pG(S.data);return _&&!z?h.jsx(lb,{}):h.jsxs(h.Fragment,{children:[h.jsxs(Xs,{onOpenChange:n,open:t,children:[h.jsxs(Zs,{render:h.jsx(Re,{disabled:!_,variant:"ghost"}),children:[h.jsx(qx,{className:"size-4 shrink-0"}),h.jsx("span",{className:"truncate max-w-40",children:Y}),h.jsx(Hd,{className:"size-4 shrink-0"})]}),h.jsxs(ts,{align:"start",className:"w-80 p-0",sideOffset:6,children:[h.jsxs("div",{className:"flex items-center gap-1.5 p-2 border-b border-border",children:[h.jsxs("div",{className:"relative min-w-0 flex-1",children:[h.jsx(Cc,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),h.jsx(Ii,{autoFocus:!0,className:"pl-8",onChange:L=>i(L.target.value),onKeyDown:L=>L.stopPropagation(),placeholder:"Search branches…",value:r})]}),h.jsx(Re,{className:"shrink-0",disabled:T.isPending,onClick:W,size:"icon-sm",title:"Fetch",variant:"ghost",children:h.jsx(tU,{className:T.isPending?"size-4 animate-pulse":"size-4"})})]}),h.jsxs("div",{className:"max-h-[60vh] overflow-x-hidden overflow-y-auto py-1",children:[r.trim()===""&&h.jsxs(Ls,{children:[h.jsxs(jn,{onClick:ie,children:[h.jsx(GH,{className:"size-5"}),h.jsx("span",{children:"Update Project"})]}),h.jsxs(jn,{onClick:()=>{n(!1),e("/changes")},children:[h.jsx(_U,{className:"size-5"}),h.jsx("span",{children:"Commit..."})]}),h.jsx(Uo,{}),h.jsxs(jn,{onClick:()=>$("new-branch",N?.name||""),children:[h.jsx(es,{className:"size-5"}),h.jsx("span",{children:"New Branch..."})]})]}),N?h.jsxs(h.Fragment,{children:[h.jsx(Uo,{}),h.jsxs(Ls,{children:[h.jsx(ec,{children:"Current"}),h.jsx(GC,{branch:N,onCheckout:()=>{G(N.name,`Switched to ${N.name}`).catch(()=>{})},onDelete:()=>B(N.name),onNewBranchFrom:()=>V(N.name),trackingBranch:S.data?.trackingBranch})]})]}):null,H&&h.jsxs(h.Fragment,{children:[h.jsx(Uo,{}),h.jsxs(Ls,{children:[h.jsx(ec,{children:"Local"}),I.map(L=>h.jsx(GC,{branch:L,onCheckout:()=>{G(L.name,`Switched to ${L.name}`).catch(()=>{})},onDelete:()=>B(L.name),onNewBranchFrom:()=>V(L.name)},L.name))]})]}),U&&h.jsxs(h.Fragment,{children:[h.jsx(Uo,{}),h.jsxs(Ls,{children:[h.jsx(ec,{children:"Remote"}),[...A.entries()].map(([L,ee])=>h.jsx(gG,{branches:ee,expanded:x.has(L),host:L,onBranchCheckout:F,onBranchNewBranchFrom:te=>V(te.name),onToggle:()=>q(L)},L))]})]}),!D&&!U&&h.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:r?"No branches match your search.":"No branches."})]})]})]}),h.jsx(hG,{initialName:c,onOpenChange:L=>L?null:l(null),open:a==="new-branch",startPoint:f}),h.jsx(aG,{branchName:p?.branchName??"",onOpenChange:L=>L?null:y(null),open:p!==null})]})}function GC({branch:e,onCheckout:t,onDelete:n,onNewBranchFrom:r,trackingBranch:i}){return h.jsxs(nb,{children:[h.jsxs(rb,{children:[h.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.isCurrent?h.jsx(Qs,{className:"size-4 text-primary"}):null}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:e.name}),i?h.jsx("span",{className:"shrink-0 truncate max-w-32 text-xs text-muted-foreground",children:i}):null]}),h.jsxs(ib,{className:"min-w-56",children:[!e.isCurrent&&h.jsx(jn,{onClick:t,children:"Checkout"}),h.jsx(jn,{onClick:r,children:h.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["New Branch from '",e.name,"'..."]})}),!e.isCurrent&&h.jsxs(h.Fragment,{children:[h.jsx(Uo,{}),h.jsx(jn,{onClick:n,children:"Delete…"})]})]})]})}function gG({branches:e,expanded:t,host:n,onBranchCheckout:r,onBranchNewBranchFrom:i,onToggle:a}){return h.jsxs("div",{className:"flex min-w-0 flex-col",children:[h.jsxs("button",{className:"flex min-w-0 cursor-pointer items-center gap-2 px-3 py-1.5 text-sm text-foreground outline-none hover:bg-muted focus:bg-muted",onClick:a,type:"button",children:[h.jsx(M9,{className:`size-4 shrink-0 text-muted-foreground transition-transform ${t?"rotate-90":""}`}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:n})]}),t?e.map(l=>h.jsx(yG,{branch:l,onCheckout:()=>r(l),onNewBranchFrom:()=>i(l)},l.name)):null]})}function yG({branch:e,onCheckout:t,onNewBranchFrom:n}){const r=Z2(e.name);return h.jsxs(nb,{children:[h.jsx(rb,{className:"pl-15",children:h.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:r})}),h.jsxs(ib,{className:"min-w-56",children:[h.jsx(jn,{onClick:t,children:"Checkout"}),h.jsx(jn,{onClick:n,children:h.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["New Branch from '",e.name,"'..."]})})]})]})}function xG(){const e=De(c=>c.version),[t,n]=C.useState(!1),{data:r}=c9(),{data:i}=zx(),a=r?.providers.find(c=>c.isCurrent),l=a?`${a.name}${i?.activeModel?` | ${i.activeModel}`:""}`:"No model configured";return h.jsxs("header",{className:"flex items-center gap-4 px-6 py-3.5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"flex items-center gap-1.5 mr-2.5",children:[h.jsx("img",{alt:"ByteRover",className:"w-32",src:DV}),e&&h.jsxs("span",{className:"text-primary-foreground text-xs font-medium",children:["v",e]})]}),h.jsx($$,{}),h.jsx(mG,{}),h.jsxs(Ua,{children:[h.jsxs(qa,{render:h.jsx(yo,{className:"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground mono gap-1 px-1.5 text-[9px] leading-none font-semibold tracking-[0.16em] uppercase",variant:"outline"}),children:[h.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1 shrink-0 rounded-full"}),h.jsx("span",{className:"leading-none",children:"Local"})]}),h.jsx(Va,{children:"You're viewing the local web UI, served from the daemon on your machine."})]})]}),h.jsx("div",{className:"flex-1"}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(Ua,{children:[h.jsxs(qa,{render:h.jsx(Re,{onClick:()=>n(!0),size:"sm",variant:"ghost"}),children:[h.jsxs("span",{className:"relative mr-1 inline-flex size-4 shrink-0",children:[h.jsx(D9,{className:"size-4"}),a&&h.jsx(UC,{className:"border-background absolute -right-0.5 -bottom-0.5 size-2 border-2",tone:"success"})]}),l,!a&&h.jsx(UC,{pulsing:!0,tone:"amber"})]}),h.jsx(Va,{children:"Configure provider to power curate & query"})]}),h.jsx(Tm,{onOpenChange:n,open:t}),h.jsx(A$,{}),h.jsx(R$,{})]})]})}function bG(){const{completed:e,inProgress:t,total:n}=aH(),r=n>0?`${e}/${n}`:void 0,i=t>0?"active":"idle";return[{label:"Context",path:"/contexts"},{label:"Changes",path:"/changes"},{badge:r,badgeTone:i,label:"Tasks",path:"/tasks"},{label:"Configuration",path:"/configuration"}]}function vG(){const{data:e}=Xx(),{staged:t,unmerged:n,unstaged:r}=V9(e),i=t.length+r.length+n.length;return i===0?null:h.jsx("span",{className:"ml-1.5 rounded-md bg-[#4f3422] p-1 text-xs font-semibold tabular-nums text-[#ffc53d]",children:i})}function wG(){const e=bG();jV();const t=Rt(c=>c.tourActive),n=Rt(c=>c.tourStep),r=Rt(c=>c.tourTaskId),{pathname:i}=zi(),a=i.startsWith("/tasks"),l=t&&(n==="curate"||n==="query")&&!r&&!a;return h.jsxs("div",{className:"flex h-screen flex-col",children:[h.jsx(xG,{}),h.jsx("nav",{className:"border-border flex gap-2 border-b px-6",children:e.map(c=>{const d=h.jsxs(Uk,{className:({isActive:f})=>ge("flex items-center gap-1.5 border-b-2 px-2 pt-2 pb-3 text-sm transition-colors",{"border-primary-foreground text-primary-foreground font-medium":f,"border-transparent text-muted-foreground hover:text-foreground":!f}),to:c.path,children:[h.jsx("span",{children:c.label}),c.badge&&h.jsxs(yo,{className:"tabular-nums",variant:"secondary",children:[c.badgeTone==="active"&&h.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1.5 shrink-0 rounded-full"}),c.badge]}),c.path==="/changes"&&h.jsx(vG,{})]});return c.path==="/tasks"?h.jsx(Qx,{active:l,label:"Click here",children:d},c.path):h.jsx("span",{children:d},c.path)})}),h.jsx("main",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:h.jsx(Pk,{})}),h.jsx(AV,{}),h.jsx(NV,{}),h.jsx(dH,{}),h.jsx(pH,{}),h.jsx(OV,{})]})}function SG(){return h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("section",{className:"grid gap-4 grid-cols-3",children:[h.jsxs(La,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[h.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Total tasks"}),h.jsx("strong",{className:"text-3xl leading-none",children:"0"}),h.jsx(Ph,{children:"Waiting for the skipped task-subscription issue."})]}),h.jsxs(La,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[h.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Success rate"}),h.jsx("strong",{className:"text-3xl leading-none",children:"0%"}),h.jsx(Ph,{children:"No client-side task history is wired into the web app yet."})]}),h.jsxs(La,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[h.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Average duration"}),h.jsx("strong",{className:"text-3xl leading-none",children:"0s"}),h.jsx(Ph,{children:"This will populate once task-store parity lands."})]})]}),h.jsxs(La,{className:"min-h-56 items-start justify-center gap-3 px-5 shadow-sm ring-border/70",size:"sm",children:[h.jsx(yo,{className:"rounded-sm border-yellow-500/20 bg-yellow-500/10 text-yellow-600",variant:"outline",children:"Empty state"}),h.jsx(C$,{className:"font-semibold",children:"No task data available yet"}),h.jsx(Ph,{children:"The plan explicitly skips the activity/task subscription issue. This page is wired as a placeholder so the route exists cleanly and can consume task-store data once that transport work lands."})]})]})}const CG="data:image/svg+xml,%3csvg%20width='120'%20height='120'%20viewBox='0%200%20120%20120'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M60%20120C93%20120%20120%2093%20120%2060C120%2027%2093%200%2060%200C27%200%200%2027%200%2060C0%2093%2027%20120%2060%20120Z'%20fill='url(%23paint0_linear_2037_60923)'%20fill-opacity='0.15'/%3e%3cpath%20d='M60%200.75C92.5858%200.75%20119.25%2027.4142%20119.25%2060C119.25%2092.5858%2092.5858%20119.25%2060%20119.25C27.4142%20119.25%200.75%2092.5858%200.75%2060C0.75%2027.4142%2027.4142%200.75%2060%200.75Z'%20stroke='url(%23paint1_linear_2037_60923)'%20stroke-opacity='0.5'%20stroke-width='1.5'/%3e%3cpath%20d='M87.3926%2037.6738C88.505%2036.4418%2090.2734%2036.4418%2091.3857%2037.6738C92.5382%2038.9504%2092.5381%2041.0486%2091.3857%2042.3252L51.6631%2086.3262C50.5507%2087.5582%2048.7823%2087.5582%2047.6699%2086.3262L29.6143%2066.3252C28.4621%2065.0486%2028.4621%2062.9514%2029.6143%2061.6748C30.7267%2060.4426%2032.495%2060.4426%2033.6074%2061.6748L47.625%2077.2021C48.717%2078.4118%2050.616%2078.4118%2051.708%2077.2021L87.3926%2037.6738Z'%20fill='url(%23paint2_linear_2037_60923)'%20stroke='%2300E275'%20stroke-width='1.5'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2037_60923'%20x1='17.9848'%20y1='14.0983'%20x2='125.634'%20y2='103.845'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23999999'%20stop-opacity='0.5'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_2037_60923'%20x1='15.3936'%20y1='-1.63761e-06'%20x2='120'%20y2='90.8895'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'%20stop-opacity='0.5'/%3e%3cstop%20offset='1'%20stop-color='%23999999'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_2037_60923'%20x1='65.5979'%20y1='65.9795'%20x2='78.5737'%20y2='-56.684'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2309814A'/%3e%3cstop%20offset='1'%20stop-color='%2300CC66'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",EG={[kr.CONFIG_KEY_NOT_SET]:{label:"Set identity",target:"/configuration"},[kr.NO_REMOTE]:{label:"Set remote",target:"/configuration"},[kr.USER_NOT_CONFIGURED]:{label:"Set identity",target:"/configuration"}};function kG(e){if(typeof e!="object"||e===null||!("code"in e))return;const{code:t}=e;return typeof t=="string"?t:void 0}function Tu(e,t,n,r={}){const i=Sn(e,t,r),a=EG[kG(e)??""];if(a){st.error(i,{action:{label:a.label,onClick:()=>n(a.target)}});return}st.error(i)}const TG=(e={})=>{const{apiClient:t}=De.getState();return t?t.request(On.ADD,e):Promise.reject(new Error("Not connected"))},NG=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),n?.(...i)},...r,mutationFn:TG})},RG=({addAll:e,filePaths:t,message:n})=>{const{apiClient:r}=De.getState();if(!r)return Promise.reject(new Error("Not connected"));const i=()=>r.request(On.COMMIT,{message:n});if(e||t&&t.length>0){const a=t?{filePaths:t}:{};return r.request(On.ADD,a).then(i)}return i()},AG=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),n?.(...i)},...r,mutationFn:RG})},jG=()=>{const{apiClient:e}=De.getState();return e?e.request(On.MERGE,{action:"abort"}):Promise.reject(new Error("Not connected"))},OG=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),t.invalidateQueries({queryKey:["vc","diff"]}),t.invalidateQueries({queryKey:["vc","diffs"]}),n?.(...i)},...r,mutationFn:jG})},MG=e=>{const{apiClient:t}=De.getState();return t?t.request(On.MERGE,{action:"continue",message:e.message}):Promise.reject(new Error("Not connected"))},LG=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),t.invalidateQueries({queryKey:["vc","diff"]}),t.invalidateQueries({queryKey:["vc","diffs"]}),n?.(...i)},...r,mutationFn:MG})},_G=(e={})=>{const{apiClient:t}=De.getState();return t?t.request(On.PUSH,e):Promise.reject(new Error("Not connected"))},DG=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),t.invalidateQueries({queryKey:ns().queryKey}),n?.(...i)},...r,mutationFn:_G})},IG=(e={})=>{const{apiClient:t}=De.getState();return t?t.request(On.RESET,e):Promise.reject(new Error("Not connected"))},zG=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),n?.(...i)},...r,mutationFn:IG})};function PG(e){return e.status==="unmerged"?"merge":e.isStaged?"staged":"unstaged"}function cp(e){return`${PG(e)}:${e.path}`}const J2="Please sign in to use sync feature";function YC(e,t){return t?e:h.jsxs(Ua,{children:[h.jsx(qa,{render:h.jsx("span",{tabIndex:0}),children:e}),h.jsx(Va,{children:J2})]})}function FG({ahead:e=0,behind:t=0,branch:n,hasTracking:r,isAborting:i=!1,isAuthenticated:a,isPulling:l,isPushing:c,mergeInProgress:d=!1,onAbortMerge:f,onPull:g,onPush:p}){const y=l||c||i,x=a?r?"Pull from upstream":"No upstream tracking branch":J2,v=a?r?"Push to upstream":"Push and set upstream":J2,S=h.jsxs(Re,{className:"h-7 gap-1 px-2 text-sm",disabled:y||!r||!a,onClick:g,size:"sm",title:x,variant:"ghost",children:[l?h.jsx(Gr,{className:"size-3.5 animate-spin"}):h.jsx(WH,{className:"size-3.5"}),t>0&&h.jsx("span",{className:"text-sm tabular-nums",children:t})]}),E=h.jsxs(Re,{className:"h-7 gap-1 px-2 text-sm",disabled:y||!a,onClick:p,size:"sm",title:v,variant:"ghost",children:[c?h.jsx(Gr,{className:"size-3.5 animate-spin"}):h.jsx(JH,{className:"size-3.5"}),e>0&&h.jsx("span",{className:"text-sm tabular-nums",children:e})]});return h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsxs("div",{className:"text-muted-foreground flex min-w-0 items-center gap-1.5",children:[h.jsx(qx,{className:"size-4 shrink-0"}),h.jsx("span",{className:"truncate text-sm font-medium",children:n??"(detached)"})]}),h.jsxs("div",{className:"flex items-center gap-0.5",children:[d&&f&&h.jsxs(Re,{className:"text-destructive h-7 gap-1 px-2 text-sm hover:bg-destructive/10 hover:text-destructive",disabled:y,onClick:f,size:"sm",title:"Abort merge",variant:"ghost",children:[i?h.jsx(Gr,{className:"size-3.5 animate-spin"}):h.jsx(bU,{className:"size-3.5"}),h.jsx("span",{children:"Abort"})]}),YC(S,a),YC(E,a)]})]})}function cb({className:e,...t}){return h.jsx("textarea",{"data-slot":"textarea",className:ge("flex field-sizing-content min-h-16 w-full rounded-md border border-border bg-background px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-background dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...t})}function BG({canCommit:e,isCommitting:t,message:n,onCommit:r,onMessageChange:i}){const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="Enter"&&(l.preventDefault(),r())};return h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(cb,{className:"min-h-20 resize-none",onChange:l=>i(l.target.value),onKeyDown:a,placeholder:"Commit message (Cmd/Ctrl+Enter to commit)",value:n}),h.jsx(Re,{className:"w-full gap-2",disabled:!e||!n.trim()||t,onClick:r,size:"sm",children:"Commit"})]})}const HG=e=>{const{apiClient:t}=De.getState();return t?t.request(On.DIFF,e):Promise.reject(new Error("Not connected"))},UG=e=>({queryFn:()=>HG(e),queryKey:["vc","diff",e.path,e.side],staleTime:0}),qG=({enabled:e=!0,path:t,queryConfig:n,side:r})=>er({...UG({path:t,side:r}),enabled:e&&!!t,...n});function pN({file:e,onOpenFile:t,onStageToggle:n}){const r=e.isStaged?"Unstage":"Stage",i=e.isStaged?Vx:es,a=e.status==="deleted";return h.jsxs("div",{className:"border-border bg-muted sticky top-0 z-10 flex items-center gap-2 border-b px-3 py-1.5",children:[h.jsx(Em,{className:"text-primary-foreground size-4 shrink-0",strokeWidth:2}),h.jsx("span",{className:"text-foreground flex-1 truncate font-mono text-xs",children:e.path}),h.jsx(Re,{className:"size-6 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:a,onClick:t,size:"icon-xs",title:a?"File no longer exists":"Open file",variant:"ghost",children:h.jsx(Ip,{className:"size-3"})}),h.jsx(Re,{className:"size-6 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",onClick:n,size:"icon-xs",title:r,variant:"ghost",children:h.jsx(i,{className:"size-3"})})]})}var _1={exports:{}};var WC;function VG(){return WC||(WC=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",l=0;l<arguments.length;l++){var c=arguments[l];c&&(a=i(a,r(c)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var l="";for(var c in a)t.call(a,c)&&a[c]&&(l=i(l,c));return l}function i(a,l){return l?a?a+" "+l:a+l:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_1)),_1.exports}var $G=VG();const $i=pc($G);var KC=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function GG(e,t){return!!(e===t||KC(e)&&KC(t))}function YG(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!GG(e[n],t[n]))return!1;return!0}function WG(e,t){t===void 0&&(t=YG);var n=null;function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var l=e.apply(this,i);return n={lastResult:l,lastArgs:i,lastThis:this},l}return r.clear=function(){n=null},r}function KG(e,t,n){let r=0,i;const a={},l=[];return e.forEach((c,d)=>{const f=t.some(g=>g>=d-n&&g<=d+n);!f&&i===void 0?(i={index:r,startLine:d,endLine:d,lines:1},l.push(i),a[d]=i.index,r++):!f&&i?(i.endLine=d,i.lines++,a[d]=i.index):i=void 0}),{lineBlocks:a,blocks:l}}class Zo{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const a=this.castInput(t,r),l=this.castInput(n,r),c=this.removeEmpty(this.tokenize(a,r)),d=this.removeEmpty(this.tokenize(l,r));return this.diffWithOptionsObj(c,d,r,i)}diffWithOptionsObj(t,n,r,i){var a;const l=T=>{if(T=this.postProcess(T,r),i){setTimeout(function(){i(T)},0);return}else return T},c=n.length,d=t.length;let f=1,g=c+d;r.maxEditLength!=null&&(g=Math.min(g,r.maxEditLength));const p=(a=r.timeout)!==null&&a!==void 0?a:1/0,y=Date.now()+p,x=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(x[0],n,t,0,r);if(x[0].oldPos+1>=d&&v+1>=c)return l(this.buildValues(x[0].lastComponent,n,t));let S=-1/0,E=1/0;const k=()=>{for(let T=Math.max(S,-f);T<=Math.min(E,f);T+=2){let R;const M=x[T-1],O=x[T+1];M&&(x[T-1]=void 0);let A=!1;if(O){const D=O.oldPos-T;A=O&&0<=D&&D<c}const N=M&&M.oldPos+1<d;if(!A&&!N){x[T]=void 0;continue}if(!N||A&&M.oldPos<O.oldPos?R=this.addToPath(O,!0,!1,0,r):R=this.addToPath(M,!1,!0,1,r),v=this.extractCommon(R,n,t,T,r),R.oldPos+1>=d&&v+1>=c)return l(this.buildValues(R.lastComponent,n,t))||!0;x[T]=R,R.oldPos+1>=d&&(E=Math.min(E,T-1)),v+1>=c&&(S=Math.max(S,T+1))}f++};if(i)(function T(){setTimeout(function(){if(f>g||Date.now()>y)return i(void 0);k()||T()},0)})();else for(;f<=g&&Date.now()<=y;){const T=k();if(T)return T}}addToPath(t,n,r,i,a){const l=t.lastComponent;return l&&!a.oneChangePerToken&&l.added===n&&l.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:l.count+1,added:n,removed:r,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:l}}}extractCommon(t,n,r,i,a){const l=n.length,c=r.length;let d=t.oldPos,f=d-i,g=0;for(;f+1<l&&d+1<c&&this.equals(r[d+1],n[f+1],a);)f++,d++,g++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return g&&!a.oneChangePerToken&&(t.lastComponent={count:g,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,f}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const i=[];let a;for(;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();const l=i.length;let c=0,d=0,f=0;for(;c<l;c++){const g=i[c];if(g.removed)g.value=this.join(r.slice(f,f+g.count)),f+=g.count;else{if(!g.added&&this.useLongestToken){let p=n.slice(d,d+g.count);p=p.map(function(y,x){const v=r[f+x];return v.length>y.length?v:y}),g.value=this.join(p)}else g.value=this.join(n.slice(d,d+g.count));d+=g.count,g.added||(f+=g.count)}}return i}}class QG extends Zo{}const mN=new QG;function XG(e,t,n){return mN.diff(e,t,n)}function QC(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function XC(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function ey(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function ty(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Nu(e,t){return ey(e,t,"")}function Fh(e,t){return ty(e,t,"")}function ZC(e,t){return t.slice(0,ZG(e,t))}function ZG(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);const i=Array(r);let a=0;i[0]=0;for(let l=1;l<r;l++){for(t[l]==t[a]?i[l]=i[a]:i[l]=a;a>0&&t[l]!=t[a];)a=i[a];t[l]==t[a]&&a++}a=0;for(let l=n;l<e.length;l++){for(;a>0&&e[l]!=t[a];)a=i[a];e[l]==t[a]&&a++}return a}function JG(e){return e.includes(`\r
24
+ `)&&!e.startsWith(`
25
+ `)&&!e.match(/[^\r]\n/)}function eY(e){return!e.includes(`\r
26
+ `)&&e.includes(`
27
+ `)}function gN(e,t){const n=[];for(const r of Array.from(t.segment(e))){const i=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(i)?n[n.length-1]+=i:n.push(i)}return n}function ny(e,t){if(t)return Xu(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function Hl(e,t){if(t)return Xu(e,t)[0];const n=e.match(/^\s*/);return n?n[0]:""}function Xu(e,t){if(!t)return[Hl(e),ny(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');const n=gN(e,t),r=n[0],i=n[n.length-1],a=/\s/.test(r)?r:"",l=/\s/.test(i)?i:"";return[a,l]}const Fp="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",tY=new RegExp(`[${Fp}]+|\\s+|[^${Fp}]`,"ug");class nY extends Zo{equals(t,n,r){return r.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),t.trim()===n.trim()}tokenize(t,n={}){let r;if(n.intlSegmenter){const l=n.intlSegmenter;if(l.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=gN(t,l)}else r=t.match(tY)||[];const i=[];let a=null;return r.forEach(l=>{/\s/.test(l)?a==null?i.push(l):i.push(i.pop()+l):a!=null&&/\s/.test(a)?i[i.length-1]==a?i.push(i.pop()+l):i.push(a+l):i.push(l),a=l}),i}join(t){return t.map((n,r)=>r==0?n:n.replace(/^\s+/,"")).join("")}postProcess(t,n){if(!t||n.oneChangePerToken)return t;let r=null,i=null,a=null;return t.forEach(l=>{l.added?i=l:l.removed?a=l:((i||a)&&JC(r,a,i,l,n.intlSegmenter),r=l,i=null,a=null)}),(i||a)&&JC(r,a,i,null,n.intlSegmenter),t}}const yN=new nY;function rY(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?bN(e,t,n):yN.diff(e,t,n)}function JC(e,t,n,r,i){if(t&&n){const[a,l]=Xu(t.value,i),[c,d]=Xu(n.value,i);if(e){const f=QC(a,c);e.value=ty(e.value,c,f),t.value=Nu(t.value,f),n.value=Nu(n.value,f)}if(r){const f=XC(l,d);r.value=ey(r.value,d,f),t.value=Fh(t.value,f),n.value=Fh(n.value,f)}}else if(n){if(e){const a=Hl(n.value,i);n.value=n.value.substring(a.length)}if(r){const a=Hl(r.value,i);r.value=r.value.substring(a.length)}}else if(e&&r){const a=Hl(r.value,i),[l,c]=Xu(t.value,i),d=QC(a,l);t.value=Nu(t.value,d);const f=XC(Nu(a,d),c);t.value=Fh(t.value,f),r.value=ey(r.value,a,f),e.value=ty(e.value,a,a.slice(0,a.length-f.length))}else if(r){const a=Hl(r.value,i),l=ny(t.value,i),c=ZC(l,a);t.value=Fh(t.value,c)}else if(e){const a=ny(e.value,i),l=Hl(t.value,i),c=ZC(a,l);t.value=Nu(t.value,c)}}class iY extends Zo{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${Fp}]+|[^\\S\\n\\r]+|[^${Fp}]`,"ug");return t.match(n)||[]}}const xN=new iY;function bN(e,t,n){return xN.diff(e,t,n)}function oY(e,t){if(typeof e=="function")t.callback=e;else if(e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}class aY extends Zo{constructor(){super(...arguments),this.tokenize=vN}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
28
+ `))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
29
+ `))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
30
+ `)&&(t=t.slice(0,-1)),n.endsWith(`
31
+ `)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const ub=new aY;function Go(e,t,n){return ub.diff(e,t,n)}function sY(e,t,n){return n=oY(n,{ignoreWhitespace:!0}),ub.diff(e,t,n)}function vN(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
32
+ `));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const a=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=a:n.push(a)}return n}function lY(e){return e=="."||e=="!"||e=="?"}class cY extends Zo{tokenize(t){var n;const r=[];let i=0;for(let a=0;a<t.length;a++){if(a==t.length-1){r.push(t.slice(i));break}if(lY(t[a])&&t[a+1].match(/\s/)){for(r.push(t.slice(i,a+1)),a=i=a+1;!((n=t[a+1])===null||n===void 0)&&n.match(/\s/);)a++;r.push(t.slice(i,a+1)),i=a+1}}return r}}const wN=new cY;function uY(e,t,n){return wN.diff(e,t,n)}class dY extends Zo{tokenize(t){return t.split(/([{}:;,]|\s+)/)}}const SN=new dY;function fY(e,t,n){return SN.diff(e,t,n)}class hY extends Zo{constructor(){super(...arguments),this.tokenize=vN}get useLongestToken(){return!0}castInput(t,n){const{undefinedReplacement:r,stringifyReplacer:i=(a,l)=>typeof l>"u"?r:l}=n;return typeof t=="string"?t:JSON.stringify(Bp(t,null,null,i),null," ")}equals(t,n,r){return super.equals(t.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"),r)}}const CN=new hY;function pY(e,t,n){return CN.diff(e,t,n)}function Bp(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i===void 0?"":i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let l;if(Object.prototype.toString.call(e)==="[object Array]"){for(t.push(e),l=new Array(e.length),n.push(l),a=0;a<e.length;a+=1)l[a]=Bp(e[a],t,n,r,String(a));return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),typeof e=="object"&&e!==null){t.push(e),l={},n.push(l);const c=[];let d;for(d in e)Object.prototype.hasOwnProperty.call(e,d)&&c.push(d);for(c.sort(),a=0;a<c.length;a+=1)d=c[a],l[d]=Bp(e[d],t,n,r,d);t.pop(),n.pop()}else l=e;return l}class mY extends Zo{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}}const EN=new mY;function gY(e,t,n){return EN.diff(e,t,n)}function kN(e){return Array.isArray(e)?e.map(t=>kN(t)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(t=>Object.assign(Object.assign({},t),{lines:t.lines.map((n,r)=>{var i;return n.startsWith("\\")||n.endsWith("\r")||!((i=t.lines[r+1])===null||i===void 0)&&i.startsWith("\\")?n:n+"\r"})}))})}function TN(e){return Array.isArray(e)?e.map(t=>TN(t)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(t=>Object.assign(Object.assign({},t),{lines:t.lines.map(n=>n.endsWith("\r")?n.substring(0,n.length-1):n)}))})}function yY(e){return Array.isArray(e)||(e=[e]),!e.some(t=>t.hunks.some(n=>n.lines.some(r=>!r.startsWith("\\")&&r.endsWith("\r"))))}function xY(e){return Array.isArray(e)||(e=[e]),e.some(t=>t.hunks.some(n=>n.lines.some(r=>r.endsWith("\r"))))&&e.every(t=>t.hunks.every(n=>n.lines.every((r,i)=>{var a;return r.startsWith("\\")||r.endsWith("\r")||((a=n.lines[i+1])===null||a===void 0?void 0:a.startsWith("\\"))})))}function db(e){const t=e.split(/\n/),n=[];let r=0;function i(){const c={};for(n.push(c);r<t.length;){const d=t[r];if(/^(---|\+\+\+|@@)\s/.test(d))break;const f=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(d);f&&(c.index=d.substring(f[0].length).trim()),r++}for(a(c),a(c),c.hunks=[];r<t.length;){const d=t[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(d))break;if(/^@@/.test(d))c.hunks.push(l());else{if(d)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(d));r++}}}function a(c){const d=/^(---|\+\+\+)\s+/.exec(t[r]);if(d){const f=d[1],g=t[r].substring(3).trim().split(" ",2),p=(g[1]||"").trim();let y=g[0].replace(/\\\\/g,"\\");y.startsWith('"')&&y.endsWith('"')&&(y=y.substr(1,y.length-2)),f==="---"?(c.oldFileName=y,c.oldHeader=p):(c.newFileName=y,c.newHeader=p),r++}}function l(){var c;const d=r,f=t[r++],g=f.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),p={oldStart:+g[1],oldLines:typeof g[2]>"u"?1:+g[2],newStart:+g[3],newLines:typeof g[4]>"u"?1:+g[4],lines:[]};p.oldLines===0&&(p.oldStart+=1),p.newLines===0&&(p.newStart+=1);let y=0,x=0;for(;r<t.length&&(x<p.oldLines||y<p.newLines||!((c=t[r])===null||c===void 0)&&c.startsWith("\\"));r++){const v=t[r].length==0&&r!=t.length-1?" ":t[r][0];if(v==="+"||v==="-"||v===" "||v==="\\")p.lines.push(t[r]),v==="+"?y++:v==="-"?x++:v===" "&&(y++,x++);else throw new Error(`Hunk at line ${d+1} contained invalid line ${t[r]}`)}if(!y&&p.newLines===1&&(p.newLines=0),!x&&p.oldLines===1&&(p.oldLines=0),y!==p.newLines)throw new Error("Added line count did not match for hunk at line "+(d+1));if(x!==p.oldLines)throw new Error("Removed line count did not match for hunk at line "+(d+1));return p}for(;r<t.length;)i();return n}function bY(e,t,n){let r=!0,i=!1,a=!1,l=1;return function c(){if(r&&!a){if(i?l++:r=!1,e+l<=n)return e+l;a=!0}if(!i)return a||(r=!0),t<=e-l?e-l++:(i=!0,c())}}function NN(e,t,n={}){let r;if(typeof t=="string"?r=db(t):Array.isArray(t)?r=t:r=[t],r.length>1)throw new Error("applyPatch only works with a single input.");return vY(e,r[0],n)}function vY(e,t,n={}){(n.autoConvertLineEndings||n.autoConvertLineEndings==null)&&(JG(e)&&yY(t)?t=kN(t):eY(e)&&xY(t)&&(t=TN(t)));const r=e.split(`
33
+ `),i=t.hunks,a=n.compareLine||((v,S,E,k)=>S===k),l=n.fuzzFactor||0;let c=0;if(l<0||!Number.isInteger(l))throw new Error("fuzzFactor must be a non-negative integer");if(!i.length)return e;let d="",f=!1,g=!1;for(let v=0;v<i[i.length-1].lines.length;v++){const S=i[i.length-1].lines[v];S[0]=="\\"&&(d[0]=="+"?f=!0:d[0]=="-"&&(g=!0)),d=S}if(f){if(g){if(!l&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!l)return!1}else if(g){if(r[r.length-1]!="")r.push("");else if(!l)return!1}function p(v,S,E,k=0,T=!0,R=[],M=0){let O=0,A=!1;for(;k<v.length;k++){const N=v[k],D=N.length>0?N[0]:" ",H=N.length>0?N.substr(1):N;if(D==="-")if(a(S+1,r[S],D,H))S++,O=0;else return!E||r[S]==null?null:(R[M]=r[S],p(v,S+1,E-1,k,!1,R,M+1));if(D==="+"){if(!T)return null;R[M]=H,M++,O=0,A=!0}if(D===" ")if(O++,R[M]=r[S],a(S+1,r[S],D,H))M++,T=!0,A=!1,S++;else return A||!E?null:r[S]&&(p(v,S+1,E-1,k+1,!1,R,M+1)||p(v,S+1,E-1,k,!1,R,M+1))||p(v,S,E-1,k+1,!1,R,M)}return M-=O,S-=O,R.length=M,{patchedLines:R,oldLineLastI:S-1}}const y=[];let x=0;for(let v=0;v<i.length;v++){const S=i[v];let E;const k=r.length-S.oldLines+l;let T;for(let R=0;R<=l;R++){T=S.oldStart+x-1;const M=bY(T,c,k);for(;T!==void 0&&(E=p(S.lines,T,R),!E);T=M());if(E)break}if(!E)return!1;for(let R=c;R<T;R++)y.push(r[R]);for(let R=0;R<E.patchedLines.length;R++){const M=E.patchedLines[R];y.push(M)}c=E.oldLineLastI+1,x=T+1-S.oldStart}for(let v=c;v<r.length;v++)y.push(r[v]);return y.join(`
34
+ `)}function wY(e,t){const n=typeof e=="string"?db(e):e;let r=0;function i(){const a=n[r++];if(!a)return t.complete();t.loadFile(a,function(l,c){if(l)return t.complete(l);const d=NN(c,a,t);t.patched(a,d,function(f){if(f)return t.complete(f);i()})})}i()}function RN(e){return Array.isArray(e)?e.map(t=>RN(t)).reverse():Object.assign(Object.assign({},e),{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(t=>({oldLines:t.newLines,oldStart:t.newStart,newLines:t.oldLines,newStart:t.oldStart,lines:t.lines.map(n=>n.startsWith("-")?`+${n.slice(1)}`:n.startsWith("+")?`-${n.slice(1)}`:n)}))})}const AN={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},SY={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},CY={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function ry(e,t,n,r,i,a,l){let c;l?typeof l=="function"?c={callback:l}:c=l:c={},typeof c.context>"u"&&(c.context=4);const d=c.context;if(c.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(c.callback){const{callback:g}=c;Go(n,r,Object.assign(Object.assign({},c),{callback:p=>{const y=f(p);g(y)}}))}else return f(Go(n,r,c));function f(g){if(!g)return;g.push({value:"",lines:[]});function p(T){return T.map(function(R){return" "+R})}const y=[];let x=0,v=0,S=[],E=1,k=1;for(let T=0;T<g.length;T++){const R=g[T],M=R.lines||kY(R.value);if(R.lines=M,R.added||R.removed){if(!x){const O=g[T-1];x=E,v=k,O&&(S=d>0?p(O.lines.slice(-d)):[],x-=S.length,v-=S.length)}for(const O of M)S.push((R.added?"+":"-")+O);R.added?k+=M.length:E+=M.length}else{if(x)if(M.length<=d*2&&T<g.length-2)for(const O of p(M))S.push(O);else{const O=Math.min(M.length,d);for(const N of p(M.slice(0,O)))S.push(N);const A={oldStart:x,oldLines:E-x+O,newStart:v,newLines:k-v+O,lines:S};y.push(A),x=0,v=0,S=[]}E+=M.length,k+=M.length}}for(const T of y)for(let R=0;R<T.lines.length;R++)T.lines[R].endsWith(`
35
+ `)?T.lines[R]=T.lines[R].slice(0,-1):(T.lines.splice(R+1,0,"\"),R++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:y}}}function Hp(e,t){if(t||(t=AN),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(r=>Hp(r,t)).join(`
36
+ `)}const n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push("Index: "+e.oldFileName),t.includeUnderline&&n.push("==================================================================="),t.includeFileHeaders&&(n.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),n.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let r=0;r<e.hunks.length;r++){const i=e.hunks[r];i.oldLines===0&&(i.oldStart-=1),i.newLines===0&&(i.newStart-=1),n.push("@@ -"+i.oldStart+","+i.oldLines+" +"+i.newStart+","+i.newLines+" @@");for(const a of i.lines)n.push(a)}return n.join(`
37
+ `)+`
38
+ `}function jN(e,t,n,r,i,a,l){if(typeof l=="function"&&(l={callback:l}),l?.callback){const{callback:c}=l;ry(e,t,n,r,i,a,Object.assign(Object.assign({},l),{callback:d=>{c(d?Hp(d,l.headerOptions):void 0)}}))}else{const c=ry(e,t,n,r,i,a,l);return c?Hp(c,l?.headerOptions):void 0}}function EY(e,t,n,r,i,a){return jN(e,e,t,n,r,i,a)}function kY(e){const t=e.endsWith(`
39
+ `),n=e.split(`
40
+ `).map(r=>r+`
41
+ `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function TY(e){const t=[];let n,r;for(let i=0;i<e.length;i++)n=e[i],n.added?r=1:n.removed?r=-1:r=0,t.push([r,n.value]);return t}function NY(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push(RY(r.value)),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}return t.join("")}function RY(e){let t=e;return t=t.replace(/&/g,"&amp;"),t=t.replace(/</g,"&lt;"),t=t.replace(/>/g,"&gt;"),t=t.replace(/"/g,"&quot;"),t}const AY=Object.freeze(Object.defineProperty({__proto__:null,Diff:Zo,FILE_HEADERS_ONLY:SY,INCLUDE_HEADERS:AN,OMIT_HEADERS:CY,applyPatch:NN,applyPatches:wY,arrayDiff:EN,canonicalize:Bp,characterDiff:mN,convertChangesToDMP:TY,convertChangesToXML:NY,createPatch:EY,createTwoFilesPatch:jN,cssDiff:SN,diffArrays:gY,diffChars:XG,diffCss:fY,diffJson:pY,diffLines:Go,diffSentences:uY,diffTrimmedLines:sY,diffWords:rY,diffWordsWithSpace:bN,formatPatch:Hp,jsonDiff:CN,lineDiff:ub,parsePatch:db,reversePatch:RN,sentenceDiff:wN,structuredPatch:ry,wordDiff:yN,wordsWithSpaceDiff:xN},Symbol.toStringTag,{value:"Module"}));function ON(e){return typeof e>"u"||e===null}function jY(e){return typeof e=="object"&&e!==null}function OY(e){return Array.isArray(e)?e:ON(e)?[]:[e]}function MY(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}function LY(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function _Y(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var DY=ON,IY=jY,zY=OY,PY=LY,FY=_Y,BY=MY,Xn={isNothing:DY,isObject:IY,toArray:zY,repeat:PY,isNegativeZero:FY,extend:BY};function MN(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
42
+
43
+ `+e.mark.snippet),r+" "+n):r}function fd(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=MN(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}fd.prototype=Object.create(Error.prototype);fd.prototype.constructor=fd;fd.prototype.toString=function(t){return this.name+": "+MN(this,t)};var qr=fd;function D1(e,t,n,r,i){var a="",l="",c=Math.floor(i/2)-1;return r-t>c&&(a=" ... ",t=r-c+a.length),n-r>c&&(l=" ...",n=r+c-l.length),{str:a+e.slice(t,n).replace(/\t/g,"→")+l,pos:r-t+a.length}}function I1(e,t){return Xn.repeat(" ",t-e.length)+e}function HY(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,l=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var c="",d,f,g=Math.min(e.line+t.linesAfter,i.length).toString().length,p=t.maxLength-(t.indent+g+3);for(d=1;d<=t.linesBefore&&!(l-d<0);d++)f=D1(e.buffer,r[l-d],i[l-d],e.position-(r[l]-r[l-d]),p),c=Xn.repeat(" ",t.indent)+I1((e.line-d+1).toString(),g)+" | "+f.str+`
44
+ `+c;for(f=D1(e.buffer,r[l],i[l],e.position,p),c+=Xn.repeat(" ",t.indent)+I1((e.line+1).toString(),g)+" | "+f.str+`
45
+ `,c+=Xn.repeat("-",t.indent+g+3+f.pos)+`^
46
+ `,d=1;d<=t.linesAfter&&!(l+d>=i.length);d++)f=D1(e.buffer,r[l+d],i[l+d],e.position-(r[l]-r[l+d]),p),c+=Xn.repeat(" ",t.indent)+I1((e.line+d+1).toString(),g)+" | "+f.str+`
47
+ `;return c.replace(/\n$/,"")}var UY=HY,qY=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],VY=["scalar","sequence","mapping"];function $Y(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function GY(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(qY.indexOf(n)===-1)throw new qr('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=$Y(t.styleAliases||null),VY.indexOf(this.kind)===-1)throw new qr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var vr=GY;function e4(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(a,l){a.tag===r.tag&&a.kind===r.kind&&a.multi===r.multi&&(i=l)}),n[i]=r}),n}function YY(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function iy(e){return this.extend(e)}iy.prototype.extend=function(t){var n=[],r=[];if(t instanceof vr)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new qr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(a){if(!(a instanceof vr))throw new qr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new qr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new qr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof vr))throw new qr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(iy.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=e4(i,"implicit"),i.compiledExplicit=e4(i,"explicit"),i.compiledTypeMap=YY(i.compiledImplicit,i.compiledExplicit),i};var WY=iy,KY=new vr("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),QY=new vr("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),XY=new vr("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ZY=new WY({explicit:[KY,QY,XY]});function JY(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function eW(){return null}function tW(e){return e===null}var nW=new vr("tag:yaml.org,2002:null",{kind:"scalar",resolve:JY,construct:eW,predicate:tW,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function rW(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function iW(e){return e==="true"||e==="True"||e==="TRUE"}function oW(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var aW=new vr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:rW,construct:iW,predicate:oW,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function sW(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function lW(e){return 48<=e&&e<=55}function cW(e){return 48<=e&&e<=57}function uW(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!sW(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!lW(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(!cW(e.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function dW(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function fW(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Xn.isNegativeZero(e)}var hW=new vr("tag:yaml.org,2002:int",{kind:"scalar",resolve:uW,construct:dW,predicate:fW,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),pW=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mW(e){return!(e===null||!pW.test(e)||e[e.length-1]==="_")}function gW(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var yW=/^[-+]?[0-9]+e/;function xW(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Xn.isNegativeZero(e))return"-0.0";return n=e.toString(10),yW.test(n)?n.replace("e",".e"):n}function bW(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Xn.isNegativeZero(e))}var vW=new vr("tag:yaml.org,2002:float",{kind:"scalar",resolve:mW,construct:gW,predicate:bW,represent:xW,defaultStyle:"lowercase"}),wW=ZY.extend({implicit:[nW,aW,hW,vW]}),SW=wW,LN=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function CW(e){return e===null?!1:LN.exec(e)!==null||_N.exec(e)!==null}function EW(e){var t,n,r,i,a,l,c,d=0,f=null,g,p,y;if(t=LN.exec(e),t===null&&(t=_N.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],l=+t[5],c=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(g=+t[10],p=+(t[11]||0),f=(g*60+p)*6e4,t[9]==="-"&&(f=-f)),y=new Date(Date.UTC(n,r,i,a,l,c,d)),f&&y.setTime(y.getTime()-f),y}function kW(e){return e.toISOString()}var TW=new vr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:CW,construct:EW,instanceOf:Date,represent:kW});function NW(e){return e==="<<"||e===null}var RW=new vr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:NW}),fb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
48
+ \r`;function AW(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=fb;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function jW(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,a=fb,l=0,c=[];for(t=0;t<i;t++)t%4===0&&t&&(c.push(l>>16&255),c.push(l>>8&255),c.push(l&255)),l=l<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(c.push(l>>16&255),c.push(l>>8&255),c.push(l&255)):n===18?(c.push(l>>10&255),c.push(l>>2&255)):n===12&&c.push(l>>4&255),new Uint8Array(c)}function OW(e){var t="",n=0,r,i,a=e.length,l=fb;for(r=0;r<a;r++)r%3===0&&r&&(t+=l[n>>18&63],t+=l[n>>12&63],t+=l[n>>6&63],t+=l[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=l[n>>18&63],t+=l[n>>12&63],t+=l[n>>6&63],t+=l[n&63]):i===2?(t+=l[n>>10&63],t+=l[n>>4&63],t+=l[n<<2&63],t+=l[64]):i===1&&(t+=l[n>>2&63],t+=l[n<<4&63],t+=l[64],t+=l[64]),t}function MW(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var LW=new vr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:AW,construct:jW,predicate:MW,represent:OW}),_W=Object.prototype.hasOwnProperty,DW=Object.prototype.toString;function IW(e){if(e===null)return!0;var t=[],n,r,i,a,l,c=e;for(n=0,r=c.length;n<r;n+=1){if(i=c[n],l=!1,DW.call(i)!=="[object Object]")return!1;for(a in i)if(_W.call(i,a))if(!l)l=!0;else return!1;if(!l)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function zW(e){return e!==null?e:[]}var PW=new vr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:IW,construct:zW}),FW=Object.prototype.toString;function BW(e){if(e===null)return!0;var t,n,r,i,a,l=e;for(a=new Array(l.length),t=0,n=l.length;t<n;t+=1){if(r=l[t],FW.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}function HW(e){if(e===null)return[];var t,n,r,i,a,l=e;for(a=new Array(l.length),t=0,n=l.length;t<n;t+=1)r=l[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}var UW=new vr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:BW,construct:HW}),qW=Object.prototype.hasOwnProperty;function VW(e){if(e===null)return!0;var t,n=e;for(t in n)if(qW.call(n,t)&&n[t]!==null)return!1;return!0}function $W(e){return e!==null?e:{}}var GW=new vr("tag:yaml.org,2002:set",{kind:"mapping",resolve:VW,construct:$W}),DN=SW.extend({implicit:[TW,RW],explicit:[LW,PW,UW,GW]}),$a=Object.prototype.hasOwnProperty,Up=1,IN=2,zN=3,qp=4,z1=1,YW=2,t4=3,WW=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,KW=/[\x85\u2028\u2029]/,QW=/[,\[\]\{\}]/,PN=/^(?:!|!!|![a-z\-]+!)$/i,FN=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function n4(e){return Object.prototype.toString.call(e)}function uo(e){return e===10||e===13}function _s(e){return e===9||e===32}function Vr(e){return e===9||e===32||e===10||e===13}function $l(e){return e===44||e===91||e===93||e===123||e===125}function XW(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function ZW(e){return e===120?2:e===117?4:e===85?8:0}function JW(e){return 48<=e&&e<=57?e-48:-1}function r4(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
49
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function eK(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function BN(e,t,n){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}var HN=new Array(256),UN=new Array(256);for(var Il=0;Il<256;Il++)HN[Il]=r4(Il)?1:0,UN[Il]=r4(Il);function tK(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||DN,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function qN(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=UY(n),new qr(t,n)}function it(e,t){throw qN(e,t)}function Vp(e,t){e.onWarning&&e.onWarning.call(null,qN(e,t))}var i4={YAML:function(t,n,r){var i,a,l;t.version!==null&&it(t,"duplication of %YAML directive"),r.length!==1&&it(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&it(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),l=parseInt(i[2],10),a!==1&&it(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=l<2,l!==1&&l!==2&&Vp(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,a;r.length!==2&&it(t,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],PN.test(i)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),$a.call(t.tagMap,i)&&it(t,'there is a previously declared suffix for "'+i+'" tag handle'),FN.test(a)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{it(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a}};function Ba(e,t,n,r){var i,a,l,c;if(t<n){if(c=e.input.slice(t,n),r)for(i=0,a=c.length;i<a;i+=1)l=c.charCodeAt(i),l===9||32<=l&&l<=1114111||it(e,"expected valid JSON character");else WW.test(c)&&it(e,"the stream contains non-printable characters");e.result+=c}}function o4(e,t,n,r){var i,a,l,c;for(Xn.isObject(n)||it(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),l=0,c=i.length;l<c;l+=1)a=i[l],$a.call(t,a)||(BN(t,a,n[a]),r[a]=!0)}function Gl(e,t,n,r,i,a,l,c,d){var f,g;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),f=0,g=i.length;f<g;f+=1)Array.isArray(i[f])&&it(e,"nested arrays are not supported inside keys"),typeof i=="object"&&n4(i[f])==="[object Object]"&&(i[f]="[object Object]");if(typeof i=="object"&&n4(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(f=0,g=a.length;f<g;f+=1)o4(e,t,a[f],n);else o4(e,t,a,n);else!e.json&&!$a.call(n,i)&&$a.call(t,i)&&(e.line=l||e.line,e.lineStart=c||e.lineStart,e.position=d||e.position,it(e,"duplicated mapping key")),BN(t,i,a),delete n[i];return t}function hb(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):it(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Vn(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;_s(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(uo(i))for(hb(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Vp(e,"deficient indentation"),r}function jm(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Vr(n)))}function pb(e,t){t===1?e.result+=" ":t>1&&(e.result+=Xn.repeat(`
50
+ `,t-1))}function nK(e,t,n){var r,i,a,l,c,d,f,g,p=e.kind,y=e.result,x;if(x=e.input.charCodeAt(e.position),Vr(x)||$l(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(i=e.input.charCodeAt(e.position+1),Vr(i)||n&&$l(i)))return!1;for(e.kind="scalar",e.result="",a=l=e.position,c=!1;x!==0;){if(x===58){if(i=e.input.charCodeAt(e.position+1),Vr(i)||n&&$l(i))break}else if(x===35){if(r=e.input.charCodeAt(e.position-1),Vr(r))break}else{if(e.position===e.lineStart&&jm(e)||n&&$l(x))break;if(uo(x))if(d=e.line,f=e.lineStart,g=e.lineIndent,Vn(e,!1,-1),e.lineIndent>=t){c=!0,x=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=d,e.lineStart=f,e.lineIndent=g;break}}c&&(Ba(e,a,l,!1),pb(e,e.line-d),a=l=e.position,c=!1),_s(x)||(l=e.position+1),x=e.input.charCodeAt(++e.position)}return Ba(e,a,l,!1),e.result?!0:(e.kind=p,e.result=y,!1)}function rK(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Ba(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else uo(n)?(Ba(e,r,i,!0),pb(e,Vn(e,!1,t)),r=i=e.position):e.position===e.lineStart&&jm(e)?it(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);it(e,"unexpected end of the stream within a single quoted scalar")}function iK(e,t){var n,r,i,a,l,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return Ba(e,n,e.position,!0),e.position++,!0;if(c===92){if(Ba(e,n,e.position,!0),c=e.input.charCodeAt(++e.position),uo(c))Vn(e,!1,t);else if(c<256&&HN[c])e.result+=UN[c],e.position++;else if((l=ZW(c))>0){for(i=l,a=0;i>0;i--)c=e.input.charCodeAt(++e.position),(l=XW(c))>=0?a=(a<<4)+l:it(e,"expected hexadecimal character");e.result+=eK(a),e.position++}else it(e,"unknown escape sequence");n=r=e.position}else uo(c)?(Ba(e,n,r,!0),pb(e,Vn(e,!1,t)),n=r=e.position):e.position===e.lineStart&&jm(e)?it(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}it(e,"unexpected end of the stream within a double quoted scalar")}function oK(e,t){var n=!0,r,i,a,l=e.tag,c,d=e.anchor,f,g,p,y,x,v=Object.create(null),S,E,k,T;if(T=e.input.charCodeAt(e.position),T===91)g=93,x=!1,c=[];else if(T===123)g=125,x=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),T=e.input.charCodeAt(++e.position);T!==0;){if(Vn(e,!0,t),T=e.input.charCodeAt(e.position),T===g)return e.position++,e.tag=l,e.anchor=d,e.kind=x?"mapping":"sequence",e.result=c,!0;n?T===44&&it(e,"expected the node content, but found ','"):it(e,"missed comma between flow collection entries"),E=S=k=null,p=y=!1,T===63&&(f=e.input.charCodeAt(e.position+1),Vr(f)&&(p=y=!0,e.position++,Vn(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,dc(e,t,Up,!1,!0),E=e.tag,S=e.result,Vn(e,!0,t),T=e.input.charCodeAt(e.position),(y||e.line===r)&&T===58&&(p=!0,T=e.input.charCodeAt(++e.position),Vn(e,!0,t),dc(e,t,Up,!1,!0),k=e.result),x?Gl(e,c,v,E,S,k,r,i,a):p?c.push(Gl(e,null,v,E,S,k,r,i,a)):c.push(S),Vn(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(n=!0,T=e.input.charCodeAt(++e.position)):n=!1}it(e,"unexpected end of the stream within a flow collection")}function aK(e,t){var n,r,i=z1,a=!1,l=!1,c=t,d=0,f=!1,g,p;if(p=e.input.charCodeAt(e.position),p===124)r=!1;else if(p===62)r=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)z1===i?i=p===43?t4:YW:it(e,"repeat of a chomping mode identifier");else if((g=JW(p))>=0)g===0?it(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?it(e,"repeat of an indentation width identifier"):(c=t+g-1,l=!0);else break;if(_s(p)){do p=e.input.charCodeAt(++e.position);while(_s(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!uo(p)&&p!==0)}for(;p!==0;){for(hb(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!l||e.lineIndent<c)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>c&&(c=e.lineIndent),uo(p)){d++;continue}if(e.lineIndent<c){i===t4?e.result+=Xn.repeat(`
51
+ `,a?1+d:d):i===z1&&a&&(e.result+=`
52
+ `);break}for(r?_s(p)?(f=!0,e.result+=Xn.repeat(`
53
+ `,a?1+d:d)):f?(f=!1,e.result+=Xn.repeat(`
54
+ `,d+1)):d===0?a&&(e.result+=" "):e.result+=Xn.repeat(`
55
+ `,d):e.result+=Xn.repeat(`
56
+ `,a?1+d:d),a=!0,l=!0,d=0,n=e.position;!uo(p)&&p!==0;)p=e.input.charCodeAt(++e.position);Ba(e,n,e.position,!1)}return!0}function a4(e,t){var n,r=e.tag,i=e.anchor,a=[],l,c=!1,d;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),d=e.input.charCodeAt(e.position);d!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),!(d!==45||(l=e.input.charCodeAt(e.position+1),!Vr(l))));){if(c=!0,e.position++,Vn(e,!0,-1)&&e.lineIndent<=t){a.push(null),d=e.input.charCodeAt(e.position);continue}if(n=e.line,dc(e,t,zN,!1,!0),a.push(e.result),Vn(e,!0,-1),d=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&d!==0)it(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return c?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=a,!0):!1}function sK(e,t,n){var r,i,a,l,c,d,f=e.tag,g=e.anchor,p={},y=Object.create(null),x=null,v=null,S=null,E=!1,k=!1,T;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),T=e.input.charCodeAt(e.position);T!==0;){if(!E&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),a=e.line,(T===63||T===58)&&Vr(r))T===63?(E&&(Gl(e,p,y,x,v,null,l,c,d),x=v=S=null),k=!0,E=!0,i=!0):E?(E=!1,i=!0):it(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,T=r;else{if(l=e.line,c=e.lineStart,d=e.position,!dc(e,n,IN,!1,!0))break;if(e.line===a){for(T=e.input.charCodeAt(e.position);_s(T);)T=e.input.charCodeAt(++e.position);if(T===58)T=e.input.charCodeAt(++e.position),Vr(T)||it(e,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(Gl(e,p,y,x,v,null,l,c,d),x=v=S=null),k=!0,E=!1,i=!1,x=e.tag,v=e.result;else if(k)it(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=g,!0}else if(k)it(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=g,!0}if((e.line===a||e.lineIndent>t)&&(E&&(l=e.line,c=e.lineStart,d=e.position),dc(e,t,qp,!0,i)&&(E?v=e.result:S=e.result),E||(Gl(e,p,y,x,v,S,l,c,d),x=v=S=null),Vn(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&T!==0)it(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return E&&Gl(e,p,y,x,v,null,l,c,d),k&&(e.tag=f,e.anchor=g,e.kind="mapping",e.result=p),k}function lK(e){var t,n=!1,r=!1,i,a,l;if(l=e.input.charCodeAt(e.position),l!==33)return!1;if(e.tag!==null&&it(e,"duplication of a tag property"),l=e.input.charCodeAt(++e.position),l===60?(n=!0,l=e.input.charCodeAt(++e.position)):l===33?(r=!0,i="!!",l=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do l=e.input.charCodeAt(++e.position);while(l!==0&&l!==62);e.position<e.length?(a=e.input.slice(t,e.position),l=e.input.charCodeAt(++e.position)):it(e,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!Vr(l);)l===33&&(r?it(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),PN.test(i)||it(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),l=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),QW.test(a)&&it(e,"tag suffix cannot contain flow indicator characters")}a&&!FN.test(a)&&it(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{it(e,"tag name is malformed: "+a)}return n?e.tag=a:$a.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i==="!"?e.tag="!"+a:i==="!!"?e.tag="tag:yaml.org,2002:"+a:it(e,'undeclared tag handle "'+i+'"'),!0}function cK(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&it(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Vr(n)&&!$l(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function uK(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Vr(r)&&!$l(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),$a.call(e.anchorMap,n)||it(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Vn(e,!0,-1),!0}function dc(e,t,n,r,i){var a,l,c,d=1,f=!1,g=!1,p,y,x,v,S,E;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=l=c=qp===n||zN===n,r&&Vn(e,!0,-1)&&(f=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),d===1)for(;lK(e)||cK(e);)Vn(e,!0,-1)?(f=!0,c=a,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):c=!1;if(c&&(c=f||i),(d===1||qp===n)&&(Up===n||IN===n?S=t:S=t+1,E=e.position-e.lineStart,d===1?c&&(a4(e,E)||sK(e,E,S))||oK(e,S)?g=!0:(l&&aK(e,S)||rK(e,S)||iK(e,S)?g=!0:uK(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&it(e,"alias node should not have any properties")):nK(e,S,Up===n)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d===0&&(g=c&&a4(e,E))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&it(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,y=e.implicitTypes.length;p<y;p+=1)if(v=e.implicitTypes[p],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if($a.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,x=e.typeMap.multi[e.kind||"fallback"],p=0,y=x.length;p<y;p+=1)if(e.tag.slice(0,x[p].tag.length)===x[p].tag){v=x[p];break}v||it(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&it(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):it(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||g}function dK(e){var t=e.position,n,r,i,a=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(Vn(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(a=!0,l=e.input.charCodeAt(++e.position),n=e.position;l!==0&&!Vr(l);)l=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&it(e,"directive name must not be less than one character in length");l!==0;){for(;_s(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!uo(l));break}if(uo(l))break;for(n=e.position;l!==0&&!Vr(l);)l=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}l!==0&&hb(e),$a.call(i4,r)?i4[r](e,r,i):Vp(e,'unknown document directive "'+r+'"')}if(Vn(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Vn(e,!0,-1)):a&&it(e,"directives end mark is expected"),dc(e,e.lineIndent-1,qp,!1,!0),Vn(e,!0,-1),e.checkLineBreaks&&KW.test(e.input.slice(t,e.position))&&Vp(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&jm(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Vn(e,!0,-1));return}if(e.position<e.length-1)it(e,"end of the stream or a document separator is expected");else return}function fK(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
57
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new tK(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,it(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)dK(n);return n.documents}function hK(e,t){var n=fK(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new qr("expected a single document in the stream, but found more")}}var pK=hK,mK={load:pK},VN=Object.prototype.toString,$N=Object.prototype.hasOwnProperty,mb=65279,gK=9,hd=10,yK=13,xK=32,bK=33,vK=34,oy=35,wK=37,SK=38,CK=39,EK=42,GN=44,kK=45,$p=58,TK=61,NK=62,RK=63,AK=64,YN=91,WN=93,jK=96,KN=123,OK=124,QN=125,wr={};wr[0]="\\0";wr[7]="\\a";wr[8]="\\b";wr[9]="\\t";wr[10]="\\n";wr[11]="\\v";wr[12]="\\f";wr[13]="\\r";wr[27]="\\e";wr[34]='\\"';wr[92]="\\\\";wr[133]="\\N";wr[160]="\\_";wr[8232]="\\L";wr[8233]="\\P";var MK=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],LK=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function _K(e,t){var n,r,i,a,l,c,d;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)l=r[i],c=String(t[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),d=e.compiledTypeMap.fallback[l],d&&$N.call(d.styleAliases,c)&&(c=d.styleAliases[c]),n[l]=c;return n}function DK(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new qr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Xn.repeat("0",r-t.length)+t}var IK=1,pd=2;function zK(e){this.schema=e.schema||DN,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Xn.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=_K(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?pd:IK,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function s4(e,t){for(var n=Xn.repeat(" ",t),r=0,i=-1,a="",l,c=e.length;r<c;)i=e.indexOf(`
58
+ `,r),i===-1?(l=e.slice(r),r=c):(l=e.slice(r,i+1),r=i+1),l.length&&l!==`
59
+ `&&(a+=n),a+=l;return a}function ay(e,t){return`
60
+ `+Xn.repeat(" ",e.indent*t)}function PK(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function Gp(e){return e===xK||e===gK}function md(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==mb||65536<=e&&e<=1114111}function l4(e){return md(e)&&e!==mb&&e!==yK&&e!==hd}function c4(e,t,n){var r=l4(e),i=r&&!Gp(e);return(n?r:r&&e!==GN&&e!==YN&&e!==WN&&e!==KN&&e!==QN)&&e!==oy&&!(t===$p&&!i)||l4(t)&&!Gp(t)&&e===oy||t===$p&&i}function FK(e){return md(e)&&e!==mb&&!Gp(e)&&e!==kK&&e!==RK&&e!==$p&&e!==GN&&e!==YN&&e!==WN&&e!==KN&&e!==QN&&e!==oy&&e!==SK&&e!==EK&&e!==bK&&e!==OK&&e!==TK&&e!==NK&&e!==CK&&e!==vK&&e!==wK&&e!==AK&&e!==jK}function BK(e){return!Gp(e)&&e!==$p}function Vu(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function XN(e){var t=/^\n* /;return t.test(e)}var ZN=1,sy=2,JN=3,e8=4,Ul=5;function HK(e,t,n,r,i,a,l,c){var d,f=0,g=null,p=!1,y=!1,x=r!==-1,v=-1,S=FK(Vu(e,0))&&BK(Vu(e,e.length-1));if(t||l)for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=Vu(e,d),!md(f))return Ul;S=S&&c4(f,g,c),g=f}else{for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=Vu(e,d),f===hd)p=!0,x&&(y=y||d-v-1>r&&e[v+1]!==" ",v=d);else if(!md(f))return Ul;S=S&&c4(f,g,c),g=f}y=y||x&&d-v-1>r&&e[v+1]!==" "}return!p&&!y?S&&!l&&!i(e)?ZN:a===pd?Ul:sy:n>9&&XN(e)?Ul:l?a===pd?Ul:sy:y?e8:JN}function UK(e,t,n,r,i){e.dump=(function(){if(t.length===0)return e.quotingType===pd?'""':"''";if(!e.noCompatMode&&(MK.indexOf(t)!==-1||LK.test(t)))return e.quotingType===pd?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=r||e.flowLevel>-1&&n>=e.flowLevel;function d(f){return PK(e,f)}switch(HK(t,c,e.indent,l,d,e.quotingType,e.forceQuotes&&!r,i)){case ZN:return t;case sy:return"'"+t.replace(/'/g,"''")+"'";case JN:return"|"+u4(t,e.indent)+d4(s4(t,a));case e8:return">"+u4(t,e.indent)+d4(s4(qK(t,l),a));case Ul:return'"'+VK(t)+'"';default:throw new qr("impossible error: invalid scalar style")}})()}function u4(e,t){var n=XN(e)?String(t):"",r=e[e.length-1]===`
61
+ `,i=r&&(e[e.length-2]===`
62
+ `||e===`
63
+ `),a=i?"+":r?"":"-";return n+a+`
64
+ `}function d4(e){return e[e.length-1]===`
65
+ `?e.slice(0,-1):e}function qK(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var f=e.indexOf(`
66
+ `);return f=f!==-1?f:e.length,n.lastIndex=f,f4(e.slice(0,f),t)})(),i=e[0]===`
67
+ `||e[0]===" ",a,l;l=n.exec(e);){var c=l[1],d=l[2];a=d[0]===" ",r+=c+(!i&&!a&&d!==""?`
68
+ `:"")+f4(d,t),i=a}return r}function f4(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,a,l=0,c=0,d="";r=n.exec(e);)c=r.index,c-i>t&&(a=l>i?l:c,d+=`
69
+ `+e.slice(i,a),i=a+1),l=c;return d+=`
70
+ `,e.length-i>t&&l>i?d+=e.slice(i,l)+`
71
+ `+e.slice(l+1):d+=e.slice(i),d.slice(1)}function VK(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Vu(e,i),r=wr[n],!r&&md(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||DK(n);return t}function $K(e,t,n){var r="",i=e.tag,a,l,c;for(a=0,l=n.length;a<l;a+=1)c=n[a],e.replacer&&(c=e.replacer.call(n,String(a),c)),(Yo(e,t,c,!1,!1)||typeof c>"u"&&Yo(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function h4(e,t,n,r){var i="",a=e.tag,l,c,d;for(l=0,c=n.length;l<c;l+=1)d=n[l],e.replacer&&(d=e.replacer.call(n,String(l),d)),(Yo(e,t+1,d,!0,!0,!1,!0)||typeof d>"u"&&Yo(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=ay(e,t)),e.dump&&hd===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=a,e.dump=i||"[]"}function GK(e,t,n){var r="",i=e.tag,a=Object.keys(n),l,c,d,f,g;for(l=0,c=a.length;l<c;l+=1)g="",r!==""&&(g+=", "),e.condenseFlow&&(g+='"'),d=a[l],f=n[d],e.replacer&&(f=e.replacer.call(n,d,f)),Yo(e,t,d,!1,!1)&&(e.dump.length>1024&&(g+="? "),g+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Yo(e,t,f,!1,!1)&&(g+=e.dump,r+=g));e.tag=i,e.dump="{"+r+"}"}function YK(e,t,n,r){var i="",a=e.tag,l=Object.keys(n),c,d,f,g,p,y;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new qr("sortKeys must be a boolean or a function");for(c=0,d=l.length;c<d;c+=1)y="",(!r||i!=="")&&(y+=ay(e,t)),f=l[c],g=n[f],e.replacer&&(g=e.replacer.call(n,f,g)),Yo(e,t+1,f,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&hd===e.dump.charCodeAt(0)?y+="?":y+="? "),y+=e.dump,p&&(y+=ay(e,t)),Yo(e,t+1,g,!0,p)&&(e.dump&&hd===e.dump.charCodeAt(0)?y+=":":y+=": ",y+=e.dump,i+=y));e.tag=a,e.dump=i||"{}"}function p4(e,t,n){var r,i,a,l,c,d;for(i=n?e.explicitTypes:e.implicitTypes,a=0,l=i.length;a<l;a+=1)if(c=i[a],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(n?c.multi&&c.representName?e.tag=c.representName(t):e.tag=c.tag:e.tag="?",c.represent){if(d=e.styleMap[c.tag]||c.defaultStyle,VN.call(c.represent)==="[object Function]")r=c.represent(t,d);else if($N.call(c.represent,d))r=c.represent[d](t,d);else throw new qr("!<"+c.tag+'> tag resolver accepts not "'+d+'" style');e.dump=r}return!0}return!1}function Yo(e,t,n,r,i,a,l){e.tag=null,e.dump=n,p4(e,n,!1)||p4(e,n,!0);var c=VN.call(e.dump),d=r,f;r&&(r=e.flowLevel<0||e.flowLevel>t);var g=c==="[object Object]"||c==="[object Array]",p,y;if(g&&(p=e.duplicates.indexOf(n),y=p!==-1),(e.tag!==null&&e.tag!=="?"||y||e.indent!==2&&t>0)&&(i=!1),y&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(g&&y&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),c==="[object Object]")r&&Object.keys(e.dump).length!==0?(YK(e,t,e.dump,i),y&&(e.dump="&ref_"+p+e.dump)):(GK(e,t,e.dump),y&&(e.dump="&ref_"+p+" "+e.dump));else if(c==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!l&&t>0?h4(e,t-1,e.dump,i):h4(e,t,e.dump,i),y&&(e.dump="&ref_"+p+e.dump)):($K(e,t,e.dump),y&&(e.dump="&ref_"+p+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&UK(e,e.dump,t,a,d);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new qr("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}function WK(e,t){var n=[],r=[],i,a;for(ly(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(a)}function ly(e,t,n){var r,i,a;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)ly(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)ly(e[r[i]],t,n)}function KK(e,t){t=t||{};var n=new zK(t);n.noRefs||WK(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Yo(n,0,r,!0,!0)?n.dump+`
72
+ `:""}var QK=KK,XK={dump:QK},m4=mK.load,cy=XK.dump;const ZK='(()=>{var Si=Object.defineProperty;var bi=(e,n)=>{for(var i in n)Si(e,i,{get:n[i],enumerable:!0})};var $e={};bi($e,{Diff:()=>b,FILE_HEADERS_ONLY:()=>_n,INCLUDE_HEADERS:()=>Ue,OMIT_HEADERS:()=>Ln,applyPatch:()=>je,applyPatches:()=>bn,arrayDiff:()=>Pe,canonicalize:()=>V,characterDiff:()=>ye,convertChangesToDMP:()=>On,convertChangesToXML:()=>In,createPatch:()=>Fn,createTwoFilesPatch:()=>Ye,cssDiff:()=>Ne,diffArrays:()=>wn,diffChars:()=>sn,diffCss:()=>yn,diffJson:()=>An,diffLines:()=>N,diffSentences:()=>vn,diffTrimmedLines:()=>xn,diffWords:()=>mn,diffWordsWithSpace:()=>Le,formatPatch:()=>ee,jsonDiff:()=>Re,lineDiff:()=>ce,parsePatch:()=>Z,reversePatch:()=>Be,sentenceDiff:()=>ke,structuredPatch:()=>ae,wordDiff:()=>be,wordsWithSpaceDiff:()=>_e});var b=class{diff(n,i,r={}){let l;typeof r=="function"?(l=r,r={}):"callback"in r&&(l=r.callback);let t=this.castInput(n,r),o=this.castInput(i,r),u=this.removeEmpty(this.tokenize(t,r)),f=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(u,f,r,l)}diffWithOptionsObj(n,i,r,l){var t;let o=m=>{if(m=this.postProcess(m,r),l){setTimeout(function(){l(m)},0);return}else return m},u=i.length,f=n.length,c=1,s=u+f;r.maxEditLength!=null&&(s=Math.min(s,r.maxEditLength));let a=(t=r.timeout)!==null&&t!==void 0?t:1/0,p=Date.now()+a,d=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(d[0],i,n,0,r);if(d[0].oldPos+1>=f&&h+1>=u)return o(this.buildValues(d[0].lastComponent,i,n));let g=-1/0,y=1/0,w=()=>{for(let m=Math.max(g,-c);m<=Math.min(y,c);m+=2){let x,A=d[m-1],C=d[m+1];A&&(d[m-1]=void 0);let F=!1;if(C){let S=C.oldPos-m;F=C&&0<=S&&S<u}let E=A&&A.oldPos+1<f;if(!F&&!E){d[m]=void 0;continue}if(!E||F&&A.oldPos<C.oldPos?x=this.addToPath(C,!0,!1,0,r):x=this.addToPath(A,!1,!0,1,r),h=this.extractCommon(x,i,n,m,r),x.oldPos+1>=f&&h+1>=u)return o(this.buildValues(x.lastComponent,i,n))||!0;d[m]=x,x.oldPos+1>=f&&(y=Math.min(y,m-1)),h+1>=u&&(g=Math.max(g,m+1))}c++};if(l)(function m(){setTimeout(function(){if(c>s||Date.now()>p)return l(void 0);w()||m()},0)})();else for(;c<=s&&Date.now()<=p;){let m=w();if(m)return m}}addToPath(n,i,r,l,t){let o=n.lastComponent;return o&&!t.oneChangePerToken&&o.added===i&&o.removed===r?{oldPos:n.oldPos+l,lastComponent:{count:o.count+1,added:i,removed:r,previousComponent:o.previousComponent}}:{oldPos:n.oldPos+l,lastComponent:{count:1,added:i,removed:r,previousComponent:o}}}extractCommon(n,i,r,l,t){let o=i.length,u=r.length,f=n.oldPos,c=f-l,s=0;for(;c+1<o&&f+1<u&&this.equals(r[f+1],i[c+1],t);)c++,f++,s++,t.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return s&&!t.oneChangePerToken&&(n.lastComponent={count:s,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=f,c}equals(n,i,r){return r.comparator?r.comparator(n,i):n===i||!!r.ignoreCase&&n.toLowerCase()===i.toLowerCase()}removeEmpty(n){let i=[];for(let r=0;r<n.length;r++)n[r]&&i.push(n[r]);return i}castInput(n,i){return n}tokenize(n,i){return Array.from(n)}join(n){return n.join("")}postProcess(n,i){return n}get useLongestToken(){return!1}buildValues(n,i,r){let l=[],t;for(;n;)l.push(n),t=n.previousComponent,delete n.previousComponent,n=t;l.reverse();let o=l.length,u=0,f=0,c=0;for(;u<o;u++){let s=l[u];if(s.removed)s.value=this.join(r.slice(c,c+s.count)),c+=s.count;else{if(!s.added&&this.useLongestToken){let a=i.slice(f,f+s.count);a=a.map(function(p,d){let h=r[c+d];return h.length>p.length?h:p}),s.value=this.join(a)}else s.value=this.join(i.slice(f,f+s.count));f+=s.count,s.added||(c+=s.count)}}return l}};var ve=class extends b{},ye=new ve;function sn(e,n,i){return ye.diff(e,n,i)}function Ae(e,n){let i;for(i=0;i<e.length&&i<n.length;i++)if(e[i]!=n[i])return e.slice(0,i);return e.slice(0,i)}function we(e,n){let i;if(!e||!n||e[e.length-1]!=n[n.length-1])return"";for(i=0;i<e.length&&i<n.length;i++)if(e[e.length-(i+1)]!=n[n.length-(i+1)])return e.slice(-i);return e.slice(-i)}function te(e,n,i){if(e.slice(0,n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn\'t start with prefix ${JSON.stringify(n)}; this is a bug`);return i+e.slice(n.length)}function ue(e,n,i){if(!n)return e+i;if(e.slice(-n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn\'t end with suffix ${JSON.stringify(n)}; this is a bug`);return e.slice(0,-n.length)+i}function q(e,n){return te(e,n,"")}function X(e,n){return ue(e,n,"")}function Ce(e,n){return n.slice(0,_i(e,n))}function _i(e,n){let i=0;e.length>n.length&&(i=e.length-n.length);let r=n.length;e.length<n.length&&(r=e.length);let l=Array(r),t=0;l[0]=0;for(let o=1;o<r;o++){for(n[o]==n[t]?l[o]=l[t]:l[o]=t;t>0&&n[o]!=n[t];)t=l[t];n[o]==n[t]&&t++}t=0;for(let o=i;o<e.length;o++){for(;t>0&&e[o]!=n[t];)t=l[t];e[o]==n[t]&&t++}return t}function pn(e){return e.includes(`\\r\n`)&&!e.startsWith(`\n`)&&!e.match(/[^\\r]\\n/)}function dn(e){return!e.includes(`\\r\n`)&&e.includes(`\n`)}function z(e){let n;for(n=e.length-1;n>=0&&e[n].match(/\\s/);n--);return e.substring(n+1)}function M(e){let n=e.match(/^\\s*/);return n?n[0]:""}var fe="a-zA-Z0-9_\\\\u{AD}\\\\u{C0}-\\\\u{D6}\\\\u{D8}-\\\\u{F6}\\\\u{F8}-\\\\u{2C6}\\\\u{2C8}-\\\\u{2D7}\\\\u{2DE}-\\\\u{2FF}\\\\u{1E00}-\\\\u{1EFF}",Li=new RegExp(`[${fe}]+|\\\\s+|[^${fe}]`,"ug"),Ee=class extends b{equals(n,i,r){return r.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),n.trim()===i.trim()}tokenize(n,i={}){let r;if(i.intlSegmenter){let o=i.intlSegmenter;if(o.resolvedOptions().granularity!="word")throw new Error(\'The segmenter passed must have a granularity of "word"\');r=[];for(let u of Array.from(o.segment(n))){let f=u.segment;r.length&&/\\s/.test(r[r.length-1])&&/\\s/.test(f)?r[r.length-1]+=f:r.push(f)}}else r=n.match(Li)||[];let l=[],t=null;return r.forEach(o=>{/\\s/.test(o)?t==null?l.push(o):l.push(l.pop()+o):t!=null&&/\\s/.test(t)?l[l.length-1]==t?l.push(l.pop()+o):l.push(t+o):l.push(o),t=o}),l}join(n){return n.map((i,r)=>r==0?i:i.replace(/^\\s+/,"")).join("")}postProcess(n,i){if(!n||i.oneChangePerToken)return n;let r=null,l=null,t=null;return n.forEach(o=>{o.added?l=o:o.removed?t=o:((l||t)&&hn(r,t,l,o),r=o,l=null,t=null)}),(l||t)&&hn(r,t,l,null),n}},be=new Ee;function mn(e,n,i){return i?.ignoreWhitespace!=null&&!i.ignoreWhitespace?Le(e,n,i):be.diff(e,n,i)}function hn(e,n,i,r){if(n&&i){let l=M(n.value),t=z(n.value),o=M(i.value),u=z(i.value);if(e){let f=Ae(l,o);e.value=ue(e.value,o,f),n.value=q(n.value,f),i.value=q(i.value,f)}if(r){let f=we(t,u);r.value=te(r.value,u,f),n.value=X(n.value,f),i.value=X(i.value,f)}}else if(i){if(e){let l=M(i.value);i.value=i.value.substring(l.length)}if(r){let l=M(r.value);r.value=r.value.substring(l.length)}}else if(e&&r){let l=M(r.value),t=M(n.value),o=z(n.value),u=Ae(l,t);n.value=q(n.value,u);let f=we(q(l,u),o);n.value=X(n.value,f),r.value=te(r.value,l,f),e.value=ue(e.value,l,l.slice(0,l.length-f.length))}else if(r){let l=M(r.value),t=z(n.value),o=Ce(t,l);n.value=X(n.value,o)}else if(e){let l=z(e.value),t=M(n.value),o=Ce(l,t);n.value=q(n.value,o)}}var Se=class extends b{tokenize(n){let i=new RegExp(`(\\\\r?\\\\n)|[${fe}]+|[^\\\\S\\\\n\\\\r]+|[^${fe}]`,"ug");return n.match(i)||[]}},_e=new Se;function Le(e,n,i){return _e.diff(e,n,i)}function gn(e,n){if(typeof e=="function")n.callback=e;else if(e)for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}var Fe=class extends b{constructor(){super(...arguments),this.tokenize=Oe}equals(n,i,r){return r.ignoreWhitespace?((!r.newlineIsToken||!n.includes(`\n`))&&(n=n.trim()),(!r.newlineIsToken||!i.includes(`\n`))&&(i=i.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(n.endsWith(`\n`)&&(n=n.slice(0,-1)),i.endsWith(`\n`)&&(i=i.slice(0,-1))),super.equals(n,i,r)}},ce=new Fe;function N(e,n,i){return ce.diff(e,n,i)}function xn(e,n,i){return i=gn(i,{ignoreWhitespace:!0}),ce.diff(e,n,i)}function Oe(e,n){n.stripTrailingCr&&(e=e.replace(/\\r\\n/g,`\n`));let i=[],r=e.split(/(\\n|\\r\\n)/);r[r.length-1]||r.pop();for(let l=0;l<r.length;l++){let t=r[l];l%2&&!n.newlineIsToken?i[i.length-1]+=t:i.push(t)}return i}function Fi(e){return e=="."||e=="!"||e=="?"}var Ie=class extends b{tokenize(n){var i;let r=[],l=0;for(let t=0;t<n.length;t++){if(t==n.length-1){r.push(n.slice(l));break}if(Fi(n[t])&&n[t+1].match(/\\s/)){for(r.push(n.slice(l,t+1)),t=l=t+1;!((i=n[t+1])===null||i===void 0)&&i.match(/\\s/);)t++;r.push(n.slice(l,t+1)),l=t+1}}return r}},ke=new Ie;function vn(e,n,i){return ke.diff(e,n,i)}var Te=class extends b{tokenize(n){return n.split(/([{}:;,]|\\s+)/)}},Ne=new Te;function yn(e,n,i){return Ne.diff(e,n,i)}var De=class extends b{constructor(){super(...arguments),this.tokenize=Oe}get useLongestToken(){return!0}castInput(n,i){let{undefinedReplacement:r,stringifyReplacer:l=(t,o)=>typeof o>"u"?r:o}=i;return typeof n=="string"?n:JSON.stringify(V(n,null,null,l),null," ")}equals(n,i,r){return super.equals(n.replace(/,([\\r\\n])/g,"$1"),i.replace(/,([\\r\\n])/g,"$1"),r)}},Re=new De;function An(e,n,i){return Re.diff(e,n,i)}function V(e,n,i,r,l){n=n||[],i=i||[],r&&(e=r(l===void 0?"":l,e));let t;for(t=0;t<n.length;t+=1)if(n[t]===e)return i[t];let o;if(Object.prototype.toString.call(e)==="[object Array]"){for(n.push(e),o=new Array(e.length),i.push(o),t=0;t<e.length;t+=1)o[t]=V(e[t],n,i,r,String(t));return n.pop(),i.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e=="object"&&e!==null){n.push(e),o={},i.push(o);let u=[],f;for(f in e)Object.prototype.hasOwnProperty.call(e,f)&&u.push(f);for(u.sort(),t=0;t<u.length;t+=1)f=u[t],o[f]=V(e[f],n,i,r,f);n.pop(),i.pop()}else o=e;return o}var Me=class extends b{tokenize(n){return n.slice()}join(n){return n}removeEmpty(n){return n}},Pe=new Me;function wn(e,n,i){return Pe.diff(e,n,i)}function We(e){return Array.isArray(e)?e.map(n=>We(n)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(n=>Object.assign(Object.assign({},n),{lines:n.lines.map((i,r)=>{var l;return i.startsWith("\\\\")||i.endsWith("\\r")||!((l=n.lines[r+1])===null||l===void 0)&&l.startsWith("\\\\")?i:i+"\\r"})}))})}function He(e){return Array.isArray(e)?e.map(n=>He(n)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(n=>Object.assign(Object.assign({},n),{lines:n.lines.map(i=>i.endsWith("\\r")?i.substring(0,i.length-1):i)}))})}function Cn(e){return Array.isArray(e)||(e=[e]),!e.some(n=>n.hunks.some(i=>i.lines.some(r=>!r.startsWith("\\\\")&&r.endsWith("\\r"))))}function En(e){return Array.isArray(e)||(e=[e]),e.some(n=>n.hunks.some(i=>i.lines.some(r=>r.endsWith("\\r"))))&&e.every(n=>n.hunks.every(i=>i.lines.every((r,l)=>{var t;return r.startsWith("\\\\")||r.endsWith("\\r")||((t=i.lines[l+1])===null||t===void 0?void 0:t.startsWith("\\\\"))})))}function Z(e){let n=e.split(/\\n/),i=[],r=0;function l(){let u={};for(i.push(u);r<n.length;){let f=n[r];if(/^(---|\\+\\+\\+|@@)\\s/.test(f))break;let c=/^(?:Index:|diff(?: -r \\w+)+)\\s+/.exec(f);c&&(u.index=f.substring(c[0].length).trim()),r++}for(t(u),t(u),u.hunks=[];r<n.length;){let f=n[r];if(/^(Index:\\s|diff\\s|---\\s|\\+\\+\\+\\s|===================================================================)/.test(f))break;if(/^@@/.test(f))u.hunks.push(o());else{if(f)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(f));r++}}}function t(u){let f=/^(---|\\+\\+\\+)\\s+/.exec(n[r]);if(f){let c=f[1],s=n[r].substring(3).trim().split(" ",2),a=(s[1]||"").trim(),p=s[0].replace(/\\\\\\\\/g,"\\\\");p.startsWith(\'"\')&&p.endsWith(\'"\')&&(p=p.substr(1,p.length-2)),c==="---"?(u.oldFileName=p,u.oldHeader=a):(u.newFileName=p,u.newHeader=a),r++}}function o(){var u;let f=r,c=n[r++],s=c.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/),a={oldStart:+s[1],oldLines:typeof s[2]>"u"?1:+s[2],newStart:+s[3],newLines:typeof s[4]>"u"?1:+s[4],lines:[]};a.oldLines===0&&(a.oldStart+=1),a.newLines===0&&(a.newStart+=1);let p=0,d=0;for(;r<n.length&&(d<a.oldLines||p<a.newLines||!((u=n[r])===null||u===void 0)&&u.startsWith("\\\\"));r++){let h=n[r].length==0&&r!=n.length-1?" ":n[r][0];if(h==="+"||h==="-"||h===" "||h==="\\\\")a.lines.push(n[r]),h==="+"?p++:h==="-"?d++:h===" "&&(p++,d++);else throw new Error(`Hunk at line ${f+1} contained invalid line ${n[r]}`)}if(!p&&a.newLines===1&&(a.newLines=0),!d&&a.oldLines===1&&(a.oldLines=0),p!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(f+1));if(d!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(f+1));return a}for(;r<n.length;)l();return i}function Sn(e,n,i){let r=!0,l=!1,t=!1,o=1;return function u(){if(r&&!t){if(l?o++:r=!1,e+o<=i)return e+o;t=!0}if(!l)return t||(r=!0),n<=e-o?e-o++:(l=!0,u())}}function je(e,n,i={}){let r;if(typeof n=="string"?r=Z(n):Array.isArray(n)?r=n:r=[n],r.length>1)throw new Error("applyPatch only works with a single input.");return Oi(e,r[0],i)}function Oi(e,n,i={}){(i.autoConvertLineEndings||i.autoConvertLineEndings==null)&&(pn(e)&&Cn(n)?n=We(n):dn(e)&&En(n)&&(n=He(n)));let r=e.split(`\n`),l=n.hunks,t=i.compareLine||((h,g,y,w)=>g===w),o=i.fuzzFactor||0,u=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!l.length)return e;let f="",c=!1,s=!1;for(let h=0;h<l[l.length-1].lines.length;h++){let g=l[l.length-1].lines[h];g[0]=="\\\\"&&(f[0]=="+"?c=!0:f[0]=="-"&&(s=!0)),f=g}if(c){if(s){if(!o&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!o)return!1}else if(s){if(r[r.length-1]!="")r.push("");else if(!o)return!1}function a(h,g,y,w=0,m=!0,x=[],A=0){let C=0,F=!1;for(;w<h.length;w++){let E=h[w],S=E.length>0?E[0]:" ",$=E.length>0?E.substr(1):E;if(S==="-")if(t(g+1,r[g],S,$))g++,C=0;else return!y||r[g]==null?null:(x[A]=r[g],a(h,g+1,y-1,w,!1,x,A+1));if(S==="+"){if(!m)return null;x[A]=$,A++,C=0,F=!0}if(S===" ")if(C++,x[A]=r[g],t(g+1,r[g],S,$))A++,m=!0,F=!1,g++;else return F||!y?null:r[g]&&(a(h,g+1,y-1,w+1,!1,x,A+1)||a(h,g+1,y-1,w,!1,x,A+1))||a(h,g,y-1,w+1,!1,x,A)}return A-=C,g-=C,x.length=A,{patchedLines:x,oldLineLastI:g-1}}let p=[],d=0;for(let h=0;h<l.length;h++){let g=l[h],y,w=r.length-g.oldLines+o,m;for(let x=0;x<=o;x++){m=g.oldStart+d-1;let A=Sn(m,u,w);for(;m!==void 0&&(y=a(g.lines,m,x),!y);m=A());if(y)break}if(!y)return!1;for(let x=u;x<m;x++)p.push(r[x]);for(let x=0;x<y.patchedLines.length;x++){let A=y.patchedLines[x];p.push(A)}u=y.oldLineLastI+1,d=m+1-g.oldStart}for(let h=u;h<r.length;h++)p.push(r[h]);return p.join(`\n`)}function bn(e,n){let i=typeof e=="string"?Z(e):e,r=0;function l(){let t=i[r++];if(!t)return n.complete();n.loadFile(t,function(o,u){if(o)return n.complete(o);let f=je(u,t,n);n.patched(t,f,function(c){if(c)return n.complete(c);l()})})}l()}function Be(e){return Array.isArray(e)?e.map(n=>Be(n)).reverse():Object.assign(Object.assign({},e),{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(n=>({oldLines:n.newLines,oldStart:n.newStart,newLines:n.oldLines,newStart:n.oldStart,lines:n.lines.map(i=>i.startsWith("-")?`+${i.slice(1)}`:i.startsWith("+")?`-${i.slice(1)}`:i)}))})}var Ue={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},_n={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},Ln={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function ae(e,n,i,r,l,t,o){let u;o?typeof o=="function"?u={callback:o}:u=o:u={},typeof u.context>"u"&&(u.context=4);let f=u.context;if(u.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(u.callback){let{callback:s}=u;N(i,r,Object.assign(Object.assign({},u),{callback:a=>{let p=c(a);s(p)}}))}else return c(N(i,r,u));function c(s){if(!s)return;s.push({value:"",lines:[]});function a(m){return m.map(function(x){return" "+x})}let p=[],d=0,h=0,g=[],y=1,w=1;for(let m=0;m<s.length;m++){let x=s[m],A=x.lines||Ii(x.value);if(x.lines=A,x.added||x.removed){if(!d){let C=s[m-1];d=y,h=w,C&&(g=f>0?a(C.lines.slice(-f)):[],d-=g.length,h-=g.length)}for(let C of A)g.push((x.added?"+":"-")+C);x.added?w+=A.length:y+=A.length}else{if(d)if(A.length<=f*2&&m<s.length-2)for(let C of a(A))g.push(C);else{let C=Math.min(A.length,f);for(let E of a(A.slice(0,C)))g.push(E);let F={oldStart:d,oldLines:y-d+C,newStart:h,newLines:w-h+C,lines:g};p.push(F),d=0,h=0,g=[]}y+=A.length,w+=A.length}}for(let m of p)for(let x=0;x<m.lines.length;x++)m.lines[x].endsWith(`\n`)?m.lines[x]=m.lines[x].slice(0,-1):(m.lines.splice(x+1,0,"\\\"),x++);return{oldFileName:e,newFileName:n,oldHeader:l,newHeader:t,hunks:p}}}function ee(e,n){if(n||(n=Ue),Array.isArray(e)){if(e.length>1&&!n.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(r=>ee(r,n)).join(`\n`)}let i=[];n.includeIndex&&e.oldFileName==e.newFileName&&i.push("Index: "+e.oldFileName),n.includeUnderline&&i.push("==================================================================="),n.includeFileHeaders&&(i.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),i.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let r=0;r<e.hunks.length;r++){let l=e.hunks[r];l.oldLines===0&&(l.oldStart-=1),l.newLines===0&&(l.newStart-=1),i.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@");for(let t of l.lines)i.push(t)}return i.join(`\n`)+`\n`}function Ye(e,n,i,r,l,t,o){if(typeof o=="function"&&(o={callback:o}),o?.callback){let{callback:u}=o;ae(e,n,i,r,l,t,Object.assign(Object.assign({},o),{callback:f=>{u(f?ee(f,o.headerOptions):void 0)}}))}else{let u=ae(e,n,i,r,l,t,o);return u?ee(u,o?.headerOptions):void 0}}function Fn(e,n,i,r,l,t){return Ye(e,e,n,i,r,l,t)}function Ii(e){let n=e.endsWith(`\n`),i=e.split(`\n`).map(r=>r+`\n`);return n?i.pop():i.push(i.pop().slice(0,-1)),i}function On(e){let n=[],i,r;for(let l=0;l<e.length;l++)i=e[l],i.added?r=1:i.removed?r=-1:r=0,n.push([r,i.value]);return n}function In(e){let n=[];for(let i=0;i<e.length;i++){let r=e[i];r.added?n.push("<ins>"):r.removed&&n.push("<del>"),n.push(ki(r.value)),r.added?n.push("</ins>"):r.removed&&n.push("</del>")}return n.join("")}function ki(e){let n=e;return n=n.replace(/&/g,"&amp;"),n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=n.replace(/"/g,"&quot;"),n}function zn(e){return typeof e>"u"||e===null}function Ti(e){return typeof e=="object"&&e!==null}function Ni(e){return Array.isArray(e)?e:zn(e)?[]:[e]}function Di(e,n){var i,r,l,t;if(n)for(t=Object.keys(n),i=0,r=t.length;i<r;i+=1)l=t[i],e[l]=n[l];return e}function Ri(e,n){var i="",r;for(r=0;r<n;r+=1)i+=e;return i}function Mi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Pi=zn,Wi=Ti,Hi=Ni,ji=Ri,Bi=Mi,Ui=Di,L={isNothing:Pi,isObject:Wi,toArray:Hi,repeat:ji,isNegativeZero:Bi,extend:Ui};function Gn(e,n){var i="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+=\'in "\'+e.mark.name+\'" \'),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`\n\n`+e.mark.snippet),r+" "+i):r}function ie(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=Gn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ie.prototype=Object.create(Error.prototype);ie.prototype.constructor=ie;ie.prototype.toString=function(n){return this.name+": "+Gn(this,n)};var k=ie;function qe(e,n,i,r,l){var t="",o="",u=Math.floor(l/2)-1;return r-n>u&&(t=" ... ",n=r-u+t.length),i-r>u&&(o=" ...",i=r+u-o.length),{str:t+e.slice(n,i).replace(/\\t/g,"\\u2192")+o,pos:r-n+t.length}}function ze(e,n){return L.repeat(" ",n-e.length)+e}function Yi(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\\r?\\n|\\r|\\0/g,r=[0],l=[],t,o=-1;t=i.exec(e.buffer);)l.push(t.index),r.push(t.index+t[0].length),e.position<=t.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var u="",f,c,s=Math.min(e.line+n.linesAfter,l.length).toString().length,a=n.maxLength-(n.indent+s+3);for(f=1;f<=n.linesBefore&&!(o-f<0);f++)c=qe(e.buffer,r[o-f],l[o-f],e.position-(r[o]-r[o-f]),a),u=L.repeat(" ",n.indent)+ze((e.line-f+1).toString(),s)+" | "+c.str+`\n`+u;for(c=qe(e.buffer,r[o],l[o],e.position,a),u+=L.repeat(" ",n.indent)+ze((e.line+1).toString(),s)+" | "+c.str+`\n`,u+=L.repeat("-",n.indent+s+3+c.pos)+`^\n`,f=1;f<=n.linesAfter&&!(o+f>=l.length);f++)c=qe(e.buffer,r[o+f],l[o+f],e.position-(r[o]-r[o+f]),a),u+=L.repeat(" ",n.indent)+ze((e.line+f+1).toString(),s)+" | "+c.str+`\n`;return u.replace(/\\n$/,"")}var $i=Yi,qi=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],zi=["scalar","sequence","mapping"];function Gi(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(r){n[String(r)]=i})}),n}function Ji(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(qi.indexOf(i)===-1)throw new k(\'Unknown option "\'+i+\'" is met in definition of "\'+e+\'" YAML type.\')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Gi(n.styleAliases||null),zi.indexOf(this.kind)===-1)throw new k(\'Unknown kind "\'+this.kind+\'" is specified for "\'+e+\'" YAML type.\')}var O=Ji;function kn(e,n){var i=[];return e[n].forEach(function(r){var l=i.length;i.forEach(function(t,o){t.tag===r.tag&&t.kind===r.kind&&t.multi===r.multi&&(l=o)}),i[l]=r}),i}function Ki(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function r(l){l.multi?(e.multi[l.kind].push(l),e.multi.fallback.push(l)):e[l.kind][l.tag]=e.fallback[l.tag]=l}for(n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(r);return e}function Je(e){return this.extend(e)}Je.prototype.extend=function(n){var i=[],r=[];if(n instanceof O)r.push(n);else if(Array.isArray(n))r=r.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(r=r.concat(n.explicit));else throw new k("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(t){if(!(t instanceof O))throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&t.loadKind!=="scalar")throw new k("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new k("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof O))throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var l=Object.create(Je.prototype);return l.implicit=(this.implicit||[]).concat(i),l.explicit=(this.explicit||[]).concat(r),l.compiledImplicit=kn(l,"implicit"),l.compiledExplicit=kn(l,"explicit"),l.compiledTypeMap=Ki(l.compiledImplicit,l.compiledExplicit),l};var Qi=Je,Xi=new O("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Vi=new O("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Zi=new O("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),er=new Qi({explicit:[Xi,Vi,Zi]});function nr(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function ir(){return null}function rr(e){return e===null}var lr=new O("tag:yaml.org,2002:null",{kind:"scalar",resolve:nr,construct:ir,predicate:rr,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function or(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function tr(e){return e==="true"||e==="True"||e==="TRUE"}function ur(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var fr=new O("tag:yaml.org,2002:bool",{kind:"scalar",resolve:or,construct:tr,predicate:ur,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function cr(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ar(e){return 48<=e&&e<=55}function sr(e){return 48<=e&&e<=57}function pr(e){if(e===null)return!1;var n=e.length,i=0,r=!1,l;if(!n)return!1;if(l=e[i],(l==="-"||l==="+")&&(l=e[++i]),l==="0"){if(i+1===n)return!0;if(l=e[++i],l==="b"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(l!=="0"&&l!=="1")return!1;r=!0}return r&&l!=="_"}if(l==="x"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(!cr(e.charCodeAt(i)))return!1;r=!0}return r&&l!=="_"}if(l==="o"){for(i++;i<n;i++)if(l=e[i],l!=="_"){if(!ar(e.charCodeAt(i)))return!1;r=!0}return r&&l!=="_"}}if(l==="_")return!1;for(;i<n;i++)if(l=e[i],l!=="_"){if(!sr(e.charCodeAt(i)))return!1;r=!0}return!(!r||l==="_")}function dr(e){var n=e,i=1,r;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),r=n[0],(r==="-"||r==="+")&&(r==="-"&&(i=-1),n=n.slice(1),r=n[0]),n==="0")return 0;if(r==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]==="x")return i*parseInt(n.slice(2),16);if(n[1]==="o")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}function hr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!L.isNegativeZero(e)}var mr=new O("tag:yaml.org,2002:int",{kind:"scalar",resolve:pr,construct:dr,predicate:hr,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),gr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$");function xr(e){return!(e===null||!gr.test(e)||e[e.length-1]==="_")}function vr(e){var n,i;return n=e.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)}var yr=/^[-+]?[0-9]+e/;function Ar(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(L.isNegativeZero(e))return"-0.0";return i=e.toString(10),yr.test(i)?i.replace("e",".e"):i}function wr(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||L.isNegativeZero(e))}var Cr=new O("tag:yaml.org,2002:float",{kind:"scalar",resolve:xr,construct:vr,predicate:wr,represent:Ar,defaultStyle:"lowercase"}),Er=er.extend({implicit:[lr,fr,mr,Cr]}),Sr=Er,Jn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function br(e){return e===null?!1:Jn.exec(e)!==null||Kn.exec(e)!==null}function _r(e){var n,i,r,l,t,o,u,f=0,c=null,s,a,p;if(n=Jn.exec(e),n===null&&(n=Kn.exec(e)),n===null)throw new Error("Date resolve error");if(i=+n[1],r=+n[2]-1,l=+n[3],!n[4])return new Date(Date.UTC(i,r,l));if(t=+n[4],o=+n[5],u=+n[6],n[7]){for(f=n[7].slice(0,3);f.length<3;)f+="0";f=+f}return n[9]&&(s=+n[10],a=+(n[11]||0),c=(s*60+a)*6e4,n[9]==="-"&&(c=-c)),p=new Date(Date.UTC(i,r,l,t,o,u,f)),c&&p.setTime(p.getTime()-c),p}function Lr(e){return e.toISOString()}var Fr=new O("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:br,construct:_r,instanceOf:Date,represent:Lr});function Or(e){return e==="<<"||e===null}var Ir=new O("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Or}),Ze=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function kr(e){if(e===null)return!1;var n,i,r=0,l=e.length,t=Ze;for(i=0;i<l;i++)if(n=t.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Tr(e){var n,i,r=e.replace(/[\\r\\n=]/g,""),l=r.length,t=Ze,o=0,u=[];for(n=0;n<l;n++)n%4===0&&n&&(u.push(o>>16&255),u.push(o>>8&255),u.push(o&255)),o=o<<6|t.indexOf(r.charAt(n));return i=l%4*6,i===0?(u.push(o>>16&255),u.push(o>>8&255),u.push(o&255)):i===18?(u.push(o>>10&255),u.push(o>>2&255)):i===12&&u.push(o>>4&255),new Uint8Array(u)}function Nr(e){var n="",i=0,r,l,t=e.length,o=Ze;for(r=0;r<t;r++)r%3===0&&r&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[r];return l=t%3,l===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):l===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):l===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function Dr(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Rr=new O("tag:yaml.org,2002:binary",{kind:"scalar",resolve:kr,construct:Tr,predicate:Dr,represent:Nr}),Mr=Object.prototype.hasOwnProperty,Pr=Object.prototype.toString;function Wr(e){if(e===null)return!0;var n=[],i,r,l,t,o,u=e;for(i=0,r=u.length;i<r;i+=1){if(l=u[i],o=!1,Pr.call(l)!=="[object Object]")return!1;for(t in l)if(Mr.call(l,t))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(t)===-1)n.push(t);else return!1}return!0}function Hr(e){return e!==null?e:[]}var jr=new O("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Wr,construct:Hr}),Br=Object.prototype.toString;function Ur(e){if(e===null)return!0;var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(r=o[n],Br.call(r)!=="[object Object]"||(l=Object.keys(r),l.length!==1))return!1;t[n]=[l[0],r[l[0]]]}return!0}function Yr(e){if(e===null)return[];var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1)r=o[n],l=Object.keys(r),t[n]=[l[0],r[l[0]]];return t}var $r=new O("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ur,construct:Yr}),qr=Object.prototype.hasOwnProperty;function zr(e){if(e===null)return!0;var n,i=e;for(n in i)if(qr.call(i,n)&&i[n]!==null)return!1;return!0}function Gr(e){return e!==null?e:{}}var Jr=new O("tag:yaml.org,2002:set",{kind:"mapping",resolve:zr,construct:Gr}),Qn=Sr.extend({implicit:[Fr,Ir],explicit:[Rr,jr,$r,Jr]}),j=Object.prototype.hasOwnProperty,se=1,Xn=2,Vn=3,pe=4,Ge=1,Kr=2,Tn=3,Qr=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,Xr=/[\\x85\\u2028\\u2029]/,Vr=/[,\\[\\]\\{\\}]/,Zn=/^(?:!|!!|![a-z\\-]+!)$/i,ei=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*\'\\(\\)\\[\\]])*$/i;function Nn(e){return Object.prototype.toString.call(e)}function R(e){return e===10||e===13}function Y(e){return e===9||e===32}function T(e){return e===9||e===32||e===10||e===13}function J(e){return e===44||e===91||e===93||e===123||e===125}function Zr(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function el(e){return e===120?2:e===117?4:e===85?8:0}function nl(e){return 48<=e&&e<=57?e-48:-1}function Dn(e){return e===48?"\\0":e===97?"\\x07":e===98?"\\b":e===116||e===9?" ":e===110?`\n`:e===118?"\\v":e===102?"\\f":e===114?"\\r":e===101?"\\x1B":e===32?" ":e===34?\'"\':e===47?"/":e===92?"\\\\":e===78?"\\x85":e===95?"\\xA0":e===76?"\\u2028":e===80?"\\u2029":""}function il(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function ni(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var ii=new Array(256),ri=new Array(256);for(U=0;U<256;U++)ii[U]=Dn(U)?1:0,ri[U]=Dn(U);var U;function rl(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Qn,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function li(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=$i(i),new k(n,i)}function v(e,n){throw li(e,n)}function de(e,n){e.onWarning&&e.onWarning.call(null,li(e,n))}var Rn={YAML:function(n,i,r){var l,t,o;n.version!==null&&v(n,"duplication of %YAML directive"),r.length!==1&&v(n,"YAML directive accepts exactly one argument"),l=/^([0-9]+)\\.([0-9]+)$/.exec(r[0]),l===null&&v(n,"ill-formed argument of the YAML directive"),t=parseInt(l[1],10),o=parseInt(l[2],10),t!==1&&v(n,"unacceptable YAML version of the document"),n.version=r[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&de(n,"unsupported YAML version of the document")},TAG:function(n,i,r){var l,t;r.length!==2&&v(n,"TAG directive accepts exactly two arguments"),l=r[0],t=r[1],Zn.test(l)||v(n,"ill-formed tag handle (first argument) of the TAG directive"),j.call(n.tagMap,l)&&v(n,\'there is a previously declared suffix for "\'+l+\'" tag handle\'),ei.test(t)||v(n,"ill-formed tag prefix (second argument) of the TAG directive");try{t=decodeURIComponent(t)}catch{v(n,"tag prefix is malformed: "+t)}n.tagMap[l]=t}};function H(e,n,i,r){var l,t,o,u;if(n<i){if(u=e.input.slice(n,i),r)for(l=0,t=u.length;l<t;l+=1)o=u.charCodeAt(l),o===9||32<=o&&o<=1114111||v(e,"expected valid JSON character");else Qr.test(u)&&v(e,"the stream contains non-printable characters");e.result+=u}}function Mn(e,n,i,r){var l,t,o,u;for(L.isObject(i)||v(e,"cannot merge mappings; the provided source object is unacceptable"),l=Object.keys(i),o=0,u=l.length;o<u;o+=1)t=l[o],j.call(n,t)||(ni(n,t,i[t]),r[t]=!0)}function K(e,n,i,r,l,t,o,u,f){var c,s;if(Array.isArray(l))for(l=Array.prototype.slice.call(l),c=0,s=l.length;c<s;c+=1)Array.isArray(l[c])&&v(e,"nested arrays are not supported inside keys"),typeof l=="object"&&Nn(l[c])==="[object Object]"&&(l[c]="[object Object]");if(typeof l=="object"&&Nn(l)==="[object Object]"&&(l="[object Object]"),l=String(l),n===null&&(n={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(t))for(c=0,s=t.length;c<s;c+=1)Mn(e,n,t[c],i);else Mn(e,n,t,i);else!e.json&&!j.call(i,l)&&j.call(n,l)&&(e.line=o||e.line,e.lineStart=u||e.lineStart,e.position=f||e.position,v(e,"duplicated mapping key")),ni(n,l,t),delete i[l];return n}function en(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):v(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function _(e,n,i){for(var r=0,l=e.input.charCodeAt(e.position);l!==0;){for(;Y(l);)l===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),l=e.input.charCodeAt(++e.position);if(n&&l===35)do l=e.input.charCodeAt(++e.position);while(l!==10&&l!==13&&l!==0);if(R(l))for(en(e),l=e.input.charCodeAt(e.position),r++,e.lineIndent=0;l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);else break}return i!==-1&&r!==0&&e.lineIndent<i&&de(e,"deficient indentation"),r}function ge(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||T(i)))}function nn(e,n){n===1?e.result+=" ":n>1&&(e.result+=L.repeat(`\n`,n-1))}function ll(e,n,i){var r,l,t,o,u,f,c,s,a=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),T(d)||J(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(l=e.input.charCodeAt(e.position+1),T(l)||i&&J(l)))return!1;for(e.kind="scalar",e.result="",t=o=e.position,u=!1;d!==0;){if(d===58){if(l=e.input.charCodeAt(e.position+1),T(l)||i&&J(l))break}else if(d===35){if(r=e.input.charCodeAt(e.position-1),T(r))break}else{if(e.position===e.lineStart&&ge(e)||i&&J(d))break;if(R(d))if(f=e.line,c=e.lineStart,s=e.lineIndent,_(e,!1,-1),e.lineIndent>=n){u=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=f,e.lineStart=c,e.lineIndent=s;break}}u&&(H(e,t,o,!1),nn(e,e.line-f),t=o=e.position,u=!1),Y(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return H(e,t,o,!1),e.result?!0:(e.kind=a,e.result=p,!1)}function ol(e,n){var i,r,l;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=l=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(H(e,r,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)r=e.position,e.position++,l=e.position;else return!0;else R(i)?(H(e,r,l,!0),nn(e,_(e,!1,n)),r=l=e.position):e.position===e.lineStart&&ge(e)?v(e,"unexpected end of the document within a single quoted scalar"):(e.position++,l=e.position);v(e,"unexpected end of the stream within a single quoted scalar")}function tl(e,n){var i,r,l,t,o,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return H(e,i,e.position,!0),e.position++,!0;if(u===92){if(H(e,i,e.position,!0),u=e.input.charCodeAt(++e.position),R(u))_(e,!1,n);else if(u<256&&ii[u])e.result+=ri[u],e.position++;else if((o=el(u))>0){for(l=o,t=0;l>0;l--)u=e.input.charCodeAt(++e.position),(o=Zr(u))>=0?t=(t<<4)+o:v(e,"expected hexadecimal character");e.result+=il(t),e.position++}else v(e,"unknown escape sequence");i=r=e.position}else R(u)?(H(e,i,r,!0),nn(e,_(e,!1,n)),i=r=e.position):e.position===e.lineStart&&ge(e)?v(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}v(e,"unexpected end of the stream within a double quoted scalar")}function ul(e,n){var i=!0,r,l,t,o=e.tag,u,f=e.anchor,c,s,a,p,d,h=Object.create(null),g,y,w,m;if(m=e.input.charCodeAt(e.position),m===91)s=93,d=!1,u=[];else if(m===123)s=125,d=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),m=e.input.charCodeAt(++e.position);m!==0;){if(_(e,!0,n),m=e.input.charCodeAt(e.position),m===s)return e.position++,e.tag=o,e.anchor=f,e.kind=d?"mapping":"sequence",e.result=u,!0;i?m===44&&v(e,"expected the node content, but found \',\'"):v(e,"missed comma between flow collection entries"),y=g=w=null,a=p=!1,m===63&&(c=e.input.charCodeAt(e.position+1),T(c)&&(a=p=!0,e.position++,_(e,!0,n))),r=e.line,l=e.lineStart,t=e.position,Q(e,n,se,!1,!0),y=e.tag,g=e.result,_(e,!0,n),m=e.input.charCodeAt(e.position),(p||e.line===r)&&m===58&&(a=!0,m=e.input.charCodeAt(++e.position),_(e,!0,n),Q(e,n,se,!1,!0),w=e.result),d?K(e,u,h,y,g,w,r,l,t):a?u.push(K(e,null,h,y,g,w,r,l,t)):u.push(g),_(e,!0,n),m=e.input.charCodeAt(e.position),m===44?(i=!0,m=e.input.charCodeAt(++e.position)):i=!1}v(e,"unexpected end of the stream within a flow collection")}function fl(e,n){var i,r,l=Ge,t=!1,o=!1,u=n,f=0,c=!1,s,a;if(a=e.input.charCodeAt(e.position),a===124)r=!1;else if(a===62)r=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)Ge===l?l=a===43?Tn:Kr:v(e,"repeat of a chomping mode identifier");else if((s=nl(a))>=0)s===0?v(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?v(e,"repeat of an indentation width identifier"):(u=n+s-1,o=!0);else break;if(Y(a)){do a=e.input.charCodeAt(++e.position);while(Y(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!R(a)&&a!==0)}for(;a!==0;){for(en(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!o||e.lineIndent<u)&&a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>u&&(u=e.lineIndent),R(a)){f++;continue}if(e.lineIndent<u){l===Tn?e.result+=L.repeat(`\n`,t?1+f:f):l===Ge&&t&&(e.result+=`\n`);break}for(r?Y(a)?(c=!0,e.result+=L.repeat(`\n`,t?1+f:f)):c?(c=!1,e.result+=L.repeat(`\n`,f+1)):f===0?t&&(e.result+=" "):e.result+=L.repeat(`\n`,f):e.result+=L.repeat(`\n`,t?1+f:f),t=!0,o=!0,f=0,i=e.position;!R(a)&&a!==0;)a=e.input.charCodeAt(++e.position);H(e,i,e.position,!1)}return!0}function Pn(e,n){var i,r=e.tag,l=e.anchor,t=[],o,u=!1,f;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=t),f=e.input.charCodeAt(e.position);f!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,v(e,"tab characters must not be used in indentation")),!(f!==45||(o=e.input.charCodeAt(e.position+1),!T(o))));){if(u=!0,e.position++,_(e,!0,-1)&&e.lineIndent<=n){t.push(null),f=e.input.charCodeAt(e.position);continue}if(i=e.line,Q(e,n,Vn,!1,!0),t.push(e.result),_(e,!0,-1),f=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&f!==0)v(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return u?(e.tag=r,e.anchor=l,e.kind="sequence",e.result=t,!0):!1}function cl(e,n,i){var r,l,t,o,u,f,c=e.tag,s=e.anchor,a={},p=Object.create(null),d=null,h=null,g=null,y=!1,w=!1,m;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),m=e.input.charCodeAt(e.position);m!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,v(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),t=e.line,(m===63||m===58)&&T(r))m===63?(y&&(K(e,a,p,d,h,null,o,u,f),d=h=g=null),w=!0,y=!0,l=!0):y?(y=!1,l=!0):v(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=r;else{if(o=e.line,u=e.lineStart,f=e.position,!Q(e,i,Xn,!1,!0))break;if(e.line===t){for(m=e.input.charCodeAt(e.position);Y(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),T(m)||v(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(K(e,a,p,d,h,null,o,u,f),d=h=g=null),w=!0,y=!1,l=!1,d=e.tag,h=e.result;else if(w)v(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=s,!0}else if(w)v(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=s,!0}if((e.line===t||e.lineIndent>n)&&(y&&(o=e.line,u=e.lineStart,f=e.position),Q(e,n,pe,!0,l)&&(y?h=e.result:g=e.result),y||(K(e,a,p,d,h,g,o,u,f),d=h=g=null),_(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===t||e.lineIndent>n)&&m!==0)v(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return y&&K(e,a,p,d,h,null,o,u,f),w&&(e.tag=c,e.anchor=s,e.kind="mapping",e.result=a),w}function al(e){var n,i=!1,r=!1,l,t,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&v(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,l="!!",o=e.input.charCodeAt(++e.position)):l="!",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(t=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):v(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!T(o);)o===33&&(r?v(e,"tag suffix cannot contain exclamation marks"):(l=e.input.slice(n-1,e.position+1),Zn.test(l)||v(e,"named tag handle cannot contain such characters"),r=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);t=e.input.slice(n,e.position),Vr.test(t)&&v(e,"tag suffix cannot contain flow indicator characters")}t&&!ei.test(t)&&v(e,"tag name cannot contain such characters: "+t);try{t=decodeURIComponent(t)}catch{v(e,"tag name is malformed: "+t)}return i?e.tag=t:j.call(e.tagMap,l)?e.tag=e.tagMap[l]+t:l==="!"?e.tag="!"+t:l==="!!"?e.tag="tag:yaml.org,2002:"+t:v(e,\'undeclared tag handle "\'+l+\'"\'),!0}function sl(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&v(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!T(i)&&!J(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&v(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function pl(e){var n,i,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!T(r)&&!J(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&v(e,"name of an alias node must contain at least one character"),i=e.input.slice(n,e.position),j.call(e.anchorMap,i)||v(e,\'unidentified alias "\'+i+\'"\'),e.result=e.anchorMap[i],_(e,!0,-1),!0}function Q(e,n,i,r,l){var t,o,u,f=1,c=!1,s=!1,a,p,d,h,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,t=o=u=pe===i||Vn===i,r&&_(e,!0,-1)&&(c=!0,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)),f===1)for(;al(e)||sl(e);)_(e,!0,-1)?(c=!0,u=t,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)):u=!1;if(u&&(u=c||l),(f===1||pe===i)&&(se===i||Xn===i?g=n:g=n+1,y=e.position-e.lineStart,f===1?u&&(Pn(e,y)||cl(e,y,g))||ul(e,g)?s=!0:(o&&fl(e,g)||ol(e,g)||tl(e,g)?s=!0:pl(e)?(s=!0,(e.tag!==null||e.anchor!==null)&&v(e,"alias node should not have any properties")):ll(e,g,se===i)&&(s=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(s=u&&Pn(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&v(e,\'unacceptable node kind for !<?> tag; it should be "scalar", not "\'+e.kind+\'"\'),a=0,p=e.implicitTypes.length;a<p;a+=1)if(h=e.implicitTypes[a],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(j.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,d=e.typeMap.multi[e.kind||"fallback"],a=0,p=d.length;a<p;a+=1)if(e.tag.slice(0,d[a].tag.length)===d[a].tag){h=d[a];break}h||v(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&v(e,"unacceptable node kind for !<"+e.tag+\'> tag; it should be "\'+h.kind+\'", not "\'+e.kind+\'"\'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):v(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||s}function dl(e){var n=e.position,i,r,l,t=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(_(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(t=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!T(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(i,e.position),l=[],r.length<1&&v(e,"directive name must not be less than one character in length");o!==0;){for(;Y(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!R(o));break}if(R(o))break;for(i=e.position;o!==0&&!T(o);)o=e.input.charCodeAt(++e.position);l.push(e.input.slice(i,e.position))}o!==0&&en(e),j.call(Rn,r)?Rn[r](e,r,l):de(e,\'unknown document directive "\'+r+\'"\')}if(_(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,_(e,!0,-1)):t&&v(e,"directives end mark is expected"),Q(e,e.lineIndent-1,pe,!1,!0),_(e,!0,-1),e.checkLineBreaks&&Xr.test(e.input.slice(n,e.position))&&de(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ge(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_(e,!0,-1));return}if(e.position<e.length-1)v(e,"end of the stream or a document separator is expected");else return}function oi(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`\n`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new rl(e,n),r=e.indexOf("\\0");for(r!==-1&&(i.position=r,v(i,"null byte is not allowed in input")),i.input+="\\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)dl(i);return i.documents}function hl(e,n,i){n!==null&&typeof n=="object"&&typeof i>"u"&&(i=n,n=null);var r=oi(e,i);if(typeof n!="function")return r;for(var l=0,t=r.length;l<t;l+=1)n(r[l])}function ml(e,n){var i=oi(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new k("expected a single document in the stream, but found more")}}var gl=hl,xl=ml,ti={loadAll:gl,load:xl},ui=Object.prototype.toString,fi=Object.prototype.hasOwnProperty,rn=65279,vl=9,re=10,yl=13,Al=32,wl=33,Cl=34,Ke=35,El=37,Sl=38,bl=39,_l=42,ci=44,Ll=45,he=58,Fl=61,Ol=62,Il=63,kl=64,ai=91,si=93,Tl=96,pi=123,Nl=124,di=125,I={};I[0]="\\\\0";I[7]="\\\\a";I[8]="\\\\b";I[9]="\\\\t";I[10]="\\\\n";I[11]="\\\\v";I[12]="\\\\f";I[13]="\\\\r";I[27]="\\\\e";I[34]=\'\\\\"\';I[92]="\\\\\\\\";I[133]="\\\\N";I[160]="\\\\_";I[8232]="\\\\L";I[8233]="\\\\P";var Dl=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Rl=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function Ml(e,n){var i,r,l,t,o,u,f;if(n===null)return{};for(i={},r=Object.keys(n),l=0,t=r.length;l<t;l+=1)o=r[l],u=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),f=e.compiledTypeMap.fallback[o],f&&fi.call(f.styleAliases,u)&&(u=f.styleAliases[u]),i[o]=u;return i}function Pl(e){var n,i,r;if(n=e.toString(16).toUpperCase(),e<=255)i="x",r=2;else if(e<=65535)i="u",r=4;else if(e<=4294967295)i="U",r=8;else throw new k("code point within a string may not be greater than 0xFFFFFFFF");return"\\\\"+i+L.repeat("0",r-n.length)+n}var Wl=1,le=2;function Hl(e){this.schema=e.schema||Qn,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=L.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ml(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===\'"\'?le:Wl,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Wn(e,n){for(var i=L.repeat(" ",n),r=0,l=-1,t="",o,u=e.length;r<u;)l=e.indexOf(`\n`,r),l===-1?(o=e.slice(r),r=u):(o=e.slice(r,l+1),r=l+1),o.length&&o!==`\n`&&(t+=i),t+=o;return t}function Qe(e,n){return`\n`+L.repeat(" ",e.indent*n)}function jl(e,n){var i,r,l;for(i=0,r=e.implicitTypes.length;i<r;i+=1)if(l=e.implicitTypes[i],l.resolve(n))return!0;return!1}function me(e){return e===Al||e===vl}function oe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==rn||65536<=e&&e<=1114111}function Hn(e){return oe(e)&&e!==rn&&e!==yl&&e!==re}function jn(e,n,i){var r=Hn(e),l=r&&!me(e);return(i?r:r&&e!==ci&&e!==ai&&e!==si&&e!==pi&&e!==di)&&e!==Ke&&!(n===he&&!l)||Hn(n)&&!me(n)&&e===Ke||n===he&&l}function Bl(e){return oe(e)&&e!==rn&&!me(e)&&e!==Ll&&e!==Il&&e!==he&&e!==ci&&e!==ai&&e!==si&&e!==pi&&e!==di&&e!==Ke&&e!==Sl&&e!==_l&&e!==wl&&e!==Nl&&e!==Fl&&e!==Ol&&e!==bl&&e!==Cl&&e!==El&&e!==kl&&e!==Tl}function Ul(e){return!me(e)&&e!==he}function ne(e,n){var i=e.charCodeAt(n),r;return i>=55296&&i<=56319&&n+1<e.length&&(r=e.charCodeAt(n+1),r>=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function hi(e){var n=/^\\n* /;return n.test(e)}var mi=1,Xe=2,gi=3,xi=4,G=5;function Yl(e,n,i,r,l,t,o,u){var f,c=0,s=null,a=!1,p=!1,d=r!==-1,h=-1,g=Bl(ne(e,0))&&Ul(ne(e,e.length-1));if(n||o)for(f=0;f<e.length;c>=65536?f+=2:f++){if(c=ne(e,f),!oe(c))return G;g=g&&jn(c,s,u),s=c}else{for(f=0;f<e.length;c>=65536?f+=2:f++){if(c=ne(e,f),c===re)a=!0,d&&(p=p||f-h-1>r&&e[h+1]!==" ",h=f);else if(!oe(c))return G;g=g&&jn(c,s,u),s=c}p=p||d&&f-h-1>r&&e[h+1]!==" "}return!a&&!p?g&&!o&&!l(e)?mi:t===le?G:Xe:i>9&&hi(e)?G:o?t===le?G:Xe:p?xi:gi}function $l(e,n,i,r,l){e.dump=(function(){if(n.length===0)return e.quotingType===le?\'""\':"\'\'";if(!e.noCompatMode&&(Dl.indexOf(n)!==-1||Rl.test(n)))return e.quotingType===le?\'"\'+n+\'"\':"\'"+n+"\'";var t=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-t),u=r||e.flowLevel>-1&&i>=e.flowLevel;function f(c){return jl(e,c)}switch(Yl(n,u,e.indent,o,f,e.quotingType,e.forceQuotes&&!r,l)){case mi:return n;case Xe:return"\'"+n.replace(/\'/g,"\'\'")+"\'";case gi:return"|"+Bn(n,e.indent)+Un(Wn(n,t));case xi:return">"+Bn(n,e.indent)+Un(Wn(ql(n,o),t));case G:return\'"\'+zl(n)+\'"\';default:throw new k("impossible error: invalid scalar style")}})()}function Bn(e,n){var i=hi(e)?String(n):"",r=e[e.length-1]===`\n`,l=r&&(e[e.length-2]===`\n`||e===`\n`),t=l?"+":r?"":"-";return i+t+`\n`}function Un(e){return e[e.length-1]===`\n`?e.slice(0,-1):e}function ql(e,n){for(var i=/(\\n+)([^\\n]*)/g,r=(function(){var c=e.indexOf(`\n`);return c=c!==-1?c:e.length,i.lastIndex=c,Yn(e.slice(0,c),n)})(),l=e[0]===`\n`||e[0]===" ",t,o;o=i.exec(e);){var u=o[1],f=o[2];t=f[0]===" ",r+=u+(!l&&!t&&f!==""?`\n`:"")+Yn(f,n),l=t}return r}function Yn(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,r,l=0,t,o=0,u=0,f="";r=i.exec(e);)u=r.index,u-l>n&&(t=o>l?o:u,f+=`\n`+e.slice(l,t),l=t+1),o=u;return f+=`\n`,e.length-l>n&&o>l?f+=e.slice(l,o)+`\n`+e.slice(o+1):f+=e.slice(l),f.slice(1)}function zl(e){for(var n="",i=0,r,l=0;l<e.length;i>=65536?l+=2:l++)i=ne(e,l),r=I[i],!r&&oe(i)?(n+=e[l],i>=65536&&(n+=e[l+1])):n+=r||Pl(i);return n}function Gl(e,n,i){var r="",l=e.tag,t,o,u;for(t=0,o=i.length;t<o;t+=1)u=i[t],e.replacer&&(u=e.replacer.call(i,String(t),u)),(P(e,n,u,!1,!1)||typeof u>"u"&&P(e,n,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=l,e.dump="["+r+"]"}function $n(e,n,i,r){var l="",t=e.tag,o,u,f;for(o=0,u=i.length;o<u;o+=1)f=i[o],e.replacer&&(f=e.replacer.call(i,String(o),f)),(P(e,n+1,f,!0,!0,!1,!0)||typeof f>"u"&&P(e,n+1,null,!0,!0,!1,!0))&&((!r||l!=="")&&(l+=Qe(e,n)),e.dump&&re===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=t,e.dump=l||"[]"}function Jl(e,n,i){var r="",l=e.tag,t=Object.keys(i),o,u,f,c,s;for(o=0,u=t.length;o<u;o+=1)s="",r!==""&&(s+=", "),e.condenseFlow&&(s+=\'"\'),f=t[o],c=i[f],e.replacer&&(c=e.replacer.call(i,f,c)),P(e,n,f,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?\'"\':"")+":"+(e.condenseFlow?"":" "),P(e,n,c,!1,!1)&&(s+=e.dump,r+=s));e.tag=l,e.dump="{"+r+"}"}function Kl(e,n,i,r){var l="",t=e.tag,o=Object.keys(i),u,f,c,s,a,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new k("sortKeys must be a boolean or a function");for(u=0,f=o.length;u<f;u+=1)p="",(!r||l!=="")&&(p+=Qe(e,n)),c=o[u],s=i[c],e.replacer&&(s=e.replacer.call(i,c,s)),P(e,n+1,c,!0,!0,!0)&&(a=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,a&&(e.dump&&re===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,a&&(p+=Qe(e,n)),P(e,n+1,s,!0,a)&&(e.dump&&re===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,l+=p));e.tag=t,e.dump=l||"{}"}function qn(e,n,i){var r,l,t,o,u,f;for(l=i?e.explicitTypes:e.implicitTypes,t=0,o=l.length;t<o;t+=1)if(u=l[t],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof n=="object"&&n instanceof u.instanceOf)&&(!u.predicate||u.predicate(n))){if(i?u.multi&&u.representName?e.tag=u.representName(n):e.tag=u.tag:e.tag="?",u.represent){if(f=e.styleMap[u.tag]||u.defaultStyle,ui.call(u.represent)==="[object Function]")r=u.represent(n,f);else if(fi.call(u.represent,f))r=u.represent[f](n,f);else throw new k("!<"+u.tag+\'> tag resolver accepts not "\'+f+\'" style\');e.dump=r}return!0}return!1}function P(e,n,i,r,l,t,o){e.tag=null,e.dump=i,qn(e,i,!1)||qn(e,i,!0);var u=ui.call(e.dump),f=r,c;r&&(r=e.flowLevel<0||e.flowLevel>n);var s=u==="[object Object]"||u==="[object Array]",a,p;if(s&&(a=e.duplicates.indexOf(i),p=a!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&n>0)&&(l=!1),p&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(s&&p&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),u==="[object Object]")r&&Object.keys(e.dump).length!==0?(Kl(e,n,e.dump,l),p&&(e.dump="&ref_"+a+e.dump)):(Jl(e,n,e.dump),p&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?$n(e,n-1,e.dump,l):$n(e,n,e.dump,l),p&&(e.dump="&ref_"+a+e.dump)):(Gl(e,n,e.dump),p&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object String]")e.tag!=="?"&&$l(e,e.dump,n,t,f);else{if(u==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new k("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function Ql(e,n){var i=[],r=[],l,t;for(Ve(e,i,r),l=0,t=r.length;l<t;l+=1)n.duplicates.push(i[r[l]]);n.usedDuplicates=new Array(t)}function Ve(e,n,i){var r,l,t;if(e!==null&&typeof e=="object")if(l=n.indexOf(e),l!==-1)i.indexOf(l)===-1&&i.push(l);else if(n.push(e),Array.isArray(e))for(l=0,t=e.length;l<t;l+=1)Ve(e[l],n,i);else for(r=Object.keys(e),l=0,t=r.length;l<t;l+=1)Ve(e[r[l]],n,i)}function Xl(e,n){n=n||{};var i=new Hl(n);i.noRefs||Ql(e,i);var r=e;return i.replacer&&(r=i.replacer.call({"":r},"",r)),P(i,0,r,!0,!0)?i.dump+`\n`:""}var Vl=Xl,Zl={dump:Vl};function ln(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var on=ti.load,ot=ti.loadAll,xe=Zl.dump;var tt=ln("safeLoad","load"),ut=ln("safeLoadAll","loadAll"),ft=ln("safeDump","dump");var no=$e;function D(e,n){return n==="yaml"?xe(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function io(e,n,i="json"){let r=D(e,i),l=D(n,i);return r===l?[{value:r}]:tn(e,n,0,i)}function ro(e,n){return io(e,n,"json")}function lo(e,n){try{let i=JSON.parse(e),r=JSON.parse(n),l=JSON.stringify(i),t=JSON.stringify(r);return l===t?[{value:e}]:N(e,n,{newlineIsToken:!1})}catch{return N(e,n,{newlineIsToken:!1})}}function oo(e,n){let i=on(e),r=on(n),l=xe(i,{indent:2,lineWidth:-1,noRefs:!0}),t=xe(r,{indent:2,lineWidth:-1,noRefs:!0});return l===t?[{value:e}]:N(e,n,{newlineIsToken:!1})}function tn(e,n,i,r="json"){let l=D(e,r),t=D(n,r);return l===t?[{value:W(l,i,r)}]:typeof e=="object"&&e!==null&&typeof n=="object"&&n!==null&&!Array.isArray(e)&&!Array.isArray(n)?to(e,n,i,r):Array.isArray(e)&&Array.isArray(n)?uo(e,n,i,r):fo(l,t,i,r)}function to(e,n,i,r="json"){let l=[],t=" ".repeat(i),o=" ".repeat(i+1),u=new Set(Object.keys(e)),f=Object.keys(n),c=[...u].filter(a=>!(a in n)),s=[...f,...c];l.push({value:`{\n`});for(let a=0;a<s.length;a++){let p=s[a],h=a===s.length-1?"":",",g=p in e,y=p in n;if(g&&y){let w=D(e[p],r),m=D(n[p],r);if(w===m){let x=W(w,i+1);l.push({value:o+JSON.stringify(p)+": "+x+h+`\n`})}else{let x=o+JSON.stringify(p)+": ",A=tn(e[p],n[p],i+1,r);if(A.length>0)if(!A[0].removed&&!A[0].added)A[0].value=x+A[0].value;else{let C=A.find(E=>E.removed),F=A.find(E=>E.added);C&&(C.value=x+C.value),F&&(F.value=x+F.value)}if(h&&A.length>0){let C=A[A.length-1];C.value=C.value.replace(/\\n$/,h+`\n`)}l.push(...A)}}else if(g){let w=W(D(e[p],r),i+1);l.push({removed:!0,value:o+JSON.stringify(p)+": "+w+h+`\n`})}else{let w=W(D(n[p],r),i+1);l.push({added:!0,value:o+JSON.stringify(p)+": "+w+h+`\n`})}}return l.push({value:t+`}\n`}),l}function uo(e,n,i,r="json"){let l=[],t=" ".repeat(i),o=" ".repeat(i+1);l.push({value:`[\n`});let u=Math.max(e.length,n.length);for(let f=0;f<u;f++){let s=f===u-1?"":",";if(f>=e.length){let a=W(D(n[f],r),i+1);l.push({added:!0,value:o+a+s+`\n`})}else if(f>=n.length){let a=W(D(e[f],r),i+1);l.push({removed:!0,value:o+a+s+`\n`})}else{let a=D(e[f],r),p=D(n[f],r);if(a===p){let d=W(a,i+1);l.push({value:o+d+s+`\n`})}else{let d=tn(e[f],n[f],i+1,r);if(d.length>0&&(d[0].value=o+d[0].value),s&&d.length>0){let h=d[d.length-1];h.value=h.value.replace(/\\n$/,s+`\n`)}l.push(...d)}}}return l.push({value:t+`]\n`}),l}function fo(e,n,i,r="json"){let l=W(e,i),t=W(n,i);return N(l,t).map(u=>({value:u.value,added:u.added,removed:u.removed}))}function W(e,n,i="json"){if(n===0)return e;let r=" ".repeat(n);return e.split(`\n`).map((l,t)=>t===0?l:r+l).join(`\n`)}var vi=e=>e===""?[]:e.replace(/\\n$/,"").split(`\n`),co=(e,n,i="diffChars")=>{let l=(typeof i=="string"?no[i]:i)(e,n),t={left:[],right:[]};return l.forEach(({added:o,removed:u,value:f})=>{let c={};return o&&(c.type=1,c.value=f,t.right.push(c)),u&&(c.type=2,c.value=f,t.left.push(c)),!u&&!o&&(c.type=0,c.value=f,t.right.push(c),t.left.push(c)),c}),t},yi=(e,n,i=!1,r="diffChars",l=0,t=[],o=!1)=>{let u=[];if(typeof e=="string"&&typeof n=="string")if(r==="diffJson")u=lo(e,n);else if(r==="diffYaml")try{u=oo(e,n)}catch{u=N(e,n,{newlineIsToken:!1})}else u=N(e,n,{newlineIsToken:!1});else u=ro(e,n);let f=l,c=l,s=[],a=0,p=[],d=[],h=(g,y,w,m,x)=>vi(g).map((C,F)=>{let E={},S={};if(!(d.includes(`${y}-${F}`)||x&&F!==0)){if(w||m){let $=!0;if(m){c+=1,E.lineNumber=c,E.type=2,E.value=C||" ";let un=u[y+1];if(un?.added){let fn=vi(un.value)[F];if(fn){let Ai=h(fn,y,!0,!1,!0),{value:B,lineNumber:wi,type:Ci}=Ai[0].right;if(d.push(`${y+1}-${F}`),S.lineNumber=wi,E.value===B)$=!1,S.type=0,E.type=0,S.value=B;else{S.type=Ci;let cn=500,Ei=C.length>cn||B.length>cn;if(i||Ei)S.value=B;else if(o)E.rawValue=C,E.value=C,S.rawValue=B,S.value=B;else{let an=co(C,B,r);S.value=an.right,E.value=an.left}}}}}else f+=1,S.lineNumber=f,S.type=1,S.value=C;$&&!x&&(p.includes(a)||p.push(a))}else c+=1,f+=1,E.lineNumber=c,E.type=0,E.value=C,S.lineNumber=f,S.type=0,S.value=C;return(t?.includes(`L-${E.lineNumber}`)||t?.includes(`R-${S.lineNumber}`)&&!p.includes(a))&&p.push(a),x||(a+=1),{right:S,left:E}}}).filter(Boolean);return u.forEach(({added:g,removed:y,value:w},m)=>{s=[...s,...h(w,m,g,y)]}),{lineInformation:s,diffLines:p}};self.onmessage=e=>{let{oldString:n,newString:i,disableWordDiff:r,lineCompareMethod:l,linesOffset:t,showLines:o,deferWordDiff:u}=e.data,f=yi(n,i,r,l,t,o,u);self.postMessage(f)};})();\n/*! Bundled license information:\n\njs-yaml/dist/js-yaml.mjs:\n (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)\n*/\n',JK=AY;var yn;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.ADDED=1]="ADDED",e[e.REMOVED=2]="REMOVED",e[e.CHANGED=3]="CHANGED"})(yn||(yn={}));function Li(e,t){return t==="yaml"?cy(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function eQ(e,t,n="json"){const r=Li(e,n),i=Li(t,n);return r===i?[{value:r}]:gb(e,t,0,n)}function tQ(e,t){return eQ(e,t,"json")}function nQ(e,t){try{const n=JSON.parse(e),r=JSON.parse(t),i=JSON.stringify(n),a=JSON.stringify(r);return i===a?[{value:e}]:Go(e,t,{newlineIsToken:!1})}catch{return Go(e,t,{newlineIsToken:!1})}}function rQ(e,t){const n=m4(e),r=m4(t),i=cy(n,{indent:2,lineWidth:-1,noRefs:!0}),a=cy(r,{indent:2,lineWidth:-1,noRefs:!0});return i===a?[{value:e}]:Go(e,t,{newlineIsToken:!1})}function gb(e,t,n,r="json"){const i=Li(e,r),a=Li(t,r);return i===a?[{value:Vo(i,n,r)}]:typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null&&!Array.isArray(e)&&!Array.isArray(t)?iQ(e,t,n,r):Array.isArray(e)&&Array.isArray(t)?oQ(e,t,n,r):aQ(i,a,n,r)}function iQ(e,t,n,r="json"){const i=[],a=" ".repeat(n),l=" ".repeat(n+1),c=new Set(Object.keys(e)),d=Object.keys(t),f=[...c].filter(p=>!(p in t)),g=[...d,...f];i.push({value:`{
73
+ `});for(let p=0;p<g.length;p++){const y=g[p],v=p===g.length-1?"":",",S=y in e,E=y in t;if(S&&E){const k=Li(e[y],r),T=Li(t[y],r);if(k===T){const R=Vo(k,n+1);i.push({value:l+JSON.stringify(y)+": "+R+v+`
74
+ `})}else{const R=l+JSON.stringify(y)+": ",M=gb(e[y],t[y],n+1,r);if(M.length>0)if(!M[0].removed&&!M[0].added)M[0].value=R+M[0].value;else{const O=M.find(N=>N.removed),A=M.find(N=>N.added);O&&(O.value=R+O.value),A&&(A.value=R+A.value)}if(v&&M.length>0){const O=M[M.length-1];O.value=O.value.replace(/\n$/,v+`
75
+ `)}i.push(...M)}}else if(S){const k=Vo(Li(e[y],r),n+1);i.push({removed:!0,value:l+JSON.stringify(y)+": "+k+v+`
76
+ `})}else{const k=Vo(Li(t[y],r),n+1);i.push({added:!0,value:l+JSON.stringify(y)+": "+k+v+`
77
+ `})}}return i.push({value:a+`}
78
+ `}),i}function oQ(e,t,n,r="json"){const i=[],a=" ".repeat(n),l=" ".repeat(n+1);i.push({value:`[
79
+ `});const c=Math.max(e.length,t.length);for(let d=0;d<c;d++){const g=d===c-1?"":",";if(d>=e.length){const p=Vo(Li(t[d],r),n+1);i.push({added:!0,value:l+p+g+`
80
+ `})}else if(d>=t.length){const p=Vo(Li(e[d],r),n+1);i.push({removed:!0,value:l+p+g+`
81
+ `})}else{const p=Li(e[d],r),y=Li(t[d],r);if(p===y){const x=Vo(p,n+1);i.push({value:l+x+g+`
82
+ `})}else{const x=gb(e[d],t[d],n+1,r);if(x.length>0&&(x[0].value=l+x[0].value),g&&x.length>0){const v=x[x.length-1];v.value=v.value.replace(/\n$/,g+`
83
+ `)}i.push(...x)}}}return i.push({value:a+`]
84
+ `}),i}function aQ(e,t,n,r="json"){const i=Vo(e,n),a=Vo(t,n);return Go(i,a).map(c=>({value:c.value,added:c.added,removed:c.removed}))}function Vo(e,t,n="json"){if(t===0)return e;const r=" ".repeat(t);return e.split(`
85
+ `).map((i,a)=>a===0?i:r+i).join(`
86
+ `)}var ir;(function(e){e.CHARS="diffChars",e.WORDS="diffWords",e.WORDS_WITH_SPACE="diffWordsWithSpace",e.LINES="diffLines",e.TRIMMED_LINES="diffTrimmedLines",e.SENTENCES="diffSentences",e.CSS="diffCss",e.JSON="diffJson",e.YAML="diffYaml"})(ir||(ir={}));const g4=e=>e===""?[]:e.replace(/\n$/,"").split(`
87
+ `),t8=(e,t,n=ir.CHARS)=>{const i=(typeof n=="string"?JK[n]:n)(e,t),a={left:[],right:[]};return i.forEach(({added:l,removed:c,value:d})=>{const f={};return l&&(f.type=yn.ADDED,f.value=d,a.right.push(f)),c&&(f.type=yn.REMOVED,f.value=d,a.left.push(f)),!c&&!l&&(f.type=yn.DEFAULT,f.value=d,a.right.push(f),a.left.push(f)),f}),a},sQ=(e,t,n=!1,r=ir.CHARS,i=0,a=[],l=!1)=>{let c=[];if(typeof e=="string"&&typeof t=="string")if(r===ir.JSON)c=nQ(e,t);else if(r===ir.YAML)try{c=rQ(e,t)}catch{c=Go(e,t,{newlineIsToken:!1})}else c=Go(e,t,{newlineIsToken:!1});else c=tQ(e,t);let d=i,f=i,g=[],p=0;const y=[],x=[],v=(S,E,k,T,R)=>g4(S).map((O,A)=>{const N={},D={};if(!(x.includes(`${E}-${A}`)||R&&A!==0)){if(k||T){let H=!0;if(T){f+=1,N.lineNumber=f,N.type=yn.REMOVED,N.value=O||" ";const I=c[E+1];if(I?.added){const U=g4(I.value)[A];if(U){const $=v(U,E,!0,!1,!0),{value:V,lineNumber:G,type:B}=$[0].right;if(x.push(`${E+1}-${A}`),D.lineNumber=G,N.value===V)H=!1,D.type=0,N.type=0,D.value=V;else{D.type=B;const F=500,q=O.length>F||V.length>F;if(n||q)D.value=V;else if(l)N.rawValue=O,N.value=O,D.rawValue=V,D.value=V;else{const W=t8(O,V,r);D.value=W.right,N.value=W.left}}}}}else d+=1,D.lineNumber=d,D.type=yn.ADDED,D.value=O;H&&!R&&(y.includes(p)||y.push(p))}else f+=1,d+=1,N.lineNumber=f,N.type=yn.DEFAULT,N.value=O,D.lineNumber=d,D.type=yn.DEFAULT,D.value=O;return(a?.includes(`L-${N.lineNumber}`)||a?.includes(`R-${D.lineNumber}`)&&!y.includes(p))&&y.push(p),R||(p+=1),{right:D,left:N}}}).filter(Boolean);return c.forEach(({added:S,removed:E,value:k},T)=>{g=[...g,...v(k,T,S,E)]}),{lineInformation:g,diffLines:y}};let Ru=null,Zu=null;const lQ=()=>{if(Ru!==null)return Ru;if(typeof Worker>"u"||typeof Blob>"u"||typeof URL>"u")return Zu=!1,null;try{const e=new Blob([ZK],{type:"application/javascript"});Ru=URL.createObjectURL(e),Zu=!0}catch{Zu=!1,Ru=null}return Ru},cQ=(e,t,n=!1,r=ir.CHARS,i=0,a=[],l=!1)=>{const c=()=>sQ(e,t,n,r,i,a,l),d=lQ();return d?new Promise(f=>{let g;try{g=new Worker(d)}catch{Zu=!1,f(c());return}g.onmessage=p=>{f(p.data),g.terminate()},g.onerror=()=>{Zu=!1,g.terminate(),f(c())},g.postMessage({oldString:e,newString:t,disableWordDiff:n,lineCompareMethod:r,linesOffset:i,showLines:a,deferWordDiff:l})}):Promise.resolve(c())};function y4(){return h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[h.jsx("title",{children:"expand"}),h.jsx("path",{d:"m8.177.677 2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25a.75.75 0 0 1-1.5 0V4H5.104a.25.25 0 0 1-.177-.427L7.823.677a.25.25 0 0 1 .354 0ZM7.25 10.75a.75.75 0 0 1 1.5 0V12h2.146a.25.25 0 0 1 .177.427l-2.896 2.896a.25.25 0 0 1-.354 0l-2.896-2.896A.25.25 0 0 1 5.104 12H7.25v-1.25Zm-5-2a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z"})]})}function uQ(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dQ(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fQ=(function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dQ(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=uQ(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e})(),yr="-ms-",Yp="-moz-",$t="-webkit-",n8="comm",yb="rule",xb="decl",hQ="@import",r8="@keyframes",pQ="@layer",mQ=Math.abs,Om=String.fromCharCode,gQ=Object.assign;function yQ(e,t){return fr(e,0)^45?(((t<<2^fr(e,0))<<2^fr(e,1))<<2^fr(e,2))<<2^fr(e,3):0}function i8(e){return e.trim()}function xQ(e,t){return(e=t.exec(e))?e[0]:e}function Gt(e,t,n){return e.replace(t,n)}function uy(e,t){return e.indexOf(t)}function fr(e,t){return e.charCodeAt(t)|0}function gd(e,t,n){return e.slice(t,n)}function oo(e){return e.length}function bb(e){return e.length}function Bh(e,t){return t.push(e),e}function bQ(e,t){return e.map(t).join("")}var Mm=1,fc=1,o8=0,Yr=0,qn=0,Ec="";function Lm(e,t,n,r,i,a,l){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Mm,column:fc,length:l,return:""}}function Au(e,t){return gQ(Lm("",null,null,"",null,null,0),e,{length:-e.length},t)}function vQ(){return qn}function wQ(){return qn=Yr>0?fr(Ec,--Yr):0,fc--,qn===10&&(fc=1,Mm--),qn}function ui(){return qn=Yr<o8?fr(Ec,Yr++):0,fc++,qn===10&&(fc=1,Mm++),qn}function fo(){return fr(Ec,Yr)}function up(){return Yr}function Xd(e,t){return gd(Ec,e,t)}function yd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function a8(e){return Mm=fc=1,o8=oo(Ec=e),Yr=0,[]}function s8(e){return Ec="",e}function dp(e){return i8(Xd(Yr-1,dy(e===91?e+2:e===40?e+1:e)))}function SQ(e){for(;(qn=fo())&&qn<33;)ui();return yd(e)>2||yd(qn)>3?"":" "}function CQ(e,t){for(;--t&&ui()&&!(qn<48||qn>102||qn>57&&qn<65||qn>70&&qn<97););return Xd(e,up()+(t<6&&fo()==32&&ui()==32))}function dy(e){for(;ui();)switch(qn){case e:return Yr;case 34:case 39:e!==34&&e!==39&&dy(qn);break;case 40:e===41&&dy(e);break;case 92:ui();break}return Yr}function EQ(e,t){for(;ui()&&e+qn!==57;)if(e+qn===84&&fo()===47)break;return"/*"+Xd(t,Yr-1)+"*"+Om(e===47?e:ui())}function kQ(e){for(;!yd(fo());)ui();return Xd(e,Yr)}function TQ(e){return s8(fp("",null,null,null,[""],e=a8(e),0,[0],e))}function fp(e,t,n,r,i,a,l,c,d){for(var f=0,g=0,p=l,y=0,x=0,v=0,S=1,E=1,k=1,T=0,R="",M=i,O=a,A=r,N=R;E;)switch(v=T,T=ui()){case 40:if(v!=108&&fr(N,p-1)==58){uy(N+=Gt(dp(T),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:N+=dp(T);break;case 9:case 10:case 13:case 32:N+=SQ(v);break;case 92:N+=CQ(up()-1,7);continue;case 47:switch(fo()){case 42:case 47:Bh(NQ(EQ(ui(),up()),t,n),d);break;default:N+="/"}break;case 123*S:c[f++]=oo(N)*k;case 125*S:case 59:case 0:switch(T){case 0:case 125:E=0;case 59+g:k==-1&&(N=Gt(N,/\f/g,"")),x>0&&oo(N)-p&&Bh(x>32?b4(N+";",r,n,p-1):b4(Gt(N," ","")+";",r,n,p-2),d);break;case 59:N+=";";default:if(Bh(A=x4(N,t,n,f,g,i,c,R,M=[],O=[],p),a),T===123)if(g===0)fp(N,t,A,A,M,a,p,c,O);else switch(y===99&&fr(N,3)===110?100:y){case 100:case 108:case 109:case 115:fp(e,A,A,r&&Bh(x4(e,A,A,0,0,i,c,R,i,M=[],p),O),i,O,p,c,r?M:O);break;default:fp(N,A,A,A,[""],O,0,c,O)}}f=g=x=0,S=k=1,R=N="",p=l;break;case 58:p=1+oo(N),x=v;default:if(S<1){if(T==123)--S;else if(T==125&&S++==0&&wQ()==125)continue}switch(N+=Om(T),T*S){case 38:k=g>0?1:(N+="\f",-1);break;case 44:c[f++]=(oo(N)-1)*k,k=1;break;case 64:fo()===45&&(N+=dp(ui())),y=fo(),g=p=oo(R=N+=kQ(up())),T++;break;case 45:v===45&&oo(N)==2&&(S=0)}}return a}function x4(e,t,n,r,i,a,l,c,d,f,g){for(var p=i-1,y=i===0?a:[""],x=bb(y),v=0,S=0,E=0;v<r;++v)for(var k=0,T=gd(e,p+1,p=mQ(S=l[v])),R=e;k<x;++k)(R=i8(S>0?y[k]+" "+T:Gt(T,/&\f/g,y[k])))&&(d[E++]=R);return Lm(e,t,n,i===0?yb:c,d,f,g)}function NQ(e,t,n){return Lm(e,t,n,n8,Om(vQ()),gd(e,2,-2),0)}function b4(e,t,n,r){return Lm(e,t,n,xb,gd(e,0,r),gd(e,r+1,-1),r)}function tc(e,t){for(var n="",r=bb(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function RQ(e,t,n,r){switch(e.type){case pQ:if(e.children.length)break;case hQ:case xb:return e.return=e.return||e.value;case n8:return"";case r8:return e.return=e.value+"{"+tc(e.children,r)+"}";case yb:e.value=e.props.join(",")}return oo(n=tc(e.children,r))?e.return=e.value+"{"+n+"}":""}function AQ(e){var t=bb(e);return function(n,r,i,a){for(var l="",c=0;c<t;c++)l+=e[c](n,r,i,a)||"";return l}}function jQ(e){return function(t){t.root||(t=t.return)&&e(t)}}function OQ(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var MQ=function(t,n,r){for(var i=0,a=0;i=a,a=fo(),i===38&&a===12&&(n[r]=1),!yd(a);)ui();return Xd(t,Yr)},LQ=function(t,n){var r=-1,i=44;do switch(yd(i)){case 0:i===38&&fo()===12&&(n[r]=1),t[r]+=MQ(Yr-1,n,r);break;case 2:t[r]+=dp(i);break;case 4:if(i===44){t[++r]=fo()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Om(i)}while(i=ui());return t},_Q=function(t,n){return s8(LQ(a8(t),n))},v4=new WeakMap,DQ=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!v4.get(r))&&!i){v4.set(t,!0);for(var a=[],l=_Q(n,a),c=r.props,d=0,f=0;d<l.length;d++)for(var g=0;g<c.length;g++,f++)t.props[f]=a[d]?l[d].replace(/&\f/g,c[g]):c[g]+" "+l[d]}}},IQ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function l8(e,t){switch(yQ(e,t)){case 5103:return $t+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $t+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $t+e+Yp+e+yr+e+e;case 6828:case 4268:return $t+e+yr+e+e;case 6165:return $t+e+yr+"flex-"+e+e;case 5187:return $t+e+Gt(e,/(\w+).+(:[^]+)/,$t+"box-$1$2"+yr+"flex-$1$2")+e;case 5443:return $t+e+yr+"flex-item-"+Gt(e,/flex-|-self/,"")+e;case 4675:return $t+e+yr+"flex-line-pack"+Gt(e,/align-content|flex-|-self/,"")+e;case 5548:return $t+e+yr+Gt(e,"shrink","negative")+e;case 5292:return $t+e+yr+Gt(e,"basis","preferred-size")+e;case 6060:return $t+"box-"+Gt(e,"-grow","")+$t+e+yr+Gt(e,"grow","positive")+e;case 4554:return $t+Gt(e,/([^-])(transform)/g,"$1"+$t+"$2")+e;case 6187:return Gt(Gt(Gt(e,/(zoom-|grab)/,$t+"$1"),/(image-set)/,$t+"$1"),e,"")+e;case 5495:case 3959:return Gt(e,/(image-set\([^]*)/,$t+"$1$`$1");case 4968:return Gt(Gt(e,/(.+:)(flex-)?(.*)/,$t+"box-pack:$3"+yr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$t+e+e;case 4095:case 3583:case 4068:case 2532:return Gt(e,/(.+)-inline(.+)/,$t+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oo(e)-1-t>6)switch(fr(e,t+1)){case 109:if(fr(e,t+4)!==45)break;case 102:return Gt(e,/(.+:)(.+)-([^]+)/,"$1"+$t+"$2-$3$1"+Yp+(fr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~uy(e,"stretch")?l8(Gt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(fr(e,t+1)!==115)break;case 6444:switch(fr(e,oo(e)-3-(~uy(e,"!important")&&10))){case 107:return Gt(e,":",":"+$t)+e;case 101:return Gt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$t+(fr(e,14)===45?"inline-":"")+"box$3$1"+$t+"$2$3$1"+yr+"$2box$3")+e}break;case 5936:switch(fr(e,t+11)){case 114:return $t+e+yr+Gt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $t+e+yr+Gt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $t+e+yr+Gt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $t+e+yr+e+e}return e}var zQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case xb:t.return=l8(t.value,t.length);break;case r8:return tc([Au(t,{value:Gt(t.value,"@","@"+$t)})],i);case yb:if(t.length)return bQ(t.props,function(a){switch(xQ(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return tc([Au(t,{props:[Gt(a,/:(read-\w+)/,":"+Yp+"$1")]})],i);case"::placeholder":return tc([Au(t,{props:[Gt(a,/:(plac\w+)/,":"+$t+"input-$1")]}),Au(t,{props:[Gt(a,/:(plac\w+)/,":"+Yp+"$1")]}),Au(t,{props:[Gt(a,/:(plac\w+)/,yr+"input-$1")]})],i)}return""})}},PQ=[zQ],FQ=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var E=S.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var i=t.stylisPlugins||PQ,a={},l,c=[];l=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var E=S.getAttribute("data-emotion").split(" "),k=1;k<E.length;k++)a[E[k]]=!0;c.push(S)});var d,f=[DQ,IQ];{var g,p=[RQ,jQ(function(S){g.insert(S)})],y=AQ(f.concat(i,p)),x=function(E){return tc(TQ(E),y)};d=function(E,k,T,R){g=T,x(E?E+"{"+k.styles+"}":k.styles),R&&(v.inserted[k.name]=!0)}}var v={key:n,sheet:new fQ({key:n,container:l,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:d};return v.sheet.hydrate(c),v};function BQ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var HQ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},UQ=/[A-Z]|^ms/g,qQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c8=function(t){return t.charCodeAt(1)===45},w4=function(t){return t!=null&&typeof t!="boolean"},P1=OQ(function(e){return c8(e)?e:e.replace(UQ,"-$&").toLowerCase()}),S4=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(qQ,function(r,i,a){return _a={name:i,styles:a,next:_a},i})}return HQ[t]!==1&&!c8(t)&&typeof n=="number"&&n!==0?n+"px":n};function Wp(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return _a={name:i.name,styles:i.styles,next:_a},i.name;var a=n;if(a.styles!==void 0){var l=a.next;if(l!==void 0)for(;l!==void 0;)_a={name:l.name,styles:l.styles,next:_a},l=l.next;var c=a.styles+";";return c}return VQ(e,t,n)}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function VQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Wp(e,t,n[i])+";";else for(var a in n){var l=n[a];if(typeof l!="object"){var c=l;t!=null&&t[c]!==void 0?r+=a+"{"+t[c]+"}":w4(c)&&(r+=P1(a)+":"+S4(a,c)+";")}else if(Array.isArray(l)&&typeof l[0]=="string"&&(t==null||t[l[0]]===void 0))for(var d=0;d<l.length;d++)w4(l[d])&&(r+=P1(a)+":"+S4(a,l[d])+";");else{var f=Wp(e,t,l);switch(a){case"animation":case"animationName":{r+=P1(a)+":"+f+";";break}default:r+=a+"{"+f+"}"}}}return r}var C4=/label:\s*([^\s;{]+)\s*(;|$)/g,_a;function F1(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";_a=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Wp(n,t,a);else{var l=a;i+=l[0]}for(var c=1;c<e.length;c++)if(i+=Wp(n,t,e[c]),r){var d=a;i+=d[c]}C4.lastIndex=0;for(var f="",g;(g=C4.exec(i))!==null;)f+="-"+g[1];var p=BQ(i)+f;return{name:p,styles:i,next:_a}}function u8(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var $Q=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},GQ=function(t,n,r){$Q(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function E4(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function k4(e,t,n){var r=[],i=u8(e,r,n);return r.length<2?n:i+t(r)}var YQ=function(t){var n=FQ(t);n.sheet.speedy=function(c){this.isSpeedy=c},n.compat=!0;var r=function(){for(var d=arguments.length,f=new Array(d),g=0;g<d;g++)f[g]=arguments[g];var p=F1(f,n.registered,void 0);return GQ(n,p),n.key+"-"+p.name},i=function(){for(var d=arguments.length,f=new Array(d),g=0;g<d;g++)f[g]=arguments[g];var p=F1(f,n.registered),y="animation-"+p.name;return E4(n,{name:p.name,styles:"@keyframes "+y+"{"+p.styles+"}"}),y},a=function(){for(var d=arguments.length,f=new Array(d),g=0;g<d;g++)f[g]=arguments[g];var p=F1(f,n.registered);E4(n,p)},l=function(){for(var d=arguments.length,f=new Array(d),g=0;g<d;g++)f[g]=arguments[g];return k4(n.registered,r,WQ(f))};return{css:r,cx:l,injectGlobal:a,keyframes:i,hydrate:function(d){d.forEach(function(f){n.inserted[f]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:u8.bind(null,n.registered),merge:k4.bind(null,n.registered,r)}},WQ=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var l in i)i[l]&&l&&(a&&(a+=" "),a+=l)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n};const KQ=(e,t=!1,n="")=>{const{variables:r={},...i}=e,a={light:{diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",changedBackground:"#fffbdd",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee",...r.light||{}},dark:{diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#2ea04326",addedColor:"white",removedBackground:"#f851491a",removedColor:"white",changedBackground:"#3e302c",wordAddedBackground:"#2ea04366",wordRemovedBackground:"#f8514966",addedGutterBackground:"#3fb9504d",removedGutterBackground:"#f851494d",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#262831",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#f0f6fc",addedGutterColor:"#f0f6fc",removedGutterColor:"#f0f6fc",codeFoldContentColor:"#9198a1",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#f0f6fc",diffViewerTitleBorderColor:"#353846",...r.dark||{}}},l=t?a.dark:a.light,{css:c,cx:d}=YQ({key:"react-diff",nonce:n}),f=c({width:"auto",overflow:"hidden",label:"content"}),g=c({label:"split-view"}),p=c({position:"sticky",top:0,zIndex:2,label:"sticky-header"}),y=c({background:l.diffViewerTitleBackground,color:l.diffViewerTitleColor,padding:"0.5em 1em",display:"flex",alignItems:"center",gap:"0.5em",fontFamily:"monospace",fontSize:12,fill:l.diffViewerTitleColor}),x=c({display:"flex",label:"column-headers"}),v=c({width:"100%",minWidth:"1000px",overflowX:"auto",tableLayout:"fixed",fontSize:12,background:l.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"1.6em",width:"fit-content"},label:"diff-container",borderCollapse:"collapse","@media (max-width: 768px)":{minWidth:"unset"}}),S=c({overflow:"hidden",width:"100%"}),E=c({color:l.diffViewerColor,whiteSpace:"pre-wrap",fontFamily:"monospace",lineBreak:"anywhere",textDecoration:"none",label:"content-text"}),k=c({userSelect:"none",label:"unselectable"}),T=c({label:"no-wrap",pre:{whiteSpace:"pre"},[`.${E}`]:{whiteSpace:"pre",lineBreak:"auto"}}),R=c({background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",margin:0,label:"all-expand-button",":hover":{fill:l.addedGutterColor},":focus":{outline:`1px ${l.addedGutterColor} solid`}}),M=c({background:l.diffViewerTitleBackground,padding:"0.5em",lineHeight:"1.4em",height:"2.4em",overflow:"hidden",width:"50%",borderBottom:`1px solid ${l.diffViewerTitleBorderColor}`,boxSizing:"border-box",fontSize:12,label:"title-block",":only-child":{width:"100%"},":last-child:not(:only-child)":{borderLeft:`1px solid ${l.diffViewerTitleBorderColor}`},[`.${E}`]:{color:l.diffViewerTitleColor}}),O=c({color:l.gutterColor,label:"line-number"}),A=c({background:l.removedBackground,color:l.removedColor,pre:{color:l.removedColor},[`.${O}`]:{color:l.removedGutterColor},label:"diff-removed"}),N=c({background:l.addedBackground,color:l.addedColor,pre:{color:l.addedColor},[`.${O}`]:{color:l.addedGutterColor},label:"diff-added"}),D=c({background:l.changedBackground,[`.${O}`]:{color:l.gutterColor},label:"diff-changed"}),H=c({display:"inline",textDecoration:"none",label:"word-diff"}),I=c({background:l.wordAddedBackground,label:"word-added"}),U=c({background:l.wordRemovedBackground,label:"word-removed"}),$=c({backgroundColor:l.codeFoldGutterBackground,label:"code-fold-gutter",minWidth:"50px",width:"50px",textAlign:"center",fill:l.codeFoldContentColor}),V=c({padding:""}),G=c({background:l.codeFoldBackground,cursor:"pointer",display:"inline",margin:0,border:"none",fill:l.codeFoldContentColor,label:"code-fold-expand-button"}),B=c({color:l.codeFoldContentColor,fontFamily:"monospace",label:"code-fold-content"}),F=c({display:"block",width:"10px",height:"10px",backgroundColor:"#ddd",borderWidth:"1px",borderStyle:"solid",borderColor:l.diffViewerTitleBorderColor}),q=c({backgroundColor:l.wordAddedBackground}),W=c({backgroundColor:l.wordRemovedBackground}),ie=c({backgroundColor:l.codeFoldBackground,fontSize:12,alignItems:"center",userSelect:"none",fontWeight:700,cursor:"pointer",label:"code-fold","&:hover":{color:l.diffViewerColor,fill:l.diffViewerColor,"& *":{color:l.diffViewerColor,fill:l.diffViewerColor}},a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),_=c({backgroundColor:l.emptyLineBackground,label:"empty-line"}),z=c({width:28,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${N}`]:{pre:{color:l.addedColor}},[`&.${A}`]:{pre:{color:l.removedColor}}}),Y=c({background:l.highlightBackground,label:"highlighted-line",[`.${I}, .${U}`]:{backgroundColor:"initial"}}),L=c({label:"highlighted-gutter"}),ee=c({userSelect:"none",minWidth:50,width:"50px",padding:"0 10px",whiteSpace:"nowrap",label:"gutter",textAlign:"center",color:l.gutterColor,background:l.gutterBackground,"&:hover":{cursor:"pointer",background:l.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5,textAlign:"center",width:"100%"},[`&.${N}`]:{background:l.addedGutterBackground},[`&.${A}`]:{background:l.removedGutterBackground},[`&.${L}`]:{background:l.highlightGutterBackground,"&:hover":{background:l.highlightGutterBackground}}}),te=c({"&:hover":{background:l.gutterBackground,cursor:"initial"},label:"empty-gutter"}),Q=c({verticalAlign:"baseline",label:"line",textDecoration:"none"}),de=c({}),ue={diffContainer:v,diffRemoved:A,diffAdded:N,diffChanged:D,splitView:g,marker:z,highlightedGutter:L,highlightedLine:Y,gutter:ee,line:Q,lineContent:S,wordDiff:H,wordAdded:I,summary:y,block:F,blockAddition:q,blockDeletion:W,wordRemoved:U,noSelect:k,noWrap:T,codeFoldGutter:$,codeFoldExpandButton:G,codeFoldContentContainer:V,codeFold:ie,emptyGutter:te,emptyLine:_,lineNumber:O,contentText:E,content:f,column:de,codeFoldContent:B,stickyHeader:p,columnHeaders:x,titleBlock:M,allExpandButton:R},Se=Object.keys(i).reduce((Ee,ze)=>({...Ee,[ze]:c(i[ze])}),{});return Object.keys(ue).reduce((Ee,ze)=>({...Ee,[ze]:Se[ze]?d(ue[ze],Se[ze]):ue[ze]}),{})};function QQ(){return h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[h.jsx("title",{children:"fold"}),h.jsx("path",{d:"M10.896 2H8.75V.75a.75.75 0 0 0-1.5 0V2H5.104a.25.25 0 0 0-.177.427l2.896 2.896a.25.25 0 0 0 .354 0l2.896-2.896A.25.25 0 0 0 10.896 2ZM8.75 15.25a.75.75 0 0 1-1.5 0V14H5.104a.25.25 0 0 1-.177-.427l2.896-2.896a.25.25 0 0 1 .354 0l2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25Zm-6.5-6.5a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z"})]})}function XQ(e,t,n){const r=[];let i=0;for(const p of t){const y=typeof p.value=="string"?p.value:"";y.length>0&&(r.push({start:i,end:i+y.length,type:p.type}),i+=y.length)}const a=[];let l=0;for(;l<e.length;)if(e[l]==="<"){const p=e.indexOf(">",l);if(p===-1){a.push({type:"text",content:e.slice(l)});break}a.push({type:"tag",content:e.slice(l,p+1)}),l=p+1}else{let p=e.indexOf("<",l);p===-1&&(p=e.length),a.push({type:"text",content:e.slice(l,p)}),l=p}function c(p){return p.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&nbsp;/g," ")}function d(p){return p===yn.ADDED?{open:`<ins class="${n.wordDiff} ${n.wordAdded}">`,close:"</ins>"}:p===yn.REMOVED?{open:`<del class="${n.wordDiff} ${n.wordRemoved}">`,close:"</del>"}:{open:`<span class="${n.wordDiff}">`,close:"</span>"}}let f=0,g="";for(const p of a)if(p.type==="tag")g+=p.content;else{const y=p.content,x=c(y);let v=0,S=0;for(;v<x.length;){const E=f+v,k=r.find(H=>E>=H.start&&E<H.end);if(!k){const H=y[S];g+=H,S++,v++;continue}const T=k.end-E,R=x.length-v,M=Math.min(T,R);let O=S,A=0;for(;A<M&&O<y.length;){if(y[O]==="&"){const H=y.indexOf(";",O);H!==-1&&H-O<10?O=H+1:O++}else O++;A++}const N=y.slice(S,O),D=d(k.type);D?g+=D.open+N+D.close:g+=N,S=O,v+=M}f+=x.length}return g}var Er;(function(e){e.LEFT="L",e.RIGHT="R"})(Er||(Er={}));let ZQ=class Ho extends C.Component{styles;wordDiffCache=new Map;contentColumnRef=C.createRef();charMeasureRef=C.createRef();stickyHeaderRef=C.createRef();resizeObserver=null;static defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:ir.CHARS,styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:""};constructor(t){super(t),this.state={expandedBlocks:[],noSelect:void 0,scrollableContainerRef:C.createRef(),computedDiffResult:{},isLoading:!1,visibleStartRow:0,contentColumnWidth:null,charWidth:null,cumulativeOffsets:null}}getWordDiffValues=(t,n,r)=>{if(!t||!n)return{leftValue:t?.value,rightValue:n?.value};if(t.rawValue===void 0||n.rawValue===void 0)return{leftValue:t.value,rightValue:n.value};const i=`${r}-${t.rawValue}-${n.rawValue}`;let a=this.wordDiffCache.get(i);if(!a){const l=this.props.compareMethod===ir.JSON||this.props.compareMethod===ir.YAML?ir.CHARS:this.props.compareMethod,c=t8(t.rawValue,n.rawValue,l);a={left:c.left,right:c.right},this.wordDiffCache.set(i,a)}return{leftValue:a.left,rightValue:a.right}};resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1;onBlockExpand=t=>{const n=this.state.expandedBlocks.slice();n.push(t),this.setState({expandedBlocks:n},()=>this.recalculateOffsets())};getStickyHeaderHeight(){return this.stickyHeaderRef.current?.offsetHeight||0}measureCharWidth(){const t=this.charMeasureRef.current;return t&&t.getBoundingClientRect().width||7.2}measureContentColumnWidth(){const t=this.contentColumnRef.current;if(t&&t.clientWidth>0){const p=window.getComputedStyle(t),y=parseFloat(p.paddingLeft)+parseFloat(p.paddingRight),x=t.clientWidth-y;if(x>0)return x}const n=this.state.scrollableContainerRef.current;if(!n||n.clientWidth<=0)return null;const r=n.clientWidth,i=this.props.hideLineNumbers?0:50,a=28,l=(this.props.splitView,2),c=this.props.splitView?2:1,d=this.props.splitView?2:1,f=l*i+c*a,g=r-f;return Math.max(100,g/d)}getTextLength(t){return t?typeof t=="string"?t.length:t.reduce((n,r)=>n+(typeof r.value=="string"?r.value.length:0),0):0}buildCumulativeOffsets(t,n,r,i,a,l,c,d){const f=[0],g=new Set;for(let p=0;p<t.length;p++){const y=t[p];if(a){const T=n[p];if(T!==void 0&&!i.includes(T)){const R=r[T].endLine===p;!g.has(T)&&R&&(g.add(T),f.push(f[f.length-1]+Ho.ESTIMATED_ROW_HEIGHT));continue}}const x=y.left?.value?this.getTextLength(y.left.value):0,v=y.right?.value?this.getTextLength(y.right.value):0,S=d?Math.max(x,v):x||v,E=Math.floor(c/l),k=E>0?Math.max(1,Math.ceil(S/E)):1;f.push(f[f.length-1]+k*Ho.ESTIMATED_ROW_HEIGHT)}return f}findLineAtOffset(t,n){let r=0,i=n.length-2;for(;r<i;){const a=Math.floor((r+i+1)/2);n[a]<=t?r=a:i=a-1}return r}recalculateOffsets=()=>{if(!this.props.infiniteLoading)return;const t=this.measureContentColumnWidth(),n=this.measureCharWidth();if(!t)return;const r=this.getMemoisedKey(),{lineInformation:i,lineBlocks:a,blocks:l}=this.state.computedDiffResult[r]??{};if(!i)return;const c=this.buildCumulativeOffsets(i,a,l,this.state.expandedBlocks,this.props.showDiffOnly,n,t,this.props.splitView);this.setState({cumulativeOffsets:c,contentColumnWidth:t,charWidth:n},()=>{this.onScroll()})};computeStyles=WG(KQ);onLineNumberClickProxy=t=>this.props.onLineNumberClick?n=>this.props.onLineNumberClick(t,n):()=>{};shouldHighlightWordDiff=()=>{const{compareMethod:t}=this.props;return t===ir.CHARS||t===ir.WORDS||t===ir.WORDS_WITH_SPACE||t===ir.JSON||t===ir.YAML};renderWordDiff=(t,n)=>{const r=this.shouldHighlightWordDiff(),i=t.map(l=>typeof l.value=="string"?l.value:"").join("");if(i.length>500)return[h.jsx("span",{children:i},"long-line")];if(n){const l=n(i),c=l?.props?.dangerouslySetInnerHTML?.__html;if(typeof c=="string"){const d=XQ(c,t,{wordDiff:this.styles.wordDiff,wordAdded:r?this.styles.wordAdded:"",wordRemoved:r?this.styles.wordRemoved:""});return[C.cloneElement(l,{key:"highlighted-diff",dangerouslySetInnerHTML:{__html:d}})]}}return t.map((l,c)=>{let d;return typeof l.value=="string"?d=l.value:d=void 0,l.type===yn.ADDED?h.jsx("ins",{className:$i(this.styles.wordDiff,{[this.styles.wordAdded]:r}),children:d},c):l.type===yn.REMOVED?h.jsx("del",{className:$i(this.styles.wordDiff,{[this.styles.wordRemoved]:r}),children:d},c):h.jsx("span",{className:$i(this.styles.wordDiff),children:d},c)})};renderLine=(t,n,r,i,a,l)=>{const c=`${r}-${t}`,d=`${l}-${a}`,f=this.props.highlightLines.includes(c)||this.props.highlightLines.includes(d),g=n===yn.ADDED,p=n===yn.REMOVED,y=n===yn.CHANGED;let x;const v=Array.isArray(i);v?x=this.renderWordDiff(i,this.props.renderContent):this.props.renderContent?x=this.props.renderContent(i):x=i;let S="div";return g&&!v?S="ins":p&&!v&&(S="del"),h.jsxs(h.Fragment,{children:[!this.props.hideLineNumbers&&h.jsx("td",{onClick:t&&this.onLineNumberClickProxy(c),className:$i(this.styles.gutter,{[this.styles.emptyGutter]:!t,[this.styles.diffAdded]:g,[this.styles.diffRemoved]:p,[this.styles.diffChanged]:y,[this.styles.highlightedGutter]:f}),children:h.jsx("pre",{className:this.styles.lineNumber,children:t})}),!this.props.splitView&&!this.props.hideLineNumbers&&h.jsx("td",{onClick:a&&this.onLineNumberClickProxy(d),className:$i(this.styles.gutter,{[this.styles.emptyGutter]:!a,[this.styles.diffAdded]:g,[this.styles.diffRemoved]:p,[this.styles.diffChanged]:y,[this.styles.highlightedGutter]:f}),children:h.jsx("pre",{className:this.styles.lineNumber,children:a})}),this.props.renderGutter?this.props.renderGutter({lineNumber:t,type:n,prefix:r,value:i,additionalLineNumber:a,additionalPrefix:l,styles:this.styles}):null,h.jsx("td",{className:$i(this.styles.marker,{[this.styles.emptyLine]:!x,[this.styles.diffAdded]:g,[this.styles.diffRemoved]:p,[this.styles.diffChanged]:y,[this.styles.highlightedLine]:f}),children:h.jsxs("pre",{children:[g&&"+",p&&"-"]})}),h.jsx("td",{ref:r===Er.LEFT&&!this.state.cumulativeOffsets?this.contentColumnRef:void 0,className:$i(this.styles.content,{[this.styles.emptyLine]:!x,[this.styles.diffAdded]:g,[this.styles.diffRemoved]:p,[this.styles.diffChanged]:y,[this.styles.highlightedLine]:f,left:r===Er.LEFT,right:r===Er.RIGHT}),onMouseDown:()=>{const E=document.getElementsByClassName(r===Er.LEFT?"right":"left");for(let k=0;k<E.length;k++)E.item(k).classList.add(this.styles.noSelect)},title:g&&!v?"Added line":p&&!v?"Removed line":void 0,children:h.jsx(S,{className:this.styles.contentText,children:x})})]})};renderSplitView=({left:t,right:n},r)=>{const{leftValue:i,rightValue:a}=this.getWordDiffValues(t,n,r);return h.jsxs("tr",{className:this.styles.line,children:[this.renderLine(t.lineNumber,t.type,Er.LEFT,i),this.renderLine(n.lineNumber,n.type,Er.RIGHT,a)]},r)};renderInlineView=({left:t,right:n},r)=>{const{leftValue:i,rightValue:a}=this.getWordDiffValues(t,n,r);let l;return t.type===yn.REMOVED&&n.type===yn.ADDED?h.jsxs(C.Fragment,{children:[h.jsx("tr",{className:this.styles.line,children:this.renderLine(t.lineNumber,t.type,Er.LEFT,i,null)}),h.jsx("tr",{className:this.styles.line,children:this.renderLine(null,n.type,Er.RIGHT,a,n.lineNumber,Er.RIGHT)})]},r):(t.type===yn.REMOVED&&(l=this.renderLine(t.lineNumber,t.type,Er.LEFT,i,null)),t.type===yn.DEFAULT&&(l=this.renderLine(t.lineNumber,t.type,Er.LEFT,i,n.lineNumber,Er.RIGHT)),n.type===yn.ADDED&&(l=this.renderLine(null,n.type,Er.RIGHT,a,n.lineNumber)),h.jsx("tr",{className:this.styles.line,children:l},r))};onBlockClickProxy=t=>()=>this.onBlockExpand(t);renderSkippedLineIndicator=(t,n,r,i)=>{const{hideLineNumbers:a,splitView:l}=this.props,c=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(t,r,i):h.jsxs("span",{className:this.styles.codeFoldContent,children:["@@ -",r-t,",",t," +",i-t,",",t," @@"]}),d=h.jsx("td",{className:this.styles.codeFoldContentContainer,children:h.jsx("button",{type:"button",className:this.styles.codeFoldExpandButton,onClick:this.onBlockClickProxy(n),tabIndex:0,children:c})}),f=!l&&!a,g=h.jsx("td",{className:this.styles.codeFoldGutter,children:h.jsx(y4,{})});return h.jsxs("tr",{className:this.styles.codeFold,onClick:this.onBlockClickProxy(n),role:"button",tabIndex:0,children:[!a&&g,this.props.renderGutter?h.jsx("td",{className:this.styles.codeFoldGutter}):null,h.jsx("td",{className:$i({[this.styles.codeFoldGutter]:f})}),f?h.jsxs(C.Fragment,{children:[h.jsx("td",{}),d]}):h.jsxs(C.Fragment,{children:[d,this.props.renderGutter?h.jsx("td",{}):null,h.jsx("td",{}),h.jsx("td",{}),a?null:h.jsx("td",{})]})]},`${r}-${i}`)};getMemoisedKey=()=>{const{oldValue:t,newValue:n,disableWordDiff:r,compareMethod:i,linesOffset:a,alwaysShowLines:l,extraLinesSurroundingDiff:c}=this.props;return JSON.stringify({oldValue:t,newValue:n,disableWordDiff:r,compareMethod:i,linesOffset:a,alwaysShowLines:l,extraLinesSurroundingDiff:c})};memoisedCompute=async()=>{const{oldValue:t,newValue:n,disableWordDiff:r,compareMethod:i,linesOffset:a}=this.props,l=this.getMemoisedKey();if(this.state.computedDiffResult[l]){this.setState(S=>({...S,isLoading:!1}));return}const c=this.props.infiniteLoading?.containerHeight,d=c?typeof c=="number"?c:parseInt(c,10)||0:0,f=!r&&!!this.props.infiniteLoading&&d>0&&d<2e3,{lineInformation:g,diffLines:p}=await cQ(t,n,r,i,a,this.props.alwaysShowLines,f),y=this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff),{lineBlocks:x,blocks:v}=KG(g,p,y);this.state.computedDiffResult[l]={lineInformation:g,lineBlocks:x,blocks:v},this.setState(S=>({...S,computedDiffResult:this.state.computedDiffResult,isLoading:!1}),()=>{this.props.infiniteLoading&&requestAnimationFrame(()=>this.recalculateOffsets())})};static ESTIMATED_ROW_HEIGHT=19;onScroll=()=>{const t=this.state.scrollableContainerRef.current;if(!t||!this.props.infiniteLoading)return;const n=this.getStickyHeaderHeight(),r=Math.max(0,t.scrollTop-n),{cumulativeOffsets:i}=this.state,a=i?this.findLineAtOffset(r,i):Math.floor(r/Ho.ESTIMATED_ROW_HEIGHT);a!==this.state.visibleStartRow&&this.setState({visibleStartRow:a})};renderDiff=()=>{const{splitView:t,infiniteLoading:n,showDiffOnly:r}=this.props,{computedDiffResult:i,expandedBlocks:a,visibleStartRow:l,scrollableContainerRef:c,cumulativeOffsets:d}=this.state,f=this.getMemoisedKey(),{lineInformation:g=[],lineBlocks:p=[],blocks:y=[]}=i[f]??{};let x=0,v=1/0;const S=5;if(n&&c.current){const I=c.current,U=this.getStickyHeaderHeight(),$=Math.max(0,I.scrollTop-U);if(d){const V=d[d.length-1]||0,G=d.length-2;x=Math.max(0,this.findLineAtOffset($,d)-S),v=this.findLineAtOffset($+I.clientHeight,d)+S;const B=Math.ceil(I.clientHeight/Ho.ESTIMATED_ROW_HEIGHT);v=Math.max(v,x+B+S),$+I.clientHeight>=V-S*Ho.ESTIMATED_ROW_HEIGHT&&(v=G+S)}else{const V=Math.ceil(I.clientHeight/Ho.ESTIMATED_ROW_HEIGHT);x=Math.max(0,l-S),v=l+V+S}}const E=new Map,k=new Set;let T=0;for(let I=0;I<g.length;I++){const U=p[I];if(r&&U!==void 0)if(a.includes(U))E.set(I,T),T++;else{const $=y[U].endLine===I;!k.has(U)&&$&&(k.add(U),E.set(I,T),T++)}else E.set(I,T),T++}const R=T,M=[];let O=0,A=!1,N=-1;k.clear();for(let I=0;I<g.length;I++){const U=g[I],$=E.get(I);if($!==void 0&&!($<x)){if($>v)break;if(A||(O=d?d[$]||0:$*Ho.ESTIMATED_ROW_HEIGHT,A=!0),N=$,r){const V=p[I];if(V!==void 0){const G=y[V].endLine===I;if(!a.includes(V)&&G){M.push(h.jsx(C.Fragment,{children:this.renderSkippedLineIndicator(y[V].lines,V,U.left.lineNumber,U.right.lineNumber)},I));continue}if(!a.includes(V))continue}}M.push(t?this.renderSplitView(U,I):this.renderInlineView(U,I))}}const D=d?d[d.length-1]||0:R*Ho.ESTIMATED_ROW_HEIGHT,H=d&&N>=0?D-(d[N+1]||D):0;return{diffNodes:M,blocks:y,lineInformation:g,totalRenderedRows:R,topPadding:O,bottomPadding:H,totalContentHeight:D,renderedCount:M.length,debug:{visibleRowStart:x,visibleRowEnd:v,totalRows:R,offsetsLength:d?.length??0,renderedCount:M.length,scrollTop:c.current?.scrollTop??0,headerHeight:this.getStickyHeaderHeight(),contentScrollTop:c.current?Math.max(0,c.current.scrollTop-this.getStickyHeaderHeight()):0,clientHeight:c.current?.clientHeight??0}}};componentDidUpdate(t){if(t.oldValue!==this.props.oldValue||t.newValue!==this.props.newValue||t.compareMethod!==this.props.compareMethod||t.disableWordDiff!==this.props.disableWordDiff||t.linesOffset!==this.props.linesOffset){this.wordDiffCache.clear();const n=this.state.scrollableContainerRef.current;n&&(n.scrollTop=0),this.setState(r=>({...r,isLoading:!0,visibleStartRow:0,cumulativeOffsets:null})),this.memoisedCompute()}}componentDidMount(){if(this.setState(t=>({...t,isLoading:!0})),this.memoisedCompute(),typeof ResizeObserver<"u"&&this.props.infiniteLoading){this.resizeObserver=new ResizeObserver(()=>{requestAnimationFrame(()=>this.recalculateOffsets())});const t=this.state.scrollableContainerRef.current;t&&this.resizeObserver.observe(t)}}componentWillUnmount(){this.resizeObserver?.disconnect()}render=()=>{const{oldValue:t,newValue:n,useDarkTheme:r,leftTitle:i,rightTitle:a,splitView:l,compareMethod:c,hideLineNumbers:d,nonce:f}=this.props;if(typeof c=="string"&&c!==ir.JSON&&(typeof t!="string"||typeof n!="string"))throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,r,f);const g=this.renderDiff();this.props.renderGutter;let p=0,y=0;for(const O of g.lineInformation)O.left.type===yn.ADDED&&y++,O.right.type===yn.ADDED&&y++,O.left.type===yn.REMOVED&&p++,O.right.type===yn.REMOVED&&p++;const x=p+y,v=Math.round(y/x*100),S=[];for(let O=0;O<5;O++)v>O*20?S.push(h.jsx("span",{className:$i(this.styles.block,this.styles.blockAddition)},O)):S.push(h.jsx("span",{className:$i(this.styles.block,this.styles.blockDeletion)},O));const E=this.state.expandedBlocks.length===g.blocks.length,k=this.props.loadingElement,T=this.props.infiniteLoading?{overflowY:"scroll",overflowX:"hidden",height:this.props.infiniteLoading.containerHeight}:{},R=!!this.props.infiniteLoading&&!this.state.cumulativeOffsets,M=h.jsxs("table",{className:$i(this.styles.diffContainer,{[this.styles.splitView]:l,[this.styles.noWrap]:R}),onMouseUp:()=>{const O=document.getElementsByClassName("right");for(let N=0;N<O.length;N++)O.item(N).classList.remove(this.styles.noSelect);const A=document.getElementsByClassName("left");for(let N=0;N<A.length;N++)A.item(N).classList.remove(this.styles.noSelect)},children:[h.jsxs("colgroup",{children:[!this.props.hideLineNumbers&&h.jsx("col",{width:"50px"}),!l&&!this.props.hideLineNumbers&&h.jsx("col",{width:"50px"}),this.props.renderGutter&&h.jsx("col",{width:"50px"}),h.jsx("col",{width:"28px"}),h.jsx("col",{width:"auto"}),l&&h.jsxs(h.Fragment,{children:[!this.props.hideLineNumbers&&h.jsx("col",{width:"50px"}),this.props.renderGutter&&h.jsx("col",{width:"50px"}),h.jsx("col",{width:"28px"}),h.jsx("col",{width:"auto"})]})]}),h.jsx("tbody",{children:g.diffNodes})]});return h.jsxs("div",{style:{...T,position:"relative"},onScroll:this.onScroll,ref:this.state.scrollableContainerRef,children:[(!this.props.hideSummary||i||a)&&h.jsxs("div",{ref:this.stickyHeaderRef,className:this.styles.stickyHeader,children:[!this.props.hideSummary&&h.jsxs("div",{className:this.styles.summary,role:"banner",children:[h.jsx("button",{type:"button",className:this.styles.allExpandButton,onClick:()=>{this.setState({expandedBlocks:E?[]:g.blocks.map(O=>O.index)},()=>this.recalculateOffsets())},children:E?h.jsx(QQ,{}):h.jsx(y4,{})})," ",x,h.jsx("div",{style:{display:"flex",gap:"1px"},children:S}),this.props.summary?h.jsx("span",{children:this.props.summary}):null]}),(i||a)&&h.jsxs("div",{className:this.styles.columnHeaders,children:[h.jsx("div",{className:this.styles.titleBlock,children:i?h.jsx("pre",{className:this.styles.contentText,children:i}):null}),l&&h.jsx("div",{className:this.styles.titleBlock,children:a?h.jsx("pre",{className:this.styles.contentText,children:a}):null})]})]}),this.state.isLoading&&k&&h.jsx(k,{}),this.props.infiniteLoading?h.jsx("div",{style:{height:g.totalContentHeight,position:"relative"},children:h.jsx("div",{style:{position:"absolute",top:g.topPadding,left:0,right:0},children:M})}):M,h.jsx("span",{ref:this.charMeasureRef,style:{position:"absolute",top:0,left:"-9999px",visibility:"hidden",whiteSpace:"pre",fontFamily:"monospace",fontSize:12},"aria-hidden":"true",children:"M"}),this.props.infiniteLoading&&this.props.showDebugInfo&&h.jsxs("div",{style:{position:"fixed",top:10,right:10,background:"rgba(0,0,0,0.85)",color:"#0f0",padding:"10px",fontFamily:"monospace",fontSize:"11px",zIndex:9999,borderRadius:"4px",maxWidth:"300px",lineHeight:1.4},children:[h.jsx("div",{style:{fontWeight:"bold",marginBottom:"5px",color:"#fff"},children:"Debug Info"}),h.jsxs("div",{children:["scrollTop: ",g.debug.scrollTop]}),h.jsxs("div",{children:["headerHeight: ",g.debug.headerHeight]}),h.jsxs("div",{children:["contentScrollTop: ",g.debug.contentScrollTop]}),h.jsxs("div",{children:["clientHeight: ",g.debug.clientHeight]}),h.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[h.jsxs("div",{children:["visibleRowStart: ",g.debug.visibleRowStart]}),h.jsxs("div",{children:["visibleRowEnd: ",g.debug.visibleRowEnd]})]}),h.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[h.jsxs("div",{children:["totalRows: ",g.debug.totalRows]}),h.jsxs("div",{children:["offsetsLength: ",g.debug.offsetsLength]}),h.jsxs("div",{children:["renderedCount: ",g.debug.renderedCount]})]}),h.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[h.jsxs("div",{children:["topPadding: ",g.topPadding.toFixed(0)]}),h.jsxs("div",{children:["bottomPadding: ",g.bottomPadding.toFixed(0)]}),h.jsxs("div",{children:["totalContentHeight: ",g.totalContentHeight.toFixed(0)]})]}),h.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px",color:"#ff0"},children:[h.jsxs("div",{children:["cumulativeOffsets: ",this.state.cumulativeOffsets?"SET":"NULL"]}),h.jsxs("div",{children:["columnWidth: ",this.state.contentColumnWidth?.toFixed(0)??"N/A","px"]}),h.jsxs("div",{children:["charWidth: ",this.state.charWidth?.toFixed(2)??"N/A","px"]}),h.jsxs("div",{children:["charsPerRow: ",this.state.contentColumnWidth&&this.state.charWidth?Math.floor(this.state.contentColumnWidth/this.state.charWidth):"N/A"]})]}),this.state.cumulativeOffsets&&h.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px",color:"#0ff",fontSize:"10px"},children:[h.jsxs("div",{children:["offsets[",g.debug.visibleRowEnd,"]: ",this.state.cumulativeOffsets[g.debug.visibleRowEnd]?.toFixed(0)??"N/A"]}),h.jsxs("div",{children:["offsets[",g.debug.totalRows-1,"]: ",this.state.cumulativeOffsets[g.debug.totalRows-1]?.toFixed(0)??"N/A"]}),h.jsxs("div",{children:["offsets[",g.debug.totalRows,"]: ",this.state.cumulativeOffsets[g.debug.totalRows]?.toFixed(0)??"N/A"]}),h.jsxs("div",{style:{marginTop:"3px"},children:["viewportEnd: ",(g.debug.contentScrollTop+g.debug.clientHeight).toFixed(0)]}),h.jsxs("div",{style:{marginTop:"3px",color:"#f0f"},children:["scrollHeight: ",this.state.scrollableContainerRef.current?.scrollHeight??"N/A"]}),h.jsxs("div",{children:["maxScrollTop: ",(this.state.scrollableContainerRef.current?.scrollHeight??0)-g.debug.clientHeight]})]})]})]})}};function JQ(){return h.jsx("div",{className:"bg-card absolute inset-0 z-20 flex items-center justify-center",children:h.jsx(Gr,{className:"text-muted-foreground size-5 animate-spin"})})}const eX={codeFoldGutter:{cursor:"pointer"},contentText:{fontFamily:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',fontSize:"12px",lineHeight:"1.6"},diffContainer:{"& pre":{fontFamily:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontFamily:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',fontSize:"12px"},gutter:{"& pre":{color:"var(--muted-foreground)",opacity:.7},minWidth:"2.5rem",padding:"0 10px",userSelect:"none"},line:{"&:hover":{background:"color-mix(in oklch, var(--muted) 40%, transparent)"}},lineNumber:{color:"var(--muted-foreground)",opacity:.7},marker:{paddingLeft:"8px",paddingRight:"4px"},titleBlock:{borderBottom:"1px solid var(--border)",fontFamily:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',fontSize:"12px",padding:"10px 12px"},variables:{dark:{addedBackground:"color-mix(in oklch, var(--primary) 18%, transparent)",addedColor:"var(--foreground)",addedGutterBackground:"color-mix(in oklch, var(--primary) 26%, transparent)",addedGutterColor:"var(--muted-foreground)",codeFoldBackground:"var(--muted)",codeFoldContentColor:"var(--muted-foreground)",codeFoldGutterBackground:"var(--muted)",diffViewerBackground:"var(--card)",diffViewerColor:"var(--foreground)",diffViewerTitleBackground:"var(--muted)",diffViewerTitleBorderColor:"var(--border)",diffViewerTitleColor:"var(--foreground)",emptyLineBackground:"var(--card)",gutterBackground:"var(--card)",gutterBackgroundDark:"var(--card)",gutterColor:"var(--muted-foreground)",highlightBackground:"color-mix(in oklch, var(--accent) 30%, transparent)",highlightGutterBackground:"color-mix(in oklch, var(--accent) 40%, transparent)",removedBackground:"color-mix(in oklch, var(--destructive) 16%, transparent)",removedColor:"var(--foreground)",removedGutterBackground:"color-mix(in oklch, var(--destructive) 24%, transparent)",removedGutterColor:"var(--muted-foreground)",wordAddedBackground:"color-mix(in oklch, var(--primary) 40%, transparent)",wordRemovedBackground:"color-mix(in oklch, var(--destructive) 36%, transparent)"}}};function tX({filename:e,hideSummary:t=!1,newContent:n,oldContent:r,showDiffOnly:i=!1,showLoadingOverlay:a=!0,viewMode:l="split"}){return h.jsx(ZQ,{compareMethod:ir.WORDS,hideSummary:t,loadingElement:a?JQ:void 0,newValue:n,oldValue:r,showDiffOnly:i,splitView:l==="split",styles:eX,summary:e,useDarkTheme:!0})}function d8(e){return h.jsx(tX,{...e})}function nX({file:e,onOpenFile:t,onStageToggle:n}){const r=e.isStaged?"staged":"unstaged",{data:i,error:a,isLoading:l}=qG({path:e.path,side:r});return l?h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx(Gr,{className:"text-muted-foreground size-5 animate-spin"})}):a?h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("p",{className:"text-muted-foreground text-sm",children:Sn(a,"Failed to load diff")})}):i?h.jsxs("div",{className:"bg-card flex h-full flex-col overflow-auto rounded-md",children:[h.jsx(pN,{file:e,onOpenFile:()=>t(e),onStageToggle:()=>n(e)}),h.jsx("div",{className:"flex-1 [&>div]:min-h-full",children:h.jsx(d8,{filename:e.path,hideSummary:!0,newContent:i.newContent,oldContent:i.oldContent,viewMode:"split"})})]}):h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("p",{className:"text-muted-foreground text-sm",children:"No diff available"})})}const rX=e=>{const{apiClient:t}=De.getState();return t?t.request(On.DISCARD,e):Promise.reject(new Error("Not connected"))},iX=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:gi().queryKey}),n?.(...i)},...r,mutationFn:rX})};function oX({files:e,onOpenChange:t,open:n}){const r=iX(),i=async()=>{try{await r.mutateAsync({filePaths:e.map(l=>l.path)}),st.success(e.length===1?`Discarded changes in ${e[0].path}`:`Discarded changes in ${e.length} files`),t(!1)}catch(l){st.error(Sn(l,"Failed to discard changes"))}},a=e.length===1;return h.jsx(Vd,{onOpenChange:t,open:n,children:h.jsxs($d,{children:[h.jsxs(Gd,{children:[h.jsx(Wd,{children:a?"Discard changes?":`Discard changes in ${e.length} files?`}),h.jsx(Kd,{children:a?h.jsxs(h.Fragment,{children:["Unstaged changes in"," ",h.jsx("code",{className:"bg-muted rounded px-1.5 py-0.5 text-sm",children:e[0].path})," will be lost and cannot be restored."]}):"Unstaged changes in the selected files will be lost and cannot be restored."})]}),h.jsxs(Yd,{children:[h.jsx(Qd,{children:"Cancel"}),h.jsx(Re,{disabled:r.isPending,onClick:i,variant:"destructive",children:r.isPending?"Discarding…":"Discard changes"})]})]})})}const aX={added:{label:"Added",letter:"A",textClass:"text-primary-foreground"},deleted:{label:"Deleted",letter:"D",textClass:"text-destructive"},modified:{label:"Modified",letter:"M",textClass:"text-amber-500"},unmerged:{label:"Conflict",letter:"!",textClass:"text-amber-500"},untracked:{label:"Untracked",letter:"?",textClass:"text-primary-foreground"}},sX={both_added:"Both added",both_modified:"Both modified",deleted_modified:"Deleted / modified"};function lX({disabled:e,file:t,isSelected:n,onAction:r,onDiscard:i,onSelect:a}){const l=aX[t.status],c=t.path.split("/").pop()??t.path,d=t.path.slice(0,t.path.length-c.length).replace(/\/$/,""),f=p=>{p.stopPropagation(),r(t)},g=p=>{p.stopPropagation(),i?.(t)};return h.jsxs("div",{className:ge("group flex cursor-pointer items-center gap-2 rounded px-2 py-1 transition-colors h-8",n?"bg-muted":"hover:bg-muted/50"),onClick:()=>a?.(t),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),a?.(t))},role:"button",tabIndex:0,children:[h.jsx(Em,{className:"text-primary-foreground size-4 shrink-0",strokeWidth:2}),h.jsxs(Ua,{disableHoverablePopup:!0,children:[h.jsxs(qa,{render:h.jsx("div",{className:"flex min-w-0 flex-1 items-baseline gap-1.5"}),children:[h.jsx("span",{className:"text-foreground truncate text-sm",children:c}),d&&h.jsx("span",{className:"text-muted-foreground truncate text-xs group-hover:hidden",children:d})]}),h.jsx(Va,{className:"pointer-events-none max-w-lg break-all",side:"bottom",children:t.path})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsxs("div",{className:"hidden items-center gap-1 group-hover:flex group-focus-within:flex",children:[i&&h.jsx(Re,{className:"size-5 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:e,onClick:g,size:"icon-xs",title:"Discard changes",variant:"ghost",children:h.jsx(I9,{className:"size-3"})}),h.jsx(Re,{className:"size-5 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:e,onClick:f,size:"icon-xs",title:t.isStaged?"Unstage":"Stage",variant:"ghost",children:t.isStaged?h.jsx(Vx,{className:"size-3"}):h.jsx(es,{className:"size-3"})})]}),h.jsx("span",{className:ge("w-4 text-center font-mono text-xs font-semibold",l.textClass),title:t.conflictType?`Conflict: ${sX[t.conflictType]}`:l.label,children:l.letter})]})]})}function B1(e){e.stopPropagation()}function H1({disabled:e,files:t,isFileSelected:n,label:r,onDiscardFile:i,onDiscardGroup:a,onFileAction:l,onFileSelect:c,onGroupAction:d,onOpenAll:f,openAllLabel:g,variant:p}){const[y,x]=C.useState(!0);if(t.length===0)return null;const v=p==="stage"?es:Vx,S=y?Hd:M9;return h.jsxs("section",{className:"flex flex-col",children:[h.jsxs("div",{"aria-expanded":y,className:"h-8 group hover:bg-muted/50 flex cursor-pointer items-center justify-between rounded px-1 py-1.5 transition-colors",onClick:()=>x(E=>!E),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),x(k=>!k))},role:"button",tabIndex:0,children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(S,{className:"text-muted-foreground size-3.5",strokeWidth:2.5}),h.jsx("h3",{className:"text-muted-foreground text-sm font-bold",children:r}),h.jsx("span",{className:"text-muted-foreground bg-muted ml-1 rounded px-1.5 py-0.5 text-xs font-medium",children:t.length})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[f&&h.jsx(Re,{className:"size-5 opacity-0 transition-colors group-hover:opacity-100 focus:opacity-100 hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground disabled:opacity-0",onClick:E=>{B1(E),f()},size:"icon-xs",title:g??"Open all",variant:"ghost",children:h.jsx(TU,{className:"size-3"})}),a&&h.jsx(Re,{className:"size-5 opacity-0 transition-colors group-hover:opacity-100 focus:opacity-100 hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground disabled:opacity-0",disabled:e,onClick:E=>{B1(E),a()},size:"icon-xs",title:"Discard all changes",variant:"ghost",children:h.jsx(I9,{className:"size-3"})}),d&&h.jsx(Re,{className:"size-5 opacity-0 transition-colors group-hover:opacity-100 focus:opacity-100 hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground disabled:opacity-0",disabled:e,onClick:E=>{B1(E),d()},size:"icon-xs",title:p==="stage"?"Stage all":"Unstage all",variant:"ghost",children:h.jsx(v,{className:"size-3"})})]})]}),y&&h.jsx(Sx,{delay:500,children:h.jsx("div",{className:"flex flex-col",children:t.map(E=>h.jsx(lX,{disabled:e,file:E,isSelected:n?.(E),onAction:l,onDiscard:i,onSelect:c},cp(E)))})})]})}const cX=e=>{const{apiClient:t}=De.getState();return t?t.request(On.DIFFS,e):Promise.reject(new Error("Not connected"))},uX=e=>({placeholderData:YP,queryFn:()=>cX(e),queryKey:["vc","diffs",e.side,...e.paths],staleTime:0}),dX=({enabled:e=!0,paths:t,queryConfig:n,side:r})=>er({...uX({paths:t,side:r}),enabled:e&&t.length>0,...n}),fX=300;function T4({emptyMessage:e,files:t,onOpenFile:n,onStageToggle:r,side:i,title:a}){const l=C.useMemo(()=>t.map(v=>v.path),[t]),{data:c,error:d,isPending:f}=dX({paths:l,side:i}),g=C.useRef(!1),[p,y]=C.useState(!0);if(C.useEffect(()=>{if(g.current||!c)return;g.current=!0;const v=setTimeout(()=>y(!1),fX);return()=>clearTimeout(v)},[c]),t.length===0)return h.jsx("div",{className:"flex h-full items-center justify-center bg-card rounded-md",children:h.jsx("p",{className:"text-secondary-foreground text-sm",children:e})});if(d)return h.jsx("div",{className:"flex h-full items-center justify-center bg-card rounded-md",children:h.jsx("p",{className:"text-secondary-foreground text-sm",children:Sn(d,"Failed to load diffs")})});const x=f&&!c||p;return h.jsxs("div",{className:"bg-card relative flex h-full flex-col overflow-auto rounded-md",children:[c&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"border-border bg-muted flex items-center gap-2 border-b px-4 py-2 text-sm font-semibold",children:[h.jsx("span",{className:"text-foreground",children:a}),h.jsxs("span",{className:"text-muted-foreground",children:[t.length," file",t.length===1?"":"s"]})]}),h.jsx("div",{className:"flex flex-col gap-4",children:c.diffs.map(v=>{const S=t.find(E=>E.path===v.path);return S?h.jsxs("div",{className:"flex flex-col",children:[h.jsx(pN,{file:S,onOpenFile:()=>n(S),onStageToggle:()=>r(S)}),h.jsx(d8,{filename:v.path,hideSummary:!0,newContent:v.newContent,oldContent:v.oldContent,showDiffOnly:!0,showLoadingOverlay:!1,viewMode:"split"})]},`${i}:${v.path}`):null})})]}),x&&h.jsx("div",{className:"bg-card absolute inset-0 z-30 flex items-center justify-center",children:h.jsx(Gr,{className:"text-muted-foreground size-5 animate-spin"})})]})}function hX({isCommitting:e,onConfirm:t,onOpenChange:n,open:r}){return h.jsx(Vd,{onOpenChange:n,open:r,children:h.jsxs($d,{children:[h.jsxs(Gd,{children:[h.jsx(Wd,{children:"There are no staged changes to commit"}),h.jsx(Kd,{children:"Would you like to stage all your changes and commit them directly?"})]}),h.jsxs(Yd,{children:[h.jsx(Qd,{children:"Cancel"}),h.jsx(Re,{disabled:e,onClick:t,children:e?"Committing…":"Stage all & commit"})]})]})})}async function ju(e,t){try{await e}catch(n){st.error(Sn(n,t))}}function pX(){const e=qs(),t=ci(xe=>xe.isAuthorized),n=De(xe=>xe.selectedProject),{data:r,isFetching:i,isLoading:a,refetch:l}=Xx(),[c,d]=C.useState(),[f,g]=C.useState("single"),[p,y]=C.useState(),[x,v]=C.useState(""),[S,E]=C.useState(!1),k=NG(),T=zG(),R=AG(),M=DG(),O=dN(),A=OG(),N=LG(),{staged:D,unmerged:H,unstaged:I}=C.useMemo(()=>V9(r),[r]),U=C.useMemo(()=>c?[...H,...D,...I].find(xe=>cp(xe)===c):void 0,[c,D,H,I]),$=k.isPending||T.isPending||R.isPending||M.isPending||O.isPending||A.isPending||N.isPending;if(a)return h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx(Gr,{className:"text-muted-foreground size-5 animate-spin"})});if(!r?.initialized)return h.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4",children:[h.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[h.jsx("h2",{className:"text-foreground text-lg font-semibold",children:"Version control not initialized"}),h.jsx("p",{className:"text-muted-foreground text-sm",children:"Initialize to start tracking changes in this project."})]}),h.jsx(lb,{})]});const V=xe=>ju(k.mutateAsync({filePaths:[xe.path]}),"Failed to stage file"),G=xe=>ju(T.mutateAsync({filePaths:[xe.path]}),"Failed to unstage file"),B=()=>{const xe=I.map(We=>We.path);xe.length!==0&&ju(k.mutateAsync({filePaths:xe}),"Failed to stage all")},F=xe=>ju(k.mutateAsync({filePaths:xe}),"Failed to stage"),q=()=>F(H.map(xe=>xe.path)),W=async()=>{try{await A.mutateAsync(),st.success("Merge aborted")}catch(xe){st.error(Sn(xe,"Failed to abort merge"))}},ie=()=>ju(T.mutateAsync({}),"Failed to unstage all"),_=async xe=>{try{return await R.mutateAsync({message:xe}),st.success("Committed"),!0}catch(We){return Tu(We,"Failed to commit",e,{projectPath:n}),!1}},z=async xe=>{try{return await N.mutateAsync({message:xe}),st.success("Merge committed"),!0}catch(We){return Tu(We,"Failed to commit merge",e,{projectPath:n}),!1}},Y=async()=>{const xe=x.trim();if(!xe)return;if(r.mergeInProgress){await z(xe)&&v("");return}if(D.length===0&&I.length>0){E(!0);return}await _(xe)&&v("")},L=async()=>{const xe=x.trim();if(xe)try{await k.mutateAsync({}),await _(xe)&&(v(""),E(!1))}catch(We){Tu(We,"Failed to stage & commit",e,{projectPath:n})}},ee=async()=>{try{const xe=await M.mutateAsync({setUpstream:!r.trackingBranch});st.success(xe.alreadyUpToDate?"Already up to date":`Pushed ${xe.branch}`)}catch(xe){Tu(xe,"Failed to push",e)}},te=async()=>{try{const xe=await O.mutateAsync({});xe.conflicts&&xe.conflicts.length>0?st.error(`Pull had conflicts in ${xe.conflicts.length} file(s)`):st.success(xe.alreadyUpToDate?"Already up to date":`Pulled ${xe.branch}`)}catch(xe){Tu(xe,"Failed to pull",e)}},Q=xe=>{d(cp(xe)),g("single")},de=xe=>cp(xe)===c&&f==="single",ue=()=>g("multi-staged"),Se=()=>g("multi-unstaged"),Ee=xe=>{e(`/contexts?path=${encodeURIComponent(xe.path)}`)},ze=xe=>xe.isStaged?G(xe):V(xe),Ye=xe=>y([xe]),Me=()=>{I.length>0&&y(I)},Ie=D.length+I.length+H.length>0;return h.jsxs("div",{className:"flex h-full w-full",children:[h.jsxs("aside",{className:"border-border flex h-full w-80 shrink-0 flex-col gap-2",children:[h.jsx(FG,{ahead:r.ahead,behind:r.behind,branch:r.branch,hasTracking:!!r.trackingBranch,isAborting:A.isPending,isAuthenticated:t,isPulling:O.isPending,isPushing:M.isPending,mergeInProgress:r.mergeInProgress,onAbortMerge:W,onPull:te,onPush:ee}),h.jsx(BG,{canCommit:D.length>0||I.length>0,isCommitting:R.isPending,message:x,onCommit:Y,onMessageChange:v}),h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto",children:[h.jsx(H1,{disabled:$,files:H,isFileSelected:de,label:"Merge Changes",onFileAction:V,onFileSelect:Q,onGroupAction:q,variant:"stage"}),h.jsx(H1,{disabled:$,files:D,isFileSelected:de,label:"Staged Changes",onFileAction:G,onFileSelect:Q,onGroupAction:ie,onOpenAll:ue,openAllLabel:"Open all staged changes",variant:"unstage"}),h.jsx(H1,{disabled:$,files:I,isFileSelected:de,label:"Changes",onDiscardFile:Ye,onDiscardGroup:Me,onFileAction:V,onFileSelect:Q,onGroupAction:B,onOpenAll:Se,openAllLabel:"Open all changes",variant:"stage"})]})]}),h.jsxs("main",{className:"flex h-full flex-1 flex-col overflow-hidden pl-4",children:[f==="multi-staged"&&h.jsx(T4,{emptyMessage:"No staged changes",files:D,onOpenFile:Ee,onStageToggle:ze,side:"staged",title:"Staged Changes"}),f==="multi-unstaged"&&h.jsx(T4,{emptyMessage:"No changes",files:I,onOpenFile:Ee,onStageToggle:ze,side:"unstaged",title:"Changes"}),f==="single"&&(U?h.jsx(nX,{file:U,onOpenFile:Ee,onStageToggle:ze}):Ie?h.jsxs("div",{className:"bg-card text-secondary-foreground flex h-full flex-col items-center justify-center gap-3 rounded-md text-sm",children:[h.jsx(Em,{className:"size-8",strokeWidth:1.25}),h.jsx("p",{children:"Select a file to view changes"})]}):h.jsxs("div",{className:"flex h-full flex-col items-center justify-center rounded-md bg-card",children:[h.jsx("img",{alt:"",className:"size-30 mb-6",src:CG}),h.jsxs("div",{className:"flex flex-col items-center gap-1 text-center mb-5",children:[h.jsx("p",{className:"text-foreground text-base font-medium",children:"No changes detected"}),h.jsx("p",{className:"text-muted-foreground max-w-xs text-xs",children:"Your workspace is up to date. Any modifications to your files will appear here."})]}),h.jsx(Re,{className:"w-37",disabled:i,onClick:()=>l(),variant:"secondary",children:"Refresh"})]}))]}),h.jsx(oX,{files:p??[],onOpenChange:xe=>{xe||y(void 0)},open:p!==void 0&&p.length>0}),h.jsx(hX,{isCommitting:k.isPending||R.isPending,onConfirm:L,onOpenChange:E,open:S})]})}function mX(){return h.jsx("div",{className:"h-full w-full",children:h.jsx(pX,{})})}function pr({className:e,...t}){return h.jsx("div",{"data-slot":"skeleton",className:ge("animate-pulse rounded-md bg-muted",e),...t})}const gX=["rules","hook","mcp","skill"];new Set(gX);const yX=new Set(["hook","mcp","skill"]);function xX(e){return yX.has(e)}const bX=()=>{const{apiClient:e}=De.getState();return e?e.request(Dx.GET_AGENTS):Promise.reject(new Error("Not connected"))},vX=()=>({gcTime:1/0,queryFn:bX,queryKey:["connectors","agents"],staleTime:1/0}),wX=({queryConfig:e}={})=>er({...vX(),...e}),SX=()=>{const{apiClient:e}=De.getState();return e?e.request(Dx.LIST):Promise.reject(new Error("Not connected"))},f8=()=>({queryFn:SX,queryKey:["connectors","list"]}),CX=({queryConfig:e}={})=>er({...f8(),...e}),EX=({agentId:e,connectorType:t})=>{const{apiClient:n}=De.getState();return n?n.request(Dx.INSTALL,{agentId:e,connectorType:t}):Promise.reject(new Error("Not connected"))},kX=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:f8().queryKey}),n?.(...i)},...r,mutationFn:EX})},TX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAmp%3c/title%3e%3cpath%20d='M15.087%2023.18L12.03%2024l-2.097-7.823-5.738%205.738-2.251-2.251%205.718-5.719-7.769-2.082.82-3.057%2011.294%203.08%203.08%2011.295z'%3e%3c/path%3e%3cpath%20d='M19.505%2018.762l-3.057.82-2.564-9.573-9.572-2.564.819-3.057%2011.295%203.079%203.08%2011.295z'%3e%3c/path%3e%3cpath%20d='M23.893%2014.374l-3.057.82-2.565-9.572L8.7%203.057%209.52%200l11.295%203.08%203.079%2011.294z'%3e%3c/path%3e%3c/svg%3e",NX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAntigravity%3c/title%3e%3cpath%20d='M21.751%2022.607c1.34%201.005%203.35.335%201.508-1.508C17.73%2015.74%2018.904%201%2012.037%201%205.17%201%206.342%2015.74.815%2021.1c-2.01%202.009.167%202.511%201.507%201.506%205.192-3.517%204.857-9.714%209.715-9.714%204.857%200%204.522%206.197%209.714%209.715z'%3e%3c/path%3e%3c/svg%3e",RX="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%23fafafa'%20d='M9.972%2013.193h2.577q.187%200%20.277-.09t.091-.294V10.47q0-.324.133-.59.135-.27.36-.424a1%201%200%200%201%20.099-.06%201%201%200%200%201-.1-.058%201.1%201.1%200%200%201-.359-.424%201.3%201.3%200%200%201-.133-.59v-2.33q0-.202-.091-.293t-.277-.089H9.972a.38.38%200%200%201-.294-.124.4.4%200%200%201-.108-.281q.002-.176.131-.293a.46.46%200%200%201%20.313-.111h2.775c.36%200%20.642.097.836.288q.293.29.294.832V8.24q0%20.39.152.562.148.168.555.178a.4.4%200%200%201%20.27.128.41.41%200%200%201%20.104.287.44.44%200%200%201-.1.282.34.34%200%200%201-.277.132c-.266.006-.452.066-.55.177q-.151.174-.152.573v2.318c0%20.235-.043.44-.128.607a.85.85%200%200%201-.389.387%201.3%201.3%200%200%201-.534.124V14h-2.854a.45.45%200%200%201-.315-.118.38.38%200%200%201-.129-.286q0-.164.109-.282a.38.38%200%200%201%20.293-.123zM1.103%209.108a.4.4%200%200%201%20.276-.128q.4-.008.55-.177.15-.173.151-.562V5.923q.002-.543.294-.832c.195-.191.477-.288.836-.288h2.775q.188%200%20.313.111a.37.37%200%200%201%20.131.293.4.4%200%200%201-.108.281.38.38%200%200%201-.293.123H3.45q-.186%200-.277.09t-.092.292v2.33c0%20.213-.044.413-.133.59a1.1%201.1%200%200%201-.359.424%201%201%200%200%201-.1.059%201%201%200%200%201%20.1.059q.225.156.359.423t.133.59v2.34q0%20.203.092.293.088.09.277.089h2.577a.38.38%200%200%201%20.294.123q.108.12.108.281a.38.38%200%200%201-.13.286.45.45%200%200%201-.314.118l-2.775-.003a1.4%201.4%200%200%201-.613-.126.87.87%200%200%201-.388-.387%201.34%201.34%200%200%201-.129-.608v-2.318q0-.4-.151-.572-.151-.168-.55-.177a.35.35%200%200%201-.278-.132.42.42%200%200%201-.102-.28q0-.173.103-.287'/%3e%3cpath%20fill='%23fafafa'%20d='M5.437%2010.36a.986.986%200%200%201-.994-.975c0-.538.446-.976.994-.976s.994.438.994.976a.986.986%200%200%201-.994.976M10.562%208.41c.548%200%20.994.437.994.975a.986.986%200%200%201-.994.976.986.986%200%200%201-.994-.976c0-.538.446-.976.994-.976M8.74%202c.37%200%20.446.15.446.275v.034q0%20.034-.009.201-.01.162-.017.549-.018.378-.044%201.06c0%20.106-.065.233-.375.233-.311%200-.376-.126-.376-.23l-.07-1.835v-.003c0-.13.078-.284.446-.284M7.256%202c.369%200%20.446.15.446.275v.034q0%20.034-.01.201-.007.162-.017.549-.017.378-.043%201.06c0%20.106-.065.233-.376.233-.31%200-.375-.126-.375-.23l-.07-1.835v-.003C6.81%202.154%206.887%202%207.256%202'/%3e%3c/svg%3e",AX="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%23fafafa'%20d='M9.972%2013.193h2.577q.187%200%20.277-.09t.091-.294V10.47q0-.324.133-.59.135-.27.36-.424a1%201%200%200%201%20.099-.06%201%201%200%200%201-.1-.058%201.1%201.1%200%200%201-.359-.424%201.3%201.3%200%200%201-.133-.59v-2.33q0-.202-.091-.293t-.277-.089H9.972a.38.38%200%200%201-.294-.124.4.4%200%200%201-.108-.281q.002-.176.131-.293a.46.46%200%200%201%20.313-.111h2.775c.36%200%20.642.097.836.288q.293.29.294.832V8.24q0%20.39.152.562.148.168.555.178a.4.4%200%200%201%20.27.128.41.41%200%200%201%20.104.287.44.44%200%200%201-.1.282.34.34%200%200%201-.277.132c-.266.006-.452.066-.55.177q-.151.174-.152.573v2.318c0%20.235-.043.44-.128.607a.85.85%200%200%201-.389.387%201.3%201.3%200%200%201-.534.124V14h-2.854a.45.45%200%200%201-.315-.118.38.38%200%200%201-.129-.286q0-.164.109-.282a.38.38%200%200%201%20.293-.123zM1.103%209.108a.4.4%200%200%201%20.276-.128q.4-.008.55-.177.15-.173.151-.562V5.923q.002-.543.294-.832c.195-.191.477-.288.836-.288h2.775q.188%200%20.313.111a.37.37%200%200%201%20.131.293.4.4%200%200%201-.108.281.38.38%200%200%201-.293.123H3.45q-.186%200-.277.09t-.092.292v2.33c0%20.213-.044.413-.133.59a1.1%201.1%200%200%201-.359.424%201%201%200%200%201-.1.059%201%201%200%200%201%20.1.059q.225.156.359.423t.133.59v2.34q0%20.203.092.293.088.09.277.089h2.577a.38.38%200%200%201%20.294.123q.108.12.108.281a.38.38%200%200%201-.13.286.45.45%200%200%201-.314.118l-2.775-.003a1.4%201.4%200%200%201-.613-.126.87.87%200%200%201-.388-.387%201.34%201.34%200%200%201-.129-.608v-2.318q0-.4-.151-.572-.151-.168-.55-.177a.35.35%200%200%201-.278-.132.42.42%200%200%201-.102-.28q0-.173.103-.287'/%3e%3cpath%20fill='%23fafafa'%20d='M5.437%2010.36a.986.986%200%200%201-.994-.975c0-.538.446-.976.994-.976s.994.438.994.976a.986.986%200%200%201-.994.976M10.562%208.41c.548%200%20.994.437.994.975a.986.986%200%200%201-.994.976.986.986%200%200%201-.994-.976c0-.538.446-.976.994-.976M8.74%202c.37%200%20.446.15.446.275v.034q0%20.034-.009.201-.01.162-.017.549-.018.378-.044%201.06c0%20.106-.065.233-.375.233-.311%200-.376-.126-.376-.23l-.07-1.835v-.003c0-.13.078-.284.446-.284M7.256%202c.369%200%20.446.15.446.275v.034q0%20.034-.01.201-.007.162-.017.549-.017.378-.043%201.06c0%20.106-.065.233-.376.233-.31%200-.375-.126-.375-.23l-.07-1.835v-.003C6.81%202.154%206.887%202%207.256%202'/%3e%3c/svg%3e",N4="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='M4.709%2015.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0%2011.784l.055-.352.48-.321.686.06%201.52.103%202.278.158%201.652.097%202.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686%201.908%201.476%202.491%201.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97%202.97%200%2001-.104-.729L6.283.134%206.696%200l.996.134.42.364.62%201.414%201.002%202.229%201.555%203.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286%201.851-.559%202.903-.364%201.942h.212l.243-.242.985-1.306%201.652-2.064.73-.82.85-.904.547-.431h1.033l.76%201.129-.34%201.166-1.064%201.347-.881%201.142-1.264%201.7-.79%201.36.073.11.188-.02%202.856-.606%201.543-.28%201.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061%201.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093%201.068%202.006%201.81%202.509%202.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649%202.345%203.521.122%201.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674%207.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434%201.967-2.18%202.945-1.726%201.845-.414.164-.717-.37.067-.662.401-.589%202.388-3.036%201.44-1.882.93-1.086-.006-.158h-.055L4.132%2018.56l-1.13.146-.487-.456.061-.746.231-.243%201.908-1.312-.006.006z'%3e%3c/path%3e%3c/svg%3e",jX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCline%3c/title%3e%3cpath%20d='M17.035%203.991c2.75%200%204.98%202.24%204.98%205.003v1.667l1.45%202.896a1.01%201.01%200%2001-.002.909l-1.448%202.864v1.668c0%202.762-2.23%205.002-4.98%205.002H7.074c-2.751%200-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01%201.01%200%2001-.003-.927l1.482-2.887V8.994c0-2.763%202.23-5.003%204.98-5.003h9.962zM8.265%209.6a2.274%202.274%200%2000-2.274%202.274v4.042a2.274%202.274%200%20004.547%200v-4.042A2.274%202.274%200%20008.265%209.6zm7.326%200a2.274%202.274%200%2000-2.274%202.274v4.042a2.274%202.274%200%20104.548%200v-4.042A2.274%202.274%200%200015.59%209.6z'%3e%3c/path%3e%3cpath%20d='M12.054%205.558a2.779%202.779%200%20100-5.558%202.779%202.779%200%20000%205.558z'%3e%3c/path%3e%3c/svg%3e",OX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",MX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eCursor%3c/title%3e%3cpath%20d='M22.106%205.68L12.5.135a.998.998%200%2000-.998%200L1.893%205.68a.84.84%200%2000-.419.726v11.186c0%20.3.16.577.42.727l9.607%205.547a.999.999%200%2000.998%200l9.608-5.547a.84.84%200%2000.42-.727V6.407a.84.84%200%2000-.42-.726zm-.603%201.176L12.228%2022.92c-.063.108-.228.064-.228-.061V12.34a.59.59%200%2000-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264%200%20.428.286.296.514z'%3e%3c/path%3e%3c/svg%3e",LX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eGemini%3c/title%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%3e%3c/path%3e%3c/svg%3e",_X="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eGithubCopilot%3c/title%3e%3cpath%20d='M19.245%205.364c1.322%201.36%201.877%203.216%202.11%205.817.622%200%201.2.135%201.592.654l.73.964c.21.278.323.61.323.955v2.62c0%20.339-.173.669-.453.868C20.239%2019.602%2016.157%2021.5%2012%2021.5c-4.6%200-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654%201.593-.654l.029-.297c.25-2.446.81-4.213%202.082-5.52%202.461-2.54%205.71-2.851%207.146-2.864h.198c1.436.013%204.685.323%207.146%202.864zm-7.244%204.328c-.284%200-.613.016-.962.05-.123.447-.305.85-.57%201.108-1.05%201.023-2.316%201.18-2.994%201.18-.638%200-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882%2065.882%200%2000-.063%202.884l-.002.48c-.002.563-.005%201.126-.013%201.69.002.326.204.63.51.765%202.482%201.102%204.83%201.657%206.99%201.657%202.156%200%204.504-.555%206.985-1.657a.854.854%200%2000.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677%200-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525%204.013c.539%200%20.976.426.976.95v1.753c0%20.525-.437.95-.976.95a.964.964%200%2001-.976-.95v-1.752c0-.525.437-.951.976-.951zm5%200c.539%200%20.976.426.976.95v1.753c0%20.525-.437.95-.976.95a.964.964%200%2001-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635%205.087c-1.05.102-1.935.438-2.385.906-.975%201.037-.765%203.668-.21%204.224.405.394%201.17.657%201.995.657h.09c.649-.013%201.785-.176%202.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63%201.813-.03%201.037.24%202.06.675%202.47.968.957%202.136%201.104%202.776%201.11h.044c.825%200%201.59-.263%201.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12%207.615c-.24%200-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94%202.94%200%2001-.014.25c.225-.022.425-.027.612-.028h.366c.187%200%20.387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29%209.29%200%2000-.84-.044z'%3e%3c/path%3e%3c/svg%3e",DX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eJunie%3c/title%3e%3cpath%20d='M24%209.333C24%2018.666%2020%2024%209.333%2024H8v-8h1.333C14%2016%2016%2014%2016%209.333V8h8v1.333zM8%2016H0V8h8v8zM16%208H8V0h8v8z'%3e%3c/path%3e%3c/svg%3e",IX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eKilo%20Code%3c/title%3e%3cpath%20d='M0%200v24h24V0H0zm22.222%2022.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89%2017.83v-2.794h1.778v2.222zm4%200h-1.778v-2.222h-2.222v-1.778h2.793l1.207%201.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333%2017.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206%201.207v2.793h2.014zm-11.556-2h2.222l1.778%201.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4%200H9.333v-2h1.778v2z'%3e%3c/path%3e%3c/svg%3e",zX="data:image/svg+xml,%3csvg%20fill='none'%20viewBox='24%2020%2047%2057'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20d='m33.8075%2063.4223c-5.7924%2012.8272%206.545%2016.0468%2015.6448%208.5396%202.6776%208.4172%2012.705%202.1354%2016.31-4.3924%207.9276-14.3847%204.725-29.0499%203.9025-32.0774-5.635-20.6324-33.8098-20.6675-38.6573.105-1.1375%203.64-1.155%207.77-1.785%2012.0575-.315%202.17-.56%203.5525-1.3825%205.8273-.49%201.3128-1.1375%202.4676-2.1875%204.4275-1.61%203.0453-.9275%208.9077%207.4025%205.8628l.7875-.3499z'%20fill='%23fff'/%3e%3cg%20fill='%23000'%3e%3cpath%20d='m50.5406%2044.4358c-2.3099%200-2.6599-2.765-2.6599-4.41%200-1.4875.2625-2.6599.7702-3.4125.4374-.6649%201.0849-.9975%201.8897-.9975.8052%200%201.5051.3326%201.995%201.015.56.7701.8576%201.9425.8576%203.395%200%202.765-1.0672%204.41-2.8348%204.41z'/%3e%3cpath%20d='m60.0575%2044.4358c-2.3099%200-2.6598-2.765-2.6598-4.41%200-1.4875.2624-2.6599.7701-3.4125.4374-.6649%201.0849-.9975%201.8897-.9975.8052%200%201.5051.3326%201.995%201.015.5601.7701.8576%201.9425.8576%203.395%200%202.765-1.0672%204.41-2.8348%204.41z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",PX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eOpenClaw%3c/title%3e%3cg%20clip-path='url(%23a)'%3e%3cpath%20d='M9.046%207.104a.527.527%200%20110%201.055.527.527%200%20010-1.055z'%3e%3c/path%3e%3cpath%20d='M15.376%207.104a.528.528%200%20110%201.056.528.528%200%20010-1.056z'%3e%3c/path%3e%3cpath%20clip-rule='evenodd'%20d='M16.877%201.912c.58-.27%201.14-.323%201.616-.037a.317.317%200%2001-.326.542c-.227-.136-.547-.153-1.022.068-.352.165-.765.45-1.234.866%202.683%201.17%204.4%203.5%205.148%205.921a6.421%206.421%200%2000-.704.184c-.578.016-1.174.204-1.502.735-.338.55-.268%201.276.072%202.069l.005.012.007.014c.523%201.045%201.318%201.91%202.2%202.284-.912%203.274-3.44%206.144-5.972%206.988v2.109h-2.11v-2.11c-1.043.417-2.086.01-2.11%200v2.11h-2.11v-2.11c-2.531-.843-5.061-3.713-5.973-6.987.882-.373%201.678-1.238%202.2-2.284l.007-.014.006-.012c.34-.793.41-1.518.071-2.069-.327-.531-.923-.719-1.503-.735a6.409%206.409%200%2000-.704-.183c.749-2.421%202.466-4.751%205.149-5.922-.47-.416-.88-.701-1.234-.866-.474-.221-.794-.204-1.021-.068a.318.318%200%2001-.435-.109.317.317%200%2001.109-.433c.476-.286%201.036-.233%201.615.037.49.229%201.031.628%201.621%201.182A9.924%209.924%200%200112%202.568c1.199%200%202.284.19%203.256.526.59-.554%201.13-.953%201.62-1.182zM8.835%206.577a1.266%201.266%200%20100%202.532%201.266%201.266%200%20000-2.532zm6.33%200a1.267%201.267%200%20100%202.533%201.267%201.267%200%20000-2.533z'%3e%3c/path%3e%3cpath%20d='M.395%2013.118c-.966-1.932-.163-3.863%202.41-3.365v-.001l.05.01c.084.018.17.038.26.06.033.009.067.017.1.027.084.022.168.048.255.076l.09.027c.528%200%20.95.158%201.16.501.212.343.212.87-.105%201.61-.085.17-.178.333-.276.489l-.01.017a4.967%204.967%200%2001-.62.791l-.019.02c-1.092%201.117-2.496%201.336-3.295-.262z'%3e%3c/path%3e%3cpath%20d='M21.193%209.753c2.574-.5%203.378%201.433%202.411%203.365-.58%201.159-1.476%201.361-2.342.96l-.011-.005a2.419%202.419%200%2001-.114-.056l-.019-.01a2.751%202.751%200%2001-.115-.067l-.023-.014c-.035-.022-.071-.044-.106-.068l-.05-.035c-.55-.388-1.062-1.007-1.44-1.76-.276-.647-.311-1.132-.174-1.472.176-.439.636-.639%201.23-.639.032-.011.066-.02.099-.03.08-.026.16-.05.238-.072l.117-.03a5.502%205.502%200%2001.3-.067z'%3e%3c/path%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='b'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='c'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='d'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='e'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='f'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3cclipPath%20id='a'%3e%3cpath%20d='M0%200h24v24H0z'%3e%3c/path%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",FX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eopencode%3c/title%3e%3cpath%20d='M16%206H8v12h8V6zm4%2016H4V2h16v20z'%3e%3c/path%3e%3c/svg%3e",BX="/assets/qoder-connector-D9_pSbd_.svg",HX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eQwen%3c/title%3e%3cpath%20d='M12.604%201.34c.393.69.784%201.382%201.174%202.075a.18.18%200%2000.157.091h5.552c.174%200%20.322.11.446.327l1.454%202.57c.19.337.24.478.024.837-.26.43-.513.864-.76%201.3l-.367.658c-.106.196-.223.28-.04.512l2.652%204.637c.172.301.111.494-.043.77-.437.785-.882%201.564-1.335%202.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099%200%2000-.081.05%20575.097%20575.097%200%2001-2.705%204.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537%200%2001-.465-.271l-1.335-2.323a.09.09%200%2000-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543%200%2001-.002-.54l1.207-2.12a.198.198%200%20000-.197%20550.951%20550.951%200%2001-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625%201.387-2.436.132-.234.304-.334.584-.335a338.3%20338.3%200%20012.589-.001.124.124%200%2000.107-.063l2.806-4.895a.488.488%200%2001.422-.246c.524-.001%201.053%200%201.583-.006L11.704%201c.341-.003.724.032.9.34zm-3.432.403a.06.06%200%2000-.052.03L6.254%206.788a.157.157%200%2001-.135.078H3.253c-.056%200-.07.025-.041.074l5.81%2010.156c.025.042.013.062-.034.063l-2.795.015a.218.218%200%2000-.2.116l-1.32%202.31c-.044.078-.021.118.068.118l5.716.008c.046%200%20.08.02.104.061l1.403%202.454c.046.081.092.082.139%200l5.006-8.76.783-1.382a.055.055%200%2001.096%200l1.424%202.53a.122.122%200%2000.107.062l2.763-.02a.04.04%200%2000.035-.02.041.041%200%20000-.04l-2.9-5.086a.108.108%200%20010-.113l.293-.507%201.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059%200-.073-.026-.043-.077l1.434-2.505a.107.107%200%20000-.114L9.225%201.774a.06.06%200%2000-.053-.031zm6.29%208.02c.046%200%20.058.02.034.06l-.832%201.465-2.613%204.585a.056.056%200%2001-.05.029.058.058%200%2001-.05-.029L8.498%209.841c-.02-.034-.01-.052.028-.054l.216-.012%206.722-.012z'%3e%3c/path%3e%3c/svg%3e",UX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eRooCode%3c/title%3e%3cpath%20d='M20.113%205.5l-.442%201.557a.157.157%200%2001-.196.106l-7.414-2.157a.16.16%200%2000-.143.028l-7.342%205.74a.159.159%200%2001-.074.032l-4.37.656a.154.154%200%2000-.132.162l.02.245c.005.078.071.14.152.141l5.074.128.058.002%203.75-1.953a.16.16%200%2001.164.01l2.657%201.847a.152.152%200%2001.066.125l-.023%202.45c0%20.032.01.063.028.089l3.737%205.227c.03.04.077.065.129.065h1.182a.153.153%200%2000.14-.224l-2.664-4.919a.15.15%200%2001.005-.152l1.389-2.169a.156.156%200%2001.062-.055l4.965-2.456a.16.16%200%2001.158.01l1.418.921a.16.16%200%2000.087.026h1.289c.125%200%20.2-.136.13-.237l-3.578-5.29c-.074-.109-.246-.082-.282.044z'%3e%3c/path%3e%3c/svg%3e",qX="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eTRAE%3c/title%3e%3cpath%20d='M24%2020.541H3.428v-3.426H0V3.4h24V20.54zM3.428%2017.115h17.144V6.827H3.428v10.288zm8.573-5.196l-2.425%202.424-2.424-2.424%202.424-2.424%202.425%202.424zm6.857-.001l-2.424%202.423-2.425-2.423%202.425-2.425%202.424%202.425z'%3e%3c/path%3e%3c/svg%3e",VX="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23fafafa'%3e%3ctitle%3eWarp%3c/title%3e%3cpath%20d='M12.035%202.723h9.253A2.712%202.712%200%200%201%2024%205.435v10.529a2.712%202.712%200%200%201-2.712%202.713H8.047Zm-1.681%202.6L6.766%2019.677h5.598l-.399%201.6H2.712A2.712%202.712%200%200%201%200%2018.565V8.036a2.712%202.712%200%200%201%202.712-2.712Z'/%3e%3c/svg%3e",$X="data:image/svg+xml,%3csvg%20fill='%23fafafa'%20fill-rule='evenodd'%20height='56'%20viewBox='0%200%2024%2024'%20width='56'%20xmlns='http://www.w3.org/2000/svg'%20style='flex:%200%200%20auto;%20line-height:%201;'%3e%3ctitle%3eWindsurf%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M23.78%205.004h-.228a2.187%202.187%200%2000-2.18%202.196v4.912c0%20.98-.804%201.775-1.76%201.775a1.818%201.818%200%2001-1.472-.773L13.168%205.95a2.197%202.197%200%2000-1.81-.95c-1.134%200-2.154.972-2.154%202.173v4.94c0%20.98-.797%201.775-1.76%201.775-.57%200-1.136-.289-1.472-.773L.408%205.098C.282%204.918%200%205.007%200%205.228v4.284c0%20.216.066.426.188.604l5.475%207.889c.324.466.8.812%201.351.938%201.377.316%202.645-.754%202.645-2.117V11.89c0-.98.787-1.775%201.76-1.775h.002c.586%200%201.135.288%201.472.773l4.972%207.163a2.15%202.15%200%20001.81.95c1.158%200%202.151-.973%202.151-2.173v-4.939c0-.98.787-1.775%201.76-1.775h.194c.122%200%20.22-.1.22-.222V5.225a.221.221%200%2000-.22-.222z'%3e%3c/path%3e%3c/svg%3e",GX="data:image/svg+xml,%3csvg%20width='90'%20viewBox='0%200%2090%2090'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.4375%205.625C6.8842%205.625%205.625%206.8842%205.625%208.4375V70.3125H0V8.4375C0%203.7776%203.7776%200%208.4375%200H83.7925C87.551%200%2089.4333%204.5442%2086.7756%207.20186L40.3642%2053.6133H53.4375V47.8125H59.0625V55.0195C59.0625%2057.3495%2057.1737%2059.2383%2054.8438%2059.2383H34.7392L25.0712%2068.9062H68.9062V33.75H74.5312V68.9062C74.5312%2072.0128%2072.0128%2074.5312%2068.9062%2074.5312H19.4462L9.60248%2084.375H81.5625C83.1158%2084.375%2084.375%2083.1158%2084.375%2081.5625V19.6875H90V81.5625C90%2086.2224%2086.2224%2090%2081.5625%2090H6.20749C2.44898%2090%200.566723%2085.4558%203.22438%2082.7981L49.46%2036.5625H36.5625V42.1875H30.9375V35.1562C30.9375%2032.8263%2032.8263%2030.9375%2035.1562%2030.9375H55.085L64.9288%2021.0938H21.0938V56.25H15.4688V21.0938C15.4688%2017.9871%2017.9871%2015.4688%2021.0938%2015.4688H70.5538L80.3975%205.625H8.4375Z'%20fill='%23fafafa'/%3e%3c/svg%3e",Kp={Amp:TX,Antigravity:NX,"Auggie CLI":RX,"Augment Code":AX,"Claude Code":N4,"Claude Desktop":N4,Cline:jX,Codex:OX,Cursor:MX,"Gemini CLI":LX,"Github Copilot":_X,Junie:DX,"Kilo Code":IX,Kiro:zX,OpenClaw:PX,OpenCode:FX,Qoder:BX,"Qwen Code":HX,"Roo Code":UX,"Trae.ai":qX,Warp:VX,Windsurf:$X,Zed:GX};function YX({agents:e,connectors:t,onAdd:n,onOpenChange:r,open:i,pendingAgentId:a}){const[l,c]=C.useState("");C.useEffect(()=>{i||c("")},[i]);const d=C.useMemo(()=>new Set(t.map(g=>g.agent)),[t]),f=C.useMemo(()=>{if(!l)return e;const g=l.toLowerCase();return e.filter(p=>p.name.toLowerCase().includes(g))},[e,l]);return h.jsx(Ws,{onOpenChange:r,open:i,children:h.jsxs(Ks,{className:"flex h-150 flex-col sm:max-w-lg",children:[h.jsx(hi,{children:h.jsx(pi,{children:"Add connector"})}),h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3",children:[h.jsxs("div",{className:"relative shrink-0",children:[h.jsx(Cc,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),h.jsx(Ii,{className:"pl-9",onChange:g=>c(g.target.value),placeholder:"Search agents...",value:l})]}),h.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[f.map(g=>{const p=d.has(g.id),y=a===g.id;return h.jsxs("div",{className:"flex items-center justify-between rounded px-3 py-2.5",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[Kp[g.name]?h.jsx("img",{alt:"",className:"size-5 shrink-0",src:Kp[g.name]}):h.jsx("div",{className:"size-5 shrink-0"}),h.jsx("span",{className:"text-foreground text-sm",children:g.name})]}),h.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center",children:y?h.jsx(Gr,{className:"text-muted-foreground size-4 animate-spin"}):p?h.jsx(Qs,{className:"text-primary size-4"}):h.jsx(Re,{className:"size-8",onClick:()=>n(g),size:"icon-sm",variant:"outline",children:h.jsx(es,{className:"size-4"})})})]},g.id)}),f.length===0&&h.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No agents found"})]})]})]})})}const Ou={hook:"Hook",mcp:"MCP",rules:"Rules",skill:"Skill"};function WX(){const{data:e,isLoading:t}=CX(),{data:n,isLoading:r}=wX(),i=kX(),[a,l]=C.useState(!1),[c,d]=C.useState(),f=e?.connectors??[],g=n?.agents??[],p=t||r,y=async(v,S)=>{if(S!==v.connectorType)try{await i.mutateAsync({agentId:v.agent,connectorType:S});const E=xX(S);st.success(E?`${v.agent} switched to ${Ou[S]}. Restart the agent to apply.`:`${v.agent} switched to ${Ou[S]}.`)}catch(E){st.error(E instanceof Error?E.message:"Failed to switch connector type")}},x=async(v,S)=>{try{await i.mutateAsync({agentId:v,connectorType:S}),st.success(`${v} connected via ${Ou[S]}.`)}catch(E){st.error(E instanceof Error?E.message:"Failed to install connector")}};return h.jsxs("div",{className:"flex w-full flex-col gap-5",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("h2",{className:"text-foreground text-[0.95rem] font-semibold leading-tight",children:"Connectors"}),h.jsx("p",{className:"text-muted-foreground mt-0.5 text-[0.8125rem] leading-snug",children:"Manage how AI agents connect to ByteRover."})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[p&&h.jsx(Gr,{className:"text-muted-foreground size-4 animate-spin"}),h.jsxs(Re,{disabled:p,onClick:()=>l(!0),size:"sm",variant:"outline",children:[h.jsx(es,{strokeWidth:3})," Add connector"]})]})]}),h.jsx(YX,{agents:g,connectors:f,onAdd:async v=>{d(v.id);try{await x(v.id,v.defaultConnectorType)}finally{d(void 0)}},onOpenChange:l,open:a,pendingAgentId:c}),p?h.jsx("div",{className:"bg-card border rounded-xl px-6 py-5",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(pr,{className:"size-5 shrink-0 rounded-full"}),h.jsx(pr,{className:"h-4 flex-1"}),h.jsx(pr,{className:"h-8 w-16 shrink-0"})]})}):f.length===0?h.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No connectors installed. Add one to get started."}):h.jsx("div",{className:"bg-card border rounded-xl px-6 py-5 flex flex-col gap-4",children:f.map((v,S)=>h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[Kp[v.agent]?h.jsx("img",{alt:"",className:"size-5 shrink-0",src:Kp[v.agent]}):h.jsx("div",{className:"size-5 shrink-0"}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{children:v.agent}),h.jsx("span",{className:"text-primary text-xs",children:"Connected"})]})]}),h.jsx("div",{className:"flex items-center",children:h.jsxs(Xs,{children:[h.jsxs(Zs,{disabled:i.isPending,render:h.jsx(Re,{className:"text-sm",disabled:i.isPending,size:"sm",variant:"secondary"}),children:[Ou[v.connectorType],h.jsx(Hd,{className:"size-3.5 shrink-0"})]}),h.jsx(ts,{align:"end",children:v.supportedTypes.map(E=>h.jsx(jn,{onClick:()=>y(v,E),children:Ou[E]},E))})]})})]}),S<f.length-1&&h.jsx("div",{className:"border-b"})]},v.agent))})]})}const Bs=()=>{};async function R4(e){const{apiClient:t}=De.getState();if(!t)throw new Error("Not connected");try{return(await t.request(On.CONFIG,{key:e})).value}catch(n){if(fN(n)&&n.code===kr.CONFIG_KEY_NOT_SET)return;throw n}}const KX=async()=>{const[e,t]=await Promise.all([R4("user.name"),R4("user.email")]);return{email:t,name:e}},h8=()=>({queryFn:KX,queryKey:["vc","config"],staleTime:5e3}),QX=({queryConfig:e}={})=>er({...h8(),...e}),XX=e=>{const{apiClient:t}=De.getState();return t?t.request(On.CONFIG,e):Promise.reject(new Error("Not connected"))},ZX=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:h8().queryKey}),n?.(...i)},...r,mutationFn:XX})},JX=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function eZ(e){const t=e.trim();return t===""?!1:JX.test(t)}function p8({action:e,children:t,compact:n=!1,description:r,error:i,errorFallback:a="Failed to load",onRetry:l,title:c}){const d=n?"bg-card flex flex-col gap-3 rounded-xl border px-4.5 py-3.5":"bg-card flex flex-col gap-4 rounded-xl border px-5 py-4";return h.jsxs("div",{className:"flex w-full flex-col gap-3.5",children:[h.jsxs("div",{className:"flex items-start justify-between gap-3",children:[h.jsxs("div",{className:"flex min-w-0 flex-col",children:[h.jsx("h2",{className:"text-foreground text-[0.95rem] font-semibold leading-tight",children:c}),h.jsx("p",{className:"text-muted-foreground mt-0.5 text-[0.8125rem] leading-snug",children:r})]}),e]}),i?h.jsxs("p",{className:"text-destructive text-sm",children:["✗ ",Sn(i,a),l&&h.jsxs(h.Fragment,{children:[" · ",h.jsx("button",{className:"underline underline-offset-2",onClick:l,type:"button",children:"retry"})]})]}):t&&h.jsx("div",{className:d,children:t})]})}function tZ({isPending:e,onApplyAccount:t,onSetManually:n,user:r}){const i="flex items-center justify-between gap-3 rounded-md border border-dashed border-border bg-muted/40 px-3.5 py-2.5";if(!r)return h.jsxs("div",{className:i,children:[h.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:"Identity not configured"}),h.jsx("span",{className:"text-muted-foreground truncate text-xs",children:"Optional — used for commit attribution."})]}),h.jsx(Re,{disabled:e,onClick:n,size:"sm",variant:"secondary",children:"Set manually"})]});const a=r.name??r.email;return h.jsxs("div",{className:i,children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsxs(Ud,{className:"size-7 shrink-0",children:[h.jsx(Nm,{alt:a,src:r.avatarUrl}),h.jsx(qd,{className:"text-[10px]",children:ob(a)})]}),h.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[h.jsxs("span",{className:"text-foreground truncate text-sm font-medium",children:[a," ",h.jsxs("span",{className:"text-muted-foreground font-normal",children:["<",r.email,">"]})]}),h.jsx("span",{className:"text-muted-foreground truncate text-xs",children:"From your ByteRover account — optional, used for commit attribution."})]})]}),h.jsxs("div",{className:"flex shrink-0 gap-1.5",children:[h.jsx(Re,{disabled:e,onClick:n,size:"sm",variant:"ghost",children:"Edit"}),h.jsx(Re,{disabled:e,onClick:t,size:"sm",children:"Apply"})]})]})}function nZ({email:e,name:t,onEdit:n}){return h.jsxs("div",{className:"flex min-h-8 items-center gap-3",children:[h.jsxs("span",{className:"text-foreground min-w-0 flex-1 truncate text-sm",children:[t," ",h.jsxs("span",{className:"text-muted-foreground mono",children:["<",e,">"]})]}),h.jsx(Re,{onClick:n,size:"sm",variant:"ghost",children:"Edit"})]})}function rZ({initial:e,isPending:t,onCancel:n,onSubmit:r}){const i=C.useId(),a=C.useId(),[l,c]=C.useState(e.name),[d,f]=C.useState(e.email),g=l.trim(),p=d.trim(),y=g!==e.name||p!==e.email,x=g.length>0&&p.length>0,v=p.length>0&&!eZ(p),S=v&&y,E=y&&x&&!v&&!t;async function k(R){R.preventDefault(),E&&await r({email:p,name:g})}function T(R){k(R).catch(Bs)}return h.jsxs("form",{className:"flex flex-col gap-4",onSubmit:T,children:[h.jsxs(zp,{children:[h.jsx(Pp,{htmlFor:i,children:"Name"}),h.jsx(Ii,{disabled:t,id:i,onChange:R=>c(R.target.value),placeholder:"Your name",value:l})]}),h.jsxs(zp,{"data-invalid":S,children:[h.jsx(Pp,{htmlFor:a,children:"Email"}),h.jsx(Ii,{"aria-invalid":S,disabled:t,id:a,onChange:R=>f(R.target.value),placeholder:"you@example.com",type:"email",value:d}),S&&h.jsx(hN,{children:"Enter a valid email address."})]}),h.jsxs("div",{className:"flex items-center justify-end gap-2",children:[h.jsx(Re,{disabled:t,onClick:n,type:"button",variant:"secondary",children:"Cancel"}),h.jsx(Re,{disabled:!E,type:"submit",children:t?"Saving…":"Save"})]})]})}function iZ(){const{data:e,error:t,isError:n,isLoading:r,refetch:i}=QX(),a=ZX(),l=ci(v=>v.user),[c,d]=C.useState(!1),f=e?.name??"",g=e?.email??"",p=!!(f&&g);async function y(v){try{v.name&&v.name!==f&&await a.mutateAsync({key:"user.name",value:v.name}),v.email&&v.email!==g&&await a.mutateAsync({key:"user.email",value:v.email}),st.success("Git identity saved."),d(!1)}catch(S){throw st.error(Sn(S,"Failed to save identity.")),S}}async function x(){if(l)try{await a.mutateAsync({key:"user.name",value:l.name??l.email}),await a.mutateAsync({key:"user.email",value:l.email}),st.success("Git identity applied from your ByteRover account.")}catch(v){st.error(Sn(v,"Failed to apply identity."))}}return h.jsx(p8,{action:r?h.jsx(Gr,{className:"text-muted-foreground mt-1 size-4 animate-spin"}):void 0,compact:!c,description:"Recorded on every commit in this project.",error:n?t:void 0,errorFallback:"Failed to load identity",onRetry:()=>i().catch(Bs),title:"Git identity",children:e?c?h.jsx(rZ,{initial:{email:g,name:f},isPending:a.isPending,onCancel:()=>d(!1),onSubmit:y}):p?h.jsx(nZ,{email:g,name:f,onEdit:()=>d(!0)}):h.jsx(tZ,{isPending:a.isPending,onApplyAccount:()=>x().catch(Bs),onSetManually:()=>d(!0),user:l}):h.jsxs("div",{className:"flex min-h-8 items-center gap-3",children:[h.jsx(pr,{className:"h-4 flex-1"}),h.jsx(pr,{className:"h-8 w-12"})]})})}const oZ=()=>{const{apiClient:e}=De.getState();return e?e.request(IB.GET_ENVIRONMENT):Promise.reject(new Error("Not connected"))},aZ=()=>({queryFn:oZ,queryKey:["config","environment"],staleTime:1/0}),sZ=({queryConfig:e}={})=>er({...aZ(),...e}),lZ=e=>{const{apiClient:t}=De.getState();if(!t)return Promise.reject(new Error("Not connected"));const n=e.subcommand==="remove"?{subcommand:"remove"}:{subcommand:e.subcommand,url:e.url};return t.request(On.REMOTE,n)},cZ=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:sb().queryKey}),n?.(...i)},...r,mutationFn:lZ})},uZ=/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+:[^/].*$/;function m8(e){const t=e.trim();return t===""?"unknown":t.startsWith("https://")?"https":t.startsWith("http://")?"http":t.startsWith("ssh://")?"ssh":t.startsWith("git://")?"git":uZ.test(t)?"ssh":"unknown"}function dZ(e){const t=e.trim();if(t==="")return"URL is required.";const n=m8(t);if(n==="ssh")return"SSH remotes aren't supported yet — use an HTTPS URL.";if(n==="http")return"Plain HTTP isn't supported — use an HTTPS URL.";if(n!=="https")return"Expected an HTTPS URL (e.g. https://byterover.dev/team/space.git)."}function fZ({action:e,description:t,title:n}){return h.jsxs("div",{className:"border-border bg-muted/40 flex items-center justify-between gap-3 rounded-md border border-dashed px-3.5 py-2.5",children:[h.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:n}),h.jsx("span",{className:"text-muted-foreground truncate text-xs",children:t})]}),e]})}const vb="origin";function hZ({isDeleting:e,onDelete:t,onEdit:n,url:r}){const i=m8(r),a=i==="ssh"||i==="git";return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsxs("div",{className:"flex min-h-8 items-center gap-3",children:[h.jsx("span",{className:"text-foreground w-14 shrink-0 text-sm font-medium",children:vb}),h.jsx("span",{className:"mono text-foreground min-w-0 flex-1 truncate text-sm",children:r}),h.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[h.jsx(Re,{disabled:e,onClick:n,size:"sm",variant:"ghost",children:"Edit"}),h.jsx(Re,{className:"text-destructive hover:text-destructive",disabled:e,onClick:t,size:"sm",variant:"ghost",children:"Delete"})]})]}),a&&h.jsx("p",{className:"text-muted-foreground text-xs",children:"Read-only from the web UI. Push and pull require an SSH agent; change to HTTPS to use them here."})]})}function pZ({isPending:e,onConfirm:t,onOpenChange:n,open:r,url:i}){function a(){t().catch(Bs)}return h.jsx(Vd,{onOpenChange:n,open:r,children:h.jsxs($d,{children:[h.jsxs(Gd,{children:[h.jsxs(Wd,{children:["Remove ",h.jsx("span",{className:"mono",children:vb}),"?"]}),h.jsxs(Kd,{children:["Removes ",h.jsx("code",{className:"mono bg-muted text-foreground rounded px-1.5 py-0.5 text-xs",children:i})," from this project. Push, pull, and fetch will be disabled until you set a new remote."]})]}),h.jsxs(Yd,{children:[h.jsx(Qd,{disabled:e,children:"Cancel"}),h.jsx(Re,{disabled:e,onClick:a,variant:"destructive",children:e?"Removing…":"Remove remote"})]})]})})}function mZ({initial:e,isPending:t,mode:n,onCancel:r,onSubmit:i,placeholder:a,webAppUrl:l}){const c=C.useId(),[d,f]=C.useState(e),[g,p]=C.useState(),y=C.useRef(null),x=d.trim()!==e,v=dZ(d),S=x&&!v&&!t;C.useEffect(()=>{y.current?.focus(),y.current?.select()},[]);async function E(O){if(O.preventDefault(),v){p(v);return}try{await i(d.trim()),p(void 0)}catch(A){p(Sn(A,"Failed to save remote"))}}function k(O){E(O).catch(Bs)}function T(O){O.key==="Escape"&&(O.preventDefault(),r())}const R=g??(x?v:void 0),M=n==="edit"&&!R&&e!=="";return h.jsxs("form",{className:"flex flex-col gap-4",onSubmit:k,children:[h.jsxs(zp,{"data-invalid":!!R,children:[h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsxs(Pp,{htmlFor:c,children:[n==="add"?"Adding ":"Editing ",h.jsx("span",{className:"mono text-foreground",children:vb})]}),n==="add"&&l&&h.jsxs(Re,{className:"hidden sm:inline-flex",onClick:()=>window.open(l,"_blank","noopener,noreferrer"),size:"sm",type:"button",variant:"ghost",children:[h.jsx(Ip,{className:"size-3.5"}),"Find in ByteRover"]})]}),h.jsx(Ii,{"aria-invalid":!!R,className:"mono",disabled:t,id:c,onChange:O=>{f(O.target.value),g&&p(void 0)},onKeyDown:T,placeholder:a,ref:y,value:d}),R&&h.jsx(hN,{children:R}),!R&&n==="add"&&h.jsx(X2,{children:"Only HTTPS URLs are supported right now."}),M&&h.jsxs(X2,{children:["Replaces current URL ",h.jsx("span",{className:"mono text-foreground",children:e})]})]}),h.jsxs("div",{className:"flex items-center justify-end gap-2",children:[h.jsx(Re,{disabled:t,onClick:r,type:"button",variant:"secondary",children:"Cancel"}),h.jsx(Re,{disabled:!S,type:"submit",children:t?"Saving…":n==="add"?"Add remote":"Replace URL"})]})]})}function gZ(){const{data:e,error:t,isError:n,refetch:r}=lG(),{data:i}=sZ(),a=cZ(),[l,c]=C.useState(!1),[d,f]=C.useState(!1),g=e?.url,p=e?.gitInitialized,y=!!g,x=p===!0&&!y&&!l,v=`${i?.gitRemoteBaseUrl??"https://example.com"}/team/space.git`;async function S(k){await a.mutateAsync({subcommand:y?"set-url":"add",url:k}),st.success(y?"Origin replaced.":"Remote added."),c(!1)}async function E(){try{await a.mutateAsync({subcommand:"remove"}),st.success("Remote removed."),f(!1)}catch(k){st.error(Sn(k,"Failed to remove remote"))}}return h.jsx(p8,{action:x&&h.jsx(Re,{onClick:()=>c(!0),size:"sm",variant:"outline",children:"Add remote"}),compact:!l,description:"Used for push, pull, and fetch.",error:n?t:void 0,errorFallback:"Failed to load remote",onRetry:()=>r().catch(Bs),title:"Remotes",children:e?p===!1?h.jsx(fZ,{action:h.jsx(lb,{}),description:"Initialize version control before adding a remote.",title:"Not initialized"}):l?h.jsx(mZ,{initial:g??"",isPending:a.isPending,mode:y?"edit":"add",onCancel:()=>c(!1),onSubmit:S,placeholder:v,webAppUrl:i?.webAppUrl}):g?h.jsxs(h.Fragment,{children:[h.jsx(hZ,{isDeleting:a.isPending&&d,onDelete:()=>f(!0),onEdit:()=>c(!0),url:g}),h.jsx(pZ,{isPending:a.isPending,onConfirm:E,onOpenChange:f,open:d,url:g})]}):h.jsxs("p",{className:"text-muted-foreground text-sm",children:["No remote set. Push and pull need an"," ",h.jsx("code",{className:"mono bg-muted text-foreground rounded px-1 py-0.5 text-xs",children:"origin"})," URL."]}):h.jsxs("div",{className:"flex min-h-8 items-center gap-3",children:[h.jsx(pr,{className:"h-4 w-14"}),h.jsx(pr,{className:"h-5 w-12 rounded-full"}),h.jsx(pr,{className:"h-4 flex-1"}),h.jsx(pr,{className:"h-8 w-12"})]})})}function yZ(){return h.jsx("div",{className:"flex flex-col items-center pt-8",children:h.jsxs("div",{className:"flex w-full flex-col gap-6 md:gap-12 sm:max-w-lg md:max-w-xl lg:max-w-2xl",children:[h.jsx(iZ,{}),h.jsx(gZ,{}),h.jsx(WX,{})]})})}function xZ(){const[e,t]=C.useState(!0),[n,r]=C.useState(!1),i=C.useCallback(()=>{t(c=>!c)},[]),a=C.useCallback(()=>{r(c=>!c)},[]);return{closeRightPanel:C.useCallback(()=>{r(!1)},[]),isLeftPanelOpen:e,isRightPanelOpen:n,toggleLeftPanel:i,toggleRightPanel:a}}const bZ=e=>{const{apiClient:t}=De.getState();return t?t.request(Id.GET_FILE,e):Promise.reject(new Error("Not connected"))},vZ=({branch:e,path:t})=>({queryFn:()=>bZ({branch:e,path:t}),queryKey:["contextTree","file",e,t]}),wZ=({branch:e,path:t,queryConfig:n})=>er({...vZ({branch:e,path:t}),enabled:!!t,...n}),SZ=e=>{const{apiClient:t}=De.getState();return t?t.request(Id.GET_NODES,e):Promise.reject(new Error("Not connected"))},CZ=e=>({queryFn:()=>SZ({branch:e}),queryKey:["contextTree","nodes",e]}),EZ=({branch:e,queryConfig:t}={})=>er({...CZ(e),...t}),kZ=e=>{const{apiClient:t}=De.getState();return t?t.request(Id.UPDATE_FILE,e):Promise.reject(new Error("Not connected"))},TZ=({mutationConfig:e}={})=>{const t=en(),{onSuccess:n,...r}=e??{};return un({onSuccess(...i){t.invalidateQueries({queryKey:["contextTree"]}),n?.(...i)},...r,mutationFn:kZ})},Zd=e=>e.endsWith(".md"),A4=e=>{const t=new Set;if(!e)return t;const n=e.split("/").filter(Boolean);for(let r=0;r<n.length;r++){const i=n.slice(0,r+1).join("/");r===n.length-1&&Zd(i)||t.add(i)}return t},wb=(e,t)=>{for(const n of e){if(n.path===t)return n;if(n.type==="tree"&&n.children&&t.startsWith(n.path+"/")){const r=wb(n.children,t);if(r)return r}}},g8=(e,t,n=0,r=[])=>{for(const i of e)r.push({depth:n,node:i}),i.type==="tree"&&t.has(i.path)&&i.children&&g8(i.children,t,n+1,r);return r},y8=C.createContext(void 0);function NZ({children:e}){const[t,n]=Uy(),r=t.get("branch")??void 0,i=t.get("path")??"",[a,l]=C.useState(()=>A4(i)),[c,d]=C.useState(!1),[f,g]=C.useState(""),{data:p,isFetching:y}=EZ({branch:r}),{data:x,isFetching:v}=wZ({branch:r,path:i,queryConfig:{enabled:!!i&&Zd(i)}});C.useEffect(()=>{p?.branch&&!t.has("branch")&&n(V=>{const G=new URLSearchParams(V);return G.set("branch",p.branch),G},{replace:!0})},[p?.branch,t,n]);const S=C.useMemo(()=>p?.nodes??[],[p]),E=C.useMemo(()=>i?wb(S,i):void 0,[S,i]),k=C.useMemo(()=>g8(S,a),[S,a]),T=x?.file,R=C.useCallback(V=>{const G=A4(V);l(B=>new Set([...G,...B]))},[]),M=C.useCallback(V=>{l(G=>{const B=new Set(G);return B.has(V.path)?B.delete(V.path):B.add(V.path),B})},[]),O=C.useCallback(V=>{R(V.path),n(G=>{const B=new URLSearchParams(G);return B.set("path",V.path),B},{replace:!0}),d(!1),g("")},[R,n]),A=C.useCallback(()=>{n(V=>{const G=new URLSearchParams(V);return G.delete("path"),G},{replace:!0}),d(!1),g("")},[n]),N=TZ(),D=C.useCallback(()=>{T&&(g(T.content),d(!0))},[T]),H=C.useCallback(()=>{d(!1),g("")},[]),I=C.useCallback(async()=>{!i||!c||(await N.mutateAsync({content:f,path:i}),d(!1))},[f,c,i,N]),U=c&&T!==void 0&&f!==T.content,$={branch:p?.branch??r,cancelEdit:H,editContent:f,enterEditMode:D,expandedPaths:a,fileData:T,flattenedNodes:k,handleSelect:O,handleToggle:M,hasChanges:U,isEditMode:c,isFetchingFile:v,isFetchingTree:y,isUpdating:N.isPending,navigateHome:A,nodes:S,saveChanges:I,selectedNode:E,selectedPath:i,setEditContent:g};return h.jsx(y8.Provider,{value:$,children:e})}function kc(){const e=C.useContext(y8);if(!e)throw new Error("useContextTree must be used within a ContextTreeProvider");return e}function RZ({name:e,avatar:t,description:n,timestamp:r,className:i}){return h.jsx("div",{className:ge("border-border flex items-center justify-between border-b py-2",i),children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(Ud,{className:"size-6",children:[t&&h.jsx(Nm,{src:t,alt:e}),h.jsx(qd,{className:"text-sm font-semibold",children:e[0]||"U"})]}),n&&h.jsx("div",{className:"text-muted-foreground text-sm",children:n}),r&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-muted-foreground font-semibold",children:"·"}),h.jsx("div",{className:"text-muted-foreground text-sm font-semibold",children:r})]})]})})}const AZ=vm("group/tag inline-flex h-6 w-fit shrink-0 items-center gap-1 overflow-hidden rounded-md border px-2 text-xs font-medium whitespace-nowrap transition-all [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-border bg-muted text-muted-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"border-border bg-transparent text-foreground"},size:{default:"h-6 px-2 text-xs",sm:"h-5 px-2.5 text-xs py-0.5"}},defaultVariants:{variant:"default",size:"default"}});function j4({className:e,variant:t="default",size:n="default",closable:r=!1,onClose:i,disabled:a=!1,children:l,...c}){const d=C.useCallback(g=>{g.stopPropagation(),a||i?.()},[a,i]),f=C.useCallback(g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),g.preventDefault(),a||i?.())},[a,i]);return h.jsxs("span",{"data-slot":"tag","data-disabled":a||void 0,className:ge(AZ({variant:t,size:n}),a&&"pointer-events-none opacity-50",r&&"pr-1",e),...c,children:[h.jsx("span",{className:"truncate",children:l}),r&&h.jsx("button",{type:"button","aria-label":"Remove tag",disabled:a,onClick:d,onKeyDown:f,className:"inline-flex shrink-0 items-center justify-center rounded-sm opacity-60 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none cursor-pointer",children:h.jsx(im,{className:"size-3"})})]})}function jZ({fileName:e,content:t,tags:n=[],isLoading:r,error:i,isEditMode:a,editContent:l,editTags:c=[],onContentChange:d,onTagsChange:f,isUpdating:g,hasChanges:p,canEdit:y,onEnterEditMode:x,onSaveChanges:v,onCancelEdit:S,headerClassName:E,isHistoryVisible:k,onToggleHistory:T,showTags:R=!0,timeline:M,contentView:O}){return r?h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx(rd,{className:"size-4 animate-spin"})}):i?h.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[h.jsx("div",{className:"text-sm text-red-400",children:"Failed to load file content"}),h.jsx("div",{className:"text-sm text-gray-500",children:i})]}):!t&&!a?h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("div",{className:"text-sm text-gray-500",children:"No content available"})}):a?h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-5",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"text-foreground text-lg font-semibold",children:e}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Re,{size:"default",onClick:S,disabled:g,className:"bg-secondary text-secondary-foreground gap-2 px-4 py-2 text-sm hover:bg-neutral-800",children:"Cancel"}),h.jsx(Re,{variant:"default",size:"default",onClick:v,disabled:g||!p,className:"text-foreground gap-2 px-4 py-2 text-sm",children:g?h.jsxs(h.Fragment,{children:[h.jsx(rd,{className:"size-4 animate-spin"}),"Saving..."]}):"Save"})]})]}),f&&h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:"Tags"}),h.jsxs("div",{className:"bg-background flex flex-wrap items-center gap-2 rounded-lg px-5 py-2 border",children:[c.map(A=>h.jsx(j4,{variant:"outline",closable:!0,onClose:()=>f(c.filter(N=>N!==A)),className:"text-foreground bg-secondary rounded-sm border-none",children:A},A)),h.jsx("input",{type:"text",placeholder:"Add tag...",disabled:g,className:"h-7 w-24 bg-transparent text-sm text-neutral-200 placeholder:text-neutral-500 focus:outline-none",onKeyDown:A=>{if(A.key==="Enter"){A.preventDefault();const N=A.currentTarget.value.trim();N&&!c.includes(N)&&(f([...c,N]),A.currentTarget.value="")}}})]})]}),h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[h.jsx("span",{className:"text-foreground text-sm font-medium",children:"Context detail"}),h.jsx(cb,{value:l,onChange:A=>d(A.target.value),disabled:g,className:"flex-1 resize-none rounded-lg px-5 text-sm leading-6 text-neutral-200 focus:ring-0 focus:ring-offset-0 focus:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-none",placeholder:"Enter context content..."})]})]}):h.jsxs("div",{className:"mx-auto flex min-h-0 w-full flex-1 flex-col",children:[h.jsxs("div",{className:ge("flex items-center justify-between p-5",E),children:[h.jsx("span",{className:"text-foreground text-lg font-semibold",children:e}),h.jsxs(Xs,{children:[h.jsx(Zs,{render:h.jsx(Re,{size:"icon",className:"border-border bg-background hover:bg-muted"}),children:h.jsx(bO,{className:"h-5 w-5"})}),h.jsxs(ts,{align:"end",className:"bg-popover w-32 border-none p-1",children:[y&&h.jsxs(jn,{className:"bg-popover",onClick:x,children:[h.jsx(MO,{className:"mr-2 h-4 w-4"}),"Edit"]}),h.jsxs(jn,{className:"bg-popover",onClick:T,children:[h.jsx(kO,{className:"mr-2 h-5 w-5"}),"History"]})]})]})]}),M,R&&n.length>0&&h.jsx("div",{className:"mb-7 flex flex-wrap gap-1.5",children:n.map(A=>h.jsx(j4,{variant:"default",size:"sm",className:"text-muted-foreground bg-muted rounded-sm border-none",children:A},A))}),h.jsx("div",{className:"overflow-y-auto p-5 pt-0",children:O})]})}function Qp({text:e,className:t,delay:n=500}){const r=C.useRef(null),[i,a]=C.useState(!1);C.useEffect(()=>{const c=r.current;c&&a(c.scrollWidth>c.clientWidth)},[e]);const l=ge("overflow-hidden text-ellipsis whitespace-nowrap",t);return i?h.jsx(Sx,{delay:n,children:h.jsxs(Ua,{children:[h.jsx(qa,{render:h.jsx("span",{ref:r,className:l}),children:e}),h.jsx(Va,{className:"[&>[aria-hidden]]:hidden bg-popover text-foreground",children:h.jsx("p",{children:e})})]})}):h.jsx("span",{ref:r,className:l,children:e})}function x8({className:e,...t}){return h.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border",children:h.jsx("table",{"data-slot":"table",className:ge("w-full caption-bottom text-sm",e),...t})})}function b8({className:e,...t}){return h.jsx("thead",{"data-slot":"table-header",className:ge("[&_tr]:border-b bg-card",e),...t})}function v8({className:e,...t}){return h.jsx("tbody",{"data-slot":"table-body",className:ge("[&_tr:last-child]:border-0",e),...t})}function nc({className:e,...t}){return h.jsx("tr",{"data-slot":"table-row",className:ge("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function Gi({className:e,...t}){return h.jsx("th",{"data-slot":"table-head",className:ge("h-10 text-left align-middle font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0 px-5",e),...t})}function Rr({className:e,...t}){return h.jsx("td",{"data-slot":"table-cell",className:ge("px-5 py-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 h-12.5",e),...t})}function OZ({nodes:e,showBack:t,onNodeClick:n,onBack:r}){return h.jsxs(x8,{className:"overflow-hidden",children:[h.jsx(b8,{className:"bg-popover",children:h.jsxs(nc,{className:"h-11",children:[h.jsx(Gi,{className:"text-muted-foreground bg-border border-border px-6 text-sm",children:"Memory"}),h.jsx(Gi,{className:"text-muted-foreground border-border bg-border px-6 text-sm",children:"Updated by"}),h.jsx(Gi,{className:"text-muted-foreground border-border bg-border px-6 text-sm",children:"Last Modified"})]})}),h.jsxs(v8,{children:[t&&r&&h.jsxs(nc,{className:"h-13 cursor-pointer bg-transparent text-sm",onClick:r,children:[h.jsx(Rr,{className:ge("text-foreground px-6 hover:underline",{"border-border border-b":e.length>0}),children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(h2,{className:"text-muted-foreground size-4 shrink-0",strokeWidth:2}),h.jsx(Qp,{text:".."})]})}),h.jsx(Rr,{className:ge("px-6 text-muted-foreground",{"border-border border-b":e.length>0})}),h.jsx(Rr,{className:ge("px-6 text-muted-foreground",{"border-border border-b":e.length>0})})]}),e.map((i,a)=>{const l=a===e.length-1;return h.jsxs(nc,{className:"h-13 cursor-pointer bg-transparent text-sm",onClick:()=>n(i),children:[h.jsx(Rr,{className:ge("text-foreground px-6 hover:underline",{"border-border border-b":!l}),children:h.jsxs("div",{className:"flex items-center gap-2",children:[i.type==="tree"?h.jsx(h2,{className:"text-muted-foreground size-4 shrink-0",strokeWidth:2}):h.jsx(uk,{className:"text-primary size-4 shrink-0",strokeWidth:2}),h.jsx(Qp,{text:i.name})]})}),h.jsx(Rr,{className:ge("text-muted-foreground px-6",{"border-border border-b":!l}),children:i.type==="blob"&&i.lastUpdatedBy?i.lastUpdatedBy:"-"}),h.jsx(Rr,{className:ge("text-muted-foreground px-6",{"border-border border-b":!l}),children:i.type==="blob"&&i.lastUpdatedWhen?i.lastUpdatedWhen:"-"})]},i.path)})]})]})}const w8=6048e5,MZ=864e5,Hh=43200,O4=1440,M4=Symbol.for("constructDateFrom");function Wo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&M4 in e?e[M4](t):e instanceof Date?new e.constructor(t):new Date(t)}function or(e,t){return Wo(t||e,e)}let LZ={};function Jd(){return LZ}function xd(e,t){const n=Jd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=or(e,t?.in),a=i.getDay(),l=(a<r?7:0)+a-r;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function Xp(e,t){return xd(e,{...t,weekStartsOn:1})}function S8(e,t){const n=or(e,t?.in),r=n.getFullYear(),i=Wo(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=Xp(i),l=Wo(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const c=Xp(l);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Zp(e){const t=or(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function _m(e,...t){const n=Wo.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function L4(e,t){const n=or(e,t?.in);return n.setHours(0,0,0,0),n}function _Z(e,t,n){const[r,i]=_m(n?.in,e,t),a=L4(r),l=L4(i),c=+a-Zp(a),d=+l-Zp(l);return Math.round((c-d)/MZ)}function DZ(e,t){const n=S8(e,t),r=Wo(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Xp(r)}function hp(e,t){const n=+or(e)-+or(t);return n<0?-1:n>0?1:n}function IZ(e){return Wo(e,Date.now())}function zZ(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function PZ(e){return!(!zZ(e)&&typeof e!="number"||isNaN(+or(e)))}function FZ(e,t,n){const[r,i]=_m(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),l=r.getMonth()-i.getMonth();return a*12+l}function BZ(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function HZ(e,t){return+or(e)-+or(t)}function UZ(e,t){const n=or(e,t?.in);return n.setHours(23,59,59,999),n}function qZ(e,t){const n=or(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function VZ(e,t){const n=or(e,t?.in);return+UZ(n,t)==+qZ(n,t)}function $Z(e,t,n){const[r,i,a]=_m(n?.in,e,e,t),l=hp(i,a),c=Math.abs(FZ(i,a));if(c<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-l*c);let d=hp(i,a)===-l;VZ(r)&&c===1&&hp(r,a)===1&&(d=!1);const f=l*(c-+d);return f===0?0:f}function GZ(e,t,n){const r=HZ(e,t)/1e3;return BZ(n?.roundingMethod)(r)}function YZ(e,t){const n=or(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const WZ={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},KZ=(e,t,n)=>{let r;const i=WZ[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function U1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const QZ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},XZ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ZZ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},JZ={date:U1({formats:QZ,defaultWidth:"full"}),time:U1({formats:XZ,defaultWidth:"full"}),dateTime:U1({formats:ZZ,defaultWidth:"full"})},eJ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tJ=(e,t,n,r)=>eJ[e];function Mu(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):l;i=e.formattingValues[c]||e.formattingValues[l]}else{const l=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[l]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const nJ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rJ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},iJ={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},oJ={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},aJ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sJ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},lJ=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},cJ={ordinalNumber:lJ,era:Mu({values:nJ,defaultWidth:"wide"}),quarter:Mu({values:rJ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Mu({values:iJ,defaultWidth:"wide"}),day:Mu({values:oJ,defaultWidth:"wide"}),dayPeriod:Mu({values:aJ,defaultWidth:"wide",formattingValues:sJ,defaultFormattingWidth:"wide"})};function Lu(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const l=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?dJ(c,p=>p.test(l)):uJ(c,p=>p.test(l));let f;f=e.valueCallback?e.valueCallback(d):d,f=n.valueCallback?n.valueCallback(f):f;const g=t.slice(l.length);return{value:f,rest:g}}}function uJ(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dJ(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fJ(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(i.length);return{value:l,rest:c}}}const hJ=/^(\d+)(th|st|nd|rd)?/i,pJ=/\d+/i,mJ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},gJ={any:[/^b/i,/^(a|c)/i]},yJ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xJ={any:[/1/i,/2/i,/3/i,/4/i]},bJ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vJ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},wJ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},SJ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},CJ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},EJ={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},kJ={ordinalNumber:fJ({matchPattern:hJ,parsePattern:pJ,valueCallback:e=>parseInt(e,10)}),era:Lu({matchPatterns:mJ,defaultMatchWidth:"wide",parsePatterns:gJ,defaultParseWidth:"any"}),quarter:Lu({matchPatterns:yJ,defaultMatchWidth:"wide",parsePatterns:xJ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Lu({matchPatterns:bJ,defaultMatchWidth:"wide",parsePatterns:vJ,defaultParseWidth:"any"}),day:Lu({matchPatterns:wJ,defaultMatchWidth:"wide",parsePatterns:SJ,defaultParseWidth:"any"}),dayPeriod:Lu({matchPatterns:CJ,defaultMatchWidth:"any",parsePatterns:EJ,defaultParseWidth:"any"})},C8={code:"en-US",formatDistance:KZ,formatLong:JZ,formatRelative:tJ,localize:cJ,match:kJ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function TJ(e,t){const n=or(e,t?.in);return _Z(n,YZ(n))+1}function NJ(e,t){const n=or(e,t?.in),r=+Xp(n)-+DZ(n);return Math.round(r/w8)+1}function E8(e,t){const n=or(e,t?.in),r=n.getFullYear(),i=Jd(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=Wo(t?.in||e,0);l.setFullYear(r+1,0,a),l.setHours(0,0,0,0);const c=xd(l,t),d=Wo(t?.in||e,0);d.setFullYear(r,0,a),d.setHours(0,0,0,0);const f=xd(d,t);return+n>=+c?r+1:+n>=+f?r:r-1}function RJ(e,t){const n=Jd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=E8(e,t),a=Wo(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),xd(a,t)}function AJ(e,t){const n=or(e,t?.in),r=+xd(n,t)-+RJ(n,t);return Math.round(r/w8)+1}function Jt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ka={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Jt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Jt(n+1,2)},d(e,t){return Jt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Jt(e.getHours()%12||12,t.length)},H(e,t){return Jt(e.getHours(),t.length)},m(e,t){return Jt(e.getMinutes(),t.length)},s(e,t){return Jt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Jt(i,t.length)}},zl={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_4={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return ka.y(e,t)},Y:function(e,t,n,r){const i=E8(e,r),a=i>0?i:1-i;if(t==="YY"){const l=a%100;return Jt(l,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Jt(a,t.length)},R:function(e,t){const n=S8(e);return Jt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Jt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Jt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Jt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ka.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Jt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=AJ(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Jt(i,t.length)},I:function(e,t,n){const r=NJ(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Jt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ka.d(e,t)},D:function(e,t,n){const r=TJ(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Jt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Jt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Jt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Jt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=zl.noon:r===0?i=zl.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=zl.evening:r>=12?i=zl.afternoon:r>=4?i=zl.morning:i=zl.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ka.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ka.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Jt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Jt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ka.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ka.s(e,t)},S:function(e,t){return ka.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return I4(r);case"XXXX":case"XX":return Ns(r);default:return Ns(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return I4(r);case"xxxx":case"xx":return Ns(r);default:return Ns(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+D4(r,":");default:return"GMT"+Ns(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+D4(r,":");default:return"GMT"+Ns(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Jt(r,t.length)},T:function(e,t,n){return Jt(+e,t.length)}};function D4(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+Jt(a,2)}function I4(e,t){return e%60===0?(e>0?"-":"+")+Jt(Math.abs(e)/60,2):Ns(e,t)}function Ns(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Jt(Math.trunc(r/60),2),a=Jt(r%60,2);return n+i+t+a}const z4=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},k8=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},jJ=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return z4(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",z4(r,t)).replace("{{time}}",k8(i,t))},OJ={p:k8,P:jJ},MJ=/^D+$/,LJ=/^Y+$/,_J=["D","DD","YY","YYYY"];function DJ(e){return MJ.test(e)}function IJ(e){return LJ.test(e)}function zJ(e,t,n){const r=PJ(e,t,n);if(console.warn(r),_J.includes(e))throw new RangeError(r)}function PJ(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const FJ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,BJ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HJ=/^'([^]*?)'?$/,UJ=/''/g,qJ=/[a-zA-Z]/;function VJ(e,t,n){const r=Jd(),i=r.locale??C8,a=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=or(e,n?.in);if(!PZ(c))throw new RangeError("Invalid time value");let d=t.match(BJ).map(g=>{const p=g[0];if(p==="p"||p==="P"){const y=OJ[p];return y(g,i.formatLong)}return g}).join("").match(FJ).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const p=g[0];if(p==="'")return{isToken:!1,value:$J(g)};if(_4[p])return{isToken:!0,value:g};if(p.match(qJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:g}});i.localize.preprocessor&&(d=i.localize.preprocessor(c,d));const f={firstWeekContainsDate:a,weekStartsOn:l,locale:i};return d.map(g=>{if(!g.isToken)return g.value;const p=g.value;(IJ(p)||DJ(p))&&zJ(p,t,String(e));const y=_4[p[0]];return y(c,p,i.localize,f)}).join("")}function $J(e){const t=e.match(HJ);return t?t[1].replace(UJ,"'"):e}function GJ(e,t,n){const r=Jd(),i=n?.locale??r.locale??C8,a=2520,l=hp(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:l}),[d,f]=_m(n?.in,...l>0?[t,e]:[e,t]),g=GZ(f,d),p=(Zp(f)-Zp(d))/1e3,y=Math.round((g-p)/60);let x;if(y<2)return n?.includeSeconds?g<5?i.formatDistance("lessThanXSeconds",5,c):g<10?i.formatDistance("lessThanXSeconds",10,c):g<20?i.formatDistance("lessThanXSeconds",20,c):g<40?i.formatDistance("halfAMinute",0,c):g<60?i.formatDistance("lessThanXMinutes",1,c):i.formatDistance("xMinutes",1,c):y===0?i.formatDistance("lessThanXMinutes",1,c):i.formatDistance("xMinutes",y,c);if(y<45)return i.formatDistance("xMinutes",y,c);if(y<90)return i.formatDistance("aboutXHours",1,c);if(y<O4){const v=Math.round(y/60);return i.formatDistance("aboutXHours",v,c)}else{if(y<a)return i.formatDistance("xDays",1,c);if(y<Hh){const v=Math.round(y/O4);return i.formatDistance("xDays",v,c)}else if(y<Hh*2)return x=Math.round(y/Hh),i.formatDistance("aboutXMonths",x,c)}if(x=$Z(f,d),x<12){const v=Math.round(y/Hh);return i.formatDistance("xMonths",v,c)}else{const v=x%12,S=Math.trunc(x/12);return v<3?i.formatDistance("aboutXYears",S,c):v<9?i.formatDistance("overXYears",S,c):i.formatDistance("almostXYears",S+1,c)}}function P4(e,t){return GJ(e,IZ(e),t)}const YJ=e=>{const{apiClient:t}=De.getState();return t?t.request(Id.GET_FILE_METADATA,e):Promise.reject(new Error("Not connected"))},WJ=e=>({queryFn:()=>YJ({paths:e}),queryKey:["contextTree","fileMetadata",...[...e].sort()]}),KJ=({enabled:e=!0,paths:t,queryConfig:n})=>er({...WJ(t),enabled:e&&t.length>0,...n}),QJ=e=>{const{apiClient:t}=De.getState();return t?t.request(Id.GET_HISTORY,e):Promise.reject(new Error("Not connected"))},T8=({enabled:e=!0,path:t})=>EF({enabled:e&&!!t,getNextPageParam:n=>n.hasMore?n.nextCursor:void 0,initialPageParam:void 0,queryFn:({pageParam:n})=>QJ({cursor:n,path:t}),queryKey:["contextTree","history",t]});function XJ({className:e,...t}){return h.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:ge(e),...t})}function ZJ({className:e,...t}){return h.jsx("ol",{"data-slot":"breadcrumb-list",className:ge("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5",e),...t})}function q1({className:e,...t}){return h.jsx("li",{"data-slot":"breadcrumb-item",className:ge("inline-flex items-center gap-1.5",e),...t})}function F4({className:e,render:t,...n}){return qT({defaultTagName:"a",props:Ha({className:ge("transition-colors hover:text-foreground",e)},n),render:t,state:{slot:"breadcrumb-link"}})}function JJ({className:e,...t}){return h.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:ge("font-normal text-foreground",e),...t})}function B4({children:e,className:t,...n}){return h.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:ge("[&>svg]:size-3.5",t),...n,children:e??h.jsx(ck,{})})}function eee({className:e,...t}){return h.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:ge("flex size-5 items-center justify-center [&>svg]:size-4",e),...t,children:[h.jsx(wO,{}),h.jsx("span",{className:"sr-only",children:"More"})]})}const tee=3;function V1({type:e}){return e==="tree"?h.jsx(L9,{className:"text-secondary-foreground h-4 w-4.5",strokeWidth:2}):h.jsx(Em,{className:"text-primary-foreground size-4",strokeWidth:2})}function H4(){const{handleSelect:e,navigateHome:t,nodes:n,selectedPath:r}=kc(),i=C.useMemo(()=>{if(!r)return[];const d=r.split("/").filter(Boolean);return d.map((f,g)=>{const p=d.slice(0,g+1).join("/");return wb(n,p)}).filter(f=>f!==void 0)},[r,n]),a=i.length>tee,l=a?i.slice(0,-2):[],c=a?i.slice(-2):i;return h.jsx(XJ,{className:"min-w-0 text-sm font-medium",children:h.jsxs(ZJ,{className:"h-8 flex-nowrap gap-1 whitespace-nowrap sm:gap-1",children:[h.jsx(q1,{children:h.jsx(F4,{className:"cursor-pointer rounded px-1 hover:bg-neutral-800",onClick:t,children:h.jsx(_9,{className:"text-secondary-foreground size-4"})})}),a&&h.jsxs(h.Fragment,{children:[h.jsx(B4,{className:"text-muted-foreground text-sm font-medium",children:"/"}),h.jsx(q1,{children:h.jsxs(Xs,{children:[h.jsx(Zs,{className:"flex h-5 cursor-pointer items-center rounded-sm outline-none hover:bg-neutral-800 focus-visible:outline-none",children:h.jsx(eee,{className:"text-foreground"})}),h.jsx(ts,{align:"start",children:l.map(d=>h.jsxs(jn,{className:"flex cursor-pointer items-center gap-2 hover:bg-neutral-800",onClick:()=>e(d),children:[h.jsx(V1,{type:d.type}),h.jsx("span",{children:d.name})]},d.path))})]})})]}),c.map((d,f)=>{const g=f===c.length-1;return h.jsxs(C.Fragment,{children:[h.jsx(B4,{className:"text-muted-foreground text-sm font-medium",children:"/"}),h.jsx(q1,{children:g?h.jsxs(JJ,{className:"text-secondary-foreground flex items-center gap-2 px-2 text-sm font-medium",children:[h.jsx(V1,{type:d.type}),h.jsx("span",{children:d.name})]}):h.jsxs(F4,{className:"text-muted-foreground flex cursor-pointer items-center gap-2 rounded px-2 text-sm font-medium hover:bg-neutral-800",onClick:()=>e(d),children:[h.jsx(V1,{type:d.type}),h.jsx("span",{children:d.name})]})})]},d.path)})]})})}function U4(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const l=n.slice(i,r).trim();(l||!a)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function nee(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ree=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iee=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oee={};function q4(e,t){return(oee.jsx?iee:ree).test(e)}const aee=/[ \t\n\f\r]/g;function see(e){return typeof e=="object"?e.type==="text"?V4(e.value):!1:V4(e)}function V4(e){return e.replace(aee,"")===""}class ef{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ef.prototype.normal={};ef.prototype.property={};ef.prototype.space=void 0;function N8(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ef(n,r,t)}function bd(e){return e.toLowerCase()}class Wr{constructor(t,n){this.attribute=n,this.property=t}}Wr.prototype.attribute="";Wr.prototype.booleanish=!1;Wr.prototype.boolean=!1;Wr.prototype.commaOrSpaceSeparated=!1;Wr.prototype.commaSeparated=!1;Wr.prototype.defined=!1;Wr.prototype.mustUseProperty=!1;Wr.prototype.number=!1;Wr.prototype.overloadedBoolean=!1;Wr.prototype.property="";Wr.prototype.spaceSeparated=!1;Wr.prototype.space=void 0;let lee=0;const bt=Js(),Un=Js(),fy=Js(),Ne=Js(),dn=Js(),rc=Js(),ri=Js();function Js(){return 2**++lee}const hy=Object.freeze(Object.defineProperty({__proto__:null,boolean:bt,booleanish:Un,commaOrSpaceSeparated:ri,commaSeparated:rc,number:Ne,overloadedBoolean:fy,spaceSeparated:dn},Symbol.toStringTag,{value:"Module"})),$1=Object.keys(hy);class Sb extends Wr{constructor(t,n,r,i){let a=-1;if(super(t,n),$4(this,"space",i),typeof r=="number")for(;++a<$1.length;){const l=$1[a];$4(this,$1[a],(r&hy[l])===hy[l])}}}Sb.prototype.defined=!0;function $4(e,t,n){n&&(e[t]=n)}function Tc(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Sb(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bd(r)]=r,n[bd(a.attribute)]=r}return new ef(t,n,e.space)}const R8=Tc({properties:{ariaActiveDescendant:null,ariaAtomic:Un,ariaAutoComplete:null,ariaBusy:Un,ariaChecked:Un,ariaColCount:Ne,ariaColIndex:Ne,ariaColSpan:Ne,ariaControls:dn,ariaCurrent:null,ariaDescribedBy:dn,ariaDetails:null,ariaDisabled:Un,ariaDropEffect:dn,ariaErrorMessage:null,ariaExpanded:Un,ariaFlowTo:dn,ariaGrabbed:Un,ariaHasPopup:null,ariaHidden:Un,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dn,ariaLevel:Ne,ariaLive:null,ariaModal:Un,ariaMultiLine:Un,ariaMultiSelectable:Un,ariaOrientation:null,ariaOwns:dn,ariaPlaceholder:null,ariaPosInSet:Ne,ariaPressed:Un,ariaReadOnly:Un,ariaRelevant:null,ariaRequired:Un,ariaRoleDescription:dn,ariaRowCount:Ne,ariaRowIndex:Ne,ariaRowSpan:Ne,ariaSelected:Un,ariaSetSize:Ne,ariaSort:null,ariaValueMax:Ne,ariaValueMin:Ne,ariaValueNow:Ne,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function A8(e,t){return t in e?e[t]:t}function j8(e,t){return A8(e,t.toLowerCase())}const cee=Tc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:rc,acceptCharset:dn,accessKey:dn,action:null,allow:null,allowFullScreen:bt,allowPaymentRequest:bt,allowUserMedia:bt,alt:null,as:null,async:bt,autoCapitalize:null,autoComplete:dn,autoFocus:bt,autoPlay:bt,blocking:dn,capture:null,charSet:null,checked:bt,cite:null,className:dn,cols:Ne,colSpan:null,content:null,contentEditable:Un,controls:bt,controlsList:dn,coords:Ne|rc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:bt,defer:bt,dir:null,dirName:null,disabled:bt,download:fy,draggable:Un,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:bt,formTarget:null,headers:dn,height:Ne,hidden:fy,high:Ne,href:null,hrefLang:null,htmlFor:dn,httpEquiv:dn,id:null,imageSizes:null,imageSrcSet:null,inert:bt,inputMode:null,integrity:null,is:null,isMap:bt,itemId:null,itemProp:dn,itemRef:dn,itemScope:bt,itemType:dn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:bt,low:Ne,manifest:null,max:null,maxLength:Ne,media:null,method:null,min:null,minLength:Ne,multiple:bt,muted:bt,name:null,nonce:null,noModule:bt,noValidate:bt,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:bt,optimum:Ne,pattern:null,ping:dn,placeholder:null,playsInline:bt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:bt,referrerPolicy:null,rel:dn,required:bt,reversed:bt,rows:Ne,rowSpan:Ne,sandbox:dn,scope:null,scoped:bt,seamless:bt,selected:bt,shadowRootClonable:bt,shadowRootDelegatesFocus:bt,shadowRootMode:null,shape:null,size:Ne,sizes:null,slot:null,span:Ne,spellCheck:Un,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ne,step:null,style:null,tabIndex:Ne,target:null,title:null,translate:null,type:null,typeMustMatch:bt,useMap:null,value:Un,width:Ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dn,axis:null,background:null,bgColor:null,border:Ne,borderColor:null,bottomMargin:Ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:bt,declare:bt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ne,leftMargin:Ne,link:null,longDesc:null,lowSrc:null,marginHeight:Ne,marginWidth:Ne,noResize:bt,noHref:bt,noShade:bt,noWrap:bt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ne,rules:null,scheme:null,scrolling:Un,standby:null,summary:null,text:null,topMargin:Ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:bt,disableRemotePlayback:bt,prefix:null,property:null,results:Ne,security:null,unselectable:null},space:"html",transform:j8}),uee=Tc({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:ri,accentHeight:Ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ne,amplitude:Ne,arabicForm:null,ascent:Ne,attributeName:null,attributeType:null,azimuth:Ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ne,by:null,calcMode:null,capHeight:Ne,className:dn,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:Ne,diffuseConstant:Ne,direction:null,display:null,dur:null,divisor:Ne,dominantBaseline:null,download:bt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ne,enableBackground:null,end:null,event:null,exponent:Ne,externalResourcesRequired:null,fill:null,fillOpacity:Ne,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:rc,g2:rc,glyphName:rc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ne,horizOriginX:Ne,horizOriginY:Ne,id:null,ideographic:Ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ne,k:Ne,k1:Ne,k2:Ne,k3:Ne,k4:Ne,kernelMatrix:ri,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ne,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:Ne,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:Ne,overlineThickness:Ne,paintOrder:null,panose1:null,path:null,pathLength:Ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ne,pointsAtY:Ne,pointsAtZ:Ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ri,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ri,rev:ri,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ri,requiredFeatures:ri,requiredFonts:ri,requiredFormats:ri,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:Ne,specularExponent:Ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ne,strikethroughThickness:Ne,string:null,stroke:null,strokeDashArray:ri,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ne,strokeOpacity:Ne,strokeWidth:null,style:null,surfaceScale:Ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ri,tabIndex:Ne,tableValues:null,target:null,targetX:Ne,targetY:Ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ri,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ne,underlineThickness:Ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ne,values:null,vAlphabetic:Ne,vMathematical:Ne,vectorEffect:null,vHanging:Ne,vIdeographic:Ne,version:null,vertAdvY:Ne,vertOriginX:Ne,vertOriginY:Ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:A8}),O8=Tc({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()}}),M8=Tc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:j8}),L8=Tc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dee={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"},fee=/[A-Z]/g,G4=/-[a-z]/g,hee=/^data[-\w.:]+$/i;function _8(e,t){const n=bd(t);let r=t,i=Wr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hee.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(G4,mee);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!G4.test(a)){let l=a.replace(fee,pee);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Sb}return new i(r,t)}function pee(e){return"-"+e.toLowerCase()}function mee(e){return e.charAt(1).toUpperCase()}const D8=N8([R8,cee,O8,M8,L8],"html"),Dm=N8([R8,uee,O8,M8,L8],"svg");function Y4(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function gee(e){return e.join(" ").trim()}var Pl={},G1,W4;function yee(){if(W4)return G1;W4=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
88
+ `,f="/",g="*",p="",y="comment",x="declaration";function v(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var T=1,R=1;function M(G){var B=G.match(t);B&&(T+=B.length);var F=G.lastIndexOf(d);R=~F?G.length-F:R+G.length}function O(){var G={line:T,column:R};return function(B){return B.position=new A(G),H(),B}}function A(G){this.start=G,this.end={line:T,column:R},this.source=k.source}A.prototype.content=E;function N(G){var B=new Error(k.source+":"+T+":"+R+": "+G);if(B.reason=G,B.filename=k.source,B.line=T,B.column=R,B.source=E,!k.silent)throw B}function D(G){var B=G.exec(E);if(B){var F=B[0];return M(F),E=E.slice(F.length),B}}function H(){D(n)}function I(G){var B;for(G=G||[];B=U();)B!==!1&&G.push(B);return G}function U(){var G=O();if(!(f!=E.charAt(0)||g!=E.charAt(1))){for(var B=2;p!=E.charAt(B)&&(g!=E.charAt(B)||f!=E.charAt(B+1));)++B;if(B+=2,p===E.charAt(B-1))return N("End of comment missing");var F=E.slice(2,B-2);return R+=2,M(F),E=E.slice(B),R+=2,G({type:y,comment:F})}}function $(){var G=O(),B=D(r);if(B){if(U(),!D(i))return N("property missing ':'");var F=D(a),q=G({type:x,property:S(B[0].replace(e,p)),value:F?S(F[0].replace(e,p)):p});return D(l),q}}function V(){var G=[];I(G);for(var B;B=$();)B!==!1&&(G.push(B),I(G));return G}return H(),V()}function S(E){return E?E.replace(c,p):p}return G1=v,G1}var K4;function xee(){if(K4)return Pl;K4=1;var e=Pl&&Pl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.default=n;const t=e(yee());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),c=typeof i=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:g}=d;c?i(f,g,d):g&&(a=a||{},a[f]=g)}),a}return Pl}var _u={},Q4;function bee(){if(Q4)return _u;Q4=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,g){return g.toUpperCase()},c=function(f,g){return"".concat(g,"-")},d=function(f,g){return g===void 0&&(g={}),a(f)?f:(f=f.toLowerCase(),g.reactCompat?f=f.replace(i,c):f=f.replace(r,c),f.replace(t,l))};return _u.camelCase=d,_u}var Du,X4;function vee(){if(X4)return Du;X4=1;var e=Du&&Du.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(xee()),n=bee();function r(i,a){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(c,d){c&&d&&(l[(0,n.camelCase)(c,a)]=d)}),l}return r.default=r,Du=r,Du}var wee=vee();const See=pc(wee),I8=z8("end"),Cb=z8("start");function z8(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Cee(e){const t=Cb(e),n=I8(e);if(t&&n)return{start:t,end:n}}function Ju(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Z4(e.position):"start"in e||"end"in e?Z4(e):"line"in e||"column"in e?py(e):""}function py(e){return J4(e&&e.line)+":"+J4(e&&e.column)}function Z4(e){return py(e&&e.start)+"-"+py(e&&e.end)}function J4(e){return e&&typeof e=="number"?e:1}class Sr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},l=!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&&(l=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=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=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=Ju(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=l&&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}}Sr.prototype.file="";Sr.prototype.name="";Sr.prototype.reason="";Sr.prototype.message="";Sr.prototype.stack="";Sr.prototype.column=void 0;Sr.prototype.line=void 0;Sr.prototype.ancestors=void 0;Sr.prototype.cause=void 0;Sr.prototype.fatal=void 0;Sr.prototype.place=void 0;Sr.prototype.ruleId=void 0;Sr.prototype.source=void 0;const Eb={}.hasOwnProperty,Eee=new Map,kee=/[A-Z]/g,Tee=new Set(["table","tbody","thead","tfoot","tr"]),Nee=new Set(["td","th"]),P8="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ree(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Iee(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");r=Dee(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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"?Dm:D8,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=F8(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function F8(e,t,n){if(t.type==="element")return Aee(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return jee(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Mee(e,t,n);if(t.type==="mdxjsEsm")return Oee(e,t);if(t.type==="root")return Lee(e,t,n);if(t.type==="text")return _ee(e,t)}function Aee(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Dm,e.schema=i),e.ancestors.push(t);const a=H8(e,t.tagName,!1),l=zee(e,t);let c=Tb(e,t);return Tee.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!see(d):!0})),B8(e,l,a,t),kb(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function jee(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}vd(e,t.position)}function Oee(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vd(e,t.position)}function Mee(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Dm,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:H8(e,t.name,!0),l=Pee(e,t),c=Tb(e,t);return B8(e,l,a,t),kb(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function Lee(e,t,n){const r={};return kb(r,Tb(e,t)),e.create(t,e.Fragment,r,n)}function _ee(e,t){return t.value}function B8(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function kb(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Dee(e,t,n){return r;function r(i,a,l,c){const f=Array.isArray(l.children)?n:t;return c?f(a,l,c):f(a,l)}}function Iee(e,t){return n;function n(r,i,a,l){const c=Array.isArray(a.children),d=Cb(r);return t(i,a,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function zee(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Eb.call(t.properties,i)){const a=Fee(e,i,t.properties[i]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&Nee.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Pee(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else vd(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else vd(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Tb(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Eee;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=i.get(d)||0;l=d+"-"+f,i.set(d,f+1)}}const c=F8(e,a,l);c!==void 0&&n.push(c)}return n}function Fee(e,t,n){const r=_8(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?nee(n):gee(n)),r.property==="style"){let i=typeof n=="object"?n:Bee(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Hee(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?dee[r.property]||r.property:r.attribute,n]}}function Bee(e,t){try{return See(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Sr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=P8+"#cannot-parse-style-attribute",i}}function H8(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,l;for(;++a<i.length;){const c=q4(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=q4(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Eb.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);vd(e)}function vd(e,t){const n=new Sr("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=P8+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Hee(e){const t={};let n;for(n in e)Eb.call(e,n)&&(t[Uee(n)]=e[n]);return t}function Uee(e){let t=e.replace(kee,qee);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function qee(e){return"-"+e.toLowerCase()}const Y1={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"]},Vee={};function Nb(e,t){const n=Vee,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return U8(e,r,i)}function U8(e,t,n){if($ee(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 eE(e.children,t,n)}return Array.isArray(e)?eE(e,t,n):""}function eE(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=U8(e[i],t,n);return r.join("")}function $ee(e){return!!(e&&typeof e=="object")}const tE=document.createElement("i");function wd(e){const t="&"+e+";";tE.innerHTML=t;const n=tE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function di(e,t,n,r){const i=e.length;let a=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function Oi(e,t){return e.length>0?(di(e,e.length,0,t),e):t}const nE={}.hasOwnProperty;function q8(e){const t={};let n=-1;for(;++n<e.length;)Gee(t,e[n]);return t}function Gee(e,t){let n;for(n in t){const i=(nE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){nE.call(i,l)||(i[l]=[]);const c=a[l];Yee(i[l],Array.isArray(c)?c:c?[c]:[])}}}function Yee(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);di(e,0,0,r)}function V8(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 Wi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mr=rs(/[A-Za-z]/),br=rs(/[\dA-Za-z]/),Wee=rs(/[#-'*+\--9=?A-Z^-~]/);function Jp(e){return e!==null&&(e<32||e===127)}const my=rs(/\d/),Kee=rs(/[\dA-Fa-f]/),Qee=rs(/[!-/:-@[-`{-~]/);function ot(e){return e!==null&&e<-2}function ln(e){return e!==null&&(e<0||e===32)}function vt(e){return e===-2||e===-1||e===32}const Im=rs(new RegExp("\\p{P}|\\p{S}","u")),Hs=rs(/\s/);function rs(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Nc(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&br(e.charCodeAt(n+1))&&br(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),i=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Pt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return vt(d)?(e.enter(n),c(d)):t(d)}function c(d){return vt(d)&&a++<i?(e.consume(d),c):(e.exit(n),t(d))}}const Xee={tokenize:Zee};function Zee(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Pt(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ot(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const Jee={tokenize:ete},rE={tokenize:tte};function ete(e){const t=this,n=[];let r=0,i,a,l;return c;function c(R){if(r<n.length){const M=n[r];return t.containerState=M[1],e.attempt(M[0].continuation,d,f)(R)}return f(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const M=t.events.length;let O=M,A;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){A=t.events[O][1].end;break}k(r);let N=M;for(;N<t.events.length;)t.events[N][1].end={...A},N++;return di(t.events,O+1,0,t.events.slice(M)),t.events.length=N,f(R)}return c(R)}function f(R){if(r===n.length){if(!i)return y(R);if(i.currentConstruct&&i.currentConstruct.concrete)return v(R);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(rE,g,p)(R)}function g(R){return i&&T(),k(r),y(R)}function p(R){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,v(R)}function y(R){return t.containerState={},e.attempt(rE,x,v)(R)}function x(R){return r++,n.push([t.currentConstruct,t.containerState]),y(R)}function v(R){if(R===null){i&&T(),k(0),e.consume(R);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),S(R)}function S(R){if(R===null){E(e.exit("chunkFlow"),!0),k(0),e.consume(R);return}return ot(R)?(e.consume(R),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),S)}function E(R,M){const O=t.sliceStream(R);if(M&&O.push(null),R.previous=a,a&&(a.next=R),a=R,i.defineSkip(R.start),i.write(O),t.parser.lazy[R.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<l&&(!i.events[A][1].end||i.events[A][1].end.offset>l))return;const N=t.events.length;let D=N,H,I;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(H){I=t.events[D][1].end;break}H=!0}for(k(r),A=N;A<t.events.length;)t.events[A][1].end={...I},A++;di(t.events,D+1,0,t.events.slice(N)),t.events.length=A}}function k(R){let M=n.length;for(;M-- >R;){const O=n[M];t.containerState=O[1],O[0].exit.call(t,e)}n.length=R}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function tte(e,t,n){return Pt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hc(e){if(e===null||ln(e)||Hs(e))return 1;if(Im(e))return 2}function zm(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const gy={name:"attention",resolveAll:nte,tokenize:rte};function nte(e,t){let n=-1,r,i,a,l,c,d,f,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},y={...e[n][1].start};iE(p,-d),iE(y,d),l={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Oi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Oi(f,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=Oi(f,zm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Oi(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,f=Oi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,di(e,r-1,n-r+3,f),n=r+f.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function rte(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=hc(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),g=hc(d),p=!g||g===2&&i||n.includes(d),y=!i||i===2&&g||n.includes(r);return f._open=!!(a===42?p:p&&(i||!y)),f._close=!!(a===42?y:y&&(g||!p)),t(d)}}function iE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ite={name:"autolink",tokenize:ote};function ote(e,t,n){let r=0;return i;function i(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(x){return Mr(x)?(e.consume(x),l):x===64?n(x):f(x)}function l(x){return x===43||x===45||x===46||br(x)?(r=1,c(x)):f(x)}function c(x){return x===58?(e.consume(x),r=0,d):(x===43||x===45||x===46||br(x))&&r++<32?(e.consume(x),c):(r=0,f(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||Jp(x)?n(x):(e.consume(x),d)}function f(x){return x===64?(e.consume(x),g):Wee(x)?(e.consume(x),f):n(x)}function g(x){return br(x)?p(x):n(x)}function p(x){return x===46?(e.consume(x),r=0,g):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):y(x)}function y(x){if((x===45||br(x))&&r++<63){const v=x===45?y:p;return e.consume(x),v}return n(x)}}const tf={partial:!0,tokenize:ate};function ate(e,t,n){return r;function r(a){return vt(a)?Pt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ot(a)?t(a):n(a)}}const $8={continuation:{tokenize:lte},exit:cte,name:"blockQuote",tokenize:ste};function ste(e,t,n){const r=this;return i;function i(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return vt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function lte(e,t,n){const r=this;return i;function i(l){return vt(l)?Pt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt($8,t,n)(l)}}function cte(e){e.exit("blockQuote")}const G8={name:"characterEscape",tokenize:ute};function ute(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Qee(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Y8={name:"characterReference",tokenize:dte};function dte(e,t,n){const r=this;let i=0,a,l;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=br,g(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=Kee,g):(e.enter("characterReferenceValue"),a=7,l=my,g(p))}function g(p){if(p===59&&i){const y=e.exit("characterReferenceValue");return l===br&&!wd(r.sliceSerialize(y))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&i++<a?(e.consume(p),g):n(p)}}const oE={partial:!0,tokenize:hte},aE={concrete:!0,name:"codeFenced",tokenize:fte};function fte(e,t,n){const r=this,i={partial:!0,tokenize:O};let a=0,l=0,c;return d;function d(A){return f(A)}function f(A){const N=r.events[r.events.length-1];return a=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,c=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(A)}function g(A){return A===c?(l++,e.consume(A),g):l<3?n(A):(e.exit("codeFencedFenceSequence"),vt(A)?Pt(e,p,"whitespace")(A):p(A))}function p(A){return A===null||ot(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(oE,S,M)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===null||ot(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):vt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pt(e,x,"whitespace")(A)):A===96&&A===c?n(A):(e.consume(A),y)}function x(A){return A===null||ot(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(A))}function v(A){return A===null||ot(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===c?n(A):(e.consume(A),v)}function S(A){return e.attempt(i,M,E)(A)}function E(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),k}function k(A){return a>0&&vt(A)?Pt(e,T,"linePrefix",a+1)(A):T(A)}function T(A){return A===null||ot(A)?e.check(oE,S,M)(A):(e.enter("codeFlowValue"),R(A))}function R(A){return A===null||ot(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),R)}function M(A){return e.exit("codeFenced"),t(A)}function O(A,N,D){let H=0;return I;function I(B){return A.enter("lineEnding"),A.consume(B),A.exit("lineEnding"),U}function U(B){return A.enter("codeFencedFence"),vt(B)?Pt(A,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):$(B)}function $(B){return B===c?(A.enter("codeFencedFenceSequence"),V(B)):D(B)}function V(B){return B===c?(H++,A.consume(B),V):H>=l?(A.exit("codeFencedFenceSequence"),vt(B)?Pt(A,G,"whitespace")(B):G(B)):D(B)}function G(B){return B===null||ot(B)?(A.exit("codeFencedFence"),N(B)):D(B)}}}function hte(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const W1={name:"codeIndented",tokenize:mte},pte={partial:!0,tokenize:gte};function mte(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),Pt(e,a,"linePrefix",5)(f)}function a(f){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):ot(f)?e.attempt(pte,l,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||ot(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function gte(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):ot(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Pt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):ot(l)?i(l):n(l)}}const yte={name:"codeText",previous:bte,resolve:xte,tokenize:vte};function xte(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function bte(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vte(e,t,n){let r=0,i,a;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),r++,c):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(a=e.enter("codeTextSequence"),i=0,g(p)):ot(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||ot(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),f)}function g(p){return p===96?(e.consume(p),i++,g):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",f(p))}}class wte{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 r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Iu(this.left,r),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),Iu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Iu(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);Iu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Iu(this.left,n.reverse())}}}function Iu(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 W8(e){const t={};let n=-1,r,i,a,l,c,d,f;const g=new wte(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ste(g,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(l=g.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(g.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...g.get(i)[1].start},c=g.slice(i,n),c.unshift(r),g.splice(i,n-i+1,c))}}return di(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!f}function Ste(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],f={};let g,p,y=-1,x=n,v=0,S=0;const E=[S];for(;x;){for(;e.get(++i)[1]!==x;);a.push(i),x._tokenizer||(g=r.sliceStream(x),x.next||g.push(null),p&&l.defineSkip(x.start),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=x,x=x.next}for(x=n;++y<c.length;)c[y][0]==="exit"&&c[y-1][0]==="enter"&&c[y][1].type===c[y-1][1].type&&c[y][1].start.line!==c[y][1].end.line&&(S=y+1,E.push(S),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(l.events=[],x?(x._tokenizer=void 0,x.previous=void 0):E.pop(),y=E.length;y--;){const k=c.slice(E[y],E[y+1]),T=a.pop();d.push([T,T+k.length-1]),e.splice(T,2,k)}for(d.reverse(),y=-1;++y<d.length;)f[v+d[y][0]]=v+d[y][1],v+=d[y][1]-d[y][0]-1;return f}const Cte={resolve:kte,tokenize:Tte},Ete={partial:!0,tokenize:Nte};function kte(e){return W8(e),e}function Tte(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?a(c):ot(c)?e.check(Ete,l,a)(c):(e.consume(c),i)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Nte(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Pt(e,a,"linePrefix")}function a(l){if(l===null||ot(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function K8(e,t,n,r,i,a,l,c,d){const f=d||Number.POSITIVE_INFINITY;let g=0;return p;function p(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),y):k===null||k===32||k===41||Jp(k)?n(k):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(k))}function y(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===62?(e.exit("chunkString"),e.exit(c),y(k)):k===null||k===60||ot(k)?n(k):(e.consume(k),k===92?v:x)}function v(k){return k===60||k===62||k===92?(e.consume(k),x):x(k)}function S(k){return!g&&(k===null||k===41||ln(k))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(k)):g<f&&k===40?(e.consume(k),g++,S):k===41?(e.consume(k),g--,S):k===null||k===32||k===40||Jp(k)?n(k):(e.consume(k),k===92?E:S)}function E(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function Q8(e,t,n,r,i,a){const l=this;let c=0,d;return f;function f(x){return e.enter(r),e.enter(i),e.consume(x),e.exit(i),e.enter(a),g}function g(x){return c>999||x===null||x===91||x===93&&!d||x===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(x):x===93?(e.exit(a),e.enter(i),e.consume(x),e.exit(i),e.exit(r),t):ot(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||ot(x)||c++>999?(e.exit("chunkString"),g(x)):(e.consume(x),d||(d=!vt(x)),x===92?y:p)}function y(x){return x===91||x===92||x===93?(e.consume(x),c++,p):p(x)}}function X8(e,t,n,r,i,a){let l;return c;function c(y){return y===34||y===39||y===40?(e.enter(r),e.enter(i),e.consume(y),e.exit(i),l=y===40?41:y,d):n(y)}function d(y){return y===l?(e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):(e.enter(a),f(y))}function f(y){return y===l?(e.exit(a),d(l)):y===null?n(y):ot(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Pt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===l||y===null||ot(y)?(e.exit("chunkString"),f(y)):(e.consume(y),y===92?p:g)}function p(y){return y===l||y===92?(e.consume(y),g):g(y)}}function ed(e,t){let n;return r;function r(i){return ot(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):vt(i)?Pt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Rte={name:"definition",tokenize:jte},Ate={partial:!0,tokenize:Ote};function jte(e,t,n){const r=this;let i;return a;function a(x){return e.enter("definition"),l(x)}function l(x){return Q8.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return i=Wi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):n(x)}function d(x){return ln(x)?ed(e,f)(x):f(x)}function f(x){return K8(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return e.attempt(Ate,p,p)(x)}function p(x){return vt(x)?Pt(e,y,"whitespace")(x):y(x)}function y(x){return x===null||ot(x)?(e.exit("definition"),r.parser.defined.push(i),t(x)):n(x)}}function Ote(e,t,n){return r;function r(c){return ln(c)?ed(e,i)(c):n(c)}function i(c){return X8(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return vt(c)?Pt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||ot(c)?t(c):n(c)}}const Mte={name:"hardBreakEscape",tokenize:Lte};function Lte(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ot(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const _te={name:"headingAtx",resolve:Dte,tokenize:Ite};function Dte(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},di(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Ite(e,t,n){let r=0;return i;function i(g){return e.enter("atxHeading"),a(g)}function a(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&r++<6?(e.consume(g),l):g===null||ln(g)?(e.exit("atxHeadingSequence"),c(g)):n(g)}function c(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||ot(g)?(e.exit("atxHeading"),t(g)):vt(g)?Pt(e,c,"whitespace")(g):(e.enter("atxHeadingText"),f(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),c(g))}function f(g){return g===null||g===35||ln(g)?(e.exit("atxHeadingText"),c(g)):(e.consume(g),f)}}const zte=["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"],sE=["pre","script","style","textarea"],Pte={concrete:!0,name:"htmlFlow",resolveTo:Hte,tokenize:Ute},Fte={partial:!0,tokenize:Vte},Bte={partial:!0,tokenize:qte};function Hte(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 Ute(e,t,n){const r=this;let i,a,l,c,d;return f;function f(L){return g(L)}function g(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),p}function p(L){return L===33?(e.consume(L),y):L===47?(e.consume(L),a=!0,S):L===63?(e.consume(L),i=3,r.interrupt?t:_):Mr(L)?(e.consume(L),l=String.fromCharCode(L),E):n(L)}function y(L){return L===45?(e.consume(L),i=2,x):L===91?(e.consume(L),i=5,c=0,v):Mr(L)?(e.consume(L),i=4,r.interrupt?t:_):n(L)}function x(L){return L===45?(e.consume(L),r.interrupt?t:_):n(L)}function v(L){const ee="CDATA[";return L===ee.charCodeAt(c++)?(e.consume(L),c===ee.length?r.interrupt?t:$:v):n(L)}function S(L){return Mr(L)?(e.consume(L),l=String.fromCharCode(L),E):n(L)}function E(L){if(L===null||L===47||L===62||ln(L)){const ee=L===47,te=l.toLowerCase();return!ee&&!a&&sE.includes(te)?(i=1,r.interrupt?t(L):$(L)):zte.includes(l.toLowerCase())?(i=6,ee?(e.consume(L),k):r.interrupt?t(L):$(L)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):a?T(L):R(L))}return L===45||br(L)?(e.consume(L),l+=String.fromCharCode(L),E):n(L)}function k(L){return L===62?(e.consume(L),r.interrupt?t:$):n(L)}function T(L){return vt(L)?(e.consume(L),T):I(L)}function R(L){return L===47?(e.consume(L),I):L===58||L===95||Mr(L)?(e.consume(L),M):vt(L)?(e.consume(L),R):I(L)}function M(L){return L===45||L===46||L===58||L===95||br(L)?(e.consume(L),M):O(L)}function O(L){return L===61?(e.consume(L),A):vt(L)?(e.consume(L),O):R(L)}function A(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),d=L,N):vt(L)?(e.consume(L),A):D(L)}function N(L){return L===d?(e.consume(L),d=null,H):L===null||ot(L)?n(L):(e.consume(L),N)}function D(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||ln(L)?O(L):(e.consume(L),D)}function H(L){return L===47||L===62||vt(L)?R(L):n(L)}function I(L){return L===62?(e.consume(L),U):n(L)}function U(L){return L===null||ot(L)?$(L):vt(L)?(e.consume(L),U):n(L)}function $(L){return L===45&&i===2?(e.consume(L),F):L===60&&i===1?(e.consume(L),q):L===62&&i===4?(e.consume(L),z):L===63&&i===3?(e.consume(L),_):L===93&&i===5?(e.consume(L),ie):ot(L)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Fte,Y,V)(L)):L===null||ot(L)?(e.exit("htmlFlowData"),V(L)):(e.consume(L),$)}function V(L){return e.check(Bte,G,Y)(L)}function G(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),B}function B(L){return L===null||ot(L)?V(L):(e.enter("htmlFlowData"),$(L))}function F(L){return L===45?(e.consume(L),_):$(L)}function q(L){return L===47?(e.consume(L),l="",W):$(L)}function W(L){if(L===62){const ee=l.toLowerCase();return sE.includes(ee)?(e.consume(L),z):$(L)}return Mr(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),W):$(L)}function ie(L){return L===93?(e.consume(L),_):$(L)}function _(L){return L===62?(e.consume(L),z):L===45&&i===2?(e.consume(L),_):$(L)}function z(L){return L===null||ot(L)?(e.exit("htmlFlowData"),Y(L)):(e.consume(L),z)}function Y(L){return e.exit("htmlFlow"),t(L)}}function qte(e,t,n){const r=this;return i;function i(l){return ot(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Vte(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(tf,t,n)}}const $te={name:"htmlText",tokenize:Gte};function Gte(e,t,n){const r=this;let i,a,l;return c;function c(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),O):_===63?(e.consume(_),R):Mr(_)?(e.consume(_),D):n(_)}function f(_){return _===45?(e.consume(_),g):_===91?(e.consume(_),a=0,v):Mr(_)?(e.consume(_),T):n(_)}function g(_){return _===45?(e.consume(_),x):n(_)}function p(_){return _===null?n(_):_===45?(e.consume(_),y):ot(_)?(l=p,q(_)):(e.consume(_),p)}function y(_){return _===45?(e.consume(_),x):p(_)}function x(_){return _===62?F(_):_===45?y(_):p(_)}function v(_){const z="CDATA[";return _===z.charCodeAt(a++)?(e.consume(_),a===z.length?S:v):n(_)}function S(_){return _===null?n(_):_===93?(e.consume(_),E):ot(_)?(l=S,q(_)):(e.consume(_),S)}function E(_){return _===93?(e.consume(_),k):S(_)}function k(_){return _===62?F(_):_===93?(e.consume(_),k):S(_)}function T(_){return _===null||_===62?F(_):ot(_)?(l=T,q(_)):(e.consume(_),T)}function R(_){return _===null?n(_):_===63?(e.consume(_),M):ot(_)?(l=R,q(_)):(e.consume(_),R)}function M(_){return _===62?F(_):R(_)}function O(_){return Mr(_)?(e.consume(_),A):n(_)}function A(_){return _===45||br(_)?(e.consume(_),A):N(_)}function N(_){return ot(_)?(l=N,q(_)):vt(_)?(e.consume(_),N):F(_)}function D(_){return _===45||br(_)?(e.consume(_),D):_===47||_===62||ln(_)?H(_):n(_)}function H(_){return _===47?(e.consume(_),F):_===58||_===95||Mr(_)?(e.consume(_),I):ot(_)?(l=H,q(_)):vt(_)?(e.consume(_),H):F(_)}function I(_){return _===45||_===46||_===58||_===95||br(_)?(e.consume(_),I):U(_)}function U(_){return _===61?(e.consume(_),$):ot(_)?(l=U,q(_)):vt(_)?(e.consume(_),U):H(_)}function $(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,V):ot(_)?(l=$,q(_)):vt(_)?(e.consume(_),$):(e.consume(_),G)}function V(_){return _===i?(e.consume(_),i=void 0,B):_===null?n(_):ot(_)?(l=V,q(_)):(e.consume(_),V)}function G(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||ln(_)?H(_):(e.consume(_),G)}function B(_){return _===47||_===62||ln(_)?H(_):n(_)}function F(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function q(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),W}function W(_){return vt(_)?Pt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):ie(_)}function ie(_){return e.enter("htmlTextData"),l(_)}}const Rb={name:"labelEnd",resolveAll:Qte,resolveTo:Xte,tokenize:Zte},Yte={tokenize:Jte},Wte={tokenize:ene},Kte={tokenize:tne};function Qte(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&di(e,0,e.length,n),e}function Xte(e,t){let n=e.length,r=0,i,a,l,c;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(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",f,t]],c=Oi(c,e.slice(a+1,a+r+3)),c=Oi(c,[["enter",g,t]]),c=Oi(c,zm(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=Oi(c,[["exit",g,t],e[l-2],e[l-1],["exit",f,t]]),c=Oi(c,e.slice(l+1)),c=Oi(c,[["exit",d,t]]),di(e,a,e.length,c),e}function Zte(e,t,n){const r=this;let i=r.events.length,a,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return c;function c(y){return a?a._inactive?p(y):(l=r.parser.defined.includes(Wi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):n(y)}function d(y){return y===40?e.attempt(Yte,g,l?g:p)(y):y===91?e.attempt(Wte,g,l?f:p)(y):l?g(y):p(y)}function f(y){return e.attempt(Kte,g,p)(y)}function g(y){return t(y)}function p(y){return a._balanced=!0,n(y)}}function Jte(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return ln(p)?ed(e,a)(p):a(p)}function a(p){return p===41?g(p):K8(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return ln(p)?ed(e,d)(p):g(p)}function c(p){return n(p)}function d(p){return p===34||p===39||p===40?X8(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):g(p)}function f(p){return ln(p)?ed(e,g)(p):g(p)}function g(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function ene(e,t,n){const r=this;return i;function i(c){return Q8.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Wi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function tne(e,t,n){return r;function r(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 nne={name:"labelStartImage",resolveAll:Rb.resolveAll,tokenize:rne};function rne(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const ine={name:"labelStartLink",resolveAll:Rb.resolveAll,tokenize:one};function one(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const K1={name:"lineEnding",tokenize:ane};function ane(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Pt(e,t,"linePrefix")}}const pp={name:"thematicBreak",tokenize:sne};function sne(e,t,n){let r=0,i;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return i=f,c(f)}function c(f){return f===i?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||ot(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===i?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),vt(f)?Pt(e,c,"whitespace")(f):c(f))}}const Hr={continuation:{tokenize:dne},exit:hne,name:"list",tokenize:une},lne={partial:!0,tokenize:pne},cne={partial:!0,tokenize:fne};function une(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return c;function c(x){const v=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:my(x)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(pp,n,f)(x):f(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return n(x)}function d(x){return my(x)&&++l<10?(e.consume(x),d):(!r.interrupt||l<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),f(x)):n(x)}function f(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(tf,r.interrupt?n:g,e.attempt(lne,y,p))}function g(x){return r.containerState.initialBlankLine=!0,a++,y(x)}function p(x){return vt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),y):n(x)}function y(x){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function dne(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tf,i,a);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!vt(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(cne,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pt(e,e.attempt(Hr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function fne(e,t,n){const r=this;return Pt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function hne(e){e.exit(this.containerState.type)}function pne(e,t,n){const r=this;return Pt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=r.events[r.events.length-1];return!vt(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const lE={name:"setextUnderline",resolveTo:mne,tokenize:gne};function mne(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=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 l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function gne(e,t,n){const r=this;let i;return a;function a(f){let g=r.events.length,p;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){p=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===i?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),vt(f)?Pt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||ot(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const yne={tokenize:xne};function xne(e){const t=this,n=e.attempt(tf,r,e.attempt(this.parser.constructs.flowInitial,i,Pt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Cte,i)),"linePrefix")));return n;function r(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 bne={resolveAll:J8()},vne=Z8("string"),wne=Z8("text");function Z8(e){return{resolveAll:J8(e==="text"?Sne:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,l,c);return l;function l(g){return f(g)?a(g):c(g)}function c(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),d}function d(g){return f(g)?(n.exit("data"),a(g)):(n.consume(g),d)}function f(g){if(g===null)return!0;const p=i[g];let y=-1;if(p)for(;++y<p.length;){const x=p[y];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function J8(e){return t;function t(n,r){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,r):n}}function Sne(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 r=e[n-1][1],i=t.sliceStream(r);let a=i.length,l=-1,c=0,d;for(;a--;){const f=i[a];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const Cne={42:Hr,43:Hr,45:Hr,48:Hr,49:Hr,50:Hr,51:Hr,52:Hr,53:Hr,54:Hr,55:Hr,56:Hr,57:Hr,62:$8},Ene={91:Rte},kne={[-2]:W1,[-1]:W1,32:W1},Tne={35:_te,42:pp,45:[lE,pp],60:Pte,61:lE,95:pp,96:aE,126:aE},Nne={38:Y8,92:G8},Rne={[-5]:K1,[-4]:K1,[-3]:K1,33:nne,38:Y8,42:gy,60:[ite,$te],91:ine,92:[Mte,G8],93:Rb,95:gy,96:yte},Ane={null:[gy,bne]},jne={null:[42,95]},One={null:[]},Mne=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:jne,contentInitial:Ene,disable:One,document:Cne,flow:Tne,flowInitial:kne,insideSpan:Ane,string:Nne,text:Rne},Symbol.toStringTag,{value:"Module"}));function Lne(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let l=[],c=[];const d={attempt:N(O),check:N(A),consume:T,enter:R,exit:M,interrupt:N(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:v,parser:e,previous:null,sliceSerialize:y,sliceStream:x,write:p};let g=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function p(U){return l=Oi(l,U),E(),l[l.length-1]!==null?[]:(D(t,0),f.events=zm(a,f.events,f),f.events)}function y(U,$){return Dne(x(U),$)}function x(U){return _ne(l,U)}function v(){const{_bufferIndex:U,_index:$,line:V,column:G,offset:B}=r;return{_bufferIndex:U,_index:$,line:V,column:G,offset:B}}function S(U){i[U.line]=U.column,I()}function E(){let U;for(;r._index<l.length;){const $=l[r._index];if(typeof $=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<$.length;)k($.charCodeAt(r._bufferIndex));else k($)}}function k(U){g=g(U)}function T(U){ot(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,I()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=U}function R(U,$){const V=$||{};return V.type=U,V.start=v(),f.events.push(["enter",V,f]),c.push(V),V}function M(U){const $=c.pop();return $.end=v(),f.events.push(["exit",$,f]),$}function O(U,$){D(U,$.from)}function A(U,$){$.restore()}function N(U,$){return V;function V(G,B,F){let q,W,ie,_;return Array.isArray(G)?Y(G):"tokenize"in G?Y([G]):z(G);function z(Q){return de;function de(ue){const Se=ue!==null&&Q[ue],Ee=ue!==null&&Q.null,ze=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return Y(ze)(ue)}}function Y(Q){return q=Q,W=0,Q.length===0?F:L(Q[W])}function L(Q){return de;function de(ue){return _=H(),ie=Q,Q.partial||(f.currentConstruct=Q),Q.name&&f.parser.constructs.disable.null.includes(Q.name)?te():Q.tokenize.call($?Object.assign(Object.create(f),$):f,d,ee,te)(ue)}}function ee(Q){return U(ie,_),B}function te(Q){return _.restore(),++W<q.length?L(q[W]):F}}}function D(U,$){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&di(f.events,$,f.events.length-$,U.resolve(f.events.slice($),f)),U.resolveTo&&(f.events=U.resolveTo(f.events,f))}function H(){const U=v(),$=f.previous,V=f.currentConstruct,G=f.events.length,B=Array.from(c);return{from:G,restore:F};function F(){r=U,f.previous=$,f.currentConstruct=V,f.events.length=G,c=B,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function _ne(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,a)];else{if(l=e.slice(n,i),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function Dne(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
89
+ `;break}case-3:{l=`\r
90
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(a)}i=a===-2,r.push(l)}return r.join("")}function Ine(e){const r={constructs:q8([Mne,...(e||{}).extensions||[]]),content:i(Xee),defined:[],document:i(Jee),flow:i(yne),lazy:{},string:i(vne),text:i(wne)};return r;function i(a){return l;function l(c){return Lne(r,a,c)}}}function zne(e){for(;!W8(e););return e}const cE=/[\0\t\n\r]/g;function Pne(){let e=1,t="",n=!0,r;return i;function i(a,l,c){const d=[];let f,g,p,y,x;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(cE.lastIndex=p,f=cE.exec(a),y=f&&f.index!==void 0?f.index:a.length,x=a.charCodeAt(y),!f){t=a.slice(p);break}if(x===10&&p===y&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<y&&(d.push(a.slice(p,y)),e+=y-p),x){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=y+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Fne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bne(e){return e.replace(Fne,Hne)}function Hne(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return V8(n.slice(a?2:1),a?16:10)}return wd(n)||e}const eR={}.hasOwnProperty;function Une(e,t,n){return typeof t!="string"&&(n=t,t=void 0),qne(n)(zne(Ine(n).document().write(Pne()(e,t,!0))))}function qne(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(pe),autolinkProtocol:H,autolinkEmail:H,atxHeading:a(xe),blockQuote:a(Ee),characterEscape:H,characterReference:H,codeFenced:a(ze),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(ze,l),codeText:a(Ye,l),codeTextData:H,data:H,codeFlowValue:H,definition:a(Me),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Ie),hardBreakEscape:a(We),hardBreakTrailing:a(We),htmlFlow:a(Te,l),htmlFlowData:H,htmlText:a(Te,l),htmlTextData:H,image:a(Ae),label:l,link:a(pe),listItem:a(re),listItemValue:y,listOrdered:a(Ce,p),listUnordered:a(Ce),paragraph:a(be),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(xe),strong:a(Pe),thematicBreak:a(wt)},exit:{atxHeading:d(),atxHeadingSequence:O,autolink:d(),autolinkEmail:Se,autolinkProtocol:ue,blockQuote:d(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:Q,characterReference:de,codeFenced:d(E),codeFencedFence:S,codeFencedFenceInfo:x,codeFencedFenceMeta:v,codeFlowValue:I,codeIndented:d(k),codeText:d(B),codeTextData:I,data:I,definition:d(),definitionDestinationString:M,definitionLabelString:T,definitionTitleString:R,emphasis:d(),hardBreakEscape:d($),hardBreakTrailing:d($),htmlFlow:d(V),htmlFlowData:I,htmlText:d(G),htmlTextData:I,image:d(q),label:ie,labelText:W,lineEnding:U,link:d(F),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ee,resourceDestinationString:_,resourceTitleString:z,resource:Y,setextHeading:d(D),setextHeadingLineSequence:N,setextHeadingText:A,strong:d(),thematicBreak:d()}};tR(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ae){let we={type:"root",children:[]};const Oe={stack:[we],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:g,data:n},Le=[];let He=-1;for(;++He<ae.length;)if(ae[He][1].type==="listOrdered"||ae[He][1].type==="listUnordered")if(ae[He][0]==="enter")Le.push(He);else{const kt=Le.pop();He=i(ae,kt,He)}for(He=-1;++He<ae.length;){const kt=t[ae[He][0]];eR.call(kt,ae[He][1].type)&&kt[ae[He][1].type].call(Object.assign({sliceSerialize:ae[He][2].sliceSerialize},Oe),ae[He][1])}if(Oe.tokenStack.length>0){const kt=Oe.tokenStack[Oe.tokenStack.length-1];(kt[1]||uE).call(Oe,void 0,kt[0])}for(we.position={start:Ta(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:Ta(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)we=t.transforms[He](we)||we;return we}function i(ae,we,Oe){let Le=we-1,He=-1,kt=!1,Bt,Xe,Ve,pt;for(;++Le<=Oe;){const mt=ae[Le];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?He++:He--,pt=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(Bt&&!pt&&!He&&!Ve&&(Ve=Le),pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pt=void 0}if(!He&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||He===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(Bt){let Qe=Le;for(Xe=void 0;Qe--;){const yt=ae[Qe];if(yt[1].type==="lineEnding"||yt[1].type==="lineEndingBlank"){if(yt[0]==="exit")continue;Xe&&(ae[Xe][1].type="lineEndingBlank",kt=!0),yt[1].type="lineEnding",Xe=Qe}else if(!(yt[1].type==="linePrefix"||yt[1].type==="blockQuotePrefix"||yt[1].type==="blockQuotePrefixWhitespace"||yt[1].type==="blockQuoteMarker"||yt[1].type==="listItemIndent"))break}Ve&&(!Xe||Ve<Xe)&&(Bt._spread=!0),Bt.end=Object.assign({},Xe?ae[Xe][1].start:mt[1].end),ae.splice(Xe||Le,0,["exit",Bt,mt[2]]),Le++,Oe++}if(mt[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};Bt=Qe,ae.splice(Le,0,["enter",Qe,mt[2]]),Le++,Oe++,Ve=void 0,pt=!0}}}return ae[we][1]._spread=kt,Oe}function a(ae,we){return Oe;function Oe(Le){c.call(this,ae(Le),Le),we&&we.call(this,Le)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(ae,we,Oe){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([we,Oe||void 0]),ae.position={start:Ta(we.start),end:void 0}}function d(ae){return we;function we(Oe){ae&&ae.call(this,Oe),f.call(this,Oe)}}function f(ae,we){const Oe=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==ae.type&&(we?we.call(this,ae,Le[0]):(Le[1]||uE).call(this,ae,Le[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Ju({start:ae.start,end:ae.end})+"): it’s not open");Oe.position.end=Ta(ae.end)}function g(){return Nb(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function y(ae){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.lang=ae}function v(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.meta=ae}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.value=ae.replace(/(\r?\n|\r)$/g,"")}function T(ae){const we=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=we,Oe.identifier=Wi(this.sliceSerialize(ae)).toLowerCase()}function R(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.title=ae}function M(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.url=ae}function O(ae){const we=this.stack[this.stack.length-1];if(!we.depth){const Oe=this.sliceSerialize(ae).length;we.depth=Oe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function N(ae){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function H(ae){const Oe=this.stack[this.stack.length-1].children;let Le=Oe[Oe.length-1];(!Le||Le.type!=="text")&&(Le=Ue(),Le.position={start:Ta(ae.start),end:void 0},Oe.push(Le)),this.stack.push(Le)}function I(ae){const we=this.stack.pop();we.value+=this.sliceSerialize(ae),we.position.end=Ta(ae.end)}function U(ae){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=we.children[we.children.length-1];Oe.position.end=Ta(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(H.call(this,ae),I.call(this,ae))}function $(){this.data.atHardBreak=!0}function V(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.value=ae}function G(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.value=ae}function B(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.value=ae}function F(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=we,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function q(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=we,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function W(ae){const we=this.sliceSerialize(ae),Oe=this.stack[this.stack.length-2];Oe.label=Bne(we),Oe.identifier=Wi(we).toLowerCase()}function ie(){const ae=this.stack[this.stack.length-1],we=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const Le=ae.children;Oe.children=Le}else Oe.alt=we}function _(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.url=ae}function z(){const ae=this.resume(),we=this.stack[this.stack.length-1];we.title=ae}function Y(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function ee(ae){const we=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=we,Oe.identifier=Wi(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function te(ae){this.data.characterReferenceType=ae.type}function Q(ae){const we=this.sliceSerialize(ae),Oe=this.data.characterReferenceType;let Le;Oe?(Le=V8(we,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=wd(we);const He=this.stack[this.stack.length-1];He.value+=Le}function de(ae){const we=this.stack.pop();we.position.end=Ta(ae.end)}function ue(ae){I.call(this,ae);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(ae)}function Se(ae){I.call(this,ae);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(ae)}function Ee(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function Ye(){return{type:"inlineCode",value:""}}function Me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ie(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function We(){return{type:"break"}}function Te(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function Ce(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function re(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function be(){return{type:"paragraph",children:[]}}function Pe(){return{type:"strong",children:[]}}function Ue(){return{type:"text",value:""}}function wt(){return{type:"thematicBreak"}}}function Ta(e){return{line:e.line,column:e.column,offset:e.offset}}function tR(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?tR(e,r):Vne(e,r)}}function Vne(e,t){let n;for(n in t)if(eR.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function uE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ju({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ju({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ju({start:t.start,end:t.end})+") is still open")}function $ne(e){const t=this;t.parser=n;function n(r){return Une(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Gne(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 Yne(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
91
+ `}]}function Wne(e,t){const n=t.value?t.value+`
92
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,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 Kne(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qne(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xne(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Nc(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function Zne(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 Jne(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function nR(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function ere(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nR(e,t);const i={src:Nc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function tre(e,t){const n={src:Nc(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 r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function nre(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function rre(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nR(e,t);const i={href:Nc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ire(e,t){const n={href:Nc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ore(e,t,n){const r=e.all(t),i=n?are(n):rR(t),a={},l=[];if(typeof t.checked=="boolean"){const g=r[0];let p;g&&g.type==="element"&&g.tagName==="p"?p=g:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const g=r[c];(i||c!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
93
+ `}),g.type==="element"&&g.tagName==="p"&&!i?l.push(...g.children):l.push(g)}const d=r[r.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
94
+ `});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function are(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=rR(n[r])}return t}function rR(e){const t=e.spread;return t??e.children.length>1}function sre(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.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(r,!0)};return e.patch(t,a),e.applyData(t,a)}function lre(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cre(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ure(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dre(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Cb(t.children[1]),d=I8(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function fre(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const p=t.children[d],y={},x=l?l[d]:void 0;x&&(y.align=x);let v={type:"element",tagName:a,properties:y,children:[]};p&&(v.children=e.all(p),e.patch(p,v),v=e.applyData(p,v)),f.push(v)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,g),e.applyData(t,g)}function hre(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const dE=9,fE=32;function pre(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(hE(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(hE(t.slice(i),i>0,!1)),a.join("")}function hE(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===dE||a===fE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===dE||a===fE;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function mre(e,t){const n={type:"text",value:pre(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function gre(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const yre={blockquote:Gne,break:Yne,code:Wne,delete:Kne,emphasis:Qne,footnoteReference:Xne,heading:Zne,html:Jne,imageReference:ere,image:tre,inlineCode:nre,linkReference:rre,link:ire,listItem:ore,list:sre,paragraph:lre,root:cre,strong:ure,table:dre,tableCell:hre,tableRow:fre,text:mre,thematicBreak:gre,toml:Uh,yaml:Uh,definition:Uh,footnoteDefinition:Uh};function Uh(){}const iR=-1,Pm=0,td=1,em=2,Ab=3,jb=4,Ob=5,Mb=6,oR=7,aR=8,pE=typeof self=="object"?self:globalThis,xre=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,l]=t[i];switch(a){case Pm:case iR:return n(l,i);case td:{const c=n([],i);for(const d of l)c.push(r(d));return c}case em:{const c=n({},i);for(const[d,f]of l)c[r(d)]=r(f);return c}case Ab:return n(new Date(l),i);case jb:{const{source:c,flags:d}=l;return n(new RegExp(c,d),i)}case Ob:{const c=n(new Map,i);for(const[d,f]of l)c.set(r(d),r(f));return c}case Mb:{const c=n(new Set,i);for(const d of l)c.add(r(d));return c}case oR:{const{name:c,message:d}=l;return n(new pE[c](d),i)}case aR:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new pE[a](l),i)};return r},mE=e=>xre(new Map,e)(0),Fl="",{toString:bre}={},{keys:vre}=Object,zu=e=>{const t=typeof e;if(t!=="object"||!e)return[Pm,t];const n=bre.call(e).slice(8,-1);switch(n){case"Array":return[td,Fl];case"Object":return[em,Fl];case"Date":return[Ab,Fl];case"RegExp":return[jb,Fl];case"Map":return[Ob,Fl];case"Set":return[Mb,Fl];case"DataView":return[td,n]}return n.includes("Array")?[td,n]:n.includes("Error")?[oR,n]:[em,n]},qh=([e,t])=>e===Pm&&(t==="function"||t==="symbol"),wre=(e,t,n,r)=>{const i=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},a=l=>{if(n.has(l))return n.get(l);let[c,d]=zu(l);switch(c){case Pm:{let g=l;switch(d){case"bigint":c=aR,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return i([iR],l)}return i([c,g],l)}case td:{if(d){let y=l;return d==="DataView"?y=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(l)),i([d,[...y]],l)}const g=[],p=i([c,g],l);for(const y of l)g.push(a(y));return p}case em:{if(d)switch(d){case"BigInt":return i([d,l.toString()],l);case"Boolean":case"Number":case"String":return i([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const g=[],p=i([c,g],l);for(const y of vre(l))(e||!qh(zu(l[y])))&&g.push([a(y),a(l[y])]);return p}case Ab:return i([c,l.toISOString()],l);case jb:{const{source:g,flags:p}=l;return i([c,{source:g,flags:p}],l)}case Ob:{const g=[],p=i([c,g],l);for(const[y,x]of l)(e||!(qh(zu(y))||qh(zu(x))))&&g.push([a(y),a(x)]);return p}case Mb:{const g=[],p=i([c,g],l);for(const y of l)(e||!qh(zu(y)))&&g.push(a(y));return p}}const{message:f}=l;return i([c,{name:d,message:f}],l)};return a},gE=(e,{json:t,lossy:n}={})=>{const r=[];return wre(!(t||n),!!t,new Map,r)(e),r},tm=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?mE(gE(e,t)):structuredClone(e):(e,t)=>mE(gE(e,t));function Sre(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 Cre(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Ere(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Sre,r=e.options.footnoteBackLabel||Cre,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const g=e.all(f),p=String(f.identifier).toUpperCase(),y=Nc(p.toLowerCase());let x=0;const v=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++x<=S;){v.length>0&&v.push({type:"text",value:" "});let T=typeof n=="string"?n:n(d,x);typeof T=="string"&&(T={type:"text",value:T}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,x),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const T=E.children[E.children.length-1];T&&T.type==="text"?T.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...v)}else g.push(...v);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(g,!0)};e.patch(f,k),c.push(k)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...tm(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
95
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
96
+ `}]}}const Fm=(function(e){if(e==null)return Rre;if(typeof e=="function")return Bm(e);if(typeof e=="object")return Array.isArray(e)?kre(e):Tre(e);if(typeof e=="string")return Nre(e);throw new Error("Expected function, string, or object as test")});function kre(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fm(e[n]);return Bm(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Tre(e){const t=e;return Bm(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Nre(e){return Bm(t);function t(n){return n&&n.type===e}}function Bm(e){return t;function t(n,r,i){return!!(Are(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Rre(){return!0}function Are(e){return e!==null&&typeof e=="object"&&"type"in e}const sR=[],jre=!0,yy=!1,Ore="skip";function lR(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Fm(i),l=r?-1:1;c(e,void 0,[])();function c(d,f,g){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const x=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(d.type+(x?"<"+x+">":""))+")"})}return y;function y(){let x=sR,v,S,E;if((!t||a(d,f,g[g.length-1]||void 0))&&(x=Mre(n(d,g)),x[0]===yy))return x;if("children"in d&&d.children){const k=d;if(k.children&&x[0]!==Ore)for(S=(r?k.children.length:-1)+l,E=g.concat(k);S>-1&&S<k.children.length;){const T=k.children[S];if(v=c(T,S,E)(),v[0]===yy)return v;S=typeof v[1]=="number"?v[1]:S+l}}return x}}}function Mre(e){return Array.isArray(e)?e:typeof e=="number"?[jre,e]:e==null?sR:[e]}function Lb(e,t,n,r){let i,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,i=n):(a=t,l=n,i=r),lR(e,a,c,i);function c(d,f){const g=f[f.length-1],p=g?g.children.indexOf(d):void 0;return l(d,p,g)}}const xy={}.hasOwnProperty,Lre={};function _re(e,t){const n=t||Lre,r=new Map,i=new Map,a=new Map,l={...yre,...n.handlers},c={all:f,applyData:Ire,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:Dre,wrap:Pre};return Lb(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const p=g.type==="definition"?r:i,y=String(g.identifier).toUpperCase();p.has(y)||p.set(y,g)}}),c;function d(g,p){const y=g.type,x=c.handlers[y];if(xy.call(c.handlers,y)&&x)return x(c,g,p);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in g){const{children:S,...E}=g,k=tm(E);return k.children=c.all(g),k}return tm(g)}return(c.options.unknownHandler||zre)(c,g,p)}function f(g){const p=[];if("children"in g){const y=g.children;let x=-1;for(;++x<y.length;){const v=c.one(y[x],g);if(v){if(x&&y[x-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=yE(v.value)),!Array.isArray(v)&&v.type==="element")){const S=v.children[0];S&&S.type==="text"&&(S.value=yE(S.value))}Array.isArray(v)?p.push(...v):p.push(v)}}}return p}}function Dre(e,t){e.position&&(t.position=Cee(e))}function Ire(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,tm(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function zre(e,t){const n=t.data||{},r="value"in t&&!(xy.call(n,"hProperties")||xy.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Pre(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
97
+ `});++r<e.length;)r&&n.push({type:"text",value:`
98
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
99
+ `}),n}function yE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xE(e,t){const n=_re(e,t),r=n.one(e,void 0),i=Ere(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
100
+ `},i),a}function Fre(e,t){return e&&"run"in e?async function(n,r){const i=xE(n,{file:r,...t});await e.run(i,r)}:function(n,r){return xE(n,{file:r,...e||t})}}function bE(e){if(e)throw e}var Q1,vE;function Bre(){if(vE)return Q1;vE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var g=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!g&&!p)return!1;var y;for(y in f);return typeof y>"u"||e.call(f,y)},l=function(f,g){n&&g.name==="__proto__"?n(f,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):f[g.name]=g.newValue},c=function(f,g){if(g==="__proto__")if(e.call(f,g)){if(r)return r(f,g).value}else return;return f[g]};return Q1=function d(){var f,g,p,y,x,v,S=arguments[0],E=1,k=arguments.length,T=!1;for(typeof S=="boolean"&&(T=S,S=arguments[1]||{},E=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});E<k;++E)if(f=arguments[E],f!=null)for(g in f)p=c(S,g),y=c(f,g),S!==y&&(T&&y&&(a(y)||(x=i(y)))?(x?(x=!1,v=p&&i(p)?p:[]):v=p&&a(p)?p:{},l(S,{name:g,newValue:d(T,v,y)})):typeof y<"u"&&l(S,{name:g,newValue:y}));return S},Q1}var Hre=Bre();const X1=pc(Hre);function by(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 Ure(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...i);function c(d,...f){const g=e[++a];let p=-1;if(d){l(d);return}for(;++p<i.length;)(f[p]===null||f[p]===void 0)&&(f[p]=i[p]);i=f,g?qre(g,c)(...f):l(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function qre(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(i);try{d=e.apply(this,l)}catch(f){const g=f;if(c&&n)throw g;return i(g)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,i):d instanceof Error?i(d):a(d))}function i(l,...c){n||(n=!0,t(l,...c))}function a(l){i(null,l)}}const ro={basename:Vre,dirname:$re,extname:Gre,join:Yre,sep:"/"};function Vre(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nf(e);let n=0,r=-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 r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else l<0&&(a=!0,l=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function $re(e){if(nf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Gre(e){nf(e);let t=e.length,n=-1,r=0,i=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===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===r+1?"":e.slice(i,n)}function Yre(...e){let t=-1,n;for(;++t<e.length;)nf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Wre(n)}function Wre(e){nf(e);const t=e.codePointAt(0)===47;let n=Kre(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Kre(e,t){let n="",r=0,i=-1,a=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(i===l-1||a===1))if(i!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),i=l,a=0;continue}}else if(n.length>0){n="",r=0,i=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function nf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qre={cwd:Xre};function Xre(){return"/"}function vy(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Zre(e){if(typeof e=="string")e=new URL(e);else if(!vy(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 Jre(e)}function Jre(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===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 Z1=["history","path","basename","stem","extname","dirname"];class cR{constructor(t){let n;t?vy(t)?n={path:t}:typeof t=="string"||eie(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Qre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Z1.length;){const a=Z1[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Z1.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ro.basename(this.path):void 0}set basename(t){e2(t,"basename"),J1(t,"basename"),this.path=ro.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ro.dirname(this.path):void 0}set dirname(t){wE(this.basename,"dirname"),this.path=ro.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ro.extname(this.path):void 0}set extname(t){if(J1(t,"extname"),wE(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=ro.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vy(t)&&(t=Zre(t)),e2(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ro.basename(this.path,this.extname):void 0}set stem(t){e2(t,"stem"),J1(t,"stem"),this.path=ro.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Sr(t,n,r);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 J1(e,t){if(e&&e.includes(ro.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ro.sep+"`")}function e2(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function wE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function eie(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tie=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),nie={}.hasOwnProperty;class _b extends tie{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=Ure()}copy(){const t=new _b;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(X1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(r2("data",this.frozen),this.namespace[t]=n,this):nie.call(this.namespace,t)&&this.namespace[t]||void 0:t?(r2("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,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Vh(t),r=this.parser||this.Parser;return t2("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),t2("process",this.parser||this.Parser),n2("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,l){const c=Vh(t),d=r.parse(c);r.run(d,c,function(g,p,y){if(g||!p||!y)return f(g);const x=p,v=r.stringify(x,y);oie(v)?y.value=v:y.result=v,f(g,y)});function f(g,p){g||!p?l(g):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),t2("processSync",this.parser||this.Parser),n2("processSync",this.compiler||this.Compiler),this.process(t,i),CE("processSync","process",n),r;function i(a,l){n=!0,bE(a),r=l}}run(t,n,r){SE(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const d=Vh(n);i.run(t,d,f);function f(g,p,y){const x=p||t;g?c(g):l?l(x):r(void 0,x,y)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),CE("runSync","run",r),i;function a(l,c){bE(l),i=c,r=!0}}stringify(t,n){this.freeze();const r=Vh(n),i=this.compiler||this.Compiler;return n2("stringify",i),SE(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(r2("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[g,...p]=f;d(g,p)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))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");c(f.plugins),f.settings&&(i.settings=X1(!0,i.settings,f.settings))}function c(f){let g=-1;if(f!=null)if(Array.isArray(f))for(;++g<f.length;){const p=f[g];a(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,g){let p=-1,y=-1;for(;++p<r.length;)if(r[p][0]===f){y=p;break}if(y===-1)r.push([f,...g]);else if(g.length>0){let[x,...v]=g;const S=r[y][1];by(S)&&by(x)&&(x=X1(!0,S,x)),r[y]=[f,x,...v]}}}}const rie=new _b().freeze();function t2(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function n2(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function r2(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 SE(e){if(!by(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function CE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Vh(e){return iie(e)?e:new cR(e)}function iie(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oie(e){return typeof e=="string"||aie(e)}function aie(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sie="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",EE=[],kE={allowDangerousHtml:!0},lie=/^(https?|ircs?|mailto|xmpp)$/i,cie=[{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:"className",id:"remove-classname"},{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 uR(e){const t=uie(e),n=die(e);return fie(t.runSync(t.parse(n),n),e)}function uie(e){const t=e.rehypePlugins||EE,n=e.remarkPlugins||EE,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...kE}:kE;return rie().use($ne).use(n).use(Fre,r).use(t)}function die(e){const t=e.children||"",n=new cR;return typeof t=="string"&&(n.value=t),n}function fie(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||hie;for(const g of cie)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+sie+g.id,void 0);return Lb(e,f),Ree(e,{Fragment:h.Fragment,components:i,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function f(g,p,y){if(g.type==="raw"&&y&&typeof p=="number")return l?y.children.splice(p,1):y.children[p]={type:"text",value:g.value},p;if(g.type==="element"){let x;for(x in Y1)if(Object.hasOwn(Y1,x)&&Object.hasOwn(g.properties,x)){const v=g.properties[x],S=Y1[x];(S===null||S.includes(g.tagName))&&(g.properties[x]=d(String(v||""),x,g))}}if(g.type==="element"){let x=n?!n.includes(g.tagName):a?a.includes(g.tagName):!1;if(!x&&r&&typeof p=="number"&&(x=!r(g,p,y)),x&&y&&typeof p=="number")return c&&g.children?y.children.splice(p,1,...g.children):y.children.splice(p,1),p}}}function hie(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||lie.test(e.slice(0,t))?e:""}var i2={exports:{}},TE;function pie(){return TE||(TE=1,(function(e){(function(){var t;t=e.exports=i,t.format=i,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=n);function n(){console.log(i.apply(null,arguments))}function r(a,l){return i.apply(null,[a].concat(l))}function i(a){for(var l=1,c=[].slice.call(arguments),d=0,f=a.length,g="",p,y=!1,x,v,S=!1,E,k=function(){return c[l++]},T=function(){for(var R="";/\d/.test(a[d]);)R+=a[d++],p=a[d];return R.length>0?parseInt(R):null};d<f;++d)if(p=a[d],y)switch(y=!1,p=="."?(S=!1,p=a[++d]):p=="0"&&a[d+1]=="."?(S=!0,d+=2,p=a[d]):S=!0,E=T(),p){case"b":g+=parseInt(k(),10).toString(2);break;case"c":x=k(),typeof x=="string"||x instanceof String?g+=x:g+=String.fromCharCode(parseInt(x,10));break;case"d":g+=parseInt(k(),10);break;case"f":v=String(parseFloat(k()).toFixed(E||6)),g+=S?v:v.replace(/^0/,"");break;case"j":g+=JSON.stringify(k());break;case"o":g+="0"+parseInt(k(),10).toString(8);break;case"s":g+=k();break;case"x":g+="0x"+parseInt(k(),10).toString(16);break;case"X":g+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:g+=p;break}else p==="%"?y=!0:g+=p;return g}})()})(i2)),i2.exports}var mie=pie();const gie=pc(mie),$h=Object.assign(ks(Error),{eval:ks(EvalError),range:ks(RangeError),reference:ks(ReferenceError),syntax:ks(SyntaxError),type:ks(TypeError),uri:ks(URIError)});function ks(e){return t.displayName=e.displayName||e.name,t;function t(n,...r){const i=n&&gie(n,...r);return new e(i)}}const Gh={}.hasOwnProperty,NE={yaml:"-",toml:"+"};function Db(e){const t=[];let n=-1;const r=Array.isArray(e)?e:e?[e]:["yaml"];for(;++n<r.length;)t[n]=yie(r[n]);return t}function yie(e){let t=e;if(typeof t=="string"){if(!Gh.call(NE,t))throw $h("Missing matter definition for `%s`",t);t={type:t,marker:NE[t]}}else if(typeof t!="object")throw $h("Expected matter to be an object, not `%j`",t);if(!Gh.call(t,"type"))throw $h("Missing `type` in matter `%j`",t);if(!Gh.call(t,"fence")&&!Gh.call(t,"marker"))throw $h("Missing `marker` or `fence` in matter `%j`",t);return t}function xie(e){const t=Db(e),n={};let r=-1;for(;++r<t.length;){const i=t[r],a=wy(i,"open").charCodeAt(0),l=bie(i),c=n[a];Array.isArray(c)?c.push(l):n[a]=[l]}return{flow:n}}function bie(e){const t=e.anywhere,n=e.type,r=n+"Fence",i=r+"Sequence",a=n+"Value",l={tokenize:g,partial:!0};let c,d=0;return{tokenize:f,concrete:!0};function f(p,y,x){const v=this;return S;function S(N){const D=v.now();return D.column===1&&(D.line===1||t)&&(c=wy(e,"open"),d=0,N===c.charCodeAt(d))?(p.enter(n),p.enter(r),p.enter(i),E(N)):x(N)}function E(N){return d===c.length?(p.exit(i),vt(N)?(p.enter("whitespace"),k(N)):T(N)):N===c.charCodeAt(d++)?(p.consume(N),E):x(N)}function k(N){return vt(N)?(p.consume(N),k):(p.exit("whitespace"),T(N))}function T(N){return ot(N)?(p.exit(r),p.enter("lineEnding"),p.consume(N),p.exit("lineEnding"),c=wy(e,"close"),d=0,p.attempt(l,A,R)):x(N)}function R(N){return N===null||ot(N)?O(N):(p.enter(a),M(N))}function M(N){return N===null||ot(N)?(p.exit(a),O(N)):(p.consume(N),M)}function O(N){return N===null?x(N):(p.enter("lineEnding"),p.consume(N),p.exit("lineEnding"),p.attempt(l,A,R))}function A(N){return p.exit(n),y(N)}}function g(p,y,x){let v=0;return S;function S(R){return R===c.charCodeAt(v)?(p.enter(r),p.enter(i),E(R)):x(R)}function E(R){return v===c.length?(p.exit(i),vt(R)?(p.enter("whitespace"),k(R)):T(R)):R===c.charCodeAt(v++)?(p.consume(R),E):x(R)}function k(R){return vt(R)?(p.consume(R),k):(p.exit("whitespace"),T(R))}function T(R){return R===null||ot(R)?(p.exit(r),y(R)):x(R)}}}function wy(e,t){return e.marker?RE(e.marker,t).repeat(3):RE(e.fence,t)}function RE(e,t){return typeof e=="string"?e:e[t]}function vie(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wie(e){const t=Db(e),n={},r={};let i=-1;for(;++i<t.length;){const a=t[i];n[a.type]=Sie(a),r[a.type]=Cie,r[a.type+"Value"]=Eie}return{enter:n,exit:r}}function Sie(e){return t;function t(n){this.enter({type:e.type,value:""},n),this.buffer()}}function Cie(e){const t=this.resume(),n=this.stack[this.stack.length-1];this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Eie(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function kie(e){const t=[],n={},r=Db(e);let i=-1;for(;++i<r.length;){const a=r[i];n[a.type]=Tie(a);const l=Sy(a,"open");t.push({atBreak:!0,character:l.charAt(0),after:vie(l.charAt(1))})}return{unsafe:t,handlers:n}}function Tie(e){const t=Sy(e,"open"),n=Sy(e,"close");return r;function r(i){return t+(i.value?`
101
+ `+i.value:"")+`
102
+ `+n}}function Sy(e,t){return e.marker?AE(e.marker,t).repeat(3):AE(e.fence,t)}function AE(e,t){return typeof e=="string"?e:e[t]}const Nie="yaml";function Rie(e){const t=this,n=e||Nie,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(xie(n)),a.push(wie(n)),l.push(kie(n))}function jE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Aie(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function jie(e,t,n){const i=Fm((n||{}).ignore||[]),a=Oie(t);let l=-1;for(;++l<a.length;)lR(e,"text",c);function c(f,g){let p=-1,y;for(;++p<g.length;){const x=g[p],v=y?y.children:void 0;if(i(x,v?v.indexOf(x):void 0,y))return;y=x}if(y)return d(f,g)}function d(f,g){const p=g[g.length-1],y=a[l][0],x=a[l][1];let v=0;const E=p.children.indexOf(f);let k=!1,T=[];y.lastIndex=0;let R=y.exec(f.value);for(;R;){const M=R.index,O={index:R.index,input:R.input,stack:[...g,f]};let A=x(...R,O);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?y.lastIndex=M+1:(v!==M&&T.push({type:"text",value:f.value.slice(v,M)}),Array.isArray(A)?T.push(...A):A&&T.push(A),v=M+R[0].length,k=!0),!y.global)break;R=y.exec(f.value)}return k?(v<f.value.length&&T.push({type:"text",value:f.value.slice(v)}),p.children.splice(E,1,...T)):T=[f],E+T.length}}function Oie(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Mie(i[0]),Lie(i[1])])}return t}function Mie(e){return typeof e=="string"?new RegExp(Aie(e),"g"):e}function Lie(e){return typeof e=="function"?e:function(){return e}}const o2="phrasing",a2=["autolink","link","image","label"];function _ie(){return{transforms:[Hie],enter:{literalAutolink:Iie,literalAutolinkEmail:s2,literalAutolinkHttp:s2,literalAutolinkWww:s2},exit:{literalAutolink:Bie,literalAutolinkEmail:Fie,literalAutolinkHttp:zie,literalAutolinkWww:Pie}}}function Die(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:o2,notInConstruct:a2},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:o2,notInConstruct:a2},{character:":",before:"[ps]",after:"\\/",inConstruct:o2,notInConstruct:a2}]}}function Iie(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function s2(e){this.config.enter.autolinkProtocol.call(this,e)}function zie(e){this.config.exit.autolinkProtocol.call(this,e)}function Pie(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 Fie(e){this.config.exit.autolinkEmail.call(this,e)}function Bie(e){this.exit(e)}function Hie(e){jie(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Uie],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qie]],{ignore:["link","linkReference"]})}function Uie(e,t,n,r,i){let a="";if(!dR(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Vie(n)))return!1;const l=$ie(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function qie(e,t,n,r){return!dR(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Vie(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 $ie(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=jE(e,"(");let a=jE(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function dR(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Hs(n)||Im(n))&&(!t||n!==47)}fR.peek=eoe;function Gie(){this.buffer()}function Yie(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Wie(){this.buffer()}function Kie(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Qie(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Xie(e){this.exit(e)}function Zie(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Jie(e){this.exit(e)}function eoe(){return"["}function fR(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=i.move("]"),a}function toe(){return{enter:{gfmFootnoteCallString:Gie,gfmFootnoteCall:Yie,gfmFootnoteDefinitionLabelString:Wie,gfmFootnoteDefinition:Kie},exit:{gfmFootnoteCallString:Qie,gfmFootnoteCall:Xie,gfmFootnoteDefinitionLabelString:Zie,gfmFootnoteDefinition:Jie}}}function noe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fR},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,l){const c=a.createTracker(l);let d=c.move("[^");const f=a.enter("footnoteDefinition"),g=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),g(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
103
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?hR:roe))),f(),d}}function roe(e,t,n){return t===0?e:hR(e,t,n)}function hR(e,t,n){return(n?"":" ")+e}const ioe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pR.peek=coe;function ooe(){return{canContainEols:["delete"],enter:{strikethrough:soe},exit:{strikethrough:loe}}}function aoe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ioe}],handlers:{delete:pR}}}function soe(e){this.enter({type:"delete",children:[]},e)}function loe(e){this.exit(e)}function pR(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),a(),l}function coe(){return"~"}function uoe(e){return e.length}function doe(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||uoe,a=[],l=[],c=[],d=[];let f=0,g=-1;for(;++g<e.length;){const S=[],E=[];let k=-1;for(e[g].length>f&&(f=e[g].length);++k<e[g].length;){const T=foe(e[g][k]);if(n.alignDelimiters!==!1){const R=i(T);E[k]=R,(d[k]===void 0||R>d[k])&&(d[k]=R)}S.push(T)}l[g]=S,c[g]=E}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)a[p]=OE(r[p]);else{const S=OE(r);for(;++p<f;)a[p]=S}p=-1;const y=[],x=[];for(;++p<f;){const S=a[p];let E="",k="";S===99?(E=":",k=":"):S===108?E=":":S===114&&(k=":");let T=n.alignDelimiters===!1?1:Math.max(1,d[p]-E.length-k.length);const R=E+"-".repeat(T)+k;n.alignDelimiters!==!1&&(T=E.length+T+k.length,T>d[p]&&(d[p]=T),x[p]=T),y[p]=R}l.splice(1,0,y),c.splice(1,0,x),g=-1;const v=[];for(;++g<l.length;){const S=l[g],E=c[g];p=-1;const k=[];for(;++p<f;){const T=S[p]||"";let R="",M="";if(n.alignDelimiters!==!1){const O=d[p]-(E[p]||0),A=a[p];A===114?R=" ".repeat(O):A===99?O%2?(R=" ".repeat(O/2+.5),M=" ".repeat(O/2-.5)):(R=" ".repeat(O/2),M=R):M=" ".repeat(O)}n.delimiterStart!==!1&&!p&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||p)&&k.push(" "),n.alignDelimiters!==!1&&k.push(R),k.push(T),n.alignDelimiters!==!1&&k.push(M),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&k.push("|")}v.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return v.join(`
104
+ `)}function foe(e){return e==null?"":String(e)}function OE(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 hoe(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),poe);return i(),l}function poe(e,t,n){return">"+(n?"":" ")+e}function moe(e,t){return ME(e,t.inConstruct,!0)&&!ME(e,t.notInConstruct,!1)}function ME(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function LE(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
105
+ `&&moe(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
106
+ `}function goe(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>l&&(l=a):a=1,i=r+t.length,r=n.indexOf(t,i);return l}function yoe(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 xoe(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 boe(e,t,n,r){const i=xoe(n),a=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(yoe(e,n)){const p=n.enter("codeIndented"),y=n.indentLines(a,voe);return p(),y}const c=n.createTracker(r),d=i.repeat(Math.max(goe(a,i)+1,3)),f=n.enter("codeFenced");let g=c.move(d);if(e.lang){const p=n.enter(`codeFencedLang${l}`);g+=c.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...c.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${l}`);g+=c.move(" "),g+=c.move(n.safe(e.meta,{before:g,after:`
107
+ `,encode:["`"],...c.current()})),p()}return g+=c.move(`
108
+ `),a&&(g+=c.move(a+`
109
+ `)),g+=c.move(d),f(),g}function voe(e,t,n){return(n?"":" ")+e}function Ib(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 woe(e,t,n,r){const i=Ib(n),a=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
110
+ `,...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+i),f+=d.move(n.safe(e.title,{before:f,after:i,...d.current()})),f+=d.move(i),c()),l(),f}function Soe(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 Sd(e){return"&#x"+e.toString(16).toUpperCase()+";"}function nm(e,t,n){const r=hc(e),i=hc(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===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}}mR.peek=Coe;function mR(e,t,n,r){const i=Soe(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(i);let d=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const f=d.charCodeAt(0),g=nm(r.before.charCodeAt(r.before.length-1),f,i);g.inside&&(d=Sd(f)+d.slice(1));const p=d.charCodeAt(d.length-1),y=nm(r.after.charCodeAt(0),p,i);y.inside&&(d=d.slice(0,-1)+Sd(p));const x=l.move(i);return a(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},c+d+x}function Coe(e,t,n){return n.options.emphasis||"*"}function Eoe(e,t){let n=!1;return Lb(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,yy}),!!((!e.depth||e.depth<3)&&Nb(e)&&(t.options.setext||n))}function koe(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Eoe(e,n)){const g=n.enter("headingSetext"),p=n.enter("phrasing"),y=n.containerPhrasing(e,{...a.current(),before:`
111
+ `,after:`
112
+ `});return p(),g(),y+`
113
+ `+(i===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
114
+ `))+1))}const l="#".repeat(i),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
115
+ `,...a.current()});return/^[\t ]/.test(f)&&(f=Sd(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),c(),f}gR.peek=Toe;function gR(e){return e.value||""}function Toe(){return"<"}yR.peek=Noe;function yR(e,t,n,r){const i=Ib(n),a=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+i),f+=d.move(n.safe(e.title,{before:f,after:i,...d.current()})),f+=d.move(i),c()),f+=d.move(")"),l(),f}function Noe(){return"!"}xR.peek=Roe;function xR(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=g,a(),i==="full"||!f||f!==p?d+=c.move(p+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function Roe(){return"!"}bR.peek=Aoe;function bR(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return i+r+i}function Aoe(){return"`"}function vR(e,t){const n=Nb(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))}wR.peek=joe;function wR(e,t,n,r){const i=Ib(n),a=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(vR(e,n)){const g=n.stack;n.stack=[],c=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),c(),n.stack=g,p}c=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${a}`),f+=l.move(" "+i),f+=l.move(n.safe(e.title,{before:f,after:i,...l.current()})),f+=l.move(i),d()),f+=l.move(")"),c(),f}function joe(e,t,n){return vR(e,n)?"<":"["}SR.peek=Ooe;function SR(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=g,a(),i==="full"||!f||f!==p?d+=c.move(p+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function Ooe(){return"["}function zb(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 Moe(e){const t=zb(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 Loe(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 CR(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 _oe(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?Loe(n):zb(n);const c=e.ordered?l==="."?")":".":Moe(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.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&&(d=!0),CR(n)===l&&g){let p=-1;for(;++p<e.children.length;){const y=e.children[p];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,i(),f}function Doe(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 Ioe(e,t,n,r){const i=Doe(n);let a=n.bulletCurrent||zb(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 l=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),g);return d(),f;function g(p,y,x){return y?(x?"":" ".repeat(l))+p:(x?a:a+" ".repeat(l-a.length))+p}}function zoe(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),i(),l}const Poe=Fm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Foe(e,t,n,r){return(e.children.some(function(l){return Poe(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Boe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ER.peek=Hoe;function ER(e,t,n,r){const i=Boe(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(i+i);let d=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const f=d.charCodeAt(0),g=nm(r.before.charCodeAt(r.before.length-1),f,i);g.inside&&(d=Sd(f)+d.slice(1));const p=d.charCodeAt(d.length-1),y=nm(r.after.charCodeAt(0),p,i);y.inside&&(d=d.slice(0,-1)+Sd(p));const x=l.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},c+d+x}function Hoe(e,t,n){return n.options.strong||"*"}function Uoe(e,t,n,r){return n.safe(e.value,r)}function qoe(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 Voe(e,t,n){const r=(CR(n)+(n.options.ruleSpaces?" ":"")).repeat(qoe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kR={blockquote:hoe,break:LE,code:boe,definition:woe,emphasis:mR,hardBreak:LE,heading:koe,html:gR,image:yR,imageReference:xR,inlineCode:bR,link:wR,linkReference:SR,list:_oe,listItem:Ioe,paragraph:zoe,root:Foe,strong:ER,text:Uoe,thematicBreak:Voe};function $oe(){return{enter:{table:Goe,tableData:_E,tableHeader:_E,tableRow:Woe},exit:{codeText:Koe,table:Yoe,tableData:l2,tableHeader:l2,tableRow:l2}}}function Goe(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 Yoe(e){this.exit(e),this.data.inTable=void 0}function Woe(e){this.enter({type:"tableRow",children:[]},e)}function l2(e){this.exit(e)}function _E(e){this.enter({type:"tableCell",children:[]},e)}function Koe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qoe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Qoe(e,t){return t==="|"?t:e}function Xoe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
116
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:l,tableCell:d,tableRow:c}};function l(x,v,S,E){return f(g(x,S,E),x.align)}function c(x,v,S,E){const k=p(x,S,E),T=f([k]);return T.slice(0,T.indexOf(`
117
+ `))}function d(x,v,S,E){const k=S.enter("tableCell"),T=S.enter("phrasing"),R=S.containerPhrasing(x,{...E,before:a,after:a});return T(),k(),R}function f(x,v){return doe(x,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function g(x,v,S){const E=x.children;let k=-1;const T=[],R=v.enter("table");for(;++k<E.length;)T[k]=p(E[k],v,S);return R(),T}function p(x,v,S){const E=x.children;let k=-1;const T=[],R=v.enter("tableRow");for(;++k<E.length;)T[k]=d(E[k],x,v,S);return R(),T}function y(x,v,S){let E=kR.inlineCode(x,v,S);return S.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function Zoe(){return{exit:{taskListCheckValueChecked:DE,taskListCheckValueUnchecked:DE,paragraph:eae}}}function Joe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tae}}}function DE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function eae(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 r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,l;for(;++a<i.length;){const c=i[a];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function tae(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let d=kR.listItem(e,t,n,{...r,...c.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(g){return g+l}}function nae(){return[_ie(),toe(),ooe(),$oe(),Zoe()]}function rae(e){return{extensions:[Die(),noe(e),aoe(),Xoe(e),Joe()]}}const iae={tokenize:uae,partial:!0},TR={tokenize:dae,partial:!0},NR={tokenize:fae,partial:!0},RR={tokenize:hae,partial:!0},oae={tokenize:pae,partial:!0},AR={name:"wwwAutolink",tokenize:lae,previous:OR},jR={name:"protocolAutolink",tokenize:cae,previous:MR},Jo={name:"emailAutolink",tokenize:sae,previous:LR},xo={};function aae(){return{text:xo}}let Ts=48;for(;Ts<123;)xo[Ts]=Jo,Ts++,Ts===58?Ts=65:Ts===91&&(Ts=97);xo[43]=Jo;xo[45]=Jo;xo[46]=Jo;xo[95]=Jo;xo[72]=[Jo,jR];xo[104]=[Jo,jR];xo[87]=[Jo,AR];xo[119]=[Jo,AR];function sae(e,t,n){const r=this;let i,a;return l;function l(p){return!Cy(p)||!LR.call(r,r.previous)||Pb(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(p))}function c(p){return Cy(p)?(e.consume(p),c):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(oae,g,f)(p):p===45||p===95||br(p)?(a=!0,e.consume(p),d):g(p)}function f(p){return e.consume(p),i=!0,d}function g(p){return a&&i&&Mr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function lae(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!OR.call(r,r.previous)||Pb(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iae,e.attempt(TR,e.attempt(NR,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function cae(e,t,n){const r=this;let i="",a=!1;return l;function l(p){return(p===72||p===104)&&MR.call(r,r.previous)&&!Pb(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),c):n(p)}function c(p){if(Mr(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),c;if(p===58){const y=i.toLowerCase();if(y==="http"||y==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),a?f:(a=!0,d)):n(p)}function f(p){return p===null||Jp(p)||ln(p)||Hs(p)||Im(p)?n(p):e.attempt(TR,e.attempt(NR,g),n)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function uae(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function dae(e,t,n){let r,i,a;return l;function l(f){return f===46||f===95?e.check(RR,d,c)(f):f===null||ln(f)||Hs(f)||f!==45&&Im(f)?d(f):(a=!0,e.consume(f),l)}function c(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),l}function d(f){return i||r||!a?n(f):t(f)}}function fae(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(RR,t,a)(l):l===null||ln(l)||Hs(l)?t(l):(e.consume(l),i)}function a(l){return l===41&&r++,e.consume(l),i}}function hae(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),i):c===60||c===null||ln(c)||Hs(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||ln(c)||Hs(c)?t(c):r(c)}function a(c){return Mr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):Mr(c)?(e.consume(c),l):n(c)}}function pae(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return br(a)?n(a):t(a)}}function OR(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ln(e)}function MR(e){return!Mr(e)}function LR(e){return!(e===47||Cy(e))}function Cy(e){return e===43||e===45||e===46||e===95||br(e)}function Pb(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const mae={tokenize:Cae,partial:!0};function gae(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vae,continuation:{tokenize:wae},exit:Sae}},text:{91:{name:"gfmFootnoteCall",tokenize:bae},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yae,resolveTo:xae}}}}function yae(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const d=r.events[i][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const f=Wi(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function xae(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 r={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)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function bae(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(a>999||p===93&&!l||p===null||p===91||ln(p))return n(p);if(p===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return i.includes(Wi(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return ln(p)||(l=!0),a++,e.consume(p),p===92?g:f}function g(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function vae(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return d;function d(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(v)}function g(v){if(l>999||v===93&&!c||v===null||v===91||ln(v))return n(v);if(v===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Wi(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return ln(v)||(c=!0),l++,e.consume(v),v===92?p:g}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,g):g(v)}function y(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(a)||i.push(a),Pt(e,x,"gfmFootnoteDefinitionWhitespace")):n(v)}function x(v){return t(v)}}function wae(e,t,n){return e.check(tf,t,e.attempt(mae,t,n))}function Sae(e){e.exit("gfmFootnoteDefinition")}function Cae(e,t,n){const r=this;return Pt(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function Eae(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},y=[["enter",g,c],["enter",l[f][1],c],["exit",l[f][1],c],["enter",p,c]],x=c.parser.constructs.insideSpan.null;x&&di(y,y.length,0,zm(x,l.slice(f+1,d),c)),di(y,y.length,0,[["exit",p,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",g,c]]),di(l,f-1,d-f+3,y),d=f+y.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,c,d){const f=this.previous,g=this.events;let p=0;return y;function y(v){return f===126&&g[g.length-1][1].type!=="characterEscape"?d(v):(l.enter("strikethroughSequenceTemporary"),x(v))}function x(v){const S=hc(f);if(v===126)return p>1?d(v):(l.consume(v),p++,x);if(p<2&&!n)return d(v);const E=l.exit("strikethroughSequenceTemporary"),k=hc(v);return E._open=!k||k===2&&!!S,E._close=!S||S===2&&!!k,c(v)}}}class kae{constructor(){this.map=[]}add(t,n,r){Tae(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function Tae(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Nae(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Rae(){return{flow:{null:{name:"table",tokenize:Aae,resolveAll:jae}}}}function Aae(e,t,n){const r=this;let i=0,a=0,l;return c;function c(I){let U=r.events.length-1;for(;U>-1;){const G=r.events[U][1].type;if(G==="lineEnding"||G==="linePrefix")U--;else break}const $=U>-1?r.events[U][1].type:null,V=$==="tableHead"||$==="tableRow"?A:d;return V===A&&r.parser.lazy[r.now().line]?n(I):V(I)}function d(I){return e.enter("tableHead"),e.enter("tableRow"),f(I)}function f(I){return I===124||(l=!0,a+=1),g(I)}function g(I){return I===null?n(I):ot(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),x):n(I):vt(I)?Pt(e,g,"whitespace")(I):(a+=1,l&&(l=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),p(I)))}function p(I){return I===null||I===124||ln(I)?(e.exit("data"),g(I)):(e.consume(I),I===92?y:p)}function y(I){return I===92||I===124?(e.consume(I),p):p(I)}function x(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),l=!1,vt(I)?Pt(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):v(I))}function v(I){return I===45||I===58?E(I):I===124?(l=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),S):O(I)}function S(I){return vt(I)?Pt(e,E,"whitespace")(I):E(I)}function E(I){return I===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),k):I===45?(a+=1,k(I)):I===null||ot(I)?M(I):O(I)}function k(I){return I===45?(e.enter("tableDelimiterFiller"),T(I)):O(I)}function T(I){return I===45?(e.consume(I),T):I===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(I))}function R(I){return vt(I)?Pt(e,M,"whitespace")(I):M(I)}function M(I){return I===124?v(I):I===null||ot(I)?!l||i!==a?O(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):O(I)}function O(I){return n(I)}function A(I){return e.enter("tableRow"),N(I)}function N(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),N):I===null||ot(I)?(e.exit("tableRow"),t(I)):vt(I)?Pt(e,N,"whitespace")(I):(e.enter("data"),D(I))}function D(I){return I===null||I===124||ln(I)?(e.exit("data"),N(I)):(e.consume(I),I===92?H:D)}function H(I){return I===92||I===124?(e.consume(I),D):D(I)}}function jae(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,f,g,p;const y=new kae;for(;++n<e.length;){const x=e[n],v=x[1];x[0]==="enter"?v.type==="tableHead"?(c=!1,d!==0&&(IE(y,t,d,f,g),g=void 0,d=0),f={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},y.add(n,0,[["enter",f,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,g={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},y.add(n,0,[["enter",g,t]])),i=v.type==="tableDelimiterRow"?2:g?3:1):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],p=Yh(y,t,a,i,void 0,p),a=[0,0,0,0]),l[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],p=Yh(y,t,a,i,void 0,p)),a=l,l=[a[1],n,0,0])):v.type==="tableHead"?(c=!0,d=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],p=Yh(y,t,a,i,n,p)):l[1]!==0&&(p=Yh(y,t,l,i,n,p)),i=0):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&IE(y,t,d,f,g),y.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=Nae(t.events,n))}return e}function Yh(e,t,n,r,i,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ql(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ql(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=ql(t.events,n[2]),g=ql(t.events,n[3]),p={type:c,start:Object.assign({},f),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const y=t.events[n[2]],x=t.events[n[3]];if(y[1].end=Object.assign({},x[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,S=n[3]-n[2]-1;e.add(v,S,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(a.end=Object.assign({},ql(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function IE(e,t,n,r,i){const a=[],l=ql(t.events,n);i&&(i.end=Object.assign({},l),a.push(["exit",i,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function ql(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Oae={name:"tasklistCheck",tokenize:Lae};function Mae(){return{text:{91:Oae}}}function Lae(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ln(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return ot(d)?t(d):vt(d)?e.check({tokenize:_ae},t,n)(d):n(d)}}function _ae(e,t,n){return Pt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Dae(e){return q8([aae(),gae(),Eae(e),Rae(),Mae()])}const Iae={};function _R(e){const t=this,n=e||Iae,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Dae(n)),a.push(nae()),l.push(rae(n))}function zae(e){return e.includes("<<<<<<<")&&e.includes("=======")&&e.includes(">>>>>>>")}function Pae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Fae(e,t){if(e==null)return{};var n,r,i=Pae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ey(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bae(e){if(Array.isArray(e))return Ey(e)}function Hae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uae(e,t){if(e){if(typeof e=="string")return Ey(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ey(e,t):void 0}}function qae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
118
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ky(e){return Bae(e)||Hae(e)||Uae(e)||qae()}function Cd(e){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cd(e)}function Vae(e,t){if(Cd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $ae(e){var t=Vae(e,"string");return Cd(t)=="symbol"?t:t+""}function DR(e,t,n){return(t=$ae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ty(){return Ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ty.apply(null,arguments)}function zE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(n),!0).forEach(function(r){DR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gae(e){var t=e.length;if(t===0||t===1)return e;if(t===2)return[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])];if(t===3)return[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])];if(t>=4)return[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]}var c2={};function Yae(e){if(e.length===0||e.length===1)return e;var t=e.join(".");return c2[t]||(c2[t]=Gae(e)),c2[t]}function Wae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter(function(a){return a!=="token"}),i=Yae(r);return i.reduce(function(a,l){return Yl(Yl({},a),n[l])},t)}function PE(e){return e.join(" ")}function Kae(e,t){var n=0;return function(r){return n+=1,r.map(function(i,a){return IR({node:i,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(a)})})}}function IR(e){var t=e.node,n=e.stylesheet,r=e.style,i=r===void 0?{}:r,a=e.useInlineStyles,l=e.key,c=t.properties,d=t.type,f=t.tagName,g=t.value;if(d==="text")return g;if(f){var p=Kae(n,a),y;if(!a)y=Yl(Yl({},c),{},{className:PE(c.className)});else{var x=Object.keys(n).reduce(function(k,T){return T.split(".").forEach(function(R){k.includes(R)||k.push(R)}),k},[]),v=c.className&&c.className.includes("token")?["token"]:[],S=c.className&&v.concat(c.className.filter(function(k){return!x.includes(k)}));y=Yl(Yl({},c),{},{className:PE(S)||void 0,style:Wae(c.className,Object.assign({},c.style,i),n)})}var E=p(t.children);return ke.createElement(f,Ty({key:l},y),E)}}const Qae=(function(e,t){var n=e.listLanguages();return n.indexOf(t)!==-1});var Xae=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function FE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FE(Object(n),!0).forEach(function(r){DR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Zae=/\n/g;function Jae(e){return e.match(Zae)}function ese(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(i,a){var l=a+n;return ke.createElement("span",{key:"line-".concat(a),className:"react-syntax-highlighter-line-number",style:typeof r=="function"?r(l):r},"".concat(l,`
119
+ `))})}function tse(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=r===void 0?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,l=a===void 0?{}:a,c=e.startingLineNumber;return ke.createElement("code",{style:Object.assign({},n,i)},ese({lines:t.replace(/\n$/,"").split(`
120
+ `),style:l,startingLineNumber:c}))}function nse(e){return"".concat(e.toString().length,".25em")}function zR(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function PR(e,t,n){var r={display:"inline-block",minWidth:nse(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},i=typeof e=="function"?e(t):e,a=Da(Da({},r),i);return a}function mp(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,l=e.lineProps,c=l===void 0?{}:l,d=e.className,f=d===void 0?[]:d,g=e.showLineNumbers,p=e.wrapLongLines,y=e.wrapLines,x=y===void 0?!1:y,v=x?Da({},typeof c=="function"?c(n):c):{};if(v.className=v.className?[].concat(ky(v.className.trim().split(/\s+/)),ky(f)):f,n&&a){var S=PR(r,n,i);t.unshift(zR(n,S))}return p&g&&(v.style=Da({display:"flex"},v.style)),{type:"element",tagName:"span",properties:v,children:t}}function FR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];e.length===void 0&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if(i.type==="text")n.push(mp({children:[i],className:ky(new Set(t))}));else if(i.children){var a,l=t.concat(((a=i.properties)===null||a===void 0?void 0:a.className)||[]);FR(i.children,l).forEach(function(c){return n.push(c)})}}return n}function rse(e,t,n,r,i,a,l,c,d){var f,g=FR(e.value),p=[],y=-1,x=0;function v(O,A){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return mp({children:O,lineNumber:A,lineNumberStyle:c,largestLineNumber:l,showInlineLineNumbers:i,lineProps:n,className:N,showLineNumbers:r,wrapLongLines:d,wrapLines:t})}function S(O,A){if(r&&A&&i){var N=PR(c,A,l);O.unshift(zR(A,N))}return O}function E(O,A){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||N.length>0?v(O,A,N):S(O,A)}for(var k=function(){var A=g[x],N=A.children[0].value,D=Jae(N);if(D){var H=N.split(`
121
+ `);H.forEach(function(I,U){var $=r&&p.length+a,V={type:"text",value:"".concat(I,`
122
+ `)};if(U===0){var G=g.slice(y+1,x).concat(mp({children:[V],className:A.properties.className})),B=E(G,$);p.push(B)}else if(U===H.length-1){var F=g[x+1]&&g[x+1].children&&g[x+1].children[0],q={type:"text",value:"".concat(I)};if(F){var W=mp({children:[q],className:A.properties.className});g.splice(x+1,0,W)}else{var ie=[q],_=E(ie,$,A.properties.className);p.push(_)}}else{var z=[V],Y=E(z,$,A.properties.className);p.push(Y)}}),y=x}x++};x<g.length;)k();if(y!==g.length-1){var T=g.slice(y+1,g.length);if(T&&T.length){var R=r&&p.length+a,M=E(T,R);p.push(M)}}return t?p:(f=[]).concat.apply(f,p)}function ise(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(i,a){return IR({node:i,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(a)})})}function BR(e){return e&&typeof e.highlightAuto<"u"}function ose(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(BR(t)){var a=Qae(t,n);return n==="text"?{value:i,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!=="text"?{value:t.highlight(r,n)}:{value:i}}catch{return{value:i}}}function ase(e,t){return function(r){var i,a,l=r.language,c=r.children,d=r.style,f=d===void 0?t:d,g=r.customStyle,p=g===void 0?{}:g,y=r.codeTagProps,x=y===void 0?{className:l?"language-".concat(l):void 0,style:Da(Da({},f['code[class*="language-"]']),f['code[class*="language-'.concat(l,'"]')])}:y,v=r.useInlineStyles,S=v===void 0?!0:v,E=r.showLineNumbers,k=E===void 0?!1:E,T=r.showInlineLineNumbers,R=T===void 0?!0:T,M=r.startingLineNumber,O=M===void 0?1:M,A=r.lineNumberContainerStyle,N=r.lineNumberStyle,D=N===void 0?{}:N,H=r.wrapLines,I=r.wrapLongLines,U=I===void 0?!1:I,$=r.lineProps,V=$===void 0?{}:$,G=r.renderer,B=r.PreTag,F=B===void 0?"pre":B,q=r.CodeTag,W=q===void 0?"code":q,ie=r.code,_=ie===void 0?(Array.isArray(c)?c[0]:c)||"":ie,z=r.astGenerator,Y=Fae(r,Xae);z=z||e;var L=k?ke.createElement(tse,{containerStyle:A,codeStyle:x.style||{},numberStyle:D,startingLineNumber:O,codeString:_}):null,ee=f.hljs||f['pre[class*="language-"]']||{backgroundColor:"#fff"},te=BR(z)?"hljs":"prismjs",Q=S?Object.assign({},Y,{style:Object.assign({},ee,p)}):Object.assign({},Y,{className:Y.className?"".concat(te," ").concat(Y.className):te,style:Object.assign({},p)});if(U?x.style=Da({whiteSpace:"pre-wrap"},x.style):x.style=Da({whiteSpace:"pre"},x.style),!z)return ke.createElement(F,Q,L,ke.createElement(W,x,_));(H===void 0&&G||U)&&(H=!0),G=G||ise;var de=[{type:"text",value:_}],ue=ose({astGenerator:z,language:l,code:_,defaultCodeValue:de});ue.language===null&&(ue.value=de);var Se=(i=(a=_.match(/\n/g))===null||a===void 0?void 0:a.length)!==null&&i!==void 0?i:0,Ee=O+Se,ze=rse(ue,H,V,k,R,O,Ee,D,U);return ke.createElement(F,Q,ke.createElement(W,x,!R&&L,G({rows:ze,stylesheet:f,useInlineStyles:S})))}}const BE=/[#.]/g;function sse(e,t){const n=e||"",r={};let i=0,a,l;for(;i<n.length;){BE.lastIndex=i;const c=BE.exec(n),d=n.slice(i,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:l=d,i+=d.length),c&&(a=c[0],i++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function HR(e,t,n){const r=n?dse(n):void 0;function i(a,l,...c){let d;if(a==null){d={type:"root",children:[]};const f=l;c.unshift(f)}else{d=sse(a,t);const f=d.tagName.toLowerCase(),g=r?r.get(f):void 0;if(d.tagName=g||f,lse(l))c.unshift(l);else for(const[p,y]of Object.entries(l))cse(e,d.properties,p,y)}for(const f of c)Ny(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return i}function lse(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const l of a)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function cse(e,t,n,r){const i=_8(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Y4(r):i.commaSeparated?a=U4(r):i.commaOrSpaceSeparated?a=Y4(U4(r).join(" ")):a=HE(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?use(r):String(r);if(Array.isArray(a)){const l=[];for(const c of a)l.push(HE(i,i.property,c));a=l}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Ny(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Ny(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ny(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function HE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||bd(n)===bd(t)))return!0}return n}function use(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function dse(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const fse=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],hse=HR(D8,"div");HR(Dm,"g",fse);const pse=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],UE={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function UR(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function mse(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function gse(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function qE(e){return gse(e)||UR(e)}const yse=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function xse(e,t){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let a=0,l=-1,c="",d,f;n.position&&("start"in n.position||"indent"in n.position?(f=n.position.indent,d=n.position.start):d=n.position);let g=(d?d.line:0)||1,p=(d?d.column:0)||1,y=v(),x;for(a--;++a<=e.length;)if(x===10&&(p=(f?f[l]:0)||1),x=e.charCodeAt(a),x===38){const k=e.charCodeAt(a+1);if(k===9||k===10||k===12||k===32||k===38||k===60||Number.isNaN(k)||r&&k===r){c+=String.fromCharCode(x),p++;continue}const T=a+1;let R=T,M=T,O;if(k===35){M=++R;const V=e.charCodeAt(M);V===88||V===120?(O="hexadecimal",M=++R):O="decimal"}else O="named";let A="",N="",D="";const H=O==="named"?qE:O==="decimal"?UR:mse;for(M--;++M<=e.length;){const V=e.charCodeAt(M);if(!H(V))break;D+=String.fromCharCode(V),O==="named"&&pse.includes(D)&&(A=D,N=wd(D))}let I=e.charCodeAt(M)===59;if(I){M++;const V=O==="named"?wd(D):!1;V&&(A=D,N=V)}let U=1+M-T,$="";if(!(!I&&n.nonTerminated===!1))if(!D)O!=="named"&&S(4,U);else if(O==="named"){if(I&&!N)S(5,1);else if(A!==D&&(M=R+A.length,U=1+M-R,I=!1),!I){const V=A?1:3;if(n.attribute){const G=e.charCodeAt(M);G===61?(S(V,U),N=""):qE(G)?N="":S(V,U)}else S(V,U)}$=N}else{I||S(2,U);let V=Number.parseInt(D,O==="hexadecimal"?16:10);if(bse(V))S(7,U),$="�";else if(V in UE)S(6,U),$=UE[V];else{let G="";vse(V)&&S(6,U),V>65535&&(V-=65536,G+=String.fromCharCode(V>>>10|55296),V=56320|V&1023),$=G+String.fromCharCode(V)}}if($){E(),y=v(),a=M-1,p+=M-T+1,i.push($);const V=v();V.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,$,{start:y,end:V},e.slice(T-1,M)),y=V}else D=e.slice(T-1,M),c+=D,p+=D.length,a=M-1}else x===10&&(g++,l++,p=0),Number.isNaN(x)?E():(c+=String.fromCharCode(x),p++);return i.join("");function v(){return{line:g,column:p,offset:a+((d?d.offset:0)||0)}}function S(k,T){let R;n.warning&&(R=v(),R.column+=T,R.offset+=T,n.warning.call(n.warningContext||void 0,yse[k],R,k))}function E(){c&&(i.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:y,end:v()}),c="")}}function bse(e){return e>=55296&&e<=57343||e>1114111}function vse(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var wse=0,Wh={},rr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++wse}),e.__id},clone:function e(t,n){n=n||{};var r,i;switch(rr.util.type(t)){case"Object":if(i=rr.util.objId(t),n[i])return n[i];r={},n[i]=r;for(var a in t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=rr.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(l,c){r[c]=e(l,n)}),r);default:return t}}},languages:{plain:Wh,plaintext:Wh,text:Wh,txt:Wh,extend:function(e,t){var n=rr.util.clone(rr.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r=r||rr.languages;var i=r[e],a={};for(var l in i)if(i.hasOwnProperty(l)){if(l==t)for(var c in n)n.hasOwnProperty(c)&&(a[c]=n[c]);n.hasOwnProperty(l)||(a[l]=i[l])}var d=r[e];return r[e]=a,rr.languages.DFS(rr.languages,function(f,g){g===d&&f!=e&&(this[f]=a)}),a},DFS:function e(t,n,r,i){i=i||{};var a=rr.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],r||l);var c=t[l],d=rr.util.type(c);d==="Object"&&!i[a(c)]?(i[a(c)]=!0,e(c,n,null,i)):d==="Array"&&!i[a(c)]&&(i[a(c)]=!0,e(c,n,l,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(rr.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=rr.tokenize(r.code,r.grammar),rr.hooks.run("after-tokenize",r),nd.stringify(rr.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new Sse;return gp(i,i.head,e),qR(e,i,t,i.head,0),Ese(i)},hooks:{all:{},add:function(e,t){var n=rr.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=rr.hooks.all[e];if(!(!n||!n.length))for(var r=0,i;i=n[r++];)i(t)}},Token:nd};function nd(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||"").length|0}function VE(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function qR(e,t,n,r,i,a){for(var l in n)if(!(!n.hasOwnProperty(l)||!n[l])){var c=n[l];c=Array.isArray(c)?c:[c];for(var d=0;d<c.length;++d){if(a&&a.cause==l+","+d)return;var f=c[d],g=f.inside,p=!!f.lookbehind,y=!!f.greedy,x=f.alias;if(y&&!f.pattern.global){var v=f.pattern.toString().match(/[imsuy]*$/)[0];f.pattern=RegExp(f.pattern.source,v+"g")}for(var S=f.pattern||f,E=r.next,k=i;E!==t.tail&&!(a&&k>=a.reach);k+=E.value.length,E=E.next){var T=E.value;if(t.length>e.length)return;if(!(T instanceof nd)){var R=1,M;if(y){if(M=VE(S,k,e,p),!M||M.index>=e.length)break;var D=M.index,O=M.index+M[0].length,A=k;for(A+=E.value.length;D>=A;)E=E.next,A+=E.value.length;if(A-=E.value.length,k=A,E.value instanceof nd)continue;for(var N=E;N!==t.tail&&(A<O||typeof N.value=="string");N=N.next)R++,A+=N.value.length;R--,T=e.slice(k,A),M.index-=k}else if(M=VE(S,0,T,p),!M)continue;var D=M.index,H=M[0],I=T.slice(0,D),U=T.slice(D+H.length),$=k+T.length;a&&$>a.reach&&(a.reach=$);var V=E.prev;I&&(V=gp(t,V,I),k+=I.length),Cse(t,V,R);var G=new nd(l,g?rr.tokenize(H,g):H,x,H);if(E=gp(t,V,G),U&&gp(t,E,U),R>1){var B={cause:l+","+d,reach:$};qR(e,t,n,E.prev,k,B),a&&B.reach>a.reach&&(a.reach=B.reach)}}}}}}function Sse(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function gp(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function Cse(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function Ese(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}const VR=rr;function $R(){}$R.prototype=VR;const Zn=new $R;Zn.highlight=kse;Zn.register=Tse;Zn.alias=Nse;Zn.registered=Rse;Zn.listLanguages=Ase;Zn.util.encode=jse;Zn.Token.stringify=Ry;function kse(e,t){if(typeof e!="string")throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&typeof t=="object")n=t;else{if(r=t,typeof r!="string")throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(Object.hasOwn(Zn.languages,r))n=Zn.languages[r];else throw new Error("Unknown language: `"+r+"` is not registered")}return{type:"root",children:VR.highlight.call(Zn,e,n,r)}}function Tse(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(Zn.languages,e.displayName)||e(Zn)}function Nse(e,t){const n=Zn.languages;let r={};typeof e=="string"?t&&(r[e]=t):r=e;let i;for(i in r)if(Object.hasOwn(r,i)){const a=r[i],l=typeof a=="string"?[a]:a;let c=-1;for(;++c<l.length;)n[l[c]]=n[i]}}function Rse(e){if(typeof e!="string")throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(Zn.languages,e)}function Ase(){const e=Zn.languages,t=[];let n;for(n in e)Object.hasOwn(e,n)&&typeof e[n]=="object"&&t.push(n);return t}function Ry(e,t){if(typeof e=="string")return{type:"text",value:e};if(Array.isArray(e)){const r=[];let i=-1;for(;++i<e.length;)e[i]!==null&&e[i]!==void 0&&e[i]!==""&&r.push(Ry(e[i],t));return r}const n={attributes:{},classes:["token",e.type],content:Ry(e.content,t),language:t,tag:"span",type:e.type};return e.alias&&n.classes.push(...typeof e.alias=="string"?[e.alias]:e.alias),Zn.hooks.run("wrap",n),hse(n.tag+"."+n.classes.join("."),Ose(n.attributes),n.content)}function jse(e){return e}function Ose(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=xse(e[t]));return e}var Qt=ase(Zn,{});Qt.registerLanguage=function(e,t){return Zn.register(t)};Qt.alias=function(e,t){return Zn.alias(e,t)};el.displayName="markup";el.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function el(e){e.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]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&amp;/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,r){var i={};i["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[r]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var l={};l[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\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:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}Fb.displayName="css";Fb.aliases=[];function Fb(e){(function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,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:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}Hm.displayName="clike";Hm.aliases=[];function Hm(e){e.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:/[{}[\];(),.:]/}}Rc.displayName="javascript";Rc.aliases=["js"];function Rc(e){e.register(Hm),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.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}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.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:e.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:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.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:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.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:e.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"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.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")),e.languages.js=e.languages.javascript}Bb.displayName="sql";Bb.aliases=[];function Bb(e){e.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:/[;[\]()`,.]/}}rf.displayName="bash";rf.aliases=["sh","shell"];function rf(e){(function(t){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},i={bash:r,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:i},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:i},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:i.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:i.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=t.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],l=i.variable[1].inside,c=0;c<a.length;c++)l[a[c]]=t.languages.bash[a[c]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(e)}Um.displayName="yaml";Um.aliases=["yml"];function Um(e){(function(t){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+r.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\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}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(d,f){f=(f||"").replace(/m/g,"")+"m";var g=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return d});return RegExp(g,f)}t.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 i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+a+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\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:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(l),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(e)}qm.displayName="markdown";qm.aliases=["md"];function qm(e){e.register(el),(function(t){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(c){return c=c.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),l=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.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:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+l+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+l+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:t.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:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<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:r(/!?\[(?:(?!\])<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(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(t.languages.markdown[c].inside.content.inside[d]=t.languages.markdown[d])})}),t.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var g=0,p=f.length;g<p;g++){var y=f[g];if(y.type!=="code"){d(y.content);continue}var x=y.content[1],v=y.content[3];if(x&&v&&x.type==="code-language"&&v.type==="code-block"&&typeof x.content=="string"){var S=x.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");S=(/[a-z][\w-]*/i.exec(S)||[""])[0].toLowerCase();var E="language-"+S;v.alias?typeof v.alias=="string"?v.alias=[v.alias,E]:v.alias.push(E):v.alias=[E]}}}d(c.tokens)}),t.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",f=0,g=c.classes.length;f<g;f++){var p=c.classes[f],y=/language-(.+)/.exec(p);if(y){d=y[1];break}}var x=t.languages[d];if(x)c.content=t.highlight(c.content.value,x,d);else if(d&&d!=="none"&&t.plugins.autoloader){var v="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=v,t.plugins.autoloader.loadLanguages(d,function(){var S=document.getElementById(v);S&&(S.innerHTML=t.highlight(S.textContent,t.languages[d],d))})}}}),RegExp(t.languages.markup.tag.pattern.source,"gi"),t.languages.md=t.languages.markdown})(e)}Hb.displayName="diff";Hb.aliases=[];function Hb(e){(function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var n={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(n).forEach(function(r){var i=n[r],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),r==="diff"&&a.push("bold"),t.languages.diff[r]={pattern:RegExp("^(?:["+i+`].*(?:\r
123
+ ?|
124
+ |(?![\\s\\S])))+`,"m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(t.languages.diff,"PREFIXES",{value:n})})(e)}Ub.displayName="go";Ub.aliases=[];function Ub(e){e.register(Hm),e.languages.go=e.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/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}qb.displayName="json";qb.aliases=["webmanifest"];function qb(e){e.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"}},e.languages.webmanifest=e.languages.json}of.displayName="typescript";of.aliases=["ts"];function of(e){e.register(Rc),(function(t){t.languages.typescript=t.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/}),t.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 t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var n=t.languages.extend("typescript",{});delete n["class-name"],t.languages.typescript["class-name"].inside=n,t.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:n}}}}),t.languages.ts=t.languages.typescript})(e)}Vm.displayName="python";Vm.aliases=["py"];function Vm(e){e.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:/![sra](?=[:}]$)/,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:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}$m.displayName="jsx";$m.aliases=[];function $m(e){e.register(Rc),e.register(el),(function(t){var n=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function l(f,g){return f=f.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return a}),RegExp(f,g)}a=l(a).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=l(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:l(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:l(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var c=function(f){return f?typeof f=="string"?f:typeof f.content=="string"?f.content:f.content.map(c).join(""):""},d=function(f){for(var g=[],p=0;p<f.length;p++){var y=f[p],x=!1;if(typeof y!="string"&&(y.type==="tag"&&y.content[0]&&y.content[0].type==="tag"?y.content[0].content[0].content==="</"?g.length>0&&g[g.length-1].tagName===c(y.content[0].content[1])&&g.pop():y.content[y.content.length-1].content==="/>"||g.push({tagName:c(y.content[0].content[1]),openedBraces:0}):g.length>0&&y.type==="punctuation"&&y.content==="{"?g[g.length-1].openedBraces++:g.length>0&&g[g.length-1].openedBraces>0&&y.type==="punctuation"&&y.content==="}"?g[g.length-1].openedBraces--:x=!0),(x||typeof y=="string")&&g.length>0&&g[g.length-1].openedBraces===0){var v=c(y);p<f.length-1&&(typeof f[p+1]=="string"||f[p+1].type==="plain-text")&&(v+=c(f[p+1]),f.splice(p+1,1)),p>0&&(typeof f[p-1]=="string"||f[p-1].type==="plain-text")&&(v=c(f[p-1])+v,f.splice(p-1,1),p--),f[p]=new t.Token("plain-text",v,null,v)}y.content&&typeof y.content!="string"&&d(y.content)}};t.hooks.add("after-tokenize",function(f){f.language!=="jsx"&&f.language!=="tsx"||d(f.tokens)})})(e)}Vb.displayName="tsx";Vb.aliases=[];function Vb(e){e.register($m),e.register(of),(function(t){var n=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",n),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var r=t.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(e)}Gm.displayName="rust";Gm.aliases=[];function Gm(e){(function(t){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(e)}const $b={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}};Qt.registerLanguage("bash",rf);Qt.registerLanguage("css",Fb);Qt.registerLanguage("diff",Hb);Qt.registerLanguage("go",Ub);Qt.registerLanguage("html",el);Qt.registerLanguage("javascript",Rc);Qt.registerLanguage("js",Rc);Qt.registerLanguage("json",qb);Qt.registerLanguage("jsx",$m);Qt.registerLanguage("markdown",qm);Qt.registerLanguage("markup",el);Qt.registerLanguage("md",qm);Qt.registerLanguage("python",Vm);Qt.registerLanguage("py",Vm);Qt.registerLanguage("rust",Gm);Qt.registerLanguage("rs",Gm);Qt.registerLanguage("sh",rf);Qt.registerLanguage("shell",rf);Qt.registerLanguage("sql",Bb);Qt.registerLanguage("ts",of);Qt.registerLanguage("tsx",Vb);Qt.registerLanguage("typescript",of);Qt.registerLanguage("xml",el);Qt.registerLanguage("yaml",Um);Qt.registerLanguage("yml",Um);const GR=C.memo(({language:e,value:t})=>{const[n,r]=C.useState(!1),i=()=>{r(!0),navigator.clipboard.writeText(t),setTimeout(()=>r(!1),1e3)};return h.jsxs("div",{className:"codeblock border-input relative w-full overflow-hidden rounded border p-2 font-sans dark:bg-zinc-900",children:[h.jsxs("div",{className:"bg-secondary flex w-full items-center justify-between px-2 py-1",children:[h.jsx("span",{className:"text-primary text-lg font-bold lowercase italic",children:e}),h.jsx("div",{className:"flex items-center py-1",children:h.jsxs(Re,{className:"hover:bg-border text-xs focus-visible:ring-1 focus-visible:ring-offset-0",onClick:i,size:"xs",variant:"ghost",children:[n?h.jsx(Qs,{className:"h-4 w-4"}):h.jsx(CU,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Copy code"})]})})]}),h.jsx(Qt,{codeTagProps:{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.75rem"}},customStyle:{background:"transparent",margin:0,padding:"0.5rem",width:"100%"},language:e,PreTag:"div",style:$b,children:t})]})});GR.displayName="CodeBlock";const Mse=C.memo(uR,(e,t)=>e.children===t.children),Lse=e=>C.isValidElement(e)&&typeof e.type!="string"&&["h1","h2","h3","h4","h5","h6","p"].includes(e.type.name??""),_se=e=>Array.isArray(e)&&e.some(t=>t?.props?.className==="task-list-item"),Dse=e=>C.Children.map(e,t=>Lse(t)?h.jsx("div",{className:"mb-1 inline-flex",children:C.createElement(t.type,{...t.props})}):t),Ise=[[Rie,["yaml","toml"]],_R],zse={a({children:e,href:t}){return t?h.jsx("a",{className:"underline",href:t,rel:"noopener noreferrer",target:"_blank",children:e}):h.jsx(h.Fragment,{children:e})},blockquote({children:e}){return h.jsx("blockquote",{className:"border-input border-l-4 pl-4 italic",children:e})},code({children:e,className:t}){const n=/language-(\w+)/.exec(t??""),r=n?n[1]:"",i=String(e).replace(/\n$/,""),a=i.includes(`
125
+ `);return r||a?h.jsx(GR,{language:r,value:i}):h.jsx("code",{className:"border-input bg-secondary rounded border px-1 py-0.5 text-amber-500",children:i})},h1({children:e}){return h.jsx("h1",{className:"text-2xl font-bold",children:e})},h2({children:e}){return h.jsx("h2",{className:"text-xl font-bold",children:e})},h3({children:e}){return h.jsx("h3",{className:"text-lg font-bold",children:e})},h4({children:e}){return h.jsx("h4",{className:"text-base font-bold",children:e})},h5({children:e}){return h.jsx("h5",{className:"text-sm font-bold",children:e})},h6({children:e}){return h.jsx("h6",{className:"text-xs font-bold",children:e})},hr(){return h.jsx("hr",{className:"my-4"})},li({children:e}){return h.jsx("li",{className:"mt-1 [&>ol]:pl-4 [&>ul]:pl-4",children:Dse(e)})},ol({children:e}){return h.jsx("ol",{className:"list-inside list-decimal",children:e})},p({children:e}){return h.jsx("p",{className:"mb-2 whitespace-pre-wrap last:mb-0",children:e})},pre({children:e}){return h.jsx("pre",{className:"rounded p-2",children:e})},table({children:e}){return h.jsx("div",{className:"border-input overflow-x-auto rounded text-xs",children:h.jsx("table",{className:"min-w-full divide-y",children:e})})},tbody({children:e}){return h.jsx("tbody",{className:"divide-border divide-y",children:e})},td({children:e}){return h.jsx("td",{className:"whitespace-nowrap px-4 py-2",children:e})},th({children:e}){return h.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider",children:e})},thead({children:e}){return h.jsx("thead",{children:e})},tr({children:e}){return h.jsx("tr",{children:e})},ul({children:e}){return _se(e)?h.jsx("ul",{className:"list-none",children:e}):h.jsx("ul",{className:"list-inside list-disc",children:e})}};function Pse({content:e}){const t=e.split(`
126
+ `);let n="none";return h.jsx("pre",{className:"bg-card overflow-x-auto rounded-md py-2 font-mono text-xs leading-6",children:t.map((r,i)=>{let a="block px-3 whitespace-pre-wrap break-all";return r.startsWith("<<<<<<<")?(a+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="ours"):r.startsWith("=======")&&n!=="none"?(a+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="theirs"):r.startsWith(">>>>>>>")&&(a+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="none"),h.jsx("span",{className:a,children:r||" "},i)})})}function Fse({className:e,content:t}){const n=e??"bg-card text-secondary-foreground mx-auto min-h-0 w-full flex-1 space-y-2 overflow-y-auto break-words text-sm leading-7";return zae(t)?h.jsxs("div",{className:n,children:[h.jsxs("div",{className:"bg-[#4f3422] text-[#ffc53d] mb-2 flex items-center gap-2 rounded-md px-3 py-2 text-xs",children:[h.jsx(dq,{className:"size-3.5 shrink-0"}),h.jsx("span",{children:"Unresolved conflict markers — showing raw content with side highlighting."})]}),h.jsx(Pse,{content:t})]}):h.jsx("div",{className:n,children:h.jsx(Mse,{components:zse,remarkPlugins:Ise,children:t})})}function Bse({onToggleHistory:e}){const{cancelEdit:t,editContent:n,enterEditMode:r,fileData:i,handleSelect:a,hasChanges:l,isEditMode:c,isFetchingFile:d,isUpdating:f,navigateHome:g,nodes:p,saveChanges:y,selectedNode:x,selectedPath:v,setEditContent:S}=kc(),{data:E,isPending:k}=T8({enabled:!!v&&Zd(v),path:v}),T=E?.pages[0]?.commits[0],R=C.useMemo(()=>!x||x.type!=="tree"?x?[]:p:x.children??[],[x,p]),M=C.useMemo(()=>R.filter(H=>H.type==="blob").map(H=>H.path),[R]),{data:O}=KJ({enabled:M.length>0,paths:M}),A=C.useMemo(()=>{const H=new Map((O?.files??[]).map(I=>[I.path,I]));return R.map(I=>{const U=H.get(I.path);return{lastUpdatedBy:U?.lastUpdatedBy,lastUpdatedWhen:U?.lastUpdatedWhen?P4(new Date(U.lastUpdatedWhen),{addSuffix:!0}):void 0,name:I.name,path:I.path,type:I.type}})},[R,O]),N=H=>{const I=R.find(U=>U.path===H.path);I&&a(I)},D=()=>{if(!v)return;const H=v.split("/").filter(Boolean);if(H.length<=1){g();return}const I=H.slice(0,-1).join("/");a({children:[],name:"..",path:I,type:"tree"})};return x?.type==="blob"?h.jsxs("div",{className:"flex h-full flex-1 flex-col",children:[h.jsx("div",{className:"px-5 pt-5",children:h.jsx(H4,{})}),h.jsx(jZ,{canEdit:!0,content:i?.content??"",contentView:!c&&i?.content?h.jsx(Fse,{content:i.content}):void 0,editContent:n,fileName:i?.title??x.name,hasChanges:l,headerClassName:"pt-4 pb-0",isEditMode:c,isHistoryVisible:!1,isLoading:d,isUpdating:f,onCancelEdit:t,onContentChange:S,onEnterEditMode:r,onSaveChanges:y,onToggleHistory:e??Bs,showTags:!1,tags:i?.tags,timeline:T?h.jsx(RZ,{className:"mx-5 mb-5",description:`${T.author.name} updated ${x.name}`,name:T.author.name,timestamp:P4(new Date(T.timestamp),{addSuffix:!0})}):k?h.jsxs("div",{className:"border-border mx-5 mb-5 flex items-center gap-2 border-b py-2",children:[h.jsx(pr,{className:"size-6 shrink-0 rounded-full"}),h.jsx(pr,{className:"h-4 w-56"})]}):void 0})]}):h.jsxs("div",{className:"flex-1 h-full flex-col flex p-5 gap-4",children:[h.jsx(H4,{}),h.jsx(OZ,{nodes:A,onBack:D,onNodeClick:N,showBack:!!v})]})}function $E({title:e,authorName:t,authorAvatar:n,isActive:r,isLast:i,variant:a="default",highlightColor:l="#ED9A00",onClick:c,className:d}){const f=a==="highlight";return h.jsxs("div",{role:c?"button":void 0,onClick:c,className:ge("relative flex gap-4 rounded-lg border border-transparent px-4",{"border-primary bg-primary/5":r,"cursor-pointer":!!c},f&&"bg-[#ED9A00]/5",c&&f&&"hover:bg-[#ED9A00]/10",d),children:[h.jsxs("div",{className:"relative top-3 flex flex-col items-center",children:[f?h.jsx("div",{className:"mt-2 size-2 rounded-full",style:{backgroundColor:l}}):r?h.jsx("div",{className:"bg-primary mt-2 size-2 rounded-full"}):h.jsx(mO,{className:"mt-2 size-2 text-neutral-500",strokeWidth:6}),!i&&!r&&!f&&h.jsx("div",{className:"absolute top-4 h-full w-px bg-neutral-800"})]}),h.jsxs("div",{className:"flex-1 space-y-1 py-3",children:[h.jsx(Qp,{className:"text-foreground mb-1 block text-sm font-medium",text:e}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsxs(Ud,{className:"size-4",children:[n&&h.jsx(Nm,{src:n}),h.jsx(qd,{className:"text-[10px]",children:t[0]})]}),h.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:t})]})]})]})}function GE({isActive:e=!1,isLast:t=!1}){return h.jsxs("div",{className:"relative flex gap-4 rounded-lg px-4",children:[h.jsxs("div",{className:"relative top-3 flex flex-col items-center",children:[h.jsx(pr,{className:"mt-2 size-2 rounded-full"}),!t&&!e&&h.jsx("div",{className:"absolute top-4 h-full w-px bg-neutral-800"})]}),h.jsxs("div",{className:"flex-1 space-y-1 py-3",children:[h.jsx(pr,{className:"h-4 w-3/4"}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx(pr,{className:"size-4 rounded-full"}),h.jsx(pr,{className:"h-3 w-24"})]})]})]})}function Hse({showCurrent:e=!0,olderCount:t=3,currentLabel:n="Current",olderLabel:r="Older"}){return h.jsxs("div",{className:"space-y-6",children:[e&&h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-xs font-medium text-neutral-400",children:n}),h.jsx(GE,{isActive:!0})]}),t>0&&h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-xs font-medium text-neutral-400",children:r}),Array.from({length:t}).map((i,a)=>h.jsx(GE,{isLast:a===t-1},a))]})]})}function YE({label:e,children:t}){return h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-xs font-medium text-neutral-400",children:e}),t]})}function Use({title:e="Version history",isLoading:t,error:n,isEmpty:r,hasNextPage:i,isFetchingNextPage:a,onLoadMore:l,onClose:c,children:d}){return h.jsxs("div",{className:"flex h-full flex-col",children:[h.jsxs("div",{className:"bg-card flex flex-shrink-0 justify-between rounded-t-xl px-6 py-3 pr-3.5",children:[h.jsx("div",{className:"flex items-center gap-2",children:h.jsx("div",{className:"text-foreground text-sm font-semibold",children:e})}),h.jsx("div",{children:h.jsx(Re,{className:"bg-card hover:bg-muted h-9 w-9 rounded-lg p-2",onClick:c,children:h.jsx(im,{className:"text-muted-foreground size-5"})})})]}),h.jsx("div",{className:"bg-card flex-1 space-y-6 overflow-y-auto rounded-b-xl p-6",children:t?h.jsx(Hse,{showCurrent:!0,olderCount:3}):n?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx("p",{className:"text-sm text-neutral-500",children:"Failed to load history"})}):r?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx("p",{className:"text-sm text-neutral-500",children:"No history available"})}):h.jsxs(h.Fragment,{children:[d,i&&h.jsx(Re,{onClick:l,disabled:a,className:"text-primary w-25 rounded-md bg-transparent text-sm font-medium hover:bg-transparent hover:underline",children:a?h.jsx(rd,{className:"h-4 w-4 animate-spin"}):"View older"})]})})]})}function qse({onClose:e}){const{selectedPath:t}=kc(),{data:n,error:r,fetchNextPage:i,hasNextPage:a,isFetchingNextPage:l,isLoading:c}=T8({enabled:!!t&&Zd(t),path:t}),d=C.useMemo(()=>n?.pages.flatMap(p=>p.commits)??[],[n]),f=d[0],g=d.slice(1);return h.jsxs(Use,{error:!!r,hasNextPage:a,isEmpty:!f,isFetchingNextPage:l,isLoading:c,onClose:e,onLoadMore:i,children:[f&&h.jsx(YE,{label:"Current",children:h.jsx($E,{authorName:f.author.name,isActive:!0,title:WE(f.timestamp)})}),g.length>0&&h.jsx(YE,{label:"Older",children:g.map((p,y)=>h.jsx($E,{authorName:p.author.name,isLast:y===g.length-1,title:WE(p.timestamp)},p.sha))})]})}function WE(e){try{return`Updated at ${VJ(new Date(e),"MMM d, HH:mm")}`}catch{return"Updated"}}function Vse({nodes:e,expandedPaths:t,selectedPath:n,loadingPaths:r,onToggle:i,onSelect:a,disableFileSelect:l,header:c,className:d}){const f=(p,y)=>{p.stopPropagation(),y.type==="tree"&&i(y)},g=p=>{l&&p.type==="blob"||a(p)};return h.jsxs("div",{className:ge("flex h-full flex-col",d),children:[c,h.jsx("div",{className:"max-h-full w-full flex-1 overflow-y-auto",children:e.map(({node:p,depth:y})=>{const x=t.has(p.path),v=n===p.path,S=r?.has(p.path);return h.jsxs("div",{className:ge("text-muted-foreground relative flex h-9 cursor-pointer items-center gap-2 rounded text-sm transition-colors hover:bg-neutral-800",{"bg-secondary text-foreground":v}),style:{paddingLeft:`${String(y*12)}px`},onClick:()=>g(p),children:[Array.from({length:y}).map((E,k)=>h.jsx("div",{className:"absolute top-0 h-full border-l border-neutral-700",style:{left:`${String((k+1)*12)}px`}},k)),h.jsx("div",{className:ge("flex h-full items-center rounded px-1 transition-colors hover:bg-neutral-700",{"pointer-events-none":p.type==="blob"}),onClick:E=>f(E,p),children:h.jsx("span",{className:ge({invisible:p.type==="blob"}),children:S?h.jsx(rd,{className:"size-4 animate-spin"}):h.jsx(uO,{className:ge("size-4 transition-transform",{"-rotate-90":!x}),size:16})})}),h.jsx("span",{className:"shrink-0",children:p.type==="tree"?h.jsx(h2,{className:"size-4",strokeWidth:2}):h.jsx(uk,{className:ge("size-4",{"text-primary-foreground":v,"text-primary":!v}),strokeWidth:2})}),h.jsx(Qp,{text:p.name})]},p.path)})})]})}function $se({count:e=5,className:t}){return h.jsx("div",{className:ge("flex flex-col gap-2",t),children:Array.from({length:e}).map((n,r)=>h.jsxs("div",{className:"flex h-9 items-center gap-4 rounded-lg px-4",children:[h.jsx(pr,{className:"size-5 shrink-0 rounded"}),h.jsx(pr,{className:"h-4",style:{width:`${String(60+r*17%30)}%`}})]},r))})}function Gse({onCollapseClick:e}){const{navigateHome:t,selectedPath:n}=kc(),r=!n,i=a=>{a.stopPropagation(),e?.()};return h.jsxs("div",{className:ge("text-muted-foreground flex h-9 cursor-pointer items-center justify-between gap-2 rounded px-2 text-sm transition-colors hover:bg-neutral-800",{"bg-background text-foreground":r}),onClick:t,children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(_9,{className:"size-4",strokeWidth:2}),h.jsx("span",{className:"font-medium",children:"All context"})]}),e&&h.jsx("button",{className:"text-muted-foreground hover:text-foreground flex cursor-pointer items-center rounded p-0.5 transition-colors hover:bg-neutral-700",onClick:i,type:"button",children:h.jsx(hU,{className:"size-5"})})]})}function Yse({onCollapse:e}){const{expandedPaths:t,flattenedNodes:n,handleSelect:r,handleToggle:i,isFetchingTree:a,selectedPath:l}=kc();return a&&n.length===0?h.jsx($se,{className:"p-2",count:8}):h.jsx(Vse,{expandedPaths:t,header:h.jsx(Gse,{onCollapseClick:e}),nodes:n,onSelect:r,onToggle:i,selectedPath:l})}function Wse(){const{closeRightPanel:e,isLeftPanelOpen:t,isRightPanelOpen:n,toggleLeftPanel:r,toggleRightPanel:i}=xZ(),{selectedPath:a}=kc(),l=n&&Zd(a);return h.jsxs("div",{className:"flex h-full gap-4",children:[t?h.jsx("div",{className:"w-72 shrink-0 overflow-y-auto",children:h.jsx(Yse,{onCollapse:r})}):h.jsx("div",{className:"bg-card flex shrink-0 items-start rounded-xl p-2",children:h.jsx("button",{className:"text-muted-foreground hover:text-foreground flex cursor-pointer items-center rounded p-1 transition-colors hover:bg-neutral-800",onClick:r,type:"button",children:h.jsx(mU,{className:"size-5"})})}),h.jsx("div",{className:"bg-card flex min-w-0 flex-1 rounded-xl",children:h.jsx(Bse,{onToggleHistory:i})}),l&&h.jsx("div",{className:"w-80 shrink-0 overflow-y-auto",children:h.jsx(qse,{onClose:e})})]})}function Kse(){return h.jsx(NZ,{children:h.jsx(Wse,{})})}function Qse(){return h.jsx(zk,{replace:!0,to:"/contexts"})}const Xse="/assets/not-found-N0eqX-Lm.svg";function KE(){return h.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-6 p-8 text-center",children:[h.jsx("img",{alt:"",className:"w-30",src:Xse}),h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsx("h1",{className:"text-foreground text-xl font-medium",children:"This page isn't available"}),h.jsx("p",{className:"text-muted-foreground text-sm",children:"We can't find a page with the url you entered."})]}),h.jsx(Re,{className:"px-4",nativeButton:!1,render:h.jsx(Hy,{to:"/"}),size:"sm",variant:"secondary",children:"Back to Home"})]})}function Zse(){return h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx("img",{alt:"Byterover",className:"size-10",src:Rx}),h.jsx("span",{className:"text-lg font-semibold text-foreground",children:"BYTEROVER"})]})}function Jse(){const e=De(y=>y.isConnected),t=De(y=>y.setSelectedProject),n=De(y=>y.version),r=qs(),a=zi().state?.from?.pathname??"/",{data:l,isLoading:c}=oN({queryConfig:{enabled:e,refetchInterval:3e3,retry:1,staleTime:1e4}}),d=C.useMemo(()=>l?.locations??[],[l]),[f,g]=C.useState(!1);function p(y){t(y.projectPath),r(a,{replace:!0})}return h.jsxs("div",{className:"fixed inset-0 flex items-center justify-center",children:[h.jsxs("div",{className:"flex w-[400px] flex-col gap-4",children:[h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx(Zse,{}),h.jsx("div",{className:"flex items-center justify-center gap-1 text-xs font-medium leading-4",children:h.jsxs("span",{className:"text-muted-foreground",children:["Version ",n||"—"]})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-2",children:[h.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:"Recent Projects"}),d.length>0&&h.jsx("button",{className:"text-xs font-medium text-muted-foreground transition-colors hover:text-foreground cursor-pointer",onClick:()=>g(!0),type:"button",children:"See all"})]}),c&&h.jsx("p",{className:"px-2 py-2 text-xs text-muted-foreground",children:"Loading projects..."}),!c&&d.length===0&&h.jsxs("div",{className:"flex flex-col gap-1 px-2 py-2",children:[h.jsx("p",{className:"text-xs text-muted-foreground",children:"No projects found."}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:["Run ",h.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm",children:"brv webui"})," in a project directory to get started."]})]}),h.jsx("div",{className:"flex flex-col",children:d.slice(0,5).map(y=>h.jsx(sN,{onClick:()=>p(y),project:y},y.projectPath))})]})]}),h.jsx(lN,{onOpenChange:g,onSelect:p,open:f,projects:d})]})}function YR({...e}){return h.jsx(R9,{"data-slot":"sheet",...e})}function ele({...e}){return h.jsx(Ux,{"data-slot":"sheet-portal",...e})}function tle({className:e,...t}){return h.jsx(Fx,{"data-slot":"sheet-overlay",className:ge("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function WR({className:e,children:t,side:n="right",showCloseButton:r=!0,...i}){return h.jsxs(ele,{children:[h.jsx(tle,{}),h.jsxs(Hx,{"data-slot":"sheet-content","data-side":n,className:ge("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] ",e),...i,children:[t,r&&h.jsxs(Fd,{"data-slot":"sheet-close",render:h.jsx(Re,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[h.jsx(im,{}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}const nle="List the most important conventions and patterns used in this codebase — naming, file organization, testing approach, and any rules a new contributor should know before making changes.",rle="What conventions should I follow when making changes?",ile={curate:"Step 2 of 4",query:"Step 3 of 4"};function KR(e,t=1e3){const[n,r]=C.useState(()=>Date.now());return C.useEffect(()=>{if(!e)return;const i=globalThis.setInterval(()=>r(Date.now()),t);return()=>{globalThis.clearInterval(i)}},[e,t]),n}const Ay=Ys((e,t)=>({consume(){const{seed:n}=t();return n&&e({seed:null}),n},requestRetry:n=>e({seed:n}),seed:null})),ole=e=>{const{apiClient:t}=De.getState();return t?t.request(Rs.CREATE,e):Promise.reject(new Error("Not connected"))},ale=({mutationConfig:e}={})=>un({...e,mutationFn:ole});function sle(e){const t=ale(),n=e.content.trim().length>0,{isPending:r}=t;return{canSubmit:n,isPending:r,submit:async()=>{if(!n||r)return;if(!e.hasActiveProvider){e.onProviderRequired();return}const a=crypto.randomUUID(),l={...e.projectPath?{clientCwd:e.projectPath,projectPath:e.projectPath}:{},content:e.content.trim(),taskId:a,type:e.type};try{await t.mutateAsync(l);const c=e.type==="query"?"Query":"Curate";st.success(`${c} task queued`),e.onSubmitted?.(a,e.openDetailAfter),e.onClose()}catch(c){st.error(c instanceof Error?c.message:"Failed to create task")}}}}const QE={curate:"List the most important conventions and patterns used in this codebase — naming, file organization, testing approach, and any rules a new contributor should know before making changes.",query:"What conventions should I follow when making changes?"},lle={curate:"Plain text knowledge to capture into the project context tree.",query:"The agent searches the project context tree and synthesizes an answer."};function cle({type:e}){return h.jsx("p",{className:"text-muted-foreground/60 text-xs",children:lle[e]})}function ule(){return h.jsxs("p",{className:"text-muted-foreground/60 mt-2 flex items-center gap-1.5 text-xs",children:[h.jsx(VU,{className:"size-3 shrink-0"}),h.jsxs("span",{children:["For file or folder attachments, use"," ",h.jsx("code",{className:"bg-muted text-foreground/80 mono rounded px-1.5 py-0.5 text-[11px]",children:"brv curate -f <path>"})," ","from the CLI."]})]})}function dle({label:e}){return h.jsxs(yo,{className:"text-primary-foreground absolute bottom-2 left-3 gap-1.5 px-2 text-[10px] tracking-[0.08em] uppercase",variant:"secondary",children:[h.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1.5 rounded-full"}),e]})}let XE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function QR(e){return C.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[XE.checked]:""}:{[XE.unchecked]:""}},...Gx}),[e.indeterminate])}function fle(e,t,n,r=!0,i){const[a,l]=C.useState(),c=Qi(i?`${i}-label`:void 0),d=e??t??a;return qe(()=>{const f=e||t||!r?void 0:hle(n.current,c);a!==f&&l(f)}),d}function hle(e,t){const n=ple(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function ple(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const i=e.nextElementSibling;if(i&&i.htmlFor===n)return i}const r=e.labels;return r&&r[0]}const XR=C.createContext(void 0);function mle(){const e=C.useContext(XR);if(e===void 0)throw new Error(Yn(14));return e}const gle="data-parent",yle=C.forwardRef(function(t,n){const{checked:r,className:i,defaultChecked:a=!1,"aria-labelledby":l,disabled:c=!1,id:d,indeterminate:f=!1,inputRef:g,name:p,onCheckedChange:y,parent:x=!1,readOnly:v=!1,render:S,required:E=!1,uncheckedValue:k,value:T,nativeButton:R=!1,...M}=t,{clearErrors:O}=P9(),{disabled:A,name:N,setDirty:D,setFilled:H,setFocused:I,setTouched:U,state:$,validationMode:V,validityData:G,shouldValidateOnChange:B,validation:F}=Yx(),q=Hq(),{labelId:W,controlId:ie,registerControlId:_,getDescriptionProps:z}=Wx(),Y=qq(),L=Y?.parent,ee=L&&Y.allValues,te=A||q.disabled||Y?.disabled||c,Q=N??p,de=T??Q,ue=Qi(),Se=Qi();let Ee=ie;ee?Ee=x?Se:`${L.id}-${de}`:d&&(Ee=d);let ze={};ee&&(x?ze=Y.parent.getParentProps():de&&(ze=Y.parent.getChildProps(de)));const Ye=lt(y),{checked:Me=r,indeterminate:Ie=f,onCheckedChange:xe,...We}=ze,Te=Y?.value,Ae=Y?.setValue,pe=Y?.defaultValue,Ce=C.useRef(null),re=Jn(()=>Symbol("checkbox-control")),be=C.useRef(!1),{getButtonProps:Pe,buttonRef:Ue}=Pd({disabled:te,native:R}),wt=Y?.validation??F,[ae,we]=F9({controlled:de&&Te&&!x?Te.includes(de):Me,default:de&&pe&&!x?pe.includes(de):a,name:"Checkbox",state:"checked"});qe(()=>{_!==hr&&(be.current=!0,_(re.current,Ee))},[Ee,Y,_,x,re]),C.useEffect(()=>{const Qe=re.current;return()=>{!be.current||_===hr||(be.current=!1,_(Qe,void 0))}},[_,re]),B9({enabled:!Y,id:ue,commit:wt.commit,value:ae,controlRef:Ce,name:Q,getValue:()=>ae});const Oe=C.useRef(null),Le=Ds(g,Oe,wt.inputRef),He=fle(l,W,Oe,!R,Ee??void 0);qe(()=>{Oe.current&&(Oe.current.indeterminate=Ie,ae&&H(!0))},[ae,Ie,H]),E9(ae,()=>{Y&&!x||(O(Q),H(ae),D(ae!==G.initialValue),B()?wt.commit(ae):wt.commit(ae,!0))});const kt=Ha({checked:ae,disabled:te,name:x?void 0:Q,id:R?void 0:Ee??void 0,required:E,ref:Le,style:Q?wD:E6,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Qe){if(Qe.nativeEvent.defaultPrevented)return;const yt=Qe.target.checked,Ft=Et(pm,Qe.nativeEvent);if(xe?.(yt,Ft),Ye(yt,Ft),!Ft.isCanceled&&(we(yt),de&&Te&&Ae&&!x)){const Kt=yt?[...Te,de]:Te.filter(xn=>xn!==de);Ae(Kt,Ft)}},onFocus(){Ce.current?.focus()}},T!==void 0?{value:(Y?ae&&T:T)||""}:Dn,z,Y?wt.getValidationProps:wt.getInputValidationProps),Bt=ee?!!Me:ae,Xe=ee&&Ie||f;C.useEffect(()=>{if(!L||!de)return;const Qe=L.disabledStatesRef.current;return Qe.set(de,te),()=>{Qe.delete(de)}},[L,te,de]);const Ve=C.useMemo(()=>({...$,checked:Bt,disabled:te,readOnly:v,required:E,indeterminate:Xe}),[$,Bt,te,v,E,Xe]),pt=QR(Ve),mt=cn("span",t,{state:Ve,ref:[Ue,Ce,n,Y?.registerControlRef],props:[{id:R?Ee??void 0:ue,role:"checkbox","aria-checked":Ie?"mixed":ae,"aria-readonly":v||void 0,"aria-required":E||void 0,"aria-labelledby":He,[gle]:x?"":void 0,onFocus(){I(!0)},onBlur(){const Qe=Oe.current;Qe&&(U(!0),I(!1),V==="onBlur"&&wt.commit(Y?Te:Qe.checked))},onClick(Qe){v||te||(Qe.preventDefault(),Oe.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Qe.shiftKey,ctrlKey:Qe.ctrlKey,altKey:Qe.altKey,metaKey:Qe.metaKey})))}},z,wt.getValidationProps,M,We,Pe],stateAttributesMapping:pt});return h.jsxs(XR.Provider,{value:Ve,children:[mt,!ae&&!Y&&Q&&!x&&k!==void 0&&h.jsx("input",{type:"hidden",name:Q,value:k}),h.jsx("input",{...kt})]})}),xle=C.forwardRef(function(t,n){const{render:r,className:i,keepMounted:a=!1,...l}=t,c=mle(),d=c.checked||c.indeterminate,{mounted:f,transitionStatus:g,setMounted:p}=cx(d),y=C.useRef(null),x={...c,transitionStatus:g};bc({open:d,ref:y,onComplete(){d||p(!1)}});const v=QR(c),S=C.useMemo(()=>({...v,...xc,...Gx}),[v]),E=a||f,k=cn("span",t,{ref:[n,y],state:x,stateAttributesMapping:S,props:l});return E?k:null});function ble({className:e,...t}){return h.jsx(yle,{"data-slot":"checkbox",className:ge("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-foreground dark:data-checked:bg-primary",e),...t,children:h.jsx(xle,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:h.jsx(lk,{})})})}function vle({canSubmit:e,hasActiveProvider:t,inTour:n,isPending:r,onClose:i,onOpenDetailChange:a,onSubmit:l,openDetailAfter:c,type:d}){const y=r?d==="query"?"Querying…":"Curating…":n||t?d==="query"?"Query":"Curate":"Connect provider…";return h.jsxs("footer",{className:"border-border flex items-center justify-between gap-3 border-t px-7 py-3.5",children:[n?h.jsx("span",{}):h.jsxs("label",{className:"text-muted-foreground inline-flex cursor-pointer items-center gap-2 text-xs",children:[h.jsx(ble,{checked:c,onCheckedChange:a}),"Open after submit"]}),h.jsxs("div",{className:"ml-2 flex items-center gap-2",children:[h.jsx(Re,{onClick:i,size:"sm",variant:"ghost",children:"Cancel"}),h.jsx(Re,{disabled:!e||r,onClick:l,size:"sm",children:y})]})]})}function wle({inTour:e,onTypeChange:t,projectPath:n,tourStepLabel:r,type:i}){return h.jsxs("header",{className:"border-border flex flex-col gap-2 border-b px-7 pt-5 pb-4",children:[r&&h.jsx(km,{label:r}),h.jsxs("div",{className:"flex items-center justify-between gap-4 pr-10",children:[h.jsxs("h2",{className:"text-foreground flex items-baseline gap-1.5 text-lg font-medium tracking-tight",children:[h.jsx("span",{className:"text-muted-foreground/70 font-normal",children:"New"}),h.jsxs("span",{children:[i," task"]})]}),e?h.jsxs(Ua,{children:[h.jsx(qa,{render:h.jsx(ZE,{disabled:!0,onChange:t,value:i})}),h.jsx(Va,{children:"Locked during the tour — the next step covers the other mode."})]}):h.jsx(ZE,{onChange:t,value:i})]}),h.jsxs("p",{className:"text-muted-foreground/70 text-xs",children:[i==="query"?"Searches":"Will dispatch to"," ",h.jsx("span",{className:"text-identifier mono",children:n||"(no project selected)"})]})]})}function ZE({disabled:e=!1,onChange:t,value:n}){return h.jsxs("div",{"aria-disabled":e,className:ge("border-border bg-muted relative inline-flex rounded-md border p-0.5",e&&"opacity-60"),children:[h.jsx("span",{"aria-hidden":!0,className:ge("bg-background border-border absolute top-0.5 bottom-0.5 w-[calc(50%-2px)] rounded border transition-transform duration-200 ease-out",n==="query"?"translate-x-full":"translate-x-0")}),["curate","query"].map(r=>h.jsx("button",{className:ge("relative z-10 px-3 py-1 text-xs font-medium transition-colors",r===n?"text-foreground":"text-muted-foreground hover:text-foreground/80",e&&"cursor-not-allowed hover:text-muted-foreground"),disabled:e,onClick:()=>t(r),type:"button",children:r==="curate"?"Curate":"Query"},r))]})}function Sle({initialContent:e,initialType:t,onClose:n,onSubmitted:r,open:i,prefillNotice:a,tourStepLabel:l}){const c=!!l;return h.jsx(YR,{onOpenChange:d=>!d&&n(),open:i,children:h.jsx(WR,{className:ge("data-[side=right]:w-full data-[side=right]:max-w-xl p-0 shadow-[inset_1px_0_0_rgba(96,165,250,0.18)]",!c&&"sheet-no-overlay"),side:"right",children:i&&h.jsx(Cle,{initialContent:e,initialType:t,onClose:n,onSubmitted:r,prefillNotice:a,tourStepLabel:l})})})}function Cle({initialContent:e,initialType:t,onClose:n,onSubmitted:r,prefillNotice:i,tourStepLabel:a}){const l=De(U=>U.selectedProject),{data:c}=zx(),[d,f]=C.useState(t??"curate"),[g,p]=C.useState(e??""),[y,x]=C.useState(!0),[v,S]=C.useState(!1),[E,k]=C.useState(!!e),T=C.useRef(null);C.useEffect(()=>{T.current?.focus()},[]);const R=!!c,M=!!a,{canSubmit:O,isPending:A,submit:N}=sle({content:g,hasActiveProvider:R,onClose:n,onProviderRequired:()=>S(!0),onSubmitted:r,openDetailAfter:y,projectPath:l,type:d}),D=U=>{if((U.metaKey||U.ctrlKey)&&U.key==="Enter"){U.preventDefault(),N().catch(()=>{});return}U.key==="Tab"&&!U.shiftKey&&!g&&(U.preventDefault(),p(QE[d]))},H=!!(i&&E&&g===(e??"")),I=U=>{E&&U!==(e??"")&&k(!1),p(U)};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[h.jsx(wle,{inTour:M,onTypeChange:f,projectPath:l,tourStepLabel:a,type:d}),h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-7 py-5",children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsxs("div",{className:"relative",children:[h.jsx(cb,{className:"bg-card dark:bg-card text-foreground/90 mono min-h-64 pr-4 pb-7 text-sm leading-relaxed",onChange:U=>I(U.target.value),onKeyDown:D,placeholder:QE[d],ref:T,rows:d==="query"?4:6,value:g}),H&&i&&h.jsx(dle,{label:i}),h.jsxs("span",{className:"text-muted-foreground/40 mono pointer-events-none absolute right-3 bottom-2 flex items-center gap-2 text-[10px] tabular-nums",children:[h.jsx("span",{className:"text-muted-foreground/60",children:g?h.jsxs(h.Fragment,{children:[h.jsxs("kbd",{className:"bg-muted text-foreground/70 inline-flex items-center gap-1 rounded px-1.5 py-0.5 leading-none",children:[h.jsx(wU,{className:"size-2.5"})," · Ctrl + Enter"]})," ","to ",d]}):h.jsxs(h.Fragment,{children:[h.jsx("kbd",{className:"bg-muted text-foreground/70 inline-flex items-center rounded px-1.5 py-0.5 leading-none",children:"Tab"})," ","to use example"]})}),h.jsxs("span",{children:[g.length," chars"]})]})]}),h.jsx(cle,{type:d})]}),d==="curate"&&!M&&h.jsx(ule,{})]}),h.jsx(vle,{canSubmit:O,hasActiveProvider:R,inTour:M,isPending:A,onClose:n,onOpenDetailChange:x,onSubmit:N,openDetailAfter:y,type:d})]}),h.jsx(Tm,{onOpenChange:S,open:v})]})}const ZR={curate:"Step 2 of 4",query:"Step 3 of 4"},Ele={curate:"Continue to query",query:"Continue to connector"},kle={curate:"Watch the agent capture this knowledge into your context tree.",query:"Watch the agent search the context tree and synthesize an answer."},Tle={curate:"Knowledge captured. Ready to ask a question about it?",query:"Answer synthesized. One last step — connect ByteRover to your AI tool."};function JR(e){const t=Rt(a=>a.tourActive),n=Rt(a=>a.tourStep),r=Rt(a=>a.tourTaskId);return t&&r===e.taskId&&(n==="curate"||n==="query")?n:null}function Nle(e,t){return e==="completed"?"Task done. Scroll for the Continue button.":e==="error"?"Task failed. Use Try again below or fix the provider config.":e==="cancelled"?"Task cancelled. Use Try again below to retry.":kle[t]}function Rle({task:e}){const t=JR(e);return t?h.jsxs("div",{className:"border-primary-foreground/30 bg-primary/8 flex items-center gap-3 rounded-lg border px-4 py-2.5",children:[h.jsx(km,{label:ZR[t]}),h.jsx("span",{className:"text-muted-foreground text-sm",children:Nle(e.status,t)})]}):null}function Ale({task:e}){const t=Rt(r=>r.advanceTour),n=JR(e);return!n||e.status!=="completed"?null:h.jsxs("div",{className:"border-primary-foreground/40 bg-primary/12 flex items-center gap-4 rounded-lg border px-4 py-3.5",children:[h.jsx("span",{className:"bg-primary-foreground/20 text-primary-foreground grid size-8 shrink-0 place-items-center rounded-full",children:h.jsx(Qs,{className:"size-4",strokeWidth:3})}),h.jsxs("div",{className:"flex-1",children:[h.jsx("p",{className:"text-foreground text-sm font-medium",children:Tle[n]}),h.jsxs("p",{className:"text-muted-foreground text-xs",children:[ZR[n]," complete"]})]}),h.jsxs(Re,{onClick:()=>t(),type:"button",children:[Ele[n],h.jsx(O9,{className:"size-4"})]})]})}const jle=80;function Ole(e,t=!0){const n=C.useRef(null),r=C.useRef(!0),i=C.useCallback(()=>{const a=n.current;if(!a)return;const l=a.scrollHeight-a.scrollTop-a.clientHeight;r.current=l<jle},[]);return C.useLayoutEffect(()=>{if(!t)return;const a=n.current;!a||!r.current||(a.scrollTop=a.scrollHeight)},[t,...e]),{onScroll:i,ref:n}}function Mle(e){const t=[];for(const n of e.reasoningContents??[])t.push({item:n,kind:"reasoning",timestamp:n.timestamp});for(const n of e.toolCalls??[])t.push({call:n,kind:"toolCall",timestamp:n.timestamp});return t.sort((n,r)=>n.timestamp-r.timestamp),t}const ic=e=>String(e).padStart(2,"0");function eA(e,t){const n=Math.max(0,t-e),r=Math.round(n/1e3);if(r<60)return`${r}s`;const i=Math.round(r/60);if(i<60)return`${i}m`;const a=Math.round(i/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}function $u(e){const t=Math.floor(Math.max(0,e)/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}:${ic(r)}:${ic(i)}`:`${r}:${ic(i)}`}function tA(e){const t=new Date(e);return`${ic(t.getHours())}:${ic(t.getMinutes())}:${ic(t.getSeconds())}`}function nA(e){if(!e)return"";const t=e.replace(/^task[_-]?/,"");return t.length>8?t.slice(0,8):t}const Po=e=>wn(e,"path")??wn(e,"file_path")??wn(e,"filePath")??"",Lle=e=>wn(e,"command")??"",_le=e=>wn(e,"code")??"",Pu=e=>wn(e,"query")??"",Kh=e=>wn(e,"path")??wn(e,"key")??wn(e,"name")??"",Dle=e=>{const t=wn(e,"pattern")??"",n=wn(e,"path");return n?`${t} in ${n}`:t},Ile=e=>{const t=wn(e,"pattern")??"",n=wn(e,"path");return n?`${t} in ${n}`:t},JE=(e,t)=>n=>{const r=n[e];return Array.isArray(r)?`${r.length} ${t}${r.length===1?"":"s"}`:""},ek=(e,t=80)=>e.length>t?`${e.slice(0,t-1)}…`:e,zle={agentic_map:e=>Po(e)||Pu(e),bash_exec:Lle,bash_output:e=>wn(e,"processId")??"",batch:JE("calls","call"),code_exec:_le,create_knowledge_topic:e=>wn(e,"path")??wn(e,"topic")??"",curate:e=>wn(e,"title")??wn(e,"path")??"",delete_memory:Kh,detect_domains:e=>ek(wn(e,"data")??"",60),edit_file:Po,edit_memory:Kh,expand_knowledge:e=>wn(e,"stubPath")??Po(e),glob_files:Ile,grep_content:Dle,ingest_resource:e=>wn(e,"source")??wn(e,"url")??Po(e),kill_process:e=>wn(e,"processId")??"",list_directory:Po,list_memories:Po,llm_map:e=>Po(e)||Pu(e),read_file:Po,read_memory:Kh,read_todos:()=>"",search_history:Pu,search_knowledge:Pu,swarm_query:Pu,swarm_store:e=>ek(wn(e,"content")??"",60),write_file:Po,write_memory:Kh,write_todos:JE("todos","todo")};function Ple(e){const t=Object.entries(e).find(([,n])=>typeof n=="string"||typeof n=="number");return t?String(t[1]):""}function Gb(e){const t=zle[e.toolName];return t?t(e.args):Ple(e.args)}function wn(e,t){const n=e[t];return typeof n=="string"?n:void 0}const Fle={a({children:e,href:t}){return t?h.jsx("a",{className:"text-identifier underline-offset-2 hover:underline",href:t,rel:"noopener noreferrer",target:"_blank",children:e}):h.jsx(h.Fragment,{children:e})},blockquote({children:e}){return h.jsx("blockquote",{className:"border-border text-muted-foreground border-l-2 pl-3 italic",children:e})},code({children:e,className:t}){const n=String(e).replace(/\n$/,""),i=/language-(\w+)/.exec(t??"")?.[1];return n.includes(`
127
+ `)||i?h.jsx("div",{className:"border-border/50 bg-muted/40 my-2 overflow-x-auto rounded-md border",children:h.jsx(Qt,{codeTagProps:{style:{fontFamily:"ui-monospace, SF Mono, Menlo, Consolas, monospace",fontSize:"0.75rem"}},customStyle:{background:"transparent",fontSize:"0.75rem",lineHeight:1.6,margin:0,padding:"0.75rem"},language:i??"plaintext",PreTag:"div",style:$b,children:n})}):h.jsx("code",{className:"bg-muted/60 rounded px-1 py-0.5 mono text-[0.85em] text-zinc-200",children:e})},h1({children:e}){return h.jsx("h1",{className:"text-foreground mt-3 mb-2 text-base font-semibold",children:e})},h2({children:e}){return h.jsx("h2",{className:"text-foreground mt-3 mb-2 text-sm font-semibold",children:e})},h3({children:e}){return h.jsx("h3",{className:"text-foreground mt-3 mb-2 text-sm font-semibold",children:e})},li({children:e}){return h.jsx("li",{className:"my-0.5 leading-relaxed",children:e})},ol({children:e}){return h.jsx("ol",{className:"my-2 list-inside list-decimal space-y-1 pl-1",children:e})},p({children:e}){return h.jsx("p",{className:"my-1.5 leading-relaxed first:mt-0 last:mb-0",children:e})},ul({children:e}){return h.jsx("ul",{className:"my-2 list-inside list-disc space-y-1 pl-1",children:e})}},Ble=[_R],af=C.memo(({children:e,className:t})=>h.jsx("div",{className:t??"text-foreground/90 text-sm",children:h.jsx(uR,{components:Fle,remarkPlugins:Ble,children:e})}));af.displayName="MarkdownInline";function u2(){return h.jsx("span",{"aria-hidden":!0,className:"text-muted-foreground/40",children:"·"})}function Ed({children:e,count:t}){return h.jsxs("div",{className:"text-muted-foreground mono mb-3 flex items-baseline gap-2 text-[11px] uppercase tracking-wider",children:[h.jsx("span",{children:e}),h.jsx("span",{className:"bg-border/50 h-px flex-1"}),t!==void 0&&h.jsx("span",{className:"tabular-nums",children:t})]})}const Hle={completed:"bg-emerald-500",error:"bg-red-400",muted:"bg-muted-foreground/60",running:"bg-blue-400"},Ule={completed:"bg-emerald-500/70",error:"bg-red-400/70",muted:"bg-muted-foreground/30",running:"rail-running"};function Yb({flash:e,tone:t,tooltip:n}){const r=h.jsxs("span",{className:"absolute top-1 left-0 grid size-3 place-items-center",children:[h.jsx("span",{className:ge("ring-background relative z-10 size-2 rounded-full ring-[1.5px]",Hle[t],e&&"animate-dot-flash")}),t==="running"&&h.jsx("span",{className:"bg-blue-400 absolute inset-0 rounded-full opacity-50 animate-dot-pulse"})]});return n?h.jsxs(Ua,{children:[h.jsx(qa,{render:r}),h.jsx(Va,{children:n})]}):r}function rA({tone:e}){const t=e==="completed"?Qs:z9,n=e==="completed"?"bg-emerald-500":"bg-red-400";return h.jsx("span",{className:"absolute -top-0.5 -left-1 grid size-5 place-items-center",children:h.jsx("span",{className:ge("ring-background relative grid size-4 place-items-center rounded-full ring-2",n),children:h.jsx(t,{className:"text-background absolute size-3 stroke-3"})})})}function qle(e,t){const n=e.startedAt??e.createdAt,r=e.completedAt??t;return Math.max(0,r-n)}function tk(e,t){if(!e||!t)return e;const n=t.replaceAll("-","_"),r=new RegExp(`_${n}\\b`,"g");return e.replaceAll(r,"")}const Vle={completed:"text-emerald-500/80",error:"text-red-400/80",running:"text-blue-400/80"},rm={bash_exec:{in:"bash",out:"bash"},bash_output:{in:"bash",out:"bash"},code_exec:{in:"javascript",out:"json"}},$le={agentic_map:"map",bash_exec:"bash",bash_output:"bash output",code_exec:"code exec",create_knowledge_topic:"new topic",delete_memory:"delete memory",detect_domains:"detect domains",edit_file:"edit",edit_memory:"edit memory",expand_knowledge:"expand",glob_files:"glob",grep_content:"grep",ingest_resource:"ingest",kill_process:"kill",list_directory:"list",list_memories:"memories",llm_map:"llm map",read_file:"read",read_memory:"read memory",read_todos:"todos",search_history:"history",search_knowledge:"search",swarm_query:"swarm query",swarm_store:"swarm store",write_file:"write",write_memory:"write memory",write_todos:"todos"};function Gle(e){return $le[e]??e.replaceAll("_"," ")}const Yle={bash:"bash",c:"c",cjs:"javascript",cpp:"cpp",cs:"csharp",css:"css",go:"go",h:"c",hpp:"cpp",htm:"html",html:"html",java:"java",js:"javascript",json:"json",jsx:"jsx",kt:"kotlin",less:"less",md:"markdown",mdx:"markdown",mjs:"javascript",php:"php",py:"python",rb:"ruby",rs:"rust",scss:"scss",sh:"bash",sql:"sql",swift:"swift",toml:"toml",ts:"typescript",tsx:"tsx",xml:"xml",yaml:"yaml",yml:"yaml",zsh:"bash"};function Wle(e){const t=typeof e.path=="string"&&e.path||typeof e.file_path=="string"&&e.file_path||typeof e.filePath=="string"&&e.filePath;if(!t)return;const n=t.lastIndexOf(".");if(n===-1||n===t.length-1)return;const r=t.slice(n+1).toLowerCase();return Yle[r]}const Kle=new Set(["delete_memory","edit_memory","list_memories","read_memory","write_memory"]),Qle=new Set(["bash_output"]),Xle=new Set(["create_knowledge_topic","curate","detect_domains","expand_knowledge","ingest_resource","list_directory","list_memories","read_todos","search_history","search_knowledge","swarm_query","swarm_store","write_todos"]);function Zle(e){return e in rm?{format:"code",language:rm[e].in}:Kle.has(e)?{format:"keypath"}:{format:"markdown"}}function Jle(e,t){return Qle.has(e)?{format:"plain"}:t?{format:"code",language:t}:e in rm?{format:"code",language:rm[e].out}:Xle.has(e)?{format:"code",language:"json"}:{format:"markdown"}}const iA=C.memo(({content:e,language:t="bash"})=>h.jsx(Qt,{codeTagProps:{style:{fontFamily:"ui-monospace, SF Mono, Menlo, Consolas, monospace",fontSize:"0.75rem"}},customStyle:{background:"transparent",fontSize:"0.75rem",lineHeight:1.6,margin:0,padding:0},language:t,PreTag:"div",style:$b,children:e}));iA.displayName="CodeBlock";function ece({call:e,flash:t,taskId:n,tooltip:r}){const[i,a]=C.useState(!1),l=C.useMemo(()=>tk(Gb(e),n),[e,n]),c=C.useMemo(()=>tk(oce(e),n),[e,n]),d=C.useMemo(()=>Wle(e.args),[e.args]),f=Zle(e.toolName),g=Jle(e.toolName,d),p=c.length>0,y=e.status==="running",x=()=>a(v=>!v);return h.jsxs(h.Fragment,{children:[h.jsx(Yb,{flash:t,tone:e.status,tooltip:r}),h.jsxs("div",{className:"text-muted-foreground mb-2 flex flex-wrap items-baseline gap-2 text-[11px]",children:[h.jsx("span",{className:ge("mono uppercase tracking-wider",Vle[e.status]),children:Gle(e.toolName)}),y&&h.jsx("span",{className:"text-blue-400/80",children:"running"})]}),h.jsxs("button",{"aria-expanded":i,className:"border-border/50 bg-muted/30 hover:bg-muted/60 group/toolblock relative w-full cursor-pointer rounded-md border text-left transition",onClick:x,type:"button",children:[h.jsx(nk,{collapsedHeight:"max-h-5",collapsedLines:tce,content:l||"—",empty:!l,expanded:i,format:f.format,label:"in",language:f.language}),h.jsx("div",{className:"border-border/50 border-t"}),h.jsx(nk,{collapsedHeight:"max-h-16",collapsedLines:nce,content:c,empty:!p,expanded:i,format:g.format,label:"out",language:g.language,placeholder:y?"running…":"—"}),!i&&h.jsx("span",{"aria-hidden":!0,className:"from-background/95 via-background/60 pointer-events-none absolute inset-x-0 bottom-0 h-10 rounded-b-md bg-linear-to-t to-transparent"}),h.jsxs("span",{className:"border-border bg-background/80 text-foreground/80 group-hover/toolblock:text-foreground group-hover/toolblock:border-foreground/30 group-hover/toolblock:bg-muted absolute bottom-2 left-1/2 inline-flex -translate-x-1/2 items-center gap-1.5 rounded-full border px-3.5 py-1.5 text-xs font-medium shadow-lg backdrop-blur-md transition",children:[h.jsx("span",{children:i?"Click to collapse":"Click to expand"}),i?h.jsx(dU,{className:"size-3.5"}):h.jsx(Hd,{className:"size-3.5"})]})]})]})}const tce=1,nce=3;function nk({collapsedHeight:e,collapsedLines:t,content:n,empty:r,expanded:i,format:a,label:l,language:c,placeholder:d}){const f=C.useMemo(()=>i?0:Math.max(0,n.split(`
128
+ `).length-t),[n,t,i]),g=()=>{switch(a){case"code":return h.jsx(iA,{content:n,language:c});case"keypath":return h.jsx(ice,{path:n});case"plain":return h.jsx(rce,{content:n});default:return h.jsx(af,{className:"text-foreground/90 text-sm",children:n})}};return h.jsxs("div",{className:"flex items-start gap-3 px-3 py-2",children:[h.jsxs("span",{className:"text-muted-foreground mono mt-[3px] flex w-7 shrink-0 flex-col items-start text-[10px] uppercase tracking-wider",children:[h.jsx("span",{children:l}),f>0&&h.jsxs("span",{className:"text-muted-foreground/60 mt-1 text-[9px] normal-case tracking-normal",children:["+",f]})]}),h.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto",children:r?h.jsx("span",{className:"text-muted-foreground/60 italic text-xs",children:d??"—"}):i?g():h.jsx("div",{className:ge("overflow-hidden",e),children:g()})})]})}function rce({content:e}){return h.jsx("pre",{className:"text-foreground/85 mono m-0 text-xs leading-6 whitespace-pre-wrap",children:e})}function ice({path:e}){const t=e.split("/");return h.jsx("span",{className:"text-foreground/90 mono text-sm",children:t.map((n,r)=>h.jsxs(C.Fragment,{children:[r>0&&h.jsx("span",{className:"text-muted-foreground/40 mx-0.5",children:"/"}),n]},r))})}function oce(e){if(e.status==="error"&&e.error)return e.error;if(e.result===void 0||e.result===null)return"";if(typeof e.result=="string"){const t=e.result.trim();return t.length>1200?`${t.slice(0,1200)}
129
+ …`:t}try{const t=JSON.stringify(e.result,null,2);return t.length>1200?`${t.slice(0,1200)}
130
+ …`:t}catch{return String(e.result)}}const ace={curate:"Curating","curate-folder":"Curating",query:"Querying"};function Qh(e,t){return`${e.kind}-${t}-${e.timestamp}`}function d2(e){return e.kind==="reasoning"?"muted":e.call.status==="error"?"error":e.call.status==="running"?"running":"completed"}function sce({now:e,task:t}){const n=C.useMemo(()=>Mle(t),[t]),r=zd(t.status),i=C.useRef(null),a=C.useRef(new Map);i.current===null&&(i.current=new Set(n.map((d,f)=>Qh(d,f))));const l=[],c=new Set;for(const[d,f]of n.entries()){const g=Qh(f,d);i.current.has(g)||l.push(g);const p=d2(f);a.current.get(g)==="running"&&(p==="completed"||p==="error")&&c.add(g)}return C.useEffect(()=>{if(i.current)for(const[d,f]of n.entries()){const g=Qh(f,d);i.current.add(g),a.current.set(g,d2(f))}}),n.length===0?h.jsxs("section",{children:[h.jsx(Ed,{children:"Event log"}),r?h.jsx("ol",{className:"space-y-5",children:h.jsx(rk,{taskType:t.type})}):h.jsx("p",{className:"text-muted-foreground text-center text-sm py-6",children:"No events captured for this task."})]}):h.jsxs("section",{children:[h.jsx(Ed,{count:n.length,children:"Event log"}),h.jsxs("ol",{className:"space-y-5",children:[n.map((d,f)=>{const g=Qh(d,f),p=l.indexOf(g),y=f===n.length-1,x=t.status==="completed"&&!!t.result,v=t.status==="error"&&!!t.error,E=!y||r||(x||v),k=n[f+1]?.timestamp??t.completedAt??e;let T=d2(d);return y&&(r?T="running":x?T="completed":v&&(T="error")),h.jsx(lce,{endTimestamp:k,event:d,flash:c.has(g),hasNext:E,isNew:p!==-1,railTone:T,staggerIndex:Math.max(p,0),taskId:t.taskId,taskTerminal:Ma(t.status),tooltip:cce(d,k)},g)}),r&&h.jsx(rk,{taskType:t.type})]})]})}function rk({taskType:e}){const t=ace[e]??"Working";return h.jsxs("li",{className:"relative pl-7",children:[h.jsx(Yb,{tone:"running"}),h.jsx("span",{className:"bg-blue-400/70 absolute top-[9px] left-[13px] h-px w-5.5 rounded"}),h.jsx("span",{className:"text-blue-400/70 mono absolute top-[2px] left-10 text-[9px] uppercase tracking-wider",children:"now"}),h.jsxs("span",{className:"text-blue-400 italic text-sm ml-10",children:[t,"…"]})]})}function lce({endTimestamp:e,event:t,flash:n,hasNext:r,isNew:i,railTone:a,staggerIndex:l,taskId:c,taskTerminal:d,tooltip:f}){return h.jsxs("li",{className:ge("relative pl-7",i&&"animate-in fade-in slide-in-from-bottom-1 duration-300 fill-mode-both"),style:i?{animationDelay:`${l*60}ms`}:void 0,children:[r&&h.jsx("div",{className:ge("absolute top-3 -bottom-7 left-[5px] w-0.5 rounded-full",Ule[a])}),t.kind==="reasoning"?h.jsx(dce,{endTimestamp:e,flash:n,hasNext:r,item:t.item,taskTerminal:d,tooltip:f}):h.jsx(ece,{call:t.call,flash:n,taskId:c,tooltip:f})]})}function cce(e,t){const n=tA(e.timestamp),r=uce(t-e.timestamp);if(e.kind==="reasoning")return h.jsxs("span",{className:"flex flex-col gap-0.5",children:[h.jsxs("span",{children:[h.jsx("span",{className:"mono text-muted-foreground tabular-nums",children:n}),h.jsxs("span",{className:"mono text-blue-400 ml-2 tabular-nums",children:["+",r]})]}),h.jsx("span",{className:"mono text-foreground/80 text-[10px]",children:"reasoning"})]});const i=Gb(e.call).slice(0,60);return h.jsxs("span",{className:"flex flex-col gap-0.5",children:[h.jsxs("span",{children:[h.jsx("span",{className:"mono text-muted-foreground tabular-nums",children:n}),h.jsxs("span",{className:"mono text-blue-400 ml-2 tabular-nums",children:["+",r]})]}),h.jsxs("span",{className:"mono text-foreground/80 text-[10px] wrap-break-word",children:[e.call.toolName,i&&` · ${i}`]})]})}function uce(e){if(e<1e3)return`${Math.max(1,Math.round(e))}ms`;const t=e/1e3;return t<60?`${t.toFixed(t<10?1:0)}s`:`${Math.floor(t/60)}m ${Math.round(t%60)}s`}function dce({endTimestamp:e,flash:t,hasNext:n,item:r,taskTerminal:i,tooltip:a}){const l=(r.isThinking||!r.content)&&!i&&!n,c=l?void 0:fce(e-r.timestamp);return h.jsxs(h.Fragment,{children:[h.jsx(Yb,{flash:t,tone:"muted",tooltip:a}),h.jsxs("div",{className:"text-muted-foreground mb-1.5 flex items-baseline gap-2 text-[11px]",children:[h.jsx("span",{className:"mono uppercase tracking-wider",children:"reasoning"}),l?h.jsxs("span",{className:"text-blue-400/80 inline-flex items-center gap-1.5 italic",children:[h.jsx("span",{className:"bg-blue-400 size-1 rounded-full animate-pulse"}),"thinking…"]}):c&&h.jsxs("span",{className:"italic",children:["Thought for ",c]})]}),r.content&&h.jsx(af,{className:"text-foreground/90 text-sm",children:r.content})]})}function fce(e){const t=Math.max(1,Math.round(e/1e3));if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}const hce={cancelled:{dot:"bg-zinc-500",label:"cancelled",pulse:!1,tone:"border-zinc-500/30 bg-zinc-500/10 text-zinc-400"},completed:{dot:"bg-emerald-500",label:"done",pulse:!1,tone:"border-emerald-500/30 bg-emerald-500/10 text-emerald-500"},created:{dot:"bg-zinc-400",label:"pending",pulse:!0,tone:"border-zinc-400/30 bg-zinc-400/10 text-zinc-300"},error:{dot:"bg-red-400",label:"failed",pulse:!1,tone:"border-red-500/30 bg-red-500/10 text-red-400"},started:{dot:"bg-blue-400",label:"running",pulse:!0,tone:"border-blue-500/30 bg-blue-500/10 text-blue-400"}};function oA({className:e,showLabel:t=!0,size:n="sm",status:r}){const{dot:i,label:a,pulse:l,tone:c}=hce[r];return h.jsxs(yo,{className:ge(c,n==="md"?"text-xs":"text-[11px]","gap-1.5 font-medium tracking-normal",r==="started"&&"shadow-[inset_0_0_6px_rgba(96,165,250,0.2)]",e),variant:"outline",children:[h.jsx("span",{className:ge("size-1.5 shrink-0 rounded-full",i,l&&"animate-pill-ping")}),t&&h.jsx("span",{children:a})]})}const pce={cancelled:"cancelled",completed:"finished",created:"started",error:"finished",started:"started"};function mce({now:e,task:t}){const n=Ma(t.status),r=qle(t,e),i=t.startedAt??t.createdAt,a=pce[t.status],l=n?"ran":"running";return h.jsxs("header",{className:"px-6 pt-5 pb-4",children:[h.jsxs("div",{className:"flex items-center gap-3 pr-12",children:[h.jsx(oA,{status:t.status}),h.jsx("h1",{className:"text-foreground min-w-0 flex-1 truncate text-lg leading-tight font-medium tracking-tight",children:t.content||h.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})})]}),h.jsxs("div",{className:"text-muted-foreground mt-2.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[h.jsx(gce,{taskId:t.taskId}),h.jsx(u2,{}),h.jsx("span",{className:"mono uppercase tracking-wider",children:d9(t.type)}),h.jsx(u2,{}),h.jsxs("span",{children:[a," ",eA(i,e)," ago"]}),h.jsx(u2,{}),h.jsxs("span",{className:ge("mono tabular-nums",zd(t.status)?"text-blue-400":"text-muted-foreground"),children:[l," ",$u(r)]})]})]})}function gce({taskId:e}){const t=async()=>{try{await navigator.clipboard.writeText(e),st.success("Task ID copied",{duration:2e3})}catch{st.error("Failed to copy task ID",{duration:3e3})}};return h.jsxs(Ua,{children:[h.jsx(qa,{render:h.jsx(Re,{"aria-label":"Copy task ID",className:"text-identifier hover:text-identifier hover:bg-identifier/10 mono px-1.5 font-normal",onClick:t,size:"xs",variant:"ghost"}),children:h.jsx("span",{className:"truncate",children:e})}),h.jsx(Va,{children:"Click to copy"})]})}function yce(e){return e==="query"||e==="search"?"query":"curate"}const xce=new Set(["ERR_LLM_ERROR","ERR_LLM_RATE_LIMIT","ERR_OAUTH_REFRESH_FAILED","ERR_OAUTH_TOKEN_EXPIRED","ERR_PROVIDER_NOT_CONFIGURED"]);function bce({error:e,hadLlmServiceError:t}){return!!(t||e?.code&&xce.has(e.code))}function ik({Icon:e,onRemove:t,path:n}){return h.jsxs(yo,{className:"bg-muted max-w-[20rem] gap-1.5 animate-in fade-in slide-in-from-bottom-1 duration-200",title:n,variant:"outline",children:[h.jsx(e,{className:"text-muted-foreground"}),h.jsx("span",{className:"mono truncate",children:n}),t&&h.jsx("button",{"aria-label":`Remove ${n}`,className:"text-muted-foreground/60 hover:bg-border hover:text-foreground inline-flex size-4 shrink-0 items-center justify-center rounded-full transition",onClick:t,type:"button",children:h.jsx(z9,{className:"size-2.5"})})]})}function vce({task:e}){const{folderPath:t}=e,n=e.files??[],r=!!t||n.length>0;return h.jsxs("section",{children:[h.jsx(Ed,{children:"Input"}),h.jsx("div",{className:"border-blue-400 text-foreground/90 mono border-l-2 pl-3 text-sm leading-relaxed whitespace-pre-wrap",children:e.content||h.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})}),r&&h.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5 pl-3",children:[t&&h.jsx(ik,{Icon:L9,path:t}),n.map(i=>h.jsx(ik,{Icon:ZU,path:i},i))]})]})}function wce({task:e}){const t=e.responseContent??e.streamingContent??"",n=e.isStreaming||!e.responseContent&&zd(e.status);return h.jsxs("section",{children:[h.jsxs("div",{className:"mono mb-2 flex items-baseline gap-2 text-[11px] uppercase tracking-wider",children:[n?h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"text-blue-400 inline-flex items-center gap-1.5",children:[h.jsx("span",{className:"bg-blue-400 size-1 rounded-full animate-pulse"}),"live"]}),h.jsx("span",{className:"text-muted-foreground",children:"agent is responding"})]}):h.jsx("span",{className:"text-muted-foreground",children:"Response"}),h.jsx("span",{className:"bg-border/50 h-px flex-1"})]}),h.jsxs("div",{className:ge("pl-3 text-foreground/90 text-sm border-l-2",n?"border-blue-500/30":"border-border"),children:[h.jsx(af,{className:"text-foreground/90 text-sm",children:t||" "}),n&&h.jsx("span",{className:"bg-blue-400/70 ml-1 inline-block h-3 w-1.5 align-middle animate-pulse"})]})]})}function Sce({content:e}){return h.jsxs("section",{className:"relative pl-8",children:[h.jsx(rA,{tone:"completed"}),h.jsx(Ed,{children:"Result"}),h.jsx(La,{className:"ring-border bg-card p-5",size:"sm",children:h.jsx(af,{className:"text-foreground/90 text-sm",children:e})})]})}function Cce({task:e}){const{error:t}=e,n=Dp(l=>l.openProviderDialog),r=Ay(l=>l.requestRetry),i=bce({error:t,hadLlmServiceError:!!e.hadLlmServiceError});if(!t)return null;function a(){r({content:e.content,type:yce(e.type)})}return h.jsxs("section",{className:"relative pl-8",children:[h.jsx(rA,{tone:"error"}),h.jsx(Ed,{children:"Error"}),h.jsxs(La,{className:"bg-red-500/5 p-5 ring-1 ring-red-500/30",size:"sm",children:[h.jsx("p",{className:"text-red-400 text-sm",children:Sn(t)}),t.code&&h.jsx("p",{className:"text-muted-foreground mono mt-1 text-[11px]",children:t.code}),h.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[i&&h.jsx(Re,{onClick:n,size:"sm",children:"Configure provider"}),h.jsxs(Re,{onClick:a,size:"sm",variant:i?"secondary":"default",children:[h.jsx(nq,{className:"size-3.5"}),"Try again"]}),h.jsx("span",{className:"text-muted-foreground text-xs",children:"Your prompt is preserved."})]})]})]})}function Ece({taskId:e}){return h.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[h.jsx("h2",{className:"text-foreground text-base font-medium",children:"Task not found"}),h.jsxs("p",{className:"text-muted-foreground max-w-md text-sm",children:["Task ",h.jsx("span",{className:"mono",children:nA(e)})," isn't in the local cache. It may have completed before the page was loaded, or it belongs to a different project."]})]})}function kce({taskId:e}){const t=iH(e),n=t?zd(t.status):!1,r=KR(n),a=Rt(y=>y.tourTaskId)===e,l=t?.reasoningContents?.at(-1),{onScroll:c,ref:d}=Ole([t?.toolCalls?.length??0,t?.reasoningContents?.length??0,l?.content?.length??0,t?.streamingContent?.length??0,t?.responseContent,t?.result,t?.error?.message,t?.status],n||a);if(!t)return h.jsx(Ece,{taskId:e});const f=n&&(t.streamingContent||t.responseContent),g=t.status==="completed"?t.result:void 0,p=t.status==="error"?t.error:void 0;return h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[h.jsx(mce,{now:r,task:t}),h.jsx("div",{className:"border-border/50 border-t"}),h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-7 overflow-y-auto px-6 py-5",onScroll:c,ref:d,children:[h.jsx(Rle,{task:t}),h.jsx(vce,{task:t}),h.jsx(sce,{now:r,task:t}),f&&h.jsx(wce,{task:t}),g&&h.jsx(Sce,{content:g}),p&&h.jsx(Cce,{task:t}),h.jsx(Ale,{task:t})]})]})}function Tce({canDelete:e,count:t,onClear:n,onDelete:r}){return h.jsxs("div",{className:"border-border bg-muted/40 flex min-h-9 items-center gap-3 rounded-md border px-3 text-xs",children:[h.jsxs("span",{className:"text-foreground",children:[h.jsx("span",{className:"text-foreground mono tabular-nums font-medium",children:t})," selected"]}),h.jsx("span",{className:"bg-border h-4 w-px"}),h.jsx(Re,{disabled:!e,onClick:r,size:"xs",variant:"ghost",children:"Delete"}),h.jsx(Re,{className:"ml-auto",onClick:n,size:"xs",variant:"ghost",children:"Clear selection"})]})}const aA={all:"All",cancelled:"Cancelled",completed:"Done",failed:"Failed",running:"Running"},Nce={cancelled:"bg-zinc-500",completed:"bg-emerald-500",failed:"bg-red-400",running:"bg-blue-400"};function Rce({breakdown:e,onNewTask:t,onSearchChange:n,onStatusChange:r,searchQuery:i,statusFilter:a,tourCue:l}){return h.jsxs("div",{className:"flex min-h-9 flex-wrap items-center gap-2",children:[tH.map(c=>{const d=e[c],f=a===c;return h.jsxs("button",{className:ge("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition",f?"bg-muted text-foreground font-medium":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),onClick:()=>r(c),type:"button",children:[c!=="all"&&h.jsx("span",{className:ge("inline-block size-1.5 rounded-full",Nce[c])}),h.jsx("span",{children:aA[c]}),h.jsx("span",{className:"text-muted-foreground tabular-nums",children:d})]},c)}),h.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[h.jsxs("div",{className:"relative",children:[h.jsx(Cc,{className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2"}),h.jsx(Ii,{className:"h-8 min-w-56 pl-8 text-xs",onChange:c=>n(c.target.value),placeholder:"Search input or id…",type:"text",value:i})]}),h.jsx(Qx,{active:!!l,align:"end",label:l??"",children:h.jsxs(Re,{onClick:t,size:"sm",variant:"default",children:[h.jsx(es,{className:"size-4"}),"New task"]})})]})]})}function ok({children:e,withDots:t}){return h.jsx(La,{className:ge("ring-border/80 flex min-h-0 flex-1 items-center justify-center p-0",t&&"dot-grid"),size:"sm",children:e})}function Ace(){return h.jsx("div",{className:"text-muted-foreground flex h-32 items-center justify-center text-sm",children:"Loading tasks…"})}function jce({onNewTask:e,tourCue:t}){return h.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4 p-8 text-center",children:[h.jsx(GU,{className:"text-muted-foreground/70 size-8"}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-foreground text-base font-medium",children:"No tasks yet"}),h.jsxs("p",{className:"text-muted-foreground mx-auto mt-1 max-w-sm text-sm leading-relaxed",children:["Capture knowledge with ",h.jsx("strong",{children:"Curate"})," or ask a question with ",h.jsx("strong",{children:"Query"}),"."]})]}),h.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[h.jsx(Qx,{active:!!t,label:t??"",side:"top",children:h.jsxs(Re,{onClick:e,size:"sm",variant:"default",children:[h.jsx(es,{className:"size-4"}),"New task"]})}),h.jsx("span",{className:"text-muted-foreground/60 ml-2 text-sm",children:"or run from the CLI"})]})]})}function Oce({onClearSearch:e,query:t,status:n}){return h.jsxs("div",{className:"text-muted-foreground flex h-32 flex-col items-center justify-center gap-2 p-4 text-sm",children:[h.jsxs("span",{children:["No ",n==="all"?"":`${aA[n].toLowerCase()} `,"tasks",t?` match "${t}"`:"","."]}),t&&h.jsx(Re,{onClick:e,size:"xs",variant:"link",children:"Clear search"})]})}const Mce=80;function Lce(e){if(!zd(e.status))return null;const t=e.toolCalls?.at(-1),n=e.reasoningContents?.at(-1),r=t?.timestamp??0,i=n?.timestamp??0;return t&&r>=i?{arg:Gb(t),kind:"tool",tool:t.toolName}:n&&n.content.trim()?{kind:"reasoning",text:n.content.trim().replaceAll(/\s+/g," ").slice(0,Mce)}:"thinking"}const Na={action:"w-12",checkbox:"w-10",duration:"w-24",id:"w-36",input:"min-w-72",started:"w-28",status:"w-36",type:"w-24"};function _ce(e,t){return e.completedAt&&e.startedAt?$u(e.completedAt-e.startedAt):e.startedAt?$u(t-e.startedAt):e.completedAt?$u(e.completedAt-e.createdAt):$u(t-e.createdAt)}function Dce({allSelected:e,filtered:t,now:n,onClearSearch:r,onDelete:i,onRowClick:a,onToggleSelect:l,onToggleSelectAll:c,searchQuery:d,selectedIds:f,statusFilter:g}){return h.jsxs(x8,{children:[h.jsx(b8,{children:h.jsxs(nc,{children:[h.jsx(Gi,{className:Na.checkbox,children:h.jsx(sA,{checked:e,onChange:c})}),h.jsx(Gi,{className:ge(Na.id,"text-xs tracking-wider"),children:"ID"}),h.jsx(Gi,{className:ge(Na.type,"text-xs tracking-wider"),children:"Type"}),h.jsx(Gi,{className:ge(Na.input,"text-xs tracking-wider"),children:"Input"}),h.jsx(Gi,{className:ge(Na.status,"text-xs tracking-wider"),children:"Status"}),h.jsx(Gi,{className:ge(Na.started,"text-right text-xs tracking-wider"),children:"Started"}),h.jsx(Gi,{className:ge(Na.duration,"text-right text-xs tracking-wider"),children:"Duration"}),h.jsx(Gi,{className:Na.action})]})}),h.jsx(v8,{children:t.length===0?h.jsx(nc,{children:h.jsx(Rr,{className:"text-muted-foreground py-10 text-center text-sm",colSpan:8,children:h.jsx(Oce,{onClearSearch:r,query:d,status:g})})}):t.map(p=>h.jsx(Ice,{isSelected:f.has(p.taskId),now:n,onDelete:i,onRowClick:a,onToggleSelect:l,task:p},p.taskId))})]})}function Ice({isSelected:e,now:t,onDelete:n,onRowClick:r,onToggleSelect:i,task:a}){const l=Ma(a.status),c=!l,d=Lce(a);return h.jsxs(nc,{className:"cursor-pointer [&>td]:align-middle","data-state":e?"selected":void 0,onClick:()=>r(a.taskId),children:[h.jsxs(Rr,{className:"relative",onClick:f=>f.stopPropagation(),children:[c&&h.jsx("span",{className:"bg-blue-400/70 pointer-events-none absolute top-2 bottom-2 left-0 w-0.5 rounded-full"}),h.jsx(sA,{checked:e,onChange:()=>i(a.taskId)})]}),h.jsx(Rr,{className:"text-identifier mono text-xs",title:a.taskId,children:nA(a.taskId)}),h.jsx(Rr,{children:h.jsx(zce,{type:a.type})}),h.jsxs(Rr,{className:"text-foreground max-w-0",children:[h.jsx("div",{className:"truncate",children:a.content||h.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})}),d&&h.jsxs("div",{className:"text-muted-foreground mono mt-1 flex items-center gap-1.5 text-[11px]",children:[h.jsx("span",{className:"text-blue-400",children:"▸"}),d==="thinking"&&h.jsx("span",{className:"italic",children:"thinking…"}),d!=="thinking"&&d.kind==="tool"&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-foreground/80",children:d.tool}),d.arg&&h.jsxs("span",{className:"truncate",children:["· ",d.arg]})]}),d!=="thinking"&&d.kind==="reasoning"&&h.jsx("span",{className:"truncate italic",children:d.text})]})]}),h.jsx(Rr,{children:h.jsx(oA,{status:a.status})}),h.jsxs(Rr,{className:"text-muted-foreground text-right text-xs",title:tA(a.startedAt??a.createdAt),children:[eA(a.startedAt??a.createdAt,t)," ago"]}),h.jsx(Rr,{className:ge("text-right mono text-xs tabular-nums",c?"text-blue-400":"text-muted-foreground"),children:_ce(a,t)}),h.jsx(Rr,{className:"text-center",onClick:f=>f.stopPropagation(),children:l&&h.jsx(Pce,{onClick:()=>n(a.taskId)})})]})}function zce({type:e}){return h.jsx(yo,{className:"text-muted-foreground mono text-[10px] uppercase tracking-wider",variant:"outline",children:d9(e)})}function Pce({onClick:e}){return h.jsx(Re,{"aria-label":"Delete",onClick:e,size:"icon-xs",title:"Delete",variant:"ghost",children:h.jsx(cq,{className:"size-3.5"})})}function sA({checked:e,onChange:t}){return h.jsx("input",{checked:e,className:"border-border bg-transparent accent-blue-500 size-3.5 cursor-pointer rounded border",onChange:t,type:"checkbox"})}function Fce(){const[e,t]=Uy(),n=e.get("task")??void 0,r=Q=>{t(de=>{const ue=new URLSearchParams(de);return ue.set("task",Q),ue})},i=()=>{t(Q=>{const de=new URLSearchParams(Q);return de.delete("task"),de})},a=De(Q=>Q.selectedProject),l=ai(Q=>Q.tasks),c=ai(Q=>Q.statusFilter),d=ai(Q=>Q.setStatusFilter),f=ai(Q=>Q.searchQuery),g=ai(Q=>Q.setSearchQuery),p=ai(Q=>Q.clearCompleted),y=ai(Q=>Q.removeTask),x=oH(),{isLoading:v}=u9({projectPath:a||void 0}),S=KR(x.running>0),[E,k]=C.useState(new Set),[T,R]=C.useState({open:!1}),M=Rt(Q=>Q.tourActive),O=Rt(Q=>Q.tourStep),A=Rt(Q=>Q.tourTaskId),N=Rt(Q=>Q.setTourTaskId),H=M&&(O==="curate"||O==="query"),I=H&&!A?O==="curate"?"Click to capture knowledge":"Click to ask a question":void 0,U=()=>{if(H){R({initialContent:O==="curate"?nle:rle,initialType:O,open:!0});return}R({open:!0})},$=()=>R({open:!1}),V=Ay(Q=>Q.seed),G=Ay(Q=>Q.consume);C.useEffect(()=>{V&&(R({initialContent:V.content,initialType:V.type,open:!0}),i(),G())},[V,G,i]);const B=(Q,de)=>{H&&N(Q),de&&r(Q)},F=C.useMemo(()=>new Map(l.map(Q=>[Q.taskId,Q])),[l]),q=C.useMemo(()=>l.filter(Q=>nH(Q.status,c)).filter(Q=>rH(Q,f)).sort((Q,de)=>{const ue=Ma(Q.status)?1:0,Se=Ma(de.status)?1:0;if(ue!==Se)return ue-Se;const Ee=Q.completedAt??Q.startedAt??Q.createdAt;return(de.completedAt??de.startedAt??de.createdAt)-Ee}),[l,c,f]),W=q.length>0&&q.every(Q=>E.has(Q.taskId)),ie=E.size>0,_=x.completed+x.failed+x.cancelled,z=C.useMemo(()=>{for(const Q of E){const de=F.get(Q);if(de&&Ma(de.status))return!0}return!1},[E,F]),Y=Q=>{k(de=>{const ue=new Set(de);return ue.has(Q)?ue.delete(Q):ue.add(Q),ue})},L=()=>{k(Q=>{if(W)return new Set;const de=new Set(Q);for(const ue of q)de.add(ue.taskId);return de})},ee=()=>k(new Set),te=()=>{for(const Q of E){const de=F.get(Q);de&&Ma(de.status)&&y(Q)}ee()};return h.jsxs("div",{className:"mx-auto flex h-full w-full min-h-0 max-w-7xl flex-col gap-3",children:[ie?h.jsx(Tce,{canDelete:z,count:E.size,onClear:ee,onDelete:te}):h.jsx(Rce,{breakdown:x,onNewTask:U,onSearchChange:g,onStatusChange:Q=>{d(Q),ee()},searchQuery:f,statusFilter:c,tourCue:I&&l.length>0?I:void 0}),v?h.jsx(ok,{children:h.jsx(Ace,{})}):l.length===0?h.jsx(ok,{withDots:!0,children:h.jsx(jce,{onNewTask:U,tourCue:I})}):h.jsx(Dce,{allSelected:W,filtered:q,now:S,onClearSearch:()=>g(""),onDelete:y,onRowClick:r,onToggleSelect:Y,onToggleSelectAll:L,searchQuery:f,selectedIds:E,statusFilter:c}),_>0&&h.jsx("div",{className:"flex items-center justify-end px-1",children:h.jsxs(Re,{onClick:()=>p(),size:"xs",variant:"ghost",children:["Clear finished (",_,")"]})}),h.jsx(YR,{onOpenChange:Q=>!Q&&i(),open:!!n,children:h.jsx(WR,{className:"data-[side=right]:w-full data-[side=right]:max-w-3xl p-0 shadow-[inset_1px_0_0_rgba(96,165,250,0.18)]",side:"right",children:n&&h.jsx(kce,{taskId:n})})}),h.jsx(Sle,{initialContent:T.initialContent,initialType:T.initialType,onClose:$,onSubmitted:B,open:T.open,prefillNotice:H?"example":void 0,tourStepLabel:H?ile[O]:void 0})]})}function Bce(){return h.jsx(Fce,{})}const Hce=QL([{element:h.jsx(Jse,{}),path:"/projects"},{children:[{children:[{element:h.jsx(Qse,{}),index:!0},{element:h.jsx(mX,{}),path:"changes"},{element:h.jsx(yZ,{}),path:"configuration"},{element:h.jsx(SG,{}),path:"analytics"},{element:h.jsx(Kse,{}),path:"contexts"},{element:h.jsx(Bce,{}),path:"tasks"},{element:h.jsx(KE,{}),path:"*"}],element:h.jsx(wG,{})}],element:h.jsx(cH,{}),path:"/"},{element:h.jsx(KE,{}),path:"*"}]);function Uce(){return h.jsxs(DB,{children:[h.jsx(s_,{router:Hce}),h.jsx(IO,{position:"top-center"})]})}const lA=document.querySelector("#root");if(lA===null)throw new Error("Root element not found");const qce=Ej.createRoot(lA);qce.render(h.jsx(Uce,{}));