byterover-cli 3.12.0 → 3.13.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 (71) hide show
  1. package/.env.production +2 -1
  2. package/dist/oclif/commands/curate/index.js +6 -0
  3. package/dist/oclif/commands/providers/connect.d.ts +26 -1
  4. package/dist/oclif/commands/providers/connect.js +95 -17
  5. package/dist/oclif/commands/providers/list.d.ts +10 -1
  6. package/dist/oclif/commands/providers/list.js +35 -3
  7. package/dist/oclif/commands/query.js +6 -0
  8. package/dist/oclif/commands/status.js +4 -0
  9. package/dist/oclif/lib/billing-line.d.ts +8 -0
  10. package/dist/oclif/lib/billing-line.js +45 -0
  11. package/dist/oclif/lib/format-billing-line.d.ts +2 -0
  12. package/dist/oclif/lib/format-billing-line.js +19 -0
  13. package/dist/oclif/lib/insufficient-credits.d.ts +11 -0
  14. package/dist/oclif/lib/insufficient-credits.js +36 -0
  15. package/dist/server/config/environment.d.ts +1 -0
  16. package/dist/server/config/environment.js +3 -0
  17. package/dist/server/core/domain/transport/schemas.d.ts +17 -0
  18. package/dist/server/core/domain/transport/schemas.js +3 -0
  19. package/dist/server/core/interfaces/services/i-billing-service.d.ts +26 -0
  20. package/dist/server/core/interfaces/services/i-billing-service.js +1 -0
  21. package/dist/server/core/interfaces/storage/i-billing-config-store.d.ts +4 -0
  22. package/dist/server/core/interfaces/storage/i-billing-config-store.js +1 -0
  23. package/dist/server/infra/billing/billing-state-endpoint.d.ts +4 -0
  24. package/dist/server/infra/billing/billing-state-endpoint.js +7 -0
  25. package/dist/server/infra/billing/build-status-billing.d.ts +9 -0
  26. package/dist/server/infra/billing/build-status-billing.js +36 -0
  27. package/dist/server/infra/billing/http-billing-service.d.ts +19 -0
  28. package/dist/server/infra/billing/http-billing-service.js +57 -0
  29. package/dist/server/infra/billing/paid-organizations-endpoint.d.ts +8 -0
  30. package/dist/server/infra/billing/paid-organizations-endpoint.js +18 -0
  31. package/dist/server/infra/billing/resolve-billing-source.d.ts +13 -0
  32. package/dist/server/infra/billing/resolve-billing-source.js +36 -0
  33. package/dist/server/infra/billing/resolve-billing-team.d.ts +5 -0
  34. package/dist/server/infra/billing/resolve-billing-team.js +8 -0
  35. package/dist/server/infra/connectors/rules/rules-connector.js +7 -2
  36. package/dist/server/infra/connectors/shared/constants.d.ts +9 -0
  37. package/dist/server/infra/connectors/shared/constants.js +31 -5
  38. package/dist/server/infra/daemon/agent-process.js +10 -8
  39. package/dist/server/infra/daemon/brv-server.js +5 -0
  40. package/dist/server/infra/http/provider-model-fetchers.js +10 -4
  41. package/dist/server/infra/process/feature-handlers.d.ts +3 -1
  42. package/dist/server/infra/process/feature-handlers.js +26 -2
  43. package/dist/server/infra/storage/file-billing-config-store.d.ts +13 -0
  44. package/dist/server/infra/storage/file-billing-config-store.js +55 -0
  45. package/dist/server/infra/transport/handlers/auth-handler.d.ts +4 -0
  46. package/dist/server/infra/transport/handlers/auth-handler.js +20 -2
  47. package/dist/server/infra/transport/handlers/billing-handler.d.ts +30 -0
  48. package/dist/server/infra/transport/handlers/billing-handler.js +132 -0
  49. package/dist/server/infra/transport/handlers/index.d.ts +4 -0
  50. package/dist/server/infra/transport/handlers/index.js +2 -0
  51. package/dist/server/infra/transport/handlers/init-handler.js +2 -0
  52. package/dist/server/infra/transport/handlers/status-handler.d.ts +14 -0
  53. package/dist/server/infra/transport/handlers/status-handler.js +16 -0
  54. package/dist/server/infra/transport/handlers/team-handler.d.ts +19 -0
  55. package/dist/server/infra/transport/handlers/team-handler.js +40 -0
  56. package/dist/shared/transport/events/auth-events.d.ts +3 -0
  57. package/dist/shared/transport/events/billing-events.d.ts +48 -0
  58. package/dist/shared/transport/events/billing-events.js +8 -0
  59. package/dist/shared/transport/events/index.d.ts +11 -0
  60. package/dist/shared/transport/events/index.js +6 -0
  61. package/dist/shared/transport/events/team-events.d.ts +8 -0
  62. package/dist/shared/transport/events/team-events.js +3 -0
  63. package/dist/shared/transport/types/dto.d.ts +80 -0
  64. package/dist/webui/assets/index-B9JmEFOK.js +130 -0
  65. package/dist/webui/assets/index-CMIKsBMr.css +1 -0
  66. package/dist/webui/index.html +2 -2
  67. package/dist/webui/sw.js +1 -1
  68. package/oclif.manifest.json +1280 -1272
  69. package/package.json +1 -1
  70. package/dist/webui/assets/index-DyVvFoM6.css +0 -1
  71. package/dist/webui/assets/index-lr0byHh9.js +0 -130
@@ -0,0 +1,130 @@
1
+ function pD(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 s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{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 s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f2={exports:{}},id={};var k5;function mD(){if(k5)return id;k5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var a=null;if(s!==void 0&&(a=""+s),i.key!==void 0&&(a=""+i.key),"key"in i){s={};for(var c in i)c!=="key"&&(s[c]=i[c])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:s}}return id.Fragment=t,id.jsx=n,id.jsxs=n,id}var T5;function gD(){return T5||(T5=1,f2.exports=mD()),f2.exports}var f=gD(),h2={exports:{}},od={},p2={exports:{}},m2={};var N5;function yD(){return N5||(N5=1,(function(e){function t(P,Y){var G=P.length;P.push(Y);e:for(;0<G;){var X=G-1>>>1,L=P[X];if(0<i(L,Y))P[X]=Y,P[G]=L,G=X;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var Y=P[0],G=P.pop();if(G!==Y){P[0]=G;e:for(var X=0,L=P.length,B=L>>>1;X<B;){var W=2*(X+1)-1,D=P[W],Q=W+1,ee=P[Q];if(0>i(D,G))Q<L&&0>i(ee,D)?(P[X]=ee,P[Q]=G,X=Q):(P[X]=D,P[W]=G,X=W);else if(Q<L&&0>i(ee,G))P[X]=ee,P[Q]=G,X=Q;else break e}}return Y}function i(P,Y){var G=P.sortIndex-Y.sortIndex;return G!==0?G:P.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var u=[],h=[],m=1,p=null,y=3,x=!1,b=!1,w=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function O(P){for(var Y=n(h);Y!==null;){if(Y.callback===null)r(h);else if(Y.startTime<=P)r(h),Y.sortIndex=Y.expirationTime,t(u,Y);else break;Y=n(h)}}function j(P){if(w=!1,O(P),!b)if(n(u)!==null)b=!0,A||(A=!0,q());else{var Y=n(h);Y!==null&&U(j,Y.startTime-P)}}var A=!1,R=-1,_=5,F=-1;function I(){return E?!0:!(e.unstable_now()-F<_)}function H(){if(E=!1,A){var P=e.unstable_now();F=P;var Y=!0;try{e:{b=!1,w&&(w=!1,T(R),R=-1),x=!0;var G=y;try{t:{for(O(P),p=n(u);p!==null&&!(p.expirationTime>P&&I());){var X=p.callback;if(typeof X=="function"){p.callback=null,y=p.priorityLevel;var L=X(p.expirationTime<=P);if(P=e.unstable_now(),typeof L=="function"){p.callback=L,O(P),Y=!0;break t}p===n(u)&&r(u),O(P)}else r(u);p=n(u)}if(p!==null)Y=!0;else{var B=n(h);B!==null&&U(j,B.startTime-P),Y=!1}}break e}finally{p=null,y=G,x=!1}Y=void 0}}finally{Y?q():A=!1}}}var q;if(typeof N=="function")q=function(){N(H)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,$=V.port2;V.port1.onmessage=H,q=function(){$.postMessage(null)}}else q=function(){k(H,0)};function U(P,Y){R=k(function(){P(e.unstable_now())},Y)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(P){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var G=y;y=Y;try{return P()}finally{y=G}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(P,Y){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var G=y;y=P;try{return Y()}finally{y=G}},e.unstable_scheduleCallback=function(P,Y,G){var X=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?X+G:X):G=X,P){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=G+L,P={id:m++,callback:Y,priorityLevel:P,startTime:G,expirationTime:L,sortIndex:-1},G>X?(P.sortIndex=G,t(h,P),n(u)===null&&P===n(h)&&(w?(T(R),R=-1):w=!0,U(j,G-X))):(P.sortIndex=L,t(u,P),b||x||(b=!0,A||(A=!0,q()))),P},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(P){var Y=y;return function(){var G=y;y=Y;try{return P.apply(this,arguments)}finally{y=G}}}})(m2)),m2}var R5;function xD(){return R5||(R5=1,p2.exports=yD()),p2.exports}var g2={exports:{}},At={};var A5;function bD(){if(A5)return At;A5=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"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function x(B){return B===null||typeof B!="object"?null:(B=y&&B[y]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,E={};function k(B,W,D){this.props=B,this.context=W,this.refs=E,this.updater=D||b}k.prototype.isReactComponent={},k.prototype.setState=function(B,W){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,W,"setState")},k.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function T(){}T.prototype=k.prototype;function N(B,W,D){this.props=B,this.context=W,this.refs=E,this.updater=D||b}var O=N.prototype=new T;O.constructor=N,w(O,k.prototype),O.isPureReactComponent=!0;var j=Array.isArray;function A(){}var R={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function F(B,W,D){var Q=D.ref;return{$$typeof:e,type:B,key:W,ref:Q!==void 0?Q:null,props:D}}function I(B,W){return F(B.type,W,B.props)}function H(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function q(B){var W={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(D){return W[D]})}var V=/\/+/g;function $(B,W){return typeof B=="object"&&B!==null&&B.key!=null?q(""+B.key):W.toString(36)}function U(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(A,A):(B.status="pending",B.then(function(W){B.status==="pending"&&(B.status="fulfilled",B.value=W)},function(W){B.status==="pending"&&(B.status="rejected",B.reason=W)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function P(B,W,D,Q,ee){var J=typeof B;(J==="undefined"||J==="boolean")&&(B=null);var he=!1;if(B===null)he=!0;else switch(J){case"bigint":case"string":case"number":he=!0;break;case"object":switch(B.$$typeof){case e:case t:he=!0;break;case m:return he=B._init,P(he(B._payload),W,D,Q,ee)}}if(he)return ee=ee(B),he=Q===""?"."+$(B,0):Q,j(ee)?(D="",he!=null&&(D=he.replace(V,"$&/")+"/"),P(ee,W,D,"",function(Re){return Re})):ee!=null&&(H(ee)&&(ee=I(ee,D+(ee.key==null||B&&B.key===ee.key?"":(""+ee.key).replace(V,"$&/")+"/")+he)),W.push(ee)),1;he=0;var de=Q===""?".":Q+":";if(j(B))for(var Se=0;Se<B.length;Se++)Q=B[Se],J=de+$(Q,Se),he+=P(Q,W,D,J,ee);else if(Se=x(B),typeof Se=="function")for(B=Se.call(B),Se=0;!(Q=B.next()).done;)Q=Q.value,J=de+$(Q,Se++),he+=P(Q,W,D,J,ee);else if(J==="object"){if(typeof B.then=="function")return P(U(B),W,D,Q,ee);throw W=String(B),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return he}function Y(B,W,D){if(B==null)return B;var Q=[],ee=0;return P(B,Q,"","",function(J){return W.call(D,J,ee++)}),Q}function G(B){if(B._status===-1){var W=B._result;W=W(),W.then(function(D){(B._status===0||B._status===-1)&&(B._status=1,B._result=D)},function(D){(B._status===0||B._status===-1)&&(B._status=2,B._result=D)}),B._status===-1&&(B._status=0,B._result=W)}if(B._status===1)return B._result.default;throw B._result}var X=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},L={map:Y,forEach:function(B,W,D){Y(B,function(){W.apply(this,arguments)},D)},count:function(B){var W=0;return Y(B,function(){W++}),W},toArray:function(B){return Y(B,function(W){return W})||[]},only:function(B){if(!H(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return At.Activity=p,At.Children=L,At.Component=k,At.Fragment=n,At.Profiler=i,At.PureComponent=N,At.StrictMode=r,At.Suspense=u,At.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,At.__COMPILER_RUNTIME={__proto__:null,c:function(B){return R.H.useMemoCache(B)}},At.cache=function(B){return function(){return B.apply(null,arguments)}},At.cacheSignal=function(){return null},At.cloneElement=function(B,W,D){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var Q=w({},B.props),ee=B.key;if(W!=null)for(J in W.key!==void 0&&(ee=""+W.key),W)!_.call(W,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&W.ref===void 0||(Q[J]=W[J]);var J=arguments.length-2;if(J===1)Q.children=D;else if(1<J){for(var he=Array(J),de=0;de<J;de++)he[de]=arguments[de+2];Q.children=he}return F(B.type,ee,Q)},At.createContext=function(B){return B={$$typeof:a,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:s,_context:B},B},At.createElement=function(B,W,D){var Q,ee={},J=null;if(W!=null)for(Q in W.key!==void 0&&(J=""+W.key),W)_.call(W,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ee[Q]=W[Q]);var he=arguments.length-2;if(he===1)ee.children=D;else if(1<he){for(var de=Array(he),Se=0;Se<he;Se++)de[Se]=arguments[Se+2];ee.children=de}if(B&&B.defaultProps)for(Q in he=B.defaultProps,he)ee[Q]===void 0&&(ee[Q]=he[Q]);return F(B,J,ee)},At.createRef=function(){return{current:null}},At.forwardRef=function(B){return{$$typeof:c,render:B}},At.isValidElement=H,At.lazy=function(B){return{$$typeof:m,_payload:{_status:-1,_result:B},_init:G}},At.memo=function(B,W){return{$$typeof:h,type:B,compare:W===void 0?null:W}},At.startTransition=function(B){var W=R.T,D={};R.T=D;try{var Q=B(),ee=R.S;ee!==null&&ee(D,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(A,X)}catch(J){X(J)}finally{W!==null&&D.types!==null&&(W.types=D.types),R.T=W}},At.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},At.use=function(B){return R.H.use(B)},At.useActionState=function(B,W,D){return R.H.useActionState(B,W,D)},At.useCallback=function(B,W){return R.H.useCallback(B,W)},At.useContext=function(B){return R.H.useContext(B)},At.useDebugValue=function(){},At.useDeferredValue=function(B,W){return R.H.useDeferredValue(B,W)},At.useEffect=function(B,W){return R.H.useEffect(B,W)},At.useEffectEvent=function(B){return R.H.useEffectEvent(B)},At.useId=function(){return R.H.useId()},At.useImperativeHandle=function(B,W,D){return R.H.useImperativeHandle(B,W,D)},At.useInsertionEffect=function(B,W){return R.H.useInsertionEffect(B,W)},At.useLayoutEffect=function(B,W){return R.H.useLayoutEffect(B,W)},At.useMemo=function(B,W){return R.H.useMemo(B,W)},At.useOptimistic=function(B,W){return R.H.useOptimistic(B,W)},At.useReducer=function(B,W,D){return R.H.useReducer(B,W,D)},At.useRef=function(B){return R.H.useRef(B)},At.useState=function(B){return R.H.useState(B)},At.useSyncExternalStore=function(B,W,D){return R.H.useSyncExternalStore(B,W,D)},At.useTransition=function(){return R.H.useTransition()},At.version="19.2.4",At}var j5;function vf(){return j5||(j5=1,g2.exports=bD()),g2.exports}var y2={exports:{}},kr={};var O5;function vD(){if(O5)return kr;O5=1;var e=vf();function t(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+u+"; visit "+h+" 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 s(u,h,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:u,containerInfo:h,implementation:m}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return kr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,kr.createPortal=function(u,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(u,h,null,m)},kr.flushSync=function(u){var h=a.T,m=r.p;try{if(a.T=null,r.p=2,u)return u()}finally{a.T=h,r.p=m,r.d.f()}},kr.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(u,h))},kr.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},kr.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var m=h.as,p=c(m,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?r.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:x}):m==="script"&&r.d.X(u,{crossOrigin:p,integrity:y,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},kr.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=c(h.as,h.crossOrigin);r.d.M(u,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(u)},kr.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,p=c(m,h.crossOrigin);r.d.L(u,m,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},kr.preloadModule=function(u,h){if(typeof u=="string")if(h){var m=c(h.as,h.crossOrigin);r.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(u)},kr.requestFormReset=function(u){r.d.r(u)},kr.unstable_batchedUpdates=function(u,h){return u(h)},kr.useFormState=function(u,h,m){return a.H.useFormState(u,h,m)},kr.useFormStatus=function(){return a.H.useHostTransitionStatus()},kr.version="19.2.4",kr}var M5;function g6(){if(M5)return y2.exports;M5=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(),y2.exports=vD(),y2.exports}var D5;function wD(){if(D5)return od;D5=1;var e=xD(),t=vf(),n=g6();function r(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+l+" 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 s(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function a(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function u(o){if(s(o)!==o)throw Error(r(188))}function h(o){var l=o.alternate;if(!l){if(l=s(o),l===null)throw Error(r(188));return l!==o?null:o}for(var d=o,g=l;;){var v=d.return;if(v===null)break;var C=v.alternate;if(C===null){if(g=v.return,g!==null){d=g;continue}break}if(v.child===C.child){for(C=v.child;C;){if(C===d)return u(v),o;if(C===g)return u(v),l;C=C.sibling}throw Error(r(188))}if(d.return!==g.return)d=v,g=C;else{for(var M=!1,z=v.child;z;){if(z===d){M=!0,d=v,g=C;break}if(z===g){M=!0,g=v,d=C;break}z=z.sibling}if(!M){for(z=C.child;z;){if(z===d){M=!0,d=C,g=v;break}if(z===g){M=!0,g=C,d=v;break}z=z.sibling}if(!M)throw Error(r(189))}}if(d.alternate!==g)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?o:l}function m(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=m(o),l!==null)return l;o=o.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),N=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function q(o){return o===null||typeof o!="object"?null:(o=H&&o[H]||o["@@iterator"],typeof o=="function"?o:null)}var V=Symbol.for("react.client.reference");function $(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 w:return"Fragment";case k:return"Profiler";case E:return"StrictMode";case j:return"Suspense";case A:return"SuspenseList";case F:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case N:return o.displayName||"Context";case T:return(o._context.displayName||"Context")+".Consumer";case O:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case R:return l=o.displayName||null,l!==null?l:$(o.type)||"Memo";case _:l=o._payload,o=o._init;try{return $(o(l))}catch{}}return null}var U=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},X=[],L=-1;function B(o){return{current:o}}function W(o){0>L||(o.current=X[L],X[L]=null,L--)}function D(o,l){L++,X[L]=o.current,o.current=l}var Q=B(null),ee=B(null),J=B(null),he=B(null);function de(o,l){switch(D(J,l),D(ee,o),D(Q,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?GC(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=GC(l),o=KC(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}W(Q),D(Q,o)}function Se(){W(Q),W(ee),W(J)}function Re(o){o.memoizedState!==null&&D(he,o);var l=Q.current,d=KC(l,o.type);l!==d&&(D(ee,o),D(Q,d))}function je(o){ee.current===o&&(W(Q),W(ee)),he.current===o&&(W(he),ed._currentValue=G)}var Fe,_e;function De(o){if(Fe===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);Fe=l&&l[1]||"",_e=-1<d.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Fe+o+_e}var xe=!1;function Ge(o,l){if(!o||xe)return"";xe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(l){var Ne=function(){throw Error()};if(Object.defineProperty(Ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ne,[])}catch(me){var fe=me}Reflect.construct(o,[],Ne)}else{try{Ne.call()}catch(me){fe=me}o.call(Ne.prototype)}}else{try{throw Error()}catch(me){fe=me}(Ne=o())&&typeof Ne.catch=="function"&&Ne.catch(function(){})}}catch(me){if(me&&fe&&typeof me.stack=="string")return[me.stack,fe.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=g.DetermineComponentFrameRoot(),M=C[0],z=C[1];if(M&&z){var Z=M.split(`
4
+ `),ue=z.split(`
5
+ `);for(v=g=0;g<Z.length&&!Z[g].includes("DetermineComponentFrameRoot");)g++;for(;v<ue.length&&!ue[v].includes("DetermineComponentFrameRoot");)v++;if(g===Z.length||v===ue.length)for(g=Z.length-1,v=ue.length-1;1<=g&&0<=v&&Z[g]!==ue[v];)v--;for(;1<=g&&0<=v;g--,v--)if(Z[g]!==ue[v]){if(g!==1||v!==1)do if(g--,v--,0>v||Z[g]!==ue[v]){var ve=`
6
+ `+Z[g].replace(" at new "," at ");return o.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",o.displayName)),ve}while(1<=g&&0<=v);break}}}finally{xe=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?De(d):""}function we(o,l){switch(o.tag){case 26:case 27:case 5:return De(o.type);case 16:return De("Lazy");case 13:return o.child!==l&&l!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return Ge(o.type,!1);case 11:return Ge(o.type.render,!1);case 1:return Ge(o.type,!0);case 31:return De("Activity");default:return""}}function Ae(o){try{var l="",d=null;do l+=we(o,d),d=o,o=o.return;while(o);return l}catch(g){return`
7
+ Error generating stack: `+g.message+`
8
+ `+g.stack}}var pe=Object.prototype.hasOwnProperty,be=e.unstable_scheduleCallback,ne=e.unstable_cancelCallback,ye=e.unstable_shouldYield,Ce=e.unstable_requestPaint,Ve=e.unstable_now,ct=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,Ee=e.unstable_UserBlockingPriority,Le=e.unstable_NormalPriority,Me=e.unstable_LowPriority,Ue=e.unstable_IdlePriority,dt=e.log,xt=e.unstable_setDisableYieldValue,Je=null,Ke=null;function bt(o){if(typeof dt=="function"&&xt(o),Ke&&typeof Ke.setStrictMode=="function")try{Ke.setStrictMode(Je,o)}catch{}}var nt=Math.clz32?Math.clz32:$e,Qe=Math.log,Ct=Math.LN2;function $e(o){return o>>>=0,o===0?32:31-(Qe(o)/Ct|0)|0}var ge=256,Oe=262144,Ye=4194304;function Rt(o){var l=o&42;if(l!==0)return l;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 Ie(o,l,d){var g=o.pendingLanes;if(g===0)return 0;var v=0,C=o.suspendedLanes,M=o.pingedLanes;o=o.warmLanes;var z=g&134217727;return z!==0?(g=z&~C,g!==0?v=Rt(g):(M&=z,M!==0?v=Rt(M):d||(d=z&~o,d!==0&&(v=Rt(d))))):(z=g&~C,z!==0?v=Rt(z):M!==0?v=Rt(M):d||(d=g&~o,d!==0&&(v=Rt(d)))),v===0?0:l!==0&&l!==v&&(l&C)===0&&(C=v&-v,d=l&-l,C>=d||C===32&&(d&4194048)!==0)?l:v}function Pt(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function sn(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 nn(){var o=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),o}function vn(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function Ut(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function yt(o,l,d,g,v,C){var M=o.pendingLanes;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=d,o.entangledLanes&=d,o.errorRecoveryDisabledLanes&=d,o.shellSuspendCounter=0;var z=o.entanglements,Z=o.expirationTimes,ue=o.hiddenUpdates;for(d=M&~d;0<d;){var ve=31-nt(d),Ne=1<<ve;z[ve]=0,Z[ve]=-1;var fe=ue[ve];if(fe!==null)for(ue[ve]=null,ve=0;ve<fe.length;ve++){var me=fe[ve];me!==null&&(me.lane&=-536870913)}d&=~Ne}g!==0&&zt(o,g,0),C!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=C&~(M&~l))}function zt(o,l,d){o.pendingLanes|=l,o.suspendedLanes&=~l;var g=31-nt(l);o.entangledLanes|=l,o.entanglements[g]=o.entanglements[g]|1073741824|d&261930}function K(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var g=31-nt(d),v=1<<g;v&l|o[g]&l&&(o[g]|=l),d&=~v}}function te(o,l){var d=l&-l;return d=(d&42)!==0?1:ae(d),(d&(o.suspendedLanes|l))!==0?0:d}function ae(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 Te(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function He(){var o=Y.p;return o!==0?o:(o=window.event,o===void 0?32:x5(o.type))}function st(o,l){var d=Y.p;try{return Y.p=o,l()}finally{Y.p=d}}var Ze=Math.random().toString(36).slice(2),Xe="__reactFiber$"+Ze,et="__reactProps$"+Ze,ut="__reactContainer$"+Ze,vt="__reactEvents$"+Ze,ft="__reactListeners$"+Ze,Xt="__reactHandles$"+Ze,$t="__reactResources$"+Ze,Dn="__reactMarker$"+Ze;function Ln(o){delete o[Xe],delete o[et],delete o[vt],delete o[ft],delete o[Xt]}function In(o){var l=o[Xe];if(l)return l;for(var d=o.parentNode;d;){if(l=d[ut]||d[Xe]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=n5(o);o!==null;){if(d=o[Xe])return d;o=n5(o)}return l}o=d,d=o.parentNode}return null}function Yt(o){if(o=o[Xe]||o[ut]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function fr(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(r(33))}function Yr(o){var l=o[$t];return l||(l=o[$t]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function An(o){o[Dn]=!0}var Zi=new Set,ai={};function Ji(o,l){Ai(o,l),Ai(o+"Capture",l)}function Ai(o,l){for(ai[o]=l,o=0;o<l.length;o++)Zi.add(l[o])}var Po=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]*$"),La={},Ia={};function Wt(o){return pe.call(Ia,o)?!0:pe.call(La,o)?!1:Po.test(o)?Ia[o]=!0:(La[o]=!0,!1)}function Yn(o,l,d){if(Wt(l))if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var g=l.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+d)}}function eo(o,l,d){if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+d)}}function xr(o,l,d,g){if(g===null)o.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttributeNS(l,d,""+g)}}function Gt(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Pa(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function nh(o,l,d){var g=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var v=g.get,C=g.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return v.call(this)},set:function(M){d=""+M,C.call(this,M)}}),Object.defineProperty(o,l,{enumerable:g.enumerable}),{getValue:function(){return d},setValue:function(M){d=""+M},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function gu(o){if(!o._valueTracker){var l=Pa(o)?"checked":"value";o._valueTracker=nh(o,l,""+o[l])}}function Hw(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),g="";return o&&(g=Pa(o)?o.checked?"true":"false":o.value),o=g,o!==d?(l.setValue(o),!0):!1}function rh(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 l7=/[\n"\\]/g;function ji(o){return o.replace(l7,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function sg(o,l,d,g,v,C,M,z){o.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?o.type=M:o.removeAttribute("type"),l!=null?M==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+Gt(l)):o.value!==""+Gt(l)&&(o.value=""+Gt(l)):M!=="submit"&&M!=="reset"||o.removeAttribute("value"),l!=null?ag(o,M,Gt(l)):d!=null?ag(o,M,Gt(d)):g!=null&&o.removeAttribute("value"),v==null&&C!=null&&(o.defaultChecked=!!C),v!=null&&(o.checked=v&&typeof v!="function"&&typeof v!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?o.name=""+Gt(z):o.removeAttribute("name")}function Uw(o,l,d,g,v,C,M,z){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(o.type=C),l!=null||d!=null){if(!(C!=="submit"&&C!=="reset"||l!=null)){gu(o);return}d=d!=null?""+Gt(d):"",l=l!=null?""+Gt(l):d,z||l===o.value||(o.value=l),o.defaultValue=l}g=g??v,g=typeof g!="function"&&typeof g!="symbol"&&!!g,o.checked=z?o.checked:!!g,o.defaultChecked=!!g,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(o.name=M),gu(o)}function ag(o,l,d){l==="number"&&rh(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function Dl(o,l,d,g){if(o=o.options,l){l={};for(var v=0;v<d.length;v++)l["$"+d[v]]=!0;for(d=0;d<o.length;d++)v=l.hasOwnProperty("$"+o[d].value),o[d].selected!==v&&(o[d].selected=v),v&&g&&(o[d].defaultSelected=!0)}else{for(d=""+Gt(d),l=null,v=0;v<o.length;v++){if(o[v].value===d){o[v].selected=!0,g&&(o[v].defaultSelected=!0);return}l!==null||o[v].disabled||(l=o[v])}l!==null&&(l.selected=!0)}}function qw(o,l,d){if(l!=null&&(l=""+Gt(l),l!==o.value&&(o.value=l),d==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=d!=null?""+Gt(d):""}function Vw(o,l,d,g){if(l==null){if(g!=null){if(d!=null)throw Error(r(92));if(U(g)){if(1<g.length)throw Error(r(93));g=g[0]}d=g}d==null&&(d=""),l=d}d=Gt(l),o.defaultValue=d,g=o.textContent,g===d&&g!==""&&g!==null&&(o.value=g),gu(o)}function _l(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var c7=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 $w(o,l,d){var g=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?g?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":g?o.setProperty(l,d):typeof d!="number"||d===0||c7.has(l)?l==="float"?o.cssFloat=d:o[l]=(""+d).trim():o[l]=d+"px"}function Yw(o,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(o=o.style,d!=null){for(var g in d)!d.hasOwnProperty(g)||l!=null&&l.hasOwnProperty(g)||(g.indexOf("--")===0?o.setProperty(g,""):g==="float"?o.cssFloat="":o[g]="");for(var v in l)g=l[v],l.hasOwnProperty(v)&&d[v]!==g&&$w(o,v,g)}else for(var C in l)l.hasOwnProperty(C)&&$w(o,C,l[C])}function lg(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 u7=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"]]),d7=/^[\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 ih(o){return d7.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function zo(){}var cg=null;function ug(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ll=null,Il=null;function Ww(o){var l=Yt(o);if(l&&(o=l.stateNode)){var d=o[et]||null;e:switch(o=l.stateNode,l.type){case"input":if(sg(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+ji(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var g=d[l];if(g!==o&&g.form===o.form){var v=g[et]||null;if(!v)throw Error(r(90));sg(g,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<d.length;l++)g=d[l],g.form===o.form&&Hw(g)}break e;case"textarea":qw(o,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&Dl(o,!!d.multiple,l,!1)}}}var dg=!1;function Gw(o,l,d){if(dg)return o(l,d);dg=!0;try{var g=o(l);return g}finally{if(dg=!1,(Ll!==null||Il!==null)&&($h(),Ll&&(l=Ll,o=Il,Il=Ll=null,Ww(l),o)))for(l=0;l<o.length;l++)Ww(o[l])}}function yu(o,l){var d=o.stateNode;if(d===null)return null;var g=d[et]||null;if(g===null)return null;d=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Fo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fg=!1;if(Fo)try{var xu={};Object.defineProperty(xu,"passive",{get:function(){fg=!0}}),window.addEventListener("test",xu,xu),window.removeEventListener("test",xu,xu)}catch{fg=!1}var Rs=null,hg=null,oh=null;function Kw(){if(oh)return oh;var o,l=hg,d=l.length,g,v="value"in Rs?Rs.value:Rs.textContent,C=v.length;for(o=0;o<d&&l[o]===v[o];o++);var M=d-o;for(g=1;g<=M&&l[d-g]===v[C-g];g++);return oh=v.slice(o,1<g?1-g:void 0)}function sh(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function ah(){return!0}function Qw(){return!1}function Wr(o){function l(d,g,v,C,M){this._reactName=d,this._targetInst=v,this.type=g,this.nativeEvent=C,this.target=M,this.currentTarget=null;for(var z in o)o.hasOwnProperty(z)&&(d=o[z],this[z]=d?d(C):C[z]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?ah:Qw,this.isPropagationStopped=Qw,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=ah)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=ah)},persist:function(){},isPersistent:ah}),l}var za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lh=Wr(za),bu=p({},za,{view:0,detail:0}),f7=Wr(bu),pg,mg,vu,ch=p({},bu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yg,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!==vu&&(vu&&o.type==="mousemove"?(pg=o.screenX-vu.screenX,mg=o.screenY-vu.screenY):mg=pg=0,vu=o),pg)},movementY:function(o){return"movementY"in o?o.movementY:mg}}),Xw=Wr(ch),h7=p({},ch,{dataTransfer:0}),p7=Wr(h7),m7=p({},bu,{relatedTarget:0}),gg=Wr(m7),g7=p({},za,{animationName:0,elapsedTime:0,pseudoElement:0}),y7=Wr(g7),x7=p({},za,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),b7=Wr(x7),v7=p({},za,{data:0}),Zw=Wr(v7),w7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},S7={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"},C7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E7(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=C7[o])?!!l[o]:!1}function yg(){return E7}var k7=p({},bu,{key:function(o){if(o.key){var l=w7[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=sh(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?S7[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yg,charCode:function(o){return o.type==="keypress"?sh(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?sh(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),T7=Wr(k7),N7=p({},ch,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jw=Wr(N7),R7=p({},bu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yg}),A7=Wr(R7),j7=p({},za,{propertyName:0,elapsedTime:0,pseudoElement:0}),O7=Wr(j7),M7=p({},ch,{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}),D7=Wr(M7),_7=p({},za,{newState:0,oldState:0}),L7=Wr(_7),I7=[9,13,27,32],xg=Fo&&"CompositionEvent"in window,wu=null;Fo&&"documentMode"in document&&(wu=document.documentMode);var P7=Fo&&"TextEvent"in window&&!wu,e3=Fo&&(!xg||wu&&8<wu&&11>=wu),t3=" ",n3=!1;function r3(o,l){switch(o){case"keyup":return I7.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function i3(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Pl=!1;function z7(o,l){switch(o){case"compositionend":return i3(l);case"keypress":return l.which!==32?null:(n3=!0,t3);case"textInput":return o=l.data,o===t3&&n3?null:o;default:return null}}function F7(o,l){if(Pl)return o==="compositionend"||!xg&&r3(o,l)?(o=Kw(),oh=hg=Rs=null,Pl=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return e3&&l.locale!=="ko"?null:l.data;default:return null}}var B7={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 o3(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!B7[o.type]:l==="textarea"}function s3(o,l,d,g){Ll?Il?Il.push(g):Il=[g]:Ll=g,l=Zh(l,"onChange"),0<l.length&&(d=new lh("onChange","change",null,d,g),o.push({event:d,listeners:l}))}var Su=null,Cu=null;function H7(o){UC(o,0)}function uh(o){var l=fr(o);if(Hw(l))return o}function a3(o,l){if(o==="change")return l}var l3=!1;if(Fo){var bg;if(Fo){var vg="oninput"in document;if(!vg){var c3=document.createElement("div");c3.setAttribute("oninput","return;"),vg=typeof c3.oninput=="function"}bg=vg}else bg=!1;l3=bg&&(!document.documentMode||9<document.documentMode)}function u3(){Su&&(Su.detachEvent("onpropertychange",d3),Cu=Su=null)}function d3(o){if(o.propertyName==="value"&&uh(Cu)){var l=[];s3(l,Cu,o,ug(o)),Gw(H7,l)}}function U7(o,l,d){o==="focusin"?(u3(),Su=l,Cu=d,Su.attachEvent("onpropertychange",d3)):o==="focusout"&&u3()}function q7(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return uh(Cu)}function V7(o,l){if(o==="click")return uh(l)}function $7(o,l){if(o==="input"||o==="change")return uh(l)}function Y7(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var li=typeof Object.is=="function"?Object.is:Y7;function Eu(o,l){if(li(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),g=Object.keys(l);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var v=d[g];if(!pe.call(l,v)||!li(o[v],l[v]))return!1}return!0}function f3(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function h3(o,l){var d=f3(o);o=0;for(var g;d;){if(d.nodeType===3){if(g=o+d.textContent.length,o<=l&&g>=l)return{node:d,offset:l-o};o=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=f3(d)}}function p3(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?p3(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function m3(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=rh(o.document);l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=rh(o.document)}return l}function wg(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var W7=Fo&&"documentMode"in document&&11>=document.documentMode,zl=null,Sg=null,ku=null,Cg=!1;function g3(o,l,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Cg||zl==null||zl!==rh(g)||(g=zl,"selectionStart"in g&&wg(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),ku&&Eu(ku,g)||(ku=g,g=Zh(Sg,"onSelect"),0<g.length&&(l=new lh("onSelect","select",null,l,d),o.push({event:l,listeners:g}),l.target=zl)))}function Fa(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var Fl={animationend:Fa("Animation","AnimationEnd"),animationiteration:Fa("Animation","AnimationIteration"),animationstart:Fa("Animation","AnimationStart"),transitionrun:Fa("Transition","TransitionRun"),transitionstart:Fa("Transition","TransitionStart"),transitioncancel:Fa("Transition","TransitionCancel"),transitionend:Fa("Transition","TransitionEnd")},Eg={},y3={};Fo&&(y3=document.createElement("div").style,"AnimationEvent"in window||(delete Fl.animationend.animation,delete Fl.animationiteration.animation,delete Fl.animationstart.animation),"TransitionEvent"in window||delete Fl.transitionend.transition);function Ba(o){if(Eg[o])return Eg[o];if(!Fl[o])return o;var l=Fl[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in y3)return Eg[o]=l[d];return o}var x3=Ba("animationend"),b3=Ba("animationiteration"),v3=Ba("animationstart"),G7=Ba("transitionrun"),K7=Ba("transitionstart"),Q7=Ba("transitioncancel"),w3=Ba("transitionend"),S3=new Map,kg="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(" ");kg.push("scrollEnd");function to(o,l){S3.set(o,l),Ji(l,[o])}var dh=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=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(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Oi=[],Bl=0,Tg=0;function fh(){for(var o=Bl,l=Tg=Bl=0;l<o;){var d=Oi[l];Oi[l++]=null;var g=Oi[l];Oi[l++]=null;var v=Oi[l];Oi[l++]=null;var C=Oi[l];if(Oi[l++]=null,g!==null&&v!==null){var M=g.pending;M===null?v.next=v:(v.next=M.next,M.next=v),g.pending=v}C!==0&&C3(d,v,C)}}function hh(o,l,d,g){Oi[Bl++]=o,Oi[Bl++]=l,Oi[Bl++]=d,Oi[Bl++]=g,Tg|=g,o.lanes|=g,o=o.alternate,o!==null&&(o.lanes|=g)}function Ng(o,l,d,g){return hh(o,l,d,g),ph(o)}function Ha(o,l){return hh(o,null,null,l),ph(o)}function C3(o,l,d){o.lanes|=d;var g=o.alternate;g!==null&&(g.lanes|=d);for(var v=!1,C=o.return;C!==null;)C.childLanes|=d,g=C.alternate,g!==null&&(g.childLanes|=d),C.tag===22&&(o=C.stateNode,o===null||o._visibility&1||(v=!0)),o=C,C=C.return;return o.tag===3?(C=o.stateNode,v&&l!==null&&(v=31-nt(d),o=C.hiddenUpdates,g=o[v],g===null?o[v]=[l]:g.push(l),l.lane=d|536870912),C):null}function ph(o){if(50<Wu)throw Wu=0,I1=null,Error(r(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var Hl={};function X7(o,l,d,g){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ci(o,l,d,g){return new X7(o,l,d,g)}function Rg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Bo(o,l){var d=o.alternate;return d===null?(d=ci(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&65011712,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function E3(o,l){o.flags&=65011714;var d=o.alternate;return d===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=d.childLanes,o.lanes=d.lanes,o.child=d.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=d.memoizedProps,o.memoizedState=d.memoizedState,o.updateQueue=d.updateQueue,o.type=d.type,l=d.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function mh(o,l,d,g,v,C){var M=0;if(g=o,typeof o=="function")Rg(o)&&(M=1);else if(typeof o=="string")M=nD(o,d,Q.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case F:return o=ci(31,d,l,v),o.elementType=F,o.lanes=C,o;case w:return Ua(d.children,v,C,l);case E:M=8,v|=24;break;case k:return o=ci(12,d,l,v|2),o.elementType=k,o.lanes=C,o;case j:return o=ci(13,d,l,v),o.elementType=j,o.lanes=C,o;case A:return o=ci(19,d,l,v),o.elementType=A,o.lanes=C,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case N:M=10;break e;case T:M=9;break e;case O:M=11;break e;case R:M=14;break e;case _:M=16,g=null;break e}M=29,d=Error(r(130,o===null?"null":typeof o,"")),g=null}return l=ci(M,d,l,v),l.elementType=o,l.type=g,l.lanes=C,l}function Ua(o,l,d,g){return o=ci(7,o,g,l),o.lanes=d,o}function Ag(o,l,d){return o=ci(6,o,null,l),o.lanes=d,o}function k3(o){var l=ci(18,null,null,0);return l.stateNode=o,l}function jg(o,l,d){return l=ci(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var T3=new WeakMap;function Mi(o,l){if(typeof o=="object"&&o!==null){var d=T3.get(o);return d!==void 0?d:(l={value:o,source:l,stack:Ae(l)},T3.set(o,l),l)}return{value:o,source:l,stack:Ae(l)}}var Ul=[],ql=0,gh=null,Tu=0,Di=[],_i=0,As=null,po=1,mo="";function Ho(o,l){Ul[ql++]=Tu,Ul[ql++]=gh,gh=o,Tu=l}function N3(o,l,d){Di[_i++]=po,Di[_i++]=mo,Di[_i++]=As,As=o;var g=po;o=mo;var v=32-nt(g)-1;g&=~(1<<v),d+=1;var C=32-nt(l)+v;if(30<C){var M=v-v%5;C=(g&(1<<M)-1).toString(32),g>>=M,v-=M,po=1<<32-nt(l)+v|d<<v|g,mo=C+o}else po=1<<C|d<<v|g,mo=o}function Og(o){o.return!==null&&(Ho(o,1),N3(o,1,0))}function Mg(o){for(;o===gh;)gh=Ul[--ql],Ul[ql]=null,Tu=Ul[--ql],Ul[ql]=null;for(;o===As;)As=Di[--_i],Di[_i]=null,mo=Di[--_i],Di[_i]=null,po=Di[--_i],Di[_i]=null}function R3(o,l){Di[_i++]=po,Di[_i++]=mo,Di[_i++]=As,po=l.id,mo=l.overflow,As=o}var br=null,Tn=null,Kt=!1,js=null,Li=!1,Dg=Error(r(519));function Os(o){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Nu(Mi(l,o)),Dg}function A3(o){var l=o.stateNode,d=o.type,g=o.memoizedProps;switch(l[Xe]=o,l[et]=g,d){case"dialog":Bt("cancel",l),Bt("close",l);break;case"iframe":case"object":case"embed":Bt("load",l);break;case"video":case"audio":for(d=0;d<Ku.length;d++)Bt(Ku[d],l);break;case"source":Bt("error",l);break;case"img":case"image":case"link":Bt("error",l),Bt("load",l);break;case"details":Bt("toggle",l);break;case"input":Bt("invalid",l),Uw(l,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":Bt("invalid",l);break;case"textarea":Bt("invalid",l),Vw(l,g.value,g.defaultValue,g.children)}d=g.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||g.suppressHydrationWarning===!0||YC(l.textContent,d)?(g.popover!=null&&(Bt("beforetoggle",l),Bt("toggle",l)),g.onScroll!=null&&Bt("scroll",l),g.onScrollEnd!=null&&Bt("scrollend",l),g.onClick!=null&&(l.onclick=zo),l=!0):l=!1,l||Os(o,!0)}function j3(o){for(br=o.return;br;)switch(br.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:br=br.return}}function Vl(o){if(o!==br)return!1;if(!Kt)return j3(o),Kt=!0,!1;var l=o.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||X1(o.type,o.memoizedProps)),d=!d),d&&Tn&&Os(o),j3(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Tn=t5(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Tn=t5(o)}else l===27?(l=Tn,$s(o.type)?(o=n2,n2=null,Tn=o):Tn=l):Tn=br?Pi(o.stateNode.nextSibling):null;return!0}function qa(){Tn=br=null,Kt=!1}function _g(){var o=js;return o!==null&&(Xr===null?Xr=o:Xr.push.apply(Xr,o),js=null),o}function Nu(o){js===null?js=[o]:js.push(o)}var Lg=B(null),Va=null,Uo=null;function Ms(o,l,d){D(Lg,l._currentValue),l._currentValue=d}function qo(o){o._currentValue=Lg.current,W(Lg)}function Ig(o,l,d){for(;o!==null;){var g=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),o===d)break;o=o.return}}function Pg(o,l,d,g){var v=o.child;for(v!==null&&(v.return=o);v!==null;){var C=v.dependencies;if(C!==null){var M=v.child;C=C.firstContext;e:for(;C!==null;){var z=C;C=v;for(var Z=0;Z<l.length;Z++)if(z.context===l[Z]){C.lanes|=d,z=C.alternate,z!==null&&(z.lanes|=d),Ig(C.return,d,o),g||(M=null);break e}C=z.next}}else if(v.tag===18){if(M=v.return,M===null)throw Error(r(341));M.lanes|=d,C=M.alternate,C!==null&&(C.lanes|=d),Ig(M,d,o),M=null}else M=v.child;if(M!==null)M.return=v;else for(M=v;M!==null;){if(M===o){M=null;break}if(v=M.sibling,v!==null){v.return=M.return,M=v;break}M=M.return}v=M}}function $l(o,l,d,g){o=null;for(var v=l,C=!1;v!==null;){if(!C){if((v.flags&524288)!==0)C=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var M=v.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var z=v.type;li(v.pendingProps.value,M.value)||(o!==null?o.push(z):o=[z])}}else if(v===he.current){if(M=v.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(ed):o=[ed])}v=v.return}o!==null&&Pg(l,o,d,g),l.flags|=262144}function yh(o){for(o=o.firstContext;o!==null;){if(!li(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function $a(o){Va=o,Uo=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function vr(o){return O3(Va,o)}function xh(o,l){return Va===null&&$a(o),O3(o,l)}function O3(o,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Uo===null){if(o===null)throw Error(r(308));Uo=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else Uo=Uo.next=l;return d}var Z7=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(d,g){o.push(g)}};this.abort=function(){l.aborted=!0,o.forEach(function(d){return d()})}},J7=e.unstable_scheduleCallback,eM=e.unstable_NormalPriority,Xn={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zg(){return{controller:new Z7,data:new Map,refCount:0}}function Ru(o){o.refCount--,o.refCount===0&&J7(eM,function(){o.controller.abort()})}var Au=null,Fg=0,Yl=0,Wl=null;function tM(o,l){if(Au===null){var d=Au=[];Fg=0,Yl=U1(),Wl={status:"pending",value:void 0,then:function(g){d.push(g)}}}return Fg++,l.then(M3,M3),l}function M3(){if(--Fg===0&&Au!==null){Wl!==null&&(Wl.status="fulfilled");var o=Au;Au=null,Yl=0,Wl=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function nM(o,l){var d=[],g={status:"pending",value:null,reason:null,then:function(v){d.push(v)}};return o.then(function(){g.status="fulfilled",g.value=l;for(var v=0;v<d.length;v++)(0,d[v])(l)},function(v){for(g.status="rejected",g.reason=v,v=0;v<d.length;v++)(0,d[v])(void 0)}),g}var D3=P.S;P.S=function(o,l){gC=Ve(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&tM(o,l),D3!==null&&D3(o,l)};var Ya=B(null);function Bg(){var o=Ya.current;return o!==null?o:wn.pooledCache}function bh(o,l){l===null?D(Ya,Ya.current):D(Ya,l.pool)}function _3(){var o=Bg();return o===null?null:{parent:Xn._currentValue,pool:o}}var Gl=Error(r(460)),Hg=Error(r(474)),vh=Error(r(542)),wh={then:function(){}};function L3(o){return o=o.status,o==="fulfilled"||o==="rejected"}function I3(o,l,d){switch(d=o[d],d===void 0?o.push(l):d!==l&&(l.then(zo,zo),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,z3(o),o;default:if(typeof l.status=="string")l.then(zo,zo);else{if(o=wn,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=l,o.status="pending",o.then(function(g){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=g}},function(g){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=g}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,z3(o),o}throw Ga=l,Gl}}function Wa(o){try{var l=o._init;return l(o._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ga=d,Gl):d}}var Ga=null;function P3(){if(Ga===null)throw Error(r(459));var o=Ga;return Ga=null,o}function z3(o){if(o===Gl||o===vh)throw Error(r(483))}var Kl=null,ju=0;function Sh(o){var l=ju;return ju+=1,Kl===null&&(Kl=[]),I3(Kl,o,l)}function Ou(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Ch(o,l){throw l.$$typeof===y?Error(r(525)):(o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function F3(o){function l(ie,re){if(o){var ce=ie.deletions;ce===null?(ie.deletions=[re],ie.flags|=16):ce.push(re)}}function d(ie,re){if(!o)return null;for(;re!==null;)l(ie,re),re=re.sibling;return null}function g(ie){for(var re=new Map;ie!==null;)ie.key!==null?re.set(ie.key,ie):re.set(ie.index,ie),ie=ie.sibling;return re}function v(ie,re){return ie=Bo(ie,re),ie.index=0,ie.sibling=null,ie}function C(ie,re,ce){return ie.index=ce,o?(ce=ie.alternate,ce!==null?(ce=ce.index,ce<re?(ie.flags|=67108866,re):ce):(ie.flags|=67108866,re)):(ie.flags|=1048576,re)}function M(ie){return o&&ie.alternate===null&&(ie.flags|=67108866),ie}function z(ie,re,ce,ke){return re===null||re.tag!==6?(re=Ag(ce,ie.mode,ke),re.return=ie,re):(re=v(re,ce),re.return=ie,re)}function Z(ie,re,ce,ke){var gt=ce.type;return gt===w?ve(ie,re,ce.props.children,ke,ce.key):re!==null&&(re.elementType===gt||typeof gt=="object"&&gt!==null&&gt.$$typeof===_&&Wa(gt)===re.type)?(re=v(re,ce.props),Ou(re,ce),re.return=ie,re):(re=mh(ce.type,ce.key,ce.props,null,ie.mode,ke),Ou(re,ce),re.return=ie,re)}function ue(ie,re,ce,ke){return re===null||re.tag!==4||re.stateNode.containerInfo!==ce.containerInfo||re.stateNode.implementation!==ce.implementation?(re=jg(ce,ie.mode,ke),re.return=ie,re):(re=v(re,ce.children||[]),re.return=ie,re)}function ve(ie,re,ce,ke,gt){return re===null||re.tag!==7?(re=Ua(ce,ie.mode,ke,gt),re.return=ie,re):(re=v(re,ce),re.return=ie,re)}function Ne(ie,re,ce){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Ag(""+re,ie.mode,ce),re.return=ie,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case x:return ce=mh(re.type,re.key,re.props,null,ie.mode,ce),Ou(ce,re),ce.return=ie,ce;case b:return re=jg(re,ie.mode,ce),re.return=ie,re;case _:return re=Wa(re),Ne(ie,re,ce)}if(U(re)||q(re))return re=Ua(re,ie.mode,ce,null),re.return=ie,re;if(typeof re.then=="function")return Ne(ie,Sh(re),ce);if(re.$$typeof===N)return Ne(ie,xh(ie,re),ce);Ch(ie,re)}return null}function fe(ie,re,ce,ke){var gt=re!==null?re.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return gt!==null?null:z(ie,re,""+ce,ke);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case x:return ce.key===gt?Z(ie,re,ce,ke):null;case b:return ce.key===gt?ue(ie,re,ce,ke):null;case _:return ce=Wa(ce),fe(ie,re,ce,ke)}if(U(ce)||q(ce))return gt!==null?null:ve(ie,re,ce,ke,null);if(typeof ce.then=="function")return fe(ie,re,Sh(ce),ke);if(ce.$$typeof===N)return fe(ie,re,xh(ie,ce),ke);Ch(ie,ce)}return null}function me(ie,re,ce,ke,gt){if(typeof ke=="string"&&ke!==""||typeof ke=="number"||typeof ke=="bigint")return ie=ie.get(ce)||null,z(re,ie,""+ke,gt);if(typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case x:return ie=ie.get(ke.key===null?ce:ke.key)||null,Z(re,ie,ke,gt);case b:return ie=ie.get(ke.key===null?ce:ke.key)||null,ue(re,ie,ke,gt);case _:return ke=Wa(ke),me(ie,re,ce,ke,gt)}if(U(ke)||q(ke))return ie=ie.get(ce)||null,ve(re,ie,ke,gt,null);if(typeof ke.then=="function")return me(ie,re,ce,Sh(ke),gt);if(ke.$$typeof===N)return me(ie,re,ce,xh(re,ke),gt);Ch(re,ke)}return null}function rt(ie,re,ce,ke){for(var gt=null,rn=null,at=re,Mt=re=0,Vt=null;at!==null&&Mt<ce.length;Mt++){at.index>Mt?(Vt=at,at=null):Vt=at.sibling;var on=fe(ie,at,ce[Mt],ke);if(on===null){at===null&&(at=Vt);break}o&&at&&on.alternate===null&&l(ie,at),re=C(on,re,Mt),rn===null?gt=on:rn.sibling=on,rn=on,at=Vt}if(Mt===ce.length)return d(ie,at),Kt&&Ho(ie,Mt),gt;if(at===null){for(;Mt<ce.length;Mt++)at=Ne(ie,ce[Mt],ke),at!==null&&(re=C(at,re,Mt),rn===null?gt=at:rn.sibling=at,rn=at);return Kt&&Ho(ie,Mt),gt}for(at=g(at);Mt<ce.length;Mt++)Vt=me(at,ie,Mt,ce[Mt],ke),Vt!==null&&(o&&Vt.alternate!==null&&at.delete(Vt.key===null?Mt:Vt.key),re=C(Vt,re,Mt),rn===null?gt=Vt:rn.sibling=Vt,rn=Vt);return o&&at.forEach(function(Qs){return l(ie,Qs)}),Kt&&Ho(ie,Mt),gt}function wt(ie,re,ce,ke){if(ce==null)throw Error(r(151));for(var gt=null,rn=null,at=re,Mt=re=0,Vt=null,on=ce.next();at!==null&&!on.done;Mt++,on=ce.next()){at.index>Mt?(Vt=at,at=null):Vt=at.sibling;var Qs=fe(ie,at,on.value,ke);if(Qs===null){at===null&&(at=Vt);break}o&&at&&Qs.alternate===null&&l(ie,at),re=C(Qs,re,Mt),rn===null?gt=Qs:rn.sibling=Qs,rn=Qs,at=Vt}if(on.done)return d(ie,at),Kt&&Ho(ie,Mt),gt;if(at===null){for(;!on.done;Mt++,on=ce.next())on=Ne(ie,on.value,ke),on!==null&&(re=C(on,re,Mt),rn===null?gt=on:rn.sibling=on,rn=on);return Kt&&Ho(ie,Mt),gt}for(at=g(at);!on.done;Mt++,on=ce.next())on=me(at,ie,Mt,on.value,ke),on!==null&&(o&&on.alternate!==null&&at.delete(on.key===null?Mt:on.key),re=C(on,re,Mt),rn===null?gt=on:rn.sibling=on,rn=on);return o&&at.forEach(function(hD){return l(ie,hD)}),Kt&&Ho(ie,Mt),gt}function xn(ie,re,ce,ke){if(typeof ce=="object"&&ce!==null&&ce.type===w&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case x:e:{for(var gt=ce.key;re!==null;){if(re.key===gt){if(gt=ce.type,gt===w){if(re.tag===7){d(ie,re.sibling),ke=v(re,ce.props.children),ke.return=ie,ie=ke;break e}}else if(re.elementType===gt||typeof gt=="object"&&gt!==null&&gt.$$typeof===_&&Wa(gt)===re.type){d(ie,re.sibling),ke=v(re,ce.props),Ou(ke,ce),ke.return=ie,ie=ke;break e}d(ie,re);break}else l(ie,re);re=re.sibling}ce.type===w?(ke=Ua(ce.props.children,ie.mode,ke,ce.key),ke.return=ie,ie=ke):(ke=mh(ce.type,ce.key,ce.props,null,ie.mode,ke),Ou(ke,ce),ke.return=ie,ie=ke)}return M(ie);case b:e:{for(gt=ce.key;re!==null;){if(re.key===gt)if(re.tag===4&&re.stateNode.containerInfo===ce.containerInfo&&re.stateNode.implementation===ce.implementation){d(ie,re.sibling),ke=v(re,ce.children||[]),ke.return=ie,ie=ke;break e}else{d(ie,re);break}else l(ie,re);re=re.sibling}ke=jg(ce,ie.mode,ke),ke.return=ie,ie=ke}return M(ie);case _:return ce=Wa(ce),xn(ie,re,ce,ke)}if(U(ce))return rt(ie,re,ce,ke);if(q(ce)){if(gt=q(ce),typeof gt!="function")throw Error(r(150));return ce=gt.call(ce),wt(ie,re,ce,ke)}if(typeof ce.then=="function")return xn(ie,re,Sh(ce),ke);if(ce.$$typeof===N)return xn(ie,re,xh(ie,ce),ke);Ch(ie,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,re!==null&&re.tag===6?(d(ie,re.sibling),ke=v(re,ce),ke.return=ie,ie=ke):(d(ie,re),ke=Ag(ce,ie.mode,ke),ke.return=ie,ie=ke),M(ie)):d(ie,re)}return function(ie,re,ce,ke){try{ju=0;var gt=xn(ie,re,ce,ke);return Kl=null,gt}catch(at){if(at===Gl||at===vh)throw at;var rn=ci(29,at,null,ie.mode);return rn.lanes=ke,rn.return=ie,rn}}}var Ka=F3(!0),B3=F3(!1),Ds=!1;function Ug(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qg(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function _s(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ls(o,l,d){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(an&2)!==0){var v=g.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),g.pending=l,l=ph(o),C3(o,null,d),l}return hh(o,g,l,d),ph(o)}function Mu(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var g=l.lanes;g&=o.pendingLanes,d|=g,l.lanes=d,K(o,d)}}function Vg(o,l){var d=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var v=null,C=null;if(d=d.firstBaseUpdate,d!==null){do{var M={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};C===null?v=C=M:C=C.next=M,d=d.next}while(d!==null);C===null?v=C=l:C=C.next=l}else v=C=l;d={baseState:g.baseState,firstBaseUpdate:v,lastBaseUpdate:C,shared:g.shared,callbacks:g.callbacks},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}var $g=!1;function Du(){if($g){var o=Wl;if(o!==null)throw o}}function _u(o,l,d,g){$g=!1;var v=o.updateQueue;Ds=!1;var C=v.firstBaseUpdate,M=v.lastBaseUpdate,z=v.shared.pending;if(z!==null){v.shared.pending=null;var Z=z,ue=Z.next;Z.next=null,M===null?C=ue:M.next=ue,M=Z;var ve=o.alternate;ve!==null&&(ve=ve.updateQueue,z=ve.lastBaseUpdate,z!==M&&(z===null?ve.firstBaseUpdate=ue:z.next=ue,ve.lastBaseUpdate=Z))}if(C!==null){var Ne=v.baseState;M=0,ve=ue=Z=null,z=C;do{var fe=z.lane&-536870913,me=fe!==z.lane;if(me?(qt&fe)===fe:(g&fe)===fe){fe!==0&&fe===Yl&&($g=!0),ve!==null&&(ve=ve.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var rt=o,wt=z;fe=l;var xn=d;switch(wt.tag){case 1:if(rt=wt.payload,typeof rt=="function"){Ne=rt.call(xn,Ne,fe);break e}Ne=rt;break e;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=wt.payload,fe=typeof rt=="function"?rt.call(xn,Ne,fe):rt,fe==null)break e;Ne=p({},Ne,fe);break e;case 2:Ds=!0}}fe=z.callback,fe!==null&&(o.flags|=64,me&&(o.flags|=8192),me=v.callbacks,me===null?v.callbacks=[fe]:me.push(fe))}else me={lane:fe,tag:z.tag,payload:z.payload,callback:z.callback,next:null},ve===null?(ue=ve=me,Z=Ne):ve=ve.next=me,M|=fe;if(z=z.next,z===null){if(z=v.shared.pending,z===null)break;me=z,z=me.next,me.next=null,v.lastBaseUpdate=me,v.shared.pending=null}}while(!0);ve===null&&(Z=Ne),v.baseState=Z,v.firstBaseUpdate=ue,v.lastBaseUpdate=ve,C===null&&(v.shared.lanes=0),Bs|=M,o.lanes=M,o.memoizedState=Ne}}function H3(o,l){if(typeof o!="function")throw Error(r(191,o));o.call(l)}function U3(o,l){var d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)H3(d[o],l)}var Ql=B(null),Eh=B(0);function q3(o,l){o=Zo,D(Eh,o),D(Ql,l),Zo=o|l.baseLanes}function Yg(){D(Eh,Zo),D(Ql,Ql.current)}function Wg(){Zo=Eh.current,W(Ql),W(Eh)}var ui=B(null),Ii=null;function Is(o){var l=o.alternate;D(Wn,Wn.current&1),D(ui,o),Ii===null&&(l===null||Ql.current!==null||l.memoizedState!==null)&&(Ii=o)}function Gg(o){D(Wn,Wn.current),D(ui,o),Ii===null&&(Ii=o)}function V3(o){o.tag===22?(D(Wn,Wn.current),D(ui,o),Ii===null&&(Ii=o)):Ps()}function Ps(){D(Wn,Wn.current),D(ui,ui.current)}function di(o){W(ui),Ii===o&&(Ii=null),W(Wn)}var Wn=B(0);function kh(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||e2(d)||t2(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Vo=0,jt=null,gn=null,Zn=null,Th=!1,Xl=!1,Qa=!1,Nh=0,Lu=0,Zl=null,rM=0;function Pn(){throw Error(r(321))}function Kg(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!li(o[d],l[d]))return!1;return!0}function Qg(o,l,d,g,v,C){return Vo=C,jt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,P.H=o===null||o.memoizedState===null?NS:d1,Qa=!1,C=d(g,v),Qa=!1,Xl&&(C=Y3(l,d,g,v)),$3(o),C}function $3(o){P.H=zu;var l=gn!==null&&gn.next!==null;if(Vo=0,Zn=gn=jt=null,Th=!1,Lu=0,Zl=null,l)throw Error(r(300));o===null||Jn||(o=o.dependencies,o!==null&&yh(o)&&(Jn=!0))}function Y3(o,l,d,g){jt=o;var v=0;do{if(Xl&&(Zl=null),Lu=0,Xl=!1,25<=v)throw Error(r(301));if(v+=1,Zn=gn=null,o.updateQueue!=null){var C=o.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}P.H=RS,C=l(d,g)}while(Xl);return C}function iM(){var o=P.H,l=o.useState()[0];return l=typeof l.then=="function"?Iu(l):l,o=o.useState()[0],(gn!==null?gn.memoizedState:null)!==o&&(jt.flags|=1024),l}function Xg(){var o=Nh!==0;return Nh=0,o}function Zg(o,l,d){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~d}function Jg(o){if(Th){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}Th=!1}Vo=0,Zn=gn=jt=null,Xl=!1,Lu=Nh=0,Zl=null}function _r(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zn===null?jt.memoizedState=Zn=o:Zn=Zn.next=o,Zn}function Gn(){if(gn===null){var o=jt.alternate;o=o!==null?o.memoizedState:null}else o=gn.next;var l=Zn===null?jt.memoizedState:Zn.next;if(l!==null)Zn=l,gn=o;else{if(o===null)throw jt.alternate===null?Error(r(467)):Error(r(310));gn=o,o={memoizedState:gn.memoizedState,baseState:gn.baseState,baseQueue:gn.baseQueue,queue:gn.queue,next:null},Zn===null?jt.memoizedState=Zn=o:Zn=Zn.next=o}return Zn}function Rh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Iu(o){var l=Lu;return Lu+=1,Zl===null&&(Zl=[]),o=I3(Zl,o,l),l=jt,(Zn===null?l.memoizedState:Zn.next)===null&&(l=l.alternate,P.H=l===null||l.memoizedState===null?NS:d1),o}function Ah(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Iu(o);if(o.$$typeof===N)return vr(o)}throw Error(r(438,String(o)))}function e1(o){var l=null,d=jt.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var g=jt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(l={data:g.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Rh(),jt.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(o),g=0;g<o;g++)d[g]=I;return l.index++,d}function $o(o,l){return typeof l=="function"?l(o):l}function jh(o){var l=Gn();return t1(l,gn,o)}function t1(o,l,d){var g=o.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=d;var v=o.baseQueue,C=g.pending;if(C!==null){if(v!==null){var M=v.next;v.next=C.next,C.next=M}l.baseQueue=v=C,g.pending=null}if(C=o.baseState,v===null)o.memoizedState=C;else{l=v.next;var z=M=null,Z=null,ue=l,ve=!1;do{var Ne=ue.lane&-536870913;if(Ne!==ue.lane?(qt&Ne)===Ne:(Vo&Ne)===Ne){var fe=ue.revertLane;if(fe===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),Ne===Yl&&(ve=!0);else if((Vo&fe)===fe){ue=ue.next,fe===Yl&&(ve=!0);continue}else Ne={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Z===null?(z=Z=Ne,M=C):Z=Z.next=Ne,jt.lanes|=fe,Bs|=fe;Ne=ue.action,Qa&&d(C,Ne),C=ue.hasEagerState?ue.eagerState:d(C,Ne)}else fe={lane:Ne,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Z===null?(z=Z=fe,M=C):Z=Z.next=fe,jt.lanes|=Ne,Bs|=Ne;ue=ue.next}while(ue!==null&&ue!==l);if(Z===null?M=C:Z.next=z,!li(C,o.memoizedState)&&(Jn=!0,ve&&(d=Wl,d!==null)))throw d;o.memoizedState=C,o.baseState=M,o.baseQueue=Z,g.lastRenderedState=C}return v===null&&(g.lanes=0),[o.memoizedState,g.dispatch]}function n1(o){var l=Gn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var g=d.dispatch,v=d.pending,C=l.memoizedState;if(v!==null){d.pending=null;var M=v=v.next;do C=o(C,M.action),M=M.next;while(M!==v);li(C,l.memoizedState)||(Jn=!0),l.memoizedState=C,l.baseQueue===null&&(l.baseState=C),d.lastRenderedState=C}return[C,g]}function W3(o,l,d){var g=jt,v=Gn(),C=Kt;if(C){if(d===void 0)throw Error(r(407));d=d()}else d=l();var M=!li((gn||v).memoizedState,d);if(M&&(v.memoizedState=d,Jn=!0),v=v.queue,o1(Q3.bind(null,g,v,o),[o]),v.getSnapshot!==l||M||Zn!==null&&Zn.memoizedState.tag&1){if(g.flags|=2048,Jl(9,{destroy:void 0},K3.bind(null,g,v,d,l),null),wn===null)throw Error(r(349));C||(Vo&127)!==0||G3(g,l,d)}return d}function G3(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=jt.updateQueue,l===null?(l=Rh(),jt.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function K3(o,l,d,g){l.value=d,l.getSnapshot=g,X3(l)&&Z3(o)}function Q3(o,l,d){return d(function(){X3(l)&&Z3(o)})}function X3(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!li(o,d)}catch{return!0}}function Z3(o){var l=Ha(o,2);l!==null&&Zr(l,o,2)}function r1(o){var l=_r();if(typeof o=="function"){var d=o;if(o=d(),Qa){bt(!0);try{d()}finally{bt(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:o},l}function J3(o,l,d,g){return o.baseState=d,t1(o,gn,typeof g=="function"?g:$o)}function oM(o,l,d,g,v){if(Dh(o))throw Error(r(485));if(o=l.action,o!==null){var C={payload:v,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){C.listeners.push(M)}};P.T!==null?d(!0):C.isTransition=!1,g(C),d=l.pending,d===null?(C.next=l.pending=C,eS(l,C)):(C.next=d.next,l.pending=d.next=C)}}function eS(o,l){var d=l.action,g=l.payload,v=o.state;if(l.isTransition){var C=P.T,M={};P.T=M;try{var z=d(v,g),Z=P.S;Z!==null&&Z(M,z),tS(o,l,z)}catch(ue){i1(o,l,ue)}finally{C!==null&&M.types!==null&&(C.types=M.types),P.T=C}}else try{C=d(v,g),tS(o,l,C)}catch(ue){i1(o,l,ue)}}function tS(o,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(g){nS(o,l,g)},function(g){return i1(o,l,g)}):nS(o,l,d)}function nS(o,l,d){l.status="fulfilled",l.value=d,rS(l),o.state=d,l=o.pending,l!==null&&(d=l.next,d===l?o.pending=null:(d=d.next,l.next=d,eS(o,d)))}function i1(o,l,d){var g=o.pending;if(o.pending=null,g!==null){g=g.next;do l.status="rejected",l.reason=d,rS(l),l=l.next;while(l!==g)}o.action=null}function rS(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function iS(o,l){return l}function oS(o,l){if(Kt){var d=wn.formState;if(d!==null){e:{var g=jt;if(Kt){if(Tn){t:{for(var v=Tn,C=Li;v.nodeType!==8;){if(!C){v=null;break t}if(v=Pi(v.nextSibling),v===null){v=null;break t}}C=v.data,v=C==="F!"||C==="F"?v:null}if(v){Tn=Pi(v.nextSibling),g=v.data==="F!";break e}}Os(g)}g=!1}g&&(l=d[0])}}return d=_r(),d.memoizedState=d.baseState=l,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:iS,lastRenderedState:l},d.queue=g,d=ES.bind(null,jt,g),g.dispatch=d,g=r1(!1),C=u1.bind(null,jt,!1,g.queue),g=_r(),v={state:l,dispatch:null,action:o,pending:null},g.queue=v,d=oM.bind(null,jt,v,C,d),v.dispatch=d,g.memoizedState=o,[l,d,!1]}function sS(o){var l=Gn();return aS(l,gn,o)}function aS(o,l,d){if(l=t1(o,l,iS)[0],o=jh($o)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var g=Iu(l)}catch(M){throw M===Gl?vh:M}else g=l;l=Gn();var v=l.queue,C=v.dispatch;return d!==l.memoizedState&&(jt.flags|=2048,Jl(9,{destroy:void 0},sM.bind(null,v,d),null)),[g,C,o]}function sM(o,l){o.action=l}function lS(o){var l=Gn(),d=gn;if(d!==null)return aS(l,d,o);Gn(),l=l.memoizedState,d=Gn();var g=d.queue.dispatch;return d.memoizedState=o,[l,g,!1]}function Jl(o,l,d,g){return o={tag:o,create:d,deps:g,inst:l,next:null},l=jt.updateQueue,l===null&&(l=Rh(),jt.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=o.next=o:(g=d.next,d.next=o,o.next=g,l.lastEffect=o),o}function cS(){return Gn().memoizedState}function Oh(o,l,d,g){var v=_r();jt.flags|=o,v.memoizedState=Jl(1|l,{destroy:void 0},d,g===void 0?null:g)}function Mh(o,l,d,g){var v=Gn();g=g===void 0?null:g;var C=v.memoizedState.inst;gn!==null&&g!==null&&Kg(g,gn.memoizedState.deps)?v.memoizedState=Jl(l,C,d,g):(jt.flags|=o,v.memoizedState=Jl(1|l,C,d,g))}function uS(o,l){Oh(8390656,8,o,l)}function o1(o,l){Mh(2048,8,o,l)}function aM(o){jt.flags|=4;var l=jt.updateQueue;if(l===null)l=Rh(),jt.updateQueue=l,l.events=[o];else{var d=l.events;d===null?l.events=[o]:d.push(o)}}function dS(o){var l=Gn().memoizedState;return aM({ref:l,nextImpl:o}),function(){if((an&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function fS(o,l){return Mh(4,2,o,l)}function hS(o,l){return Mh(4,4,o,l)}function pS(o,l){if(typeof l=="function"){o=o();var d=l(o);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function mS(o,l,d){d=d!=null?d.concat([o]):null,Mh(4,4,pS.bind(null,l,o),d)}function s1(){}function gS(o,l){var d=Gn();l=l===void 0?null:l;var g=d.memoizedState;return l!==null&&Kg(l,g[1])?g[0]:(d.memoizedState=[o,l],o)}function yS(o,l){var d=Gn();l=l===void 0?null:l;var g=d.memoizedState;if(l!==null&&Kg(l,g[1]))return g[0];if(g=o(),Qa){bt(!0);try{o()}finally{bt(!1)}}return d.memoizedState=[g,l],g}function a1(o,l,d){return d===void 0||(Vo&1073741824)!==0&&(qt&261930)===0?o.memoizedState=l:(o.memoizedState=d,o=xC(),jt.lanes|=o,Bs|=o,d)}function xS(o,l,d,g){return li(d,l)?d:Ql.current!==null?(o=a1(o,d,g),li(o,l)||(Jn=!0),o):(Vo&42)===0||(Vo&1073741824)!==0&&(qt&261930)===0?(Jn=!0,o.memoizedState=d):(o=xC(),jt.lanes|=o,Bs|=o,l)}function bS(o,l,d,g,v){var C=Y.p;Y.p=C!==0&&8>C?C:8;var M=P.T,z={};P.T=z,u1(o,!1,l,d);try{var Z=v(),ue=P.S;if(ue!==null&&ue(z,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var ve=nM(Z,g);Pu(o,l,ve,pi(o))}else Pu(o,l,g,pi(o))}catch(Ne){Pu(o,l,{then:function(){},status:"rejected",reason:Ne},pi())}finally{Y.p=C,M!==null&&z.types!==null&&(M.types=z.types),P.T=M}}function lM(){}function l1(o,l,d,g){if(o.tag!==5)throw Error(r(476));var v=vS(o).queue;bS(o,v,l,G,d===null?lM:function(){return wS(o),d(g)})}function vS(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:G},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:d},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function wS(o){var l=vS(o);l.next===null&&(l=o.alternate.memoizedState),Pu(o,l.next.queue,{},pi())}function c1(){return vr(ed)}function SS(){return Gn().memoizedState}function CS(){return Gn().memoizedState}function cM(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var d=pi();o=_s(d);var g=Ls(l,o,d);g!==null&&(Zr(g,l,d),Mu(g,l,d)),l={cache:zg()},o.payload=l;return}l=l.return}}function uM(o,l,d){var g=pi();d={lane:g,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Dh(o)?kS(l,d):(d=Ng(o,l,d,g),d!==null&&(Zr(d,o,g),TS(d,l,g)))}function ES(o,l,d){var g=pi();Pu(o,l,d,g)}function Pu(o,l,d,g){var v={lane:g,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Dh(o))kS(l,v);else{var C=o.alternate;if(o.lanes===0&&(C===null||C.lanes===0)&&(C=l.lastRenderedReducer,C!==null))try{var M=l.lastRenderedState,z=C(M,d);if(v.hasEagerState=!0,v.eagerState=z,li(z,M))return hh(o,l,v,0),wn===null&&fh(),!1}catch{}if(d=Ng(o,l,v,g),d!==null)return Zr(d,o,g),TS(d,l,g),!0}return!1}function u1(o,l,d,g){if(g={lane:2,revertLane:U1(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Dh(o)){if(l)throw Error(r(479))}else l=Ng(o,d,g,2),l!==null&&Zr(l,o,2)}function Dh(o){var l=o.alternate;return o===jt||l!==null&&l===jt}function kS(o,l){Xl=Th=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function TS(o,l,d){if((d&4194048)!==0){var g=l.lanes;g&=o.pendingLanes,d|=g,l.lanes=d,K(o,d)}}var zu={readContext:vr,use:Ah,useCallback:Pn,useContext:Pn,useEffect:Pn,useImperativeHandle:Pn,useLayoutEffect:Pn,useInsertionEffect:Pn,useMemo:Pn,useReducer:Pn,useRef:Pn,useState:Pn,useDebugValue:Pn,useDeferredValue:Pn,useTransition:Pn,useSyncExternalStore:Pn,useId:Pn,useHostTransitionStatus:Pn,useFormState:Pn,useActionState:Pn,useOptimistic:Pn,useMemoCache:Pn,useCacheRefresh:Pn};zu.useEffectEvent=Pn;var NS={readContext:vr,use:Ah,useCallback:function(o,l){return _r().memoizedState=[o,l===void 0?null:l],o},useContext:vr,useEffect:uS,useImperativeHandle:function(o,l,d){d=d!=null?d.concat([o]):null,Oh(4194308,4,pS.bind(null,l,o),d)},useLayoutEffect:function(o,l){return Oh(4194308,4,o,l)},useInsertionEffect:function(o,l){Oh(4,2,o,l)},useMemo:function(o,l){var d=_r();l=l===void 0?null:l;var g=o();if(Qa){bt(!0);try{o()}finally{bt(!1)}}return d.memoizedState=[g,l],g},useReducer:function(o,l,d){var g=_r();if(d!==void 0){var v=d(l);if(Qa){bt(!0);try{d(l)}finally{bt(!1)}}}else v=l;return g.memoizedState=g.baseState=v,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:v},g.queue=o,o=o.dispatch=uM.bind(null,jt,o),[g.memoizedState,o]},useRef:function(o){var l=_r();return o={current:o},l.memoizedState=o},useState:function(o){o=r1(o);var l=o.queue,d=ES.bind(null,jt,l);return l.dispatch=d,[o.memoizedState,d]},useDebugValue:s1,useDeferredValue:function(o,l){var d=_r();return a1(d,o,l)},useTransition:function(){var o=r1(!1);return o=bS.bind(null,jt,o.queue,!0,!1),_r().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,d){var g=jt,v=_r();if(Kt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),wn===null)throw Error(r(349));(qt&127)!==0||G3(g,l,d)}v.memoizedState=d;var C={value:d,getSnapshot:l};return v.queue=C,uS(Q3.bind(null,g,C,o),[o]),g.flags|=2048,Jl(9,{destroy:void 0},K3.bind(null,g,C,d,l),null),d},useId:function(){var o=_r(),l=wn.identifierPrefix;if(Kt){var d=mo,g=po;d=(g&~(1<<32-nt(g)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Nh++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=rM++,l="_"+l+"r_"+d.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:c1,useFormState:oS,useActionState:oS,useOptimistic:function(o){var l=_r();l.memoizedState=l.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=u1.bind(null,jt,!0,d),d.dispatch=l,[o,l]},useMemoCache:e1,useCacheRefresh:function(){return _r().memoizedState=cM.bind(null,jt)},useEffectEvent:function(o){var l=_r(),d={impl:o};return l.memoizedState=d,function(){if((an&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},d1={readContext:vr,use:Ah,useCallback:gS,useContext:vr,useEffect:o1,useImperativeHandle:mS,useInsertionEffect:fS,useLayoutEffect:hS,useMemo:yS,useReducer:jh,useRef:cS,useState:function(){return jh($o)},useDebugValue:s1,useDeferredValue:function(o,l){var d=Gn();return xS(d,gn.memoizedState,o,l)},useTransition:function(){var o=jh($o)[0],l=Gn().memoizedState;return[typeof o=="boolean"?o:Iu(o),l]},useSyncExternalStore:W3,useId:SS,useHostTransitionStatus:c1,useFormState:sS,useActionState:sS,useOptimistic:function(o,l){var d=Gn();return J3(d,gn,o,l)},useMemoCache:e1,useCacheRefresh:CS};d1.useEffectEvent=dS;var RS={readContext:vr,use:Ah,useCallback:gS,useContext:vr,useEffect:o1,useImperativeHandle:mS,useInsertionEffect:fS,useLayoutEffect:hS,useMemo:yS,useReducer:n1,useRef:cS,useState:function(){return n1($o)},useDebugValue:s1,useDeferredValue:function(o,l){var d=Gn();return gn===null?a1(d,o,l):xS(d,gn.memoizedState,o,l)},useTransition:function(){var o=n1($o)[0],l=Gn().memoizedState;return[typeof o=="boolean"?o:Iu(o),l]},useSyncExternalStore:W3,useId:SS,useHostTransitionStatus:c1,useFormState:lS,useActionState:lS,useOptimistic:function(o,l){var d=Gn();return gn!==null?J3(d,gn,o,l):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:e1,useCacheRefresh:CS};RS.useEffectEvent=dS;function f1(o,l,d,g){l=o.memoizedState,d=d(g,l),d=d==null?l:p({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var h1={enqueueSetState:function(o,l,d){o=o._reactInternals;var g=pi(),v=_s(g);v.payload=l,d!=null&&(v.callback=d),l=Ls(o,v,g),l!==null&&(Zr(l,o,g),Mu(l,o,g))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var g=pi(),v=_s(g);v.tag=1,v.payload=l,d!=null&&(v.callback=d),l=Ls(o,v,g),l!==null&&(Zr(l,o,g),Mu(l,o,g))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=pi(),g=_s(d);g.tag=2,l!=null&&(g.callback=l),l=Ls(o,g,d),l!==null&&(Zr(l,o,d),Mu(l,o,d))}};function AS(o,l,d,g,v,C,M){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,C,M):l.prototype&&l.prototype.isPureReactComponent?!Eu(d,g)||!Eu(v,C):!0}function jS(o,l,d,g){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,g),l.state!==o&&h1.enqueueReplaceState(l,l.state,null)}function Xa(o,l){var d=l;if("ref"in l){d={};for(var g in l)g!=="ref"&&(d[g]=l[g])}if(o=o.defaultProps){d===l&&(d=p({},d));for(var v in o)d[v]===void 0&&(d[v]=o[v])}return d}function OS(o){dh(o)}function MS(o){console.error(o)}function DS(o){dh(o)}function _h(o,l){try{var d=o.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(g){setTimeout(function(){throw g})}}function _S(o,l,d){try{var g=o.onCaughtError;g(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function p1(o,l,d){return d=_s(d),d.tag=3,d.payload={element:null},d.callback=function(){_h(o,l)},d}function LS(o){return o=_s(o),o.tag=3,o}function IS(o,l,d,g){var v=d.type.getDerivedStateFromError;if(typeof v=="function"){var C=g.value;o.payload=function(){return v(C)},o.callback=function(){_S(l,d,g)}}var M=d.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(o.callback=function(){_S(l,d,g),typeof v!="function"&&(Hs===null?Hs=new Set([this]):Hs.add(this));var z=g.stack;this.componentDidCatch(g.value,{componentStack:z!==null?z:""})})}function dM(o,l,d,g,v){if(d.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(l=d.alternate,l!==null&&$l(l,d,v,!0),d=ui.current,d!==null){switch(d.tag){case 31:case 13:return Ii===null?Yh():d.alternate===null&&zn===0&&(zn=3),d.flags&=-257,d.flags|=65536,d.lanes=v,g===wh?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([g]):l.add(g),F1(o,g,v)),!1;case 22:return d.flags|=65536,g===wh?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([g])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([g]):d.add(g)),F1(o,g,v)),!1}throw Error(r(435,d.tag))}return F1(o,g,v),Yh(),!1}if(Kt)return l=ui.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,g!==Dg&&(o=Error(r(422),{cause:g}),Nu(Mi(o,d)))):(g!==Dg&&(l=Error(r(423),{cause:g}),Nu(Mi(l,d))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,g=Mi(g,d),v=p1(o.stateNode,g,v),Vg(o,v),zn!==4&&(zn=2)),!1;var C=Error(r(520),{cause:g});if(C=Mi(C,d),Yu===null?Yu=[C]:Yu.push(C),zn!==4&&(zn=2),l===null)return!0;g=Mi(g,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,o=v&-v,d.lanes|=o,o=p1(d.stateNode,g,o),Vg(d,o),!1;case 1:if(l=d.type,C=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Hs===null||!Hs.has(C))))return d.flags|=65536,v&=-v,d.lanes|=v,v=LS(v),IS(v,o,d,g),Vg(d,v),!1}d=d.return}while(d!==null);return!1}var m1=Error(r(461)),Jn=!1;function wr(o,l,d,g){l.child=o===null?B3(l,null,d,g):Ka(l,o.child,d,g)}function PS(o,l,d,g,v){d=d.render;var C=l.ref;if("ref"in g){var M={};for(var z in g)z!=="ref"&&(M[z]=g[z])}else M=g;return $a(l),g=Qg(o,l,d,M,C,v),z=Xg(),o!==null&&!Jn?(Zg(o,l,v),Yo(o,l,v)):(Kt&&z&&Og(l),l.flags|=1,wr(o,l,g,v),l.child)}function zS(o,l,d,g,v){if(o===null){var C=d.type;return typeof C=="function"&&!Rg(C)&&C.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=C,FS(o,l,C,g,v)):(o=mh(d.type,null,g,l,l.mode,v),o.ref=l.ref,o.return=l,l.child=o)}if(C=o.child,!C1(o,v)){var M=C.memoizedProps;if(d=d.compare,d=d!==null?d:Eu,d(M,g)&&o.ref===l.ref)return Yo(o,l,v)}return l.flags|=1,o=Bo(C,g),o.ref=l.ref,o.return=l,l.child=o}function FS(o,l,d,g,v){if(o!==null){var C=o.memoizedProps;if(Eu(C,g)&&o.ref===l.ref)if(Jn=!1,l.pendingProps=g=C,C1(o,v))(o.flags&131072)!==0&&(Jn=!0);else return l.lanes=o.lanes,Yo(o,l,v)}return g1(o,l,d,g,v)}function BS(o,l,d,g){var v=g.children,C=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((l.flags&128)!==0){if(C=C!==null?C.baseLanes|d:d,o!==null){for(g=l.child=o.child,v=0;g!==null;)v=v|g.lanes|g.childLanes,g=g.sibling;g=v&~C}else g=0,l.child=null;return HS(o,l,C,d,g)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&bh(l,C!==null?C.cachePool:null),C!==null?q3(l,C):Yg(),V3(l);else return g=l.lanes=536870912,HS(o,l,C!==null?C.baseLanes|d:d,d,g)}else C!==null?(bh(l,C.cachePool),q3(l,C),Ps(),l.memoizedState=null):(o!==null&&bh(l,null),Yg(),Ps());return wr(o,l,v,d),l.child}function Fu(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function HS(o,l,d,g,v){var C=Bg();return C=C===null?null:{parent:Xn._currentValue,pool:C},l.memoizedState={baseLanes:d,cachePool:C},o!==null&&bh(l,null),Yg(),V3(l),o!==null&&$l(o,l,g,!0),l.childLanes=v,null}function Lh(o,l){return l=Ph({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function US(o,l,d){return Ka(l,o.child,null,d),o=Lh(l,l.pendingProps),o.flags|=2,di(l),l.memoizedState=null,o}function fM(o,l,d){var g=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(Kt){if(g.mode==="hidden")return o=Lh(l,g),l.lanes=536870912,Fu(null,o);if(Gg(l),(o=Tn)?(o=e5(o,Li),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:As!==null?{id:po,overflow:mo}:null,retryLane:536870912,hydrationErrors:null},d=k3(o),d.return=l,l.child=d,br=l,Tn=null)):o=null,o===null)throw Os(l);return l.lanes=536870912,null}return Lh(l,g)}var C=o.memoizedState;if(C!==null){var M=C.dehydrated;if(Gg(l),v)if(l.flags&256)l.flags&=-257,l=US(o,l,d);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(r(558));else if(Jn||$l(o,l,d,!1),v=(d&o.childLanes)!==0,Jn||v){if(g=wn,g!==null&&(M=te(g,d),M!==0&&M!==C.retryLane))throw C.retryLane=M,Ha(o,M),Zr(g,o,M),m1;Yh(),l=US(o,l,d)}else o=C.treeContext,Tn=Pi(M.nextSibling),br=l,Kt=!0,js=null,Li=!1,o!==null&&R3(l,o),l=Lh(l,g),l.flags|=4096;return l}return o=Bo(o.child,{mode:g.mode,children:g.children}),o.ref=l.ref,l.child=o,o.return=l,o}function Ih(o,l){var d=l.ref;if(d===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(o===null||o.ref!==d)&&(l.flags|=4194816)}}function g1(o,l,d,g,v){return $a(l),d=Qg(o,l,d,g,void 0,v),g=Xg(),o!==null&&!Jn?(Zg(o,l,v),Yo(o,l,v)):(Kt&&g&&Og(l),l.flags|=1,wr(o,l,d,v),l.child)}function qS(o,l,d,g,v,C){return $a(l),l.updateQueue=null,d=Y3(l,g,d,v),$3(o),g=Xg(),o!==null&&!Jn?(Zg(o,l,C),Yo(o,l,C)):(Kt&&g&&Og(l),l.flags|=1,wr(o,l,d,C),l.child)}function VS(o,l,d,g,v){if($a(l),l.stateNode===null){var C=Hl,M=d.contextType;typeof M=="object"&&M!==null&&(C=vr(M)),C=new d(g,C),l.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=h1,l.stateNode=C,C._reactInternals=l,C=l.stateNode,C.props=g,C.state=l.memoizedState,C.refs={},Ug(l),M=d.contextType,C.context=typeof M=="object"&&M!==null?vr(M):Hl,C.state=l.memoizedState,M=d.getDerivedStateFromProps,typeof M=="function"&&(f1(l,d,M,g),C.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(M=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),M!==C.state&&h1.enqueueReplaceState(C,C.state,null),_u(l,g,C,v),Du(),C.state=l.memoizedState),typeof C.componentDidMount=="function"&&(l.flags|=4194308),g=!0}else if(o===null){C=l.stateNode;var z=l.memoizedProps,Z=Xa(d,z);C.props=Z;var ue=C.context,ve=d.contextType;M=Hl,typeof ve=="object"&&ve!==null&&(M=vr(ve));var Ne=d.getDerivedStateFromProps;ve=typeof Ne=="function"||typeof C.getSnapshotBeforeUpdate=="function",z=l.pendingProps!==z,ve||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(z||ue!==M)&&jS(l,C,g,M),Ds=!1;var fe=l.memoizedState;C.state=fe,_u(l,g,C,v),Du(),ue=l.memoizedState,z||fe!==ue||Ds?(typeof Ne=="function"&&(f1(l,d,Ne,g),ue=l.memoizedState),(Z=Ds||AS(l,d,Z,g,fe,ue,M))?(ve||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(l.flags|=4194308)):(typeof C.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=ue),C.props=g,C.state=ue,C.context=M,g=Z):(typeof C.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{C=l.stateNode,qg(o,l),M=l.memoizedProps,ve=Xa(d,M),C.props=ve,Ne=l.pendingProps,fe=C.context,ue=d.contextType,Z=Hl,typeof ue=="object"&&ue!==null&&(Z=vr(ue)),z=d.getDerivedStateFromProps,(ue=typeof z=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(M!==Ne||fe!==Z)&&jS(l,C,g,Z),Ds=!1,fe=l.memoizedState,C.state=fe,_u(l,g,C,v),Du();var me=l.memoizedState;M!==Ne||fe!==me||Ds||o!==null&&o.dependencies!==null&&yh(o.dependencies)?(typeof z=="function"&&(f1(l,d,z,g),me=l.memoizedState),(ve=Ds||AS(l,d,ve,g,fe,me,Z)||o!==null&&o.dependencies!==null&&yh(o.dependencies))?(ue||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(g,me,Z),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(g,me,Z)),typeof C.componentDidUpdate=="function"&&(l.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof C.componentDidUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=me),C.props=g,C.state=me,C.context=Z,g=ve):(typeof C.componentDidUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=1024),g=!1)}return C=g,Ih(o,l),g=(l.flags&128)!==0,C||g?(C=l.stateNode,d=g&&typeof d.getDerivedStateFromError!="function"?null:C.render(),l.flags|=1,o!==null&&g?(l.child=Ka(l,o.child,null,v),l.child=Ka(l,null,d,v)):wr(o,l,d,v),l.memoizedState=C.state,o=l.child):o=Yo(o,l,v),o}function $S(o,l,d,g){return qa(),l.flags|=256,wr(o,l,d,g),l.child}var y1={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function x1(o){return{baseLanes:o,cachePool:_3()}}function b1(o,l,d){return o=o!==null?o.childLanes&~d:0,l&&(o|=hi),o}function YS(o,l,d){var g=l.pendingProps,v=!1,C=(l.flags&128)!==0,M;if((M=C)||(M=o!==null&&o.memoizedState===null?!1:(Wn.current&2)!==0),M&&(v=!0,l.flags&=-129),M=(l.flags&32)!==0,l.flags&=-33,o===null){if(Kt){if(v?Is(l):Ps(),(o=Tn)?(o=e5(o,Li),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:As!==null?{id:po,overflow:mo}:null,retryLane:536870912,hydrationErrors:null},d=k3(o),d.return=l,l.child=d,br=l,Tn=null)):o=null,o===null)throw Os(l);return t2(o)?l.lanes=32:l.lanes=536870912,null}var z=g.children;return g=g.fallback,v?(Ps(),v=l.mode,z=Ph({mode:"hidden",children:z},v),g=Ua(g,v,d,null),z.return=l,g.return=l,z.sibling=g,l.child=z,g=l.child,g.memoizedState=x1(d),g.childLanes=b1(o,M,d),l.memoizedState=y1,Fu(null,g)):(Is(l),v1(l,z))}var Z=o.memoizedState;if(Z!==null&&(z=Z.dehydrated,z!==null)){if(C)l.flags&256?(Is(l),l.flags&=-257,l=w1(o,l,d)):l.memoizedState!==null?(Ps(),l.child=o.child,l.flags|=128,l=null):(Ps(),z=g.fallback,v=l.mode,g=Ph({mode:"visible",children:g.children},v),z=Ua(z,v,d,null),z.flags|=2,g.return=l,z.return=l,g.sibling=z,l.child=g,Ka(l,o.child,null,d),g=l.child,g.memoizedState=x1(d),g.childLanes=b1(o,M,d),l.memoizedState=y1,l=Fu(null,g));else if(Is(l),t2(z)){if(M=z.nextSibling&&z.nextSibling.dataset,M)var ue=M.dgst;M=ue,g=Error(r(419)),g.stack="",g.digest=M,Nu({value:g,source:null,stack:null}),l=w1(o,l,d)}else if(Jn||$l(o,l,d,!1),M=(d&o.childLanes)!==0,Jn||M){if(M=wn,M!==null&&(g=te(M,d),g!==0&&g!==Z.retryLane))throw Z.retryLane=g,Ha(o,g),Zr(M,o,g),m1;e2(z)||Yh(),l=w1(o,l,d)}else e2(z)?(l.flags|=192,l.child=o.child,l=null):(o=Z.treeContext,Tn=Pi(z.nextSibling),br=l,Kt=!0,js=null,Li=!1,o!==null&&R3(l,o),l=v1(l,g.children),l.flags|=4096);return l}return v?(Ps(),z=g.fallback,v=l.mode,Z=o.child,ue=Z.sibling,g=Bo(Z,{mode:"hidden",children:g.children}),g.subtreeFlags=Z.subtreeFlags&65011712,ue!==null?z=Bo(ue,z):(z=Ua(z,v,d,null),z.flags|=2),z.return=l,g.return=l,g.sibling=z,l.child=g,Fu(null,g),g=l.child,z=o.child.memoizedState,z===null?z=x1(d):(v=z.cachePool,v!==null?(Z=Xn._currentValue,v=v.parent!==Z?{parent:Z,pool:Z}:v):v=_3(),z={baseLanes:z.baseLanes|d,cachePool:v}),g.memoizedState=z,g.childLanes=b1(o,M,d),l.memoizedState=y1,Fu(o.child,g)):(Is(l),d=o.child,o=d.sibling,d=Bo(d,{mode:"visible",children:g.children}),d.return=l,d.sibling=null,o!==null&&(M=l.deletions,M===null?(l.deletions=[o],l.flags|=16):M.push(o)),l.child=d,l.memoizedState=null,d)}function v1(o,l){return l=Ph({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function Ph(o,l){return o=ci(22,o,null,l),o.lanes=0,o}function w1(o,l,d){return Ka(l,o.child,null,d),o=v1(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function WS(o,l,d){o.lanes|=l;var g=o.alternate;g!==null&&(g.lanes|=l),Ig(o.return,l,d)}function S1(o,l,d,g,v,C){var M=o.memoizedState;M===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:v,treeForkCount:C}:(M.isBackwards=l,M.rendering=null,M.renderingStartTime=0,M.last=g,M.tail=d,M.tailMode=v,M.treeForkCount=C)}function GS(o,l,d){var g=l.pendingProps,v=g.revealOrder,C=g.tail;g=g.children;var M=Wn.current,z=(M&2)!==0;if(z?(M=M&1|2,l.flags|=128):M&=1,D(Wn,M),wr(o,l,g,d),g=Kt?Tu:0,!z&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&WS(o,d,l);else if(o.tag===19)WS(o,d,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(v){case"forwards":for(d=l.child,v=null;d!==null;)o=d.alternate,o!==null&&kh(o)===null&&(v=d),d=d.sibling;d=v,d===null?(v=l.child,l.child=null):(v=d.sibling,d.sibling=null),S1(l,!1,v,d,C,g);break;case"backwards":case"unstable_legacy-backwards":for(d=null,v=l.child,l.child=null;v!==null;){if(o=v.alternate,o!==null&&kh(o)===null){l.child=v;break}o=v.sibling,v.sibling=d,d=v,v=o}S1(l,!0,d,null,C,g);break;case"together":S1(l,!1,null,null,void 0,g);break;default:l.memoizedState=null}return l.child}function Yo(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),Bs|=l.lanes,(d&l.childLanes)===0)if(o!==null){if($l(o,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,d=Bo(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=Bo(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function C1(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&yh(o)))}function hM(o,l,d){switch(l.tag){case 3:de(l,l.stateNode.containerInfo),Ms(l,Xn,o.memoizedState.cache),qa();break;case 27:case 5:Re(l);break;case 4:de(l,l.stateNode.containerInfo);break;case 10:Ms(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Gg(l),null;break;case 13:var g=l.memoizedState;if(g!==null)return g.dehydrated!==null?(Is(l),l.flags|=128,null):(d&l.child.childLanes)!==0?YS(o,l,d):(Is(l),o=Yo(o,l,d),o!==null?o.sibling:null);Is(l);break;case 19:var v=(o.flags&128)!==0;if(g=(d&l.childLanes)!==0,g||($l(o,l,d,!1),g=(d&l.childLanes)!==0),v){if(g)return GS(o,l,d);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),D(Wn,Wn.current),g)break;return null;case 22:return l.lanes=0,BS(o,l,d,l.pendingProps);case 24:Ms(l,Xn,o.memoizedState.cache)}return Yo(o,l,d)}function KS(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps)Jn=!0;else{if(!C1(o,d)&&(l.flags&128)===0)return Jn=!1,hM(o,l,d);Jn=(o.flags&131072)!==0}else Jn=!1,Kt&&(l.flags&1048576)!==0&&N3(l,Tu,l.index);switch(l.lanes=0,l.tag){case 16:e:{var g=l.pendingProps;if(o=Wa(l.elementType),l.type=o,typeof o=="function")Rg(o)?(g=Xa(o,g),l.tag=1,l=VS(null,l,o,g,d)):(l.tag=0,l=g1(null,l,o,g,d));else{if(o!=null){var v=o.$$typeof;if(v===O){l.tag=11,l=PS(null,l,o,g,d);break e}else if(v===R){l.tag=14,l=zS(null,l,o,g,d);break e}}throw l=$(o)||o,Error(r(306,l,""))}}return l;case 0:return g1(o,l,l.type,l.pendingProps,d);case 1:return g=l.type,v=Xa(g,l.pendingProps),VS(o,l,g,v,d);case 3:e:{if(de(l,l.stateNode.containerInfo),o===null)throw Error(r(387));g=l.pendingProps;var C=l.memoizedState;v=C.element,qg(o,l),_u(l,g,null,d);var M=l.memoizedState;if(g=M.cache,Ms(l,Xn,g),g!==C.cache&&Pg(l,[Xn],d,!0),Du(),g=M.element,C.isDehydrated)if(C={element:g,isDehydrated:!1,cache:M.cache},l.updateQueue.baseState=C,l.memoizedState=C,l.flags&256){l=$S(o,l,g,d);break e}else if(g!==v){v=Mi(Error(r(424)),l),Nu(v),l=$S(o,l,g,d);break e}else for(o=l.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,Tn=Pi(o.firstChild),br=l,Kt=!0,js=null,Li=!0,d=B3(l,null,g,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(qa(),g===v){l=Yo(o,l,d);break e}wr(o,l,g,d)}l=l.child}return l;case 26:return Ih(o,l),o===null?(d=s5(l.type,null,l.pendingProps,null))?l.memoizedState=d:Kt||(d=l.type,o=l.pendingProps,g=Jh(J.current).createElement(d),g[Xe]=l,g[et]=o,Sr(g,d,o),An(g),l.stateNode=g):l.memoizedState=s5(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return Re(l),o===null&&Kt&&(g=l.stateNode=r5(l.type,l.pendingProps,J.current),br=l,Li=!0,v=Tn,$s(l.type)?(n2=v,Tn=Pi(g.firstChild)):Tn=v),wr(o,l,l.pendingProps.children,d),Ih(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&Kt&&((v=g=Tn)&&(g=qM(g,l.type,l.pendingProps,Li),g!==null?(l.stateNode=g,br=l,Tn=Pi(g.firstChild),Li=!1,v=!0):v=!1),v||Os(l)),Re(l),v=l.type,C=l.pendingProps,M=o!==null?o.memoizedProps:null,g=C.children,X1(v,C)?g=null:M!==null&&X1(v,M)&&(l.flags|=32),l.memoizedState!==null&&(v=Qg(o,l,iM,null,null,d),ed._currentValue=v),Ih(o,l),wr(o,l,g,d),l.child;case 6:return o===null&&Kt&&((o=d=Tn)&&(d=VM(d,l.pendingProps,Li),d!==null?(l.stateNode=d,br=l,Tn=null,o=!0):o=!1),o||Os(l)),null;case 13:return YS(o,l,d);case 4:return de(l,l.stateNode.containerInfo),g=l.pendingProps,o===null?l.child=Ka(l,null,g,d):wr(o,l,g,d),l.child;case 11:return PS(o,l,l.type,l.pendingProps,d);case 7:return wr(o,l,l.pendingProps,d),l.child;case 8:return wr(o,l,l.pendingProps.children,d),l.child;case 12:return wr(o,l,l.pendingProps.children,d),l.child;case 10:return g=l.pendingProps,Ms(l,l.type,g.value),wr(o,l,g.children,d),l.child;case 9:return v=l.type._context,g=l.pendingProps.children,$a(l),v=vr(v),g=g(v),l.flags|=1,wr(o,l,g,d),l.child;case 14:return zS(o,l,l.type,l.pendingProps,d);case 15:return FS(o,l,l.type,l.pendingProps,d);case 19:return GS(o,l,d);case 31:return fM(o,l,d);case 22:return BS(o,l,d,l.pendingProps);case 24:return $a(l),g=vr(Xn),o===null?(v=Bg(),v===null&&(v=wn,C=zg(),v.pooledCache=C,C.refCount++,C!==null&&(v.pooledCacheLanes|=d),v=C),l.memoizedState={parent:g,cache:v},Ug(l),Ms(l,Xn,v)):((o.lanes&d)!==0&&(qg(o,l),_u(l,null,null,d),Du()),v=o.memoizedState,C=l.memoizedState,v.parent!==g?(v={parent:g,cache:g},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),Ms(l,Xn,g)):(g=C.cache,Ms(l,Xn,g),g!==v.cache&&Pg(l,[Xn],d,!0))),wr(o,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Wo(o){o.flags|=4}function E1(o,l,d,g,v){if((l=(o.mode&32)!==0)&&(l=!1),l){if(o.flags|=16777216,(v&335544128)===v)if(o.stateNode.complete)o.flags|=8192;else if(SC())o.flags|=8192;else throw Ga=wh,Hg}else o.flags&=-16777217}function QS(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!d5(l))if(SC())o.flags|=8192;else throw Ga=wh,Hg}function zh(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?nn():536870912,o.lanes|=l,rc|=l)}function Bu(o,l){if(!Kt)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function Nn(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,g=0;if(l)for(var v=o.child;v!==null;)d|=v.lanes|v.childLanes,g|=v.subtreeFlags&65011712,g|=v.flags&65011712,v.return=o,v=v.sibling;else for(v=o.child;v!==null;)d|=v.lanes|v.childLanes,g|=v.subtreeFlags,g|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=g,o.childLanes=d,l}function pM(o,l,d){var g=l.pendingProps;switch(Mg(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(l),null;case 1:return Nn(l),null;case 3:return d=l.stateNode,g=null,o!==null&&(g=o.memoizedState.cache),l.memoizedState.cache!==g&&(l.flags|=2048),qo(Xn),Se(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(Vl(l)?Wo(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,_g())),Nn(l),null;case 26:var v=l.type,C=l.memoizedState;return o===null?(Wo(l),C!==null?(Nn(l),QS(l,C)):(Nn(l),E1(l,v,null,g,d))):C?C!==o.memoizedState?(Wo(l),Nn(l),QS(l,C)):(Nn(l),l.flags&=-16777217):(o=o.memoizedProps,o!==g&&Wo(l),Nn(l),E1(l,v,o,g,d)),null;case 27:if(je(l),d=J.current,v=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==g&&Wo(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Nn(l),null}o=Q.current,Vl(l)?A3(l):(o=r5(v,g,d),l.stateNode=o,Wo(l))}return Nn(l),null;case 5:if(je(l),v=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==g&&Wo(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Nn(l),null}if(C=Q.current,Vl(l))A3(l);else{var M=Jh(J.current);switch(C){case 1:C=M.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:C=M.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":C=M.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":C=M.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":C=M.createElement("div"),C.innerHTML="<script><\/script>",C=C.removeChild(C.firstChild);break;case"select":C=typeof g.is=="string"?M.createElement("select",{is:g.is}):M.createElement("select"),g.multiple?C.multiple=!0:g.size&&(C.size=g.size);break;default:C=typeof g.is=="string"?M.createElement(v,{is:g.is}):M.createElement(v)}}C[Xe]=l,C[et]=g;e:for(M=l.child;M!==null;){if(M.tag===5||M.tag===6)C.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===l)break e;for(;M.sibling===null;){if(M.return===null||M.return===l)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}l.stateNode=C;e:switch(Sr(C,v,g),v){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Wo(l)}}return Nn(l),E1(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,d),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==g&&Wo(l);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(o=J.current,Vl(l)){if(o=l.stateNode,d=l.memoizedProps,g=null,v=br,v!==null)switch(v.tag){case 27:case 5:g=v.memoizedProps}o[Xe]=l,o=!!(o.nodeValue===d||g!==null&&g.suppressHydrationWarning===!0||YC(o.nodeValue,d)),o||Os(l,!0)}else o=Jh(o).createTextNode(g),o[Xe]=l,l.stateNode=o}return Nn(l),null;case 31:if(d=l.memoizedState,o===null||o.memoizedState!==null){if(g=Vl(l),d!==null){if(o===null){if(!g)throw Error(r(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Xe]=l}else qa(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Nn(l),o=!1}else d=_g(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=d),o=!0;if(!o)return l.flags&256?(di(l),l):(di(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Nn(l),null;case 13:if(g=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=Vl(l),g!==null&&g.dehydrated!==null){if(o===null){if(!v)throw Error(r(318));if(v=l.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Xe]=l}else qa(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Nn(l),v=!1}else v=_g(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(di(l),l):(di(l),null)}return di(l),(l.flags&128)!==0?(l.lanes=d,l):(d=g!==null,o=o!==null&&o.memoizedState!==null,d&&(g=l.child,v=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(v=g.alternate.memoizedState.cachePool.pool),C=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(C=g.memoizedState.cachePool.pool),C!==v&&(g.flags|=2048)),d!==o&&d&&(l.child.flags|=8192),zh(l,l.updateQueue),Nn(l),null);case 4:return Se(),o===null&&Y1(l.stateNode.containerInfo),Nn(l),null;case 10:return qo(l.type),Nn(l),null;case 19:if(W(Wn),g=l.memoizedState,g===null)return Nn(l),null;if(v=(l.flags&128)!==0,C=g.rendering,C===null)if(v)Bu(g,!1);else{if(zn!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(C=kh(o),C!==null){for(l.flags|=128,Bu(g,!1),o=C.updateQueue,l.updateQueue=o,zh(l,o),l.subtreeFlags=0,o=d,d=l.child;d!==null;)E3(d,o),d=d.sibling;return D(Wn,Wn.current&1|2),Kt&&Ho(l,g.treeForkCount),l.child}o=o.sibling}g.tail!==null&&Ve()>qh&&(l.flags|=128,v=!0,Bu(g,!1),l.lanes=4194304)}else{if(!v)if(o=kh(C),o!==null){if(l.flags|=128,v=!0,o=o.updateQueue,l.updateQueue=o,zh(l,o),Bu(g,!0),g.tail===null&&g.tailMode==="hidden"&&!C.alternate&&!Kt)return Nn(l),null}else 2*Ve()-g.renderingStartTime>qh&&d!==536870912&&(l.flags|=128,v=!0,Bu(g,!1),l.lanes=4194304);g.isBackwards?(C.sibling=l.child,l.child=C):(o=g.last,o!==null?o.sibling=C:l.child=C,g.last=C)}return g.tail!==null?(o=g.tail,g.rendering=o,g.tail=o.sibling,g.renderingStartTime=Ve(),o.sibling=null,d=Wn.current,D(Wn,v?d&1|2:d&1),Kt&&Ho(l,g.treeForkCount),o):(Nn(l),null);case 22:case 23:return di(l),Wg(),g=l.memoizedState!==null,o!==null?o.memoizedState!==null!==g&&(l.flags|=8192):g&&(l.flags|=8192),g?(d&536870912)!==0&&(l.flags&128)===0&&(Nn(l),l.subtreeFlags&6&&(l.flags|=8192)):Nn(l),d=l.updateQueue,d!==null&&zh(l,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==d&&(l.flags|=2048),o!==null&&W(Ya),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),qo(Xn),Nn(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function mM(o,l){switch(Mg(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return qo(Xn),Se(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return je(l),null;case 31:if(l.memoizedState!==null){if(di(l),l.alternate===null)throw Error(r(340));qa()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(di(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));qa()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return W(Wn),null;case 4:return Se(),null;case 10:return qo(l.type),null;case 22:case 23:return di(l),Wg(),o!==null&&W(Ya),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return qo(Xn),null;case 25:return null;default:return null}}function XS(o,l){switch(Mg(l),l.tag){case 3:qo(Xn),Se();break;case 26:case 27:case 5:je(l);break;case 4:Se();break;case 31:l.memoizedState!==null&&di(l);break;case 13:di(l);break;case 19:W(Wn);break;case 10:qo(l.type);break;case 22:case 23:di(l),Wg(),o!==null&&W(Ya);break;case 24:qo(Xn)}}function Hu(o,l){try{var d=l.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var v=g.next;d=v;do{if((d.tag&o)===o){g=void 0;var C=d.create,M=d.inst;g=C(),M.destroy=g}d=d.next}while(d!==v)}}catch(z){pn(l,l.return,z)}}function zs(o,l,d){try{var g=l.updateQueue,v=g!==null?g.lastEffect:null;if(v!==null){var C=v.next;g=C;do{if((g.tag&o)===o){var M=g.inst,z=M.destroy;if(z!==void 0){M.destroy=void 0,v=l;var Z=d,ue=z;try{ue()}catch(ve){pn(v,Z,ve)}}}g=g.next}while(g!==C)}}catch(ve){pn(l,l.return,ve)}}function ZS(o){var l=o.updateQueue;if(l!==null){var d=o.stateNode;try{U3(l,d)}catch(g){pn(o,o.return,g)}}}function JS(o,l,d){d.props=Xa(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(g){pn(o,l,g)}}function Uu(o,l){try{var d=o.ref;if(d!==null){switch(o.tag){case 26:case 27:case 5:var g=o.stateNode;break;case 30:g=o.stateNode;break;default:g=o.stateNode}typeof d=="function"?o.refCleanup=d(g):d.current=g}}catch(v){pn(o,l,v)}}function go(o,l){var d=o.ref,g=o.refCleanup;if(d!==null)if(typeof g=="function")try{g()}catch(v){pn(o,l,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(v){pn(o,l,v)}else d.current=null}function eC(o){var l=o.type,d=o.memoizedProps,g=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&g.focus();break e;case"img":d.src?g.src=d.src:d.srcSet&&(g.srcset=d.srcSet)}}catch(v){pn(o,o.return,v)}}function k1(o,l,d){try{var g=o.stateNode;PM(g,o.type,d,l),g[et]=l}catch(v){pn(o,o.return,v)}}function tC(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&$s(o.type)||o.tag===4}function T1(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||tC(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&&$s(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 N1(o,l,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(o),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=zo));else if(g!==4&&(g===27&&$s(o.type)&&(d=o.stateNode,l=null),o=o.child,o!==null))for(N1(o,l,d),o=o.sibling;o!==null;)N1(o,l,d),o=o.sibling}function Fh(o,l,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(g!==4&&(g===27&&$s(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Fh(o,l,d),o=o.sibling;o!==null;)Fh(o,l,d),o=o.sibling}function nC(o){var l=o.stateNode,d=o.memoizedProps;try{for(var g=o.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Sr(l,g,d),l[Xe]=o,l[et]=d}catch(C){pn(o,o.return,C)}}var Go=!1,er=!1,R1=!1,rC=typeof WeakSet=="function"?WeakSet:Set,hr=null;function gM(o,l){if(o=o.containerInfo,K1=sp,o=m3(o),wg(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var v=g.anchorOffset,C=g.focusNode;g=g.focusOffset;try{d.nodeType,C.nodeType}catch{d=null;break e}var M=0,z=-1,Z=-1,ue=0,ve=0,Ne=o,fe=null;t:for(;;){for(var me;Ne!==d||v!==0&&Ne.nodeType!==3||(z=M+v),Ne!==C||g!==0&&Ne.nodeType!==3||(Z=M+g),Ne.nodeType===3&&(M+=Ne.nodeValue.length),(me=Ne.firstChild)!==null;)fe=Ne,Ne=me;for(;;){if(Ne===o)break t;if(fe===d&&++ue===v&&(z=M),fe===C&&++ve===g&&(Z=M),(me=Ne.nextSibling)!==null)break;Ne=fe,fe=Ne.parentNode}Ne=me}d=z===-1||Z===-1?null:{start:z,end:Z}}else d=null}d=d||{start:0,end:0}}else d=null;for(Q1={focusedElem:o,selectionRange:d},sp=!1,hr=l;hr!==null;)if(l=hr,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,hr=o;else for(;hr!==null;){switch(l=hr,C=l.alternate,o=l.flags,l.tag){case 0:if((o&4)!==0&&(o=l.updateQueue,o=o!==null?o.events:null,o!==null))for(d=0;d<o.length;d++)v=o[d],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&C!==null){o=void 0,d=l,v=C.memoizedProps,C=C.memoizedState,g=d.stateNode;try{var rt=Xa(d.type,v);o=g.getSnapshotBeforeUpdate(rt,C),g.__reactInternalSnapshotBeforeUpdate=o}catch(wt){pn(d,d.return,wt)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,d=o.nodeType,d===9)J1(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":J1(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=l.sibling,o!==null){o.return=l.return,hr=o;break}hr=l.return}}function iC(o,l,d){var g=d.flags;switch(d.tag){case 0:case 11:case 15:Qo(o,d),g&4&&Hu(5,d);break;case 1:if(Qo(o,d),g&4)if(o=d.stateNode,l===null)try{o.componentDidMount()}catch(M){pn(d,d.return,M)}else{var v=Xa(d.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(v,l,o.__reactInternalSnapshotBeforeUpdate)}catch(M){pn(d,d.return,M)}}g&64&&ZS(d),g&512&&Uu(d,d.return);break;case 3:if(Qo(o,d),g&64&&(o=d.updateQueue,o!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{U3(o,l)}catch(M){pn(d,d.return,M)}}break;case 27:l===null&&g&4&&nC(d);case 26:case 5:Qo(o,d),l===null&&g&4&&eC(d),g&512&&Uu(d,d.return);break;case 12:Qo(o,d);break;case 31:Qo(o,d),g&4&&aC(o,d);break;case 13:Qo(o,d),g&4&&lC(o,d),g&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=kM.bind(null,d),$M(o,d))));break;case 22:if(g=d.memoizedState!==null||Go,!g){l=l!==null&&l.memoizedState!==null||er,v=Go;var C=er;Go=g,(er=l)&&!C?Xo(o,d,(d.subtreeFlags&8772)!==0):Qo(o,d),Go=v,er=C}break;case 30:break;default:Qo(o,d)}}function oC(o){var l=o.alternate;l!==null&&(o.alternate=null,oC(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&Ln(l)),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 jn=null,Gr=!1;function Ko(o,l,d){for(d=d.child;d!==null;)sC(o,l,d),d=d.sibling}function sC(o,l,d){if(Ke&&typeof Ke.onCommitFiberUnmount=="function")try{Ke.onCommitFiberUnmount(Je,d)}catch{}switch(d.tag){case 26:er||go(d,l),Ko(o,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:er||go(d,l);var g=jn,v=Gr;$s(d.type)&&(jn=d.stateNode,Gr=!1),Ko(o,l,d),Xu(d.stateNode),jn=g,Gr=v;break;case 5:er||go(d,l);case 6:if(g=jn,v=Gr,jn=null,Ko(o,l,d),jn=g,Gr=v,jn!==null)if(Gr)try{(jn.nodeType===9?jn.body:jn.nodeName==="HTML"?jn.ownerDocument.body:jn).removeChild(d.stateNode)}catch(C){pn(d,l,C)}else try{jn.removeChild(d.stateNode)}catch(C){pn(d,l,C)}break;case 18:jn!==null&&(Gr?(o=jn,ZC(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),dc(o)):ZC(jn,d.stateNode));break;case 4:g=jn,v=Gr,jn=d.stateNode.containerInfo,Gr=!0,Ko(o,l,d),jn=g,Gr=v;break;case 0:case 11:case 14:case 15:zs(2,d,l),er||zs(4,d,l),Ko(o,l,d);break;case 1:er||(go(d,l),g=d.stateNode,typeof g.componentWillUnmount=="function"&&JS(d,l,g)),Ko(o,l,d);break;case 21:Ko(o,l,d);break;case 22:er=(g=er)||d.memoizedState!==null,Ko(o,l,d),er=g;break;default:Ko(o,l,d)}}function aC(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{dc(o)}catch(d){pn(l,l.return,d)}}}function lC(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{dc(o)}catch(d){pn(l,l.return,d)}}function yM(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new rC),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new rC),l;default:throw Error(r(435,o.tag))}}function Bh(o,l){var d=yM(o);l.forEach(function(g){if(!d.has(g)){d.add(g);var v=TM.bind(null,o,g);g.then(v,v)}})}function Kr(o,l){var d=l.deletions;if(d!==null)for(var g=0;g<d.length;g++){var v=d[g],C=o,M=l,z=M;e:for(;z!==null;){switch(z.tag){case 27:if($s(z.type)){jn=z.stateNode,Gr=!1;break e}break;case 5:jn=z.stateNode,Gr=!1;break e;case 3:case 4:jn=z.stateNode.containerInfo,Gr=!0;break e}z=z.return}if(jn===null)throw Error(r(160));sC(C,M,v),jn=null,Gr=!1,C=v.alternate,C!==null&&(C.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)cC(l,o),l=l.sibling}var no=null;function cC(o,l){var d=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Kr(l,o),Qr(o),g&4&&(zs(3,o,o.return),Hu(3,o),zs(5,o,o.return));break;case 1:Kr(l,o),Qr(o),g&512&&(er||d===null||go(d,d.return)),g&64&&Go&&(o=o.updateQueue,o!==null&&(g=o.callbacks,g!==null&&(d=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=d===null?g:d.concat(g))));break;case 26:var v=no;if(Kr(l,o),Qr(o),g&512&&(er||d===null||go(d,d.return)),g&4){var C=d!==null?d.memoizedState:null;if(g=o.memoizedState,d===null)if(g===null)if(o.stateNode===null){e:{g=o.type,d=o.memoizedProps,v=v.ownerDocument||v;t:switch(g){case"title":C=v.getElementsByTagName("title")[0],(!C||C[Dn]||C[Xe]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=v.createElement(g),v.head.insertBefore(C,v.querySelector("head > title"))),Sr(C,g,d),C[Xe]=o,An(C),g=C;break e;case"link":var M=c5("link","href",v).get(g+(d.href||""));if(M){for(var z=0;z<M.length;z++)if(C=M[z],C.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&C.getAttribute("rel")===(d.rel==null?null:d.rel)&&C.getAttribute("title")===(d.title==null?null:d.title)&&C.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){M.splice(z,1);break t}}C=v.createElement(g),Sr(C,g,d),v.head.appendChild(C);break;case"meta":if(M=c5("meta","content",v).get(g+(d.content||""))){for(z=0;z<M.length;z++)if(C=M[z],C.getAttribute("content")===(d.content==null?null:""+d.content)&&C.getAttribute("name")===(d.name==null?null:d.name)&&C.getAttribute("property")===(d.property==null?null:d.property)&&C.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&C.getAttribute("charset")===(d.charSet==null?null:d.charSet)){M.splice(z,1);break t}}C=v.createElement(g),Sr(C,g,d),v.head.appendChild(C);break;default:throw Error(r(468,g))}C[Xe]=o,An(C),g=C}o.stateNode=g}else u5(v,o.type,o.stateNode);else o.stateNode=l5(v,g,o.memoizedProps);else C!==g?(C===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):C.count--,g===null?u5(v,o.type,o.stateNode):l5(v,g,o.memoizedProps)):g===null&&o.stateNode!==null&&k1(o,o.memoizedProps,d.memoizedProps)}break;case 27:Kr(l,o),Qr(o),g&512&&(er||d===null||go(d,d.return)),d!==null&&g&4&&k1(o,o.memoizedProps,d.memoizedProps);break;case 5:if(Kr(l,o),Qr(o),g&512&&(er||d===null||go(d,d.return)),o.flags&32){v=o.stateNode;try{_l(v,"")}catch(rt){pn(o,o.return,rt)}}g&4&&o.stateNode!=null&&(v=o.memoizedProps,k1(o,v,d!==null?d.memoizedProps:v)),g&1024&&(R1=!0);break;case 6:if(Kr(l,o),Qr(o),g&4){if(o.stateNode===null)throw Error(r(162));g=o.memoizedProps,d=o.stateNode;try{d.nodeValue=g}catch(rt){pn(o,o.return,rt)}}break;case 3:if(np=null,v=no,no=ep(l.containerInfo),Kr(l,o),no=v,Qr(o),g&4&&d!==null&&d.memoizedState.isDehydrated)try{dc(l.containerInfo)}catch(rt){pn(o,o.return,rt)}R1&&(R1=!1,uC(o));break;case 4:g=no,no=ep(o.stateNode.containerInfo),Kr(l,o),Qr(o),no=g;break;case 12:Kr(l,o),Qr(o);break;case 31:Kr(l,o),Qr(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Bh(o,g)));break;case 13:Kr(l,o),Qr(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Uh=Ve()),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Bh(o,g)));break;case 22:v=o.memoizedState!==null;var Z=d!==null&&d.memoizedState!==null,ue=Go,ve=er;if(Go=ue||v,er=ve||Z,Kr(l,o),er=ve,Go=ue,Qr(o),g&8192)e:for(l=o.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(d===null||Z||Go||er||Za(o)),d=null,l=o;;){if(l.tag===5||l.tag===26){if(d===null){Z=d=l;try{if(C=Z.stateNode,v)M=C.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{z=Z.stateNode;var Ne=Z.memoizedProps.style,fe=Ne!=null&&Ne.hasOwnProperty("display")?Ne.display:null;z.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(rt){pn(Z,Z.return,rt)}}}else if(l.tag===6){if(d===null){Z=l;try{Z.stateNode.nodeValue=v?"":Z.memoizedProps}catch(rt){pn(Z,Z.return,rt)}}}else if(l.tag===18){if(d===null){Z=l;try{var me=Z.stateNode;v?JC(me,!0):JC(Z.stateNode,!1)}catch(rt){pn(Z,Z.return,rt)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}g&4&&(g=o.updateQueue,g!==null&&(d=g.retryQueue,d!==null&&(g.retryQueue=null,Bh(o,d))));break;case 19:Kr(l,o),Qr(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Bh(o,g)));break;case 30:break;case 21:break;default:Kr(l,o),Qr(o)}}function Qr(o){var l=o.flags;if(l&2){try{for(var d,g=o.return;g!==null;){if(tC(g)){d=g;break}g=g.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var v=d.stateNode,C=T1(o);Fh(o,C,v);break;case 5:var M=d.stateNode;d.flags&32&&(_l(M,""),d.flags&=-33);var z=T1(o);Fh(o,z,M);break;case 3:case 4:var Z=d.stateNode.containerInfo,ue=T1(o);N1(o,ue,Z);break;default:throw Error(r(161))}}catch(ve){pn(o,o.return,ve)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function uC(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;uC(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function Qo(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)iC(o,l.alternate,l),l=l.sibling}function Za(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:zs(4,l,l.return),Za(l);break;case 1:go(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&JS(l,l.return,d),Za(l);break;case 27:Xu(l.stateNode);case 26:case 5:go(l,l.return),Za(l);break;case 22:l.memoizedState===null&&Za(l);break;case 30:Za(l);break;default:Za(l)}o=o.sibling}}function Xo(o,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var g=l.alternate,v=o,C=l,M=C.flags;switch(C.tag){case 0:case 11:case 15:Xo(v,C,d),Hu(4,C);break;case 1:if(Xo(v,C,d),g=C,v=g.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(ue){pn(g,g.return,ue)}if(g=C,v=g.updateQueue,v!==null){var z=g.stateNode;try{var Z=v.shared.hiddenCallbacks;if(Z!==null)for(v.shared.hiddenCallbacks=null,v=0;v<Z.length;v++)H3(Z[v],z)}catch(ue){pn(g,g.return,ue)}}d&&M&64&&ZS(C),Uu(C,C.return);break;case 27:nC(C);case 26:case 5:Xo(v,C,d),d&&g===null&&M&4&&eC(C),Uu(C,C.return);break;case 12:Xo(v,C,d);break;case 31:Xo(v,C,d),d&&M&4&&aC(v,C);break;case 13:Xo(v,C,d),d&&M&4&&lC(v,C);break;case 22:C.memoizedState===null&&Xo(v,C,d),Uu(C,C.return);break;case 30:break;default:Xo(v,C,d)}l=l.sibling}}function A1(o,l){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&Ru(d))}function j1(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Ru(o))}function ro(o,l,d,g){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)dC(o,l,d,g),l=l.sibling}function dC(o,l,d,g){var v=l.flags;switch(l.tag){case 0:case 11:case 15:ro(o,l,d,g),v&2048&&Hu(9,l);break;case 1:ro(o,l,d,g);break;case 3:ro(o,l,d,g),v&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Ru(o)));break;case 12:if(v&2048){ro(o,l,d,g),o=l.stateNode;try{var C=l.memoizedProps,M=C.id,z=C.onPostCommit;typeof z=="function"&&z(M,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Z){pn(l,l.return,Z)}}else ro(o,l,d,g);break;case 31:ro(o,l,d,g);break;case 13:ro(o,l,d,g);break;case 23:break;case 22:C=l.stateNode,M=l.alternate,l.memoizedState!==null?C._visibility&2?ro(o,l,d,g):qu(o,l):C._visibility&2?ro(o,l,d,g):(C._visibility|=2,ec(o,l,d,g,(l.subtreeFlags&10256)!==0||!1)),v&2048&&A1(M,l);break;case 24:ro(o,l,d,g),v&2048&&j1(l.alternate,l);break;default:ro(o,l,d,g)}}function ec(o,l,d,g,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var C=o,M=l,z=d,Z=g,ue=M.flags;switch(M.tag){case 0:case 11:case 15:ec(C,M,z,Z,v),Hu(8,M);break;case 23:break;case 22:var ve=M.stateNode;M.memoizedState!==null?ve._visibility&2?ec(C,M,z,Z,v):qu(C,M):(ve._visibility|=2,ec(C,M,z,Z,v)),v&&ue&2048&&A1(M.alternate,M);break;case 24:ec(C,M,z,Z,v),v&&ue&2048&&j1(M.alternate,M);break;default:ec(C,M,z,Z,v)}l=l.sibling}}function qu(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=o,g=l,v=g.flags;switch(g.tag){case 22:qu(d,g),v&2048&&A1(g.alternate,g);break;case 24:qu(d,g),v&2048&&j1(g.alternate,g);break;default:qu(d,g)}l=l.sibling}}var Vu=8192;function tc(o,l,d){if(o.subtreeFlags&Vu)for(o=o.child;o!==null;)fC(o,l,d),o=o.sibling}function fC(o,l,d){switch(o.tag){case 26:tc(o,l,d),o.flags&Vu&&o.memoizedState!==null&&rD(d,no,o.memoizedState,o.memoizedProps);break;case 5:tc(o,l,d);break;case 3:case 4:var g=no;no=ep(o.stateNode.containerInfo),tc(o,l,d),no=g;break;case 22:o.memoizedState===null&&(g=o.alternate,g!==null&&g.memoizedState!==null?(g=Vu,Vu=16777216,tc(o,l,d),Vu=g):tc(o,l,d));break;default:tc(o,l,d)}}function hC(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function $u(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];hr=g,mC(g,o)}hC(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)pC(o),o=o.sibling}function pC(o){switch(o.tag){case 0:case 11:case 15:$u(o),o.flags&2048&&zs(9,o,o.return);break;case 3:$u(o);break;case 12:$u(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Hh(o)):$u(o);break;default:$u(o)}}function Hh(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];hr=g,mC(g,o)}hC(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:zs(8,l,l.return),Hh(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Hh(l));break;default:Hh(l)}o=o.sibling}}function mC(o,l){for(;hr!==null;){var d=hr;switch(d.tag){case 0:case 11:case 15:zs(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var g=d.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:Ru(d.memoizedState.cache)}if(g=d.child,g!==null)g.return=d,hr=g;else e:for(d=o;hr!==null;){g=hr;var v=g.sibling,C=g.return;if(oC(g),g===d){hr=null;break e}if(v!==null){v.return=C,hr=v;break e}hr=C}}}var xM={getCacheForType:function(o){var l=vr(Xn),d=l.data.get(o);return d===void 0&&(d=o(),l.data.set(o,d)),d},cacheSignal:function(){return vr(Xn).controller.signal}},bM=typeof WeakMap=="function"?WeakMap:Map,an=0,wn=null,Ft=null,qt=0,hn=0,fi=null,Fs=!1,nc=!1,O1=!1,Zo=0,zn=0,Bs=0,Ja=0,M1=0,hi=0,rc=0,Yu=null,Xr=null,D1=!1,Uh=0,gC=0,qh=1/0,Vh=null,Hs=null,ar=0,Us=null,ic=null,Jo=0,_1=0,L1=null,yC=null,Wu=0,I1=null;function pi(){return(an&2)!==0&&qt!==0?qt&-qt:P.T!==null?U1():He()}function xC(){if(hi===0)if((qt&536870912)===0||Kt){var o=Oe;Oe<<=1,(Oe&3932160)===0&&(Oe=262144),hi=o}else hi=536870912;return o=ui.current,o!==null&&(o.flags|=32),hi}function Zr(o,l,d){(o===wn&&(hn===2||hn===9)||o.cancelPendingCommit!==null)&&(oc(o,0),qs(o,qt,hi,!1)),Ut(o,d),((an&2)===0||o!==wn)&&(o===wn&&((an&2)===0&&(Ja|=d),zn===4&&qs(o,qt,hi,!1)),yo(o))}function bC(o,l,d){if((an&6)!==0)throw Error(r(327));var g=!d&&(l&127)===0&&(l&o.expiredLanes)===0||Pt(o,l),v=g?SM(o,l):z1(o,l,!0),C=g;do{if(v===0){nc&&!g&&qs(o,l,0,!1);break}else{if(d=o.current.alternate,C&&!vM(d)){v=z1(o,l,!1),C=!1;continue}if(v===2){if(C=l,o.errorRecoveryDisabledLanes&C)var M=0;else M=o.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){l=M;e:{var z=o;v=Yu;var Z=z.current.memoizedState.isDehydrated;if(Z&&(oc(z,M).flags|=256),M=z1(z,M,!1),M!==2){if(O1&&!Z){z.errorRecoveryDisabledLanes|=C,Ja|=C,v=4;break e}C=Xr,Xr=v,C!==null&&(Xr===null?Xr=C:Xr.push.apply(Xr,C))}v=M}if(C=!1,v!==2)continue}}if(v===1){oc(o,0),qs(o,l,0,!0);break}e:{switch(g=o,C=v,C){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:qs(g,l,hi,!Fs);break e;case 2:Xr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=Uh+300-Ve(),10<v)){if(qs(g,l,hi,!Fs),Ie(g,0,!0)!==0)break e;Jo=l,g.timeoutHandle=QC(vC.bind(null,g,d,Xr,Vh,D1,l,hi,Ja,rc,Fs,C,"Throttled",-0,0),v);break e}vC(g,d,Xr,Vh,D1,l,hi,Ja,rc,Fs,C,null,-0,0)}}break}while(!0);yo(o)}function vC(o,l,d,g,v,C,M,z,Z,ue,ve,Ne,fe,me){if(o.timeoutHandle=-1,Ne=l.subtreeFlags,Ne&8192||(Ne&16785408)===16785408){Ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:zo},fC(l,C,Ne);var rt=(C&62914560)===C?Uh-Ve():(C&4194048)===C?gC-Ve():0;if(rt=iD(Ne,rt),rt!==null){Jo=C,o.cancelPendingCommit=rt(RC.bind(null,o,l,C,d,g,v,M,z,Z,ve,Ne,null,fe,me)),qs(o,C,M,!ue);return}}RC(o,l,C,d,g,v,M,z,Z)}function vM(o){for(var l=o;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var g=0;g<d.length;g++){var v=d[g],C=v.getSnapshot;v=v.value;try{if(!li(C(),v))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function qs(o,l,d,g){l&=~M1,l&=~Ja,o.suspendedLanes|=l,o.pingedLanes&=~l,g&&(o.warmLanes|=l),g=o.expirationTimes;for(var v=l;0<v;){var C=31-nt(v),M=1<<C;g[C]=-1,v&=~M}d!==0&&zt(o,d,l)}function $h(){return(an&6)===0?(Gu(0),!1):!0}function P1(){if(Ft!==null){if(hn===0)var o=Ft.return;else o=Ft,Uo=Va=null,Jg(o),Kl=null,ju=0,o=Ft;for(;o!==null;)XS(o.alternate,o),o=o.return;Ft=null}}function oc(o,l){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,BM(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),Jo=0,P1(),wn=o,Ft=d=Bo(o.current,null),qt=l,hn=0,fi=null,Fs=!1,nc=Pt(o,l),O1=!1,rc=hi=M1=Ja=Bs=zn=0,Xr=Yu=null,D1=!1,(l&8)!==0&&(l|=l&32);var g=o.entangledLanes;if(g!==0)for(o=o.entanglements,g&=l;0<g;){var v=31-nt(g),C=1<<v;l|=o[v],g&=~C}return Zo=l,fh(),d}function wC(o,l){jt=null,P.H=zu,l===Gl||l===vh?(l=P3(),hn=3):l===Hg?(l=P3(),hn=4):hn=l===m1?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,fi=l,Ft===null&&(zn=1,_h(o,Mi(l,o.current)))}function SC(){var o=ui.current;return o===null?!0:(qt&4194048)===qt?Ii===null:(qt&62914560)===qt||(qt&536870912)!==0?o===Ii:!1}function CC(){var o=P.H;return P.H=zu,o===null?zu:o}function EC(){var o=P.A;return P.A=xM,o}function Yh(){zn=4,Fs||(qt&4194048)!==qt&&ui.current!==null||(nc=!0),(Bs&134217727)===0&&(Ja&134217727)===0||wn===null||qs(wn,qt,hi,!1)}function z1(o,l,d){var g=an;an|=2;var v=CC(),C=EC();(wn!==o||qt!==l)&&(Vh=null,oc(o,l)),l=!1;var M=zn;e:do try{if(hn!==0&&Ft!==null){var z=Ft,Z=fi;switch(hn){case 8:P1(),M=6;break e;case 3:case 2:case 9:case 6:ui.current===null&&(l=!0);var ue=hn;if(hn=0,fi=null,sc(o,z,Z,ue),d&&nc){M=0;break e}break;default:ue=hn,hn=0,fi=null,sc(o,z,Z,ue)}}wM(),M=zn;break}catch(ve){wC(o,ve)}while(!0);return l&&o.shellSuspendCounter++,Uo=Va=null,an=g,P.H=v,P.A=C,Ft===null&&(wn=null,qt=0,fh()),M}function wM(){for(;Ft!==null;)kC(Ft)}function SM(o,l){var d=an;an|=2;var g=CC(),v=EC();wn!==o||qt!==l?(Vh=null,qh=Ve()+500,oc(o,l)):nc=Pt(o,l);e:do try{if(hn!==0&&Ft!==null){l=Ft;var C=fi;t:switch(hn){case 1:hn=0,fi=null,sc(o,l,C,1);break;case 2:case 9:if(L3(C)){hn=0,fi=null,TC(l);break}l=function(){hn!==2&&hn!==9||wn!==o||(hn=7),yo(o)},C.then(l,l);break e;case 3:hn=7;break e;case 4:hn=5;break e;case 7:L3(C)?(hn=0,fi=null,TC(l)):(hn=0,fi=null,sc(o,l,C,7));break;case 5:var M=null;switch(Ft.tag){case 26:M=Ft.memoizedState;case 5:case 27:var z=Ft;if(M?d5(M):z.stateNode.complete){hn=0,fi=null;var Z=z.sibling;if(Z!==null)Ft=Z;else{var ue=z.return;ue!==null?(Ft=ue,Wh(ue)):Ft=null}break t}}hn=0,fi=null,sc(o,l,C,5);break;case 6:hn=0,fi=null,sc(o,l,C,6);break;case 8:P1(),zn=6;break e;default:throw Error(r(462))}}CM();break}catch(ve){wC(o,ve)}while(!0);return Uo=Va=null,P.H=g,P.A=v,an=d,Ft!==null?0:(wn=null,qt=0,fh(),zn)}function CM(){for(;Ft!==null&&!ye();)kC(Ft)}function kC(o){var l=KS(o.alternate,o,Zo);o.memoizedProps=o.pendingProps,l===null?Wh(o):Ft=l}function TC(o){var l=o,d=l.alternate;switch(l.tag){case 15:case 0:l=qS(d,l,l.pendingProps,l.type,void 0,qt);break;case 11:l=qS(d,l,l.pendingProps,l.type.render,l.ref,qt);break;case 5:Jg(l);default:XS(d,l),l=Ft=E3(l,Zo),l=KS(d,l,Zo)}o.memoizedProps=o.pendingProps,l===null?Wh(o):Ft=l}function sc(o,l,d,g){Uo=Va=null,Jg(l),Kl=null,ju=0;var v=l.return;try{if(dM(o,v,l,d,qt)){zn=1,_h(o,Mi(d,o.current)),Ft=null;return}}catch(C){if(v!==null)throw Ft=v,C;zn=1,_h(o,Mi(d,o.current)),Ft=null;return}l.flags&32768?(Kt||g===1?o=!0:nc||(qt&536870912)!==0?o=!1:(Fs=o=!0,(g===2||g===9||g===3||g===6)&&(g=ui.current,g!==null&&g.tag===13&&(g.flags|=16384))),NC(l,o)):Wh(l)}function Wh(o){var l=o;do{if((l.flags&32768)!==0){NC(l,Fs);return}o=l.return;var d=pM(l.alternate,l,Zo);if(d!==null){Ft=d;return}if(l=l.sibling,l!==null){Ft=l;return}Ft=l=o}while(l!==null);zn===0&&(zn=5)}function NC(o,l){do{var d=mM(o.alternate,o);if(d!==null){d.flags&=32767,Ft=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(o=o.sibling,o!==null)){Ft=o;return}Ft=o=d}while(o!==null);zn=6,Ft=null}function RC(o,l,d,g,v,C,M,z,Z){o.cancelPendingCommit=null;do Gh();while(ar!==0);if((an&6)!==0)throw Error(r(327));if(l!==null){if(l===o.current)throw Error(r(177));if(C=l.lanes|l.childLanes,C|=Tg,yt(o,d,C,M,z,Z),o===wn&&(Ft=wn=null,qt=0),ic=l,Us=o,Jo=d,_1=C,L1=v,yC=g,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,NM(Le,function(){return DC(),null})):(o.callbackNode=null,o.callbackPriority=0),g=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||g){g=P.T,P.T=null,v=Y.p,Y.p=2,M=an,an|=4;try{gM(o,l,d)}finally{an=M,Y.p=v,P.T=g}}ar=1,AC(),jC(),OC()}}function AC(){if(ar===1){ar=0;var o=Us,l=ic,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=P.T,P.T=null;var g=Y.p;Y.p=2;var v=an;an|=4;try{cC(l,o);var C=Q1,M=m3(o.containerInfo),z=C.focusedElem,Z=C.selectionRange;if(M!==z&&z&&z.ownerDocument&&p3(z.ownerDocument.documentElement,z)){if(Z!==null&&wg(z)){var ue=Z.start,ve=Z.end;if(ve===void 0&&(ve=ue),"selectionStart"in z)z.selectionStart=ue,z.selectionEnd=Math.min(ve,z.value.length);else{var Ne=z.ownerDocument||document,fe=Ne&&Ne.defaultView||window;if(fe.getSelection){var me=fe.getSelection(),rt=z.textContent.length,wt=Math.min(Z.start,rt),xn=Z.end===void 0?wt:Math.min(Z.end,rt);!me.extend&&wt>xn&&(M=xn,xn=wt,wt=M);var ie=h3(z,wt),re=h3(z,xn);if(ie&&re&&(me.rangeCount!==1||me.anchorNode!==ie.node||me.anchorOffset!==ie.offset||me.focusNode!==re.node||me.focusOffset!==re.offset)){var ce=Ne.createRange();ce.setStart(ie.node,ie.offset),me.removeAllRanges(),wt>xn?(me.addRange(ce),me.extend(re.node,re.offset)):(ce.setEnd(re.node,re.offset),me.addRange(ce))}}}}for(Ne=[],me=z;me=me.parentNode;)me.nodeType===1&&Ne.push({element:me,left:me.scrollLeft,top:me.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<Ne.length;z++){var ke=Ne[z];ke.element.scrollLeft=ke.left,ke.element.scrollTop=ke.top}}sp=!!K1,Q1=K1=null}finally{an=v,Y.p=g,P.T=d}}o.current=l,ar=2}}function jC(){if(ar===2){ar=0;var o=Us,l=ic,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=P.T,P.T=null;var g=Y.p;Y.p=2;var v=an;an|=4;try{iC(o,l.alternate,l)}finally{an=v,Y.p=g,P.T=d}}ar=3}}function OC(){if(ar===4||ar===3){ar=0,Ce();var o=Us,l=ic,d=Jo,g=yC;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?ar=5:(ar=0,ic=Us=null,MC(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(Hs=null),Te(d),l=l.stateNode,Ke&&typeof Ke.onCommitFiberRoot=="function")try{Ke.onCommitFiberRoot(Je,l,void 0,(l.current.flags&128)===128)}catch{}if(g!==null){l=P.T,v=Y.p,Y.p=2,P.T=null;try{for(var C=o.onRecoverableError,M=0;M<g.length;M++){var z=g[M];C(z.value,{componentStack:z.stack})}}finally{P.T=l,Y.p=v}}(Jo&3)!==0&&Gh(),yo(o),v=o.pendingLanes,(d&261930)!==0&&(v&42)!==0?o===I1?Wu++:(Wu=0,I1=o):Wu=0,Gu(0)}}function MC(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,Ru(l)))}function Gh(){return AC(),jC(),OC(),DC()}function DC(){if(ar!==5)return!1;var o=Us,l=_1;_1=0;var d=Te(Jo),g=P.T,v=Y.p;try{Y.p=32>d?32:d,P.T=null,d=L1,L1=null;var C=Us,M=Jo;if(ar=0,ic=Us=null,Jo=0,(an&6)!==0)throw Error(r(331));var z=an;if(an|=4,pC(C.current),dC(C,C.current,M,d),an=z,Gu(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot=="function")try{Ke.onPostCommitFiberRoot(Je,C)}catch{}return!0}finally{Y.p=v,P.T=g,MC(o,l)}}function _C(o,l,d){l=Mi(d,l),l=p1(o.stateNode,l,2),o=Ls(o,l,2),o!==null&&(Ut(o,2),yo(o))}function pn(o,l,d){if(o.tag===3)_C(o,o,d);else for(;l!==null;){if(l.tag===3){_C(l,o,d);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Hs===null||!Hs.has(g))){o=Mi(d,o),d=LS(2),g=Ls(l,d,2),g!==null&&(IS(d,g,l,o),Ut(g,2),yo(g));break}}l=l.return}}function F1(o,l,d){var g=o.pingCache;if(g===null){g=o.pingCache=new bM;var v=new Set;g.set(l,v)}else v=g.get(l),v===void 0&&(v=new Set,g.set(l,v));v.has(d)||(O1=!0,v.add(d),o=EM.bind(null,o,l,d),l.then(o,o))}function EM(o,l,d){var g=o.pingCache;g!==null&&g.delete(l),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,wn===o&&(qt&d)===d&&(zn===4||zn===3&&(qt&62914560)===qt&&300>Ve()-Uh?(an&2)===0&&oc(o,0):M1|=d,rc===qt&&(rc=0)),yo(o)}function LC(o,l){l===0&&(l=nn()),o=Ha(o,l),o!==null&&(Ut(o,l),yo(o))}function kM(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),LC(o,d)}function TM(o,l){var d=0;switch(o.tag){case 31:case 13:var g=o.stateNode,v=o.memoizedState;v!==null&&(d=v.retryLane);break;case 19:g=o.stateNode;break;case 22:g=o.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(l),LC(o,d)}function NM(o,l){return be(o,l)}var Kh=null,ac=null,B1=!1,Qh=!1,H1=!1,Vs=0;function yo(o){o!==ac&&o.next===null&&(ac===null?Kh=ac=o:ac=ac.next=o),Qh=!0,B1||(B1=!0,AM())}function Gu(o,l){if(!H1&&Qh){H1=!0;do for(var d=!1,g=Kh;g!==null;){if(o!==0){var v=g.pendingLanes;if(v===0)var C=0;else{var M=g.suspendedLanes,z=g.pingedLanes;C=(1<<31-nt(42|o)+1)-1,C&=v&~(M&~z),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(d=!0,FC(g,C))}else C=qt,C=Ie(g,g===wn?C:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(C&3)===0||Pt(g,C)||(d=!0,FC(g,C));g=g.next}while(d);H1=!1}}function RM(){IC()}function IC(){Qh=B1=!1;var o=0;Vs!==0&&FM()&&(o=Vs);for(var l=Ve(),d=null,g=Kh;g!==null;){var v=g.next,C=PC(g,l);C===0?(g.next=null,d===null?Kh=v:d.next=v,v===null&&(ac=d)):(d=g,(o!==0||(C&3)!==0)&&(Qh=!0)),g=v}ar!==0&&ar!==5||Gu(o),Vs!==0&&(Vs=0)}function PC(o,l){for(var d=o.suspendedLanes,g=o.pingedLanes,v=o.expirationTimes,C=o.pendingLanes&-62914561;0<C;){var M=31-nt(C),z=1<<M,Z=v[M];Z===-1?((z&d)===0||(z&g)!==0)&&(v[M]=sn(z,l)):Z<=l&&(o.expiredLanes|=z),C&=~z}if(l=wn,d=qt,d=Ie(o,o===l?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g=o.callbackNode,d===0||o===l&&(hn===2||hn===9)||o.cancelPendingCommit!==null)return g!==null&&g!==null&&ne(g),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||Pt(o,d)){if(l=d&-d,l===o.callbackPriority)return l;switch(g!==null&&ne(g),Te(d)){case 2:case 8:d=Ee;break;case 32:d=Le;break;case 268435456:d=Ue;break;default:d=Le}return g=zC.bind(null,o),d=be(d,g),o.callbackPriority=l,o.callbackNode=d,l}return g!==null&&g!==null&&ne(g),o.callbackPriority=2,o.callbackNode=null,2}function zC(o,l){if(ar!==0&&ar!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(Gh()&&o.callbackNode!==d)return null;var g=qt;return g=Ie(o,o===wn?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g===0?null:(bC(o,g,l),PC(o,Ve()),o.callbackNode!=null&&o.callbackNode===d?zC.bind(null,o):null)}function FC(o,l){if(Gh())return null;bC(o,l,!0)}function AM(){HM(function(){(an&6)!==0?be(oe,RM):IC()})}function U1(){if(Vs===0){var o=Yl;o===0&&(o=ge,ge<<=1,(ge&261888)===0&&(ge=256)),Vs=o}return Vs}function BC(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:ih(""+o)}function HC(o,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,o.id&&d.setAttribute("form",o.id),l.parentNode.insertBefore(d,l),o=new FormData(o),d.parentNode.removeChild(d),o}function jM(o,l,d,g,v){if(l==="submit"&&d&&d.stateNode===v){var C=BC((v[et]||null).action),M=g.submitter;M&&(l=(l=M[et]||null)?BC(l.formAction):M.getAttribute("formAction"),l!==null&&(C=l,M=null));var z=new lh("action","action",null,g,v);o.push({event:z,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(Vs!==0){var Z=M?HC(v,M):new FormData(v);l1(d,{pending:!0,data:Z,method:v.method,action:C},null,Z)}}else typeof C=="function"&&(z.preventDefault(),Z=M?HC(v,M):new FormData(v),l1(d,{pending:!0,data:Z,method:v.method,action:C},C,Z))},currentTarget:v}]})}}for(var q1=0;q1<kg.length;q1++){var V1=kg[q1],OM=V1.toLowerCase(),MM=V1[0].toUpperCase()+V1.slice(1);to(OM,"on"+MM)}to(x3,"onAnimationEnd"),to(b3,"onAnimationIteration"),to(v3,"onAnimationStart"),to("dblclick","onDoubleClick"),to("focusin","onFocus"),to("focusout","onBlur"),to(G7,"onTransitionRun"),to(K7,"onTransitionStart"),to(Q7,"onTransitionCancel"),to(w3,"onTransitionEnd"),Ai("onMouseEnter",["mouseout","mouseover"]),Ai("onMouseLeave",["mouseout","mouseover"]),Ai("onPointerEnter",["pointerout","pointerover"]),Ai("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ku="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(" "),DM=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ku));function UC(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var g=o[d],v=g.event;g=g.listeners;e:{var C=void 0;if(l)for(var M=g.length-1;0<=M;M--){var z=g[M],Z=z.instance,ue=z.currentTarget;if(z=z.listener,Z!==C&&v.isPropagationStopped())break e;C=z,v.currentTarget=ue;try{C(v)}catch(ve){dh(ve)}v.currentTarget=null,C=Z}else for(M=0;M<g.length;M++){if(z=g[M],Z=z.instance,ue=z.currentTarget,z=z.listener,Z!==C&&v.isPropagationStopped())break e;C=z,v.currentTarget=ue;try{C(v)}catch(ve){dh(ve)}v.currentTarget=null,C=Z}}}}function Bt(o,l){var d=l[vt];d===void 0&&(d=l[vt]=new Set);var g=o+"__bubble";d.has(g)||(qC(l,o,2,!1),d.add(g))}function $1(o,l,d){var g=0;l&&(g|=4),qC(d,o,g,l)}var Xh="_reactListening"+Math.random().toString(36).slice(2);function Y1(o){if(!o[Xh]){o[Xh]=!0,Zi.forEach(function(d){d!=="selectionchange"&&(DM.has(d)||$1(d,!1,o),$1(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Xh]||(l[Xh]=!0,$1("selectionchange",!1,l))}}function qC(o,l,d,g){switch(x5(l)){case 2:var v=aD;break;case 8:v=lD;break;default:v=a2}d=v.bind(null,l,d,o),v=void 0,!fg||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),g?v!==void 0?o.addEventListener(l,d,{capture:!0,passive:v}):o.addEventListener(l,d,!0):v!==void 0?o.addEventListener(l,d,{passive:v}):o.addEventListener(l,d,!1)}function W1(o,l,d,g,v){var C=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var M=g.tag;if(M===3||M===4){var z=g.stateNode.containerInfo;if(z===v)break;if(M===4)for(M=g.return;M!==null;){var Z=M.tag;if((Z===3||Z===4)&&M.stateNode.containerInfo===v)return;M=M.return}for(;z!==null;){if(M=In(z),M===null)return;if(Z=M.tag,Z===5||Z===6||Z===26||Z===27){g=C=M;continue e}z=z.parentNode}}g=g.return}Gw(function(){var ue=C,ve=ug(d),Ne=[];e:{var fe=S3.get(o);if(fe!==void 0){var me=lh,rt=o;switch(o){case"keypress":if(sh(d)===0)break e;case"keydown":case"keyup":me=T7;break;case"focusin":rt="focus",me=gg;break;case"focusout":rt="blur",me=gg;break;case"beforeblur":case"afterblur":me=gg;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=Xw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=p7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=A7;break;case x3:case b3:case v3:me=y7;break;case w3:me=O7;break;case"scroll":case"scrollend":me=f7;break;case"wheel":me=D7;break;case"copy":case"cut":case"paste":me=b7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=Jw;break;case"toggle":case"beforetoggle":me=L7}var wt=(l&4)!==0,xn=!wt&&(o==="scroll"||o==="scrollend"),ie=wt?fe!==null?fe+"Capture":null:fe;wt=[];for(var re=ue,ce;re!==null;){var ke=re;if(ce=ke.stateNode,ke=ke.tag,ke!==5&&ke!==26&&ke!==27||ce===null||ie===null||(ke=yu(re,ie),ke!=null&&wt.push(Qu(re,ke,ce))),xn)break;re=re.return}0<wt.length&&(fe=new me(fe,rt,null,d,ve),Ne.push({event:fe,listeners:wt}))}}if((l&7)===0){e:{if(fe=o==="mouseover"||o==="pointerover",me=o==="mouseout"||o==="pointerout",fe&&d!==cg&&(rt=d.relatedTarget||d.fromElement)&&(In(rt)||rt[ut]))break e;if((me||fe)&&(fe=ve.window===ve?ve:(fe=ve.ownerDocument)?fe.defaultView||fe.parentWindow:window,me?(rt=d.relatedTarget||d.toElement,me=ue,rt=rt?In(rt):null,rt!==null&&(xn=s(rt),wt=rt.tag,rt!==xn||wt!==5&&wt!==27&&wt!==6)&&(rt=null)):(me=null,rt=ue),me!==rt)){if(wt=Xw,ke="onMouseLeave",ie="onMouseEnter",re="mouse",(o==="pointerout"||o==="pointerover")&&(wt=Jw,ke="onPointerLeave",ie="onPointerEnter",re="pointer"),xn=me==null?fe:fr(me),ce=rt==null?fe:fr(rt),fe=new wt(ke,re+"leave",me,d,ve),fe.target=xn,fe.relatedTarget=ce,ke=null,In(ve)===ue&&(wt=new wt(ie,re+"enter",rt,d,ve),wt.target=ce,wt.relatedTarget=xn,ke=wt),xn=ke,me&&rt)t:{for(wt=_M,ie=me,re=rt,ce=0,ke=ie;ke;ke=wt(ke))ce++;ke=0;for(var gt=re;gt;gt=wt(gt))ke++;for(;0<ce-ke;)ie=wt(ie),ce--;for(;0<ke-ce;)re=wt(re),ke--;for(;ce--;){if(ie===re||re!==null&&ie===re.alternate){wt=ie;break t}ie=wt(ie),re=wt(re)}wt=null}else wt=null;me!==null&&VC(Ne,fe,me,wt,!1),rt!==null&&xn!==null&&VC(Ne,xn,rt,wt,!0)}}e:{if(fe=ue?fr(ue):window,me=fe.nodeName&&fe.nodeName.toLowerCase(),me==="select"||me==="input"&&fe.type==="file")var rn=a3;else if(o3(fe))if(l3)rn=$7;else{rn=q7;var at=U7}else me=fe.nodeName,!me||me.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ue&&lg(ue.elementType)&&(rn=a3):rn=V7;if(rn&&(rn=rn(o,ue))){s3(Ne,rn,d,ve);break e}at&&at(o,fe,ue),o==="focusout"&&ue&&fe.type==="number"&&ue.memoizedProps.value!=null&&ag(fe,"number",fe.value)}switch(at=ue?fr(ue):window,o){case"focusin":(o3(at)||at.contentEditable==="true")&&(zl=at,Sg=ue,ku=null);break;case"focusout":ku=Sg=zl=null;break;case"mousedown":Cg=!0;break;case"contextmenu":case"mouseup":case"dragend":Cg=!1,g3(Ne,d,ve);break;case"selectionchange":if(W7)break;case"keydown":case"keyup":g3(Ne,d,ve)}var Mt;if(xg)e:{switch(o){case"compositionstart":var Vt="onCompositionStart";break e;case"compositionend":Vt="onCompositionEnd";break e;case"compositionupdate":Vt="onCompositionUpdate";break e}Vt=void 0}else Pl?r3(o,d)&&(Vt="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Vt="onCompositionStart");Vt&&(e3&&d.locale!=="ko"&&(Pl||Vt!=="onCompositionStart"?Vt==="onCompositionEnd"&&Pl&&(Mt=Kw()):(Rs=ve,hg="value"in Rs?Rs.value:Rs.textContent,Pl=!0)),at=Zh(ue,Vt),0<at.length&&(Vt=new Zw(Vt,o,null,d,ve),Ne.push({event:Vt,listeners:at}),Mt?Vt.data=Mt:(Mt=i3(d),Mt!==null&&(Vt.data=Mt)))),(Mt=P7?z7(o,d):F7(o,d))&&(Vt=Zh(ue,"onBeforeInput"),0<Vt.length&&(at=new Zw("onBeforeInput","beforeinput",null,d,ve),Ne.push({event:at,listeners:Vt}),at.data=Mt)),jM(Ne,o,ue,d,ve)}UC(Ne,l)})}function Qu(o,l,d){return{instance:o,listener:l,currentTarget:d}}function Zh(o,l){for(var d=l+"Capture",g=[];o!==null;){var v=o,C=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||C===null||(v=yu(o,d),v!=null&&g.unshift(Qu(o,v,C)),v=yu(o,l),v!=null&&g.push(Qu(o,v,C))),o.tag===3)return g;o=o.return}return[]}function _M(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function VC(o,l,d,g,v){for(var C=l._reactName,M=[];d!==null&&d!==g;){var z=d,Z=z.alternate,ue=z.stateNode;if(z=z.tag,Z!==null&&Z===g)break;z!==5&&z!==26&&z!==27||ue===null||(Z=ue,v?(ue=yu(d,C),ue!=null&&M.unshift(Qu(d,ue,Z))):v||(ue=yu(d,C),ue!=null&&M.push(Qu(d,ue,Z)))),d=d.return}M.length!==0&&o.push({event:l,listeners:M})}var LM=/\r\n?/g,IM=/\u0000|\uFFFD/g;function $C(o){return(typeof o=="string"?o:""+o).replace(LM,`
9
+ `).replace(IM,"")}function YC(o,l){return l=$C(l),$C(o)===l}function yn(o,l,d,g,v,C){switch(d){case"children":typeof g=="string"?l==="body"||l==="textarea"&&g===""||_l(o,g):(typeof g=="number"||typeof g=="bigint")&&l!=="body"&&_l(o,""+g);break;case"className":eo(o,"class",g);break;case"tabIndex":eo(o,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":eo(o,d,g);break;case"style":Yw(o,g,C);break;case"data":if(l!=="object"){eo(o,"data",g);break}case"src":case"href":if(g===""&&(l!=="a"||d!=="href")){o.removeAttribute(d);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=ih(""+g),o.setAttribute(d,g);break;case"action":case"formAction":if(typeof g=="function"){o.setAttribute(d,"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 C=="function"&&(d==="formAction"?(l!=="input"&&yn(o,l,"name",v.name,v,null),yn(o,l,"formEncType",v.formEncType,v,null),yn(o,l,"formMethod",v.formMethod,v,null),yn(o,l,"formTarget",v.formTarget,v,null)):(yn(o,l,"encType",v.encType,v,null),yn(o,l,"method",v.method,v,null),yn(o,l,"target",v.target,v,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=ih(""+g),o.setAttribute(d,g);break;case"onClick":g!=null&&(o.onclick=zo);break;case"onScroll":g!=null&&Bt("scroll",o);break;case"onScrollEnd":g!=null&&Bt("scrollend",o);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(d=g.__html,d!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"multiple":o.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":o.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){o.removeAttribute("xlink:href");break}d=ih(""+g),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,""+g):o.removeAttribute(d);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":g&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":g===!0?o.setAttribute(d,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,g):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?o.setAttribute(d,g):o.removeAttribute(d);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?o.removeAttribute(d):o.setAttribute(d,g);break;case"popover":Bt("beforetoggle",o),Bt("toggle",o),Yn(o,"popover",g);break;case"xlinkActuate":xr(o,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":xr(o,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":xr(o,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":xr(o,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":xr(o,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":xr(o,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":xr(o,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":xr(o,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":xr(o,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":Yn(o,"is",g);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=u7.get(d)||d,Yn(o,d,g))}}function G1(o,l,d,g,v,C){switch(d){case"style":Yw(o,g,C);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(d=g.__html,d!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"children":typeof g=="string"?_l(o,g):(typeof g=="number"||typeof g=="bigint")&&_l(o,""+g);break;case"onScroll":g!=null&&Bt("scroll",o);break;case"onScrollEnd":g!=null&&Bt("scrollend",o);break;case"onClick":g!=null&&(o.onclick=zo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ai.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(v=d.endsWith("Capture"),l=d.slice(2,v?d.length-7:void 0),C=o[et]||null,C=C!=null?C[d]:null,typeof C=="function"&&o.removeEventListener(l,C,v),typeof g=="function")){typeof C!="function"&&C!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(l,g,v);break e}d in o?o[d]=g:g===!0?o.setAttribute(d,""):Yn(o,d,g)}}}function Sr(o,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Bt("error",o),Bt("load",o);var g=!1,v=!1,C;for(C in d)if(d.hasOwnProperty(C)){var M=d[C];if(M!=null)switch(C){case"src":g=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:yn(o,l,C,M,d,null)}}v&&yn(o,l,"srcSet",d.srcSet,d,null),g&&yn(o,l,"src",d.src,d,null);return;case"input":Bt("invalid",o);var z=C=M=v=null,Z=null,ue=null;for(g in d)if(d.hasOwnProperty(g)){var ve=d[g];if(ve!=null)switch(g){case"name":v=ve;break;case"type":M=ve;break;case"checked":Z=ve;break;case"defaultChecked":ue=ve;break;case"value":C=ve;break;case"defaultValue":z=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,l));break;default:yn(o,l,g,ve,d,null)}}Uw(o,C,z,Z,ue,M,v,!1);return;case"select":Bt("invalid",o),g=M=C=null;for(v in d)if(d.hasOwnProperty(v)&&(z=d[v],z!=null))switch(v){case"value":C=z;break;case"defaultValue":M=z;break;case"multiple":g=z;default:yn(o,l,v,z,d,null)}l=C,d=M,o.multiple=!!g,l!=null?Dl(o,!!g,l,!1):d!=null&&Dl(o,!!g,d,!0);return;case"textarea":Bt("invalid",o),C=v=g=null;for(M in d)if(d.hasOwnProperty(M)&&(z=d[M],z!=null))switch(M){case"value":g=z;break;case"defaultValue":v=z;break;case"children":C=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(91));break;default:yn(o,l,M,z,d,null)}Vw(o,g,v,C);return;case"option":for(Z in d)d.hasOwnProperty(Z)&&(g=d[Z],g!=null)&&(Z==="selected"?o.selected=g&&typeof g!="function"&&typeof g!="symbol":yn(o,l,Z,g,d,null));return;case"dialog":Bt("beforetoggle",o),Bt("toggle",o),Bt("cancel",o),Bt("close",o);break;case"iframe":case"object":Bt("load",o);break;case"video":case"audio":for(g=0;g<Ku.length;g++)Bt(Ku[g],o);break;case"image":Bt("error",o),Bt("load",o);break;case"details":Bt("toggle",o);break;case"embed":case"source":case"link":Bt("error",o),Bt("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(ue in d)if(d.hasOwnProperty(ue)&&(g=d[ue],g!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:yn(o,l,ue,g,d,null)}return;default:if(lg(l)){for(ve in d)d.hasOwnProperty(ve)&&(g=d[ve],g!==void 0&&G1(o,l,ve,g,d,void 0));return}}for(z in d)d.hasOwnProperty(z)&&(g=d[z],g!=null&&yn(o,l,z,g,d,null))}function PM(o,l,d,g){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,C=null,M=null,z=null,Z=null,ue=null,ve=null;for(me in d){var Ne=d[me];if(d.hasOwnProperty(me)&&Ne!=null)switch(me){case"checked":break;case"value":break;case"defaultValue":Z=Ne;default:g.hasOwnProperty(me)||yn(o,l,me,null,g,Ne)}}for(var fe in g){var me=g[fe];if(Ne=d[fe],g.hasOwnProperty(fe)&&(me!=null||Ne!=null))switch(fe){case"type":C=me;break;case"name":v=me;break;case"checked":ue=me;break;case"defaultChecked":ve=me;break;case"value":M=me;break;case"defaultValue":z=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,l));break;default:me!==Ne&&yn(o,l,fe,me,g,Ne)}}sg(o,M,z,Z,ue,ve,C,v);return;case"select":me=M=z=fe=null;for(C in d)if(Z=d[C],d.hasOwnProperty(C)&&Z!=null)switch(C){case"value":break;case"multiple":me=Z;default:g.hasOwnProperty(C)||yn(o,l,C,null,g,Z)}for(v in g)if(C=g[v],Z=d[v],g.hasOwnProperty(v)&&(C!=null||Z!=null))switch(v){case"value":fe=C;break;case"defaultValue":z=C;break;case"multiple":M=C;default:C!==Z&&yn(o,l,v,C,g,Z)}l=z,d=M,g=me,fe!=null?Dl(o,!!d,fe,!1):!!g!=!!d&&(l!=null?Dl(o,!!d,l,!0):Dl(o,!!d,d?[]:"",!1));return;case"textarea":me=fe=null;for(z in d)if(v=d[z],d.hasOwnProperty(z)&&v!=null&&!g.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:yn(o,l,z,null,g,v)}for(M in g)if(v=g[M],C=d[M],g.hasOwnProperty(M)&&(v!=null||C!=null))switch(M){case"value":fe=v;break;case"defaultValue":me=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==C&&yn(o,l,M,v,g,C)}qw(o,fe,me);return;case"option":for(var rt in d)fe=d[rt],d.hasOwnProperty(rt)&&fe!=null&&!g.hasOwnProperty(rt)&&(rt==="selected"?o.selected=!1:yn(o,l,rt,null,g,fe));for(Z in g)fe=g[Z],me=d[Z],g.hasOwnProperty(Z)&&fe!==me&&(fe!=null||me!=null)&&(Z==="selected"?o.selected=fe&&typeof fe!="function"&&typeof fe!="symbol":yn(o,l,Z,fe,g,me));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 wt in d)fe=d[wt],d.hasOwnProperty(wt)&&fe!=null&&!g.hasOwnProperty(wt)&&yn(o,l,wt,null,g,fe);for(ue in g)if(fe=g[ue],me=d[ue],g.hasOwnProperty(ue)&&fe!==me&&(fe!=null||me!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,l));break;default:yn(o,l,ue,fe,g,me)}return;default:if(lg(l)){for(var xn in d)fe=d[xn],d.hasOwnProperty(xn)&&fe!==void 0&&!g.hasOwnProperty(xn)&&G1(o,l,xn,void 0,g,fe);for(ve in g)fe=g[ve],me=d[ve],!g.hasOwnProperty(ve)||fe===me||fe===void 0&&me===void 0||G1(o,l,ve,fe,g,me);return}}for(var ie in d)fe=d[ie],d.hasOwnProperty(ie)&&fe!=null&&!g.hasOwnProperty(ie)&&yn(o,l,ie,null,g,fe);for(Ne in g)fe=g[Ne],me=d[Ne],!g.hasOwnProperty(Ne)||fe===me||fe==null&&me==null||yn(o,l,Ne,fe,g,me)}function WC(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zM(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,d=performance.getEntriesByType("resource"),g=0;g<d.length;g++){var v=d[g],C=v.transferSize,M=v.initiatorType,z=v.duration;if(C&&z&&WC(M)){for(M=0,z=v.responseEnd,g+=1;g<d.length;g++){var Z=d[g],ue=Z.startTime;if(ue>z)break;var ve=Z.transferSize,Ne=Z.initiatorType;ve&&WC(Ne)&&(Z=Z.responseEnd,M+=ve*(Z<z?1:(z-ue)/(Z-ue)))}if(--g,l+=8*(C+M)/(v.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var K1=null,Q1=null;function Jh(o){return o.nodeType===9?o:o.ownerDocument}function GC(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 KC(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function X1(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Z1=null;function FM(){var o=window.event;return o&&o.type==="popstate"?o===Z1?!1:(Z1=o,!0):(Z1=null,!1)}var QC=typeof setTimeout=="function"?setTimeout:void 0,BM=typeof clearTimeout=="function"?clearTimeout:void 0,XC=typeof Promise=="function"?Promise:void 0,HM=typeof queueMicrotask=="function"?queueMicrotask:typeof XC<"u"?function(o){return XC.resolve(null).then(o).catch(UM)}:QC;function UM(o){setTimeout(function(){throw o})}function $s(o){return o==="head"}function ZC(o,l){var d=l,g=0;do{var v=d.nextSibling;if(o.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(g===0){o.removeChild(v),dc(l);return}g--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")g++;else if(d==="html")Xu(o.ownerDocument.documentElement);else if(d==="head"){d=o.ownerDocument.head,Xu(d);for(var C=d.firstChild;C;){var M=C.nextSibling,z=C.nodeName;C[Dn]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&C.rel.toLowerCase()==="stylesheet"||d.removeChild(C),C=M}}else d==="body"&&Xu(o.ownerDocument.body);d=v}while(d);dc(l)}function JC(o,l){var d=o;o=0;do{var g=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),g&&g.nodeType===8)if(d=g.data,d==="/$"){if(o===0)break;o--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||o++;d=g}while(d)}function J1(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":J1(d),Ln(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function qM(o,l,d,g){for(;o.nodeType===1;){var v=d;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!g&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(g){if(!o[Dn])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(C=o.getAttribute("rel"),C==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(C!==v.rel||o.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||o.getAttribute("title")!==(v.title==null?null:v.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(C=o.getAttribute("src"),(C!==(v.src==null?null:v.src)||o.getAttribute("type")!==(v.type==null?null:v.type)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&C&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var C=v.name==null?null:""+v.name;if(v.type==="hidden"&&o.getAttribute("name")===C)return o}else return o;if(o=Pi(o.nextSibling),o===null)break}return null}function VM(o,l,d){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=Pi(o.nextSibling),o===null))return null;return o}function e5(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=Pi(o.nextSibling),o===null))return null;return o}function e2(o){return o.data==="$?"||o.data==="$~"}function t2(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function $M(o,l){var d=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||d.readyState!=="loading")l();else{var g=function(){l(),d.removeEventListener("DOMContentLoaded",g)};d.addEventListener("DOMContentLoaded",g),o._reactRetry=g}}function Pi(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var n2=null;function t5(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"||d==="/&"){if(l===0)return Pi(o.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}o=o.nextSibling}return null}function n5(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return o;l--}else d!=="/$"&&d!=="/&"||l++}o=o.previousSibling}return null}function r5(o,l,d){switch(l=Jh(d),o){case"html":if(o=l.documentElement,!o)throw Error(r(452));return o;case"head":if(o=l.head,!o)throw Error(r(453));return o;case"body":if(o=l.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Xu(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);Ln(o)}var zi=new Map,i5=new Set;function ep(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var es=Y.d;Y.d={f:YM,r:WM,D:GM,C:KM,L:QM,m:XM,X:JM,S:ZM,M:eD};function YM(){var o=es.f(),l=$h();return o||l}function WM(o){var l=Yt(o);l!==null&&l.tag===5&&l.type==="form"?wS(l):es.r(o)}var lc=typeof document>"u"?null:document;function o5(o,l,d){var g=lc;if(g&&typeof l=="string"&&l){var v=ji(l);v='link[rel="'+o+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),i5.has(v)||(i5.add(v),o={rel:o,crossOrigin:d,href:l},g.querySelector(v)===null&&(l=g.createElement("link"),Sr(l,"link",o),An(l),g.head.appendChild(l)))}}function GM(o){es.D(o),o5("dns-prefetch",o,null)}function KM(o,l){es.C(o,l),o5("preconnect",o,l)}function QM(o,l,d){es.L(o,l,d);var g=lc;if(g&&o&&l){var v='link[rel="preload"][as="'+ji(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+ji(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+ji(d.imageSizes)+'"]')):v+='[href="'+ji(o)+'"]';var C=v;switch(l){case"style":C=cc(o);break;case"script":C=uc(o)}zi.has(C)||(o=p({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:o,as:l},d),zi.set(C,o),g.querySelector(v)!==null||l==="style"&&g.querySelector(Zu(C))||l==="script"&&g.querySelector(Ju(C))||(l=g.createElement("link"),Sr(l,"link",o),An(l),g.head.appendChild(l)))}}function XM(o,l){es.m(o,l);var d=lc;if(d&&o){var g=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+ji(g)+'"][href="'+ji(o)+'"]',C=v;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=uc(o)}if(!zi.has(C)&&(o=p({rel:"modulepreload",href:o},l),zi.set(C,o),d.querySelector(v)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Ju(C)))return}g=d.createElement("link"),Sr(g,"link",o),An(g),d.head.appendChild(g)}}}function ZM(o,l,d){es.S(o,l,d);var g=lc;if(g&&o){var v=Yr(g).hoistableStyles,C=cc(o);l=l||"default";var M=v.get(C);if(!M){var z={loading:0,preload:null};if(M=g.querySelector(Zu(C)))z.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":l},d),(d=zi.get(C))&&r2(o,d);var Z=M=g.createElement("link");An(Z),Sr(Z,"link",o),Z._p=new Promise(function(ue,ve){Z.onload=ue,Z.onerror=ve}),Z.addEventListener("load",function(){z.loading|=1}),Z.addEventListener("error",function(){z.loading|=2}),z.loading|=4,tp(M,l,g)}M={type:"stylesheet",instance:M,count:1,state:z},v.set(C,M)}}}function JM(o,l){es.X(o,l);var d=lc;if(d&&o){var g=Yr(d).hoistableScripts,v=uc(o),C=g.get(v);C||(C=d.querySelector(Ju(v)),C||(o=p({src:o,async:!0},l),(l=zi.get(v))&&i2(o,l),C=d.createElement("script"),An(C),Sr(C,"link",o),d.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},g.set(v,C))}}function eD(o,l){es.M(o,l);var d=lc;if(d&&o){var g=Yr(d).hoistableScripts,v=uc(o),C=g.get(v);C||(C=d.querySelector(Ju(v)),C||(o=p({src:o,async:!0,type:"module"},l),(l=zi.get(v))&&i2(o,l),C=d.createElement("script"),An(C),Sr(C,"link",o),d.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},g.set(v,C))}}function s5(o,l,d,g){var v=(v=J.current)?ep(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=cc(d.href),d=Yr(v).hoistableStyles,g=d.get(l),g||(g={type:"style",instance:null,count:0,state:null},d.set(l,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){o=cc(d.href);var C=Yr(v).hoistableStyles,M=C.get(o);if(M||(v=v.ownerDocument||v,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(o,M),(C=v.querySelector(Zu(o)))&&!C._p&&(M.instance=C,M.state.loading=5),zi.has(o)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},zi.set(o,d),C||tD(v,o,d,M.state))),l&&g===null)throw Error(r(528,""));return M}if(l&&g!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=uc(d),d=Yr(v).hoistableScripts,g=d.get(l),g||(g={type:"script",instance:null,count:0,state:null},d.set(l,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function cc(o){return'href="'+ji(o)+'"'}function Zu(o){return'link[rel="stylesheet"]['+o+"]"}function a5(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function tD(o,l,d,g){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?g.loading=1:(l=o.createElement("link"),g.preload=l,l.addEventListener("load",function(){return g.loading|=1}),l.addEventListener("error",function(){return g.loading|=2}),Sr(l,"link",d),An(l),o.head.appendChild(l))}function uc(o){return'[src="'+ji(o)+'"]'}function Ju(o){return"script[async]"+o}function l5(o,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var g=o.querySelector('style[data-href~="'+ji(d.href)+'"]');if(g)return l.instance=g,An(g),g;var v=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return g=(o.ownerDocument||o).createElement("style"),An(g),Sr(g,"style",v),tp(g,d.precedence,o),l.instance=g;case"stylesheet":v=cc(d.href);var C=o.querySelector(Zu(v));if(C)return l.state.loading|=4,l.instance=C,An(C),C;g=a5(d),(v=zi.get(v))&&r2(g,v),C=(o.ownerDocument||o).createElement("link"),An(C);var M=C;return M._p=new Promise(function(z,Z){M.onload=z,M.onerror=Z}),Sr(C,"link",g),l.state.loading|=4,tp(C,d.precedence,o),l.instance=C;case"script":return C=uc(d.src),(v=o.querySelector(Ju(C)))?(l.instance=v,An(v),v):(g=d,(v=zi.get(C))&&(g=p({},d),i2(g,v)),o=o.ownerDocument||o,v=o.createElement("script"),An(v),Sr(v,"link",g),o.head.appendChild(v),l.instance=v);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(g=l.instance,l.state.loading|=4,tp(g,d.precedence,o));return l.instance}function tp(o,l,d){for(var g=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=g.length?g[g.length-1]:null,C=v,M=0;M<g.length;M++){var z=g[M];if(z.dataset.precedence===l)C=z;else if(C!==v)break}C?C.parentNode.insertBefore(o,C.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(o,l.firstChild))}function r2(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function i2(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var np=null;function c5(o,l,d){if(np===null){var g=new Map,v=np=new Map;v.set(d,g)}else v=np,g=v.get(d),g||(g=new Map,v.set(d,g));if(g.has(o))return g;for(g.set(o,null),d=d.getElementsByTagName(o),v=0;v<d.length;v++){var C=d[v];if(!(C[Dn]||C[Xe]||o==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var M=C.getAttribute(l)||"";M=o+M;var z=g.get(M);z?z.push(C):g.set(M,[C])}}return g}function u5(o,l,d){o=o.ownerDocument||o,o.head.insertBefore(d,l==="title"?o.querySelector("head > title"):null)}function nD(o,l,d){if(d===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(o=l.disabled,typeof l.precedence=="string"&&o==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function d5(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function rD(o,l,d,g){if(d.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=cc(g.href),C=l.querySelector(Zu(v));if(C){l=C._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=rp.bind(o),l.then(o,o)),d.state.loading|=4,d.instance=C,An(C);return}C=l.ownerDocument||l,g=a5(g),(v=zi.get(v))&&r2(g,v),C=C.createElement("link"),An(C);var M=C;M._p=new Promise(function(z,Z){M.onload=z,M.onerror=Z}),Sr(C,"link",g),d.instance=C}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(o.count++,d=rp.bind(o),l.addEventListener("load",d),l.addEventListener("error",d))}}var o2=0;function iD(o,l){return o.stylesheets&&o.count===0&&op(o,o.stylesheets),0<o.count||0<o.imgCount?function(d){var g=setTimeout(function(){if(o.stylesheets&&op(o,o.stylesheets),o.unsuspend){var C=o.unsuspend;o.unsuspend=null,C()}},6e4+l);0<o.imgBytes&&o2===0&&(o2=62500*zM());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&op(o,o.stylesheets),o.unsuspend)){var C=o.unsuspend;o.unsuspend=null,C()}},(o.imgBytes>o2?50:800)+l);return o.unsuspend=d,function(){o.unsuspend=null,clearTimeout(g),clearTimeout(v)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var ip=null;function op(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,ip=new Map,l.forEach(oD,o),ip=null,rp.call(o))}function oD(o,l){if(!(l.state.loading&4)){var d=ip.get(o);if(d)var g=d.get(null);else{d=new Map,ip.set(o,d);for(var v=o.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<v.length;C++){var M=v[C];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(d.set(M.dataset.precedence,M),g=M)}g&&d.set(null,g)}v=l.instance,M=v.getAttribute("data-precedence"),C=d.get(M)||g,C===g&&d.set(null,v),d.set(M,v),this.count++,g=rp.bind(this),v.addEventListener("load",g),v.addEventListener("error",g),C?C.parentNode.insertBefore(v,C.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(v,o.firstChild)),l.state.loading|=4}}var ed={$$typeof:N,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function sD(o,l,d,g,v,C,M,z,Z){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=vn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vn(0),this.hiddenUpdates=vn(null),this.identifierPrefix=g,this.onUncaughtError=v,this.onCaughtError=C,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function f5(o,l,d,g,v,C,M,z,Z,ue,ve,Ne){return o=new sD(o,l,d,M,Z,ue,ve,Ne,z),l=1,C===!0&&(l|=24),C=ci(3,null,null,l),o.current=C,C.stateNode=o,l=zg(),l.refCount++,o.pooledCache=l,l.refCount++,C.memoizedState={element:g,isDehydrated:d,cache:l},Ug(C),o}function h5(o){return o?(o=Hl,o):Hl}function p5(o,l,d,g,v,C){v=h5(v),g.context===null?g.context=v:g.pendingContext=v,g=_s(l),g.payload={element:d},C=C===void 0?null:C,C!==null&&(g.callback=C),d=Ls(o,g,l),d!==null&&(Zr(d,o,l),Mu(d,o,l))}function m5(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function s2(o,l){m5(o,l),(o=o.alternate)&&m5(o,l)}function g5(o){if(o.tag===13||o.tag===31){var l=Ha(o,67108864);l!==null&&Zr(l,o,67108864),s2(o,67108864)}}function y5(o){if(o.tag===13||o.tag===31){var l=pi();l=ae(l);var d=Ha(o,l);d!==null&&Zr(d,o,l),s2(o,l)}}var sp=!0;function aD(o,l,d,g){var v=P.T;P.T=null;var C=Y.p;try{Y.p=2,a2(o,l,d,g)}finally{Y.p=C,P.T=v}}function lD(o,l,d,g){var v=P.T;P.T=null;var C=Y.p;try{Y.p=8,a2(o,l,d,g)}finally{Y.p=C,P.T=v}}function a2(o,l,d,g){if(sp){var v=l2(g);if(v===null)W1(o,l,g,ap,d),b5(o,g);else if(uD(v,o,l,d,g))g.stopPropagation();else if(b5(o,g),l&4&&-1<cD.indexOf(o)){for(;v!==null;){var C=Yt(v);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var M=Rt(C.pendingLanes);if(M!==0){var z=C;for(z.pendingLanes|=2,z.entangledLanes|=2;M;){var Z=1<<31-nt(M);z.entanglements[1]|=Z,M&=~Z}yo(C),(an&6)===0&&(qh=Ve()+500,Gu(0))}}break;case 31:case 13:z=Ha(C,2),z!==null&&Zr(z,C,2),$h(),s2(C,2)}if(C=l2(g),C===null&&W1(o,l,g,ap,d),C===v)break;v=C}v!==null&&g.stopPropagation()}else W1(o,l,g,null,d)}}function l2(o){return o=ug(o),c2(o)}var ap=null;function c2(o){if(ap=null,o=In(o),o!==null){var l=s(o);if(l===null)o=null;else{var d=l.tag;if(d===13){if(o=a(l),o!==null)return o;o=null}else if(d===31){if(o=c(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return ap=o,null}function x5(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(ct()){case oe:return 2;case Ee:return 8;case Le:case Me:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var u2=!1,Ys=null,Ws=null,Gs=null,td=new Map,nd=new Map,Ks=[],cD="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 b5(o,l){switch(o){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Ws=null;break;case"mouseover":case"mouseout":Gs=null;break;case"pointerover":case"pointerout":td.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":nd.delete(l.pointerId)}}function rd(o,l,d,g,v,C){return o===null||o.nativeEvent!==C?(o={blockedOn:l,domEventName:d,eventSystemFlags:g,nativeEvent:C,targetContainers:[v]},l!==null&&(l=Yt(l),l!==null&&g5(l)),o):(o.eventSystemFlags|=g,l=o.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),o)}function uD(o,l,d,g,v){switch(l){case"focusin":return Ys=rd(Ys,o,l,d,g,v),!0;case"dragenter":return Ws=rd(Ws,o,l,d,g,v),!0;case"mouseover":return Gs=rd(Gs,o,l,d,g,v),!0;case"pointerover":var C=v.pointerId;return td.set(C,rd(td.get(C)||null,o,l,d,g,v)),!0;case"gotpointercapture":return C=v.pointerId,nd.set(C,rd(nd.get(C)||null,o,l,d,g,v)),!0}return!1}function v5(o){var l=In(o.target);if(l!==null){var d=s(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){o.blockedOn=l,st(o.priority,function(){y5(d)});return}}else if(l===31){if(l=c(d),l!==null){o.blockedOn=l,st(o.priority,function(){y5(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function lp(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=l2(o.nativeEvent);if(d===null){d=o.nativeEvent;var g=new d.constructor(d.type,d);cg=g,d.target.dispatchEvent(g),cg=null}else return l=Yt(d),l!==null&&g5(l),o.blockedOn=d,!1;l.shift()}return!0}function w5(o,l,d){lp(o)&&d.delete(l)}function dD(){u2=!1,Ys!==null&&lp(Ys)&&(Ys=null),Ws!==null&&lp(Ws)&&(Ws=null),Gs!==null&&lp(Gs)&&(Gs=null),td.forEach(w5),nd.forEach(w5)}function cp(o,l){o.blockedOn===l&&(o.blockedOn=null,u2||(u2=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,dD)))}var up=null;function S5(o){up!==o&&(up=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){up===o&&(up=null);for(var l=0;l<o.length;l+=3){var d=o[l],g=o[l+1],v=o[l+2];if(typeof g!="function"){if(c2(g||d)===null)continue;break}var C=Yt(d);C!==null&&(o.splice(l,3),l-=3,l1(C,{pending:!0,data:v,method:d.method,action:g},g,v))}}))}function dc(o){function l(Z){return cp(Z,o)}Ys!==null&&cp(Ys,o),Ws!==null&&cp(Ws,o),Gs!==null&&cp(Gs,o),td.forEach(l),nd.forEach(l);for(var d=0;d<Ks.length;d++){var g=Ks[d];g.blockedOn===o&&(g.blockedOn=null)}for(;0<Ks.length&&(d=Ks[0],d.blockedOn===null);)v5(d),d.blockedOn===null&&Ks.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(g=0;g<d.length;g+=3){var v=d[g],C=d[g+1],M=v[et]||null;if(typeof C=="function")M||S5(d);else if(M){var z=null;if(C&&C.hasAttribute("formAction")){if(v=C,M=C[et]||null)z=M.formAction;else if(c2(v)!==null)continue}else z=M.action;typeof z=="function"?d[g+1]=z:(d.splice(g,3),g-=3),S5(d)}}}function C5(){function o(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(M){return v=M})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),g||setTimeout(d,20)}function d(){if(!g&&!navigation.transition){var C=navigation.currentEntry;C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,v=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){g=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function d2(o){this._internalRoot=o}dp.prototype.render=d2.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,g=pi();p5(d,g,o,l,null,null)},dp.prototype.unmount=d2.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;p5(o.current,2,null,o,null,null),$h(),l[ut]=null}};function dp(o){this._internalRoot=o}dp.prototype.unstable_scheduleHydration=function(o){if(o){var l=He();o={blockedOn:null,target:o,priority:l};for(var d=0;d<Ks.length&&l!==0&&l<Ks[d].priority;d++);Ks.splice(d,0,o),d===0&&v5(o)}};var E5=t.version;if(E5!=="19.2.4")throw Error(r(527,E5,"19.2.4"));Y.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=h(l),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var fD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fp.isDisabled&&fp.supportsFiber)try{Je=fp.inject(fD),Ke=fp}catch{}}return od.createRoot=function(o,l){if(!i(o))throw Error(r(299));var d=!1,g="",v=OS,C=MS,M=DS;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(C=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError)),l=f5(o,1,!1,null,null,d,g,null,v,C,M,C5),o[ut]=l.current,Y1(o),new d2(l)},od.hydrateRoot=function(o,l,d){if(!i(o))throw Error(r(299));var g=!1,v="",C=OS,M=MS,z=DS,Z=null;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(C=d.onUncaughtError),d.onCaughtError!==void 0&&(M=d.onCaughtError),d.onRecoverableError!==void 0&&(z=d.onRecoverableError),d.formState!==void 0&&(Z=d.formState)),l=f5(o,1,!0,l,d??null,g,v,Z,C,M,z,C5),l.context=h5(null),d=l.current,g=pi(),g=ae(g),v=_s(g),v.callback=null,Ls(d,v,g),d=g,l.current.lanes=d,Ut(l,d),yo(l),o[ut]=l.current,Y1(o),new dp(l)},od.version="19.2.4",od}var _5;function SD(){if(_5)return h2.exports;_5=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(),h2.exports=wD(),h2.exports}var CD=SD(),S=vf();const le=eu(S),nb=pD({__proto__:null,default:le},[S]);var ED=(e,t,n,r,i,s,a,c)=>{let u=document.documentElement,h=["light","dark"];function m(x){(Array.isArray(e)?e:[e]).forEach(b=>{let w=b==="class",E=w&&s?i.map(k=>s[k]||k):i;w?(u.classList.remove(...E),u.classList.add(s&&s[x]?s[x]:x)):u.setAttribute(b,x)}),p(x)}function p(x){c&&h.includes(x)&&(u.style.colorScheme=x)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let x=localStorage.getItem(t)||n,b=a&&x==="system"?y():x;m(b)}catch{}},kD=S.createContext(void 0),TD={setTheme:e=>{},themes:[]},ND=()=>{var e;return(e=S.useContext(kD))!=null?e:TD};S.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:s,value:a,themes:c,nonce:u,scriptProps:h})=>{let m=JSON.stringify([n,t,s,e,c,a,r,i]).slice(1,-1);return S.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${ED.toString()})(${m})`}})});var Ci=g6();const RD=eu(Ci);function AD(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 jD=e=>{switch(e){case"success":return DD;case"info":return LD;case"warning":return _D;case"error":return ID;default:return null}},OD=Array(12).fill(0),MD=({visible:e,className:t})=>le.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},le.createElement("div",{className:"sonner-spinner"},OD.map((n,r)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),DD=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),_D=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.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"})),LD=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),ID=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),PD=le.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"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),zD=()=>{const[e,t]=le.useState(document.hidden);return le.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let My=1;class FD{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,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:My++,a=this.toasts.find(u=>u.id===s),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...t,id:s,title:r}),{...u,...t,id:s,dismissible:c,title:r}):u):this.addToast({title:r,...i,dismissible:c,id:s}),s},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 s=r!==void 0,a;const c=i.then(async h=>{if(a=["resolve",h],le.isValidElement(h))s=!1,this.create({id:r,type:"default",message:h});else if(HD(h)&&!h.ok){s=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,b=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:y,...b})}else if(h instanceof Error){s=!1;const p=typeof n.error=="function"?await n.error(h):n.error,y=typeof n.description=="function"?await n.description(h):n.description,b=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:y,...b})}else if(n.success!==void 0){s=!1;const p=typeof n.success=="function"?await n.success(h):n.success,y=typeof n.description=="function"?await n.description(h):n.description,b=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:y,...b})}}).catch(async h=>{if(a=["reject",h],n.error!==void 0){s=!1;const m=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,x=typeof m=="object"&&!le.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:p,...x})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),u=()=>new Promise((h,m)=>c.then(()=>a[0]==="reject"?m(a[1]):h(a[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:u}:Object.assign(r,{unwrap:u})},this.custom=(t,n)=>{const r=n?.id||My++;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 ei=new FD,BD=(e,t)=>{const n=t?.id||My++;return ei.addToast({title:e,...t,id:n}),n},HD=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",UD=BD,qD=()=>ei.toasts,VD=()=>ei.getActiveToasts(),lt=Object.assign(UD,{success:ei.success,info:ei.info,warning:ei.warning,error:ei.error,custom:ei.custom,message:ei.message,promise:ei.promise,dismiss:ei.dismiss,loading:ei.loading},{getHistory:qD,getToasts:VD});AD("[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 hp(e){return e.label!==void 0}const $D=3,YD="24px",WD="16px",L5=4e3,GD=356,KD=14,QD=45,XD=200;function xo(...e){return e.filter(Boolean).join(" ")}function ZD(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const JD=e=>{var t,n,r,i,s,a,c,u,h;const{invert:m,toast:p,unstyled:y,interacting:x,setHeights:b,visibleToasts:w,heights:E,index:k,toasts:T,expanded:N,removeToast:O,defaultRichColors:j,closeButton:A,style:R,cancelButtonStyle:_,actionButtonStyle:F,className:I="",descriptionClassName:H="",duration:q,position:V,gap:$,expandByDefault:U,classNames:P,icons:Y,closeButtonAriaLabel:G="Close toast"}=e,[X,L]=le.useState(null),[B,W]=le.useState(null),[D,Q]=le.useState(!1),[ee,J]=le.useState(!1),[he,de]=le.useState(!1),[Se,Re]=le.useState(!1),[je,Fe]=le.useState(!1),[_e,De]=le.useState(0),[xe,Ge]=le.useState(0),we=le.useRef(p.duration||q||L5),Ae=le.useRef(null),pe=le.useRef(null),be=k===0,ne=k+1<=w,ye=p.type,Ce=p.dismissible!==!1,Ve=p.className||"",ct=p.descriptionClassName||"",oe=le.useMemo(()=>E.findIndex(Ie=>Ie.toastId===p.id)||0,[E,p.id]),Ee=le.useMemo(()=>{var Ie;return(Ie=p.closeButton)!=null?Ie:A},[p.closeButton,A]),Le=le.useMemo(()=>p.duration||q||L5,[p.duration,q]),Me=le.useRef(0),Ue=le.useRef(0),dt=le.useRef(0),xt=le.useRef(null),[Je,Ke]=V.split("-"),bt=le.useMemo(()=>E.reduce((Ie,Pt,sn)=>sn>=oe?Ie:Ie+Pt.height,0),[E,oe]),nt=zD(),Qe=p.invert||m,Ct=ye==="loading";Ue.current=le.useMemo(()=>oe*$+bt,[oe,bt]),le.useEffect(()=>{we.current=Le},[Le]),le.useEffect(()=>{Q(!0)},[]),le.useEffect(()=>{const Ie=pe.current;if(Ie){const Pt=Ie.getBoundingClientRect().height;return Ge(Pt),b(sn=>[{toastId:p.id,height:Pt,position:p.position},...sn]),()=>b(sn=>sn.filter(nn=>nn.toastId!==p.id))}},[b,p.id]),le.useLayoutEffect(()=>{if(!D)return;const Ie=pe.current,Pt=Ie.style.height;Ie.style.height="auto";const sn=Ie.getBoundingClientRect().height;Ie.style.height=Pt,Ge(sn),b(nn=>nn.find(Ut=>Ut.toastId===p.id)?nn.map(Ut=>Ut.toastId===p.id?{...Ut,height:sn}:Ut):[{toastId:p.id,height:sn,position:p.position},...nn])},[D,p.title,p.description,b,p.id,p.jsx,p.action,p.cancel]);const $e=le.useCallback(()=>{J(!0),De(Ue.current),b(Ie=>Ie.filter(Pt=>Pt.toastId!==p.id)),setTimeout(()=>{O(p)},XD)},[p,O,b,Ue]);le.useEffect(()=>{if(p.promise&&ye==="loading"||p.duration===1/0||p.type==="loading")return;let Ie;return N||x||nt?(()=>{if(dt.current<Me.current){const nn=new Date().getTime()-Me.current;we.current=we.current-nn}dt.current=new Date().getTime()})():we.current!==1/0&&(Me.current=new Date().getTime(),Ie=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),$e()},we.current)),()=>clearTimeout(Ie)},[N,x,p,ye,nt,$e]),le.useEffect(()=>{p.delete&&($e(),p.onDismiss==null||p.onDismiss.call(p,p))},[$e,p.delete]);function ge(){var Ie;if(Y?.loading){var Pt;return le.createElement("div",{className:xo(P?.loader,p==null||(Pt=p.classNames)==null?void 0:Pt.loader,"sonner-loader"),"data-visible":ye==="loading"},Y.loading)}return le.createElement(MD,{className:xo(P?.loader,p==null||(Ie=p.classNames)==null?void 0:Ie.loader),visible:ye==="loading"})}const Oe=p.icon||Y?.[ye]||jD(ye);var Ye,Rt;return le.createElement("li",{tabIndex:0,ref:pe,className:xo(I,Ve,P?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,P?.default,P?.[ye],p==null||(n=p.classNames)==null?void 0:n[ye]),"data-sonner-toast":"","data-rich-colors":(Ye=p.richColors)!=null?Ye:j,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":D,"data-promise":!!p.promise,"data-swiped":je,"data-removed":ee,"data-visible":ne,"data-y-position":Je,"data-x-position":Ke,"data-index":k,"data-front":be,"data-swiping":he,"data-dismissible":Ce,"data-type":ye,"data-invert":Qe,"data-swipe-out":Se,"data-swipe-direction":B,"data-expanded":!!(N||U&&D),"data-testid":p.testId,style:{"--index":k,"--toasts-before":k,"--z-index":T.length-k,"--offset":`${ee?_e:Ue.current}px`,"--initial-height":U?"auto":`${xe}px`,...R,...p.style},onDragEnd:()=>{de(!1),L(null),xt.current=null},onPointerDown:Ie=>{Ie.button!==2&&(Ct||!Ce||(Ae.current=new Date,De(Ue.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(de(!0),xt.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,Pt,sn;if(Se||!Ce)return;xt.current=null;const nn=Number(((Ie=pe.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((Pt=pe.current)==null?void 0:Pt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ut=new Date().getTime()-((sn=Ae.current)==null?void 0:sn.getTime()),yt=X==="x"?nn:vn,zt=Math.abs(yt)/Ut;if(Math.abs(yt)>=QD||zt>.11){De(Ue.current),p.onDismiss==null||p.onDismiss.call(p,p),W(X==="x"?nn>0?"right":"left":vn>0?"down":"up"),$e(),Re(!0);return}else{var K,te;(K=pe.current)==null||K.style.setProperty("--swipe-amount-x","0px"),(te=pe.current)==null||te.style.setProperty("--swipe-amount-y","0px")}Fe(!1),de(!1),L(null)},onPointerMove:Ie=>{var Pt,sn,nn;if(!xt.current||!Ce||((Pt=window.getSelection())==null?void 0:Pt.toString().length)>0)return;const Ut=Ie.clientY-xt.current.y,yt=Ie.clientX-xt.current.x;var zt;const K=(zt=e.swipeDirections)!=null?zt:ZD(V);!X&&(Math.abs(yt)>1||Math.abs(Ut)>1)&&L(Math.abs(yt)>Math.abs(Ut)?"x":"y");let te={x:0,y:0};const ae=Te=>1/(1.5+Math.abs(Te)/20);if(X==="y"){if(K.includes("top")||K.includes("bottom"))if(K.includes("top")&&Ut<0||K.includes("bottom")&&Ut>0)te.y=Ut;else{const Te=Ut*ae(Ut);te.y=Math.abs(Te)<Math.abs(Ut)?Te:Ut}}else if(X==="x"&&(K.includes("left")||K.includes("right")))if(K.includes("left")&&yt<0||K.includes("right")&&yt>0)te.x=yt;else{const Te=yt*ae(yt);te.x=Math.abs(Te)<Math.abs(yt)?Te:yt}(Math.abs(te.x)>0||Math.abs(te.y)>0)&&Fe(!0),(sn=pe.current)==null||sn.style.setProperty("--swipe-amount-x",`${te.x}px`),(nn=pe.current)==null||nn.style.setProperty("--swipe-amount-y",`${te.y}px`)}},Ee&&!p.jsx&&ye!=="loading"?le.createElement("button",{"aria-label":G,"data-disabled":Ct,"data-close-button":!0,onClick:Ct||!Ce?()=>{}:()=>{$e(),p.onDismiss==null||p.onDismiss.call(p,p)},className:xo(P?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Rt=Y?.close)!=null?Rt:PD):null,(ye||p.icon||p.promise)&&p.icon!==null&&(Y?.[ye]!==null||p.icon)?le.createElement("div",{"data-icon":"",className:xo(P?.icon,p==null||(i=p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ge():null,p.type!=="loading"?Oe:null):null,le.createElement("div",{"data-content":"",className:xo(P?.content,p==null||(s=p.classNames)==null?void 0:s.content)},le.createElement("div",{"data-title":"",className:xo(P?.title,p==null||(a=p.classNames)==null?void 0:a.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?le.createElement("div",{"data-description":"",className:xo(H,ct,P?.description,p==null||(c=p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),le.isValidElement(p.cancel)?p.cancel:p.cancel&&hp(p.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||_,onClick:Ie=>{hp(p.cancel)&&Ce&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ie),$e())},className:xo(P?.cancelButton,p==null||(u=p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,le.isValidElement(p.action)?p.action:p.action&&hp(p.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||F,onClick:Ie=>{hp(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ie),!Ie.defaultPrevented&&$e())},className:xo(P?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function I5(){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 e_(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,a=s?"--mobile-offset":"--offset",c=s?WD:YD;function u(h){["top","right","bottom","left"].forEach(m=>{n[`${a}-${m}`]=typeof h=="number"?`${h}px`:h})}typeof r=="number"||typeof r=="string"?u(r):typeof r=="object"?["top","right","bottom","left"].forEach(h=>{r[h]===void 0?n[`${a}-${h}`]=c:n[`${a}-${h}`]=typeof r[h]=="number"?`${r[h]}px`:r[h]}):u(c)}),n}const t_=le.forwardRef(function(t,n){const{id:r,invert:i,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:c,closeButton:u,className:h,offset:m,mobileOffset:p,theme:y="light",richColors:x,duration:b,style:w,visibleToasts:E=$D,toastOptions:k,dir:T=I5(),gap:N=KD,icons:O,containerAriaLabel:j="Notifications"}=t,[A,R]=le.useState([]),_=le.useMemo(()=>r?A.filter(D=>D.toasterId===r):A.filter(D=>!D.toasterId),[A,r]),F=le.useMemo(()=>Array.from(new Set([s].concat(_.filter(D=>D.position).map(D=>D.position)))),[_,s]),[I,H]=le.useState([]),[q,V]=le.useState(!1),[$,U]=le.useState(!1),[P,Y]=le.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=le.useRef(null),X=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=le.useRef(null),B=le.useRef(!1),W=le.useCallback(D=>{R(Q=>{var ee;return(ee=Q.find(J=>J.id===D.id))!=null&&ee.delete||ei.dismiss(D.id),Q.filter(({id:J})=>J!==D.id)})},[]);return le.useEffect(()=>ei.subscribe(D=>{if(D.dismiss){requestAnimationFrame(()=>{R(Q=>Q.map(ee=>ee.id===D.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{RD.flushSync(()=>{R(Q=>{const ee=Q.findIndex(J=>J.id===D.id);return ee!==-1?[...Q.slice(0,ee),{...Q[ee],...D},...Q.slice(ee+1)]:[D,...Q]})})})}),[A]),le.useEffect(()=>{if(y!=="system"){Y(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const D=window.matchMedia("(prefers-color-scheme: dark)");try{D.addEventListener("change",({matches:Q})=>{Y(Q?"dark":"light")})}catch{D.addListener(({matches:ee})=>{try{Y(ee?"dark":"light")}catch(J){console.error(J)}})}},[y]),le.useEffect(()=>{A.length<=1&&V(!1)},[A]),le.useEffect(()=>{const D=Q=>{var ee;if(a.every(de=>Q[de]||Q.code===de)){var he;V(!0),(he=G.current)==null||he.focus()}Q.code==="Escape"&&(document.activeElement===G.current||(ee=G.current)!=null&&ee.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[a]),le.useEffect(()=>{if(G.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,B.current=!1)}},[G.current]),le.createElement("section",{ref:n,"aria-label":`${j} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((D,Q)=>{var ee;const[J,he]=D.split("-");return _.length?le.createElement("ol",{key:D,dir:T==="auto"?I5():T,tabIndex:-1,ref:G,className:h,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":J,"data-x-position":he,style:{"--front-toast-height":`${((ee=I[0])==null?void 0:ee.height)||0}px`,"--width":`${GD}px`,"--gap":`${N}px`,...w,...e_(m,p)},onBlur:de=>{B.current&&!de.currentTarget.contains(de.relatedTarget)&&(B.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||B.current||(B.current=!0,L.current=de.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{$||V(!1)},onDragEnd:()=>V(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},_.filter(de=>!de.position&&Q===0||de.position===D).map((de,Se)=>{var Re,je;return le.createElement(JD,{key:de.id,icons:O,index:Se,toast:de,defaultRichColors:x,duration:(Re=k?.duration)!=null?Re:b,className:k?.className,descriptionClassName:k?.descriptionClassName,invert:i,visibleToasts:E,closeButton:(je=k?.closeButton)!=null?je:u,interacting:$,position:D,style:k?.style,unstyled:k?.unstyled,classNames:k?.classNames,cancelButtonStyle:k?.cancelButtonStyle,actionButtonStyle:k?.actionButtonStyle,closeButtonAriaLabel:k?.closeButtonAriaLabel,removeToast:W,toasts:_.filter(Fe=>Fe.position==de.position),heights:I.filter(Fe=>Fe.position==de.position),setHeights:H,expandByDefault:c,gap:N,expanded:q,swipeDirections:t.swipeDirections})})):null}))});const y6=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const n_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const r_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const P5=e=>{const t=r_(e);return t.charAt(0).toUpperCase()+t.slice(1)};var i_={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 o_=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const s_=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...c},u)=>S.createElement("svg",{ref:u,...i_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:y6("lucide",i),...!s&&!o_(c)&&{"aria-hidden":"true"},...c},[...a.map(([h,m])=>S.createElement(h,m)),...Array.isArray(s)?s:[s]]));const Qn=(e,t)=>{const n=S.forwardRef(({className:r,...i},s)=>S.createElement(s_,{ref:s,iconNode:t,className:y6(`lucide-${n_(P5(e))}`,`lucide-${e}`,r),...i}));return n.displayName=P5(e),n};const a_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wf=Qn("check",a_);const l_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],r0=Qn("chevron-down",l_);const c_=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],x6=Qn("chevron-left",c_);const u_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],i0=Qn("chevron-right",u_);const d_=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],f_=Qn("chevron-up",d_);const h_=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],p_=Qn("chevrons-left",h_);const m_=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],g_=Qn("chevrons-right",m_);const y_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],x_=Qn("circle-check",y_);const b_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],v_=Qn("circle",b_);const w_=[["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"}]],S_=Qn("copy",w_);const C_=[["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"}]],E_=Qn("ellipsis-vertical",C_);const k_=[["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"}]],T_=Qn("ellipsis",k_);const N_=[["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"}]],b6=Qn("file-text",N_);const R_=[["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"}]],Dy=Qn("folder",R_);const A_=[["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"}]],j_=Qn("history",A_);const O_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],M_=Qn("info",O_);const D_=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gd=Qn("loader-circle",D_);const __=[["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"}]],L_=Qn("octagon-x",__);const I_=[["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"}]],P_=Qn("pencil",I_);const z_=[["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"}]],F_=Qn("triangle-alert",z_);const B_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],o0=Qn("x",B_),H_=({...e})=>{const{theme:t="system"}=ND();return f.jsx(t_,{theme:t,className:"toaster group",icons:{success:f.jsx(x_,{className:"size-5 text-green-500"}),info:f.jsx(M_,{className:"size-5 text-blue-500"}),warning:f.jsx(F_,{className:"size-5 text-yellow-500"}),error:f.jsx(L_,{className:"size-5 text-red-500"}),loading:f.jsx(Gd,{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 v6=e=>{throw TypeError(e)},U_=(e,t,n)=>t.has(e)||v6("Cannot "+n),x2=(e,t,n)=>(U_(e,t,"read from private field"),n?n.call(e):t.get(e)),q_=(e,t,n)=>t.has(e)?v6("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),z5="popstate";function V_(e={}){function t(r,i){let{pathname:s,search:a,hash:c}=r.location;return Kd("",{pathname:s,search:a,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Ao(i)}return Y_(t,n,null,e)}function It(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Un(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $_(){return Math.random().toString(36).substring(2,10)}function F5(e,t){return{usr:e.state,key:e.key,idx:t}}function Kd(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ba(t):t,state:n,key:t&&t.key||r||$_()}}function Ao({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 ba(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 Y_(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,c="POP",u=null,h=m();h==null&&(h=0,a.replaceState({...a.state,idx:h},""));function m(){return(a.state||{idx:null}).idx}function p(){c="POP";let E=m(),k=E==null?null:E-h;h=E,u&&u({action:c,location:w.location,delta:k})}function y(E,k){c="PUSH";let T=Kd(w.location,E,k);h=m()+1;let N=F5(T,h),O=w.createHref(T);try{a.pushState(N,"",O)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(O)}s&&u&&u({action:c,location:w.location,delta:1})}function x(E,k){c="REPLACE";let T=Kd(w.location,E,k);h=m();let N=F5(T,h),O=w.createHref(T);a.replaceState(N,"",O),s&&u&&u({action:c,location:w.location,delta:0})}function b(E){return w6(E)}let w={get action(){return c},get location(){return e(i,a)},listen(E){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(z5,p),u=E,()=>{i.removeEventListener(z5,p),u=null}},createHref(E){return t(i,E)},createURL:b,encodeLocation(E){let k=b(E);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:y,replace:x,go(E){return a.go(E)}};return w}function w6(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),It(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ao(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var Nd,B5=class{constructor(e){if(q_(this,Nd,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(x2(this,Nd).has(e))return x2(this,Nd).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){x2(this,Nd).set(e,t)}};Nd=new WeakMap;var W_=new Set(["lazy","caseSensitive","path","id","index","children"]);function G_(e){return W_.has(e)}var K_=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Q_(e){return K_.has(e)}function X_(e){return e.index===!0}function Qd(e,t,n=[],r={},i=!1){return e.map((s,a)=>{let c=[...n,String(a)],u=typeof s.id=="string"?s.id:c.join("-");if(It(s.index!==!0||!s.children,"Cannot specify children on an index route"),It(i||!r[u],`Found a route id collision on id "${u}". Route id's must be globally unique within Data Router usages`),X_(s)){let h={...s,id:u};return r[u]=H5(h,t(h)),h}else{let h={...s,id:u,children:void 0};return r[u]=H5(h,t(h)),s.children&&(h.children=Qd(s.children,t,c,r,i)),h}})}function H5(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ta(e,t,n="/"){return Rd(e,t,n,!1)}function Rd(e,t,n,r){let i=typeof t=="string"?ba(t):t,s=Gi(i.pathname||"/",n);if(s==null)return null;let a=S6(e);J_(a);let c=null;for(let u=0;c==null&&u<a.length;++u){let h=uL(s);c=lL(a[u],h,r)}return c}function Z_(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 S6(e,t=[],n=[],r="",i=!1){let s=(a,c,u=i,h)=>{let m={relativePath:h===void 0?a.path||"":h,caseSensitive:a.caseSensitive===!0,childrenIndex:c,route:a};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&u)return;It(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let p=Eo([r,m.relativePath]),y=n.concat(m);a.children&&a.children.length>0&&(It(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),S6(a.children,t,y,p,u)),!(a.path==null&&!a.index)&&t.push({path:p,score:sL(p,a.index),routesMeta:y})};return e.forEach((a,c)=>{if(a.path===""||!a.path?.includes("?"))s(a,c);else for(let u of C6(a.path))s(a,c,!0,u)}),t}function C6(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=C6(r.join("/")),c=[];return c.push(...a.map(u=>u===""?s:[s,u].join("/"))),i&&c.push(...a),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function J_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:aL(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var eL=/^:[\w-]+$/,tL=3,nL=2,rL=1,iL=10,oL=-2,U5=e=>e==="*";function sL(e,t){let n=e.split("/"),r=n.length;return n.some(U5)&&(r+=oL),t&&(r+=nL),n.filter(i=>!U5(i)).reduce((i,s)=>i+(eL.test(s)?tL:s===""?rL:iL),r)}function aL(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 lL(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",a=[];for(let c=0;c<r.length;++c){let u=r[c],h=c===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",p=ym({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},m),y=u.route;if(!p&&h&&n&&!r[r.length-1].route.index&&(p=ym({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},m)),!p)return null;Object.assign(i,p.params),a.push({params:i,pathname:Eo([s,p.pathname]),pathnameBase:hL(Eo([s,p.pathnameBase])),route:y}),p.pathnameBase!=="/"&&(s=Eo([s,p.pathnameBase]))}return a}function ym(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=cL(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:p},y)=>{if(m==="*"){let b=c[y]||"";a=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const x=c[y];return p&&!x?h[m]=void 0:h[m]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:a,pattern:e}}function cL(e,t=!1,n=!0){Un(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,(a,c,u)=>(r.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).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 uL(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Un(!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 Gi(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 dL({basename:e,pathname:t}){return t==="/"?e:Eo([e,t])}var E6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rb=e=>E6.test(e);function fL(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ba(e):e,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=q5(n.substring(1),"/"):s=q5(n,t)):s=t,{pathname:s,search:pL(r),hash:mL(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 b2(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 k6(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function s0(e){let t=k6(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function a0(e,t,n,r=!1){let i;typeof e=="string"?i=ba(e):(i={...e},It(!i.pathname||!i.pathname.includes("?"),b2("?","pathname","search",i)),It(!i.pathname||!i.pathname.includes("#"),b2("#","pathname","hash",i)),It(!i.search||!i.search.includes("#"),b2("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,c;if(a==null)c=n;else{let p=t.length-1;if(!r&&a.startsWith("..")){let y=a.split("/");for(;y[0]==="..";)y.shift(),p-=1;i.pathname=y.join("/")}c=p>=0?t[p]:"/"}let u=fL(i,c),h=a&&a!=="/"&&a.endsWith("/"),m=(s||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(h||m)&&(u.pathname+="/"),u}var Eo=e=>e.join("/").replace(/\/\/+/g,"/"),hL=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Sf=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 Xd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Cf(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var T6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function N6(e,t){let n=e;if(typeof n!="string"||!E6.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(T6)try{let s=new URL(window.location.href),a=n.startsWith("//")?new URL(s.protocol+n):new URL(n),c=Gi(a.pathname,t);a.origin===s.origin&&c!=null?n=c+a.search+a.hash:i=!0}catch{Un(!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 sa=Symbol("Uninstrumented");function gL(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(s){let a=Object.keys(n);for(let c of a)s[c]&&n[c].push(s[c])}}));let r={};if(typeof t.lazy=="function"&&n.lazy.length>0){let i=kc(n.lazy,t.lazy,()=>{});i&&(r.lazy=i)}if(typeof t.lazy=="object"){let i=t.lazy;["middleware","loader","action"].forEach(s=>{let a=i[s],c=n[`lazy.${s}`];if(typeof a=="function"&&c.length>0){let u=kc(c,a,()=>{});u&&(r.lazy=Object.assign(r.lazy||{},{[s]:u}))}})}return["loader","action"].forEach(i=>{let s=t[i];if(typeof s=="function"&&n[i].length>0){let a=s[sa]??s,c=kc(n[i],a,(...u)=>V5(u[0]));c&&(i==="loader"&&a.hydrate===!0&&(c.hydrate=!0),c[sa]=a,r[i]=c)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(i=>{let s=i[sa]??i,a=kc(n.middleware,s,(...c)=>V5(c[0]));return a?(a[sa]=s,a):i})),r}function yL(e,t){let n={navigate:[],fetch:[]};if(t.forEach(r=>r({instrument(i){let s=Object.keys(i);for(let a of s)i[a]&&n[a].push(i[a])}})),n.navigate.length>0){let r=e.navigate[sa]??e.navigate,i=kc(n.navigate,r,(...s)=>{let[a,c]=s;return{to:typeof a=="number"||typeof a=="string"?a:a?Ao(a):".",...$5(e,c??{})}});i&&(i[sa]=r,e.navigate=i)}if(n.fetch.length>0){let r=e.fetch[sa]??e.fetch,i=kc(n.fetch,r,(...s)=>{let[a,,c,u]=s;return{href:c??".",fetcherKey:a,...$5(e,u??{})}});i&&(i[sa]=r,e.fetch=i)}return e}function kc(e,t,n){return e.length===0?null:async(...r)=>{let i=await R6(e,n(...r),()=>t(...r),e.length-1);if(i.type==="error")throw i.value;return i.value}}async function R6(e,t,n,r){let i=e[r],s;if(i){let a,c=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=R6(e,t,n,r-1),s=await a,It(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await i(c,t)}catch(u){console.error("An instrumentation function threw an error:",u)}a||await c(),await a}else try{s={type:"success",value:await n()}}catch(a){s={type:"error",value:a}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function V5(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:xL(t),params:{...r},unstable_pattern:i,context:bL(n)}}function $5(e,t){return{currentUrl:Ao(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 xL(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function bL(e){if(wL(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var vL=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function wL(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")===vL}var A6=["POST","PUT","PATCH","DELETE"],SL=new Set(A6),CL=["GET",...A6],EL=new Set(CL),j6=new Set([301,302,303,307,308]),kL=new Set([307,308]),v2={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},TL={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},sd={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},NL=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),O6="remix-router-transitions",M6=Symbol("ResetLoaderData");function RL(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";It(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||NL,s=i;if(e.unstable_instrumentations){let K=e.unstable_instrumentations;s=te=>({...i(te),...gL(K.map(ae=>ae.route).filter(Boolean),te)})}let a={},c=Qd(e.routes,s,void 0,a),u,h=e.basename||"/";h.startsWith("/")||(h=`/${h}`);let m=e.dataStrategy||DL,p={...e.future},y=null,x=new Set,b=null,w=null,E=null,k=e.hydrationData!=null,T=ta(c,e.history.location,h),N=!1,O=null,j;if(T==null&&!e.patchRoutesOnNavigation){let K=Hi(404,{pathname:e.history.location.pathname}),{matches:te,route:ae}=pp(c);j=!0,T=te,O={[ae.id]:K}}else if(T&&!e.hydrationData&&nn(T,c,e.history.location.pathname).active&&(T=null),T)if(T.some(K=>K.route.lazy))j=!1;else if(!T.some(K=>ib(K.route)))j=!0;else{let K=e.hydrationData?e.hydrationData.loaderData:null,te=e.hydrationData?e.hydrationData.errors:null;if(te){let ae=T.findIndex(Te=>te[Te.route.id]!==void 0);j=T.slice(0,ae+1).every(Te=>!Ly(Te.route,K,te))}else j=T.every(ae=>!Ly(ae.route,K,te))}else{j=!1,T=[];let K=nn(null,c,e.history.location.pathname);K.active&&K.matches&&(N=!0,T=K.matches)}let A,R={historyAction:e.history.action,location:e.history.location,matches:T,initialized:j,navigation:v2,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||O,fetchers:new Map,blockers:new Map},_="POP",F=null,I=!1,H,q=!1,V=new Map,$=null,U=!1,P=!1,Y=new Set,G=new Map,X=0,L=-1,B=new Map,W=new Set,D=new Map,Q=new Map,ee=new Set,J=new Map,he,de=null;function Se(){if(y=e.history.listen(({action:K,location:te,delta:ae})=>{if(he){he(),he=void 0;return}Un(J.size===0||ae!=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 Te=Oe({currentLocation:R.location,nextLocation:te,historyAction:K});if(Te&&ae!=null){let He=new Promise(st=>{he=st});e.history.go(ae*-1),ge(Te,{state:"blocked",location:te,proceed(){ge(Te,{state:"proceeding",proceed:void 0,reset:void 0,location:te}),He.then(()=>e.history.go(ae))},reset(){let st=new Map(R.blockers);st.set(Te,sd),Fe({blockers:st})}}),F?.resolve(),F=null;return}return Ge(K,te)}),n){XL(t,V);let K=()=>ZL(t,V);t.addEventListener("pagehide",K),$=()=>t.removeEventListener("pagehide",K)}return R.initialized||Ge("POP",R.location,{initialHydration:!0}),A}function Re(){y&&y(),$&&$(),x.clear(),H&&H.abort(),R.fetchers.forEach((K,te)=>xt(te)),R.blockers.forEach((K,te)=>$e(te))}function je(K){return x.add(K),()=>x.delete(K)}function Fe(K,te={}){K.matches&&(K.matches=K.matches.map(He=>{let st=a[He.route.id],Ze=He.route;return Ze.element!==st.element||Ze.errorElement!==st.errorElement||Ze.hydrateFallbackElement!==st.hydrateFallbackElement?{...He,route:st}:He})),R={...R,...K};let ae=[],Te=[];R.fetchers.forEach((He,st)=>{He.state==="idle"&&(ee.has(st)?ae.push(st):Te.push(st))}),ee.forEach(He=>{!R.fetchers.has(He)&&!G.has(He)&&ae.push(He)}),[...x].forEach(He=>He(R,{deletedFetchers:ae,newErrors:K.errors??null,viewTransitionOpts:te.viewTransitionOpts,flushSync:te.flushSync===!0})),ae.forEach(He=>xt(He)),Te.forEach(He=>R.fetchers.delete(He))}function _e(K,te,{flushSync:ae}={}){let Te=R.actionData!=null&&R.navigation.formMethod!=null&&Rr(R.navigation.formMethod)&&R.navigation.state==="loading"&&K.state?._isRedirect!==!0,He;te.actionData?Object.keys(te.actionData).length>0?He=te.actionData:He=null:Te?He=R.actionData:He=null;let st=te.loaderData?tE(R.loaderData,te.loaderData,te.matches||[],te.errors):R.loaderData,Ze=R.blockers;Ze.size>0&&(Ze=new Map(Ze),Ze.forEach((vt,ft)=>Ze.set(ft,sd)));let Xe=U?!1:sn(K,te.matches||R.matches),et=I===!0||R.navigation.formMethod!=null&&Rr(R.navigation.formMethod)&&K.state?._isRedirect!==!0;u&&(c=u,u=void 0),U||_==="POP"||(_==="PUSH"?e.history.push(K,K.state):_==="REPLACE"&&e.history.replace(K,K.state));let ut;if(_==="POP"){let vt=V.get(R.location.pathname);vt&&vt.has(K.pathname)?ut={currentLocation:R.location,nextLocation:K}:V.has(K.pathname)&&(ut={currentLocation:K,nextLocation:R.location})}else if(q){let vt=V.get(R.location.pathname);vt?vt.add(K.pathname):(vt=new Set([K.pathname]),V.set(R.location.pathname,vt)),ut={currentLocation:R.location,nextLocation:K}}Fe({...te,actionData:He,loaderData:st,historyAction:_,location:K,initialized:!0,navigation:v2,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:et,blockers:Ze},{viewTransitionOpts:ut,flushSync:ae===!0}),_="POP",I=!1,q=!1,U=!1,P=!1,F?.resolve(),F=null,de?.resolve(),de=null}async function De(K,te){if(F?.resolve(),F=null,typeof K=="number"){F||(F=oE());let $t=F.promise;return e.history.go(K),$t}let ae=_y(R.location,R.matches,h,K,te?.fromRouteId,te?.relative),{path:Te,submission:He,error:st}=Y5(!1,ae,te),Ze=R.location,Xe=Kd(R.location,Te,te&&te.state);Xe={...Xe,...e.history.encodeLocation(Xe)};let et=te&&te.replace!=null?te.replace:void 0,ut="PUSH";et===!0?ut="REPLACE":et===!1||He!=null&&Rr(He.formMethod)&&He.formAction===R.location.pathname+R.location.search&&(ut="REPLACE");let vt=te&&"preventScrollReset"in te?te.preventScrollReset===!0:void 0,ft=(te&&te.flushSync)===!0,Xt=Oe({currentLocation:Ze,nextLocation:Xe,historyAction:ut});if(Xt){ge(Xt,{state:"blocked",location:Xe,proceed(){ge(Xt,{state:"proceeding",proceed:void 0,reset:void 0,location:Xe}),De(K,te)},reset(){let $t=new Map(R.blockers);$t.set(Xt,sd),Fe({blockers:$t})}});return}await Ge(ut,Xe,{submission:He,pendingError:st,preventScrollReset:vt,replace:te&&te.replace,enableViewTransition:te&&te.viewTransition,flushSync:ft,callSiteDefaultShouldRevalidate:te&&te.unstable_defaultShouldRevalidate})}function xe(){de||(de=oE()),Ee(),Fe({revalidation:"loading"});let K=de.promise;return R.navigation.state==="submitting"?K:R.navigation.state==="idle"?(Ge(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),K):(Ge(_||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:q===!0}),K)}async function Ge(K,te,ae){H&&H.abort(),H=null,_=K,U=(ae&&ae.startUninterruptedRevalidation)===!0,Pt(R.location,R.matches),I=(ae&&ae.preventScrollReset)===!0,q=(ae&&ae.enableViewTransition)===!0;let Te=u||c,He=ae&&ae.overrideNavigation,st=ae?.initialHydration&&R.matches&&R.matches.length>0&&!N?R.matches:ta(Te,te,h),Ze=(ae&&ae.flushSync)===!0;if(st&&R.initialized&&!P&&HL(R.location,te)&&!(ae&&ae.submission&&Rr(ae.submission.formMethod))){_e(te,{matches:st},{flushSync:Ze});return}let Xe=nn(st,Te,te.pathname);if(Xe.active&&Xe.matches&&(st=Xe.matches),!st){let{error:Ln,notFoundMatches:In,route:Yt}=Ye(te.pathname);_e(te,{matches:In,loaderData:{},errors:{[Yt.id]:Ln}},{flushSync:Ze});return}H=new AbortController;let et=vc(e.history,te,H.signal,ae&&ae.submission),ut=e.getContext?await e.getContext():new B5,vt;if(ae&&ae.pendingError)vt=[na(st).route.id,{type:"error",error:ae.pendingError}];else if(ae&&ae.submission&&Rr(ae.submission.formMethod)){let Ln=await we(et,te,ae.submission,st,ut,Xe.active,ae&&ae.initialHydration===!0,{replace:ae.replace,flushSync:Ze});if(Ln.shortCircuited)return;if(Ln.pendingActionResult){let[In,Yt]=Ln.pendingActionResult;if(yi(Yt)&&Xd(Yt.error)&&Yt.error.status===404){H=null,_e(te,{matches:Ln.matches,loaderData:{},errors:{[In]:Yt.error}});return}}st=Ln.matches||st,vt=Ln.pendingActionResult,He=w2(te,ae.submission),Ze=!1,Xe.active=!1,et=vc(e.history,et.url,et.signal)}let{shortCircuited:ft,matches:Xt,loaderData:$t,errors:Dn}=await Ae(et,te,st,ut,Xe.active,He,ae&&ae.submission,ae&&ae.fetcherSubmission,ae&&ae.replace,ae&&ae.initialHydration===!0,Ze,vt,ae&&ae.callSiteDefaultShouldRevalidate);ft||(H=null,_e(te,{matches:Xt||st,...nE(vt),loaderData:$t,errors:Dn}))}async function we(K,te,ae,Te,He,st,Ze,Xe={}){Ee();let et=KL(te,ae);if(Fe({navigation:et},{flushSync:Xe.flushSync===!0}),st){let ft=await vn(Te,te.pathname,K.signal);if(ft.type==="aborted")return{shortCircuited:!0};if(ft.type==="error"){if(ft.partialMatches.length===0){let{matches:$t,route:Dn}=pp(c);return{matches:$t,pendingActionResult:[Dn.id,{type:"error",error:ft.error}]}}let Xt=na(ft.partialMatches).route.id;return{matches:ft.partialMatches,pendingActionResult:[Xt,{type:"error",error:ft.error}]}}else if(ft.matches)Te=ft.matches;else{let{notFoundMatches:Xt,error:$t,route:Dn}=Ye(te.pathname);return{matches:Xt,pendingActionResult:[Dn.id,{type:"error",error:$t}]}}}let ut,vt=Zp(Te,te);if(!vt.route.action&&!vt.route.lazy)ut={type:"error",error:Hi(405,{method:K.method,pathname:te.pathname,routeId:vt.route.id})};else{let ft=Ac(s,a,K,Te,vt,Ze?[]:r,He),Xt=await ct(K,ft,He,null);if(ut=Xt[vt.route.id],!ut){for(let $t of Te)if(Xt[$t.route.id]){ut=Xt[$t.route.id];break}}if(K.signal.aborted)return{shortCircuited:!0}}if(sl(ut)){let ft;return Xe&&Xe.replace!=null?ft=Xe.replace:ft=Z5(ut.response.headers.get("Location"),new URL(K.url),h,e.history)===R.location.pathname+R.location.search,await Ve(K,ut,!0,{submission:ae,replace:ft}),{shortCircuited:!0}}if(yi(ut)){let ft=na(Te,vt.route.id);return(Xe&&Xe.replace)!==!0&&(_="PUSH"),{matches:Te,pendingActionResult:[ft.route.id,ut,vt.route.id]}}return{matches:Te,pendingActionResult:[vt.route.id,ut]}}async function Ae(K,te,ae,Te,He,st,Ze,Xe,et,ut,vt,ft,Xt){let $t=st||w2(te,Ze),Dn=Ze||Xe||iE($t),Ln=!U&&!ut;if(He){if(Ln){let Yn=pe(ft);Fe({navigation:$t,...Yn!==void 0?{actionData:Yn}:{}},{flushSync:vt})}let Wt=await vn(ae,te.pathname,K.signal);if(Wt.type==="aborted")return{shortCircuited:!0};if(Wt.type==="error"){if(Wt.partialMatches.length===0){let{matches:eo,route:xr}=pp(c);return{matches:eo,loaderData:{},errors:{[xr.id]:Wt.error}}}let Yn=na(Wt.partialMatches).route.id;return{matches:Wt.partialMatches,loaderData:{},errors:{[Yn]:Wt.error}}}else if(Wt.matches)ae=Wt.matches;else{let{error:Yn,notFoundMatches:eo,route:xr}=Ye(te.pathname);return{matches:eo,loaderData:{},errors:{[xr.id]:Yn}}}}let In=u||c,{dsMatches:Yt,revalidatingFetchers:fr}=W5(K,Te,s,a,e.history,R,ae,Dn,te,ut?[]:r,ut===!0,P,Y,ee,D,W,In,h,e.patchRoutesOnNavigation!=null,ft,Xt);if(L=++X,!e.dataStrategy&&!Yt.some(Wt=>Wt.shouldLoad)&&!Yt.some(Wt=>Wt.route.middleware&&Wt.route.middleware.length>0)&&fr.length===0){let Wt=nt();return _e(te,{matches:ae,loaderData:{},errors:ft&&yi(ft[1])?{[ft[0]]:ft[1].error}:null,...nE(ft),...Wt?{fetchers:new Map(R.fetchers)}:{}},{flushSync:vt}),{shortCircuited:!0}}if(Ln){let Wt={};if(!He){Wt.navigation=$t;let Yn=pe(ft);Yn!==void 0&&(Wt.actionData=Yn)}fr.length>0&&(Wt.fetchers=be(fr)),Fe(Wt,{flushSync:vt})}fr.forEach(Wt=>{Ke(Wt.key),Wt.controller&&G.set(Wt.key,Wt.controller)});let Yr=()=>fr.forEach(Wt=>Ke(Wt.key));H&&H.signal.addEventListener("abort",Yr);let{loaderResults:An,fetcherResults:Zi}=await oe(Yt,fr,K,Te);if(K.signal.aborted)return{shortCircuited:!0};H&&H.signal.removeEventListener("abort",Yr),fr.forEach(Wt=>G.delete(Wt.key));let ai=mp(An);if(ai)return await Ve(K,ai.result,!0,{replace:et}),{shortCircuited:!0};if(ai=mp(Zi),ai)return W.add(ai.key),await Ve(K,ai.result,!0,{replace:et}),{shortCircuited:!0};let{loaderData:Ji,errors:Ai}=eE(R,ae,An,ft,fr,Zi);ut&&R.errors&&(Ai={...R.errors,...Ai});let Po=nt(),La=Qe(L),Ia=Po||La||fr.length>0;return{matches:ae,loaderData:Ji,errors:Ai,...Ia?{fetchers:new Map(R.fetchers)}:{}}}function pe(K){if(K&&!yi(K[1]))return{[K[0]]:K[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function be(K){return K.forEach(te=>{let ae=R.fetchers.get(te.key),Te=ad(void 0,ae?ae.data:void 0);R.fetchers.set(te.key,Te)}),new Map(R.fetchers)}async function ne(K,te,ae,Te){Ke(K);let He=(Te&&Te.flushSync)===!0,st=u||c,Ze=_y(R.location,R.matches,h,ae,te,Te?.relative),Xe=ta(st,Ze,h),et=nn(Xe,st,Ze);if(et.active&&et.matches&&(Xe=et.matches),!Xe){Me(K,te,Hi(404,{pathname:Ze}),{flushSync:He});return}let{path:ut,submission:vt,error:ft}=Y5(!0,Ze,Te);if(ft){Me(K,te,ft,{flushSync:He});return}let Xt=e.getContext?await e.getContext():new B5,$t=(Te&&Te.preventScrollReset)===!0;if(vt&&Rr(vt.formMethod)){await ye(K,te,ut,Xe,Xt,et.active,He,$t,vt,Te&&Te.unstable_defaultShouldRevalidate);return}D.set(K,{routeId:te,path:ut}),await Ce(K,te,ut,Xe,Xt,et.active,He,$t,vt)}async function ye(K,te,ae,Te,He,st,Ze,Xe,et,ut){Ee(),D.delete(K);let vt=R.fetchers.get(K);Le(K,QL(et,vt),{flushSync:Ze});let ft=new AbortController,Xt=vc(e.history,ae,ft.signal,et);if(st){let Gt=await vn(Te,new URL(Xt.url).pathname,Xt.signal,K);if(Gt.type==="aborted")return;if(Gt.type==="error"){Me(K,te,Gt.error,{flushSync:Ze});return}else if(Gt.matches)Te=Gt.matches;else{Me(K,te,Hi(404,{pathname:ae}),{flushSync:Ze});return}}let $t=Zp(Te,ae);if(!$t.route.action&&!$t.route.lazy){let Gt=Hi(405,{method:et.formMethod,pathname:ae,routeId:te});Me(K,te,Gt,{flushSync:Ze});return}G.set(K,ft);let Dn=X,Ln=Ac(s,a,Xt,Te,$t,r,He),In=await ct(Xt,Ln,He,K),Yt=In[$t.route.id];if(!Yt){for(let Gt of Ln)if(In[Gt.route.id]){Yt=In[Gt.route.id];break}}if(Xt.signal.aborted){G.get(K)===ft&&G.delete(K);return}if(ee.has(K)){if(sl(Yt)||yi(Yt)){Le(K,os(void 0));return}}else{if(sl(Yt))if(G.delete(K),L>Dn){Le(K,os(void 0));return}else return W.add(K),Le(K,ad(et)),Ve(Xt,Yt,!1,{fetcherSubmission:et,preventScrollReset:Xe});if(yi(Yt)){Me(K,te,Yt.error);return}}let fr=R.navigation.location||R.location,Yr=vc(e.history,fr,ft.signal),An=u||c,Zi=R.navigation.state!=="idle"?ta(An,R.navigation.location,h):R.matches;It(Zi,"Didn't find any matches after fetcher action");let ai=++X;B.set(K,ai);let Ji=ad(et,Yt.data);R.fetchers.set(K,Ji);let{dsMatches:Ai,revalidatingFetchers:Po}=W5(Yr,He,s,a,e.history,R,Zi,et,fr,r,!1,P,Y,ee,D,W,An,h,e.patchRoutesOnNavigation!=null,[$t.route.id,Yt],ut);Po.filter(Gt=>Gt.key!==K).forEach(Gt=>{let Pa=Gt.key,nh=R.fetchers.get(Pa),gu=ad(void 0,nh?nh.data:void 0);R.fetchers.set(Pa,gu),Ke(Pa),Gt.controller&&G.set(Pa,Gt.controller)}),Fe({fetchers:new Map(R.fetchers)});let La=()=>Po.forEach(Gt=>Ke(Gt.key));ft.signal.addEventListener("abort",La);let{loaderResults:Ia,fetcherResults:Wt}=await oe(Ai,Po,Yr,He);if(ft.signal.aborted)return;if(ft.signal.removeEventListener("abort",La),B.delete(K),G.delete(K),Po.forEach(Gt=>G.delete(Gt.key)),R.fetchers.has(K)){let Gt=os(Yt.data);R.fetchers.set(K,Gt)}let Yn=mp(Ia);if(Yn)return Ve(Yr,Yn.result,!1,{preventScrollReset:Xe});if(Yn=mp(Wt),Yn)return W.add(Yn.key),Ve(Yr,Yn.result,!1,{preventScrollReset:Xe});let{loaderData:eo,errors:xr}=eE(R,Zi,Ia,void 0,Po,Wt);Qe(ai),R.navigation.state==="loading"&&ai>L?(It(_,"Expected pending action"),H&&H.abort(),_e(R.navigation.location,{matches:Zi,loaderData:eo,errors:xr,fetchers:new Map(R.fetchers)})):(Fe({errors:xr,loaderData:tE(R.loaderData,eo,Zi,xr),fetchers:new Map(R.fetchers)}),P=!1)}async function Ce(K,te,ae,Te,He,st,Ze,Xe,et){let ut=R.fetchers.get(K);Le(K,ad(et,ut?ut.data:void 0),{flushSync:Ze});let vt=new AbortController,ft=vc(e.history,ae,vt.signal);if(st){let Yt=await vn(Te,new URL(ft.url).pathname,ft.signal,K);if(Yt.type==="aborted")return;if(Yt.type==="error"){Me(K,te,Yt.error,{flushSync:Ze});return}else if(Yt.matches)Te=Yt.matches;else{Me(K,te,Hi(404,{pathname:ae}),{flushSync:Ze});return}}let Xt=Zp(Te,ae);G.set(K,vt);let $t=X,Dn=Ac(s,a,ft,Te,Xt,r,He),In=(await ct(ft,Dn,He,K))[Xt.route.id];if(G.get(K)===vt&&G.delete(K),!ft.signal.aborted){if(ee.has(K)){Le(K,os(void 0));return}if(sl(In))if(L>$t){Le(K,os(void 0));return}else{W.add(K),await Ve(ft,In,!1,{preventScrollReset:Xe});return}if(yi(In)){Me(K,te,In.error);return}Le(K,os(In.data))}}async function Ve(K,te,ae,{submission:Te,fetcherSubmission:He,preventScrollReset:st,replace:Ze}={}){ae||(F?.resolve(),F=null),te.response.headers.has("X-Remix-Revalidate")&&(P=!0);let Xe=te.response.headers.get("Location");It(Xe,"Expected a Location header on the redirect Response"),Xe=Z5(Xe,new URL(K.url),h,e.history);let et=Kd(R.location,Xe,{_isRedirect:!0});if(n){let Dn=!1;if(te.response.headers.has("X-Remix-Reload-Document"))Dn=!0;else if(rb(Xe)){const Ln=w6(Xe,!0);Dn=Ln.origin!==t.location.origin||Gi(Ln.pathname,h)==null}if(Dn){Ze?t.location.replace(Xe):t.location.assign(Xe);return}}H=null;let ut=Ze===!0||te.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:vt,formAction:ft,formEncType:Xt}=R.navigation;!Te&&!He&&vt&&ft&&Xt&&(Te=iE(R.navigation));let $t=Te||He;if(kL.has(te.response.status)&&$t&&Rr($t.formMethod))await Ge(ut,et,{submission:{...$t,formAction:Xe},preventScrollReset:st||I,enableViewTransition:ae?q:void 0});else{let Dn=w2(et,Te);await Ge(ut,et,{overrideNavigation:Dn,fetcherSubmission:He,preventScrollReset:st||I,enableViewTransition:ae?q:void 0})}}async function ct(K,te,ae,Te){let He,st={};try{He=await LL(m,K,te,Te,ae,!1)}catch(Ze){return te.filter(Xe=>Xe.shouldLoad).forEach(Xe=>{st[Xe.route.id]={type:"error",error:Ze}}),st}if(K.signal.aborted)return st;if(!Rr(K.method))for(let Ze of te){if(He[Ze.route.id]?.type==="error")break;!He.hasOwnProperty(Ze.route.id)&&!R.loaderData.hasOwnProperty(Ze.route.id)&&(!R.errors||!R.errors.hasOwnProperty(Ze.route.id))&&Ze.shouldCallHandler()&&(He[Ze.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Ze.route.id}`)})}for(let[Ze,Xe]of Object.entries(He))if($L(Xe)){let et=Xe.result;st[Ze]={type:"redirect",response:FL(et,K,Ze,te,h)}}else st[Ze]=await zL(Xe);return st}async function oe(K,te,ae,Te){let He=ct(ae,K,Te,null),st=Promise.all(te.map(async et=>{if(et.matches&&et.match&&et.request&&et.controller){let vt=(await ct(et.request,et.matches,Te,et.key))[et.match.route.id];return{[et.key]:vt}}else return Promise.resolve({[et.key]:{type:"error",error:Hi(404,{pathname:et.path})}})})),Ze=await He,Xe=(await st).reduce((et,ut)=>Object.assign(et,ut),{});return{loaderResults:Ze,fetcherResults:Xe}}function Ee(){P=!0,D.forEach((K,te)=>{G.has(te)&&Y.add(te),Ke(te)})}function Le(K,te,ae={}){R.fetchers.set(K,te),Fe({fetchers:new Map(R.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function Me(K,te,ae,Te={}){let He=na(R.matches,te);xt(K),Fe({errors:{[He.route.id]:ae},fetchers:new Map(R.fetchers)},{flushSync:(Te&&Te.flushSync)===!0})}function Ue(K){return Q.set(K,(Q.get(K)||0)+1),ee.has(K)&&ee.delete(K),R.fetchers.get(K)||TL}function dt(K,te){Ke(K,te?.reason),Le(K,os(null))}function xt(K){let te=R.fetchers.get(K);G.has(K)&&!(te&&te.state==="loading"&&B.has(K))&&Ke(K),D.delete(K),B.delete(K),W.delete(K),ee.delete(K),Y.delete(K),R.fetchers.delete(K)}function Je(K){let te=(Q.get(K)||0)-1;te<=0?(Q.delete(K),ee.add(K)):Q.set(K,te),Fe({fetchers:new Map(R.fetchers)})}function Ke(K,te){let ae=G.get(K);ae&&(ae.abort(te),G.delete(K))}function bt(K){for(let te of K){let ae=Ue(te),Te=os(ae.data);R.fetchers.set(te,Te)}}function nt(){let K=[],te=!1;for(let ae of W){let Te=R.fetchers.get(ae);It(Te,`Expected fetcher: ${ae}`),Te.state==="loading"&&(W.delete(ae),K.push(ae),te=!0)}return bt(K),te}function Qe(K){let te=[];for(let[ae,Te]of B)if(Te<K){let He=R.fetchers.get(ae);It(He,`Expected fetcher: ${ae}`),He.state==="loading"&&(Ke(ae),B.delete(ae),te.push(ae))}return bt(te),te.length>0}function Ct(K,te){let ae=R.blockers.get(K)||sd;return J.get(K)!==te&&J.set(K,te),ae}function $e(K){R.blockers.delete(K),J.delete(K)}function ge(K,te){let ae=R.blockers.get(K)||sd;It(ae.state==="unblocked"&&te.state==="blocked"||ae.state==="blocked"&&te.state==="blocked"||ae.state==="blocked"&&te.state==="proceeding"||ae.state==="blocked"&&te.state==="unblocked"||ae.state==="proceeding"&&te.state==="unblocked",`Invalid blocker state transition: ${ae.state} -> ${te.state}`);let Te=new Map(R.blockers);Te.set(K,te),Fe({blockers:Te})}function Oe({currentLocation:K,nextLocation:te,historyAction:ae}){if(J.size===0)return;J.size>1&&Un(!1,"A router only supports one blocker at a time");let Te=Array.from(J.entries()),[He,st]=Te[Te.length-1],Ze=R.blockers.get(He);if(!(Ze&&Ze.state==="proceeding")&&st({currentLocation:K,nextLocation:te,historyAction:ae}))return He}function Ye(K){let te=Hi(404,{pathname:K}),ae=u||c,{matches:Te,route:He}=pp(ae);return{notFoundMatches:Te,route:He,error:te}}function Rt(K,te,ae){if(b=K,E=te,w=ae||null,!k&&R.navigation===v2){k=!0;let Te=sn(R.location,R.matches);Te!=null&&Fe({restoreScrollPosition:Te})}return()=>{b=null,E=null,w=null}}function Ie(K,te){return w&&w(K,te.map(Te=>Z_(Te,R.loaderData)))||K.key}function Pt(K,te){if(b&&E){let ae=Ie(K,te);b[ae]=E()}}function sn(K,te){if(b){let ae=Ie(K,te),Te=b[ae];if(typeof Te=="number")return Te}return null}function nn(K,te,ae){if(e.patchRoutesOnNavigation)if(K){if(Object.keys(K[0].params).length>0)return{active:!0,matches:Rd(te,ae,h,!0)}}else return{active:!0,matches:Rd(te,ae,h,!0)||[]};return{active:!1,matches:null}}async function vn(K,te,ae,Te){if(!e.patchRoutesOnNavigation)return{type:"success",matches:K};let He=K;for(;;){let st=u==null,Ze=u||c,Xe=a;try{await e.patchRoutesOnNavigation({signal:ae,path:te,matches:He,fetcherKey:Te,patch:(vt,ft)=>{ae.aborted||G5(vt,ft,Ze,Xe,s,!1)}})}catch(vt){return{type:"error",error:vt,partialMatches:He}}finally{st&&!ae.aborted&&(c=[...c])}if(ae.aborted)return{type:"aborted"};let et=ta(Ze,te,h),ut=null;if(et){if(Object.keys(et[0].params).length===0)return{type:"success",matches:et};if(ut=Rd(Ze,te,h,!0),!(ut&&He.length<ut.length&&Ut(He,ut.slice(0,He.length))))return{type:"success",matches:et}}if(ut||(ut=Rd(Ze,te,h,!0)),!ut||Ut(He,ut))return{type:"success",matches:null};He=ut}}function Ut(K,te){return K.length===te.length&&K.every((ae,Te)=>ae.route.id===te[Te].route.id)}function yt(K){a={},u=Qd(K,s,void 0,a)}function zt(K,te,ae=!1){let Te=u==null;G5(K,te,u||c,a,s,ae),Te&&(c=[...c],Fe({}))}return A={get basename(){return h},get future(){return p},get state(){return R},get routes(){return c},get window(){return t},initialize:Se,subscribe:je,enableScrollRestoration:Rt,navigate:De,fetch:ne,revalidate:xe,createHref:K=>e.history.createHref(K),encodeLocation:K=>e.history.encodeLocation(K),getFetcher:Ue,resetFetcher:dt,deleteFetcher:Je,dispose:Re,getBlocker:Ct,deleteBlocker:$e,patchRoutes:zt,_internalFetchControllers:G,_internalSetRoutes:yt,_internalSetStateDoNotUseOrYouWillBreakYourApp(K){Fe(K)}},e.unstable_instrumentations&&(A=yL(A,e.unstable_instrumentations.map(K=>K.router).filter(Boolean))),A}function AL(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function _y(e,t,n,r,i,s){let a,c;if(i){a=[];for(let h of t)if(a.push(h),h.route.id===i){c=h;break}}else a=t,c=t[t.length-1];let u=a0(r||".",s0(a),Gi(e.pathname,n)||e.pathname,s==="path");if(r==null&&(u.search=e.search,u.hash=e.hash),(r==null||r===""||r===".")&&c){let h=sb(u.search);if(c.route.index&&!h)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&h){let m=new URLSearchParams(u.search),p=m.getAll("index");m.delete("index"),p.filter(x=>x).forEach(x=>m.append("index",x));let y=m.toString();u.search=y?`?${y}`:""}}return n!=="/"&&(u.pathname=dL({basename:n,pathname:u.pathname})),Ao(u)}function Y5(e,t,n){if(!n||!AL(n))return{path:t};if(n.formMethod&&!GL(n.formMethod))return{path:t,error:Hi(405,{method:n.formMethod})};let r=()=>({path:t,error:Hi(400,{type:"invalid-body"})}),s=(n.formMethod||"get").toUpperCase(),a=z6(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Rr(s))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,b])=>`${y}${x}=${b}
10
+ `,""):String(n.body);return{path:t,submission:{formMethod:s,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:p}}}else if(n.formEncType==="application/json"){if(!Rr(s))return r();try{let p=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:s,formAction:a,formEncType:n.formEncType,formData:void 0,json:p,text:void 0}}}catch{return r()}}}It(typeof FormData=="function","FormData is not available in this environment");let c,u;if(n.formData)c=Py(n.formData),u=n.formData;else if(n.body instanceof FormData)c=Py(n.body),u=n.body;else if(n.body instanceof URLSearchParams)c=n.body,u=J5(c);else if(n.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(n.body),u=J5(c)}catch{return r()}let h={formMethod:s,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Rr(h.formMethod))return{path:t,submission:h};let m=ba(t);return e&&m.search&&sb(m.search)&&c.append("index",""),m.search=`?${c}`,{path:Ao(m),submission:h}}function W5(e,t,n,r,i,s,a,c,u,h,m,p,y,x,b,w,E,k,T,N,O){let j=N?yi(N[1])?N[1].error:N[1].data:void 0,A=i.createURL(s.location),R=i.createURL(u),_;if(m&&s.errors){let U=Object.keys(s.errors)[0];_=a.findIndex(P=>P.route.id===U)}else if(N&&yi(N[1])){let U=N[0];_=a.findIndex(P=>P.route.id===U)-1}let F=N?N[1].statusCode:void 0,I=F&&F>=400,H={currentUrl:A,currentParams:s.matches[0]?.params||{},nextUrl:R,nextParams:a[0].params,...c,actionResult:j,actionStatus:F},q=Cf(a),V=a.map((U,P)=>{let{route:Y}=U,G=null;if(_!=null&&P>_?G=!1:Y.lazy?G=!0:ib(Y)?m?G=Ly(Y,s.loaderData,s.errors):jL(s.loaderData,s.matches[P],U)&&(G=!0):G=!1,G!==null)return Iy(n,r,e,q,U,h,t,G);let X=!1;typeof O=="boolean"?X=O:I?X=!1:(p||A.pathname+A.search===R.pathname+R.search||A.search!==R.search||OL(s.matches[P],U))&&(X=!0);let L={...H,defaultShouldRevalidate:X},B=Id(U,L);return Iy(n,r,e,q,U,h,t,B,L,O)}),$=[];return b.forEach((U,P)=>{if(m||!a.some(Q=>Q.route.id===U.routeId)||x.has(P))return;let Y=s.fetchers.get(P),G=Y&&Y.state!=="idle"&&Y.data===void 0,X=ta(E,U.path,k);if(!X){if(T&&G)return;$.push({key:P,routeId:U.routeId,path:U.path,matches:null,match:null,request:null,controller:null});return}if(w.has(P))return;let L=Zp(X,U.path),B=new AbortController,W=vc(i,U.path,B.signal),D=null;if(y.has(P))y.delete(P),D=Ac(n,r,W,X,L,h,t);else if(G)p&&(D=Ac(n,r,W,X,L,h,t));else{let Q;typeof O=="boolean"?Q=O:I?Q=!1:Q=p;let ee={...H,defaultShouldRevalidate:Q};Id(L,ee)&&(D=Ac(n,r,W,X,L,h,t,ee))}D&&$.push({key:P,routeId:U.routeId,path:U.path,matches:D,match:L,request:W,controller:B})}),{dsMatches:V,revalidatingFetchers:$}}function ib(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ly(e,t,n){if(e.lazy)return!0;if(!ib(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 jL(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function OL(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Id(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function G5(e,t,n,r,i,s){let a;if(e){let h=r[e];It(h,`No route found to patch children into: routeId = ${e}`),h.children||(h.children=[]),a=h.children}else a=n;let c=[],u=[];if(t.forEach(h=>{let m=a.find(p=>D6(h,p));m?u.push({existingRoute:m,newRoute:h}):c.push(h)}),c.length>0){let h=Qd(c,i,[e||"_","patch",String(a?.length||"0")],r);a.push(...h)}if(s&&u.length>0)for(let h=0;h<u.length;h++){let{existingRoute:m,newRoute:p}=u[h],y=m,[x]=Qd([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 D6(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=>D6(n,i))):!1}var K5=new WeakMap,_6=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(It(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let s=i.lazy[e];if(!s)return;let a=K5.get(i);a||(a={},K5.set(i,a));let c=a[e];if(c)return c;let u=(async()=>{let h=G_(e),p=i[e]!==void 0&&e!=="hasErrorBoundary";if(h)Un(!h,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(p)Un(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await s();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 a[e]=u,u},Q5=new WeakMap;function ML(e,t,n,r,i){let s=n[e.id];if(It(s,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let m=Q5.get(s);if(m)return{lazyRoutePromise:m,lazyHandlerPromise:m};let p=(async()=>{It(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),x={};for(let b in y){let w=y[b];if(w===void 0)continue;let E=Q_(b),T=s[b]!==void 0&&b!=="hasErrorBoundary";E?Un(!E,"Route property "+b+" is not a supported property to be returned from a lazy route function. This property will be ignored."):T?Un(!T,`Route "${s.id}" has a static property "${b}" defined but its lazy function is also returning a value for this property. The lazy route property "${b}" will be ignored.`):x[b]=w}Object.assign(s,x),Object.assign(s,{...r(s),lazy:void 0})})();return Q5.set(s,p),p.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:p}}let a=Object.keys(e.lazy),c=[],u;for(let m of a){if(i&&i.includes(m))continue;let p=_6({key:m,route:e,manifest:n,mapRouteProperties:r});p&&(c.push(p),m===t&&(u=p))}let h=c.length>0?Promise.all(c).then(()=>{}):void 0;return h?.catch(()=>{}),u?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:u}}async function X5(e){let t=e.matches.filter(i=>i.shouldLoad),n={};return(await Promise.all(t.map(i=>i.resolve()))).forEach((i,s)=>{n[t[s].route.id]=i}),n}async function DL(e){return e.matches.some(t=>t.route.middleware)?L6(e,()=>X5(e)):X5(e)}function L6(e,t){return _L(e,t,r=>{if(WL(r))throw r;return r},qL,n);function n(r,i,s){if(s)return Promise.resolve(Object.assign(s.value,{[i]:{type:"error",result:r}}));{let{matches:a}=e,c=Math.min(Math.max(a.findIndex(h=>h.route.id===i),0),Math.max(a.findIndex(h=>h.shouldCallHandler()),0)),u=na(a,a[c].route.id).route.id;return Promise.resolve({[u]:{type:"error",result:r}})}}}async function _L(e,t,n,r,i){let{matches:s,request:a,params:c,context:u,unstable_pattern:h}=e,m=s.flatMap(y=>y.route.middleware?y.route.middleware.map(x=>[y.route.id,x]):[]);return await I6({request:a,params:c,context:u,unstable_pattern:h},m,t,n,r,i)}async function I6(e,t,n,r,i,s,a=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let u=t[a];if(!u)return await n();let[h,m]=u,p,y=async()=>{if(p)throw new Error("You may only call `next()` once per middleware");try{return p={value:await I6(e,t,n,r,i,s,a+1)},p.value}catch(x){return p={value:await s(x,h,p)},p.value}};try{let x=await m(e,y),b=x!=null?r(x):void 0;return i(b)?b:p?b??p.value:(p={value:await y()},p.value)}catch(x){return await s(x,h,p)}}function P6(e,t,n,r,i){let s=_6({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=ML(r.route,Rr(n.method)?"action":"loader",t,e,i);return{middleware:s,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function Iy(e,t,n,r,i,s,a,c,u=null,h){let m=!1,p=P6(e,t,n,i,s);return{...i,_lazyPromises:p,shouldLoad:c,shouldRevalidateArgs:u,shouldCallHandler(y){return m=!0,u?typeof h=="boolean"?Id(i,{...u,defaultShouldRevalidate:h}):typeof y=="boolean"?Id(i,{...u,defaultShouldRevalidate:y}):Id(i,u):c},resolve(y){let{lazy:x,loader:b,middleware:w}=i.route,E=m||c||y&&!Rr(n.method)&&(x||b),k=w&&w.length>0&&!b&&!x;return E&&(Rr(n.method)||!k)?IL({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:p?.handler,lazyRoutePromise:p?.route,handlerOverride:y,scopedContext:a}):Promise.resolve({type:"data",result:void 0})}}}function Ac(e,t,n,r,i,s,a,c=null){return r.map(u=>u.route.id!==i.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:P6(e,t,n,u,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Iy(e,t,n,Cf(r),u,s,a,!0,c))}async function LL(e,t,n,r,i,s){n.some(h=>h._lazyPromises?.middleware)&&await Promise.all(n.map(h=>h._lazyPromises?.middleware));let a={request:t,unstable_pattern:Cf(n),params:n[0].params,context:i,matches:n},u=await e({...a,fetcherKey:r,runClientMiddleware:h=>{let m=a;return L6(m,()=>h({...m,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return u}async function IL({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:i,handlerOverride:s,scopedContext:a}){let c,u,h=Rr(e.method),m=h?"action":"loader",p=y=>{let x,b=new Promise((k,T)=>x=T);u=()=>x(),e.signal.addEventListener("abort",u);let w=k=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${n.route.id}]`)):y({request:e,unstable_pattern:t,params:n.params,context:a},...k!==void 0?[k]:[]),E=(async()=>{try{return{type:"data",result:await(s?s(T=>w(T)):w())}}catch(k){return{type:"error",result:k}}})();return Promise.race([E,b])};try{let y=h?n.route.action:n.route.loader;if(r||i)if(y){let x,[b]=await Promise.all([p(y).catch(w=>{x=w}),r,i]);if(x!==void 0)throw x;c=b}else{await r;let x=h?n.route.action:n.route.loader;if(x)[c]=await Promise.all([p(x),i]);else if(m==="action"){let b=new URL(e.url),w=b.pathname+b.search;throw Hi(405,{method:e.method,pathname:w,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),b=x.pathname+x.search;throw Hi(404,{pathname:b})}}catch(y){return{type:"error",result:y}}finally{u&&e.signal.removeEventListener("abort",u)}return c}async function PL(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 zL(e){let{result:t,type:n}=e;if(ob(t)){let r;try{r=await PL(t)}catch(i){return{type:"error",error:i}}return n==="error"?{type:"error",error:new Sf(t.status,t.statusText,r),statusCode:t.status,headers:t.headers}:{type:"data",data:r,statusCode:t.status,headers:t.headers}}return n==="error"?rE(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:UL(t),statusCode:Xd(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Xd(t)?t.status:void 0}:rE(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 FL(e,t,n,r,i){let s=e.headers.get("Location");if(It(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!rb(s)){let a=r.slice(0,r.findIndex(c=>c.route.id===n)+1);s=_y(new URL(t.url),a,i,s),e.headers.set("Location",s)}return e}function Z5(e,t,n,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(rb(e)){let s=e,a=s.startsWith("//")?new URL(t.protocol+s):new URL(s);if(i.includes(a.protocol))throw new Error("Invalid redirect location");let c=Gi(a.pathname,n)!=null;if(a.origin===t.origin&&c)return a.pathname+a.search+a.hash}try{let s=r.createURL(e);if(i.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return e}function vc(e,t,n,r){let i=e.createURL(z6(t)).toString(),s={signal:n};if(r&&Rr(r.formMethod)){let{formMethod:a,formEncType:c}=r;s.method=a.toUpperCase(),c==="application/json"?(s.headers=new Headers({"Content-Type":c}),s.body=JSON.stringify(r.json)):c==="text/plain"?s.body=r.text:c==="application/x-www-form-urlencoded"&&r.formData?s.body=Py(r.formData):s.body=r.formData}return new Request(i,s)}function Py(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function J5(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function BL(e,t,n,r=!1,i=!1){let s={},a=null,c,u=!1,h={},m=n&&yi(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(It(!sl(x),"Cannot handle redirect results in processLoaderData"),yi(x)){let b=x.error;if(m!==void 0&&(b=m,m=void 0),a=a||{},i)a[y]=b;else{let w=na(e,y);a[w.route.id]==null&&(a[w.route.id]=b)}r||(s[y]=M6),u||(u=!0,c=Xd(x.error)?x.error.status:500),x.headers&&(h[y]=x.headers)}else s[y]=x.data,x.statusCode&&x.statusCode!==200&&!u&&(c=x.statusCode),x.headers&&(h[y]=x.headers)}),m!==void 0&&n&&(a={[n[0]]:m},n[2]&&(s[n[2]]=void 0)),{loaderData:s,errors:a,statusCode:c||200,loaderHeaders:h}}function eE(e,t,n,r,i,s){let{loaderData:a,errors:c}=BL(t,n,r);return i.filter(u=>!u.matches||u.matches.some(h=>h.shouldLoad)).forEach(u=>{let{key:h,match:m,controller:p}=u;if(p&&p.signal.aborted)return;let y=s[h];if(It(y,"Did not find corresponding fetcher result"),yi(y)){let x=na(e.matches,m?.route.id);c&&c[x.route.id]||(c={...c,[x.route.id]:y.error}),e.fetchers.delete(h)}else if(sl(y))It(!1,"Unhandled fetcher revalidation redirect");else{let x=os(y.data);e.fetchers.set(h,x)}}),{loaderData:a,errors:c}}function tE(e,t,n,r){let i=Object.entries(t).filter(([,s])=>s!==M6).reduce((s,[a,c])=>(s[a]=c,s),{});for(let s of n){let a=s.route.id;if(!t.hasOwnProperty(a)&&e.hasOwnProperty(a)&&s.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function nE(e){return e?yi(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function na(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 pp(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 Hi(e,{pathname:t,routeId:n,method:r,type:i,message:s}={}){let a="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(a="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?(a="Forbidden",c=`Route "${n}" does not match URL "${t}"`):e===404?(a="Not Found",c=`No route matches URL "${t}"`):e===405&&(a="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 Sf(e||500,a,new Error(c),!0)}function mp(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(sl(i))return{key:r,result:i}}}function z6(e){let t=typeof e=="string"?ba(e):e;return Ao({...t,hash:""})}function HL(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function UL(e){return new Sf(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function qL(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&VL(n))}function VL(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function $L(e){return ob(e.result)&&j6.has(e.result.status)}function yi(e){return e.type==="error"}function sl(e){return(e&&e.type)==="redirect"}function rE(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ob(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function YL(e){return j6.has(e)}function WL(e){return ob(e)&&YL(e.status)&&e.headers.has("Location")}function GL(e){return EL.has(e.toUpperCase())}function Rr(e){return SL.has(e.toUpperCase())}function sb(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Zp(e,t){let n=typeof t=="string"?ba(t).search:t.search;if(e[e.length-1].route.index&&sb(n||""))return e[e.length-1];let r=k6(e);return r[r.length-1]}function iE(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:s,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function w2(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 KL(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 ad(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 QL(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 os(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 XL(e,t){try{let n=e.sessionStorage.getItem(O6);if(n){let r=JSON.parse(n);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function ZL(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(O6,JSON.stringify(n))}catch(r){Un(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function oE(){let e,t,n=new Promise((r,i)=>{e=async s=>{r(s);try{await n}catch{}},t=async s=>{i(s);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Sl=S.createContext(null);Sl.displayName="DataRouter";var Ef=S.createContext(null);Ef.displayName="DataRouterState";var F6=S.createContext(!1);function JL(){return S.useContext(F6)}var ab=S.createContext({isTransitioning:!1});ab.displayName="ViewTransition";var B6=S.createContext(new Map);B6.displayName="Fetchers";var eI=S.createContext(null);eI.displayName="Await";var Ni=S.createContext(null);Ni.displayName="Navigation";var l0=S.createContext(null);l0.displayName="Location";var fo=S.createContext({outlet:null,matches:[],isDataRoute:!1});fo.displayName="Route";var lb=S.createContext(null);lb.displayName="RouteError";var H6="REACT_ROUTER_ERROR",tI="REDIRECT",nI="ROUTE_ERROR_RESPONSE";function rI(e){if(e.startsWith(`${H6}:${tI}:{`))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 iI(e){if(e.startsWith(`${H6}:${nI}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Sf(t.status,t.statusText,t.data)}catch{}}function oI(e,{relative:t}={}){It(tu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(Ni),{hash:i,pathname:s,search:a}=kf(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:Eo([n,s])),r.createHref({pathname:c,search:a,hash:i})}function tu(){return S.useContext(l0)!=null}function Qi(){return It(tu(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(l0).location}var U6="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function q6(e){S.useContext(Ni).static||S.useLayoutEffect(e)}function Cl(){let{isDataRoute:e}=S.useContext(fo);return e?vI():sI()}function sI(){It(tu(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Sl),{basename:t,navigator:n}=S.useContext(Ni),{matches:r}=S.useContext(fo),{pathname:i}=Qi(),s=JSON.stringify(s0(r)),a=S.useRef(!1);return q6(()=>{a.current=!0}),S.useCallback((u,h={})=>{if(Un(a.current,U6),!a.current)return;if(typeof u=="number"){n.go(u);return}let m=a0(u,JSON.parse(s),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Eo([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,i,e])}var aI=S.createContext(null);function lI(e){let t=S.useContext(fo).outlet;return S.useMemo(()=>t&&S.createElement(aI.Provider,{value:e},t),[t,e])}function kf(e,{relative:t}={}){let{matches:n}=S.useContext(fo),{pathname:r}=Qi(),i=JSON.stringify(s0(n));return S.useMemo(()=>a0(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function cI(e,t,n,r,i){It(tu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=S.useContext(Ni),{matches:a}=S.useContext(fo),c=a[a.length-1],u=c?c.params:{},h=c?c.pathname:"/",m=c?c.pathnameBase:"/",p=c&&c.route;{let T=p&&p.path||"";$6(h,!p||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (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=Qi(),x;x=y;let b=x.pathname||"/",w=b;if(m!=="/"){let T=m.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(T.length).join("/")}let E=ta(e,{pathname:w});return Un(p||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Un(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.`),pI(E&&E.map(T=>Object.assign({},T,{params:Object.assign({},u,T.params),pathname:Eo([m,s.encodeLocation?s.encodeLocation(T.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?m:Eo([m,s.encodeLocation?s.encodeLocation(T.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),a,n,r,i)}function uI(){let e=bI(),t=Xd(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},s={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:s},"ErrorBoundary")," or"," ",S.createElement("code",{style:s},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:i},n):null,a)}var dI=S.createElement(uI,null),V6=class extends S.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=iI(e.digest);n&&(e=n)}let t=e!==void 0?S.createElement(fo.Provider,{value:this.props.routeContext},S.createElement(lb.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(fI,{error:e},t):t}};V6.contextType=F6;var S2=new WeakMap;function fI({children:e,error:t}){let{basename:n}=S.useContext(Ni);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=rI(t.digest);if(r){let i=S2.get(t);if(i)throw i;let s=N6(r.location,n);if(T6&&!S2.get(t))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw S2.set(t,a),a}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function hI({routeContext:e,match:t,children:n}){let r=S.useContext(Sl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(fo.Provider,{value:e},n)}function pI(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 s=e,a=n?.errors;if(a!=null){let m=s.findIndex(p=>p.route.id&&a?.[p.route.id]!==void 0);It(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),s=s.slice(0,Math.min(s.length,m+1))}let c=!1,u=-1;if(n)for(let m=0;m<s.length;m++){let p=s[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(u=m),p.route.id){let{loaderData:y,errors:x}=n,b=p.route.loader&&!y.hasOwnProperty(p.route.id)&&(!x||x[p.route.id]===void 0);if(p.route.lazy||b){c=!0,u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}let h=n&&r?(m,p)=>{r(m,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Cf(n.matches),errorInfo:p})}:void 0;return s.reduceRight((m,p,y)=>{let x,b=!1,w=null,E=null;n&&(x=a&&p.route.id?a[p.route.id]:void 0,w=p.route.errorElement||dI,c&&(u<0&&y===0?($6("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,E=null):u===y&&(b=!0,E=p.route.hydrateFallbackElement||null)));let k=t.concat(s.slice(0,y+1)),T=()=>{let N;return x?N=w:b?N=E:p.route.Component?N=S.createElement(p.route.Component,null):p.route.element?N=p.route.element:N=m,S.createElement(hI,{match:p,routeContext:{outlet:m,matches:k,isDataRoute:n!=null},children:N})};return n&&(p.route.ErrorBoundary||p.route.errorElement||y===0)?S.createElement(V6,{location:n.location,revalidation:n.revalidation,component:w,error:x,children:T(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:h}):T()},null)}function cb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mI(e){let t=S.useContext(Sl);return It(t,cb(e)),t}function gI(e){let t=S.useContext(Ef);return It(t,cb(e)),t}function yI(e){let t=S.useContext(fo);return It(t,cb(e)),t}function ub(e){let t=yI(e),n=t.matches[t.matches.length-1];return It(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function xI(){return ub("useRouteId")}function bI(){let e=S.useContext(lb),t=gI("useRouteError"),n=ub("useRouteError");return e!==void 0?e:t.errors?.[n]}function vI(){let{router:e}=mI("useNavigate"),t=ub("useNavigate"),n=S.useRef(!1);return q6(()=>{n.current=!0}),S.useCallback(async(i,s={})=>{Un(n.current,U6),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var sE={};function $6(e,t,n){!t&&!sE[e]&&(sE[e]=!0,Un(!1,n))}var aE={};function lE(e,t){!e&&!aE[t]&&(aE[t]=!0,console.warn(t))}var wI="useOptimistic",cE=nb[wI],SI=()=>{};function CI(e){return cE?cE(e):[e,SI]}function EI(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Un(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:S.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Un(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:S.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Un(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:S.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var kI=["HydrateFallback","hydrateFallbackElement"],TI=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 NI({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=JL()||r;let[s,a]=S.useState(e.state),[c,u]=CI(s),[h,m]=S.useState(),[p,y]=S.useState({isTransitioning:!1}),[x,b]=S.useState(),[w,E]=S.useState(),[k,T]=S.useState(),N=S.useRef(new Map),O=S.useCallback((_,{deletedFetchers:F,newErrors:I,flushSync:H,viewTransitionOpts:q})=>{I&&n&&Object.values(I).forEach($=>n($,{location:_.location,params:_.matches[0]?.params??{},unstable_pattern:Cf(_.matches)})),_.fetchers.forEach(($,U)=>{$.data!==void 0&&N.current.set(U,$.data)}),F.forEach($=>N.current.delete($)),lE(H===!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(lE(q==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."),!q||!V){t&&H?t(()=>a(_)):r===!1?a(_):S.startTransition(()=>{r===!0&&u($=>uE($,_)),a(_)});return}if(t&&H){t(()=>{w&&(x?.resolve(),w.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:q.currentLocation,nextLocation:q.nextLocation})});let $=e.window.document.startViewTransition(()=>{t(()=>a(_))});$.finished.finally(()=>{t(()=>{b(void 0),E(void 0),m(void 0),y({isTransitioning:!1})})}),t(()=>E($));return}w?(x?.resolve(),w.skipTransition(),T({state:_,currentLocation:q.currentLocation,nextLocation:q.nextLocation})):(m(_),y({isTransitioning:!0,flushSync:!1,currentLocation:q.currentLocation,nextLocation:q.nextLocation}))},[e.window,t,w,x,r,u,n]);S.useLayoutEffect(()=>e.subscribe(O),[e,O]),S.useEffect(()=>{p.isTransitioning&&!p.flushSync&&b(new TI)},[p]),S.useEffect(()=>{if(x&&h&&e.window){let _=h,F=x.promise,I=e.window.document.startViewTransition(async()=>{r===!1?a(_):S.startTransition(()=>{r===!0&&u(H=>uE(H,_)),a(_)}),await F});I.finished.finally(()=>{b(void 0),E(void 0),m(void 0),y({isTransitioning:!1})}),E(I)}},[h,x,e.window,r,u]),S.useEffect(()=>{x&&h&&c.location.key===h.location.key&&x.resolve()},[x,w,c.location,h]),S.useEffect(()=>{!p.isTransitioning&&k&&(m(k.state),y({isTransitioning:!0,flushSync:!1,currentLocation:k.currentLocation,nextLocation:k.nextLocation}),T(void 0))},[p.isTransitioning,k]);let j=S.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:_=>e.navigate(_),push:(_,F,I)=>e.navigate(_,{state:F,preventScrollReset:I?.preventScrollReset}),replace:(_,F,I)=>e.navigate(_,{replace:!0,state:F,preventScrollReset:I?.preventScrollReset})}),[e]),A=e.basename||"/",R=S.useMemo(()=>({router:e,navigator:j,static:!1,basename:A,onError:n}),[e,j,A,n]);return S.createElement(S.Fragment,null,S.createElement(Sl.Provider,{value:R},S.createElement(Ef.Provider,{value:c},S.createElement(B6.Provider,{value:N.current},S.createElement(ab.Provider,{value:p},S.createElement(jI,{basename:A,location:c.location,navigationType:c.historyAction,navigator:j,unstable_useTransitions:r},S.createElement(RI,{routes:e.routes,future:e.future,state:c,onError:n})))))),null)}function uE(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 RI=S.memo(AI);function AI({routes:e,future:t,state:n,onError:r}){return cI(e,void 0,n,r,t)}function Y6({to:e,replace:t,state:n,relative:r}){It(tu(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=S.useContext(Ni);Un(!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:s}=S.useContext(fo),{pathname:a}=Qi(),c=Cl(),u=a0(e,s0(s),a,r==="path"),h=JSON.stringify(u);return S.useEffect(()=>{c(JSON.parse(h),{replace:t,state:n,relative:r})},[c,h,r,t,n]),null}function W6(e){return lI(e.context)}function jI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:a}){It(!tu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:c,navigator:i,static:s,unstable_useTransitions:a,future:{}}),[c,i,s,a]);typeof n=="string"&&(n=ba(n));let{pathname:h="/",search:m="",hash:p="",state:y=null,key:x="default"}=n,b=S.useMemo(()=>{let w=Gi(h,c);return w==null?null:{location:{pathname:w,search:m,hash:p,state:y,key:x},navigationType:r}},[c,h,m,p,y,x,r]);return Un(b!=null,`<Router basename="${c}"> is not able to match the URL "${h}${m}${p}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:S.createElement(Ni.Provider,{value:u},S.createElement(l0.Provider,{children:t,value:b}))}var Jp="get",em="application/x-www-form-urlencoded";function c0(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function OI(e){return c0(e)&&e.tagName.toLowerCase()==="button"}function MI(e){return c0(e)&&e.tagName.toLowerCase()==="form"}function DI(e){return c0(e)&&e.tagName.toLowerCase()==="input"}function _I(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LI(e,t){return e.button===0&&(!t||t==="_self")&&!_I(e)}function zy(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 II(e,t){let n=zy(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}var gp=null;function PI(){if(gp===null)try{new FormData(document.createElement("form"),0),gp=!1}catch{gp=!0}return gp}var zI=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function C2(e){return e!=null&&!zI.has(e)?(Un(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${em}"`),null):e}function FI(e,t){let n,r,i,s,a;if(MI(e)){let c=e.getAttribute("action");r=c?Gi(c,t):null,n=e.getAttribute("method")||Jp,i=C2(e.getAttribute("enctype"))||em,s=new FormData(e)}else if(OI(e)||DI(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 u=e.getAttribute("formaction")||c.getAttribute("action");if(r=u?Gi(u,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Jp,i=C2(e.getAttribute("formenctype"))||C2(c.getAttribute("enctype"))||em,s=new FormData(c,e),!PI()){let{name:h,type:m,value:p}=e;if(m==="image"){let y=h?`${h}.`:"";s.append(`${y}x`,"0"),s.append(`${y}y`,"0")}else h&&s.append(h,p)}}else{if(c0(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Jp,r=null,i=em,a=e}return s&&i==="text/plain"&&(a=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function db(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function BI(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&&Gi(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function HI(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 UI(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 qI(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let a=await HI(s,n);return a.links?a.links():[]}return[]}));return WI(r.flat(1).filter(UI).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function dE(e,t,n,r,i,s){let a=(u,h)=>n[h]?u.route.id!==n[h].route.id:!0,c=(u,h)=>n[h].pathname!==u.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==u.params["*"];return s==="assets"?t.filter((u,h)=>a(u,h)||c(u,h)):s==="data"?t.filter((u,h)=>{let m=r.routes[u.route.id];if(!m||!m.hasLoader)return!1;if(a(u,h)||c(u,h))return!0;if(u.route.shouldRevalidate){let p=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function VI(e,t,{includeHydrateFallback:n}={}){return $I(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function $I(e){return[...new Set(e)]}function YI(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function WI(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(YI(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function G6(){let e=S.useContext(Sl);return db(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function GI(){let e=S.useContext(Ef);return db(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var fb=S.createContext(void 0);fb.displayName="FrameworkContext";function K6(){let e=S.useContext(fb);return db(e,"You must render this element inside a <HydratedRouter> element"),e}function KI(e,t){let n=S.useContext(fb),[r,i]=S.useState(!1),[s,a]=S.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:h,onMouseLeave:m,onTouchStart:p}=t,y=S.useRef(null);S.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let w=k=>{k.forEach(T=>{a(T.isIntersecting)})},E=new IntersectionObserver(w,{threshold:.5});return y.current&&E.observe(y.current),()=>{E.disconnect()}}},[e]),S.useEffect(()=>{if(r){let w=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(w)}}},[r]);let x=()=>{i(!0)},b=()=>{i(!1),a(!1)};return n?e!=="intent"?[s,y,{}]:[s,y,{onFocus:ld(c,x),onBlur:ld(u,b),onMouseEnter:ld(h,x),onMouseLeave:ld(m,b),onTouchStart:ld(p,x)}]:[!1,y,{}]}function ld(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function QI({page:e,...t}){let{router:n}=G6(),r=S.useMemo(()=>ta(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?S.createElement(ZI,{page:e,matches:r,...t}):null}function XI(e){let{manifest:t,routeModules:n}=K6(),[r,i]=S.useState([]);return S.useEffect(()=>{let s=!1;return qI(e,t,n).then(a=>{s||i(a)}),()=>{s=!0}},[e,t,n]),r}function ZI({page:e,matches:t,...n}){let r=Qi(),{future:i,manifest:s,routeModules:a}=K6(),{basename:c}=G6(),{loaderData:u,matches:h}=GI(),m=S.useMemo(()=>dE(e,t,h,s,r,"data"),[e,t,h,s,r]),p=S.useMemo(()=>dE(e,t,h,s,r,"assets"),[e,t,h,s,r]),y=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,E=!1;if(t.forEach(T=>{let N=s.routes[T.route.id];!N||!N.hasLoader||(!m.some(O=>O.route.id===T.route.id)&&T.route.id in u&&a[T.route.id]?.shouldRevalidate||N.hasClientLoader?E=!0:w.add(T.route.id))}),w.size===0)return[];let k=BI(e,c,i.unstable_trailingSlashAwareDataRequests,"data");return E&&w.size>0&&k.searchParams.set("_routes",t.filter(T=>w.has(T.route.id)).map(T=>T.route.id).join(",")),[k.pathname+k.search]},[c,i.unstable_trailingSlashAwareDataRequests,u,r,s,m,t,e,a]),x=S.useMemo(()=>VI(p,s),[p,s]),b=XI(p);return S.createElement(S.Fragment,null,y.map(w=>S.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>S.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),b.map(({key:w,link:E})=>S.createElement("link",{key:w,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function JI(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var eP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{eP&&(window.__reactRouterVersion="7.13.0")}catch{}function tP(e,t){return RL({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:V_({window:t?.window}),hydrationData:nP(),routes:e,mapRouteProperties:EI,hydrationRouteProperties:kI,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function nP(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:rP(e.errors)}),e}function rP(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 Sf(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let a=new s(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}var Q6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hb=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:a,state:c,target:u,to:h,preventScrollReset:m,viewTransition:p,unstable_defaultShouldRevalidate:y,...x},b){let{basename:w,unstable_useTransitions:E}=S.useContext(Ni),k=typeof h=="string"&&Q6.test(h),T=N6(h,w);h=T.to;let N=oI(h,{relative:i}),[O,j,A]=KI(r,x),R=sP(h,{replace:a,state:c,target:u,preventScrollReset:m,relative:i,viewTransition:p,unstable_defaultShouldRevalidate:y,unstable_useTransitions:E});function _(I){t&&t(I),I.defaultPrevented||R(I)}let F=S.createElement("a",{...x,...A,href:T.absoluteURL||N,onClick:T.isExternal||s?t:_,ref:JI(b,j),target:u,"data-discover":!k&&n==="render"?"true":void 0});return O&&!k?S.createElement(S.Fragment,null,F,S.createElement(QI,{page:N})):F});hb.displayName="Link";var X6=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:a,viewTransition:c,children:u,...h},m){let p=kf(a,{relative:h.relative}),y=Qi(),x=S.useContext(Ef),{navigator:b,basename:w}=S.useContext(Ni),E=x!=null&&dP(p)&&c===!0,k=b.encodeLocation?b.encodeLocation(p).pathname:p.pathname,T=y.pathname,N=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(T=T.toLowerCase(),N=N?N.toLowerCase():null,k=k.toLowerCase()),N&&w&&(N=Gi(N,w)||N);const O=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let j=T===k||!i&&T.startsWith(k)&&T.charAt(O)==="/",A=N!=null&&(N===k||!i&&N.startsWith(k)&&N.charAt(k.length)==="/"),R={isActive:j,isPending:A,isTransitioning:E},_=j?t:void 0,F;typeof r=="function"?F=r(R):F=[r,j?"active":null,A?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let I=typeof s=="function"?s(R):s;return S.createElement(hb,{...h,"aria-current":_,className:F,ref:m,style:I,to:a,viewTransition:c},typeof u=="function"?u(R):u)});X6.displayName="NavLink";var iP=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:a=Jp,action:c,onSubmit:u,relative:h,preventScrollReset:m,viewTransition:p,unstable_defaultShouldRevalidate:y,...x},b)=>{let{unstable_useTransitions:w}=S.useContext(Ni),E=cP(),k=uP(c,{relative:h}),T=a.toLowerCase()==="get"?"get":"post",N=typeof c=="string"&&Q6.test(c),O=j=>{if(u&&u(j),j.defaultPrevented)return;j.preventDefault();let A=j.nativeEvent.submitter,R=A?.getAttribute("formmethod")||a,_=()=>E(A||j.currentTarget,{fetcherKey:t,method:R,navigate:n,replace:i,state:s,relative:h,preventScrollReset:m,viewTransition:p,unstable_defaultShouldRevalidate:y});w&&n!==!1?S.startTransition(()=>_()):_()};return S.createElement("form",{ref:b,method:T,action:k,onSubmit:r?u:O,...x,"data-discover":!N&&e==="render"?"true":void 0})});iP.displayName="Form";function oP(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Z6(e){let t=S.useContext(Sl);return It(t,oP(e)),t}function sP(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:a,unstable_defaultShouldRevalidate:c,unstable_useTransitions:u}={}){let h=Cl(),m=Qi(),p=kf(e,{relative:s});return S.useCallback(y=>{if(LI(y,t)){y.preventDefault();let x=n!==void 0?n:Ao(m)===Ao(p),b=()=>h(e,{replace:x,state:r,preventScrollReset:i,relative:s,viewTransition:a,unstable_defaultShouldRevalidate:c});u?S.startTransition(()=>b()):b()}},[m,h,p,n,r,t,e,i,s,a,c,u])}function u0(e){Un(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=S.useRef(zy(e)),n=S.useRef(!1),r=Qi(),i=S.useMemo(()=>II(r.search,n.current?null:t.current),[r.search]),s=Cl(),a=S.useCallback((c,u)=>{const h=zy(typeof c=="function"?c(new URLSearchParams(i)):c);n.current=!0,s("?"+h,u)},[s,i]);return[i,a]}var aP=0,lP=()=>`__${String(++aP)}__`;function cP(){let{router:e}=Z6("useSubmit"),{basename:t}=S.useContext(Ni),n=xI(),r=e.fetch,i=e.navigate;return S.useCallback(async(s,a={})=>{let{action:c,method:u,encType:h,formData:m,body:p}=FI(s,t);if(a.navigate===!1){let y=a.fetcherKey||lP();await r(y,n,a.action||c,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:m,body:p,formMethod:a.method||u,formEncType:a.encType||h,flushSync:a.flushSync})}else await i(a.action||c,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:m,body:p,formMethod:a.method||u,formEncType:a.encType||h,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function uP(e,{relative:t}={}){let{basename:n}=S.useContext(Ni),r=S.useContext(fo);It(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...kf(e||".",{relative:t})},a=Qi();if(e==null){s.search=a.search;let c=new URLSearchParams(s.search),u=c.getAll("index");if(u.some(m=>m==="")){c.delete("index"),u.filter(p=>p).forEach(p=>c.append("index",p));let m=c.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Eo([n,s.pathname])),Ao(s)}function dP(e,{relative:t}={}){let n=S.useContext(ab);It(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Z6("useViewTransitionState"),i=kf(e,{relative:t});if(!n.isTransitioning)return!1;let s=Gi(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Gi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ym(i.pathname,a)!=null||ym(i.pathname,s)!=null}function fP(e){return S.createElement(NI,{flushSync:Ci.flushSync,...e})}const fE={};function sr(e,t){const n=S.useRef(fE);return n.current===fE&&(n.current=e(t)),n}const Fy=[];let By;function hP(){return By}function pP(e){Fy.push(e)}function pb(e){const t=(n,r)=>{const i=sr(mP).current;let s;try{By=i;for(const a of Fy)a.before(i);s=e(n,r);for(const a of Fy)a.after(i);i.didInitialize=!0}finally{By=void 0}return s};return t.displayName=e.displayName||e.name,t}function J6(e){return S.forwardRef(pb(e))}function mP(){return{didInitialize:!1}}function d0(e){const t=S.useRef(!0);t.current&&(t.current=!1,e())}const gP=()=>{},We=typeof document<"u"?S.useLayoutEffect:gP;function yP(e,t){return function(r,...i){const s=new URL(e);return s.searchParams.set("code",r.toString()),i.forEach(a=>s.searchParams.append("args[]",a)),`${t} error #${r}; visit ${s} for the full message.`}}const Cn=yP("https://base-ui.com/production-error","Base UI"),eN=S.createContext(void 0);function Tf(e){const t=S.useContext(eN);if(t===void 0&&!e)throw new Error(Cn(72));return t}const xP=[];function mb(e){S.useEffect(e,xP)}const cd=0;class uo{static create(){return new uo}currentId=cd;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cd,n()},t)}isStarted(){return this.currentId!==cd}clear=()=>{this.currentId!==cd&&(clearTimeout(this.currentId),this.currentId=cd)};disposeEffect=()=>this.clear}function Hn(){const e=sr(uo.create).current;return mb(e.disposeEffect),e}function f0(){return typeof window<"u"}function va(e){return gb(e)?(e.nodeName||"").toLowerCase():"#document"}function qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Do(e){var t;return(t=(gb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gb(e){return f0()?e instanceof Node||e instanceof qn(e).Node:!1}function un(e){return f0()?e instanceof Element||e instanceof qn(e).Element:!1}function Fn(e){return f0()?e instanceof HTMLElement||e instanceof qn(e).HTMLElement:!1}function Zd(e){return!f0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qn(e).ShadowRoot}function wa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ei(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function bP(e){return/^(table|td|th)$/.test(va(e))}function h0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const vP=/transform|translate|scale|rotate|perspective|filter/,wP=/paint|layout|strict|content/,el=e=>!!e&&e!=="none";let E2;function yb(e){const t=un(e)?Ei(e):e;return el(t.transform)||el(t.translate)||el(t.scale)||el(t.rotate)||el(t.perspective)||!p0()&&(el(t.backdropFilter)||el(t.filter))||vP.test(t.willChange||"")||wP.test(t.contain||"")}function SP(e){let t=jo(e);for(;Fn(t)&&!ko(t);){if(yb(t))return t;if(h0(t))return null;t=jo(t)}return null}function p0(){return E2==null&&(E2=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),E2}function ko(e){return/^(html|body|#document)$/.test(va(e))}function Ei(e){return qn(e).getComputedStyle(e)}function m0(e){return un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jo(e){if(va(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zd(e)&&e.host||Do(e);return Zd(t)?t.host:t}function tN(e){const t=jo(e);return ko(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fn(t)&&wa(t)?t:tN(t)}function Jd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=tN(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=qn(i);if(s){const c=Hy(a);return t.concat(a,a.visualViewport||[],wa(i)?i:[],c&&n?Jd(c):[])}else return t.concat(i,Jd(i,[],n))}function Hy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const nu=typeof navigator<"u",k2=CP(),nN=kP(),rN=EP(),xb=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),iN=k2.platform==="MacIntel"&&k2.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(k2.platform),oN=nu&&/apple/i.test(navigator.vendor),Uy=nu&&/android/i.test(nN)||/android/i.test(rN),sN=nu&&nN.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,aN=rN.includes("jsdom/");function CP(){if(!nu)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 EP(){if(!nu)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function kP(){if(!nu)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const qy="data-base-ui-focusable",lN="active",cN="selected",uN="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",fa="ArrowLeft",ha="ArrowRight",bb="ArrowUp",Nf="ArrowDown";function bi(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Nt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Zd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function xm(e,t){if(!un(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(Nt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Fr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function io(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 TP(e){return e.matches("html,body")}function g0(e){return Fn(e)&&e.matches(uN)}function Vy(e){return e?e.getAttribute("role")==="combobox"&&g0(e):!1}function NP(e){if(!e||aN)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ef(e){return e?e.hasAttribute(qy)?e:e.querySelector(`[${qy}]`)||e:null}function ds(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...ds(e,i.id,n)])}function hE(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(s=>s.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function xi(e){e.preventDefault(),e.stopPropagation()}function RP(e){return"nativeEvent"in e}function dN(e){return e.pointerType===""&&e.isTrusted?!0:Uy&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fN(e){return aN?!1:!Uy&&e.width===0&&e.height===0||Uy&&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 Bc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function hN(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const AP=["top","right","bottom","left"],Hc=Math.min,vi=Math.max,bm=Math.round,al=Math.floor,To=e=>({x:e,y:e}),jP={left:"right",right:"left",bottom:"top",top:"bottom"};function $y(e,t,n){return vi(e,Hc(t,n))}function hs(e,t){return typeof e=="function"?e(t):e}function ri(e){return e.split("-")[0]}function Sa(e){return e.split("-")[1]}function vb(e){return e==="x"?"y":"x"}function wb(e){return e==="y"?"height":"width"}function Yi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Sb(e){return vb(Yi(e))}function OP(e,t,n){n===void 0&&(n=!1);const r=Sa(e),i=Sb(e),s=wb(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=vm(a)),[a,vm(a)]}function MP(e){const t=vm(e);return[Yy(e),t,Yy(t)]}function Yy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const pE=["left","right"],mE=["right","left"],DP=["top","bottom"],_P=["bottom","top"];function LP(e,t,n){switch(e){case"top":case"bottom":return n?t?mE:pE:t?pE:mE;case"left":case"right":return t?DP:_P;default:return[]}}function IP(e,t,n,r){const i=Sa(e);let s=LP(ri(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(Yy)))),s}function vm(e){const t=ri(e);return jP[t]+e.slice(t.length)}function PP(e){return{top:0,right:0,bottom:0,left:0,...e}}function pN(e){return typeof e!="number"?PP(e):{top:e,right:e,bottom:e,left:e}}function tf(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 yp(e,t,n){return Math.floor(e/t)!==n}function wm(e,t){return t<0||t>=e.current.length}function T2(e,t){return Pr(e,{disabledIndices:t})}function gE(e,t){return Pr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Pr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let s=t;do s+=n?-i:i;while(s>=0&&s<=e.current.length-1&&jc(e,s,r));return s}function zP(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:s,disabledIndices:a,minIndex:c,maxIndex:u,prevIndex:h,stopEvent:m=!1}){let p=h,y;if(t.key===bb?y="up":t.key===Nf&&(y="down"),y){const x=[],b=[];let w=!1,E=0;{let _=null,F=-1;e.current.forEach((I,H)=>{if(I==null)return;E+=1;const q=I.closest('[role="row"]');q&&(w=!0),(q!==_||F===-1)&&(_=q,F+=1,x[F]=[]),x[F].push(H),b[H]=F})}let k=!1,T=0;if(w)for(const _ of x){const F=_.length;F>T&&(T=F),F!==s&&(k=!0)}const N=k&&E<e.current.length,O=T||s,j=_=>{if(!k||h===-1)return;const F=b[h];if(F==null)return;const I=x[F].indexOf(h),H=_==="up"?-1:1;for(let q=F+H,V=0;V<x.length;V+=1,q+=H){if(q<0||q>=x.length){if(!r||N)return;q=q<0?x.length-1:0}const $=x[q];for(let U=Math.min(I,$.length-1);U>=0;U-=1){const P=$[U];if(!jc(e,P,a))return P}}},A=_=>{if(!N||h===-1)return;const F=h%O,I=_==="up"?-O:O,H=u-u%O,q=al(u/O)+1;for(let V=h-F+I,$=0;$<q;$+=1,V+=I){if(V<0||V>u){if(!r)return;V=V<0?H:0}const U=Math.min(V+O-1,u);for(let P=Math.min(V+F,U);P>=V;P-=1)if(!jc(e,P,a))return P}};m&&xi(t);const R=j(y)??A(y);if(R!==void 0)p=R;else if(h===-1)p=y==="up"?u:c;else if(p=Pr(e,{startingIndex:h,amount:O,decrement:y==="up",disabledIndices:a}),r){if(y==="up"&&(h-O<c||p<0)){const _=h%O,F=u%O,I=u-(F-_);F===_?p=u:p=F>_?I:I-O}y==="down"&&h+O>u&&(p=Pr(e,{startingIndex:h%O-O,amount:O,disabledIndices:a}))}wm(e,p)&&(p=h)}if(n==="both"){const x=al(h/s);t.key===(i?fa:ha)&&(m&&xi(t),h%s!==s-1?(p=Pr(e,{startingIndex:h,disabledIndices:a}),r&&yp(p,s,x)&&(p=Pr(e,{startingIndex:h-h%s-1,disabledIndices:a}))):r&&(p=Pr(e,{startingIndex:h-h%s-1,disabledIndices:a})),yp(p,s,x)&&(p=h)),t.key===(i?ha:fa)&&(m&&xi(t),h%s!==0?(p=Pr(e,{startingIndex:h,decrement:!0,disabledIndices:a}),r&&yp(p,s,x)&&(p=Pr(e,{startingIndex:h+(s-h%s),decrement:!0,disabledIndices:a}))):r&&(p=Pr(e,{startingIndex:h+(s-h%s),decrement:!0,disabledIndices:a})),yp(p,s,x)&&(p=h));const b=al(u/s)===x;wm(e,p)&&(r&&b?p=t.key===(i?ha:fa)?u:Pr(e,{startingIndex:h-h%s-1,disabledIndices:a}):p=h)}return p}function FP(e,t,n){const r=[];let i=0;return e.forEach(({width:s,height:a},c)=>{let u=!1;for(;!u;){const h=[];for(let m=0;m<s;m+=1)for(let p=0;p<a;p+=1)h.push(i+m+p*t);i%t+s<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=c}),u=!0):i+=1}}),[...r]}function BP(e,t,n,r,i){if(e===-1)return-1;const s=n.indexOf(e),a=t[e];switch(i){case"tl":return s;case"tr":return a?s+a.width-1:s;case"bl":return a?s+(a.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function HP(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function jc(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const i=e.current[t];return i?Cb(i)?!n&&(i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"):!0:!1}function Cb(e){return Ei(e).display!=="none"}var UP=["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] *)"],Sm=UP.join(","),mN=typeof Element>"u",Uc=mN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cm=!mN&&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},Em=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"),s=i===""||i==="true",a=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Em(t.parentNode));return a},qP=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},gN=function(t,n,r){if(Em(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Sm));return n&&Uc.call(t,Sm)&&i.unshift(t),i=i.filter(r),i},km=function(t,n,r){for(var i=[],s=Array.from(t);s.length;){var a=s.shift();if(!Em(a,!1))if(a.tagName==="SLOT"){var c=a.assignedElements(),u=c.length?c:a.children,h=km(u,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:a,candidates:h})}else{var m=Uc.call(a,Sm);m&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),y=!Em(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&y){var x=km(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,x):i.push({scopeParent:a,candidates:x})}else s.unshift.apply(s,a.children)}}return i},yN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},xN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||qP(t))&&!yN(t)?0:t.tabIndex},VP=function(t,n){var r=xN(t);return r<0&&n&&!yN(t)?0:r},$P=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},bN=function(t){return t.tagName==="INPUT"},YP=function(t){return bN(t)&&t.type==="hidden"},WP=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},GP=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},KP=function(t){if(!t.name)return!0;var n=t.form||Cm(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(a){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",a.message),!1}var s=GP(i,t.form);return!s||s===t},QP=function(t){return bN(t)&&t.type==="radio"},XP=function(t){return QP(t)&&!KP(t)},ZP=function(t){var n,r=t&&Cm(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var a,c,u;for(s=!!((a=i)!==null&&a!==void 0&&(c=a.ownerDocument)!==null&&c!==void 0&&c.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!s&&i;){var h,m,p;r=Cm(i),i=(h=r)===null||h===void 0?void 0:h.host,s=!!((m=i)!==null&&m!==void 0&&(p=m.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return s},yE=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},JP=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var a=Uc.call(t,"details>summary:first-of-type"),c=a?t.parentElement:t;if(Uc.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var h=t.parentElement,m=Cm(t);if(h&&!h.shadowRoot&&i(h)===!0)return yE(t);t.assignedSlot?t=t.assignedSlot:!h&&m!==t.ownerDocument?t=m.host:t=h}t=u}if(ZP(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yE(t);return!1},ez=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 Uc.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Wy=function(t,n){return!(n.disabled||YP(n)||JP(n,t)||WP(n)||ez(n))},Gy=function(t,n){return!(XP(n)||xN(n)<0||!Wy(t,n))},tz=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},vN=function(t){var n=[],r=[];return t.forEach(function(i,s){var a=!!i.scopeParent,c=a?i.scopeParent:i,u=VP(c,a),h=a?vN(i.candidates):c;u===0?a?n.push.apply(n,h):n.push(c):r.push({documentOrder:s,tabIndex:u,item:i,isScope:a,content:h})}),r.sort($P).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},Rf=function(t,n){n=n||{};var r;return n.getShadowRoot?r=km([t],n.includeContainer,{filter:Gy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:tz}):r=gN(t,n.includeContainer,Gy.bind(null,n)),vN(r)},nz=function(t,n){n=n||{};var r;return n.getShadowRoot?r=km([t],n.includeContainer,{filter:Wy.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=gN(t,n.includeContainer,Wy.bind(null,n)),r},wN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Uc.call(t,Sm)===!1?!1:Gy(n,t)};function Zt(e){return e?.ownerDocument||document}const ru=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function SN(e,t){const n=Rf(e,ru()),r=n.length;if(r===0)return;const i=bi(Zt(e)),s=n.indexOf(i),a=s===-1?t===1?0:r-1:s+t;return n[a]}function Eb(e){return SN(Zt(e).body,1)||e}function CN(e){return SN(Zt(e).body,-1)||e}function EN(e,t){if(!e)return null;const n=Rf(Zt(e).body,ru()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const s=(i+t+r)%r;return n[s]}function rz(e){return EN(e,1)}function iz(e){return EN(e,-1)}function Oc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nt(n,r)}function oz(e){Rf(e,ru()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function xE(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 sz(e,t){return t!=null&&!Bc(t)?0:typeof e=="function"?e():e}function Pd(e,t,n){const r=sz(e,n);return typeof r=="number"?r:r?.[t]}function bE(e){return typeof e=="function"?e():e}function kN(e,t){return t||e==="click"||e==="mousedown"}function Er(){}const nf=Object.freeze([]),Bn=Object.freeze({}),az=500,lz=500,cz={style:{transition:"none"}},uz="data-base-ui-click-trigger",TN={fallbackAxisSide:"none"},NN={fallbackAxisSide:"end"},dz={clipPath:"inset(50%)",position:"fixed",top:0,left:0},El="none",qc="trigger-press",Br="trigger-hover",Mc="trigger-focus",y0="outside-press",hl="item-press",fz="close-press",ml="focus-out",x0="escape-key",tm="list-navigation",RN="cancel-open",Ad="sibling-open",hz="disabled",kb="imperative-action",pz="window-resize";function kt(e,t,n,r){let i=!1,s=!1;const a=Bn;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){s=!0},get isCanceled(){return i},get isPropagationAllowed(){return s},trigger:n,...a}}const AN=S.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new uo,currentIdRef:{current:null},currentContextRef:{current:null}});function mz(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=S.useRef(n),s=S.useRef(n),a=S.useRef(null),c=S.useRef(null),u=Hn();return f.jsx(AN.Provider,{value:S.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:s,currentIdRef:a,timeoutMs:r,currentContextRef:c,timeout:u}),[r,u]),children:t})}function gz(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:i}=t,s=S.useContext(AN),{currentIdRef:a,delayRef:c,timeoutMs:u,initialDelayRef:h,currentContextRef:m,hasProvider:p,timeout:y}=s,[x,b]=S.useState(!1);return We(()=>{function w(){b(!1),m.current?.setIsInstantPhase(!1),a.current=null,m.current=null,c.current=h.current}if(a.current&&!i&&a.current===r){if(b(!1),u){const E=r;return y.start(u,()=>{n.select("open")||a.current&&a.current!==E||w()}),()=>{y.clear()}}w()}},[i,r,a,c,u,h,m,y,n]),We(()=>{if(!i)return;const w=m.current,E=a.current;y.clear(),m.current={onOpenChange:n.setOpen,setIsInstantPhase:b},a.current=r,c.current={open:0,close:Pd(h.current,"close")},E!==null&&E!==r?(b(!0),w?.setIsInstantPhase(!0),w?.onOpenChange(!1,kt(El))):(b(!1),w?.setIsInstantPhase(!1))},[i,r,n,a,c,u,h,m,y]),We(()=>()=>{m.current=null},[m]),S.useMemo(()=>({hasProvider:p,delayRef:c,isInstantPhase:x}),[p,c,x])}function ps(e,t,n,r){const i=sr(jN).current;return xz(i,e,t,n,r)&&ON(i,[e,t,n,r]),i.callback}function yz(e){const t=sr(jN).current;return bz(t,e)&&ON(t,e),t.callback}function jN(){return{callback:null,cleanup:null,refs:[]}}function xz(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function bz(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function ON(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 s=t[i];if(s!=null)switch(typeof s){case"function":{const a=s(n);typeof a=="function"&&(r[i]=a);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const s=t[i];if(s!=null)switch(typeof s){case"function":{const a=r[i];typeof a=="function"?a():s(null);break}case"object":{s.current=null;break}}}}}}}function yr(e){const t=sr(vz,e).current;return t.next=e,We(t.effect),t}function vz(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const N2=nb[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],wz=N2&&N2!==S.useLayoutEffect?N2:e=>e();function tt(e){const t=sr(Sz).current;return t.next=e,wz(t.effect),t.trampoline}function Sz(){const e={next:void 0,callback:Cz,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Cz(){}const xp=null;class Ez{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 bp=new Ez;class wo{static create(){return new wo}static request(t){return bp.request(t)}static cancel(t){return bp.cancel(t)}currentId=xp;request(t){this.cancel(),this.currentId=bp.request(()=>{this.currentId=xp,t()})}cancel=()=>{this.currentId!==xp&&(bp.cancel(this.currentId),this.currentId=xp)};disposeEffect=()=>this.cancel}function b0(){const e=sr(wo.create).current;return mb(e.disposeEffect),e}const MN={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Tb={...MN,position:"fixed",top:0,left:0},DN={...MN,position:"absolute"},Vc=S.forwardRef(function(t,n){const[r,i]=S.useState();We(()=>{oN&&i("button")},[]);const s={tabIndex:0,role:r};return f.jsx("span",{...t,ref:n,style:Tb,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});function rf(e){return`data-base-ui-${e}`}let vE=0;function zd(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(vE);const s=()=>e?.focus({preventScroll:n});i?s():vE=requestAnimationFrame(s)}const R2={inert:new WeakMap,"aria-hidden":new WeakMap},wE="data-base-ui-inert",Ky={inert:new WeakSet,"aria-hidden":new WeakSet};let ud=new WeakMap,A2=0;function kz(e){return Ky[e]}function _N(e){return e?Zd(e)?e.host:_N(e.parentNode):null}const j2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=_N(n);return e.contains(r)?r:null}).filter(n=>n!=null),SE=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},CE=(e,t,n)=>{const r=[],i=s=>{!s||n.has(s)||Array.from(s.children).forEach(a=>{va(a)!=="script"&&(t.has(a)?i(a):r.push(a))})};return i(e),r};function Tz(e,t,n,r,{mark:i=!0,markerIgnoreElements:s=[]}){const a=r?"inert":n?"aria-hidden":null;let c=null,u=null;const h=j2(t,e),m=i?j2(t,s):[],p=new Set(m),y=i?CE(t,SE(h),new Set(h)).filter(w=>!p.has(w)):[],x=[],b=[];if(a){const w=R2[a],E=kz(a);u=E,c=w;const k=j2(t,Array.from(t.querySelectorAll("[aria-live]"))),T=h.concat(k);CE(t,SE(T),new Set(T)).forEach(O=>{const j=O.getAttribute(a),A=j!==null&&j!=="false",R=(w.get(O)||0)+1;w.set(O,R),x.push(O),R===1&&A&&E.add(O),A||O.setAttribute(a,a==="inert"?"":"true")})}return i&&y.forEach(w=>{const E=(ud.get(w)||0)+1;ud.set(w,E),b.push(w),E===1&&w.setAttribute(wE,"")}),A2+=1,()=>{c&&x.forEach(w=>{const k=(c.get(w)||0)-1;c.set(w,k),k||(!u?.has(w)&&a&&w.removeAttribute(a),u?.delete(w))}),i&&b.forEach(w=>{const E=(ud.get(w)||0)-1;ud.set(w,E),E||w.removeAttribute(wE)}),A2-=1,A2||(R2.inert=new WeakMap,R2["aria-hidden"]=new WeakMap,Ky.inert=new WeakSet,Ky["aria-hidden"]=new WeakSet,ud=new WeakMap)}}function EE(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:s=[]}=t,a=Zt(e[0]).body;return Tz(e,a,n,r,{mark:i,markerIgnoreElements:s})}const Nz={...nb};let kE=0;function Rz(e,t="mui"){const[n,r]=S.useState(e),i=e||n;return S.useEffect(()=>{n==null&&(kE+=1,r(`${t}-${kE}`))},[n,t]),i}const TE=Nz.useId;function kl(e,t){if(TE!==void 0){const n=TE();return e??(t?`${t}-${n}`:n)}return Rz(e,t)}const Az=parseInt(S.version,10);function Nb(e){return Az>=e}function NE(e){if(!S.isValidElement(e))return null;const t=e,n=t.props;return(Nb(19)?n?.ref:t.ref)??null}function Qy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function jz(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const s=t[r](i);s!=null&&Object.assign(n,s);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Oz(e,t){return typeof e=="function"?e(t):e}function Mz(e,t){return typeof e=="function"?e(t):e}const Fd={};function Oo(e,t,n,r,i){let s={...Xy(e,Fd)};return t&&(s=jd(s,t)),n&&(s=jd(s,n)),r&&(s=jd(s,r)),i&&(s=jd(s,i)),s}function Dz(e){if(e.length===0)return Fd;if(e.length===1)return Xy(e[0],Fd);let t={...Xy(e[0],Fd)};for(let n=1;n<e.length;n+=1)t=jd(t,e[n]);return t}function jd(e,t){return LN(t)?t(e):_z(e,t)}function _z(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Qy(e.style,r);break}case"className":{e[n]=IN(e.className,r);break}default:Lz(n,r)?e[n]=Iz(e[n],r):e[n]=r}}return e}function Lz(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 LN(e){return typeof e=="function"}function Xy(e,t){return LN(e)?e(t):e??Fd}function Iz(e,t){return t?e?n=>{if(Pz(n)){const i=n;Zy(i);const s=t(i);return i.baseUIHandlerPrevented||e?.(i),s}const r=t(n);return e?.(n),r}:t:e}function Zy(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function IN(e,t){return t?e?t+" "+e:t:e}function Pz(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Ot(e,t,n={}){const r=t.render,i=zz(t,n);if(n.enabled===!1)return null;const s=n.state??Bn;return Bz(e,r,i,s)}function zz(e,t={}){const{className:n,style:r,render:i}=e,{state:s=Bn,ref:a,props:c,stateAttributesMapping:u,enabled:h=!0}=t,m=h?Oz(n,s):void 0,p=h?Mz(r,s):void 0,y=h?jz(s,u):Bn,x=h?Qy(y,Array.isArray(c)?Dz(c):c)??Bn:Bn;return typeof document<"u"&&(h?Array.isArray(a)?x.ref=yz([x.ref,NE(i),...a]):x.ref=ps(x.ref,NE(i),a):ps(null,null)),h?(m!==void 0&&(x.className=IN(x.className,m)),p!==void 0&&(x.style=Qy(x.style,p)),x):Bn}const Fz=Symbol.for("react.lazy");function Bz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Oo(n,t.props);i.ref=n.ref;let s=t;return s?.$$typeof===Fz&&(s=S.Children.toArray(t)[0]),S.cloneElement(s,i)}if(e&&typeof e=="string")return Hz(e,n);throw new Error(Cn(8))}function Hz(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):S.createElement(e,t)}const PN=S.createContext(null),zN=()=>S.useContext(PN),Uz=rf("portal");function FN(e={}){const{ref:t,container:n,componentProps:r=Bn,elementProps:i}=e,s=kl(),c=zN()?.portalNode,[u,h]=S.useState(null),[m,p]=S.useState(null),y=tt(E=>{E!==null&&p(E)}),x=S.useRef(null);We(()=>{if(n===null){x.current&&(x.current=null,p(null),h(null));return}if(s==null)return;const E=(n&&(gb(n)?n:n.current))??c??document.body;if(E==null){x.current&&(x.current=null,p(null),h(null));return}x.current!==E&&(x.current=E,p(null),h(E))},[n,c,s]);const b=Ot("div",r,{ref:[t,y],props:[{id:s,[Uz]:""},i]});return{portalNode:m,portalSubtree:u&&b?Ci.createPortal(b,u):null}}const Rb=S.forwardRef(function(t,n){const{children:r,container:i,className:s,render:a,renderGuards:c,...u}=t,{portalNode:h,portalSubtree:m}=FN({container:i,ref:n,componentProps:t,elementProps:u}),p=S.useRef(null),y=S.useRef(null),x=S.useRef(null),b=S.useRef(null),[w,E]=S.useState(null),k=w?.modal,T=w?.open,N=typeof c=="boolean"?c:!!w&&!w.modal&&w.open&&!!h;S.useEffect(()=>{if(!h||k)return;function j(A){h&&A.relatedTarget&&Oc(A)&&(A.type==="focusin"?xE:oz)(h)}return h.addEventListener("focusin",j,!0),h.addEventListener("focusout",j,!0),()=>{h.removeEventListener("focusin",j,!0),h.removeEventListener("focusout",j,!0)}},[h,k]),S.useEffect(()=>{!h||T||xE(h)},[T,h]);const O=S.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:y,beforeInsideRef:x,afterInsideRef:b,portalNode:h,setFocusManagerState:E}),[h]);return f.jsxs(S.Fragment,{children:[m,f.jsxs(PN.Provider,{value:O,children:[N&&h&&f.jsx(Vc,{"data-type":"outside",ref:p,onFocus:j=>{if(Oc(j,h))x.current?.focus();else{const A=w?w.domReference:null;CN(A)?.focus()}}}),N&&h&&f.jsx("span",{"aria-owns":h.id,style:dz}),h&&Ci.createPortal(r,h),N&&h&&f.jsx(Vc,{"data-type":"outside",ref:y,onFocus:j=>{if(Oc(j,h))b.current?.focus();else{const A=w?w.domReference:null;Eb(A)?.focus(),w?.closeOnFocusOut&&w?.onOpenChange(!1,kt(ml,j.nativeEvent))}}})]})]})});function BN(){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 Ab{nodesRef={current:[]};events=BN();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 HN=S.createContext(null),UN=S.createContext(null),vs=()=>S.useContext(HN)?.id||null,Ca=e=>{const t=S.useContext(UN);return e??t};function qN(e){const t=kl(),n=Ca(e),r=vs();return We(()=>{if(!t)return;const i={id:t,parentId:r};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,r]),t}function qz(e){const{children:t,id:n}=e,r=vs();return f.jsx(HN.Provider,{value:S.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Vz(e){const{children:t,externalTree:n}=e,r=sr(()=>n??new Ab).current;return f.jsx(UN.Provider,{value:r,children:t})}function ss(e){return e==null?e:"current"in e?e.current:e}function $z(e,t){const n=qn(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 RE=20;let aa=[];function jb(){aa=aa.filter(e=>e.deref()?.isConnected)}function Yz(e){jb(),e&&va(e)!=="body"&&(aa.push(new WeakRef(e)),aa.length>RE&&(aa=aa.slice(-RE)))}function O2(){return jb(),aa[aa.length-1]?.deref()}function Wz(e){if(!e)return null;const t=ru();return wN(e,t)?e:Rf(e,t)[0]||e}function Gz(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Cb(e)}function AE(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=ru(),i=nz(e,n).filter(a=>{const c=a.getAttribute("data-tabindex")||"";return wN(a,n)||a.hasAttribute("data-tabindex")&&!c.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Ob(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:s=!0,restoreFocus:a=!1,modal:c=!0,closeOnFocusOut:u=!0,openInteractionType:h="",nextFocusableElement:m,previousFocusableElement:p,beforeContentFocusGuardRef:y,externalTree:x,getInsideElements:b}=e,w="rootStore"in t?t.rootStore:t,E=w.useState("open"),k=w.useState("domReferenceElement"),T=w.useState("floatingElement"),{events:N,dataRef:O}=w.context,j=tt(()=>O.current.floatingContext?.nodeId),A=i===!1,R=Vy(k)&&A,_=S.useRef(["content"]),F=yr(i),I=yr(s),H=yr(h),q=Ca(x),V=zN(),$=S.useRef(!1),U=S.useRef(!1),P=S.useRef(!1),Y=S.useRef(-1),G=S.useRef(""),X=S.useRef(""),L=S.useRef(null),B=S.useRef(null),W=ps(L,y,V?.beforeInsideRef),D=ps(B,V?.afterInsideRef),Q=Hn(),ee=Hn(),J=b0(),he=V!=null,de=ef(T),Se=tt((_e=de)=>_e?Rf(_e,ru()):[]),Re=tt(()=>b?.().filter(_e=>_e!=null)??[]),je=tt(_e=>{const De=Se(_e);return _.current.map(()=>De).filter(Boolean).flat()});S.useEffect(()=>{if(r||!c)return;function _e(xe){xe.key==="Tab"&&Nt(de,bi(Zt(de)))&&Se().length===0&&!R&&xi(xe)}const De=Zt(de);return De.addEventListener("keydown",_e),()=>{De.removeEventListener("keydown",_e)}},[r,k,de,c,_,R,Se,je]),S.useEffect(()=>{if(r||!E)return;const _e=Zt(de);function De(){P.current=!1}function xe(we){const Ae=Fr(we),pe=Re(),be=Nt(T,Ae)||Nt(k,Ae)||Nt(V?.portalNode,Ae)||pe.some(ne=>ne===Ae||Nt(ne,Ae));P.current=!be,X.current=we.pointerType||"keyboard",Ae?.closest(`[${uz}]`)&&(U.current=!0)}function Ge(){X.current="keyboard"}return _e.addEventListener("pointerdown",xe,!0),_e.addEventListener("pointerup",De,!0),_e.addEventListener("pointercancel",De,!0),_e.addEventListener("keydown",Ge,!0),()=>{_e.removeEventListener("pointerdown",xe,!0),_e.removeEventListener("pointerup",De,!0),_e.removeEventListener("pointercancel",De,!0),_e.removeEventListener("keydown",Ge,!0)}},[r,T,k,de,E,V,Re]),S.useEffect(()=>{if(r||!u)return;const _e=Zt(de);function De(){U.current=!0,ee.start(0,()=>{U.current=!1})}function xe(be){const ne=Fr(be),Ce=Se().indexOf(ne);Ce!==-1&&(Y.current=Ce)}function Ge(be){const ne=be.relatedTarget,ye=be.currentTarget,Ce=Fr(be);queueMicrotask(()=>{const Ve=j(),ct=w.context.triggerElements,oe=Re(),Ee=ne?.hasAttribute(rf("focus-guard"))&&[L.current,B.current,V?.beforeInsideRef.current,V?.afterInsideRef.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,ss(p),ss(m)].includes(ne),Le=!(Nt(k,ne)||Nt(T,ne)||Nt(ne,T)||Nt(V?.portalNode,ne)||oe.some(Me=>Me===ne||Nt(Me,ne))||ne!=null&&ct.hasElement(ne)||ct.hasMatchingElement(Me=>Nt(Me,ne))||Ee||q&&(ds(q.nodesRef.current,Ve).find(Me=>Nt(Me.context?.elements.floating,ne)||Nt(Me.context?.elements.domReference,ne))||hE(q.nodesRef.current,Ve).find(Me=>[Me.context?.elements.floating,ef(Me.context?.elements.floating)].includes(ne)||Me.context?.elements.domReference===ne)));if(ye===k&&de&&AE(de,_),a&&ye!==k&&!Gz(Ce)&&bi(_e)===_e.body){if(Fn(de)&&(de.focus(),a==="popup")){J.request(()=>{de.focus()});return}const Me=Y.current,Ue=Se(),dt=Ue[Me]||Ue[Ue.length-1]||de;Fn(dt)&&dt.focus()}if(O.current.insideReactTree){O.current.insideReactTree=!1;return}(R||!c)&&ne&&Le&&!U.current&&(R||ne!==O2())&&($.current=!0,w.setOpen(!1,kt(ml,be)))})}function we(){P.current||(O.current.insideReactTree=!0,Q.start(0,()=>{O.current.insideReactTree=!1}))}const Ae=Fn(k)?k:null,pe=[];if(!(!T&&!Ae))return Ae&&(Ae.addEventListener("focusout",Ge),Ae.addEventListener("pointerdown",De),pe.push(()=>{Ae.removeEventListener("focusout",Ge),Ae.removeEventListener("pointerdown",De)})),T&&(T.addEventListener("focusin",xe),T.addEventListener("focusout",Ge),V&&(T.addEventListener("focusout",we,!0),pe.push(()=>{T.removeEventListener("focusout",we,!0)})),pe.push(()=>{T.removeEventListener("focusin",xe),T.removeEventListener("focusout",Ge)})),()=>{pe.forEach(be=>{be()})}},[r,k,T,de,c,q,V,w,u,a,Se,R,j,_,O,Q,ee,J,m,p,Re]),S.useEffect(()=>{if(r||!T||!E)return;const _e=Array.from(V?.portalNode?.querySelectorAll(`[${rf("portal")}]`)||[]),xe=(q?hE(q.nodesRef.current,j()):[]).find(ne=>Vy(ne.context?.elements.domReference||null))?.context?.elements.domReference,we=[...[T,..._e,L.current,B.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,...Re()],xe,ss(p),ss(m),R?k:null].filter(ne=>ne!=null),Ae=EE(we,{ariaHidden:c||R,mark:!1}),pe=[T,..._e].filter(ne=>ne!=null),be=EE(pe);return()=>{be(),Ae()}},[E,r,k,T,c,_,V,R,q,j,m,p,Re]),We(()=>{if(!E||r||!Fn(de))return;const _e=Zt(de),De=bi(_e);queueMicrotask(()=>{const xe=je(de),Ge=F.current,we=typeof Ge=="function"?Ge(H.current||""):Ge;if(we===void 0||we===!1)return;let Ae;we===!0||we===null?Ae=xe[0]||de:Ae=ss(we),Ae=Ae||xe[0]||de,!Nt(de,De)&&zd(Ae,{preventScroll:Ae===de})})},[r,E,de,A,je,F,H]),We(()=>{if(r||!de)return;const _e=Zt(de),De=bi(_e);Yz(De);function xe(we){if(we.open||(G.current=$z(we.nativeEvent,X.current)),we.reason===Br&&we.nativeEvent.type==="mouseleave"&&($.current=!0),we.reason===y0)if(we.nested)$.current=!1;else if(dN(we.nativeEvent)||fN(we.nativeEvent))$.current=!1;else{let Ae=!1;document.createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?$.current=!1:$.current=!0}}N.on("openchange",xe);function Ge(){const we=I.current;let Ae=typeof we=="function"?we(G.current):we;if(Ae===void 0||Ae===!1)return null;if(Ae===null&&(Ae=!0),typeof Ae=="boolean"){const be=k||O2();return be&&be.isConnected?be:null}const pe=k||O2();return ss(Ae)||pe||null}return()=>{N.off("openchange",xe);const we=bi(_e),Ae=Re(),pe=Nt(T,we)||Ae.some(ne=>ne===we||Nt(ne,we))||q&&ds(q.nodesRef.current,j(),!1).some(ne=>Nt(ne.context?.elements.floating,we)),be=Ge();queueMicrotask(()=>{const ne=Wz(be),ye=typeof I.current!="boolean";I.current&&!$.current&&Fn(ne)&&(!(!ye&&ne!==we&&we!==_e.body)||pe)&&ne.focus({preventScroll:!0}),$.current=!1})}},[r,T,de,I,O,N,q,k,j,Re]),We(()=>{if(!xb||E||!T)return;const _e=bi(Zt(T));!Fn(_e)||!g0(_e)||Nt(T,_e)&&_e.blur()},[E,T]),We(()=>{if(!(r||!V))return V.setFocusManagerState({modal:c,closeOnFocusOut:u,open:E,onOpenChange:w.setOpen,domReference:k}),()=>{V.setFocusManagerState(null)}},[r,V,c,E,w,u,k]),We(()=>{if(!(r||!de))return AE(de,_),()=>{queueMicrotask(jb)}},[r,de,_]);const Fe=!r&&(c?!R:!0)&&(he||c);return f.jsxs(S.Fragment,{children:[Fe&&f.jsx(Vc,{"data-type":"inside",ref:W,onFocus:_e=>{if(c){const De=je();zd(De[De.length-1])}else V?.portalNode&&($.current=!1,Oc(_e,V.portalNode)?Eb(k)?.focus():ss(p??V.beforeOutsideRef)?.focus())}}),n,Fe&&f.jsx(Vc,{"data-type":"inside",ref:D,onFocus:_e=>{c?zd(je()[0]):V?.portalNode&&(u&&($.current=!0),Oc(_e,V.portalNode)?CN(k)?.focus():ss(m??V.afterOutsideRef)?.focus())}})]})}function Mb(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:s="click",toggle:a=!0,ignoreMouse:c=!1,stickIfOpen:u=!0,touchOpenDelay:h=0,reason:m=qc}=t,p=S.useRef(void 0),y=b0(),x=Hn(),b=S.useMemo(()=>({onPointerDown(w){p.current=w.pointerType},onMouseDown(w){const E=p.current,k=w.nativeEvent,T=n.select("open");if(w.button!==0||s==="click"||Bc(E,!0)&&c)return;const N=r.current.openEvent,O=N?.type,j=n.select("domReferenceElement")!==w.currentTarget,A=T&&j||!(T&&a&&(!(N&&u)||O==="click"||O==="mousedown"));if(g0(k.target)){const _=kt(m,k,k.target);A&&E==="touch"&&h>0?x.start(h,()=>{n.setOpen(!0,_)}):n.setOpen(A,_);return}const R=w.currentTarget;y.request(()=>{const _=kt(m,k,R);A&&E==="touch"&&h>0?x.start(h,()=>{n.setOpen(!0,_)}):n.setOpen(A,_)})},onClick(w){if(s==="mousedown-only")return;const E=p.current;if(s==="mousedown"&&E){p.current=void 0;return}if(Bc(E,!0)&&c)return;const k=n.select("open"),T=r.current.openEvent,N=n.select("domReferenceElement")!==w.currentTarget,O=k&&N||!(k&&a&&(!(T&&u)||hN(T))),j=kt(m,w.nativeEvent,w.currentTarget);O&&E==="touch"&&h>0?x.start(h,()=>{n.setOpen(!0,j)}):n.setOpen(O,j)},onKeyDown(){p.current=void 0}}),[r,s,c,n,u,a,y,x,h,m]);return S.useMemo(()=>i?{reference:b}:Bn,[i,b])}function Kz(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",u=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=s.width,m=s.height,p=s.x,y=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&c&&(r=s.y-t.y),p-=n||0,y-=r||0,h=0,m=0,!i||u?(h=t.axis==="y"?s.width:0,m=t.axis==="x"?s.height:0,p=a&&t.x!=null?t.x:p,y=c&&t.y!=null?t.y:y):i&&!u&&(m=t.axis==="x"?s.height:m,h=t.axis==="y"?s.width:h),i=!0,{width:h,height:m,x:p,y,top:y,right:p+h,bottom:y+m,left:p}}}}function jE(e){return e!=null&&e.clientX!=null}function Qz(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),s=n.useState("domReferenceElement"),a=n.context.dataRef,{enabled:c=!0,axis:u="both"}=t,h=S.useRef(!1),m=S.useRef(null),[p,y]=S.useState(),[x,b]=S.useState([]),w=tt((O,j,A)=>{h.current||a.current.openEvent&&!jE(a.current.openEvent)||n.set("positionReference",Kz(A??s,{x:O,y:j,axis:u,dataRef:a,pointerType:p}))}),E=tt(O=>{r?m.current||b([]):w(O.clientX,O.clientY,O.currentTarget)}),k=Bc(p)?i:r,T=S.useCallback(()=>{if(!k||!c)return;const O=qn(i);function j(A){const R=Fr(A);Nt(i,R)?(O.removeEventListener("mousemove",j),m.current=null):w(A.clientX,A.clientY)}if(!a.current.openEvent||jE(a.current.openEvent)){O.addEventListener("mousemove",j);const A=()=>{O.removeEventListener("mousemove",j),m.current=null};return m.current=A,A}n.set("positionReference",s)},[k,c,i,a,s,n,w]);S.useEffect(()=>T(),[T,x]),S.useEffect(()=>{c&&!i&&(h.current=!1)},[c,i]),S.useEffect(()=>{!c&&r&&(h.current=!0)},[c,r]);const N=S.useMemo(()=>{function O(j){y(j.pointerType)}return{onPointerDown:O,onPointerEnter:O,onMouseMove:E,onMouseEnter:E}},[E]);return S.useMemo(()=>c?{reference:N,trigger:N}:{},[c,N])}const Xz={intentional:"onClick",sloppy:"onPointerDown"};function Zz(){return!1}function Jz(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function v0(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),{dataRef:s}=n.context,{enabled:a=!0,escapeKey:c=!0,outsidePress:u=!0,outsidePressEvent:h="sloppy",referencePress:m=Zz,referencePressEvent:p="sloppy",bubbles:y,externalTree:x}=t,b=Ca(x),w=tt(typeof u=="function"?u:()=>!1),E=typeof u=="function"?w:u,k=E!==!1,T=tt(()=>h),N=S.useRef(!1),O=S.useRef(!1),j=S.useRef(!1),{escapeKey:A,outsidePress:R}=Jz(y),_=S.useRef(null),F=Hn(),I=Hn(),H=tt(()=>{I.clear(),s.current.insideReactTree=!1}),q=S.useRef(!1),V=S.useRef(""),$=tt(m),U=tt(B=>{if(!r||!a||!c||B.key!=="Escape"||q.current)return;const W=s.current.floatingContext?.nodeId,D=b?ds(b.nodesRef.current,W):[];if(!A&&D.length>0){let J=!0;if(D.forEach(he=>{he.context?.open&&!he.context.dataRef.current.__escapeKeyBubbles&&(J=!1)}),!J)return}const Q=RP(B)?B.nativeEvent:B,ee=kt(x0,Q);n.setOpen(!1,ee),!A&&!ee.isPropagationAllowed&&B.stopPropagation()}),P=tt(()=>{s.current.insideReactTree=!0,I.start(0,H)});S.useEffect(()=>{if(!r||!a)return;s.current.__escapeKeyBubbles=A,s.current.__outsidePressBubbles=R;const B=new uo,W=new uo;function D(){B.clear(),q.current=!0}function Q(){B.start(p0()?5:0,()=>{q.current=!1})}function ee(){j.current=!0,W.start(0,()=>{j.current=!1})}function J(){N.current=!1,O.current=!1}function he(){const ne=V.current,ye=ne==="pen"||!ne?"mouse":ne,Ce=T(),Ve=typeof Ce=="function"?Ce():Ce;return typeof Ve=="string"?Ve:Ve[ye]}function de(ne){const ye=he();return ye==="intentional"&&ne.type!=="click"||ye==="sloppy"&&ne.type==="click"}function Se(ne){const ye=s.current.floatingContext?.nodeId,Ce=b&&ds(b.nodesRef.current,ye).some(Ve=>io(ne,Ve.context?.elements.floating));return io(ne,n.select("floatingElement"))||io(ne,n.select("domReferenceElement"))||Ce}function Re(ne){if(de(ne)){H();return}if(s.current.insideReactTree){H();return}const ye=Fr(ne),Ce=`[${rf("inert")}]`;let Ve=Array.from(Zt(n.select("floatingElement")).querySelectorAll(Ce));const ct=un(ye)?ye.getRootNode():null;Zd(ct)&&(Ve=Ve.concat(Array.from(ct.querySelectorAll(Ce))));const oe=n.context.triggerElements;if(ye&&(oe.hasElement(ye)||oe.hasMatchingElement(Ue=>Nt(Ue,ye))))return;let Ee=un(ye)?ye:null;for(;Ee&&!ko(Ee);){const Ue=jo(Ee);if(ko(Ue)||!un(Ue))break;Ee=Ue}if(Ve.length&&un(ye)&&!TP(ye)&&!Nt(ye,n.select("floatingElement"))&&Ve.every(Ue=>!Nt(Ee,Ue)))return;if(Fn(ye)&&!("touches"in ne)){const Ue=ko(ye),dt=Ei(ye),xt=/auto|scroll/,Je=Ue||xt.test(dt.overflowX),Ke=Ue||xt.test(dt.overflowY),bt=Je&&ye.clientWidth>0&&ye.scrollWidth>ye.clientWidth,nt=Ke&&ye.clientHeight>0&&ye.scrollHeight>ye.clientHeight,Qe=dt.direction==="rtl",Ct=nt&&(Qe?ne.offsetX<=ye.offsetWidth-ye.clientWidth:ne.offsetX>ye.clientWidth),$e=bt&&ne.offsetY>ye.clientHeight;if(Ct||$e)return}if(Se(ne))return;if(he()==="intentional"&&j.current){W.clear(),j.current=!1;return}if(typeof E=="function"&&!E(ne))return;const Le=s.current.floatingContext?.nodeId,Me=b?ds(b.nodesRef.current,Le):[];if(Me.length>0){let Ue=!0;if(Me.forEach(dt=>{dt.context?.open&&!dt.context.dataRef.current.__outsidePressBubbles&&(Ue=!1)}),!Ue)return}n.setOpen(!1,kt(y0,ne)),H()}function je(ne){he()!=="sloppy"||ne.pointerType==="touch"||!n.select("open")||!a||io(ne,n.select("floatingElement"))||io(ne,n.select("domReferenceElement"))||Re(ne)}function Fe(ne){if(he()!=="sloppy"||!n.select("open")||!a||io(ne,n.select("floatingElement"))||io(ne,n.select("domReferenceElement")))return;const ye=ne.touches[0];ye&&(_.current={startTime:Date.now(),startX:ye.clientX,startY:ye.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},F.start(1e3,()=>{_.current&&(_.current.dismissOnTouchEnd=!1,_.current.dismissOnMouseDown=!1)}))}function _e(ne){V.current="touch";const ye=Fr(ne);function Ce(){Fe(ne),ye?.removeEventListener(ne.type,Ce)}ye?.addEventListener(ne.type,Ce)}function De(ne){if(F.clear(),ne.type==="pointerdown"&&(V.current=ne.pointerType),ne.type==="mousedown"&&_.current&&!_.current.dismissOnMouseDown)return;const ye=Fr(ne);function Ce(){ne.type==="pointerdown"?je(ne):Re(ne),ye?.removeEventListener(ne.type,Ce)}ye?.addEventListener(ne.type,Ce)}function xe(ne){if(!N.current)return;const ye=O.current;if(J(),he()==="intentional"){if(ne.type==="pointercancel"){ye&&ee();return}if(!Se(ne)){if(ye){ee();return}typeof E=="function"&&!E(ne)||(W.clear(),j.current=!0,H())}}}function Ge(ne){if(he()!=="sloppy"||!_.current||io(ne,n.select("floatingElement"))||io(ne,n.select("domReferenceElement")))return;const ye=ne.touches[0];if(!ye)return;const Ce=Math.abs(ye.clientX-_.current.startX),Ve=Math.abs(ye.clientY-_.current.startY),ct=Math.sqrt(Ce*Ce+Ve*Ve);ct>5&&(_.current.dismissOnTouchEnd=!0),ct>10&&(Re(ne),F.clear(),_.current=null)}function we(ne){const ye=Fr(ne);function Ce(){Ge(ne),ye?.removeEventListener(ne.type,Ce)}ye?.addEventListener(ne.type,Ce)}function Ae(ne){he()!=="sloppy"||!_.current||io(ne,n.select("floatingElement"))||io(ne,n.select("domReferenceElement"))||(_.current.dismissOnTouchEnd&&Re(ne),F.clear(),_.current=null)}function pe(ne){const ye=Fr(ne);function Ce(){Ae(ne),ye?.removeEventListener(ne.type,Ce)}ye?.addEventListener(ne.type,Ce)}const be=Zt(i);return c&&(be.addEventListener("keydown",U),be.addEventListener("compositionstart",D),be.addEventListener("compositionend",Q)),k&&(be.addEventListener("click",De,!0),be.addEventListener("pointerdown",De,!0),be.addEventListener("pointerup",xe,!0),be.addEventListener("pointercancel",xe,!0),be.addEventListener("mousedown",De,!0),be.addEventListener("mouseup",xe,!0),be.addEventListener("touchstart",_e,!0),be.addEventListener("touchmove",we,!0),be.addEventListener("touchend",pe,!0)),()=>{c&&(be.removeEventListener("keydown",U),be.removeEventListener("compositionstart",D),be.removeEventListener("compositionend",Q)),k&&(be.removeEventListener("click",De,!0),be.removeEventListener("pointerdown",De,!0),be.removeEventListener("pointerup",xe,!0),be.removeEventListener("pointercancel",xe,!0),be.removeEventListener("mousedown",De,!0),be.removeEventListener("mouseup",xe,!0),be.removeEventListener("touchstart",_e,!0),be.removeEventListener("touchmove",we,!0),be.removeEventListener("touchend",pe,!0)),B.clear(),W.clear(),J(),j.current=!1}},[s,i,c,k,E,r,a,A,R,U,H,T,b,n,F]),S.useEffect(H,[E,H]);const Y=S.useMemo(()=>({onKeyDown:U,[Xz[p]]:B=>{$()&&n.setOpen(!1,kt(qc,B.nativeEvent))},...p!=="intentional"&&{onClick(B){$()&&n.setOpen(!1,kt(qc,B.nativeEvent))}}}),[U,n,p,$]),G=tt(B=>{if(!r||!a||B.button!==0)return;const W=Fr(B.nativeEvent);Nt(n.select("floatingElement"),W)&&(N.current||(N.current=!0,O.current=!1))}),X=tt(B=>{!r||!a||(B.defaultPrevented||B.nativeEvent.defaultPrevented)&&N.current&&(O.current=!0)}),L=S.useMemo(()=>({onKeyDown:U,onPointerDown:X,onMouseDown:X,onClickCapture:P,onMouseDownCapture(B){P(),G(B)},onPointerDownCapture(B){P(),G(B)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[U,P,G,X]);return S.useMemo(()=>a?{reference:Y,floating:L,trigger:Y}:{},[a,Y,L])}function OE(e,t,n){let{reference:r,floating:i}=e;const s=Yi(t),a=Sb(t),c=wb(a),u=ri(t),h=s==="y",m=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(u){case"top":x={x:m,y:r.y-i.height};break;case"bottom":x={x:m,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(Sa(t)){case"start":x[a]-=y*(n&&h?-1:1);break;case"end":x[a]+=y*(n&&h?-1:1);break}return x}async function eF(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:c,strategy:u}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:y=!1,padding:x=0}=hs(t,e),b=pN(x),E=c[y?p==="floating"?"reference":"floating":p],k=tf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(E)))==null||n?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:u})),T=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),O=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},j=tf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:N,strategy:u}):T);return{top:(k.top-j.top+b.top)/O.y,bottom:(j.bottom-k.bottom+b.bottom)/O.y,left:(k.left-j.left+b.left)/O.x,right:(j.right-k.right+b.right)/O.x}}const tF=50,nF=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,c=a.detectOverflow?a:{...a,detectOverflow:eF},u=await(a.isRTL==null?void 0:a.isRTL(t));let h=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:p}=OE(h,r,u),y=r,x=0;const b={};for(let w=0;w<s.length;w++){const E=s[w];if(!E)continue;const{name:k,fn:T}=E,{x:N,y:O,data:j,reset:A}=await T({x:m,y:p,initialPlacement:r,placement:y,strategy:i,middlewareData:b,rects:h,platform:c,elements:{reference:e,floating:t}});m=N??m,p=O??p,b[k]={...b[k],...j},A&&x<tF&&(x++,typeof A=="object"&&(A.placement&&(y=A.placement),A.rects&&(h=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:m,y:p}=OE(h,y,u)),w=-1)}return{x:m,y:p,placement:y,strategy:i,middlewareData:b}},rF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:c,platform:u,elements:h}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...E}=hs(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const k=ri(i),T=Yi(c),N=ri(c)===c,O=await(u.isRTL==null?void 0:u.isRTL(h.floating)),j=y||(N||!w?[vm(c)]:MP(c)),A=b!=="none";!y&&A&&j.push(...IP(c,w,b,O));const R=[c,...j],_=await u.detectOverflow(t,E),F=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&F.push(_[k]),p){const $=OP(i,a,O);F.push(_[$[0]],_[$[1]])}if(I=[...I,{placement:i,overflows:F}],!F.every($=>$<=0)){var H,q;const $=(((H=s.flip)==null?void 0:H.index)||0)+1,U=R[$];if(U&&(!(p==="alignment"?T!==Yi(U):!1)||I.every(G=>Yi(G.placement)===T?G.overflows[0]>0:!0)))return{data:{index:$,overflows:I},reset:{placement:U}};let P=(q=I.filter(Y=>Y.overflows[0]<=0).sort((Y,G)=>Y.overflows[1]-G.overflows[1])[0])==null?void 0:q.placement;if(!P)switch(x){case"bestFit":{var V;const Y=(V=I.filter(G=>{if(A){const X=Yi(G.placement);return X===T||X==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(X=>X>0).reduce((X,L)=>X+L,0)]).sort((G,X)=>G[1]-X[1])[0])==null?void 0:V[0];Y&&(P=Y);break}case"initialPlacement":P=c;break}if(i!==P)return{reset:{placement:P}}}return{}}}};function ME(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function DE(e){return AP.some(t=>e[t]>=0)}const iF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=hs(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=ME(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:DE(c)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),c=ME(a,n.floating);return{data:{escapedOffsets:c,escaped:DE(c)}}}default:return{}}}}},VN=new Set(["left","top"]);async function oF(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ri(n),c=Sa(n),u=Yi(n)==="y",h=VN.has(a)?-1:1,m=s&&u?-1:1,p=hs(t,e);let{mainAxis:y,crossAxis:x,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof b=="number"&&(x=c==="end"?b*-1:b),u?{x:x*m,y:y*h}:{x:y*h,y:x*m}}const sF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:c}=t,u=await oF(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},aF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:u={fn:k=>{let{x:T,y:N}=k;return{x:T,y:N}}},...h}=hs(e,t),m={x:n,y:r},p=await s.detectOverflow(t,h),y=Yi(ri(i)),x=vb(y);let b=m[x],w=m[y];if(a){const k=x==="y"?"top":"left",T=x==="y"?"bottom":"right",N=b+p[k],O=b-p[T];b=$y(N,b,O)}if(c){const k=y==="y"?"top":"left",T=y==="y"?"bottom":"right",N=w+p[k],O=w-p[T];w=$y(N,w,O)}const E=u.fn({...t,[x]:b,[y]:w});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[x]:a,[y]:c}}}}}},lF=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:u=!0,crossAxis:h=!0}=hs(e,t),m={x:n,y:r},p=Yi(i),y=vb(p);let x=m[y],b=m[p];const w=hs(c,t),E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){const N=y==="y"?"height":"width",O=s.reference[y]-s.floating[N]+E.mainAxis,j=s.reference[y]+s.reference[N]-E.mainAxis;x<O?x=O:x>j&&(x=j)}if(h){var k,T;const N=y==="y"?"width":"height",O=VN.has(ri(i)),j=s.reference[p]-s.floating[N]+(O&&((k=a.offset)==null?void 0:k[p])||0)+(O?0:E.crossAxis),A=s.reference[p]+s.reference[N]+(O?0:((T=a.offset)==null?void 0:T[p])||0)-(O?E.crossAxis:0);b<j?b=j:b>A&&(b=A)}return{[y]:x,[p]:b}}}},cF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:c}=t,{apply:u=()=>{},...h}=hs(e,t),m=await a.detectOverflow(t,h),p=ri(i),y=Sa(i),x=Yi(i)==="y",{width:b,height:w}=s.floating;let E,k;p==="top"||p==="bottom"?(E=p,k=y===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(k=p,E=y==="end"?"top":"bottom");const T=w-m.top-m.bottom,N=b-m.left-m.right,O=Hc(w-m[E],T),j=Hc(b-m[k],N),A=!t.middlewareData.shift;let R=O,_=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=T),A&&!y){const I=vi(m.left,0),H=vi(m.right,0),q=vi(m.top,0),V=vi(m.bottom,0);x?_=b-2*(I!==0||H!==0?I+H:vi(m.left,m.right)):R=w-2*(q!==0||V!==0?q+V:vi(m.top,m.bottom))}await u({...t,availableWidth:_,availableHeight:R});const F=await a.getDimensions(c.floating);return b!==F.width||w!==F.height?{reset:{rects:!0}}:{}}}};function $N(e){const t=Ei(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Fn(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,c=bm(n)!==s||bm(r)!==a;return c&&(n=s,r=a),{width:n,height:r,$:c}}function Db(e){return un(e)?e:e.contextElement}function Dc(e){const t=Db(e);if(!Fn(t))return To(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=$N(t);let a=(s?bm(n.width):n.width)/r,c=(s?bm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const uF=To(0);function YN(e){const t=qn(e);return!p0()||!t.visualViewport?uF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dF(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qn(e)?!1:t}function gl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Db(e);let a=To(1);t&&(r?un(r)&&(a=Dc(r)):a=Dc(e));const c=dF(s,n,r)?YN(s):To(0);let u=(i.left+c.x)/a.x,h=(i.top+c.y)/a.y,m=i.width/a.x,p=i.height/a.y;if(s){const y=qn(s),x=r&&un(r)?qn(r):r;let b=y,w=Hy(b);for(;w&&r&&x!==b;){const E=Dc(w),k=w.getBoundingClientRect(),T=Ei(w),N=k.left+(w.clientLeft+parseFloat(T.paddingLeft))*E.x,O=k.top+(w.clientTop+parseFloat(T.paddingTop))*E.y;u*=E.x,h*=E.y,m*=E.x,p*=E.y,u+=N,h+=O,b=qn(w),w=Hy(b)}}return tf({width:m,height:p,x:u,y:h})}function w0(e,t){const n=m0(e).scrollLeft;return t?t.left+n:gl(Do(e)).left+n}function WN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-w0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function fF(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=Do(r),c=t?h0(t.floating):!1;if(r===a||c&&s)return n;let u={scrollLeft:0,scrollTop:0},h=To(1);const m=To(0),p=Fn(r);if((p||!p&&!s)&&((va(r)!=="body"||wa(a))&&(u=m0(r)),p)){const x=gl(r);h=Dc(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const y=a&&!p&&!s?WN(a,u):To(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-u.scrollLeft*h.x+m.x+y.x,y:n.y*h.y-u.scrollTop*h.y+m.y+y.y}}function hF(e){return Array.from(e.getClientRects())}function pF(e){const t=Do(e),n=m0(e),r=e.ownerDocument.body,i=vi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=vi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+w0(e);const c=-n.scrollTop;return Ei(r).direction==="rtl"&&(a+=vi(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:c}}const _E=25;function mF(e,t){const n=qn(e),r=Do(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,c=0,u=0;if(i){s=i.width,a=i.height;const m=p0();(!m||m&&t==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}const h=w0(r);if(h<=0){const m=r.ownerDocument,p=m.body,y=getComputedStyle(p),x=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-x);b<=_E&&(s-=b)}else h<=_E&&(s+=h);return{width:s,height:a,x:c,y:u}}function gF(e,t){const n=gl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Fn(e)?Dc(e):To(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,u=i*s.x,h=r*s.y;return{width:a,height:c,x:u,y:h}}function LE(e,t,n){let r;if(t==="viewport")r=mF(e,n);else if(t==="document")r=pF(Do(e));else if(un(t))r=gF(t,n);else{const i=YN(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return tf(r)}function GN(e,t){const n=jo(e);return n===t||!un(n)||ko(n)?!1:Ei(n).position==="fixed"||GN(n,t)}function yF(e,t){const n=t.get(e);if(n)return n;let r=Jd(e,[],!1).filter(c=>un(c)&&va(c)!=="body"),i=null;const s=Ei(e).position==="fixed";let a=s?jo(e):e;for(;un(a)&&!ko(a);){const c=Ei(a),u=yb(a);!u&&c.position==="fixed"&&(i=null),(s?!u&&!i:!u&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||wa(a)&&!u&&GN(e,a))?r=r.filter(m=>m!==a):i=c,a=jo(a)}return t.set(e,r),r}function xF(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?h0(t)?[]:yF(t,this._c):[].concat(n),r],c=LE(t,a[0],i);let u=c.top,h=c.right,m=c.bottom,p=c.left;for(let y=1;y<a.length;y++){const x=LE(t,a[y],i);u=vi(x.top,u),h=Hc(x.right,h),m=Hc(x.bottom,m),p=vi(x.left,p)}return{width:h-p,height:m-u,x:p,y:u}}function bF(e){const{width:t,height:n}=$N(e);return{width:t,height:n}}function vF(e,t,n){const r=Fn(t),i=Do(t),s=n==="fixed",a=gl(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=To(0);function h(){u.x=w0(i)}if(r||!r&&!s)if((va(t)!=="body"||wa(i))&&(c=m0(t)),r){const x=gl(t,!0,s,t);u.x=x.x+t.clientLeft,u.y=x.y+t.clientTop}else i&&h();s&&!r&&i&&h();const m=i&&!r&&!s?WN(i,c):To(0),p=a.left+c.scrollLeft-u.x-m.x,y=a.top+c.scrollTop-u.y-m.y;return{x:p,y,width:a.width,height:a.height}}function M2(e){return Ei(e).position==="static"}function IE(e,t){if(!Fn(e)||Ei(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Do(e)===n&&(n=n.ownerDocument.body),n}function KN(e,t){const n=qn(e);if(h0(e))return n;if(!Fn(e)){let i=jo(e);for(;i&&!ko(i);){if(un(i)&&!M2(i))return i;i=jo(i)}return n}let r=IE(e,t);for(;r&&bP(r)&&M2(r);)r=IE(r,t);return r&&ko(r)&&M2(r)&&!yb(r)?n:r||SP(e)||n}const wF=async function(e){const t=this.getOffsetParent||KN,n=this.getDimensions,r=await n(e.floating);return{reference:vF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function SF(e){return Ei(e).direction==="rtl"}const QN={convertOffsetParentRelativeRectToViewportRelativeRect:fF,getDocumentElement:Do,getClippingRect:xF,getOffsetParent:KN,getElementRects:wF,getClientRects:hF,getDimensions:bF,getScale:Dc,isElement:un,isRTL:SF};function XN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CF(e,t){let n=null,r;const i=Do(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const h=e.getBoundingClientRect(),{left:m,top:p,width:y,height:x}=h;if(c||t(),!y||!x)return;const b=al(p),w=al(i.clientWidth-(m+y)),E=al(i.clientHeight-(p+x)),k=al(m),N={rootMargin:-b+"px "+-w+"px "+-E+"px "+-k+"px",threshold:vi(0,Hc(1,u))||1};let O=!0;function j(A){const R=A[0].intersectionRatio;if(R!==u){if(!O)return a();R?a(!1,R):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!XN(h,e.getBoundingClientRect())&&a(),O=!1}try{n=new IntersectionObserver(j,{...N,root:i.ownerDocument})}catch{n=new IntersectionObserver(j,N)}n.observe(e)}return a(!0),s}function PE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,h=Db(e),m=i||s?[...h?Jd(h):[],...t?Jd(t):[]]:[];m.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),s&&k.addEventListener("resize",n)});const p=h&&c?CF(h,n):null;let y=-1,x=null;a&&(x=new ResizeObserver(k=>{let[T]=k;T&&T.target===h&&x&&t&&(x.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var N;(N=x)==null||N.observe(t)})),n()}),h&&!u&&x.observe(h),t&&x.observe(t));let b,w=u?gl(e):null;u&&E();function E(){const k=gl(e);w&&!XN(w,k)&&n(),w=k,b=requestAnimationFrame(E)}return n(),()=>{var k;m.forEach(T=>{i&&T.removeEventListener("scroll",n),s&&T.removeEventListener("resize",n)}),p?.(),(k=x)==null||k.disconnect(),x=null,u&&cancelAnimationFrame(b)}}const EF=sF,kF=aF,TF=rF,NF=cF,RF=iF,AF=lF,jF=(e,t,n)=>{const r=new Map,i={platform:QN,...n},s={...i.platform,_c:r};return nF(e,t,{...i,platform:s})};var OF=typeof document<"u",MF=function(){},nm=OF?S.useLayoutEffect:MF;function Tm(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(!Tm(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 s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Tm(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ZN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zE(e,t){const n=ZN(e);return Math.round(t*n)/n}function D2(e){const t=S.useRef(e);return nm(()=>{t.current=e}),t}function DF(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:u,open:h}=e,[m,p]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,x]=S.useState(r);Tm(y,r)||x(r);const[b,w]=S.useState(null),[E,k]=S.useState(null),T=S.useCallback(G=>{G!==A.current&&(A.current=G,w(G))},[]),N=S.useCallback(G=>{G!==R.current&&(R.current=G,k(G))},[]),O=s||b,j=a||E,A=S.useRef(null),R=S.useRef(null),_=S.useRef(m),F=u!=null,I=D2(u),H=D2(i),q=D2(h),V=S.useCallback(()=>{if(!A.current||!R.current)return;const G={placement:t,strategy:n,middleware:y};H.current&&(G.platform=H.current),jF(A.current,R.current,G).then(X=>{const L={...X,isPositioned:q.current!==!1};$.current&&!Tm(_.current,L)&&(_.current=L,Ci.flushSync(()=>{p(L)}))})},[y,t,n,H,q]);nm(()=>{h===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[h]);const $=S.useRef(!1);nm(()=>($.current=!0,()=>{$.current=!1}),[]),nm(()=>{if(O&&(A.current=O),j&&(R.current=j),O&&j){if(I.current)return I.current(O,j,V);V()}},[O,j,V,I,F]);const U=S.useMemo(()=>({reference:A,floating:R,setReference:T,setFloating:N}),[T,N]),P=S.useMemo(()=>({reference:O,floating:j}),[O,j]),Y=S.useMemo(()=>{const G={position:n,left:0,top:0};if(!P.floating)return G;const X=zE(P.floating,m.x),L=zE(P.floating,m.y);return c?{...G,transform:"translate("+X+"px, "+L+"px)",...ZN(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:L}},[n,c,P.floating,m.x,m.y]);return S.useMemo(()=>({...m,update:V,refs:U,elements:P,floatingStyles:Y}),[m,V,U,P,Y])}const _F=(e,t)=>{const n=EF(e);return{name:n.name,fn:n.fn,options:[e,t]}},LF=(e,t)=>{const n=kF(e);return{name:n.name,fn:n.fn,options:[e,t]}},IF=(e,t)=>({fn:AF(e).fn,options:[e,t]}),PF=(e,t)=>{const n=TF(e);return{name:n.name,fn:n.fn,options:[e,t]}},zF=(e,t)=>{const n=NF(e);return{name:n.name,fn:n.fn,options:[e,t]}},FF=(e,t)=>{const n=RF(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Nm=Symbol("NOT_FOUND");function BF(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function HF(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function UF(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 FE=e=>Array.isArray(e)?e:[e];function qF(e){const t=Array.isArray(e[0])?e[0]:e;return UF(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function VF(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function $F(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Nm},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function YF(e,t){let n=[];function r(c){const u=n.findIndex(h=>t(c,h.key));if(u>-1){const h=n[u];return u>0&&(n.splice(u,1),n.unshift(h)),h.value}return Nm}function i(c,u){r(c)===Nm&&(n.unshift({key:c,value:u}),n.length>e&&n.pop())}function s(){return n}function a(){n=[]}return{get:r,put:i,getEntries:s,clear:a}}var WF=(e,t)=>e===t;function GF(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let s=0;s<i;s++)if(!e(n[s],r[s]))return!1;return!0}}function KF(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=WF,maxSize:i=1,resultEqualityCheck:s}=n,a=GF(r);let c=0;const u=i<=1?$F(a):YF(i,a);function h(){let m=u.get(arguments);if(m===Nm){if(m=e.apply(null,arguments),c++,s){const y=u.getEntries().find(x=>s(x.value,m));y&&(m=y.value,c!==0&&c--)}u.put(arguments,m)}return m}return h.clearCache=()=>{u.clear(),h.resetResultsCount()},h.resultsCount=()=>c,h.resetResultsCount=()=>{c=0},h}var QF=class{constructor(e){this.value=e}deref(){return this.value}},XF=typeof WeakRef<"u"?WeakRef:QF,ZF=0,BE=1;function vp(){return{s:ZF,v:void 0,o:null,p:null}}function JN(e,t={}){let n=vp();const{resultEqualityCheck:r}=t;let i,s=0;function a(){let c=n;const{length:u}=arguments;for(let p=0,y=u;p<y;p++){const x=arguments[p];if(typeof x=="function"||typeof x=="object"&&x!==null){let b=c.o;b===null&&(c.o=b=new WeakMap);const w=b.get(x);w===void 0?(c=vp(),b.set(x,c)):c=w}else{let b=c.p;b===null&&(c.p=b=new Map);const w=b.get(x);w===void 0?(c=vp(),b.set(x,c)):c=w}}const h=c;let m;if(c.s===BE)m=c.v;else if(m=e.apply(null,arguments),s++,r){const p=i?.deref?.()??i;p!=null&&r(p,m)&&(m=p,s!==0&&s--),i=typeof m=="object"&&m!==null||typeof m=="function"?new XF(m):m}return h.s=BE,h.v=m,m}return a.clearCache=()=>{n=vp(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function eR(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let s=0,a=0,c,u={},h=i.pop();typeof h=="object"&&(u=h,h=i.pop()),BF(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...n,...u},{memoize:p,memoizeOptions:y=[],argsMemoize:x=JN,argsMemoizeOptions:b=[]}=m,w=FE(y),E=FE(b),k=qF(i),T=p(function(){return s++,h.apply(null,arguments)},...w),N=x(function(){a++;const j=VF(k,arguments);return c=T.apply(null,j),c},...E);return Object.assign(N,{resultFunc:h,memoizedResultFunc:T,dependencies:k,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var JF=eR(JN),eB=Object.assign((e,t=JF)=>{HF(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(s=>e[s]);return t(r,(...s)=>s.reduce((a,c,u)=>(a[n[u]]=c,a),{}))},{withTypes:()=>eB});eR({memoize:KF,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const qe=(e,t,n,r,i,s,...a)=>{if(a.length>0)throw new Error(Cn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var _2={exports:{}},L2={};var HE;function tB(){if(HE)return L2;HE=1;var e=vf();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,s=e.useLayoutEffect,a=e.useDebugValue;function c(p,y){var x=y(),b=r({inst:{value:x,getSnapshot:y}}),w=b[0].inst,E=b[1];return s(function(){w.value=x,w.getSnapshot=y,u(w)&&E({inst:w})},[p,x,y]),i(function(){return u(w)&&E({inst:w}),p(function(){u(w)&&E({inst:w})})},[p]),a(x),x}function u(p){var y=p.getSnapshot;p=p.value;try{var x=y();return!n(p,x)}catch{return!0}}function h(p,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return L2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,L2}var UE;function tR(){return UE||(UE=1,_2.exports=tB()),_2.exports}var nR=tR(),I2={exports:{}},P2={};var qE;function nB(){if(qE)return P2;qE=1;var e=vf(),t=tR();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,c=e.useMemo,u=e.useDebugValue;return P2.useSyncExternalStoreWithSelector=function(h,m,p,y,x){var b=s(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=c(function(){function k(A){if(!T){if(T=!0,N=A,A=y(A),x!==void 0&&w.hasValue){var R=w.value;if(x(R,A))return O=R}return O=A}if(R=O,r(N,A))return R;var _=y(A);return x!==void 0&&x(R,_)?(N=A,R):(N=A,O=_)}var T=!1,N,O,j=p===void 0?null:p;return[function(){return k(m())},j===null?void 0:function(){return k(j())}]},[m,p,y,x]);var E=i(h,b[0],b[1]);return a(function(){w.hasValue=!0,w.value=E},[E]),u(E),E},P2}var VE;function rB(){return VE||(VE=1,I2.exports=nB()),I2.exports}var iB=rB();const oB=Nb(19),sB=oB?lB:cB;function Et(e,t,n,r,i){return sB(e,t,n,r,i)}function aB(e,t,n,r,i){const s=S.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return nR.useSyncExternalStore(e.subscribe,s,s)}pP({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()}}),nR.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function lB(e,t,n,r,i){const s=hP();if(!s)return aB(e,t,n,r,i);const a=s.syncIndex;s.syncIndex+=1;let c;return s.didInitialize?(c=s.syncHooks[a],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,i))&&(c.store!==e&&(s.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},s.syncHooks.push(c)),c.value}function cB(e,t,n,r,i){return iB.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,i))}class rR{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 Et(this,t,n,r,i)}}class S0 extends rR{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){S.useDebugValue(t),We(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;We(()=>(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);We(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){S.useDebugValue(t);const r=n!==void 0;We(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,i){const s=this.selectors[t];return s(this.state,n,r,i)}useState(t,n,r,i){return S.useDebugValue(t),Et(this,this.selectors[t],n,r,i)}useContextCallback(t,n){S.useDebugValue(t);const r=tt(n??Er);this.context[t]=r}useStateSetter(t){const n=S.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(s=>{const a=r(s);if(!Object.is(i,a)){const c=i;i=a,n(a,c,this)}})}}const uB={open:qe(e=>e.open),domReferenceElement:qe(e=>e.domReferenceElement),referenceElement:qe(e=>e.positionReference??e.referenceElement),floatingElement:qe(e=>e.floatingElement),floatingId:qe(e=>e.floatingId)};class _b extends S0{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:s,...a}=t;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:BN(),nested:n,noEmit:r,triggerElements:s},uB)}setOpen=(t,n)=>{if((!t||!this.state.open||hN(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 Ea(e,t=!1,n=!1){const[r,i]=S.useState(e&&t?"idle":void 0),[s,a]=S.useState(e);return e&&!s&&(a(!0),i("starting")),!e&&s&&r!=="ending"&&!n&&i("ending"),!e&&!s&&r==="ending"&&i(void 0),We(()=>{if(!e&&s&&r!=="ending"&&n){const c=wo.request(()=>{i("ending")});return()=>{wo.cancel(c)}}},[e,s,r,n]),We(()=>{if(!e||t)return;const c=wo.request(()=>{i(void 0)});return()=>{wo.cancel(c)}},[t,e]),We(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&i("starting");const c=wo.request(()=>{i("idle")});return()=>{wo.cancel(c)}},[t,e,s,i,r]),S.useMemo(()=>({mounted:s,setMounted:a,transitionStatus:r}),[s,r])}let of=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const dB={[of.startingStyle]:""},fB={[of.endingStyle]:""},ws={transitionStatus(e){return e==="starting"?dB:e==="ending"?fB:null}};function iR(e,t=!1,n=!0){const r=b0();return tt((i,s=null)=>{r.cancel();function a(){Ci.flushSync(i)}const c=ss(e);if(c==null)return;const u=c;if(typeof u.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let p=function(){const x=of.startingStyle;if(!u.hasAttribute(x)){r.request(y);return}const b=new MutationObserver(()=>{u.hasAttribute(x)||(b.disconnect(),y())});b.observe(u,{attributes:!0,attributeFilter:[x]}),s?.addEventListener("abort",()=>b.disconnect(),{once:!0})},y=function(){Promise.all(u.getAnimations().map(x=>x.finished)).then(()=>{s?.aborted||a()}).catch(()=>{const x=u.getAnimations();if(n){if(s?.aborted)return;a()}else x.length>0&&x.some(b=>b.pending||b.playState!=="finished")&&y()})};var h=p,m=y;if(t){p();return}r.request(y)}})}function Xi(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,s=tt(i),a=iR(r,n,!1);S.useEffect(()=>{if(!t)return;const c=new AbortController;return a(s,c.signal),()=>{c.abort()}},[t,n,s,a])}function oR(e,t){const n=S.useRef(null),r=S.useRef(null);return S.useCallback(i=>{if(e!==void 0){if(n.current!==null){const s=n.current,a=r.current,c=t.context.triggerElements.getById(s);a&&c===a&&t.context.triggerElements.delete(s),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function sR(e,t,n,r){const i=n.useState("isMountedByTrigger",e),s=oR(e,n),a=tt(c=>{if(s(c),!c||!n.select("open"))return;const u=n.select("activeTriggerId");if(u===e){n.update({activeTriggerElement:c,...r});return}u==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return We(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function Lb(e){const t=e.useState("open");We(()=>{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 Ib(e,t,n){const{mounted:r,setMounted:i,transitionStatus:s}=Ea(e);t.useSyncedValues({mounted:r,transitionStatus:s});const a=tt(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return Xi({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:s}}class Af{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 hB(){return new _b({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Af,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Pb(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:hB(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Bn,inactiveTriggerProps:Bn,popupProps:Bn}}const wp=qe(e=>e.triggerIdProp??e.activeTriggerId),zb={open:qe(e=>e.openProp??e.open),mounted:qe(e=>e.mounted),transitionStatus:qe(e=>e.transitionStatus),floatingRootContext:qe(e=>e.floatingRootContext),preventUnmountingOnClose:qe(e=>e.preventUnmountingOnClose),payload:qe(e=>e.payload),activeTriggerId:wp,activeTriggerElement:qe(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:qe((e,t)=>t!==void 0&&wp(e)===t),isOpenedByTrigger:qe((e,t)=>t!==void 0&&wp(e)===t&&e.open),isMountedByTrigger:qe((e,t)=>t!==void 0&&wp(e)===t&&e.mounted),triggerProps:qe((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:qe(e=>e.popupProps),popupElement:qe(e=>e.popupElement),positionerElement:qe(e=>e.positionerElement)};function aR(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=kl(),s=vs()!=null,a=sr(()=>new _b({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Af,floatingId:i,nested:s,noEmit:!1})).current;return We(()=>{const c={open:t,floatingId:i};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=un(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),a.update(c)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=s,a.context.noEmit=!1,a}function pB(e={}){const{nodeId:t,externalTree:n}=e,r=aR(e),i=e.rootContext||r,s={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,c]=S.useState(null),u=S.useRef(null),h=Ca(n);We(()=>{s.domReference&&(u.current=s.domReference)},[s.domReference]);const m=DF({...e,elements:{...s,...a&&{reference:a}}}),p=S.useCallback(R=>{const _=un(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;c(_),m.refs.setReference(_)},[m.refs]),[y,x]=S.useState(null),[b,w]=S.useState(null);i.useSyncedValue("referenceElement",y),i.useSyncedValue("domReferenceElement",un(y)?y:null),i.useSyncedValue("floatingElement",b);const E=S.useCallback(R=>{(un(R)||R===null)&&(u.current=R,x(R)),(un(m.refs.reference.current)||m.refs.reference.current===null||R!==null&&!un(R))&&m.refs.setReference(R)},[m.refs,x]),k=S.useCallback(R=>{w(R),m.refs.setFloating(R)},[m.refs]),T=S.useMemo(()=>({...m.refs,setReference:E,setFloating:k,setPositionReference:p,domReference:u}),[m.refs,E,k,p]),N=S.useMemo(()=>({...m.elements,domReference:s.domReference}),[m.elements,s.domReference]),O=i.useState("open"),j=i.useState("floatingId"),A=S.useMemo(()=>({...m,dataRef:i.context.dataRef,open:O,onOpenChange:i.setOpen,events:i.context.events,floatingId:j,refs:T,elements:N,nodeId:t,rootStore:i}),[m,T,N,t,i,O,j]);return We(()=>{i.context.dataRef.current.floatingContext=A;const R=h?.nodesRef.current.find(_=>_.id===t);R&&(R.context=A)}),S.useMemo(()=>({...m,context:A,refs:T,elements:N,rootStore:i}),[m,T,N,A,i])}function Fb(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,s=kl(),a=vs()!=null,c=t.useState("open"),u=t.useState("activeTriggerElement"),h=t.useState(r?"popupElement":"positionerElement"),m=t.context.triggerElements,p=sr(()=>new _b({open:c,referenceElement:u,floatingElement:h,triggerElements:m,onOpenChange:i,floatingId:s,nested:a,noEmit:n})).current;return We(()=>{const y={open:c,floatingId:s,referenceElement:u,floatingElement:h};un(u)&&(y.domReferenceElement=u),p.state.positionReference===p.state.referenceElement&&(y.positionReference=u),p.update(y)},[c,s,u,h,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const z2=sN&&oN;function lR(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:s=!0,delay:a}=t,c=S.useRef(!1),u=S.useRef(null),h=Hn(),m=S.useRef(!0);S.useEffect(()=>{const y=n.select("domReferenceElement");if(!s)return;const x=qn(y);function b(){const k=n.select("domReferenceElement");!n.select("open")&&Fn(k)&&k===bi(Zt(k))&&(c.current=!0)}function w(){m.current=!0}function E(){m.current=!1}return x.addEventListener("blur",b),z2&&(x.addEventListener("keydown",w,!0),x.addEventListener("pointerdown",E,!0)),()=>{x.removeEventListener("blur",b),z2&&(x.removeEventListener("keydown",w,!0),x.removeEventListener("pointerdown",E,!0))}},[n,s]),S.useEffect(()=>{if(!s)return;function y(x){if(x.reason===qc||x.reason===x0){const b=n.select("domReferenceElement");un(b)&&(u.current=b,c.current=!0)}}return r.on("openchange",y),()=>{r.off("openchange",y)}},[r,s,n]);const p=S.useMemo(()=>({onMouseLeave(){c.current=!1,u.current=null},onFocus(y){const x=y.currentTarget;if(c.current){if(u.current===x)return;c.current=!1,u.current=null}const b=Fr(y.nativeEvent);if(un(b)){if(z2&&!y.relatedTarget){if(!m.current&&!g0(b))return}else if(!NP(b))return}const w=xm(y.relatedTarget,n.context.triggerElements),{nativeEvent:E,currentTarget:k}=y,T=typeof a=="function"?a():a;if(n.select("open")&&w||T===0||T===void 0){n.setOpen(!0,kt(Mc,E,k));return}h.start(T,()=>{c.current||n.setOpen(!0,kt(Mc,E,k))})},onBlur(y){c.current=!1,u.current=null;const x=y.relatedTarget,b=y.nativeEvent,w=un(x)&&x.hasAttribute(rf("focus-guard"))&&x.getAttribute("data-type")==="outside";h.start(0,()=>{const E=n.select("domReferenceElement"),k=bi(E?E.ownerDocument:document);!x&&k===E||Nt(i.current.floatingContext?.refs.floating.current,k)||Nt(E,k)||w||xm(x??k,n.context.triggerElements)||n.setOpen(!1,kt(Mc,b))})}}),[i,n,h,a]);return S.useMemo(()=>s?{reference:p,trigger:p}:{},[s,p])}const mB=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${uN}`;function gB(e){return e?!!e.closest(mB):!1}class Bb{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 uo,this.restTimeout=new uo,this.handleCloseOptions=void 0}static create(){return new Bb}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function Hb(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 yB(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t;Hb(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 cR(e){const t=sr(Bb.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),mb(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function uR(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),s=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:c=!0,closeDelay:u=0}=t,h=cR(n),m=Ca(),p=vs(),y=tt(()=>kN(a.current.openEvent?.type,h.interactedInside)),x=tt(()=>{const N=a.current.openEvent?.type;return N?.includes("mouse")&&N!=="mousedown"}),b=tt(N=>xm(N,n.context.triggerElements)),w=S.useCallback(N=>{const O=Pd(u,"close",h.pointerType),j=()=>{n.setOpen(!1,kt(Br,N)),m?.events.emit("floating.closed",N)};O?h.openChangeTimeout.start(O,j):(h.openChangeTimeout.clear(),j())},[u,n,h,m]),E=tt(()=>{Hb(h)}),k=tt(N=>{const O=Fr(N);if(!gB(O)){h.interactedInside=!1;return}h.interactedInside=O?.closest("[aria-haspopup]")!=null});We(()=>{r||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,E())},[r,h,E]),S.useEffect(()=>E,[E]),We(()=>{if(c&&r&&h.handleCloseOptions?.blockPointerEvents&&x()&&un(s)&&i){const N=s,O=i,j=Zt(i),A=m?.nodesRef.current.find(_=>_.id===p)?.context?.elements.floating;A&&(A.style.pointerEvents="");const R=h.handleCloseOptions?.getScope?.()??h.pointerEventsScopeElement??A??N.closest("[data-rootownerid]")??j.body;return yB(h,{scopeElement:R,referenceElement:N,floatingElement:O}),()=>{E()}}},[c,r,s,i,h,x,m,p,E]);const T=Hn();S.useEffect(()=>{if(!c)return;function N(){h.openChangeTimeout.clear(),T.clear(),m?.events.off("floating.closed",j),E()}function O(R){if(m&&p&&ds(m.nodesRef.current,p).length>0){m.events.on("floating.closed",j);return}if(!b(R.relatedTarget)){if(h.handler){h.handler(R);return}E(),y()||w(R)}}function j(R){!m||!p||ds(m.nodesRef.current,p).length>0||T.start(0,()=>{m.events.off("floating.closed",j),n.setOpen(!1,kt(Br,R)),m.events.emit("floating.closed",R)})}const A=i;return A&&(A.addEventListener("mouseenter",N),A.addEventListener("mouseleave",O),A.addEventListener("pointerdown",k,!0)),()=>{A&&(A.removeEventListener("mouseenter",N),A.removeEventListener("mouseleave",O),A.removeEventListener("pointerdown",k,!0)),m?.events.off("floating.closed",j)}},[c,i,n,a,y,b,w,E,k,h,m,p,T])}const xB={current:null};function Ub(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:s=!0,delay:a=0,handleClose:c=null,mouseOnly:u=!1,restMs:h=0,move:m=!0,triggerElementRef:p=xB,externalTree:y,isActiveTrigger:x=!0,getHandleCloseContext:b}=t,w=Ca(y),E=cR(n),k=yr(c),T=yr(a),N=yr(h),O=yr(s);x&&(E.handleCloseOptions=k.current?.__options);const j=tt(()=>kN(r.current.openEvent?.type,E.interactedInside)),A=tt(H=>xm(H,n.context.triggerElements)),R=tt((H,q,V)=>{const $=n.context.triggerElements;if($.hasElement(q))return!H||!Nt(H,q);if(!un(V))return!1;const U=V;return $.hasMatchingElement(P=>Nt(P,U))&&(!H||!Nt(H,U))}),_=S.useCallback((H,q=!0)=>{const V=Pd(T.current,"close",E.pointerType);V?E.openChangeTimeout.start(V,()=>{n.setOpen(!1,kt(Br,H)),w?.events.emit("floating.closed",H)}):q&&(E.openChangeTimeout.clear(),n.setOpen(!1,kt(Br,H)),w?.events.emit("floating.closed",H))},[T,n,E,w]),F=tt(()=>{if(!E.handler)return;Zt(n.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0});S.useEffect(()=>F,[F]);const I=tt(()=>{Hb(E)});return S.useEffect(()=>{if(!s)return;function H(q){q.open||(F(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return i.on("openchange",H),()=>{i.off("openchange",H)}},[s,i,E,F]),S.useEffect(()=>{if(!s)return;const H=p.current??(x?n.select("domReferenceElement"):null);if(!un(H))return;function q($){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,u&&!Bc(E.pointerType)||bE(N.current)>0&&!Pd(T.current,"open"))return;const P=Pd(T.current,"open",E.pointerType),Y=$.currentTarget??null,G=n.select("domReferenceElement"),X=Y==null?!1:R(G,Y,$.target),L=n.select("open"),B=!L||X;X&&L?n.setOpen(!0,kt(Br,$,Y)):P?E.openChangeTimeout.start(P,()=>{B&&n.setOpen(!0,kt(Br,$,Y))}):B&&n.setOpen(!0,kt(Br,$,Y))}function V($){if(j()){I();return}F();const U=n.select("domReferenceElement"),P=Zt(U);E.restTimeout.clear(),E.restTimeoutPending=!1;const Y=r.current.floatingContext??b?.();if(A($.relatedTarget))return;if(k.current&&Y){n.select("open")||E.openChangeTimeout.clear();const L=p.current;E.handler=k.current({...Y,tree:w,x:$.clientX,y:$.clientY,onClose(){I(),F(),O.current&&!j()&&L===n.select("domReferenceElement")&&_($,!0)}}),P.addEventListener("mousemove",E.handler),E.handler($);return}(E.pointerType!=="touch"||!Nt(n.select("floatingElement"),$.relatedTarget))&&_($)}return m&&H.addEventListener("mousemove",q,{once:!0}),H.addEventListener("mouseenter",q),H.addEventListener("mouseleave",V),()=>{m&&H.removeEventListener("mousemove",q),H.removeEventListener("mouseenter",q),H.removeEventListener("mouseleave",V)}},[F,I,r,T,_,n,s,k,E,x,R,j,A,u,m,N,p,w,O,b]),S.useMemo(()=>{if(!s)return;function H(q){E.pointerType=q.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(q){const{nativeEvent:V}=q,$=q.currentTarget,U=n.select("domReferenceElement"),P=n.select("open"),Y=R(U,$,q.target);if(u&&!Bc(E.pointerType))return;const G=bE(N.current);if(P&&!Y||G===0||!Y&&E.restTimeoutPending&&q.movementX**2+q.movementY**2<2)return;E.restTimeout.clear();function X(){if(E.restTimeoutPending=!1,j())return;const L=n.select("open");!E.blockMouseMove&&(!L||Y)&&n.setOpen(!0,kt(Br,V,$))}E.pointerType==="touch"?Ci.flushSync(()=>{X()}):Y&&P?X():(E.restTimeoutPending=!0,E.restTimeout.start(G,X))}}},[s,E,j,R,u,n,N])}function iu(e=[]){const t=e.map(h=>h?.reference),n=e.map(h=>h?.floating),r=e.map(h=>h?.item),i=e.map(h=>h?.trigger),s=S.useCallback(h=>Sp(h,e,"reference"),t),a=S.useCallback(h=>Sp(h,e,"floating"),n),c=S.useCallback(h=>Sp(h,e,"item"),r),u=S.useCallback(h=>Sp(h,e,"trigger"),i);return S.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:c,getTriggerProps:u}),[s,a,c,u])}function Sp(e,t,n){const r=new Map,i=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[qy]="");for(const a in e)i&&e&&(a===lN||a===cN)||(s[a]=e[a]);for(let a=0;a<t.length;a+=1){let c;const u=t[a]?.[n];typeof u=="function"?c=e?u(e):null:c=u,c&&$E(s,c,i,r)}return $E(s,e,i,r),s}function $E(e,t,n,r){for(const i in t){const s=t[i];n&&(i===lN||i===cN)||(i.startsWith("on")?(r.has(i)||r.set(i,[]),typeof s=="function"&&(r.get(i)?.push(s),e[i]=(...a)=>r.get(i)?.map(c=>c(...a)).find(c=>c!==void 0))):e[i]=s)}}const bB="Escape";function C0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Cp(e,t){return C0(t,e===bb||e===Nf,e===fa||e===ha)}function F2(e,t,n){return C0(t,e===Nf,n?e===fa:e===ha)||e==="Enter"||e===" "||e===""}function vB(e,t,n){return C0(t,n?e===fa:e===ha,e===Nf)}function wB(e,t,n,r){const i=n?e===ha:e===fa,s=e===bb;return t==="both"||t==="horizontal"&&r&&r>1?e===bB:C0(t,i,s)}function dR(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),s=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:c,activeIndex:u,onNavigate:h=()=>{},enabled:m=!0,selectedIndex:p=null,allowEscape:y=!1,loopFocus:x=!1,nested:b=!1,rtl:w=!1,virtual:E=!1,focusItemOnOpen:k="auto",focusItemOnHover:T=!0,openOnArrowKeyDown:N=!0,disabledIndices:O=void 0,orientation:j="vertical",parentOrientation:A,cols:R=1,id:_,resetOnPointerLeave:F=!0,externalTree:I}=t,H=ef(i),q=yr(H),V=vs(),$=Ca(I);We(()=>{a.current.orientation=j},[a,j]);const U=Vy(s),P=S.useRef(k),Y=S.useRef(p??-1),G=S.useRef(null),X=S.useRef(!0),L=tt(pe=>{h(Y.current===-1?null:Y.current,pe)}),B=S.useRef(L),W=S.useRef(!!i),D=S.useRef(r),Q=S.useRef(!1),ee=S.useRef(!1),J=yr(O),he=yr(r),de=yr(p),Se=yr(F),Re=tt(()=>{function pe(Ce){E?$?.events.emit("virtualfocus",Ce):zd(Ce,{sync:Q.current,preventScroll:!0})}const be=c.current[Y.current],ne=ee.current;be&&pe(be),(Q.current?Ce=>Ce():requestAnimationFrame)(()=>{const Ce=c.current[Y.current]||be;if(!Ce)return;be||pe(Ce),Fe&&(ne||!X.current)&&Ce.scrollIntoView?.({block:"nearest",inline:"nearest"})})});We(()=>{m&&(r&&i?(Y.current=p??-1,P.current&&p!=null&&(ee.current=!0,L())):W.current&&(Y.current=-1,B.current()))},[m,r,i,p,L]),We(()=>{if(m){if(!r){Q.current=!1;return}if(i)if(u==null){if(Q.current=!1,de.current!=null)return;if(W.current&&(Y.current=-1,Re()),(!D.current||!W.current)&&P.current&&(G.current!=null||P.current===!0&&G.current==null)){let pe=0;const be=()=>{c.current[0]==null?(pe<2&&(pe?requestAnimationFrame:queueMicrotask)(be),pe+=1):(Y.current=G.current==null||F2(G.current,j,w)||b?T2(c):gE(c),G.current=null,L())};be()}}else wm(c,u)||(Y.current=u,Re(),ee.current=!1)}},[m,r,i,u,de,b,c,j,w,L,Re,J]),We(()=>{if(!m||i||!$||E||!W.current)return;const pe=$.nodesRef.current,be=pe.find(Ce=>Ce.id===V)?.context?.elements.floating,ne=bi(Zt(i)),ye=pe.some(Ce=>Ce.context&&Nt(Ce.context.elements.floating,ne));be&&!ye&&X.current&&be.focus({preventScroll:!0})},[m,i,$,V,E]),We(()=>{B.current=L,D.current=r,W.current=!!i}),We(()=>{r||(G.current=null,P.current=k)},[r,k]);const je=u!=null,Fe=S.useMemo(()=>{function pe(ne){if(!he.current)return;const ye=c.current.indexOf(ne.currentTarget);ye!==-1&&Y.current!==ye&&(Y.current=ye,L(ne))}return{onFocus(ne){Q.current=!0,pe(ne)},onClick:({currentTarget:ne})=>ne.focus({preventScroll:!0}),onMouseMove(ne){Q.current=!0,ee.current=!1,T&&pe(ne)},onPointerLeave(ne){if(!he.current||!X.current||ne.pointerType==="touch")return;Q.current=!0;const ye=ne.relatedTarget;if(!(!T||c.current.includes(ye))&&Se.current&&(zd(null,{sync:!0}),Y.current=-1,L(ne),!E)){const Ce=q.current,Ve=bi(Zt(Ce));Ce&&Nt(Ce,Ve)&&Ce.focus({preventScroll:!0})}}}},[he,q,T,c,L,Se,E]),_e=S.useCallback(()=>A??$?.nodesRef.current.find(pe=>pe.id===V)?.context?.dataRef?.current.orientation,[V,$,A]),De=tt(pe=>{if(X.current=!1,Q.current=!0,pe.which===229||!he.current&&pe.currentTarget===q.current)return;if(b&&wB(pe.key,j,w,R)){Cp(pe.key,_e())||xi(pe),n.setOpen(!1,kt(tm,pe.nativeEvent)),Fn(s)&&(E?$?.events.emit("virtualfocus",s):s.focus());return}const be=Y.current,ne=T2(c,O),ye=gE(c,O);if(U||(pe.key==="Home"&&(xi(pe),Y.current=ne,L(pe)),pe.key==="End"&&(xi(pe),Y.current=ye,L(pe))),R>1){const Ce=Array.from({length:c.current.length},()=>({width:1,height:1})),Ve=FP(Ce,R),ct=Ve.findIndex(Le=>Le!=null&&!jc(c,Le,O)),oe=Ve.reduce((Le,Me,Ue)=>Me!=null&&!jc(c,Me,O)?Ue:Le,-1),Ee=Ve[zP({current:Ve.map(Le=>Le!=null?c.current[Le]:null)},{event:pe,orientation:j,loopFocus:x,rtl:w,cols:R,disabledIndices:HP([...(typeof O!="function"?O:null)||c.current.map((Le,Me)=>jc(c,Me,O)?Me:void 0),void 0],Ve),minIndex:ct,maxIndex:oe,prevIndex:BP(Y.current>ye?ne:Y.current,Ce,Ve,R,pe.key===Nf?"bl":pe.key===(w?fa:ha)?"tr":"tl"),stopEvent:!0})];if(Ee!=null&&(Y.current=Ee,L(pe)),j==="both")return}if(Cp(pe.key,j)){if(xi(pe),r&&!E&&bi(pe.currentTarget.ownerDocument)===pe.currentTarget){Y.current=F2(pe.key,j,w)?ne:ye,L(pe);return}F2(pe.key,j,w)?x?be>=ye?y&&be!==c.current.length?Y.current=-1:(Q.current=!1,Y.current=ne):Y.current=Pr(c,{startingIndex:be,disabledIndices:O}):Y.current=Math.min(ye,Pr(c,{startingIndex:be,disabledIndices:O})):x?be<=ne?y&&be!==-1?Y.current=c.current.length:(Q.current=!1,Y.current=ye):Y.current=Pr(c,{startingIndex:be,decrement:!0,disabledIndices:O}):Y.current=Math.max(ne,Pr(c,{startingIndex:be,decrement:!0,disabledIndices:O})),wm(c,Y.current)&&(Y.current=-1),L(pe)}}),xe=S.useMemo(()=>E&&r&&je&&{"aria-activedescendant":`${_}-${u}`},[E,r,je,_,u]),Ge=S.useMemo(()=>({"aria-orientation":j==="both"?void 0:j,...U?{}:xe,onKeyDown(pe){if(pe.key==="Tab"&&pe.shiftKey&&r&&!E){const be=Fr(pe.nativeEvent);if(be&&!Nt(q.current,be))return;xi(pe),n.setOpen(!1,kt(ml,pe.nativeEvent)),Fn(s)&&s.focus();return}De(pe)},onPointerMove(){X.current=!0}}),[xe,De,q,j,U,n,r,E,s]),we=S.useMemo(()=>{function pe(ne){k==="auto"&&dN(ne.nativeEvent)&&(P.current=!E)}function be(ne){P.current=k,k==="auto"&&fN(ne.nativeEvent)&&(P.current=!0)}return{onKeyDown(ne){const ye=n.select("open");X.current=!1;const Ce=ne.key.startsWith("Arrow"),Ve=vB(ne.key,_e(),w),ct=Cp(ne.key,j),oe=(b?Ve:ct)||ne.key==="Enter"||ne.key.trim()==="";if(E&&ye)return De(ne);if(!(!ye&&!N&&Ce)){if(oe){const Ee=Cp(ne.key,_e());G.current=b&&Ee?null:ne.key}if(b){Ve&&(xi(ne),ye?(Y.current=T2(c,J.current),L(ne)):n.setOpen(!0,kt(tm,ne.nativeEvent,ne.currentTarget)));return}ct&&(de.current!=null&&(Y.current=de.current),xi(ne),!ye&&N?n.setOpen(!0,kt(tm,ne.nativeEvent,ne.currentTarget)):De(ne),ye&&L(ne))}},onFocus(ne){n.select("open")&&!E&&(Y.current=-1,L(ne))},onPointerDown:be,onPointerEnter:be,onMouseDown:pe,onClick:pe}},[De,J,k,c,b,L,n,N,j,_e,w,de,E]),Ae=S.useMemo(()=>({...xe,...we}),[xe,we]);return S.useMemo(()=>m?{reference:Ae,floating:Ge,item:Fe,trigger:we}:{},[m,Ae,Ge,we,Fe])}const SB=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fR(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),s=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{role:c="dialog"}=t,u=kl(),h=s?.id||u,m=S.useMemo(()=>ef(a)?.id||i,[a,i]),p=SB.get(c)??c,x=vs()!=null,b=S.useMemo(()=>p==="tooltip"||c==="label"?Bn:{"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]),w=S.useMemo(()=>p==="tooltip"||c==="label"?{[`aria-${c==="label"?"labelledby":"describedby"}`]:r?m:void 0}:{...b,"aria-expanded":r?"true":"false","aria-controls":r?m:void 0,...p==="menu"&&{id:h}},[p,m,r,h,c,b]),E=S.useMemo(()=>{const T={id:m,...p&&{role:p}};return p==="tooltip"||c==="label"?T:{...T,...p==="menu"&&{"aria-labelledby":h}}},[p,m,h,c]),k=S.useCallback(({active:T,selected:N})=>{const O={role:"option",...T&&{id:`${m}-fui-option`}};switch(c){case"select":case"combobox":return{...O,"aria-selected":N}}return{}},[m,c]);return S.useMemo(()=>({reference:w,floating:E,item:k,trigger:b}),[w,E,b,k])}function hR(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,i=n.useState("open"),{listRef:s,elementsRef:a,activeIndex:c,onMatch:u,onTypingChange:h,enabled:m=!0,resetMs:p=750,selectedIndex:y=null}=t,x=Hn(),b=S.useRef(""),w=S.useRef(y??c??-1),E=S.useRef(null);We(()=>{!i&&y!==null||(x.clear(),E.current=null,b.current!==""&&(b.current=""))},[i,y,x]),We(()=>{i&&b.current===""&&(w.current=y??c??-1)},[i,y,c]);const k=tt(A=>{A?r.current.typing||(r.current.typing=A,h?.(A)):r.current.typing&&(r.current.typing=A,h?.(A))}),T=tt(A=>{function R(U){const P=a?.current[U];return!P||Cb(P)}function _(U,P,Y=0){if(U.length===0)return-1;const G=(Y%U.length+U.length)%U.length,X=P.toLocaleLowerCase();for(let L=0;L<U.length;L+=1){const B=(G+L)%U.length;if(!(!U[B]?.toLocaleLowerCase().startsWith(X)||!R(B)))return B}return-1}const F=s.current;if(b.current.length>0&&A.key===" "&&(xi(A),k(!0)),b.current.length>0&&b.current[0]!==" "&&_(F,b.current)===-1&&A.key!==" "&&k(!1),F==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;i&&A.key!==" "&&(xi(A),k(!0));const I=b.current==="";I&&(w.current=y??c??-1),F.every(U=>U?U[0]?.toLocaleLowerCase()!==U[1]?.toLocaleLowerCase():!0)&&b.current===A.key&&(b.current="",w.current=E.current),b.current+=A.key,x.start(p,()=>{b.current="",w.current=E.current,k(!1)});const V=((I?y??c??-1:w.current)??0)+1,$=_(F,b.current,V);$!==-1?(u?.($),E.current=$):A.key!==" "&&(b.current="",k(!1))}),N=tt(A=>{const R=A.relatedTarget,_=n.select("domReferenceElement"),F=n.select("floatingElement"),I=Nt(_,R),H=Nt(F,R);I||H||(x.clear(),b.current="",w.current=E.current,k(!1))}),O=S.useMemo(()=>({onKeyDown:T,onBlur:N}),[T,N]),j=S.useMemo(()=>({onKeyDown:T,onBlur:N}),[T,N]);return S.useMemo(()=>m?{reference:O,floating:j}:{},[m,O,j])}const YE=.1,CB=YE*YE,bn=.5;function Ep(e,t,n,r,i,s){return r>=t!=s>=t&&e<=(i-n)*(t-r)/(s-r)+n}function kp(e,t,n,r,i,s,a,c,u,h){let m=!1;return Ep(e,t,n,r,i,s)&&(m=!m),Ep(e,t,i,s,a,c)&&(m=!m),Ep(e,t,a,c,u,h)&&(m=!m),Ep(e,t,u,h,n,r)&&(m=!m),m}function EB(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Tp(e,t,n,r,i,s){const a=Math.min(n,i),c=Math.max(n,i),u=Math.min(r,s),h=Math.max(r,s);return e>=a&&e<=c&&t>=u&&t<=h}function qb(e={}){const{blockPointerEvents:t=!1}=e,n=new uo,r=({x:i,y:s,placement:a,elements:c,onClose:u,nodeId:h,tree:m})=>{const p=a?.split("-")[0];let y=!1,x=null,b=null,w=typeof performance<"u"?performance.now():0;function E(T,N){const O=performance.now(),j=O-w;if(x===null||b===null||j===0)return x=T,b=N,w=O,!1;const A=T-x,R=N-b,_=A*A+R*R,F=j*j*CB;return x=T,b=N,w=O,_<F}function k(){n.clear(),u()}return function(N){n.clear();const O=c.domReference,j=c.floating;if(!O||!j||p==null||i==null||s==null)return;const{clientX:A,clientY:R}=N,_=Fr(N),F=N.type==="mouseleave",I=Nt(j,_),H=Nt(O,_);if(I&&(y=!0,!F))return;if(H&&(y=!1,!F)){y=!0;return}if(F&&un(N.relatedTarget)&&Nt(j,N.relatedTarget))return;function q(){return!!(m&&ds(m.nodesRef.current,h).length>0)}function V(){q()||k()}if(q())return;const $=O.getBoundingClientRect(),U=j.getBoundingClientRect(),P=i>U.right-U.width/2,Y=s>U.bottom-U.height/2,G=U.width>$.width,X=U.height>$.height,L=(G?$:U).left,B=(G?$:U).right,W=(X?$:U).top,D=(X?$:U).bottom;if(p==="top"&&s>=$.bottom-1||p==="bottom"&&s<=$.top+1||p==="left"&&i>=$.right-1||p==="right"&&i<=$.left+1){V();return}let Q=!1;switch(p){case"top":Q=Tp(A,R,L,$.top+1,B,U.bottom-1);break;case"bottom":Q=Tp(A,R,L,U.top+1,B,$.bottom-1);break;case"left":Q=Tp(A,R,U.right-1,D,$.left+1,W);break;case"right":Q=Tp(A,R,$.right-1,D,U.left+1,W);break}if(Q)return;if(y&&!EB(A,R,$)){V();return}if(!F&&E(A,R)){V();return}let ee=!1;switch(p){case"top":{const J=G?bn/2:bn*4,he=G||P?i+J:i-J,de=G?i-J:P?i+J:i-J,Se=s+bn+1,Re=P||G?U.bottom-bn:U.top,je=P?G?U.bottom-bn:U.top:U.bottom-bn;ee=kp(A,R,he,Se,de,Se,U.left,Re,U.right,je);break}case"bottom":{const J=G?bn/2:bn*4,he=G||P?i+J:i-J,de=G?i-J:P?i+J:i-J,Se=s-bn,Re=P||G?U.top+bn:U.bottom,je=P?G?U.top+bn:U.bottom:U.top+bn;ee=kp(A,R,he,Se,de,Se,U.left,Re,U.right,je);break}case"left":{const J=X?bn/2:bn*4,he=X||Y?s+J:s-J,de=X?s-J:Y?s+J:s-J,Se=i+bn+1,Re=Y||X?U.right-bn:U.left,je=Y?X?U.right-bn:U.left:U.right-bn;ee=kp(A,R,Re,U.top,je,U.bottom,Se,he,Se,de);break}case"right":{const J=X?bn/2:bn*4,he=X||Y?s+J:s-J,de=X?s-J:Y?s+J:s-J,Se=i-bn,Re=Y||X?U.left+bn:U.right,je=Y?X?U.left+bn:U.right:U.left+bn;ee=kp(A,R,Se,he,Se,de,Re,U.top,je,U.bottom);break}}ee?y||n.start(40,V):V()}};return r.__options={blockPointerEvents:t},r}const kB={...zb,disabled:qe(e=>e.disabled),instantType:qe(e=>e.instantType),isInstantPhase:qe(e=>e.isInstantPhase),trackCursorAxis:qe(e=>e.trackCursorAxis),disableHoverablePopup:qe(e=>e.disableHoverablePopup),lastOpenChangeReason:qe(e=>e.openChangeReason),closeOnClick:qe(e=>e.closeOnClick),closeDelay:qe(e=>e.closeDelay),hasViewport:qe(e=>e.hasViewport)};class Vb extends S0{constructor(t){super({...TB(),...t},{popupRef:S.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Af},kB)}setOpen=(t,n)=>{const r=n.reason,i=r===Br,s=t&&r===Mc,a=!t&&(r===qc||r===x0);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const c=()=>{const u={open:t,openChangeReason:r};s?u.instantType="focus":a?u.instantType="dismiss":r===Br&&(u.instantType=void 0);const h=n.trigger?.id??null;(h||t)&&(u.activeTriggerId=h,u.activeTriggerElement=n.trigger??null),this.update(u)};i?Ci.flushSync(c):c()};static useStore(t,n){const r=sr(()=>new Vb(n)).current,i=t??r,s=Fb({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=s,i}}function TB(){return{...Pb(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const NB=pb(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:s=!1,trackCursorAxis:a="none",actionsRef:c,onOpenChange:u,onOpenChangeComplete:h,handle:m,triggerId:p,defaultTriggerId:y=null,children:x}=t,b=Vb.useStore(m?.store,{open:r,openProp:i,activeTriggerId:y,triggerIdProp:p});d0(()=>{i===void 0&&b.state.open===!1&&r===!0&&b.update({open:!0,activeTriggerId:y})}),b.useControlledProp("openProp",i),b.useControlledProp("triggerIdProp",p),b.useContextCallback("onOpenChange",u),b.useContextCallback("onOpenChangeComplete",h);const w=b.useState("open"),E=!n&&w,k=b.useState("activeTriggerId"),T=b.useState("payload");b.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:s}),We(()=>{w&&n&&b.setOpen(!1,kt(hz))},[w,n,b]),b.useSyncedValue("disabled",n),Lb(b);const{forceUnmount:N,transitionStatus:O}=Ib(E,b),j=b.useState("isInstantPhase"),A=b.useState("instantType"),R=b.useState("lastOpenChangeReason"),_=S.useRef(null);We(()=>{O==="ending"&&R===El||O!=="ending"&&j?(A!=="delay"&&(_.current=A),b.set("instantType","delay")):_.current!==null&&(b.set("instantType",_.current),_.current=null)},[O,j,R,A,b]),We(()=>{E&&k==null&&b.set("payload",void 0)},[b,k,E]);const F=S.useCallback(()=>{b.setOpen(!1,RB(b,kb))},[b]);S.useImperativeHandle(c,()=>({unmount:N,close:F}),[N,F]);const I=b.useState("floatingRootContext"),H=v0(I,{enabled:!n,referencePress:()=>b.select("closeOnClick")}),q=Qz(I,{enabled:!n&&a!=="none",axis:a==="none"?void 0:a}),{getReferenceProps:V,getFloatingProps:$,getTriggerProps:U}=iu([H,q]),P=S.useMemo(()=>V(),[V]),Y=S.useMemo(()=>U(),[U]),G=S.useMemo(()=>$(),[$]);return b.useSyncedValues({activeTriggerProps:P,inactiveTriggerProps:Y,popupProps:G}),f.jsx(eN.Provider,{value:b,children:typeof x=="function"?x({payload:T}):x})});function RB(e,t){const n=kt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}let ll=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=of.startingStyle]="startingStyle",e[e.endingStyle=of.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Rm=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const AB={[Rm.popupOpen]:""},jB={[Rm.popupOpen]:"",[Rm.pressed]:""},OB={[ll.open]:""},MB={[ll.closed]:""},DB={[ll.anchorHidden]:""},$b={open(e){return e?AB:null}},Jy={open(e){return e?jB:null}},Ss={open(e){return e?OB:MB},anchorHidden(e){return e?DB:null}};function ki(e){return kl(e,"base-ui")}const pR=S.createContext(void 0);function _B(){return S.useContext(pR)}let LB=(function(e){return e[e.popupOpen=Rm.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const IB=600,PB=J6(function(t,n){const{className:r,render:i,handle:s,payload:a,disabled:c,delay:u,closeOnClick:h=!0,closeDelay:m,id:p,...y}=t,x=Tf(!0),b=s?.store??x;if(!b)throw new Error(Cn(82));const w=ki(p),E=b.useState("isTriggerActive",w),k=b.useState("isOpenedByTrigger",w),T=b.useState("floatingRootContext"),N=S.useRef(null),O=u??IB,j=m??0,{registerTrigger:A,isMountedByThisTrigger:R}=sR(w,N,b,{payload:a,closeOnClick:h,closeDelay:j}),_=_B(),{delayRef:F,isInstantPhase:I,hasProvider:H}=gz(T,{open:k});b.useSyncedValue("isInstantPhase",I);const q=b.useState("disabled"),V=c??q,$=b.useState("trackCursorAxis"),U=b.useState("disableHoverablePopup"),P=Ub(T,{enabled:!V,mouseOnly:!0,move:!1,handleClose:!U&&$!=="both"?qb():null,restMs(){const B=_?.delay,W=typeof F.current=="object"?F.current.open:void 0;let D=O;return H&&(W!==0?D=u??B??O:D=0),D},delay(){const B=typeof F.current=="object"?F.current.close:void 0;let W=j;return m==null&&H&&(W=B),{close:W}},triggerElementRef:N,isActiveTrigger:E}),Y=lR(T,{enabled:!V}).reference,G={open:k},X=b.useState("triggerProps",R);return Ot("button",t,{state:G,ref:[n,A,N],props:[P,Y,X,{onPointerDown(){b.set("closeOnClick",h)},id:w,[LB.triggerDisabled]:V?"":void 0},y],stateAttributesMapping:$b})}),mR=S.createContext(void 0);function zB(){const e=S.useContext(mR);if(e===void 0)throw new Error(Cn(70));return e}const FB=S.forwardRef(function(t,n){const{children:r,container:i,className:s,render:a,...c}=t,{portalNode:u,portalSubtree:h}=FN({container:i,ref:n,componentProps:t,elementProps:c});return!h&&!u?null:f.jsxs(S.Fragment,{children:[h,u&&Ci.createPortal(r,u)]})}),BB=S.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Tf().useState("mounted")||r?f.jsx(mR.Provider,{value:r,children:f.jsx(FB,{ref:n,...i})}):null}),gR=S.createContext(void 0);function yR(){const e=S.useContext(gR);if(e===void 0)throw new Error(Cn(71));return e}const HB=S.createContext(void 0);function xR(){return S.useContext(HB)?.direction??"ltr"}const UB=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:c,middlewareData:u}=t,{element:h,padding:m=0,offsetParent:p="real"}=hs(e,t)||{};if(h==null)return{};const y=pN(m),x={x:n,y:r},b=Sb(i),w=wb(b),E=await a.getDimensions(h),k=b==="y",T=k?"top":"left",N=k?"bottom":"right",O=k?"clientHeight":"clientWidth",j=s.reference[w]+s.reference[b]-x[b]-s.floating[w],A=x[b]-s.reference[b],R=p==="real"?await a.getOffsetParent?.(h):c.floating;let _=c.floating[O]||s.floating[w];(!_||!await a.isElement?.(R))&&(_=c.floating[O]||s.floating[w]);const F=j/2-A/2,I=_/2-E[w]/2-1,H=Math.min(y[T],I),q=Math.min(y[N],I),V=H,$=_-E[w]-q,U=_/2-E[w]/2+F,P=$y(V,U,$),Y=!u.arrow&&Sa(i)!=null&&U!==P&&s.reference[w]/2-(U<V?H:q)-E[w]/2<0,G=Y?U<V?U-V:U-$:0;return{[b]:x[b]+G,data:{[b]:P,centerOffset:U-P-G,...Y&&{alignmentOffset:G}},reset:Y}}}),qB=(e,t)=>({...UB(e),options:[e,t]}),VB={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,s=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await FF().fn(e)).data?.referenceHidden||s}}}},rm={sideX:"left",sideY:"top"},bR={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:s,strategy:a,placement:c}=e,u=qn(i),h=u.getComputedStyle(i);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:n,data:rm};const p=await s.getOffsetParent?.(i);let y={width:0,height:0};if(a==="fixed"&&u?.visualViewport)y={width:u.visualViewport.width,height:u.visualViewport.height};else if(p===u){const T=Zt(i);y={width:T.documentElement.clientWidth,height:T.documentElement.clientHeight}}else await s.isElement?.(p)&&(y=await s.getDimensions(p));const x=ri(c);let b=t,w=n;x==="left"&&(b=y.width-(t+r.width)),x==="top"&&(w=y.height-(n+r.height));const E=x==="left"?"right":rm.sideX,k=x==="top"?"bottom":rm.sideY;return{x:b,y:w,data:{sideX:E,sideY:k}}}};function vR(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 WE(e,t,n){const{rects:r,placement:i}=e;return{side:vR(t,ri(i),n),align:Sa(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Yb(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,collisionBoundary:c,collisionPadding:u=5,sticky:h=!1,arrowPadding:m=5,disableAnchorTracking:p=!1,keepMounted:y=!1,floatingRootContext:x,mounted:b,collisionAvoidance:w,shiftCrossAxis:E=!1,nodeId:k,adaptiveOrigin:T,lazyFlip:N=!1,externalTree:O}=e,[j,A]=S.useState(null);!b&&j!==null&&A(null);const R=w.side||"flip",_=w.align||"flip",F=w.fallbackAxisSide||"end",I=typeof t=="function"?t:void 0,H=tt(I),q=I?H:t,V=yr(t),U=xR()==="rtl",P=j||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":U?"left":"right","inline-start":U?"right":"left"}[r],Y=s==="center"?P:`${P}-${s}`;let G=u;const X=1,L=r==="bottom"?X:0,B=r==="top"?X:0,W=r==="right"?X:0,D=r==="left"?X:0;typeof G=="number"?G={top:G+L,right:G+D,bottom:G+B,left:G+W}:G&&(G={top:(G.top||0)+L,right:(G.right||0)+D,bottom:(G.bottom||0)+B,left:(G.left||0)+W});const Q={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:G},ee=S.useRef(null),J=yr(i),he=yr(a),Re=[_F(Qe=>{const Ct=WE(Qe,r,U),$e=typeof J.current=="function"?J.current(Ct):J.current,ge=typeof he.current=="function"?he.current(Ct):he.current;return{mainAxis:$e,crossAxis:ge,alignmentAxis:ge}},[typeof i!="function"?i:0,typeof a!="function"?a:0,U,r])],je=_==="none"&&R!=="shift",Fe=!je&&(h||E||R==="shift"),_e=R==="none"?null:PF({...Q,padding:{top:G.top+X,right:G.right+X,bottom:G.bottom+X,left:G.left+X},mainAxis:!E&&R==="flip",crossAxis:_==="flip"?"alignment":!1,fallbackAxisSideDirection:F}),De=je?null:LF(Qe=>{const Ct=Zt(Qe.elements.floating).documentElement;return{...Q,rootBoundary:E?{x:0,y:0,width:Ct.clientWidth,height:Ct.clientHeight}:void 0,mainAxis:_!=="none",crossAxis:Fe,limiter:h||E?void 0:IF($e=>{if(!ee.current)return{};const{width:ge,height:Oe}=ee.current.getBoundingClientRect(),Ye=Yi(ri($e.placement)),Rt=Ye==="y"?ge:Oe,Ie=Ye==="y"?G.left+G.right:G.top+G.bottom;return{offset:Rt/2+Ie/2}})}},[Q,h,E,G,_]);R==="shift"||_==="shift"||s==="center"?Re.push(De,_e):Re.push(_e,De),Re.push(zF({...Q,apply({elements:{floating:Qe},availableWidth:Ct,availableHeight:$e,rects:ge}){const Oe=Qe.style;Oe.setProperty("--available-width",`${Ct}px`),Oe.setProperty("--available-height",`${$e}px`);const Ye=window.devicePixelRatio||1,{x:Rt,y:Ie,width:Pt,height:sn}=ge.reference,nn=(Math.round((Rt+Pt)*Ye)-Math.round(Rt*Ye))/Ye,vn=(Math.round((Ie+sn)*Ye)-Math.round(Ie*Ye))/Ye;Oe.setProperty("--anchor-width",`${nn}px`),Oe.setProperty("--anchor-height",`${vn}px`)}}),qB(()=>({element:ee.current||document.createElement("div"),padding:m,offsetParent:"floating"}),[m]),{name:"transformOrigin",fn(Qe){const{elements:Ct,middlewareData:$e,placement:ge,rects:Oe,y:Ye}=Qe,Rt=ri(ge),Ie=Yi(Rt),Pt=ee.current,sn=$e.arrow?.x||0,nn=$e.arrow?.y||0,vn=Pt?.clientWidth||0,Ut=Pt?.clientHeight||0,yt=sn+vn/2,zt=nn+Ut/2,K=Math.abs($e.shift?.y||0),te=Oe.reference.height/2,ae=typeof i=="function"?i(WE(Qe,r,U)):i,Te=K>ae,He={top:`${yt}px calc(100% + ${ae}px)`,bottom:`${yt}px ${-ae}px`,left:`calc(100% + ${ae}px) ${zt}px`,right:`${-ae}px ${zt}px`}[Rt],st=`${yt}px ${Oe.reference.y+te-Ye}px`;return Ct.floating.style.setProperty("--transform-origin",Fe&&Ie==="y"&&Te?st:He),{}}},VB,T),We(()=>{!b&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,x]);const xe=S.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:Ge,elements:we,x:Ae,y:pe,middlewareData:be,update:ne,placement:ye,context:Ce,isPositioned:Ve,floatingStyles:ct}=pB({rootContext:x,placement:Y,middleware:Re,strategy:n,whileElementsMounted:y?void 0:(...Qe)=>PE(...Qe,xe),nodeId:k,externalTree:O}),{sideX:oe,sideY:Ee}=be.adaptiveOrigin||rm,Le=Ve?n:"fixed",Me=S.useMemo(()=>{const Qe=T?{position:Le,[oe]:Ae,[Ee]:pe}:{position:Le,...ct};return Ve||(Qe.opacity=0),Qe},[T,Le,oe,Ae,Ee,pe,ct,Ve]),Ue=S.useRef(null);We(()=>{if(!b)return;const Qe=V.current,Ct=typeof Qe=="function"?Qe():Qe,ge=(GE(Ct)?Ct.current:Ct)||null||null;ge!==Ue.current&&(Ge.setPositionReference(ge),Ue.current=ge)},[b,Ge,q,V]),S.useEffect(()=>{if(!b)return;const Qe=V.current;typeof Qe!="function"&&GE(Qe)&&Qe.current!==Ue.current&&(Ge.setPositionReference(Qe.current),Ue.current=Qe.current)},[b,Ge,q,V]),S.useEffect(()=>{if(y&&b&&we.domReference&&we.floating)return PE(we.domReference,we.floating,ne,xe)},[y,b,we,ne,xe]);const dt=ri(ye),xt=vR(r,dt,U),Je=Sa(ye)||"center",Ke=!!be.hide?.referenceHidden;We(()=>{N&&b&&Ve&&A(dt)},[N,b,Ve,dt]);const bt=S.useMemo(()=>({position:"absolute",top:be.arrow?.y,left:be.arrow?.x}),[be.arrow]),nt=be.arrow?.centerOffset!==0;return S.useMemo(()=>({positionerStyles:Me,arrowStyles:bt,arrowRef:ee,arrowUncentered:nt,side:xt,align:Je,physicalSide:dt,anchorHidden:Ke,refs:Ge,context:Ce,isPositioned:Ve,update:ne}),[Me,bt,ee,nt,xt,Je,dt,Ke,Ge,Ce,Ve,ne])}function GE(e){return e!=null&&"current"in e}function ou(e){return e==="starting"?cz:Bn}const $B=S.forwardRef(function(t,n){const{render:r,className:i,anchor:s,positionMethod:a="absolute",side:c="top",align:u="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:p="clipping-ancestors",collisionPadding:y=5,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:w=!1,collisionAvoidance:E=NN,...k}=t,T=Tf(),N=zB(),O=T.useState("open"),j=T.useState("mounted"),A=T.useState("trackCursorAxis"),R=T.useState("disableHoverablePopup"),_=T.useState("floatingRootContext"),F=T.useState("instantType"),I=T.useState("transitionStatus"),H=T.useState("hasViewport"),q=Yb({anchor:s,positionMethod:a,floatingRootContext:_,mounted:j,side:c,sideOffset:h,align:u,alignOffset:m,collisionBoundary:p,collisionPadding:y,sticky:b,arrowPadding:x,disableAnchorTracking:w,keepMounted:N,collisionAvoidance:E,adaptiveOrigin:H?bR:void 0}),V=S.useMemo(()=>{const Y={};return(!O||A==="both"||R)&&(Y.pointerEvents="none"),{role:"presentation",hidden:!j,style:{...q.positionerStyles,...Y}}},[O,A,R,j,q.positionerStyles]),$=S.useMemo(()=>({open:O,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:A!=="none"?"tracking-cursor":F}),[O,q.side,q.align,q.anchorHidden,A,F]),U=S.useMemo(()=>({...$,arrowRef:q.arrowRef,arrowStyles:q.arrowStyles,arrowUncentered:q.arrowUncentered}),[$,q.arrowRef,q.arrowStyles,q.arrowUncentered]),P=Ot("div",t,{state:$,props:[V,ou(I),k],ref:[n,T.useStateSetter("positionerElement")],stateAttributesMapping:Ss});return f.jsx(gR.Provider,{value:U,children:P})}),YB={...Ss,...ws},WB=S.forwardRef(function(t,n){const{className:r,render:i,...s}=t,a=Tf(),{side:c,align:u}=yR(),h=a.useState("open"),m=a.useState("instantType"),p=a.useState("transitionStatus"),y=a.useState("popupProps"),x=a.useState("floatingRootContext");Xi({open:h,ref:a.context.popupRef,onComplete(){h&&a.context.onOpenChangeComplete?.(!0)}});const b=a.useState("disabled"),w=a.useState("closeDelay");return uR(x,{enabled:!b,closeDelay:w}),Ot("div",t,{state:{open:h,side:c,align:u,instant:m,transitionStatus:p},ref:[n,a.context.popupRef,a.useStateSetter("popupElement")],props:[y,ou(p),s],stateAttributesMapping:YB})}),GB=S.forwardRef(function(t,n){const{className:r,render:i,...s}=t,c=Tf().useState("instantType"),{open:u,arrowRef:h,side:m,align:p,arrowUncentered:y,arrowStyles:x}=yR();return Ot("div",t,{state:{open:u,side:m,align:p,uncentered:y,instant:c},ref:[n,h],props:[{style:x,"aria-hidden":!0},s],stateAttributesMapping:Ss})}),KB=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,s=S.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),a=S.useMemo(()=>({open:n,close:r}),[n,r]);return f.jsx(pR.Provider,{value:s,children:f.jsx(mz,{delay:a,timeoutMs:i,children:t.children})})};function Wb(e){return Nb(19)?e:e?"true":void 0}function wR(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=wR(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function SR(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=wR(e))&&(r&&(r+=" "),r+=t);return r}const QB=(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},XB=(e,t)=>({classGroupId:e,validator:t}),CR=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Am="-",KE=[],ZB="arbitrary..",JB=e=>{const t=tH(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return eH(a);const c=a.split(Am),u=c[0]===""&&c.length>1?1:0;return ER(c,u,t)},getConflictingClassGroupIds:(a,c)=>{if(c){const u=r[a],h=n[a];return u?h?QB(h,u):u:h||KE}return n[a]||KE}}},ER=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const h=ER(e,t+1,s);if(h)return h}const a=n.validators;if(a===null)return;const c=t===0?e.join(Am):e.slice(t).join(Am),u=a.length;for(let h=0;h<u;h++){const m=a[h];if(m.validator(c))return m.classGroupId}},eH=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?ZB+r:void 0})(),tH=e=>{const{theme:t,classGroups:n}=e;return nH(n,t)},nH=(e,t)=>{const n=CR();for(const r in e){const i=e[r];Gb(i,n,r,t)}return n},Gb=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];rH(a,t,n,r)}},rH=(e,t,n,r)=>{if(typeof e=="string"){iH(e,t,n);return}if(typeof e=="function"){oH(e,t,n,r);return}sH(e,t,n,r)},iH=(e,t,n)=>{const r=e===""?t:kR(t,e);r.classGroupId=n},oH=(e,t,n,r)=>{if(aH(e)){Gb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(XB(n,e))},sH=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[c,u]=i[a];Gb(u,kR(t,c),n,r)}},kR=(e,t)=>{let n=e;const r=t.split(Am),i=r.length;for(let s=0;s<i;s++){const a=r[s];let c=n.nextPart.get(a);c||(c=CR(),n.nextPart.set(a,c)),n=c}return n},aH=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,lH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},ex="!",QE=":",cH=[],XE=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),uH=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,c=0,u=0,h;const m=i.length;for(let w=0;w<m;w++){const E=i[w];if(a===0&&c===0){if(E===QE){s.push(i.slice(u,w)),u=w+1;continue}if(E==="/"){h=w;continue}}E==="["?a++:E==="]"?a--:E==="("?c++:E===")"&&c--}const p=s.length===0?i:i.slice(u);let y=p,x=!1;p.endsWith(ex)?(y=p.slice(0,-1),x=!0):p.startsWith(ex)&&(y=p.slice(1),x=!0);const b=h&&h>u?h-u:void 0;return XE(s,x,y,b)};if(t){const i=t+QE,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):XE(cH,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},dH=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],c=a[0]==="[",u=t.has(a);c||u?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},fH=e=>({cache:lH(e.cacheSize),parseClassName:uH(e),sortModifiers:dH(e),...JB(e)}),hH=/\s+/,pH=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],c=e.trim().split(hH);let u="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:p,modifiers:y,hasImportantModifier:x,baseClassName:b,maybePostfixModifierPosition:w}=n(m);if(p){u=m+(u.length>0?" "+u:u);continue}let E=!!w,k=r(E?b.substring(0,w):b);if(!k){if(!E){u=m+(u.length>0?" "+u:u);continue}if(k=r(b),!k){u=m+(u.length>0?" "+u:u);continue}E=!1}const T=y.length===0?"":y.length===1?y[0]:s(y).join(":"),N=x?T+ex:T,O=N+k;if(a.indexOf(O)>-1)continue;a.push(O);const j=i(k,E);for(let A=0;A<j.length;++A){const R=j[A];a.push(N+R)}u=m+(u.length>0?" "+u:u)}return u},mH=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=TR(n))&&(i&&(i+=" "),i+=r);return i},TR=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=TR(e[r]))&&(n&&(n+=" "),n+=t);return n},gH=(e,...t)=>{let n,r,i,s;const a=u=>{const h=t.reduce((m,p)=>p(m),e());return n=fH(h),r=n.cache.get,i=n.cache.set,s=c,c(u)},c=u=>{const h=r(u);if(h)return h;const m=pH(u,n);return i(u,m),m};return s=a,(...u)=>s(mH(...u))},yH=[],lr=e=>{const t=n=>n[e]||yH;return t.isThemeGetter=!0,t},NR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,RR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xH=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,bH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vH=/\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$/,wH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xs=e=>xH.test(e),Lt=e=>!!e&&!Number.isNaN(Number(e)),Zs=e=>!!e&&Number.isInteger(Number(e)),B2=e=>e.endsWith("%")&&Lt(e.slice(0,-1)),ts=e=>bH.test(e),AR=()=>!0,EH=e=>vH.test(e)&&!wH.test(e),Kb=()=>!1,kH=e=>SH.test(e),TH=e=>CH.test(e),NH=e=>!it(e)&&!ot(e),RH=e=>ka(e,MR,Kb),it=e=>NR.test(e),tl=e=>ka(e,DR,EH),ZE=e=>ka(e,IH,Lt),AH=e=>ka(e,LR,AR),jH=e=>ka(e,_R,Kb),JE=e=>ka(e,jR,Kb),OH=e=>ka(e,OR,TH),Np=e=>ka(e,IR,kH),ot=e=>RR.test(e),dd=e=>Tl(e,DR),MH=e=>Tl(e,_R),ek=e=>Tl(e,jR),DH=e=>Tl(e,MR),_H=e=>Tl(e,OR),Rp=e=>Tl(e,IR,!0),LH=e=>Tl(e,LR,!0),ka=(e,t,n)=>{const r=NR.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Tl=(e,t,n=!1)=>{const r=RR.exec(e);return r?r[1]?t(r[1]):n:!1},jR=e=>e==="position"||e==="percentage",OR=e=>e==="image"||e==="url",MR=e=>e==="length"||e==="size"||e==="bg-size",DR=e=>e==="length",IH=e=>e==="number",_R=e=>e==="family-name",LR=e=>e==="number"||e==="weight",IR=e=>e==="shadow",PH=()=>{const e=lr("color"),t=lr("font"),n=lr("text"),r=lr("font-weight"),i=lr("tracking"),s=lr("leading"),a=lr("breakpoint"),c=lr("container"),u=lr("spacing"),h=lr("radius"),m=lr("shadow"),p=lr("inset-shadow"),y=lr("text-shadow"),x=lr("drop-shadow"),b=lr("blur"),w=lr("perspective"),E=lr("aspect"),k=lr("ease"),T=lr("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...O(),ot,it],A=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],_=()=>[ot,it,u],F=()=>[Xs,"full","auto",..._()],I=()=>[Zs,"none","subgrid",ot,it],H=()=>["auto",{span:["full",Zs,ot,it]},Zs,ot,it],q=()=>[Zs,"auto",ot,it],V=()=>["auto","min","max","fr",ot,it],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",..._()],Y=()=>[Xs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],G=()=>[Xs,"screen","full","dvw","lvw","svw","min","max","fit",..._()],X=()=>[Xs,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],L=()=>[e,ot,it],B=()=>[...O(),ek,JE,{position:[ot,it]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",DH,RH,{size:[ot,it]}],Q=()=>[B2,dd,tl],ee=()=>["","none","full",h,ot,it],J=()=>["",Lt,dd,tl],he=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>[Lt,B2,ek,JE],Re=()=>["","none",b,ot,it],je=()=>["none",Lt,ot,it],Fe=()=>["none",Lt,ot,it],_e=()=>[Lt,ot,it],De=()=>[Xs,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ts],breakpoint:[ts],color:[AR],container:[ts],"drop-shadow":[ts],ease:["in","out","in-out"],font:[NH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ts],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ts],shadow:[ts],spacing:["px",Lt],text:[ts],"text-shadow":[ts],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xs,it,ot,E]}],container:["container"],columns:[{columns:[Lt,it,ot,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:j()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[Zs,"auto",ot,it]}],basis:[{basis:[Xs,"full","auto",c,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Lt,Xs,"auto","initial","none",it]}],grow:[{grow:["",Lt,ot,it]}],shrink:[{shrink:["",Lt,ot,it]}],order:[{order:[Zs,"first","last","none",ot,it]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...X()]}],"min-block-size":[{"min-block":["auto",...X()]}],"max-block-size":[{"max-block":["none",...X()]}],w:[{w:[c,"screen",...Y()]}],"min-w":[{"min-w":[c,"screen","none",...Y()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,dd,tl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,LH,AH]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",B2,it]}],"font-family":[{font:[MH,jH,t]}],"font-features":[{"font-features":[it]}],"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,ot,it]}],"line-clamp":[{"line-clamp":[Lt,"none",ot,ZE]}],leading:[{leading:[s,..._()]}],"list-image":[{"list-image":["none",ot,it]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ot,it]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[Lt,"from-font","auto",ot,tl]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Lt,"auto",ot,it]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ot,it]}],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",ot,it]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zs,ot,it],radial:["",ot,it],conic:[Zs,ot,it]},_H,OH]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Lt,ot,it]}],"outline-w":[{outline:["",Lt,dd,tl]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",m,Rp,Np]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",p,Rp,Np]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Lt,tl]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",y,Rp,Np]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Lt,ot,it]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":[Lt]}],"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":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"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":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"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":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"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":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"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":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"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":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"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":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[ot,it]}],"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":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[Lt]}],"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":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ot,it]}],filter:[{filter:["","none",ot,it]}],blur:[{blur:Re()}],brightness:[{brightness:[Lt,ot,it]}],contrast:[{contrast:[Lt,ot,it]}],"drop-shadow":[{"drop-shadow":["","none",x,Rp,Np]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Lt,ot,it]}],"hue-rotate":[{"hue-rotate":[Lt,ot,it]}],invert:[{invert:["",Lt,ot,it]}],saturate:[{saturate:[Lt,ot,it]}],sepia:[{sepia:["",Lt,ot,it]}],"backdrop-filter":[{"backdrop-filter":["","none",ot,it]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[Lt,ot,it]}],"backdrop-contrast":[{"backdrop-contrast":[Lt,ot,it]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Lt,ot,it]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Lt,ot,it]}],"backdrop-invert":[{"backdrop-invert":["",Lt,ot,it]}],"backdrop-opacity":[{"backdrop-opacity":[Lt,ot,it]}],"backdrop-saturate":[{"backdrop-saturate":[Lt,ot,it]}],"backdrop-sepia":[{"backdrop-sepia":["",Lt,ot,it]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ot,it]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Lt,"initial",ot,it]}],ease:[{ease:["linear","initial",k,ot,it]}],delay:[{delay:[Lt,ot,it]}],animate:[{animate:["none",T,ot,it]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ot,it]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:Fe()}],"scale-x":[{"scale-x":Fe()}],"scale-y":[{"scale-y":Fe()}],"scale-z":[{"scale-z":Fe()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[ot,it,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:De()}],"translate-x":[{"translate-x":De()}],"translate-y":[{"translate-y":De()}],"translate-z":[{"translate-z":De()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",ot,it]}],"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":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",ot,it]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Lt,dd,tl,ZE]}],stroke:[{stroke:["none",...L()]}],"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"]}},zH=gH(PH);function se(...e){return zH(SR(e))}function Qb({delay:e=0,...t}){return f.jsx(KB,{"data-slot":"tooltip-provider",delay:e,...t})}function ms({...e}){return f.jsx(NB,{"data-slot":"tooltip",...e})}function gs({...e}){return f.jsx(PB,{"data-slot":"tooltip-trigger",...e})}function $i({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:i=0,children:s,...a}){return f.jsx(BB,{children:f.jsx($B,{align:r,alignOffset:i,side:t,sideOffset:n,className:"isolate z-50",children:f.jsxs(WB,{"data-slot":"tooltip-content",className:se("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),...a,children:[s,f.jsx(GB,{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 su=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(){}},FH={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},BH=class{#e=FH;#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)}},cl=new BH;function HH(e){setTimeout(e,0)}var yl=typeof window>"u"||"Deno"in globalThis;function zr(){}function UH(e,t){return typeof e=="function"?e(t):e}function tx(e){return typeof e=="number"&&e>=0&&e!==1/0}function PR(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pa(e,t){return typeof e=="function"?e(t):e}function Ui(e,t){return typeof e=="function"?e(t):e}function tk(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:c}=e;if(a){if(r){if(t.queryHash!==Xb(a,t.options))return!1}else if(!sf(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||s&&!s(t))}function nk(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(xl(t.options.mutationKey)!==xl(s))return!1}else if(!sf(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Xb(e,t){return(t?.queryKeyHashFn||xl)(e)}function xl(e){return JSON.stringify(e,(t,n)=>nx(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function sf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>sf(e[n],t[n])):!1}var qH=Object.prototype.hasOwnProperty;function zR(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=rk(e)&&rk(t);if(!r&&!(nx(e)&&nx(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),c=a.length,u=r?new Array(c):{};let h=0;for(let m=0;m<c;m++){const p=r?m:a[m],y=e[p],x=t[p];if(y===x){u[p]=y,(r?m<s:qH.call(e,p))&&h++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){u[p]=x;continue}const b=zR(y,x,n+1);u[p]=b,b===y&&h++}return s===c&&h===s?e:u}function jm(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 rk(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nx(e){if(!ik(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ik(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ik(e){return Object.prototype.toString.call(e)==="[object Object]"}function VH(e){return new Promise(t=>{cl.setTimeout(t,e)})}function rx(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zR(e,t):t}function $H(e){return e}function YH(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function WH(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Zb=Symbol();function FR(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Zb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Jb(e,t){return typeof e=="function"?e(...t):!!e}function GH(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 KH=class extends su{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!yl&&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"}},ev=new KH;function ix(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});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 QH=HH;function XH(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=QH;const s=c=>{t?e.push(c):i(()=>{n(c)})},a=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||a()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var cr=XH(),ZH=class extends su{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!yl&&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}},Om=new ZH;function JH(e){return Math.min(1e3*2**e,3e4)}function BR(e){return(e??"online")==="online"?Om.isOnline():!0}var ox=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function HR(e){let t=!1,n=0,r;const i=ix(),s=()=>i.status!=="pending",a=w=>{if(!s()){const E=new ox(w);y(E),e.onCancel?.(E)}},c=()=>{t=!0},u=()=>{t=!1},h=()=>ev.isFocused()&&(e.networkMode==="always"||Om.isOnline())&&e.canRun(),m=()=>BR(e.networkMode)&&e.canRun(),p=w=>{s()||(r?.(),i.resolve(w))},y=w=>{s()||(r?.(),i.reject(w))},x=()=>new Promise(w=>{r=E=>{(s()||h())&&w(E)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),b=()=>{if(s())return;let w;const E=n===0?e.initialPromise:void 0;try{w=E??e.fn()}catch(k){w=Promise.reject(k)}Promise.resolve(w).then(p).catch(k=>{if(s())return;const T=e.retry??(yl?0:3),N=e.retryDelay??JH,O=typeof N=="function"?N(n,k):N,j=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,k);if(t||!j){y(k);return}n++,e.onFail?.(n,k),VH(O).then(()=>h()?void 0:x()).then(()=>{t?y(k):b()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:u,canStart:m,start:()=>(m()?b():x().then(b),i)}}var UR=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tx(this.gcTime)&&(this.#e=cl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(cl.clearTimeout(this.#e),this.#e=void 0)}},eU=class extends UR{#e;#t;#n;#i;#r;#s;#a;constructor(e){super(),this.#a=!1,this.#s=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=sk(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.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=sk(this.options);t.data!==void 0&&(this.setState(ok(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=rx(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(zr).catch(zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ui(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zb||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:!PR(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.#a?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(u=>u.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const c=FR(this.options,t),h=(()=>{const m={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#a=!1,this.options.persister?this.options.persister(c,h,this):c(h)},a=(()=>{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(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#o({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=HR({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof ox&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,u)=>{this.#o({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.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 ox){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,...qR(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...ok(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),cr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function qR(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:BR(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ok(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function sk(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 VR=class extends su{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#a=ix(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#a;#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),ak(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sx(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sx(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 Ui(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&&!jm(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&lk(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Ui(this.options.enabled,this.#t)!==Ui(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||Ui(this.options.enabled,this.#t)!==Ui(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 nU(this,n)&&(this.#i=n,this.#s=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.#a.status==="pending"&&this.#a.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(zr)),t}#g(){this.#v();const e=pa(this.options.staleTime,this.#t);if(yl||this.#i.isStale||!tx(e))return;const n=PR(this.#i.dataUpdatedAt,e)+1;this.#c=cl.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,!(yl||Ui(this.options.enabled,this.#t)===!1||!tx(this.#l)||this.#l===0)&&(this.#u=cl.setInterval(()=>{(this.options.refetchIntervalInBackground||ev.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#x(this.#y())}#v(){this.#c&&(cl.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(cl.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,s=this.#r,a=this.#s,u=e!==n?e.state:this.#n,{state:h}=e;let m={...h},p=!1,y;if(t._optimisticResults){const _=this.hasListeners(),F=!_&&ak(e,t),I=_&&lk(e,n,t,r);(F||I)&&(m={...m,...qR(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:x,errorUpdatedAt:b,status:w}=m;y=m.data;let E=!1;if(t.placeholderData!==void 0&&y===void 0&&w==="pending"){let _;i?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(_=i.data,E=!0):_=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,_!==void 0&&(w="success",y=rx(i?.data,_,t),p=!0)}if(t.select&&y!==void 0&&!E)if(i&&y===s?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=rx(i?.data,y,t),this.#f=y,this.#o=null}catch(_){this.#o=_}this.#o&&(x=this.#o,y=this.#f,b=Date.now(),w="error");const k=m.fetchStatus==="fetching",T=w==="pending",N=w==="error",O=T&&k,j=y!==void 0,R={status:w,fetchStatus:m.fetchStatus,isPending:T,isSuccess:w==="success",isError:N,isInitialLoading:O,isLoading:O,data:y,dataUpdatedAt:m.dataUpdatedAt,error:x,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:k,isRefetching:k&&!T,isLoadingError:N&&!j,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:N&&j,isStale:tv(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Ui(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const _=R.data!==void 0,F=R.status==="error"&&!_,I=V=>{F?V.reject(R.error):_&&V.resolve(R.data)},H=()=>{const V=this.#a=R.promise=ix();I(V)},q=this.#a;switch(q.status){case"pending":e.queryHash===n.queryHash&&I(q);break;case"fulfilled":(F||R.data!==q.value)&&H();break;case"rejected":(!F||R.error!==q.reason)&&H();break}}return R}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),jm(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 s=new Set(i??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(a=>{const c=a;return this.#i[c]!==e[c]&&s.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){cr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function tU(e,t){return Ui(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ak(e,t){return tU(e,t)||e.state.data!==void 0&&sx(e,t,t.refetchOnMount)}function sx(e,t,n){if(Ui(t.enabled,e)!==!1&&pa(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&tv(e,t)}return!1}function lk(e,t,n,r){return(e!==t||Ui(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&tv(e,n)}function tv(e,t){return Ui(t.enabled,e)!==!1&&e.isStaleByTime(pa(t.staleTime,e))}function nU(e,t){return!jm(e.getCurrentResult(),t)}function Mm(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const h=async()=>{let m=!1;const p=b=>{GH(b,()=>t.signal,()=>m=!0)},y=FR(t.options,t.fetchOptions),x=async(b,w,E)=>{if(m)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const T=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:w,direction:E?"backward":"forward",meta:t.options.meta};return p(A),A})(),N=await y(T),{maxPages:O}=t.options,j=E?WH:YH;return{pages:j(b.pages,N,O),pageParams:j(b.pageParams,w,O)}};if(i&&s.length){const b=i==="backward",w=b?$R:ax,E={pages:s,pageParams:a},k=w(r,E);c=await x(E,k,b)}else{const b=e??s.length;do{const w=u===0?a[0]??r.initialPageParam:ax(r,c);if(u>0&&w==null)break;c=await x(c,w),u++}while(u<b)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function ax(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 $R(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function rU(e,t){return t?ax(e,t)!=null:!1}function iU(e,t){return!t||!e.getPreviousPageParam?!1:$R(e,t)!=null}var oU=class extends VR{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:Mm()})}getOptimisticResult(e){return e.behavior=Mm(),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:s,isError:a,isRefetchError:c}=r,u=n.fetchMeta?.fetchMore?.direction,h=a&&u==="forward",m=i&&u==="forward",p=a&&u==="backward",y=i&&u==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:rU(t,n.data),hasPreviousPage:iU(t,n.data),isFetchNextPageError:h,isFetchingNextPage:m,isFetchPreviousPageError:p,isFetchingPreviousPage:y,isRefetchError:c&&!h&&!p,isRefetching:s&&!m&&!y}}},sU=class extends UR{#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||YR(),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=HR({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,a)=>{this.#r({type:"failed",failureCount:s,error:a})},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 a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:i})}const s=await this.#i.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:s}),s}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),cr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function YR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var aU=class extends su{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 sU({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=Ap(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=Ap(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=Ap(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=Ap(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){cr.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=>nk(t,n))}findAll(e={}){return this.getAll().filter(t=>nk(e,t))}notify(e){cr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return cr.batch(()=>Promise.all(e.map(t=>t.continue().catch(zr))))}};function Ap(e){return e.options.scope?.id}var lU=class extends su{#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),jm(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&xl(n.mutationKey)!==xl(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.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}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??YR();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}}#s(t){cr.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(s){Promise.reject(s)}try{this.#i.onSettled?.(t.data,null,n,r,i)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,r,i)}catch(s){Promise.reject(s)}try{this.#i.onSettled?.(void 0,t.error,n,r,i)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},cU=class extends su{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Xb(r,t);let s=this.get(i);return s||(s=new eU({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}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(){cr.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=>tk(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>tk(e,n)):t}notify(e){cr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){cr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){cr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},uU=class{#e;#t;#n;#i;#r;#s;#a;#o;constructor(e={}){this.#e=e.queryCache||new cU,this.#t=e.mutationCache||new aU,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=ev.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Om.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=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}),s=this.#e.get(r.queryHash)?.state.data,a=UH(t,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return cr.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;cr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return cr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=cr.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(zr).catch(zr)}invalidateQueries(e,t={}){return cr.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=cr.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(zr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(zr)}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(zr).catch(zr)}fetchInfiniteQuery(e){return e.behavior=Mm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(zr).catch(zr)}ensureInfiniteQueryData(e){return e.behavior=Mm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Om.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(xl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{sf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(xl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{sf(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=Xb(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===Zb&&(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()}},WR=S.createContext(void 0),tn=e=>{const t=S.useContext(WR);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},dU=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(WR.Provider,{value:e,children:t})),GR=S.createContext(!1),fU=()=>S.useContext(GR);GR.Provider;function hU(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pU=S.createContext(hU()),mU=()=>S.useContext(pU),gU=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Jb(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},yU=e=>{S.useEffect(()=>{e.clearReset()},[e])},xU=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Jb(n,[e.error,r])),bU=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))}},vU=(e,t)=>e.isLoading&&e.isFetching&&!t,wU=(e,t)=>e?.suspense&&t.isPending,ck=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function KR(e,t,n){const r=fU(),i=mU(),s=tn(),a=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const c=s.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",bU(a),gU(a,i,c),yU(i);const u=!s.getQueryCache().get(a.queryHash),[h]=S.useState(()=>new t(s,a)),m=h.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(y=>{const x=p?h.subscribe(cr.batchCalls(y)):zr;return h.updateResult(),x},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setOptions(a)},[a,h]),wU(a,m))throw ck(a,h,i);if(xU({result:m,errorResetBoundary:i,throwOnError:a.throwOnError,query:c,suspense:a.suspense}))throw m.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,m),a.experimental_prefetchInRender&&!yl&&vU(m,r)&&(u?ck(a,h,i):c?.promise)?.catch(zr).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?m:h.trackResult(m)}function Mn(e,t){return KR(e,VR)}function dn(e,t){const n=tn(),[r]=S.useState(()=>new lU(n,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);const i=S.useSyncExternalStore(S.useCallback(a=>r.subscribe(cr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=S.useCallback((a,c)=>{r.mutate(a,c).catch(zr)},[r]);if(i.error&&Jb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function SU(e,t){return KR(e,oU)}const CU={queries:{gcTime:0,refetchOnWindowFocus:!1,retry:!1,staleTime:0}};function QR(e){return Ot(e.defaultTagName??"div",e,e)}const uk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dk=SR,E0=(e,t)=>n=>{var r;if(t?.variants==null)return dk(e,n?.class,n?.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(h=>{const m=n?.[h],p=s?.[h];if(m===null)return null;const y=uk(m)||uk(p);return i[h][y]}),c=n&&Object.entries(n).reduce((h,m)=>{let[p,y]=m;return y===void 0||(h[p]=y),h},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,m)=>{let{class:p,className:y,...x}=m;return Object.entries(x).every(b=>{let[w,E]=b;return Array.isArray(E)?E.includes({...s,...c}[w]):{...s,...c}[w]===E})?[...h,p,y]:h},[]);return dk(e,a,u,n?.class,n?.className)},EU=E0("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 ii({className:e,variant:t="default",render:n,...r}){return QR({defaultTagName:"span",props:Oo({className:se(EU({variant:t}),e)},r),render:n,state:{slot:"badge",variant:t}})}const nv="/assets/logo-DJvq-PY2.svg",fk=e=>{let t;const n=new Set,r=(h,m)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const y=t;t=m??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(x=>x(t,y))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>u,subscribe:h=>(n.add(h),()=>n.delete(h))},u=t=e(r,i,c);return c},kU=(e=>e?fk(e):fk),TU=e=>e;function NU(e,t=TU){const n=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>t(e.getState()),[e,t]),le.useCallback(()=>t(e.getInitialState()),[e,t]));return le.useDebugValue(n),n}const hk=e=>{const t=kU(e),n=r=>NU(t,r);return Object.assign(n,t),n},Nl=(e=>e?hk(e):hk);function k0(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var s;const a=u=>u===null?null:JSON.parse(u,void 0),c=(s=n.getItem(i))!=null?s:null;return c instanceof Promise?c.then(a):a(c)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const lx=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return lx(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return lx(r)(n)}}}},RU=(e,t)=>(n,r,i)=>{let s={storage:k0(()=>window.localStorage),partialize:E=>E,version:0,merge:(E,k)=>({...k,...E}),...t},a=!1,c=0;const u=new Set,h=new Set;let m=s.storage;if(!m)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...E)},r,i);const p=()=>{const E=s.partialize({...r()});return m.setItem(s.name,{state:E,version:s.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 b;const w=()=>{var E,k;if(!m)return;const T=++c;a=!1,u.forEach(O=>{var j;return O((j=r())!=null?j:x)});const N=((k=s.onRehydrateStorage)==null?void 0:k.call(s,(E=r())!=null?E:x))||void 0;return lx(m.getItem.bind(m))(s.name).then(O=>{if(O)if(typeof O.version=="number"&&O.version!==s.version){if(s.migrate){const j=s.migrate(O.state,O.version);return j instanceof Promise?j.then(A=>[!0,A]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,O.state];return[!1,void 0]}).then(O=>{var j;if(T!==c)return;const[A,R]=O;if(b=s.merge(R,(j=r())!=null?j:x),n(b,!0),A)return p()}).then(()=>{T===c&&(N?.(b,void 0),b=r(),a=!0,h.forEach(O=>O(b)))}).catch(O=>{T===c&&N?.(void 0,O)})};return i.persist={setOptions:E=>{s={...s,...E},E.storage&&(m=E.storage)},clearStorage:()=>{m?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>w(),hasHydrated:()=>a,onHydrate:E=>(u.add(E),()=>{u.delete(E)}),onFinishHydration:E=>(h.add(E),()=>{h.delete(E)})},s.skipHydration||w(),b||x},rv=RU,AU=5e3;class jU{constructor(t){this.socket=t}on(t,n){return this.socket.on(t,n),()=>{this.socket.off(t,n)}}async request(t,n,r){if(!this.socket.connected)throw new Error(`Socket not connected — cannot send ${t}`);return new Promise((i,s)=>{let a=!1;const c=r?.timeout??AU,u=globalThis.setTimeout(()=>{a||(a=!0,this.socket.off("disconnect",h),s(new Error(`Request timed out after ${c}ms`)))},c),h=()=>{a||(a=!0,globalThis.clearTimeout(u),s(new Error(`Socket disconnected before ${t} acked`)))};this.socket.once("disconnect",h),this.socket.emit(t,n,m=>{if(!a)if(a=!0,globalThis.clearTimeout(u),this.socket.off("disconnect",h),m.success)i(m.data);else{const p=Object.assign(new Error(m.error??"Request failed"),m.code?{code:m.code}:{});s(p)}})})}}const pk={apiClient:null,connectionState:"disconnected",error:null,isConnected:!1,projectCwd:"",reconnectCount:0,selectedProject:"",socket:null,version:""},Pe=Nl()(rv(e=>({...pk,incrementReconnectCount:()=>e(t=>({reconnectCount:t.reconnectCount+1})),reset:()=>e({...pk,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 jU(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:k0(()=>sessionStorage)})),OU={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"},mk={destructive:"bg-red-500",info:"bg-blue-500",warn:"bg-orange-500"};function MU({className:e}){return f.jsx("img",{alt:"Byterover",className:e,src:nv})}function XR({children:e,tone:t}){return f.jsxs(ii,{className:se("h-auto gap-1.5 px-2 py-0.5 text-[11px]",OU[t]),variant:"outline",children:[f.jsx("span",{className:se("relative size-1.5 rounded-full",mk[t]),children:f.jsx("span",{className:se("absolute inset-0 animate-ping rounded-full opacity-50",mk[t])})}),e]})}function ZR(){const e=Pe(t=>t.version);return e?f.jsxs("span",{className:"text-muted-foreground/70 ml-auto font-mono text-[10px]",children:["v",e]}):null}function JR({body:e,footer:t,pill:n,title:r}){return f.jsx("div",{className:"bg-background fixed inset-0 flex items-center justify-center p-6",children:f.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:[f.jsxs("div",{className:"flex items-center justify-between gap-4 px-5 pt-4",children:[f.jsxs("div",{className:"inline-flex min-w-0 items-center gap-2.5",children:[f.jsx(MU,{className:"size-8"}),f.jsx("h2",{className:"text-sm leading-tight font-semibold",children:r})]}),n]}),f.jsx("div",{className:"px-5 pt-2 pb-4",children:e}),t&&f.jsx("div",{className:"border-border bg-foreground/1.5 flex items-center gap-2 border-t px-5 py-2.5",children:t})]})})}function DU(){return f.jsx(JR,{body:f.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:f.jsxs(f.Fragment,{children:[f.jsx("span",{"aria-hidden":!0,className:"bg-blue-500/70 size-1.5 animate-pulse rounded-full"}),f.jsx("span",{className:"text-muted-foreground text-xs",children:"Waiting for the daemon…"}),f.jsx(ZR,{})]}),pill:f.jsx(XR,{tone:"info",children:"Connecting"}),title:"Connecting to ByteRover"})}function _U({textToCopy:e,className:t,showCopiedText:n=!0,onCopied:r}){const[i,s]=S.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(e),s(!0),r?.(),setTimeout(()=>s(!1),2e3)}catch(c){console.error("Failed to copy text: ",c)}};return f.jsx("button",{type:"button",onClick:()=>{a()},className:se("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?f.jsxs("div",{className:"flex items-center gap-1.5",children:[n&&f.jsx("span",{className:"pl-0.5 text-xs font-medium",children:"Copied!"}),f.jsx(wf,{className:"size-4 text-green-500"})]}):f.jsx(S_,{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 im=Object.create(null);Object.keys(Mo).forEach(e=>{im[Mo[e]]=e});const cx={type:"error",data:"parser error"},eA=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",tA=typeof ArrayBuffer=="function",nA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,iv=({type:e,data:t},n,r)=>eA&&t instanceof Blob?n?r(t):gk(t,r):tA&&(t instanceof ArrayBuffer||nA(t))?n?r(t):gk(new Blob([t]),r):r(Mo[e]+(t||"")),gk=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function yk(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let H2;function LU(e,t){if(eA&&e.data instanceof Blob)return e.data.arrayBuffer().then(yk).then(t);if(tA&&(e.data instanceof ArrayBuffer||nA(e.data)))return t(yk(e.data));iv(e,!1,n=>{H2||(H2=new TextEncoder),t(H2.encode(n))})}const xk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Od=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<xk.length;e++)Od[xk.charCodeAt(e)]=e;const IU=e=>{let t=e.length*.75,n=e.length,r,i=0,s,a,c,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),m=new Uint8Array(h);for(r=0;r<n;r+=4)s=Od[e.charCodeAt(r)],a=Od[e.charCodeAt(r+1)],c=Od[e.charCodeAt(r+2)],u=Od[e.charCodeAt(r+3)],m[i++]=s<<2|a>>4,m[i++]=(a&15)<<4|c>>2,m[i++]=(c&3)<<6|u&63;return h},PU=typeof ArrayBuffer=="function",ov=(e,t)=>{if(typeof e!="string")return{type:"message",data:rA(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:zU(e.substring(1),t)}:im[n]?e.length>1?{type:im[n],data:e.substring(1)}:{type:im[n]}:cx},zU=(e,t)=>{if(PU){const n=IU(e);return rA(n,t)}else return{base64:!0,data:e}},rA=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,iA="",FU=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,a)=>{iv(s,!1,c=>{r[a]=c,++i===n&&t(r.join(iA))})})},BU=(e,t)=>{const n=e.split(iA),r=[];for(let i=0;i<n.length;i++){const s=ov(n[i],t);if(r.push(s),s.type==="error")break}return r};function HU(){return new TransformStream({transform(e,t){LU(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 s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let U2;function jp(e){return e.reduce((t,n)=>t+n.length,0)}function Op(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 UU(e,t){U2||(U2=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(a,c){for(n.push(a);;){if(r===0){if(jp(n)<1)break;const u=Op(n,1);s=(u[0]&128)===128,i=u[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(jp(n)<2)break;const u=Op(n,2);i=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(jp(n)<8)break;const u=Op(n,8),h=new DataView(u.buffer,u.byteOffset,u.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(cx);break}i=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(jp(n)<i)break;const u=Op(n,i);c.enqueue(ov(s?u:U2.decode(u),t)),r=0}if(i===0||i>e){c.enqueue(cx);break}}}})}const oA=4;function ir(e){if(e)return qU(e)}function qU(e){for(var t in ir.prototype)e[t]=ir.prototype[t];return e}ir.prototype.on=ir.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ir.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ir.prototype.off=ir.prototype.removeListener=ir.prototype.removeAllListeners=ir.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};ir.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};ir.prototype.emitReserved=ir.prototype.emit;ir.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ir.prototype.hasListeners=function(e){return!!this.listeners(e).length};const T0=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),qi=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),VU="arraybuffer";function sA(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const $U=qi.setTimeout,YU=qi.clearTimeout;function N0(e,t){t.useNativeTimers?(e.setTimeoutFn=$U.bind(qi),e.clearTimeoutFn=YU.bind(qi)):(e.setTimeoutFn=qi.setTimeout.bind(qi),e.clearTimeoutFn=qi.clearTimeout.bind(qi))}const WU=1.33;function GU(e){return typeof e=="string"?KU(e):Math.ceil((e.byteLength||e.size)*WU)}function KU(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 aA(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function QU(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function XU(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class ZU extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class sv extends ir{constructor(t){super(),this.writable=!1,N0(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 ZU(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=ov(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=QU(t);return n.length?"?"+n:""}}class JU extends sv{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)};BU(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,FU(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]=aA()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let lA=!1;try{lA=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const eq=lA;function tq(){}class nq extends JU{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,s)=>{this.onError("xhr post error",i,s)})}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 _c=class om extends ir{constructor(t,n,r){super(),this.createRequest=t,N0(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=sA(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=om.requestsCount++,om.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=tq,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete om.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()}};_c.requestsCount=0;_c.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",bk);else if(typeof addEventListener=="function"){const e="onpagehide"in qi?"pagehide":"unload";addEventListener(e,bk,!1)}}function bk(){for(let e in _c.requests)_c.requests.hasOwnProperty(e)&&_c.requests[e].abort()}const rq=(function(){const e=cA({xdomain:!1});return e&&e.responseType!==null})();class iq extends nq{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=rq&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _c(cA,this.uri(),t)}}function cA(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||eq))return new XMLHttpRequest}catch{}if(!t)try{return new qi[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const uA=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class oq extends sv{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=uA?{}:sA(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;iv(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&T0(()=>{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]=aA()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const q2=qi.WebSocket||qi.MozWebSocket;class sq extends oq{createSocket(t,n,r){return uA?new q2(t,n,r):n?new q2(t,n):new q2(t)}doWrite(t,n){this.ws.send(n)}}class aq extends sv{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=UU(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=HU();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:c,value:u})=>{c||(this.onPacket(u),s())}).catch(c=>{})};s();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).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&&T0(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const lq={websocket:sq,webtransport:aq,polling:iq},cq=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,uq=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ux(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=cq.exec(e||""),s={},a=14;for(;a--;)s[uq[a]]=i[a]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=dq(s,s.path),s.queryKey=fq(s,s.query),s}function dq(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 fq(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const dx=typeof addEventListener=="function"&&typeof removeEventListener=="function",sm=[];dx&&addEventListener("offline",()=>{sm.forEach(e=>e())},!1);class ma extends ir{constructor(t,n){if(super(),this.binaryType=VU,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=ux(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=ux(n.host).host);N0(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=XU(this.opts.query)),dx&&(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"})},sm.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=oA,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&&ma.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",ma.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+=GU(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,T0(()=>{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 s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),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(ma.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(),dx&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=sm.indexOf(this._offlineEventListener);r!==-1&&sm.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ma.protocol=oA;class hq extends ma{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;ma.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;ma.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),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 s(){r||(r=!0,m(),n.close(),n=null)}const a=p=>{const y=new Error("probe error: "+p);y.transport=n.name,s(),this.emitReserved("upgradeError",y)};function c(){a("transport closed")}function u(){a("socket closed")}function h(p){n&&p.name!==n.name&&s()}const m=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",c),this.off("close",u),this.off("upgrading",h)};n.once("open",i),n.once("error",a),n.once("close",c),this.once("close",u),this.once("upgrading",h),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 pq=class extends hq{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=>lq[i]).filter(i=>!!i)),super(t,r)}};function mq(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=ux(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 s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const gq=typeof ArrayBuffer=="function",yq=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,dA=Object.prototype.toString,xq=typeof Blob=="function"||typeof Blob<"u"&&dA.call(Blob)==="[object BlobConstructor]",bq=typeof File=="function"||typeof File<"u"&&dA.call(File)==="[object FileConstructor]";function av(e){return gq&&(e instanceof ArrayBuffer||yq(e))||xq&&e instanceof Blob||bq&&e instanceof File}function am(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(am(e[n]))return!0;return!1}if(av(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return am(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&am(e[n]))return!0;return!1}function vq(e){const t=[],n=e.data,r=e;return r.data=fx(n,t),r.attachments=t.length,{packet:r,buffers:t}}function fx(e,t){if(!e)return e;if(av(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]=fx(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]=fx(e[r],t));return n}return e}function wq(e,t){return e.data=hx(e.data,t),delete e.attachments,e}function hx(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]=hx(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=hx(e[n],t));return e}const Sq=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Qt;(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"})(Qt||(Qt={}));class Cq{constructor(t){this.replacer=t}encode(t){return(t.type===Qt.EVENT||t.type===Qt.ACK)&&am(t)?this.encodeAsBinary({type:t.type===Qt.EVENT?Qt.BINARY_EVENT:Qt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Qt.BINARY_EVENT||t.type===Qt.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=vq(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class lv extends ir{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===Qt.BINARY_EVENT;r||n.type===Qt.BINARY_ACK?(n.type=r?Qt.EVENT:Qt.ACK,this.reconstructor=new Eq(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(av(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(Qt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Qt.BINARY_EVENT||r.type===Qt.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(s,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(a);if(!kq(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 s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(lv.isPayloadValid(r.type,s))r.data=s;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 Qt.CONNECT:return vk(n);case Qt.DISCONNECT:return n===void 0;case Qt.CONNECT_ERROR:return typeof n=="string"||vk(n);case Qt.EVENT:case Qt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Sq.indexOf(n[0])===-1);case Qt.ACK:case Qt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Eq{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=wq(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const kq=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function vk(e){return Object.prototype.toString.call(e)==="[object Object]"}const Tq=Object.freeze(Object.defineProperty({__proto__:null,Decoder:lv,Encoder:Cq,get PacketType(){return Qt}},Symbol.toStringTag,{value:"Module"}));function ao(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Nq=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class fA extends ir{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=[ao(t,"open",this.onopen.bind(this)),ao(t,"packet",this.onpacket.bind(this)),ao(t,"error",this.onerror.bind(this)),ao(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,s;if(Nq.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 a={type:Qt.EVENT,data:n};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,p=n.pop();this._registerAckCallback(m,p),a.id=m}const c=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,u=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!c||(u?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),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 s=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),a=(...c)=>{this.io.clearTimeoutFn(s),n.apply(this,c)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(a,c)=>a?i(a):r(c);s.withError=!0,n.push(s),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,...s)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),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:Qt.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 Qt.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 Qt.EVENT:case Qt.BINARY_EVENT:this.onevent(t);break;case Qt.ACK:case Qt.BINARY_ACK:this.onack(t);break;case Qt.DISCONNECT:this.ondisconnect();break;case Qt.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:Qt.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:Qt.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 au(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}au.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};au.prototype.reset=function(){this.attempts=0};au.prototype.setMin=function(e){this.ms=e};au.prototype.setMax=function(e){this.max=e};au.prototype.setJitter=function(e){this.jitter=e};class px extends ir{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,N0(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 au({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||Tq;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 pq(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ao(n,"open",function(){r.onopen(),t&&t()}),s=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},a=ao(n,"error",s);if(this._timeout!==!1){const c=this._timeout,u=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},c);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ao(t,"ping",this.onping.bind(this)),ao(t,"data",this.ondata.bind(this)),ao(t,"error",this.onerror.bind(this)),ao(t,"close",this.onclose.bind(this)),ao(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){T0(()=>{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 fA(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 fd={};function lm(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=mq(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,a=fd[i]&&s in fd[i].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let u;return c?u=new px(r,t):(fd[i]||(fd[i]=new px(r,t)),u=fd[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(lm,{Manager:px,Socket:fA,io:lm,connect:lm});class hA extends Error{constructor(t){super(t),this.name="UiConfigError"}}async function Rq(){const e=await fetch("/api/ui/config");if(!e.ok)throw new hA(`Failed to fetch UI config: ${e.statusText}`);return e.json()}function Aq(e,t){e.emit("client:register",{clientType:"webui",projectPath:t},()=>{}),e.emit("room:join","broadcast-room")}async function jq(e){const t=await Rq(),n=lm(`http://127.0.0.1:${t.daemonPort}`,{reconnection:!0,reconnectionAttempts:30,reconnectionDelay:50,reconnectionDelayMax:1e3,transports:["websocket"]});return n.on("connect",()=>Aq(n,e)),await new Promise((r,i)=>{const s=()=>{clearTimeout(u),n.off("connect",a),n.off("connect_error",c)},a=()=>{s(),r()},c=h=>{s(),i(h)},u=setTimeout(()=>{s(),i(new Error("Connection timeout"))},5e3);n.once("connect",a),n.once("connect_error",c)}),{config:t,socket:n}}function wk({error:e}){const t=e instanceof hA,n=Pe(s=>s.reconnectCount),r=t?"brv restart":"brv webui",i=t?"Web UI server not available":"ByteRover is not running";return f.jsx(JR,{body:f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:t?f.jsxs(f.Fragment,{children:["Could not load"," ",f.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:"}),f.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:[f.jsxs("span",{children:[f.jsx("span",{className:"text-muted-foreground",children:"$"})," ",r]}),f.jsx(_U,{className:"-mr-1",showCopiedText:!1,textToCopy:r})]})]}),footer:f.jsxs(f.Fragment,{children:[t?f.jsx("span",{className:"text-muted-foreground/80 text-xs",children:"Refresh once the host is back."}):f.jsxs(f.Fragment,{children:[f.jsx("span",{"aria-hidden":!0,className:"bg-muted-foreground/60 size-1.5 animate-pulse rounded-full"}),f.jsxs("span",{className:"text-muted-foreground text-xs",children:["Reconnecting",f.jsx("span",{className:"opacity-60",children:" · attempt "}),f.jsx("span",{className:"text-foreground tabular-nums",children:n})]})]}),f.jsx(ZR,{})]}),pill:f.jsx(XR,{tone:t?"destructive":"warn",children:t?"Unreachable":"Offline"}),title:i})}function Oq({children:e}){const t=Pe(h=>h.incrementReconnectCount),n=Pe(h=>h.setConnectionState),r=Pe(h=>h.setError),i=Pe(h=>h.setSocket),s=Pe(h=>h.selectedProject);S.useEffect(()=>{let h=!0,m=null,p=null;async function y(){try{n("connecting");const{config:x,socket:b}=await jq(s);if(!h){b.disconnect();return}m=b,i(b,x),b.on("disconnect",()=>{h&&n("disconnected")}),b.io.on("reconnect_attempt",()=>{h&&(t(),n("reconnecting"))}),b.io.on("reconnect",()=>{h&&n("connected")})}catch(x){if(!h)return;r(x instanceof Error?x:new Error(String(x))),t(),p=setTimeout(y,3e3)}}return y(),()=>{h=!1,m?.disconnect(),p!==null&&clearTimeout(p)}},[s,t,n,r,i]);const a=Pe(h=>h.connectionState),c=Pe(h=>h.error),u=Pe(h=>h.apiClient);return c?f.jsx(wk,{error:c}):a==="connecting"?f.jsx(DU,{}):u?f.jsx(f.Fragment,{children:e}):f.jsx(wk,{})}const Mq=new uU({defaultOptions:CU});function Dq({children:e}){return f.jsx(dU,{client:Mq,children:f.jsx(Oq,{children:f.jsx(Qb,{delay:0,children:e})})})}const jf={GET_STATE:"auth:getState",LOGIN_COMPLETED:"auth:loginCompleted",LOGOUT:"auth:logout",START_LOGIN:"auth:startLogin",STATE_CHANGED:"auth:stateChanged"},R0={GET_FREE_USER_LIMIT:"billing:getFreeUserLimit",GET_PINNED_TEAM:"billing:getPinnedTeam",LIST_USAGE:"billing:listUsage",SET_PINNED_TEAM:"billing:setPinnedTeam"},_q={ASSOCIATE_PROJECT:"client:associateProject"},Lq={GET_ENVIRONMENT:"config:getEnvironment"},cv={GET_AGENTS:"connectors:getAgents",INSTALL:"connectors:install",LIST:"connectors:list"},Of={GET_FILE:"contextTree:getFile",GET_FILE_METADATA:"contextTree:getFileMetadata",GET_HISTORY:"contextTree:getHistory",GET_NODES:"contextTree:getNodes",UPDATE_FILE:"contextTree:updateFile"},fc={CHUNK:"llmservice:chunk",ERROR:"llmservice:error",RESPONSE:"llmservice:response",THINKING:"llmservice:thinking",TOOL_CALL:"llmservice:toolCall",TOOL_RESULT:"llmservice:toolResult"},pA={GET:"locations:get",REVEAL:"locations:reveal"},mA={LIST:"model:list",SET_ACTIVE:"model:setActive"},Cs={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"},gr={CANCELLED:"task:cancelled",CLEAR_COMPLETED:"task:clearCompleted",COMPLETED:"task:completed",CREATE:"task:create",CREATED:"task:created",DELETE:"task:delete",DELETE_BULK:"task:deleteBulk",DELETED:"task:deleted",ERROR:"task:error",GET:"task:get",LIST:"task:list",STARTED:"task:started"},Iq={LIST:"team:list"},Ir={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"},$n={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"},Sk={activeModel:null,favorites:[],isLoading:!1,models:[],recent:[]},Pq=Nl()(e=>({...Sk,reset:()=>e(Sk),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})})),zq=()=>{const{apiClient:e}=Pe.getState();return e?e.request(Cs.GET_ACTIVE):Promise.reject(new Error("Not connected"))},Mf=()=>({queryFn:zq,queryKey:["getActiveProviderConfig"]}),uv=({queryConfig:e}={})=>Mn({...Mf(),...e}),Fq=()=>{const{apiClient:e}=Pe.getState();return e?e.request(Cs.LIST):Promise.reject(new Error("Not connected"))},Es=()=>({queryFn:Fq,queryKey:["providers"]}),dv=({queryConfig:e}={})=>Mn({...Es(),...e}),Ck={activeProviderId:null,isDialogOpen:!1,isLoading:!1,providers:[]},Dm=Nl()(e=>({...Ck,closeProviderDialog:()=>e({isDialogOpen:!1}),openProviderDialog:()=>e({isDialogOpen:!0}),reset:()=>e(Ck),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)}))})),Bq=e=>{const{apiClient:t}=Pe.getState();return t?t.request(jf.GET_STATE,{projectPath:e},{timeout:5e3}):Promise.reject(new Error("Not connected"))},ys=["auth","state"],fv=e=>({enabled:e!=="",gcTime:300*1e3,queryFn:()=>Bq(e),queryKey:[...ys,e],staleTime:60*1e3}),Hq=({queryConfig:e}={})=>{const t=Pe(r=>r.selectedProject),n=fv(t);return Mn({...n,...e,enabled:n.enabled!==!1&&(e?.enabled??!0)})},Ek={brvConfig:null,isAuthorized:!1,isLoadingInitial:!0,isLoggingIn:!1,user:null},Ur=Nl()(e=>({...Ek,reset:()=>e(Ek),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 Uq({children:e}){const t=Pe(h=>h.apiClient),n=Pe(h=>h.connectionState),r=Pe(h=>h.reconnectCount),i=tn(),s=Ur(h=>h.setState),{data:a,isFetched:c,isLoading:u}=Hq({queryConfig:{enabled:t!==null,retry:5,retryDelay:h=>Math.min(500*2**h,2e3),staleTime:120*1e3}});return S.useEffect(()=>{a?(s({brvConfig:a.brvConfig??null,isAuthorized:a.isAuthorized,user:a.user??null}),Ur.setState({isLoadingInitial:!1})):c&&!u&&Ur.setState({isLoadingInitial:!1})},[a,c,u,s]),S.useEffect(()=>t?t.on(jf.STATE_CHANGED,m=>{s({brvConfig:m.brvConfig,isAuthorized:m.isAuthorized,user:m.user}),m.isAuthorized||(Dm.getState().reset(),Pq.getState().reset(),i.invalidateQueries({queryKey:Es().queryKey}),i.invalidateQueries({queryKey:Mf().queryKey})),m.isAuthorized&&i.invalidateQueries({queryKey:ys}).catch(()=>{})}):void 0,[t,i,s]),S.useEffect(()=>{t&&n==="connected"&&r!==0&&i.invalidateQueries({queryKey:ys}).catch(()=>{})},[t,n,i,r]),f.jsx(f.Fragment,{children:e})}function qq(){const e=Pe(n=>n.apiClient),t=tn();S.useEffect(()=>e?e.on(Cs.UPDATED,()=>{t.invalidateQueries({queryKey:Es().queryKey}),t.invalidateQueries({queryKey:Mf().queryKey})}):void 0,[e,t])}function Vq(){return qq(),null}function kk(e,t){if(t.length===0)return e;const n=new Map(t.map(i=>[i.taskId,i])),r=e.map(i=>{const s=n.get(i.taskId);return s?(n.delete(i.taskId),Yq(i,s)):i});for(const i of n.values())r.push(i);return r}function $q(e,t){const n=e.filter(r=>r.taskId!==t);return n.length===e.length?e:n}function Yq(e,t){return{...e,...Wq(t)}}function Wq(e){const t={};for(const[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function Gq(e,t){const n=e.toolCalls??[],r=t.callId?n.findIndex(i=>i.callId===t.callId):-1;if(r>=0){const i=n[r],s=t.args&&Object.keys(t.args).length>0,a=[...n];return a[r]={...i,args:s?t.args:i.args,sessionId:t.sessionId},{...e,sessionId:t.sessionId,toolCalls:a}}return{...e,sessionId:t.sessionId,toolCalls:[...n,t]}}function Kq(e,t){const n=e.toolCalls??[];if(n.length===0)return e;let r=-1;if(t.callId&&(r=n.findIndex(s=>s.callId===t.callId)),r===-1&&t.toolName){for(let s=n.length-1;s>=0;s--)if(n[s].toolName===t.toolName&&n[s].status==="running"){r=s;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 Qq(e,t){const n=e.reasoningContents??[],r=n.at(-1);return t.isThinking&&r?.isThinking?e:{...e,reasoningContents:[...n,t]}}function Xq(e,t){if(t.type==="reasoning"){const n=e.reasoningContents??[],r=n.length-1,i=n[r];if(i){const s=[...n];return s[r]={...i,content:i.content+t.content,isThinking:!1},{...e,isStreaming:!t.isComplete,reasoningContents:s,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 Zq(e,t){return{...e,isStreaming:!1,responseContent:t.content,sessionId:t.sessionId??e.sessionId,streamingContent:void 0}}function gA(e){return e==="curate-folder"?"curate":e}const yA=new Set(["cancelled","completed","error"]);function la(e){return yA.has(e)}function $c(e){return!yA.has(e)}const Tk={searchQuery:"",statusFilter:"all",tasks:[],typeFilter:"all"};function hc(e,t,n){const r=e.tasks.findIndex(a=>a.taskId===t);if(r===-1)return;const i=n(e.tasks[r]);if(i===e.tasks[r])return;const s=[...e.tasks];return s[r]=i,{tasks:s}}const Yc=Nl()(rv((e,t)=>({...Tk,addReasoningContent:(n,r)=>e(i=>hc(i,n,s=>Qq(s,r))??{}),addToolCall:(n,r)=>e(i=>hc(i,n,s=>Gq(s,r))??{}),appendStreamingContent:({content:n,isComplete:r,sessionId:i,taskId:s,type:a})=>e(c=>hc(c,s,u=>Xq(u,{content:n,isComplete:r,sessionId:i,type:a}))??{}),clearCompleted:()=>e(n=>({tasks:n.tasks.filter(r=>!la(r.status))})),markLlmServiceError:n=>e(r=>hc(r,n,i=>({...i,hadLlmServiceError:!0}))??{}),mergeTasks:n=>e(r=>({tasks:kk(r.tasks,n)})),removeTask:n=>e(r=>({tasks:$q(r.tasks,n)})),reset:()=>e({...Tk}),setResponse:(n,r,i)=>e(s=>hc(s,n,a=>Zq(a,{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:s,success:a,taskId:c,toolName:u})=>e(h=>hc(h,c,m=>Kq(m,{callId:n,error:r,errorType:i,result:s,success:a,toolName:u}))??{}),upsertStatus(n,r){const i=t().tasks.find(a=>a.taskId===n),s=i?{...i,...r}:{content:"",createdAt:Date.now(),type:"unknown",...r,taskId:n};e(a=>({tasks:kk(a.tasks,[s])}))}}),{name:"brv-tasks",partialize:e=>({tasks:e.tasks}),storage:k0(()=>sessionStorage)})),Jq=["all","running","completed","failed","cancelled"],eV=e=>Yc(t=>e?t.tasks.find(n=>n.taskId===e):void 0),tV=()=>{const e=Yc(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 nV(){const e=Pe(t=>t.apiClient);S.useEffect(()=>{if(!e)return;const t=Yc.getState(),n=[];return n.push(e.on(gr.CREATED,r=>{t.upsertStatus(r.taskId,{content:r.content,createdAt:Date.now(),...r.files?.length?{files:r.files}:{},...r.folderPath?{folderPath:r.folderPath}:{},...r.model?{model:r.model}:{},...r.provider?{provider:r.provider}:{},status:"created",type:r.type})}),e.on(gr.STARTED,r=>{t.upsertStatus(r.taskId,{startedAt:Date.now(),status:"started"})}),e.on(gr.COMPLETED,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),result:r.result,status:"completed"})}),e.on(gr.ERROR,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),error:r.error,status:"error"})}),e.on(gr.CANCELLED,r=>{t.upsertStatus(r.taskId,{completedAt:Date.now(),status:"cancelled"})}),e.on(gr.DELETED,r=>{t.removeTask(r.taskId)}),e.on(fc.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(fc.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(fc.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(fc.RESPONSE,r=>{r.taskId&&t.setResponse(r.taskId,r.content,r.sessionId)}),e.on(fc.THINKING,r=>{r.taskId&&t.addReasoningContent(r.taskId,{content:"",isThinking:!0,timestamp:Date.now()})}),e.on(fc.ERROR,r=>{r.taskId&&t.markLlmServiceError(r.taskId)})),()=>{for(const r of n)r()}},[e])}const rV=[gr.CREATED,gr.STARTED,gr.COMPLETED,gr.ERROR,gr.CANCELLED,gr.DELETED];function iV(){const e=Pe(s=>s.selectedProject),t=Pe(s=>s.apiClient),n=Yc(s=>s.reset),r=S.useRef(e),i=tn();return nV(),S.useEffect(()=>{r.current!==e&&(n(),r.current=e)},[e,n]),S.useEffect(()=>{if(!t)return;const s=rV.map(a=>t.on(a,()=>{i.invalidateQueries({queryKey:["tasks","list"]})}));return()=>{for(const a of s)a()}},[t,i]),null}const hv=["billing-pinned-team"],xA=e=>{const{apiClient:t}=Pe.getState();return t?t.request(R0.GET_PINNED_TEAM,{projectPath:e}):Promise.reject(new Error("Not connected"))},oV=e=>({enabled:e!=="",queryFn:()=>xA(e),queryKey:[...hv,e]}),pv=({queryConfig:e}={})=>{const t=Pe(r=>r.selectedProject),n=oV(t);return Mn({...n,...e,enabled:n.enabled!==!1&&(e?.enabled??!0)})},bA=()=>{const{apiClient:e}=Pe.getState();return e?e.request(R0.LIST_USAGE):Promise.reject(new Error("Not connected"))},vA=e=>({enabled:e,queryFn:bA,queryKey:["billing-list-usage"],refetchInterval:6e4}),wA=({enabled:e=!0,queryConfig:t}={})=>Mn({...t,...vA(e)});function sV(){const e=Pe(i=>i.apiClient),t=Pe(i=>i.isConnected),n=Pe(i=>i.selectedProject),r=tn();return S.useEffect(()=>{if(!e||!t||!n)return;let i=!1;return e.request(_q.ASSOCIATE_PROJECT,{projectPath:n}).catch(()=>{}).finally(()=>{i||(r.invalidateQueries({queryKey:ys}).catch(()=>{}),r.invalidateQueries({queryKey:hv}).catch(()=>{}),r.invalidateQueries({queryKey:vA(!0).queryKey}).catch(()=>{}))}),()=>{i=!0}},[e,t,r,n]),null}function aV(){const e=Qi();return Pe(n=>n.selectedProject)?f.jsxs(Uq,{children:[f.jsx(sV,{}),f.jsx(Vq,{}),f.jsx(iV,{}),f.jsx(W6,{})]}):f.jsx(Y6,{replace:!0,state:{from:e},to:"/projects"})}const Bd=["provider","curate","query","connector"],lV={seenWelcome:!1,tourActive:!1,tourCompleted:!1,tourStep:null,tourTaskId:null},Ht=Nl()(rv((e,t)=>({...lV,advanceTour(){const{tourStep:n}=t();if(!n)return;const r=Bd.indexOf(n),i=Bd[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:k0(()=>globalThis.localStorage)}));function cV(){const e=Ht(s=>s.tourActive),t=Ht(s=>s.tourStep),n=Ht(s=>s.tourTaskId);return e&&(t==="curate"||t==="query")&&!n?f.jsx("div",{"aria-hidden":!0,className:"bg-background/50 fixed inset-0 z-40 backdrop-blur-xs"}):null}const uV={connector:"Connect to your AI tool",curate:"Curate your first knowledge",provider:"Connect a provider",query:"Ask your first question"};function dV(){const[e,t]=S.useState(0);return S.useEffect(()=>{const n='[data-slot="sheet-content"][data-side="right"]';let r=null;const i=()=>{const c=document.querySelectorAll(n);let u=0;for(const h of c){const m=h.getBoundingClientRect();m.width>u&&(u=m.width)}t(h=>h===u?h:u)},s=()=>{r?.disconnect();const c=document.querySelectorAll(n);if(c.length===0){i();return}r=new globalThis.ResizeObserver(i);for(const u of c)r.observe(u);i()},a=new globalThis.MutationObserver(s);return a.observe(document.body,{childList:!0,subtree:!0}),s(),()=>{r?.disconnect(),a.disconnect()}},[]),e}function fV(){const e=Ht(m=>m.tourActive),t=Ht(m=>m.tourStep),n=Ht(m=>m.exitTour),r=dV();if(!e||!t)return null;const i=Bd.indexOf(t),a=t==="curate"||t==="query"?"top-4":"bottom-4",c=r>0,u=se("pointer-events-none fixed z-100 flex",a,c?"":"inset-x-0 justify-center px-4"),h=c?{right:`${r+16}px`}:void 0;return f.jsx("div",{className:u,style:h,children:f.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:[f.jsx("div",{className:"inline-flex items-center gap-1",children:Bd.map((m,p)=>f.jsx("span",{"aria-hidden":!0,className:se("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")},m))}),f.jsxs("span",{className:"text-foreground text-xs font-medium",children:[f.jsxs("span",{className:"text-muted-foreground mono mr-1.5 text-[10.5px]",children:[i+1,"/",Bd.length]}),uV[t]]}),f.jsx("span",{"aria-hidden":!0,className:"bg-border h-4 w-px"}),f.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 mv=S.createContext(void 0);function Ta(e){const t=S.useContext(mv);if(e===!1&&t===void 0)throw new Error(Cn(27));return t}const hV={...Ss,...ws},gv=S.forwardRef(function(t,n){const{render:r,className:i,forceRender:s=!1,...a}=t,{store:c}=Ta(),u=c.useState("open"),h=c.useState("nested"),m=c.useState("mounted"),p=c.useState("transitionStatus");return Ot("div",t,{state:{open:u,transitionStatus:p},ref:[c.context.backdropRef,n],stateAttributesMapping:hV,props:[{role:"presentation",hidden:!m,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:s||!h})}),pV=S.createContext(void 0);function yv(e=!1){const t=S.useContext(pV);if(t===void 0&&!e)throw new Error(Cn(16));return t}function mV(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:s}=e,a=r&&t!==!1,c=r&&t===!1;return{props:S.useMemo(()=>{const h={onKeyDown(m){n&&t&&m.key!=="Tab"&&m.preventDefault()}};return r||(h.tabIndex=i,!s&&n&&(h.tabIndex=t?i:-1)),(s&&(t||a)||!s&&n)&&(h["aria-disabled"]=n),s&&(!t||c)&&(h.disabled=n),h},[r,n,t,a,c,s,i])}}function Rl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:s}=e,a=S.useRef(null),c=yv(!0),u=s??c!==void 0,{props:h}=mV({focusableWhenDisabled:n,disabled:t,composite:u,tabIndex:r,isNativeButton:i}),m=S.useCallback(()=>{const x=a.current;V2(x)&&u&&t&&h.disabled===void 0&&x.disabled&&(x.disabled=!1)},[t,h.disabled,u]);We(m,[m]);const p=S.useCallback((x={})=>{const{onClick:b,onMouseDown:w,onKeyUp:E,onKeyDown:k,onPointerDown:T,...N}=x;return Oo({type:i?"button":void 0,onClick(j){if(t){j.preventDefault();return}b?.(j)},onMouseDown(j){t||w?.(j)},onKeyDown(j){if(t||(Zy(j),k?.(j),j.baseUIHandlerPrevented))return;const A=j.target===j.currentTarget,R=j.currentTarget,_=V2(R),F=!i&&gV(R),I=A&&(i?_:!F),H=j.key==="Enter",q=j.key===" ",V=R.getAttribute("role"),$=V?.startsWith("menuitem")||V==="option"||V==="gridcell";if(A&&u&&q){if(j.defaultPrevented&&$)return;j.preventDefault(),F||i&&_?(R.click(),j.preventBaseUIHandler()):I&&(b?.(j),j.preventBaseUIHandler());return}I&&(!i&&(q||H)&&j.preventDefault(),!i&&H&&b?.(j))},onKeyUp(j){if(!t){if(Zy(j),E?.(j),j.target===j.currentTarget&&i&&u&&V2(j.currentTarget)&&j.key===" "){j.preventDefault();return}j.baseUIHandlerPrevented||j.target===j.currentTarget&&!i&&!u&&j.key===" "&&b?.(j)}},onPointerDown(j){if(t){j.preventDefault();return}T?.(j)}},i?void 0:{role:"button"},h,N)},[t,h,u,i]),y=tt(x=>{a.current=x,m()});return{getButtonProps:p,buttonRef:y}}function V2(e){return Fn(e)&&e.tagName==="BUTTON"}function gV(e){return!!(e?.tagName==="A"&&e?.href)}const Df=S.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,nativeButton:a=!0,...c}=t,{store:u}=Ta(),h=u.useState("open");function m(b){h&&u.setOpen(!1,kt(fz,b.nativeEvent))}const{getButtonProps:p,buttonRef:y}=Rl({disabled:s,native:a});return Ot("button",t,{state:{disabled:s},ref:[n,y],props:[{onClick:m},c,p]})}),SA=S.forwardRef(function(t,n){const{render:r,className:i,id:s,...a}=t,{store:c}=Ta(),u=ki(s);return c.useSyncedValueWithCleanup("descriptionElementId",u),Ot("p",t,{ref:n,props:[{id:u},a]})});let yV=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),xV=(function(e){return e[e.open=ll.open]="open",e[e.closed=ll.closed]="closed",e[e.startingStyle=ll.startingStyle]="startingStyle",e[e.endingStyle=ll.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const CA=S.createContext(void 0);function bV(){const e=S.useContext(CA);if(e===void 0)throw new Error(Cn(26));return e}const EA="ArrowUp",kA="ArrowDown",TA="ArrowLeft",NA="ArrowRight",RA="Home",AA="End",vV=new Set([TA,NA]),wV=new Set([EA,kA]),SV=new Set([...vV,...wV]);[...SV];const xv=new Set([EA,kA,TA,NA,RA,AA]),CV={...Ss,...ws,nestedDialogOpen(e){return e?{[xV.nestedDialogOpen]:""}:null}},bv=S.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:s,render:a,...c}=t,{store:u}=Ta(),h=u.useState("descriptionElementId"),m=u.useState("disablePointerDismissal"),p=u.useState("floatingRootContext"),y=u.useState("popupProps"),x=u.useState("modal"),b=u.useState("mounted"),w=u.useState("nested"),E=u.useState("nestedOpenDialogCount"),k=u.useState("open"),T=u.useState("openMethod"),N=u.useState("titleElementId"),O=u.useState("transitionStatus"),j=u.useState("role");bV(),Xi({open:k,ref:u.context.popupRef,onComplete(){k&&u.context.onOpenChangeComplete?.(!0)}});function A(H){return H==="touch"?u.context.popupRef.current:!0}const R=s===void 0?A:s,_=E>0,I=Ot("div",t,{state:{open:k,nested:w,transitionStatus:O,nestedDialogOpen:_},props:[y,{"aria-labelledby":N??void 0,"aria-describedby":h??void 0,role:j,tabIndex:-1,hidden:!b,onKeyDown(H){xv.has(H.key)&&H.stopPropagation()},style:{[yV.nestedDialogs]:E}},c],ref:[n,u.context.popupRef,u.useStateSetter("popupElement")],stateAttributesMapping:CV});return f.jsx(Ob,{context:p,openInteractionType:T,disabled:!b,closeOnFocusOut:!m,initialFocus:R,returnFocus:i,modal:x!==!1,restoreFocus:"popup",children:I})}),vv=S.forwardRef(function(t,n){const{cutout:r,...i}=t;let s;if(r){const a=r?.getBoundingClientRect();s=`polygon(
13
+ 0% 0%,
14
+ 100% 0%,
15
+ 100% 100%,
16
+ 0% 100%,
17
+ 0% 0%,
18
+ ${a.left}px ${a.top}px,
19
+ ${a.left}px ${a.bottom}px,
20
+ ${a.right}px ${a.bottom}px,
21
+ ${a.right}px ${a.top}px,
22
+ ${a.left}px ${a.top}px
23
+ )`}return f.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})}),wv=S.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:s}=Ta(),a=s.useState("mounted"),c=s.useState("modal"),u=s.useState("open");return a||r?f.jsx(CA.Provider,{value:r,children:f.jsxs(Rb,{ref:n,...i,children:[a&&c===!0&&f.jsx(vv,{ref:s.context.internalBackdropRef,inert:Wb(!u)}),t.children]})}):null});let Nk={},Rk={},Ak="";function EV(e){if(typeof document>"u")return!1;const t=Zt(e);return qn(t).innerWidth-t.documentElement.clientWidth>0}function kV(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Zt(e),r=n.documentElement,i=n.body,s=wa(r)?r:i,a=s.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const u=s.offsetWidth;s.style.overflowY="hidden";const h=s.offsetWidth;return s.style.overflowY=a,r.style.scrollbarGutter=c,u===h}function TV(e){const t=Zt(e),n=t.documentElement,r=t.body,i=wa(n)?n:r,s={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,s)}}function NV(e){const t=Zt(e),n=t.documentElement,r=t.body,i=qn(n);let s=0,a=0,c=!1;const u=wo.create();if(xb&&(i.visualViewport?.scale??1)!==1)return()=>{};function h(){const y=i.getComputedStyle(n),x=i.getComputedStyle(r),E=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,a=n.scrollLeft,Nk={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Ak=n.style.scrollBehavior,Rk={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,N=y.overflowY==="scroll"||x.overflowY==="scroll",O=y.overflowX==="scroll"||x.overflowX==="scroll",j=Math.max(0,i.innerWidth-r.clientWidth),A=Math.max(0,i.innerHeight-r.clientHeight),R=parseFloat(x.marginTop)+parseFloat(x.marginBottom),_=parseFloat(x.marginLeft)+parseFloat(x.marginRight),F=wa(n)?n:r;if(c=kV(e),c){n.style.scrollbarGutter=E,F.style.overflowY="hidden",F.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(k||N)&&(n.style.overflowY="scroll"),(T||O)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:R||A?`calc(100dvh - ${R+A}px)`:"100dvh",width:_||j?`calc(100vw - ${_+j}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function m(){Object.assign(n.style,Nk),Object.assign(r.style,Rk),c||(n.scrollTop=s,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Ak)}function p(){m(),u.request(h)}return h(),i.addEventListener("resize",p),()=>{u.cancel(),m(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class RV{lockCount=0;restore=null;timeoutLock=uo.create();timeoutUnlock=uo.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=Zt(t).documentElement,i=qn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=Er;return}const s=iN||!EV(t);this.restore=s?TV(t):NV(t)}}const AV=new RV;function Sv(e=!0,t=null){We(()=>{if(e)return AV.acquire(t)},[e,t])}function jV(e){const t=S.useRef(""),n=S.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:S.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 Cv(e,t){const n=S.useRef(e),r=tt(t);We(()=>{n.current!==e&&r(n.current)},[e,r]),We(()=>{n.current=e},[e])}function Ev(e){const[t,n]=S.useState(null),r=tt((a,c)=>{e||n(c||(iN?"touch":""))});Cv(e,a=>{a&&!e&&n(null)});const{onClick:i,onPointerDown:s}=jV(r);return S.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:s}}),[t,i,s])}function jA(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),s=t.useState("disablePointerDismissal"),a=t.useState("modal"),c=t.useState("popupElement"),{openMethod:u,triggerProps:h}=Ev(i);Lb(t);const{forceUnmount:m}=Ib(i,t),p=tt(F=>{const I=kt(F);return I.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},I}),y=S.useCallback(()=>{t.setOpen(!1,p(kb))},[t,p]);S.useImperativeHandle(r,()=>({unmount:m,close:y}),[m,y]);const x=Fb({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[b,w]=S.useState(0),E=b===0,k=fR(x),T=v0(x,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(F){if(!t.context.outsidePressEnabledRef.current||"button"in F&&F.button!==0||"touches"in F&&F.touches.length!==1)return!1;const I=Fr(F);if(E&&!s){const H=I;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===H||t.context.backdropRef.current===H||Nt(H,c)&&!H?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:E});Sv(i&&a===!0,c);const{getReferenceProps:N,getFloatingProps:O,getTriggerProps:j}=iu([k,T]);t.useContextCallback("onNestedDialogOpen",F=>{w(F+1)}),t.useContextCallback("onNestedDialogClose",()=>{w(0)}),S.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(b),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,b]);const A=S.useMemo(()=>N(h),[N,h]),R=S.useMemo(()=>j(h),[j,h]),_=S.useMemo(()=>O(),[O]);t.useSyncedValues({openMethod:u,activeTriggerProps:A,inactiveTriggerProps:R,popupProps:_,floatingRootContext:x,nestedOpenDialogCount:b})}const OV={...zb,modal:qe(e=>e.modal),nested:qe(e=>e.nested),nestedOpenDialogCount:qe(e=>e.nestedOpenDialogCount),disablePointerDismissal:qe(e=>e.disablePointerDismissal),openMethod:qe(e=>e.openMethod),descriptionElementId:qe(e=>e.descriptionElementId),titleElementId:qe(e=>e.titleElementId),viewportElement:qe(e=>e.viewportElement),role:qe(e=>e.role)};class OA extends S0{constructor(t){super(MV(t),{popupRef:S.createRef(),backdropRef:S.createRef(),internalBackdropRef:S.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Af,onOpenChange:void 0,onOpenChangeComplete:void 0},OV)}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},s=n.trigger?.id??null;(s||t)&&(i.activeTriggerId=s,i.activeTriggerElement=n.trigger??null),this.update(i)}}function MV(e={}){return{...Pb(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function MA(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:s,disablePointerDismissal:a=!1,modal:c=!0,actionsRef:u,handle:h,triggerId:m,defaultTriggerId:p=null}=e,y=Ta(!0),x=!!y,b=sr(()=>h?.store??new OA({open:r,openProp:n,activeTriggerId:p,triggerIdProp:m,modal:c,disablePointerDismissal:a,nested:x})).current;d0(()=>{n===void 0&&b.state.open===!1&&r===!0&&b.update({open:!0,activeTriggerId:p})}),b.useControlledProp("openProp",n),b.useControlledProp("triggerIdProp",m),b.useSyncedValues({disablePointerDismissal:a,nested:x,modal:c}),b.useContextCallback("onOpenChange",i),b.useContextCallback("onOpenChangeComplete",s);const w=b.useState("payload");jA({store:b,actionsRef:u,parentContext:y?.store.context});const E=S.useMemo(()=>({store:b}),[b]);return f.jsx(mv.Provider,{value:E,children:typeof t=="function"?t({payload:w}):t})}const DA=S.forwardRef(function(t,n){const{render:r,className:i,id:s,...a}=t,{store:c}=Ta(),u=ki(s);return c.useSyncedValueWithCleanup("titleElementId",u),Ot("h2",t,{ref:n,props:[{id:u},a]})}),DV=S.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,focusableWhenDisabled:a=!1,nativeButton:c=!0,...u}=t,{getButtonProps:h,buttonRef:m}=Rl({disabled:s,focusableWhenDisabled:a,native:c});return Ot("button",t,{state:{disabled:s},ref:[n,m],props:[u,h]})}),mx=E0("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 ze({className:e,variant:t="default",size:n="default",...r}){return f.jsx(DV,{"data-slot":"button",className:se(mx({variant:t,size:n,className:e})),...r})}function Al({...e}){return f.jsx(MA,{"data-slot":"dialog",...e})}function _V({...e}){return f.jsx(wv,{"data-slot":"dialog-portal",...e})}function gx({...e}){return f.jsx(Df,{"data-slot":"dialog-close",...e})}function LV({className:e,...t}){return f.jsx(gv,{"data-slot":"dialog-overlay",className:se("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 jl({className:e,children:t,showCloseButton:n=!0,...r}){return f.jsxs(_V,{children:[f.jsx(LV,{}),f.jsxs(bv,{"data-slot":"dialog-content",className:se("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&&f.jsxs(Df,{"data-slot":"dialog-close",render:f.jsx(ze,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[f.jsx(o0,{}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Vr({className:e,...t}){return f.jsx("div",{"data-slot":"dialog-header",className:se("flex flex-col gap-2",e),...t})}function Na({className:e,showCloseButton:t=!1,children:n,...r}){return f.jsxs("div",{"data-slot":"dialog-footer",className:se("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&f.jsx(Df,{render:f.jsx(ze,{variant:"outline"}),children:"Close"})]})}function $r({className:e,...t}){return f.jsx(DA,{"data-slot":"dialog-title",className:se("leading-none text-lg font-semibold text-foreground",e),...t})}function bl({className:e,...t}){return f.jsx(SA,{"data-slot":"dialog-description",className:se("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const _A=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const IV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const PV=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const jk=e=>{const t=PV(e);return t.charAt(0).toUpperCase()+t.slice(1)};var $2={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 zV=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},FV=S.createContext({}),BV=()=>S.useContext(FV),HV=S.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...c},u)=>{const{size:h=24,strokeWidth:m=2,absoluteStrokeWidth:p=!1,color:y="currentColor",className:x=""}=BV()??{},b=r??p?Number(n??m)*24/Number(t??h):n??m;return S.createElement("svg",{ref:u,...$2,width:t??h??$2.width,height:t??h??$2.height,stroke:e??y,strokeWidth:b,className:_A("lucide",x,i),...!s&&!zV(c)&&{"aria-hidden":"true"},...c},[...a.map(([w,E])=>S.createElement(w,E)),...Array.isArray(s)?s:[s]])});const Tt=(e,t)=>{const n=S.forwardRef(({className:r,...i},s)=>S.createElement(HV,{ref:s,iconNode:t,className:_A(`lucide-${IV(jk(e))}`,`lucide-${e}`,r),...i}));return n.displayName=jk(e),n};const UV=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],qV=Tt("arrow-down-left",UV);const VV=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],$V=Tt("arrow-down",VV);const YV=[["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"}]],WV=Tt("arrow-right-left",YV);const GV=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],LA=Tt("arrow-right",GV);const KV=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],QV=Tt("arrow-up",KV);const XV=[["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"}]],ZV=Tt("axis-3d",XV);const JV=[["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"}]],e$=Tt("book-open",JV);const t$=[["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"}]],n$=Tt("bug",t$);const r$=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ra=Tt("check",r$);const i$=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_f=Tt("chevron-down",i$);const o$=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ya=Tt("chevron-left",o$);const s$=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],IA=Tt("chevron-right",s$);const a$=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],l$=Tt("chevron-up",a$);const c$=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],u$=Tt("chevrons-left",c$);const d$=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],f$=Tt("chevrons-right",d$);const h$=[["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"}]],p$=Tt("circle-play",h$);const m$=[["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"}]],g$=Tt("circle-x",m$);const y$=[["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"}]],x$=Tt("command",y$);const b$=[["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"}]],v$=Tt("copy",b$);const w$=[["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"}]],_m=Tt("external-link",w$);const S$=[["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"}]],C$=Tt("file-diff",S$);const E$=[["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"}]],A0=Tt("file-text",E$);const k$=[["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"}]],T$=Tt("folder-open",k$);const N$=[["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"}]],R$=Tt("folder-search",N$);const A$=[["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"}]],PA=Tt("folder",A$);const j$=[["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"}]],O$=Tt("git-commit-horizontal",j$);const M$=[["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"}]],kv=Tt("git-branch",M$);const D$=[["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"}]],_$=Tt("globe",D$);const L$=[["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"}]],zA=Tt("house",L$);const I$=[["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"}]],P$=Tt("key",I$);const z$=[["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"}]],F$=Tt("life-buoy",z$);const B$=[["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"}]],H$=Tt("lightbulb",B$);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"}]],Ok=Tt("list-todo",U$);const q$=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qr=Tt("loader-circle",q$);const V$=[["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"}]],$$=Tt("log-out",V$);const Y$=[["path",{d:"M5 12h14",key:"1ays0h"}]],Tv=Tt("minus",Y$);const W$=[["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"}]],G$=Tt("paperclip",W$);const K$=[["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"}]],FA=Tt("plug",K$);const Q$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Aa=Tt("plus",Q$);const X$=[["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"}]],Z$=Tt("rotate-ccw",X$);const J$=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lu=Tt("search",J$);const eY=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],tY=Tt("sliders-horizontal",eY);const nY=[["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"}]],rY=Tt("sparkles",nY);const iY=[["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"}]],oY=Tt("square-arrow-out-up-right",iY);const sY=[["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"}]],aY=Tt("trash-2",sY);const lY=[["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"}]],BA=Tt("triangle-alert",lY);const cY=[["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"}]],HA=Tt("undo-2",cY);const uY=[["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"}]],Nv=Tt("user",uY);const dY=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Rv=Tt("x",dY),fY={ERR_NOT_AUTHENTICATED:"Please sign in to continue.",ERR_PROVIDER_NOT_CONFIGURED:"No provider is connected, or its credentials are missing or expired.",[Ir.ALREADY_INITIALIZED]:"Version control is already initialized for this project.",[Ir.AUTH_FAILED]:"Authentication failed. Please sign in and try again.",[Ir.BRANCH_NOT_FOUND]:"Branch not found. You can create a new branch if needed.",[Ir.NO_COMMITS]:"Make at least one commit before continuing.",[Ir.NO_REMOTE]:"No remote configured for this project.",[Ir.NO_UPSTREAM]:"This branch has no upstream configured yet. Use the Push button to publish it and set upstream in one step.",[Ir.NON_FAST_FORWARD]:"The remote has changes. Pull first, then try again.",[Ir.NOTHING_TO_PUSH]:"Nothing to push — stage and commit your changes first.",[Ir.REMOTE_ALREADY_EXISTS]:"A remote named 'origin' already exists. Remove or rename it before adding a new one.",[Ir.USER_NOT_CONFIGURED]:"Commit author is not configured."},hY="Something went wrong";function Mk(e,t){return typeof e=="object"&&e!==null&&t in e&&typeof e[t]=="string"}function kn(e,t=hY,n={}){if(Mk(e,"code")){const r=fY[e.code];if(r!==void 0)return typeof r=="function"?r(n):r}return Mk(e,"message")?e.message:t}const pY=async({contextLength:e,modelId:t,providerId:n})=>{const{apiClient:r}=Pe.getState();if(!r)throw new Error("Not connected");const i=await r.request(mA.SET_ACTIVE,{contextLength:e,modelId:t,providerId:n});if(!i.success&&i.error)throw new Error(i.error);return i},mY=({mutationConfig:e}={})=>dn({...e,mutationFn:pY});function j0({label:e}){return f.jsx(ii,{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 gY=3e5,yY=({providerId:e})=>{const{apiClient:t}=Pe.getState();return t?t.request(Cs.AWAIT_OAUTH_CALLBACK,{providerId:e},{timeout:gY}):Promise.reject(new Error("Not connected"))},xY=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Es().queryKey}),n?.(...i)},...r,mutationFn:yY})},bY=({apiKey:e,baseUrl:t,providerId:n})=>{const{apiClient:r}=Pe.getState();return r?r.request(Cs.CONNECT,{apiKey:e,baseUrl:t,providerId:n}):Promise.reject(new Error("Not connected"))},vY=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Es().queryKey}),n?.(...i)},...r,mutationFn:bY})},wY=({providerId:e})=>{const{apiClient:t}=Pe.getState();return t?t.request(Cs.DISCONNECT,{providerId:e}):Promise.reject(new Error("Not connected"))},SY=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Es().queryKey}),n?.(...i)},...r,mutationFn:wY})},UA=()=>{const{apiClient:e}=Pe.getState();return e?e.request(Iq.LIST):Promise.reject(new Error("Not connected"))},CY=e=>({enabled:e,queryFn:UA,queryKey:["team-list"]}),Av=({enabled:e=!0,queryConfig:t}={})=>Mn({...t,...CY(e)}),EY=({providerId:e})=>{const{apiClient:t}=Pe.getState();return t?t.request(Cs.SET_ACTIVE,{providerId:e}):Promise.reject(new Error("Not connected"))},kY=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Es().queryKey}),t.invalidateQueries({queryKey:Mf().queryKey}),n?.(...i)},...r,mutationFn:EY})},TY=({providerId:e})=>{const{apiClient:t}=Pe.getState();return t?t.request(Cs.START_OAUTH,{providerId:e}):Promise.reject(new Error("Not connected"))},NY=({mutationConfig:e}={})=>dn({...e,mutationFn:TY}),RY=({apiKey:e,providerId:t})=>{const{apiClient:n}=Pe.getState();return n?n.request(Cs.VALIDATE_API_KEY,{apiKey:e,providerId:t}):Promise.reject(new Error("Not connected"))},AY=({mutationConfig:e}={})=>dn({...e,mutationFn:RY});function qA(e){return e?Object.values(e).some(t=>t.tier!=="FREE"):!1}function VA(e){return e?Object.values(e).filter(t=>t.tier!=="FREE").map(t=>t.organizationId):[]}let Dk=(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 jY={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Md={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},OY={disabled:!1,...Md},O0={valid(e){return e===null?null:e?{[Dk.valid]:""}:{[Dk.invalid]:""}}},MY=S.createContext({invalid:void 0,name:void 0,validityData:{state:jY,errors:[],error:"",value:"",initialValue:null},setValidityData:Er,disabled:void 0,touched:Md.touched,setTouched:Er,dirty:Md.dirty,setDirty:Er,filled:Md.filled,setFilled:Er,focused:Md.focused,setFocused:Er,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:OY,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Bn)=>e,getInputValidationProps:(e=Bn)=>e,inputRef:{current:null},commit:async()=>{}}});function Lf(e=!0){const t=S.useContext(MY);if(t.setValidityData===Er&&!e)throw new Error(Cn(28));return t}const DY=S.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Er,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function jv(){return S.useContext(DY)}const _Y=S.createContext({controlId:void 0,registerControlId:Er,labelId:void 0,setLabelId:Er,messageIds:[],setMessageIds:Er,getDescriptionProps:e=>e});function M0(){return S.useContext(_Y)}function LY(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Wc({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=S.useRef(e!==void 0),[s,a]=S.useState(t),c=i?e:s,u=S.useCallback(h=>{i||a(h)},[]);return[c,u]}function Ov(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:s}=M0(),a=ki(t),c=n?i:void 0,u=sr(()=>Symbol("labelable-control")),h=S.useRef(!1),m=S.useRef(t!=null),p=tt(()=>{!h.current||s===Er||(h.current=!1,s(u.current,void 0))});return We(()=>{if(s===Er)return;let y;if(n){const x=r?.current;un(x)&&x.closest("label")!=null?y=t??null:y=c??a}else if(t!=null)m.current=!0,y=t;else if(m.current)y=a;else{p();return}if(y===void 0){p();return}h.current=!0,s(u.current,y)},[t,r,c,s,n,a,u,p]),S.useEffect(()=>p,[p]),i??a}function Mv(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:s,commit:a}=e,{formRef:c}=jv(),{invalid:u,markedDirtyRef:h,validityData:m,setValidityData:p}=Lf(),y=tt(e.getValue);We(()=>{if(!t)return;let x=n;x===void 0&&(x=y()),m.initialValue===null&&x!==null&&p(b=>({...b,initialValue:x}))},[t,p,n,m.initialValue,y]),We(()=>{!t||!r||c.current.fields.set(r,{getValue:y,name:i,controlRef:s,validityData:LY(m,u),validate(x=!0){let b=n;b===void 0&&(b=y()),h.current=!0,x?Ci.flushSync(()=>a(b)):a(b)}})},[a,s,t,c,y,r,u,h,i,m,n]),We(()=>{const x=c.current.fields;return()=>{r&&x.delete(r)}},[c,r])}const IY=S.forwardRef(function(t,n){const{render:r,className:i,id:s,name:a,value:c,disabled:u=!1,onValueChange:h,defaultValue:m,autoFocus:p=!1,...y}=t,{state:x,name:b,disabled:w,setTouched:E,setDirty:k,validityData:T,setFocused:N,setFilled:O,validationMode:j,validation:A}=Lf(),R=w||u,_=b??a,F={...x,disabled:R},{labelId:I}=M0(),H=Ov({id:s});We(()=>{const Y=c!=null;A.inputRef.current?.value||Y&&c!==""?O(!0):Y&&c===""&&O(!1)},[A.inputRef,O,c]);const q=S.useRef(null);We(()=>{p&&q.current===bi(Zt(q.current))&&N(!0)},[p,N]);const[V]=Wc({controlled:c,default:m,name:"FieldControl",state:"value"}),$=c!==void 0,U=$?V:void 0;return Mv({id:H,name:_,commit:A.commit,value:U,getValue:()=>A.inputRef.current?.value,controlRef:A.inputRef}),Ot("input",t,{ref:[n,q],state:F,props:[{id:H,disabled:R,name:_,ref:A.inputRef,"aria-labelledby":I,autoFocus:p,...$?{value:U}:{defaultValue:m},onChange(Y){const G=Y.currentTarget.value;h?.(G,kt(El,Y.nativeEvent)),k(G!==T.initialValue),O(G!=="")},onFocus(){N(!0)},onBlur(Y){E(!0),N(!1),j==="onBlur"&&A.commit(Y.currentTarget.value)},onKeyDown(Y){Y.currentTarget.tagName==="INPUT"&&Y.key==="Enter"&&(E(!0),A.commit(Y.currentTarget.value))}},A.getInputValidationProps(),y],stateAttributesMapping:O0})}),PY=S.createContext({disabled:!1});function zY(){return S.useContext(PY)}const FY=S.createContext(void 0);function BY(e=!0){const t=S.useContext(FY);if(t===void 0&&!e)throw new Error(Cn(3));return t}const HY=S.forwardRef(function(t,n){return f.jsx(IY,{ref:n,...t})});function Ki({className:e,type:t,...n}){return f.jsx(HY,{type:t,"data-slot":"input",className:se("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 UY({error:e,isOptional:t,isValidating:n,onBack:r,onSubmit:i,provider:s}){const[a,c]=S.useState("");return f.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[f.jsx(Vr,{children:f.jsxs($r,{className:"flex items-center gap-2",children:[f.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:r,type:"button",children:f.jsx(ya,{className:"size-5"})}),"Selecting ",s.name]})}),f.jsxs("div",{className:"flex flex-col gap-4",children:[s.apiKeyUrl&&f.jsxs("p",{className:"text-muted-foreground text-sm",children:["Get your API key at"," ",f.jsx("a",{className:"underline hover:text-foreground",href:s.apiKeyUrl,rel:"noopener noreferrer",target:"_blank",children:s.apiKeyUrl})]}),e&&f.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:e}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("label",{className:"text-foreground text-sm font-medium",htmlFor:"api-key",children:["Enter your ",s.name," API key"]}),f.jsx(Ki,{id:"api-key",onChange:u=>c(u.target.value),placeholder:"Enter key",type:"password",value:a})]})]}),f.jsxs(Na,{className:"mt-auto",children:[f.jsx(ze,{onClick:r,variant:"secondary",children:"Cancel"}),f.jsx(ze,{disabled:!t&&!a.trim()||n,onClick:()=>i(a.trim()),children:n?"Validating...":"Change"})]})]})}function qY({onBack:e,onSelect:t,provider:n}){return f.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[f.jsx(Vr,{children:f.jsxs($r,{className:"flex items-center gap-2",children:[f.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:f.jsx(ya,{className:"size-5"})}),"Connect ",n.name]})}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.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:[f.jsx(_$,{className:"text-muted-foreground size-5"}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:n.oauthLabel??"Sign in with browser"}),f.jsx("span",{className:"text-muted-foreground text-xs",children:"Authenticate via OAuth in your browser"})]})]}),f.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:[f.jsx(P$,{className:"text-muted-foreground size-5"}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:"Enter API key"}),f.jsx("span",{className:"text-muted-foreground text-xs",children:"Paste your API key manually"})]})]})]}),f.jsx(Na,{className:"mt-auto",children:f.jsx(ze,{onClick:e,variant:"secondary",children:"Cancel"})})]})}function VY(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 $Y({error:e,onBack:t,onSubmit:n,provider:r}){const[i,s]=S.useState(""),[a,c]=S.useState(),u=a??e,h=S.useCallback(()=>{const m=i.trim().replace(/\/+$/,""),p=VY(m);if(p){c(p);return}c(void 0),n(m)},[i,n]);return f.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[f.jsx(Vr,{children:f.jsxs($r,{className:"flex items-center gap-2",children:[f.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:t,type:"button",children:f.jsx(ya,{className:"size-5"})}),"Selecting ",r.name]})}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("label",{className:"text-foreground text-sm font-medium",htmlFor:"base-url",children:"Enter endpoint manually"}),f.jsx(Ki,{id:"base-url",onChange:m=>{s(m.target.value),c(void 0)},placeholder:"http://localhost:11434/v1",value:i}),u&&f.jsx("p",{className:"text-destructive text-sm",children:u})]}),f.jsxs(Na,{className:"mt-auto",children:[f.jsx(ze,{onClick:t,variant:"secondary",children:"Cancel"}),f.jsx(ze,{disabled:!i.trim(),onClick:h,children:"Change"})]})]})}const $A=()=>{const{apiClient:e}=Pe.getState();return e?e.request(jf.START_LOGIN,{skipBrowserLaunch:!0}):Promise.reject(new Error("Not connected"))},YA=e=>{const{apiClient:t}=Pe.getState();return t?t.on(jf.LOGIN_COMPLETED,e):()=>{}};function Dv(e){try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}const YY=2500,WY=800;function GY(e){return new Promise(t=>{setTimeout(t,e)})}function KY({onAuthenticated:e,onBack:t,popup:n}){const r=tn(),i=Ur(x=>x.isAuthorized),s=Ur(x=>x.setLoggingIn),a=Pe(x=>x.selectedProject),[c,u]=S.useState({type:"starting"}),[h,m]=S.useState(0),p=S.useRef(!1);S.useEffect(()=>{if(p.current)return;p.current=!0,s(!0);let x=!1;async function b(){try{const[w]=await Promise.all([$A(),GY(WY)]);if(x)return;if(!Dv(w.authUrl)){n?.close(),u({message:"Received an unsafe OAuth URL from the daemon",type:"error"}),s(!1);return}n&&!n.closed?(n.location.href=w.authUrl,u({authUrl:w.authUrl,type:"waiting"})):u({authUrl:w.authUrl,type:"blocked"})}catch(w){if(x)return;s(!1),u({message:w instanceof Error?w.message:"Unable to start login",type:"error"})}}return b().catch(()=>{}),()=>{x=!0}},[n,s,h]),S.useEffect(()=>{i&&c.type==="waiting"&&(s(!1),e())},[i,e,s,c.type]),S.useEffect(()=>c.type!=="waiting"?void 0:YA(b=>{b.success&&b.user?r.invalidateQueries({queryKey:ys}):u({message:b.error??"Authentication failed",type:"error"}),s(!1)}),[r,s,c.type]),S.useEffect(()=>{if(c.type!=="waiting")return;let x=!1;async function b(){try{const E=await r.fetchQuery(fv(a));if(x)return;E.isAuthorized&&(r.invalidateQueries({queryKey:ys}),s(!1))}catch{}}const w=globalThis.setInterval(b,YY);return()=>{x=!0,globalThis.clearInterval(w)}},[r,a,s,c.type]);function y(){p.current=!1,u({type:"starting"}),m(x=>x+1)}return f.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[f.jsx(Vr,{children:f.jsxs($r,{className:"flex items-center gap-2",children:[f.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:t,type:"button",children:f.jsx(ya,{className:"size-5"})}),"Signing in to ByteRover"]})}),f.jsxs("div",{className:"flex flex-col gap-4",children:[c.type==="starting"&&f.jsxs("div",{className:"border-primary/30 bg-primary/5 flex items-center gap-2 rounded-lg border p-3 text-sm",children:[f.jsx(qr,{className:"text-primary-foreground size-4 animate-spin"}),"Preparing sign-in…"]}),c.type==="waiting"&&f.jsxs("div",{className:"border-primary/30 bg-primary/5 flex flex-col gap-1 rounded-lg border p-3",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(qr,{className:"text-primary-foreground size-4 animate-spin"}),"Finish signing in in the new tab."]}),f.jsxs("div",{className:"text-muted-foreground pl-6 text-xs",children:["If the tab didn’t open,"," ",f.jsx("a",{className:"underline underline-offset-2",href:c.authUrl,rel:"noopener noreferrer",target:"_blank",children:"click this link"}),"."]})]}),c.type==="blocked"&&f.jsxs("div",{className:"border-border bg-muted text-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[f.jsx(_m,{className:"size-4 shrink-0"}),"Your browser blocked the sign-in popup."]}),c.type==="error"&&f.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:c.message})]}),f.jsxs(Na,{className:"mt-auto",children:[f.jsx(ze,{onClick:t,variant:"secondary",children:"Use a different provider"}),c.type==="error"&&f.jsx(ze,{onClick:y,children:"Retry sign-in"}),c.type==="blocked"&&f.jsxs(ze,{onClick:()=>{window.open(c.authUrl,"_blank","noopener,noreferrer"),u({authUrl:c.authUrl,type:"waiting"})},children:[f.jsx(_m,{className:"size-3.5"}),"Open sign-in page"]}),(c.type==="starting"||c.type==="waiting")&&f.jsx(ze,{disabled:!0,children:"Waiting…"})]})]})}const QY=({providerId:e})=>{const{apiClient:t}=Pe.getState();return t?t.request(mA.LIST,{providerId:e}):Promise.reject(new Error("Not connected"))},XY=e=>({queryFn:()=>QY({providerId:e}),queryKey:["models",e]}),WA=({providerId:e,queryConfig:t})=>Mn({...XY(e),...t});function ZY({onBack:e,onSelect:t,providerId:n}){const[r,i]=S.useState(""),{data:s,isLoading:a}=WA({providerId:n}),[c,u]=S.useState(),h=S.useMemo(()=>s?.models??[],[s?.models]);S.useEffect(()=>{s?.activeModel&&!c&&u(s.activeModel)},[s?.activeModel,c]);const m=S.useMemo(()=>{if(!r)return h;const y=r.toLowerCase();return h.filter(x=>x.name.toLowerCase().includes(y)||x.id.toLowerCase().includes(y))},[h,r]),p=S.useMemo(()=>h.find(y=>y.id===c),[h,c]);return a?f.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[f.jsx(Vr,{children:f.jsxs($r,{className:"flex items-center gap-2",children:[f.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:f.jsx(ya,{className:"size-5"})}),"Choose model"]})}),f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx(qr,{className:"text-muted-foreground size-5 animate-spin"})})]}):f.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[f.jsx(Vr,{children:f.jsxs($r,{className:"flex items-center gap-2",children:[f.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:e,type:"button",children:f.jsx(ya,{className:"size-5"})}),"Choose model"]})}),f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{className:"relative",children:[f.jsx(lu,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),f.jsx(Ki,{className:"pl-9",onChange:y=>i(y.target.value),placeholder:"Search...",value:r})]}),f.jsxs("div",{className:"max-h-96 overflow-y-auto",children:[m.map(y=>{const x=y.id===c;return f.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:()=>u(y.id),type:"button",children:[f.jsx("span",{className:"text-foreground text-sm",children:y.name}),x&&f.jsx(Ra,{className:"text-primary size-4"})]},y.id)}),m.length===0&&f.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No models found"})]})]}),f.jsxs(Na,{className:"mt-auto",children:[f.jsx(ze,{onClick:e,variant:"secondary",children:"Cancel"}),f.jsx(ze,{disabled:!p,onClick:()=>p&&t(p),children:"Confirm"})]})]})}function JY({error:e,onAction:t,onBack:n,provider:r}){const{data:i}=WA({providerId:r.id}),s=i?.activeModel,a=r.id==="byterover";return f.jsxs("div",{className:"flex flex-1 flex-col gap-6",children:[f.jsx(Vr,{children:f.jsxs($r,{className:"flex items-center gap-2",children:[f.jsx("button",{className:"hover:bg-muted rounded p-0.5 transition-colors",onClick:n,type:"button",children:f.jsx(ya,{className:"size-5"})}),r.name]})}),f.jsxs("div",{className:"flex flex-col gap-4",children:[e&&f.jsx("div",{className:"text-destructive bg-destructive/10 rounded-lg px-4 py-2.5 text-sm",children:e}),a?f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:"Status"}),f.jsx("span",{className:"text-muted-foreground text-sm",children:r.isConnected?"Connected":"Not connected"})]}),r.isConnected&&f.jsx(ze,{onClick:()=>t("disconnect"),size:"sm",variant:"outline",children:"Disconnect"})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:"Model"}),f.jsx("span",{className:"text-muted-foreground text-sm",children:s??"Not selected"})]}),f.jsx(ze,{onClick:()=>t("change_model"),size:"sm",variant:"outline",children:"Change"})]}),f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:r.authMethod==="oauth"?"OAuth":"API Key"}),f.jsx("span",{className:"text-muted-foreground text-sm",children:r.authMethod==="oauth"?"Authenticated via browser":"****************"})]}),f.jsx(ze,{onClick:()=>t("disconnect"),size:"sm",variant:"outline",children:"Disconnect"})]})]})]}),!r.isCurrent&&f.jsxs(Na,{className:"mt-auto",children:[f.jsx(ze,{onClick:n,variant:"secondary",children:"Cancel"}),f.jsx(ze,{onClick:()=>t("activate"),children:"Active"})]})]})}const eW=()=>{const{apiClient:e}=Pe.getState();return e?e.request(Lq.GET_ENVIRONMENT):Promise.reject(new Error("Not connected"))},tW=()=>({queryFn:eW,queryKey:["config","environment"],staleTime:1/0}),_v=({queryConfig:e}={})=>Mn({...tW(),...e}),nW=()=>{const{apiClient:e}=Pe.getState();return e?e.request(R0.GET_FREE_USER_LIMIT):Promise.reject(new Error("Not connected"))},rW=e=>({enabled:e,queryFn:nW,queryKey:["billing-free-user-limit"],refetchInterval:6e4}),iW=({enabled:e=!0,queryConfig:t}={})=>Mn({...t,...rW(e)}),oW=90;function GA(e){if(!e)return"inactive";const{limitExceeded:t,percentUsed:n,remaining:r}=e;return t||r<=0?"danger":n>=oW?"warn":"ok"}function KA({preferredOrgId:e}={}){const t=Ur(w=>w.isAuthorized),{data:n}=wA({enabled:t}),r=n?.usage??{},i=VA(r),s=i.length>0,{data:a}=iW({enabled:t&&n!==void 0&&!s}),c=a?.limit?.monthly,u=e?r[e]:void 0,h=i.length===1?r[i[0]]:void 0,m=s?u??h:void 0,p=m!==void 0&&m.tier!=="FREE",y=m??c,x=GA(y),b=i.length>1&&m===void 0;return{billingSource:y,billingTone:x,hasPaidTeam:s,needsPickPrompt:b,paidOrg:p?m:void 0,showCreditPill:y!==void 0,usagesByOrg:r}}function QA({teamSlug:e,webAppUrl:t}){return!e||!t?void 0:`${t.replace(/\/+$/,"")}/settings/${encodeURIComponent(e)}/billing`}function D0(e){return e<=0?"0":e<1e3?String(e):e>=999500?_k((e/1e6).toFixed(1))+"m":_k((e/1e3).toFixed(1))+"k"}function _k(e){return e.endsWith(".0")?e.slice(0,-2):e}function or({className:e,...t}){return f.jsx("div",{"data-slot":"skeleton",className:se("animate-pulse rounded-md bg-muted",e),...t})}const XA={danger:"border-destructive/40 bg-destructive/15 text-destructive",inactive:"border-border bg-muted text-muted-foreground",ok:"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground",warn:"border-amber-500/50 bg-amber-500/15 text-amber-400"};function ZA({tone:e,usage:t}){return t?f.jsxs(ii,{className:se("mono h-[18px] rounded-sm px-1.5 text-[11px] font-medium leading-none",XA[e]),variant:"outline",children:[D0(t.remaining)," cr"]}):f.jsx(or,{className:"h-[18px] w-12 rounded-sm"})}const sW="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",aW="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",lW="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",cW="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",uW="/assets/deepinfra-provider-C9hH_wkN.svg",dW="data:image/svg+xml,%3csvg%20viewBox='18%2021%2028%2023'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDeepSeek%20icon%3c/title%3e%3cg%20transform='translate(19.2,%2019.2)'%20fill='%23D4D4D4'%3e%3cpath%20d='M23.748%204.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434%201.202-.422%201.84.027%201.436.633%202.58%201.838%203.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526%205.526%200%2001-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365%2011.365%200%2000-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055%203.055%200%2001-.465.137%209.597%209.597%200%2000-2.883-.102c-1.885.21-3.39%201.102-4.497%202.623C.082%208.606-.231%2010.684.152%2012.85c.403%202.284%201.569%204.175%203.36%205.653%201.858%201.533%203.997%202.284%206.438%202.14%201.482-.085%203.133-.284%204.994-1.86.47.234.962.327%201.78.397.63.059%201.236-.03%201.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926%201.096-1.296%202.746-2.642%203.392-7.003.05-.347.007-.565%200-.845-.004-.17.035-.237.23-.256a4.173%204.173%200%20001.545-.475c1.396-.763%201.96-2.015%202.093-3.517.02-.23-.004-.467-.247-.588zM11.581%2018c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696%204.696%200%20011.529-.039c2.132.312%203.946%201.265%205.468%202.774.868.86%201.525%201.887%202.202%202.891.72%201.066%201.494%202.082%202.48%202.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306%200%2001.415-.287.302.302%200%2001.2.288.306.306%200%2001-.31.307.303.303%200%2001-.304-.308zm3.11%201.596c-.2.081-.399.151-.59.16a1.245%201.245%200%2001-.798-.254c-.274-.23-.47-.358-.552-.758a1.73%201.73%200%2001.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559%200%2001-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136%201.146.016.352.144.618.408%201.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'%20fill='%23D4D4D4'/%3e%3c/g%3e%3c/svg%3e",fW="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",hW="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",pW="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",mW="/assets/minimax-provider-BqW25BvT.svg",gW="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",Lk="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",yW="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",xW="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",bW="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",vW="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",wW="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",Ik="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",SW={anthropic:sW,byterover:aW,cerebras:lW,cohere:cW,deepinfra:uW,deepseek:dW,glm:Ik,"glm-coding-plan":Ik,google:fW,groq:hW,minimax:mW,mistral:gW,moonshot:pW,openai:Lk,"openai-compatible":Lk,openrouter:yW,perplexity:xW,togetherai:bW,vercel:vW,xai:wW},Lm="byterover";function CW(e){const t=e.find(n=>n.id===Lm);return t?[t,...e.filter(n=>n.id!==Lm)]:e}function EW({remaining:e,topUpUrl:t}){return f.jsxs("div",{className:"border-destructive/40 bg-destructive/10 flex gap-2.5 rounded-md border px-3 py-2.5",children:[f.jsx(BA,{className:"text-destructive mt-0.5 size-4 shrink-0"}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:"ByteRover team is out of credits"}),f.jsx("p",{className:"text-muted-foreground text-xs leading-snug",children:e<=0?"Pick another team, top up, or switch to a bring-your-own-key provider below.":`Only ${D0(e)} credits remaining.`})]}),t&&f.jsx(ze,{className:"shrink-0",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),size:"sm",children:"Top up"})]})}function kW({onSelect:e,providers:t}){const[n,r]=S.useState(""),{data:i}=pv(),s=S.useMemo(()=>t.find(w=>w.id===Lm&&w.isCurrent),[t]),{billingSource:a,billingTone:c,paidOrg:u}=KA({preferredOrgId:i?.teamId}),h=s!==void 0&&c==="danger"&&a!==void 0,{data:m}=_v(),{data:p}=Av(),y=p?.teams?.find(w=>w.id===u?.organizationId)?.slug,x=QA({teamSlug:y,webAppUrl:m?.webAppUrl}),b=S.useMemo(()=>{const w=CW(t);if(!n)return w;const E=n.toLowerCase();return w.filter(k=>k.name.toLowerCase().includes(E))},[t,n]);return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-5",children:[f.jsxs(Vr,{children:[f.jsx($r,{children:"Pick a provider to power curate & query"}),f.jsx(bl,{children:"ByteRover routes LLM calls through your chosen provider. You can change this later."})]}),h&&a&&f.jsx(EW,{remaining:a.remaining,topUpUrl:x}),f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3",children:[f.jsxs("div",{className:"relative",children:[f.jsx(lu,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),f.jsx(Ki,{className:"pl-9",onChange:w=>r(w.target.value),placeholder:"Search...",value:n})]}),f.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pr-4 -mr-4 [scrollbar-gutter:stable]",children:b.map(w=>{const E=SW[w.id],k=w.isCurrent,T=w.id===Lm,N=T&&k&&h;return f.jsxs("button",{className:se("group/row flex w-full cursor-pointer items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",N?"border-destructive/40 bg-destructive/5":k?"border-primary-foreground/40 bg-primary/5":"border-border hover:border-foreground/25"),onClick:()=>e(w),title:w.description,type:"button",children:[f.jsx("div",{className:"bg-muted/50 grid size-7 shrink-0 place-items-center overflow-hidden rounded-md",children:E&&f.jsx("img",{alt:"",className:"size-5",src:E})}),f.jsxs("div",{className:"min-w-0 flex-1 space-y-0.5",children:[f.jsxs("div",{className:"text-foreground flex flex-wrap items-center gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium truncate",children:w.name}),T&&f.jsx(ii,{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"}),T&&f.jsx(ii,{className:"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground h-[18px] rounded-sm px-1.5 text-[11px] font-medium leading-none",variant:"outline",children:"Credits included"}),T&&k&&a&&f.jsx(ZA,{tone:c,usage:a})]}),f.jsx("div",{className:"text-muted-foreground min-h-lh truncate text-xs",children:w.description})]}),f.jsx("div",{className:se("grid size-[18px] shrink-0 place-items-center rounded-full border transition-colors",k?"bg-primary-foreground border-primary-foreground":"border-border"),children:k&&f.jsx(Ra,{className:"text-background size-3",strokeWidth:3})})]},w.id)})})]})]})}function _0(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 TW=(e,t)=>{const{apiClient:n}=Pe.getState();return n?n.request(R0.SET_PINNED_TEAM,{projectPath:e,teamId:t}):Promise.reject(new Error("Not connected"))},NW=()=>{const e=tn();return dn({mutationFn:t=>TW(Pe.getState().selectedProject,t),async onSuccess(){await e.invalidateQueries({queryKey:hv})}})};function RW(e){const{paidOrganizationIds:t,pinnedTeamId:n,teams:r,workspaceTeamId:i}=e;if(n&&r.some(s=>s.id===n))return n;if(t.length!==0){if(t.length===1)return t[0];if(i)return i}}function AW({avatar:e,badges:t,credits:n,meta:r,name:i,onSelect:s,selected:a}){return f.jsxs("button",{className:se("group/row flex w-full cursor-pointer items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",a?"border-primary-foreground/40 bg-primary/5":"border-border hover:border-foreground/25"),onClick:s,type:"button",children:[e,f.jsxs("div",{className:"min-w-0 flex-1 space-y-0.5",children:[f.jsxs("div",{className:"text-foreground flex flex-wrap items-center gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium truncate",children:i}),t]}),r&&f.jsx("div",{className:"text-muted-foreground min-h-lh truncate text-xs",children:r})]}),n,f.jsx("div",{className:se("grid size-4.5 shrink-0 place-items-center rounded-full border transition-colors",a?"bg-primary-foreground border-primary-foreground":"border-border"),children:a&&f.jsx(Ra,{className:"text-background size-3",strokeWidth:3})})]})}function Pk({onBack:e}){return f.jsxs("button",{className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 self-start text-xs",onClick:e,type:"button",children:[f.jsx(ya,{className:"size-3"})," Back"]})}function jW({avatarUrl:e,name:t}){return f.jsx("div",{className:"bg-muted/50 grid size-7 shrink-0 place-items-center overflow-hidden rounded-md",children:e?f.jsx("img",{alt:"",className:"size-full object-cover",src:e}):f.jsx("span",{className:"text-muted-foreground text-[10px] font-medium",children:_0(t)})})}const OW={FREE:"Free",PRO:"Pro",TEAM:"Team"},MW={FREE:"border-gray-700 bg-gray-900 text-gray-300",PRO:"border-orange-800 bg-orange-950 text-orange-400",TEAM:"border-blue-800 bg-blue-950 text-blue-400"};function JA({children:e,className:t}){return f.jsx(ii,{className:se("h-4.5 rounded-sm px-1.5 text-[11px] font-medium leading-none",t??"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground"),variant:"outline",children:e})}function DW({isTrialing:e,tier:t}){return f.jsxs(JA,{className:MW[t],children:[OW[t],e?" · trial":""]})}function _W({onBack:e,onComplete:t}){const n=Ur(_=>_.brvConfig?.teamId),{data:r,error:i,isLoading:s}=Av(),{data:a,isLoading:c}=pv(),u=NW(),h=r?.teams??[],{data:m}=wA(),p=S.useMemo(()=>m?.usage??{},[m?.usage]),y=a?.teamId,x=S.useMemo(()=>VA(p),[p]),b=S.useMemo(()=>RW({paidOrganizationIds:x,pinnedTeamId:y,teams:h,workspaceTeamId:n}),[x,y,h,n]),[w,E]=S.useState(b);S.useEffect(()=>{E(b)},[b]);const k=u.isPending,T=s||c,N=w!==y,O=w!==void 0&&h.some(_=>_.id===w),j=N&&O&&!k,A=!T&&!i&&!qA(p);async function R(){if(w!==void 0)try{const _=await u.mutateAsync(w);if(!_.success){lt.error(_.error??"Failed to update billing team.");return}const F=h.find(I=>I.id===w);lt.success(`ByteRover usage will be billed to ${F?.displayName??w}.`),t()}catch(_){lt.error(kn(_,"Failed to update billing team."))}}return A?f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-5",children:[f.jsxs(Vr,{children:[f.jsx(Pk,{onBack:e}),f.jsx($r,{children:"ByteRover billing"}),f.jsx(bl,{children:"You don't belong to any paid teams. ByteRover usage uses your free monthly credits."})]}),f.jsx("div",{className:"border-border mt-auto flex items-center justify-end gap-2 border-t pt-3",children:f.jsx(ze,{onClick:t,children:"Got it"})})]}):f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-5",children:[f.jsxs(Vr,{children:[f.jsx(Pk,{onBack:e}),f.jsx($r,{children:"Pick a team to bill"}),f.jsx(bl,{children:"ByteRover credits are charged to a team. Pick which team this project should bill."})]}),i?f.jsx("p",{className:"text-destructive text-sm",children:kn(i,"Failed to load teams.")}):f.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pr-4 -mr-4 [scrollbar-gutter:stable]",children:T&&h.length===0?f.jsxs(f.Fragment,{children:[f.jsx(or,{className:"h-12"}),f.jsx(or,{className:"h-12"})]}):h.map(_=>{const F=p[_.id],I=_.id===n?"Workspace":_.isDefault?"Default":void 0;return f.jsx(AW,{avatar:f.jsx(jW,{avatarUrl:_.avatarUrl,name:_.displayName}),badges:f.jsxs(f.Fragment,{children:[F&&f.jsx(DW,{isTrialing:F.isTrialing,tier:F.tier}),I&&f.jsx(JA,{children:I})]}),credits:f.jsx(ZA,{tone:GA(F),usage:F}),name:_.displayName,onSelect:()=>E(_.id),selected:w===_.id},_.id)})}),f.jsx("div",{className:"border-border flex items-center justify-end gap-2 border-t pt-3",children:f.jsx(ze,{disabled:!j,onClick:()=>R(),children:k?f.jsx(qr,{className:"size-4 animate-spin"}):"Confirm"})})]})}const hd="byterover",LW=6,IW=1e3;function PW(e){return new Promise(t=>{setTimeout(t,e)})}function L0({onOpenChange:e,onProviderActivated:t,open:n,tourStepLabel:r}){const[i,s]=S.useState("select"),[a,c]=S.useState(),[u,h]=S.useState(),[m,p]=S.useState(),[y,x]=S.useState(!1),b=S.useRef(null),w=Ur(D=>D.isAuthorized),E=Pe(D=>D.selectedProject),k=tn(),{data:T}=dv(),N=vY(),O=SY(),j=kY(),A=AY(),R=NY(),_=xY(),F=mY(),I=T?.providers??[];S.useEffect(()=>{n&&k.invalidateQueries({queryKey:Es().queryKey})},[n,k]);const H=S.useCallback(()=>{s("select"),c(void 0),h(void 0),p(void 0),x(!1)},[]),q=S.useCallback(()=>{e(!1),setTimeout(H,150)},[e,H]),V=S.useCallback(D=>{D?e(!0):(e(!1),setTimeout(H,150))},[e,H]),$=S.useCallback(async D=>{s("connecting");try{let Q=await N.mutateAsync({providerId:D.id});for(let de=0;!Q.success&&de<LW;de++)await PW(IW),Q=await N.mutateAsync({providerId:D.id});if(!Q.success){lt.error(Q.error??"Failed to connect ByteRover"),s("select");return}await j.mutateAsync({providerId:D.id}),lt.success(`Connected to ${D.name}`),t?.();const J=(await xA(E)).teamId;if(J){const Se=(await UA()).teams?.find(Re=>Re.id===J)?.displayName;lt.success(`ByteRover usage will be billed to ${Se??"your previously selected team"}.`),q();return}const he=await bA().catch(()=>{});if(!qA(he?.usage)){lt.success("ByteRover usage uses your free monthly credits."),q();return}s("team_select")}catch(Q){lt.error(kn(Q,"Connection failed")),s("select")}},[N,t,q,j]),U=S.useCallback(async D=>{if(c(D),p(void 0),D.id===hd&&!w){b.current=window.open("about:blank","_blank"),s("login_prompt");return}if(D.id===hd&&D.isCurrent){s("team_select");return}if(D.id===hd){s("provider_actions");return}if(D.isConnected){s("provider_actions");return}if(D.id==="openai-compatible"){s("base_url");return}if(D.supportsOAuth){s("auth_method");return}if(D.requiresApiKey){s("api_key");return}s("connecting");try{await N.mutateAsync({providerId:D.id}),x(!0),s("model_select")}catch(Q){lt.error(kn(Q,"Connection failed")),s("select")}},[$,N,w,t,q]),P=S.useCallback(async D=>{s("connecting");try{const Q=await R.mutateAsync({providerId:D.id});if(!Q.success){lt.error(Q.error??"Failed to start OAuth"),s("select");return}const ee=await _.mutateAsync({providerId:D.id});ee.success?(x(!0),s("model_select")):(lt.error(ee.error??"OAuth failed"),s("select"))}catch(Q){lt.error(kn(Q,"OAuth failed")),s("select")}},[_,R]),Y=S.useCallback(async D=>{if(a)switch(D){case"activate":{if(a.id===hd&&!a.isConnected){await $(a);break}s("connecting");try{await j.mutateAsync({providerId:a.id}),lt.success(`Activated ${a.name}`),t?.(),a.id===hd?s("team_select"):q()}catch(Q){p(kn(Q,"Failed")),s("provider_actions")}break}case"change_model":{s("model_select");break}case"disconnect":{s("connecting");try{await O.mutateAsync({providerId:a.id}),lt.success(`Disconnected ${a.name}`),s("select"),c(void 0),p(void 0)}catch(Q){p(kn(Q,"Failed")),s("provider_actions")}break}case"reconfigure":{s("base_url");break}case"reconnect_oauth":{await P(a);break}case"replace":{s("api_key");break}}},[$,O,P,t,q,a,j]),G=S.useCallback(D=>{h(D),s("api_key")},[]),X=S.useCallback(async D=>{if(a){if(a.id!=="openai-compatible"&&D)try{const Q=await A.mutateAsync({apiKey:D,providerId:a.id});if(!Q.isValid){p(Q.error??"Invalid API key");return}}catch(Q){p(kn(Q,"Validation failed"));return}s("connecting");try{await N.mutateAsync({apiKey:D||void 0,baseUrl:u??void 0,providerId:a.id}),x(!0),s("model_select")}catch(Q){p(kn(Q,"Connection failed")),s("api_key")}}},[u,N,a,A]),L=S.useCallback(async D=>{if(a)try{await F.mutateAsync({contextLength:D.contextLength,modelId:D.id,providerId:a.id}),y?(lt.success(`Connected to ${a.name}`),t?.(),q()):(lt.success(`Model set to ${D.name}`),s("provider_actions"))}catch(Q){lt.error(kn(Q,"Failed to set model"))}},[y,t,q,a,F]),B=S.useCallback(()=>{p(void 0),a?.id==="openai-compatible"?s("base_url"):a?.supportsOAuth?s("auth_method"):s("select")},[a]),W=()=>{switch(i){case"api_key":return a?f.jsx(UY,{error:m,isOptional:a.id==="openai-compatible",isValidating:A.isPending,onBack:B,onSubmit:D=>X(D),provider:a}):null;case"auth_method":return a?f.jsx(qY,{onBack:()=>{s("select"),c(void 0),p(void 0)},onSelect:D=>{D==="oauth"?P(a):s("api_key")},provider:a}):null;case"base_url":return a?f.jsx($Y,{error:m,onBack:()=>{s("select"),p(void 0)},onSubmit:G,provider:a}):null;case"connecting":return f.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[f.jsx(qr,{className:"text-primary size-6 animate-spin"}),f.jsxs("p",{className:"text-muted-foreground text-sm",children:["Connecting to ",a?.name,"..."]})]});case"login_prompt":return a?f.jsx(KY,{onAuthenticated:()=>{$(a)},onBack:()=>{s("select"),c(void 0)},popup:b.current}):null;case"model_select":return a?f.jsx(ZY,{onBack:()=>{s(y?"select":"provider_actions")},onSelect:L,providerId:a.id}):null;case"provider_actions":return a?f.jsx(JY,{error:m,onAction:Y,onBack:()=>{s("select"),c(void 0),p(void 0)},provider:a}):null;case"select":return f.jsx(kW,{onSelect:D=>U(D),providers:I});case"team_select":return f.jsx(_W,{onBack:()=>{s("select"),c(void 0),p(void 0)},onComplete:()=>{t?.(),q()}});default:return null}};return f.jsx(Al,{onOpenChange:V,open:n,children:f.jsxs(jl,{className:"flex h-150 flex-col sm:max-w-lg",showCloseButton:i==="select"||i==="model_select"||i==="connecting"||i==="login_prompt"||i==="team_select",children:[r&&f.jsx(j0,{label:r}),W()]})})}function zW(){const e=Ht(c=>c.tourActive),t=Ht(c=>c.tourStep),n=Ht(c=>c.advanceTour),r=Ht(c=>c.exitTour),i=Cl(),s=e&&t==="connector",a=()=>{n(),i("/configuration")};return f.jsx(Al,{onOpenChange:c=>!c&&r(),open:s,children:f.jsxs(jl,{className:"flex flex-col gap-5 p-6 sm:max-w-[460px]",children:[f.jsx(j0,{label:"Step 4 of 4 · Optional"}),f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{className:"bg-primary/12 text-primary-foreground grid size-10 place-items-center rounded-lg",children:f.jsx(FA,{className:"size-5"})}),f.jsx("h2",{className:"text-foreground text-base font-semibold",children:"Use ByteRover from your AI agent"}),f.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"," ",f.jsx("span",{className:"text-foreground font-medium",children:"Configuration"})," tab."]})]}),f.jsxs("div",{className:"border-border -mx-6 -mb-6 mt-2 flex items-center gap-2 border-t px-6 py-4",children:[f.jsx(ze,{onClick:()=>n(),type:"button",variant:"ghost",children:"Maybe later"}),f.jsx("div",{className:"flex-1"}),f.jsxs(ze,{onClick:a,type:"button",children:["Open Configuration",f.jsx(LA,{className:"size-4"})]})]})]})})}function FW(){return Ht.getState().tourStep==="provider"}function BW(){const e=Ht(i=>i.tourActive),t=Ht(i=>i.tourStep),n=Ht(i=>i.exitTour),r=Ht(i=>i.advanceTour);return!e||!t?null:f.jsxs(f.Fragment,{children:[t==="provider"&&f.jsx(L0,{onOpenChange:i=>{i||FW()&&n()},onProviderActivated:()=>r(),open:!0,tourStepLabel:"Step 1 of 4"}),f.jsx(zW,{})]})}function HW({className:e,curveFrom:t,direction:n}){const r=t==="right";return f.jsx("svg",{"aria-hidden":!0,className:se("h-12 w-6",e),fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 48",children:n==="up"?r?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M 18 46 Q 4 30 12 4",stroke:"currentColor"}),f.jsx("path",{d:"M 7 9 L 12 4 L 13 11",stroke:"currentColor"})]}):f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M 6 46 Q 20 30 12 4",stroke:"currentColor"}),f.jsx("path",{d:"M 11 11 L 12 4 L 17 9",stroke:"currentColor"})]}):r?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M 18 2 Q 4 18 12 44",stroke:"currentColor"}),f.jsx("path",{d:"M 7 39 L 12 44 L 13 37",stroke:"currentColor"})]}):f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M 6 2 Q 20 18 12 44",stroke:"currentColor"}),f.jsx("path",{d:"M 11 37 L 12 44 L 17 39",stroke:"currentColor"})]})})}function Lv({active:e,align:t="center",children:n,className:r,label:i,side:s="bottom"}){if(!e)return f.jsx(f.Fragment,{children:n});const a=t==="end"?"left":"right";return f.jsxs("span",{className:se("relative z-50 inline-flex",r),children:[f.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}),f.jsx("span",{"aria-hidden":!0,className:se("pointer-events-none absolute left-1/2 -translate-x-1/2",s==="bottom"?"top-full mt-1":"bottom-full mb-1"),children:f.jsx(HW,{curveFrom:a,direction:s==="bottom"?"up":"down"})}),f.jsx("span",{"aria-hidden":!0,className:se("pointer-events-none absolute",s==="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:f.jsx("span",{className:"text-xl whitespace-nowrap font-medium tracking-wide leading-tight",children:i})})]})}function UW(){const e=Ht(i=>i.seenWelcome),t=Ht(i=>i.dismissWelcome),n=Ht(i=>i.startTour),r=Pe(i=>i.selectedProject);return e?null:f.jsx(Al,{onOpenChange:i=>!i&&t(),open:!0,children:f.jsxs(jl,{className:"flex max-w-[420px] flex-col items-center gap-6 p-8 text-center sm:max-w-[420px]",showCloseButton:!1,children:[f.jsx("img",{alt:"Byterover",className:"size-11",src:nv}),f.jsxs(Vr,{className:"flex flex-col gap-2.5",children:[f.jsx($r,{className:"text-foreground text-xl font-semibold tracking-tight",children:"Welcome to ByteRover"}),f.jsxs(bl,{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"," ",f.jsx("span",{className:"text-foreground font-medium",children:"Help"})," menu in the top-right."]})]}),f.jsxs("div",{className:"flex w-full max-w-[300px] flex-col gap-2",children:[f.jsxs(ze,{onClick:()=>n(),size:"lg",children:[f.jsx(rY,{className:"size-4"}),"Take the tour"]}),f.jsx(ze,{className:"text-muted-foreground hover:text-foreground text-xs",onClick:()=>t(),variant:"link",children:"Skip — take me in"})]}),r&&f.jsx("p",{className:"text-identifier mono max-w-full truncate text-[10px] tracking-wider",title:r,children:r})]})})}function qW(){const e=Ht(a=>a.tourActive),t=Ht(a=>a.tourStep),n=Ht(a=>a.tourTaskId),r=Ht(a=>a.advanceTour),[,i]=u0(),{data:s}=uv({queryConfig:{enabled:e&&t==="provider"}});S.useEffect(()=>{!e||t!=="provider"||s?.activeModel&&r()},[e,t,s?.activeModel,r]),S.useEffect(()=>{!e||t!=="query"||n||i(a=>{if(!a.has("task"))return a;const c=new URLSearchParams(a);return c.delete("task"),c},{replace:!0})},[e,t,n,i])}function VW(){const e=Dm(n=>n.isDialogOpen),t=Dm(n=>n.closeProviderDialog);return f.jsx(L0,{onOpenChange:n=>!n&&t(),open:e})}const $W=()=>{const{apiClient:e}=Pe.getState();return e?e.request($n.STATUS):Promise.reject(new Error("Not connected"))},Ri=()=>({queryFn:$W,queryKey:["vc","status"],refetchInterval:3e3,refetchIntervalInBackground:!1,staleTime:2e3}),Iv=({queryConfig:e}={})=>Mn({...Ri(),...e}),YW=["both_added","both_modified","deleted_modified"];function WW(e){return YW.includes(e)?e:void 0}function e8(e){if(!e)return{staged:[],unmerged:[],unstaged:[]};const t=new Set(e.conflictMarkerFiles??[]),n=(e.unmerged??[]).map(({path:a,type:c})=>({conflictType:WW(c),hasMarkers:t.has(a),isStaged:!1,path:a,status:"unmerged"})),r=[...e.staged.added.map(a=>({isStaged:!0,path:a,status:"added"})),...e.staged.modified.map(a=>({isStaged:!0,path:a,status:"modified"})),...e.staged.deleted.map(a=>({isStaged:!0,path:a,status:"deleted"}))],i=[...e.unstaged.modified.map(a=>({isStaged:!1,path:a,status:"modified"})),...e.unstaged.deleted.map(a=>({isStaged:!1,path:a,status:"deleted"})),...e.untracked.map(a=>({isStaged:!1,path:a,status:"untracked"}))],s=(a,c)=>a.path.localeCompare(c.path);return{staged:r.sort(s),unmerged:n.sort(s),unstaged:i.sort(s)}}const GW="/assets/logo-byterover-DB7H7faH.svg",KW={amber:"bg-amber-500",destructive:"bg-destructive",info:"bg-blue-500",success:"bg-primary-foreground"};function zk({className:e,pulsing:t=!1,tone:n}){const r=KW[n];return t?f.jsxs("span",{className:se("relative inline-flex size-1.5 shrink-0",e),children:[f.jsx("span",{className:se("absolute inline-flex size-full animate-ping rounded-full opacity-75",r)}),f.jsx("span",{className:se("relative inline-flex size-full rounded-full",r)})]}):f.jsx("span",{className:se("inline-block size-1.5 shrink-0 rounded-full",r,e)})}const t8=S.createContext(void 0);function n8(){const e=S.useContext(t8);if(e===void 0)throw new Error(Cn(13));return e}const Pv={imageLoadingStatus:()=>null},QW=S.forwardRef(function(t,n){const{className:r,render:i,...s}=t,[a,c]=S.useState("idle"),u={imageLoadingStatus:a},h=S.useMemo(()=>({imageLoadingStatus:a,setImageLoadingStatus:c}),[a,c]),m=Ot("span",t,{state:u,ref:n,props:s,stateAttributesMapping:Pv});return f.jsx(t8.Provider,{value:h,children:m})});function XW(e,{referrerPolicy:t,crossOrigin:n}){const[r,i]=S.useState("idle");return We(()=>{if(!e)return i("error"),Er;let s=!0;const a=new window.Image,c=u=>()=>{s&&i(u)};return i("loading"),a.onload=c("loaded"),a.onerror=c("error"),t&&(a.referrerPolicy=t),a.crossOrigin=n??null,a.src=e,()=>{s=!1}},[e,n,t]),r}const ZW={...Pv,...ws},JW=S.forwardRef(function(t,n){const{className:r,render:i,onLoadingStatusChange:s,referrerPolicy:a,crossOrigin:c,...u}=t,h=n8(),m=XW(t.src,{referrerPolicy:a,crossOrigin:c}),p=m==="loaded",{mounted:y,transitionStatus:x,setMounted:b}=Ea(p),w=S.useRef(null),E=tt(N=>{s?.(N),h.setImageLoadingStatus(N)});We(()=>{m!=="idle"&&E(m)},[m,E]);const k={imageLoadingStatus:m,transitionStatus:x};Xi({open:p,ref:w,onComplete(){p||b(!1)}});const T=Ot("img",t,{state:k,ref:[n,w],props:u,stateAttributesMapping:ZW,enabled:y});return y?T:null}),eG=S.forwardRef(function(t,n){const{className:r,render:i,delay:s,...a}=t,{imageLoadingStatus:c}=n8(),[u,h]=S.useState(s===void 0),m=Hn();return S.useEffect(()=>(s!==void 0&&m.start(s,()=>h(!0)),m.clear),[m,s]),Ot("span",t,{state:{imageLoadingStatus:c},ref:n,props:a,stateAttributesMapping:Pv,enabled:c!=="loaded"&&u})});function If({className:e,size:t="default",...n}){return f.jsx(QW,{"data-slot":"avatar","data-size":t,className:se("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 I0({className:e,...t}){return f.jsx(JW,{"data-slot":"avatar-image",className:se("aspect-square size-full rounded-full object-cover",e),...t})}function Pf({className:e,...t}){return f.jsx(eG,{"data-slot":"avatar-fallback",className:se("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 r8=S.createContext(void 0);function zf(e){const t=S.useContext(r8);if(t===void 0&&!e)throw new Error(Cn(33));return t}const i8=S.createContext(void 0);function ho(e){const t=S.useContext(i8);if(t===void 0&&!e)throw new Error(Cn(36));return t}const tG=S.createContext(void 0);function P0(e=!0){const t=S.useContext(tG);if(t===void 0&&!e)throw new Error(Cn(25));return t}const o8=S.createContext(void 0);function nG(){const e=S.useContext(o8);if(e===void 0)throw new Error(Cn(30));return e}function rG(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:s,typingRef:a,itemRef:c,itemMetadata:u}=e,{events:h}=s.useState("floatingTreeRoot"),m=P0(!0),p=m!==void 0;return S.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onKeyDown(y){y.key===" "&&a?.current&&y.preventDefault()},onMouseMove(y){i&&h.emit("itemhover",{nodeId:i,target:y.currentTarget})},onClick(y){t&&h.emit("close",{domEvent:y,reason:hl})},onMouseUp(y){if(m){const x=m.initialCursorPointRef.current;if(m.initialCursorPointRef.current=null,p&&x&&Math.abs(y.clientX-x.x)<=1&&Math.abs(y.clientY-x.y)<=1||p&&!sN&&y.button===2)return}c.current&&s.context.allowMouseUpTriggerRef.current&&(!p||y.button===2)&&(!u||u.type==="regular-item")&&c.current.click()}}),[t,n,r,h,i,s,a,c,m,p,u])}const zv={type:"regular-item"};function z0(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:s,typingRef:a=s.context.typingRef,nativeButton:c,itemMetadata:u,nodeId:h}=e,m=S.useRef(null),{getButtonProps:p,buttonRef:y}=Rl({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),x=rG({closeOnClick:t,highlighted:r,id:i,nodeId:h,store:s,typingRef:a,itemRef:m,itemMetadata:u}),b=S.useCallback(E=>Oo(x,{onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()}},E,p),[x,p,u]),w=ps(m,y);return S.useMemo(()=>({getItemProps:b,itemRef:w}),[b,w])}const s8=S.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function iG(){return S.useContext(s8)}let a8=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function cu(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:s}=e,{register:a,unregister:c,subscribeMapChange:u,elementsRef:h,labelsRef:m,nextIndexRef:p}=iG(),y=S.useRef(-1),[x,b]=S.useState(s??(i===a8.GuessFromOrder?()=>{if(y.current===-1){const k=p.current;p.current+=1,y.current=k}return y.current}:-1)),w=S.useRef(null),E=S.useCallback(k=>{if(w.current=k,x!==-1&&k!==null&&(h.current[x]=k,m)){const T=t!==void 0;m.current[x]=T?t:r?.current?.textContent??k.textContent}},[x,h,m,t,r]);return We(()=>{if(s!=null)return;const k=w.current;if(k)return a(k,n),()=>{c(k)}},[s,a,c,n]),We(()=>{if(s==null)return u(k=>{const T=w.current?k.get(w.current)?.index:null;T!=null&&b(T)})},[s,u,b]),S.useMemo(()=>({ref:E,index:x}),[x,E])}let Fk=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e})({});const F0={checked(e){return e?{[Fk.checked]:""}:{[Fk.unchecked]:""}},...ws},oG=S.forwardRef(function(t,n){const{render:r,className:i,id:s,label:a,nativeButton:c=!1,disabled:u=!1,closeOnClick:h=!1,checked:m,defaultChecked:p,onCheckedChange:y,...x}=t,b=cu({label:a}),w=zf(!0),E=ki(s),{store:k}=ho(),T=k.useState("isActive",b.index),N=k.useState("itemProps"),[O,j]=Wc({controlled:m,default:p??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:A,itemRef:R}=z0({closeOnClick:h,disabled:u,highlighted:T,id:E,store:k,nativeButton:c,nodeId:w?.nodeId,itemMetadata:zv}),_=S.useMemo(()=>({disabled:u,highlighted:T,checked:O}),[u,T,O]),F=tt(H=>{const q={...kt(hl,H.nativeEvent),preventUnmountOnClose:()=>{}};y?.(!O,q),!q.isCanceled&&j(V=>!V)}),I=Ot("div",t,{state:_,stateAttributesMapping:F0,props:[N,{role:"menuitemcheckbox","aria-checked":O,onClick:F},x,A],ref:[R,n,b.ref]});return f.jsx(o8.Provider,{value:_,children:I})}),sG=S.forwardRef(function(t,n){const{render:r,className:i,keepMounted:s=!1,...a}=t,c=nG(),u=S.useRef(null),{transitionStatus:h,setMounted:m}=Ea(c.checked);Xi({open:c.checked,ref:u,onComplete(){c.checked||m(!1)}});const p={checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:h};return Ot("span",t,{state:p,ref:[n,u],stateAttributesMapping:F0,props:{"aria-hidden":!0,...a},enabled:s||c.checked})}),l8=S.createContext(void 0);function aG(){const e=S.useContext(l8);if(e===void 0)throw new Error(Cn(31));return e}const lG=S.forwardRef(function(t,n){const{render:r,className:i,...s}=t,[a,c]=S.useState(void 0),u=S.useMemo(()=>({setLabelId:c}),[c]),h=Ot("div",t,{ref:n,props:{role:"group","aria-labelledby":a,...s}});return f.jsx(l8.Provider,{value:u,children:h})}),cG=S.forwardRef(function(t,n){const{className:r,render:i,id:s,...a}=t,c=ki(s),{setLabelId:u}=aG();return We(()=>(u(c),()=>{u(void 0)}),[u,c]),Ot("div",t,{ref:n,props:{id:c,role:"presentation",...a}})}),uG=S.forwardRef(function(t,n){const{render:r,className:i,id:s,label:a,nativeButton:c=!1,disabled:u=!1,closeOnClick:h=!0,...m}=t,p=cu({label:a}),y=zf(!0),x=ki(s),{store:b}=ho(),w=b.useState("isActive",p.index),E=b.useState("itemProps"),{getItemProps:k,itemRef:T}=z0({closeOnClick:h,disabled:u,highlighted:w,id:x,store:b,nativeButton:c,nodeId:y?.nodeId,itemMetadata:zv});return Ot("div",t,{state:{disabled:u,highlighted:w},props:[E,m,k],ref:[T,n,p.ref]})}),dG=S.createContext(void 0);function c8(e){return S.useContext(dG)}const fG={...Ss,...ws},hG=S.forwardRef(function(t,n){const{render:r,className:i,finalFocus:s,...a}=t,{store:c}=ho(),{side:u,align:h}=zf(),m=c8()!=null,p=c.useState("open"),y=c.useState("transitionStatus"),x=c.useState("popupProps"),b=c.useState("mounted"),w=c.useState("instantType"),E=c.useState("activeTriggerElement"),k=c.useState("parent"),T=c.useState("lastOpenChangeReason"),N=c.useState("rootId"),O=c.useState("floatingRootContext"),j=c.useState("floatingTreeRoot"),A=c.useState("closeDelay"),R=c.useState("activeTriggerElement"),_=k.type==="context-menu";Xi({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),S.useEffect(()=>{function U(P){c.setOpen(!1,kt(P.reason,P.domEvent))}return j.events.on("close",U),()=>{j.events.off("close",U)}},[j.events,c]);const F=c.useState("hoverEnabled"),I=c.useState("disabled");uR(O,{enabled:F&&!I&&!_&&k.type!=="menubar",closeDelay:A});const H={transitionStatus:y,side:u,align:h,open:p,nested:k.type==="menu",instant:w},q=S.useCallback(U=>{c.set("popupElement",U)},[c]),V=Ot("div",t,{state:H,ref:[n,c.context.popupRef,q],stateAttributesMapping:fG,props:[x,{onKeyDown(U){m&&xv.has(U.key)&&U.stopPropagation()}},ou(y),a,{"data-rootownerid":N}]});let $=k.type===void 0||_;return(E||k.type==="menubar"&&T!==y0)&&($=!0),f.jsx(Ob,{context:O,modal:_,disabled:!b,returnFocus:s===void 0?$:s,initialFocus:k.type!=="menu",restoreFocus:!0,externalTree:k.type!=="menubar"?j:void 0,previousFocusableElement:R,nextFocusableElement:k.type===void 0?c.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:k.type===void 0?c.context.beforeContentFocusGuardRef:void 0,children:V})}),u8=S.createContext(void 0);function pG(){const e=S.useContext(u8);if(e===void 0)throw new Error(Cn(32));return e}const mG=S.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:s}=ho();return s.useState("mounted")||r?f.jsx(u8.Provider,{value:r,children:f.jsx(Rb,{ref:n,...i})}):null});function d8(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,s=tt(i),a=S.useRef(0),c=sr(yG).current,u=sr(gG).current,[h,m]=S.useState(0),p=S.useRef(h),y=tt((k,T)=>{u.set(k,T??null),p.current+=1,m(p.current)}),x=tt(k=>{u.delete(k),p.current+=1,m(p.current)}),b=S.useMemo(()=>{const k=new Map;return Array.from(u.keys()).filter(N=>N.isConnected).sort(xG).forEach((N,O)=>{const j=u.get(N)??{};k.set(N,{...j,index:O})}),k},[u,h]);We(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const k=new MutationObserver(T=>{const N=new Set,O=j=>N.has(j)?N.delete(j):N.add(j);T.forEach(j=>{j.removedNodes.forEach(O),j.addedNodes.forEach(O)}),N.size===0&&(p.current+=1,m(p.current))});return b.forEach((T,N)=>{N.parentElement&&k.observe(N.parentElement,{childList:!0})}),()=>{k.disconnect()}},[b]),We(()=>{p.current===h&&(n.current.length!==b.size&&(n.current.length=b.size),r&&r.current.length!==b.size&&(r.current.length=b.size),a.current=b.size),s(b)},[s,b,n,r,h]),We(()=>()=>{n.current=[]},[n]),We(()=>()=>{r&&(r.current=[])},[r]);const w=tt(k=>(c.add(k),()=>{c.delete(k)}));We(()=>{c.forEach(k=>k(b))},[c,b]);const E=S.useMemo(()=>({register:y,unregister:x,subscribeMapChange:w,elementsRef:n,labelsRef:r,nextIndexRef:a}),[y,x,w,n,r,a]);return f.jsx(s8.Provider,{value:E,children:t})}function gG(){return new Map}function yG(){return new Set}function xG(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 bG=S.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:s,render:a,side:c,align:u,sideOffset:h=0,alignOffset:m=0,collisionBoundary:p="clipping-ancestors",collisionPadding:y=5,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:w=!1,collisionAvoidance:E=TN,...k}=t,{store:T}=ho(),N=pG(),O=P0(!0),j=T.useState("parent"),A=T.useState("floatingRootContext"),R=T.useState("floatingTreeRoot"),_=T.useState("mounted"),F=T.useState("open"),I=T.useState("modal"),H=T.useState("activeTriggerElement"),q=T.useState("transitionStatus"),V=T.useState("positionerElement"),$=T.useState("instantType"),U=T.useState("hasViewport"),P=T.useState("lastOpenChangeReason"),Y=T.useState("floatingNodeId"),G=T.useState("floatingParentNodeId"),X=A.useState("domReferenceElement"),L=S.useRef(null),B=iR(V,!1,!1);let W=r,D=h,Q=m,ee=u,J=E;j.type==="context-menu"&&(W=r??j.context?.anchor,ee=ee??"start",!c&&ee!=="center"&&(Q=t.alignOffset??2,D=t.sideOffset??-5));let he=c,de=ee;j.type==="menu"?(he=he??"inline-end",de=de??"start",J=t.collisionAvoidance??NN):j.type==="menubar"&&(he=he??"bottom",de=de??"start");const Se=j.type==="context-menu",Re=Yb({anchor:W,floatingRootContext:A,positionMethod:O?"fixed":i,mounted:_,side:he,sideOffset:D,align:de,alignOffset:Q,arrowPadding:Se?0:x,collisionBoundary:p,collisionPadding:y,sticky:b,nodeId:Y,keepMounted:N,disableAnchorTracking:w,collisionAvoidance:J,shiftCrossAxis:Se&&!("side"in J&&J.side==="flip"),externalTree:R,adaptiveOrigin:U?bR:void 0}),je=S.useMemo(()=>{const Ae={};return F||(Ae.pointerEvents="none"),{role:"presentation",hidden:!_,style:{...Re.positionerStyles,...Ae}}},[F,_,Re.positionerStyles]);S.useEffect(()=>{function Ae(pe){pe.open&&(pe.parentNodeId===Y&&T.set("hoverEnabled",!1),pe.nodeId!==Y&&pe.parentNodeId===T.select("floatingParentNodeId")&&T.setOpen(!1,kt(Ad)))}return R.events.on("menuopenchange",Ae),()=>{R.events.off("menuopenchange",Ae)}},[T,R.events,Y]),S.useEffect(()=>{if(T.select("floatingParentNodeId")==null)return;function Ae(pe){if(pe.open||pe.nodeId!==T.select("floatingParentNodeId"))return;const be=pe.reason??Ad;T.setOpen(!1,kt(be))}return R.events.on("menuopenchange",Ae),()=>{R.events.off("menuopenchange",Ae)}},[R.events,T]);const Fe=Hn();S.useEffect(()=>{F||Fe.clear()},[F,Fe]),S.useEffect(()=>{function Ae(pe){if(!(!F||pe.nodeId!==T.select("floatingParentNodeId")))if(pe.target&&H&&H!==pe.target){const be=T.select("closeDelay");be>0?Fe.isStarted()||Fe.start(be,()=>{T.setOpen(!1,kt(Ad))}):T.setOpen(!1,kt(Ad))}else Fe.clear()}return R.events.on("itemhover",Ae),()=>{R.events.off("itemhover",Ae)}},[R.events,F,H,T,Fe]),S.useEffect(()=>{const Ae={open:F,nodeId:Y,parentNodeId:G,reason:T.select("lastOpenChangeReason")};R.events.emit("menuopenchange",Ae)},[R.events,F,T,Y,G]),We(()=>{const Ae=X,pe=L.current;if(Ae&&(L.current=Ae),pe&&Ae&&Ae!==pe){T.set("instantType",void 0);const be=new AbortController;return B(()=>{T.set("instantType","trigger-change")},be.signal),()=>{be.abort()}}},[X,B,T]);const _e={open:F,side:Re.side,align:Re.align,anchorHidden:Re.anchorHidden,nested:j.type==="menu",instant:$},De=S.useMemo(()=>({side:Re.side,align:Re.align,arrowRef:Re.arrowRef,arrowUncentered:Re.arrowUncentered,arrowStyles:Re.arrowStyles,nodeId:Re.context.nodeId}),[Re.side,Re.align,Re.arrowRef,Re.arrowUncentered,Re.arrowStyles,Re.context.nodeId]),xe=Ot("div",t,{state:_e,stateAttributesMapping:Ss,ref:[n,T.useStateSetter("positionerElement")],props:[je,ou(q),k]}),Ge=_&&j.type!=="menu"&&(j.type!=="menubar"&&I&&P!==Br||j.type==="menubar"&&j.context.modal);let we=null;return j.type==="menubar"?we=j.context.contentElement:j.type===void 0&&(we=H),f.jsxs(r8.Provider,{value:De,children:[Ge&&f.jsx(vv,{ref:j.type==="context-menu"||j.type==="nested-context-menu"?j.context.internalBackdropRef:null,inert:Wb(!F),cutout:we}),f.jsx(qz,{id:Y,children:f.jsx(d8,{elementsRef:T.context.itemDomElements,labelsRef:T.context.itemLabels,children:xe})})]})}),f8=S.createContext(void 0);function vG(){const e=S.useContext(f8);if(e===void 0)throw new Error(Cn(34));return e}const wG=S.memo(S.forwardRef(function(t,n){const{render:r,className:i,value:s,defaultValue:a,onValueChange:c,disabled:u=!1,...h}=t,[m,p]=Wc({controlled:s,default:a,name:"MenuRadioGroup"}),y=tt(c),x=tt((k,T)=>{y?.(k,T),!T.isCanceled&&p(k)}),w=Ot("div",t,{state:{disabled:u},ref:n,props:{role:"group","aria-disabled":u||void 0,...h}}),E=S.useMemo(()=>({value:m,setValue:x,disabled:u}),[m,x,u]);return f.jsx(f8.Provider,{value:E,children:w})})),h8=S.createContext(void 0);function SG(){const e=S.useContext(h8);if(e===void 0)throw new Error(Cn(35));return e}const CG=S.forwardRef(function(t,n){const{render:r,className:i,id:s,label:a,nativeButton:c=!1,disabled:u=!1,closeOnClick:h=!1,value:m,...p}=t,y=cu({label:a}),x=zf(!0),b=ki(s),{store:w}=ho(),E=w.useState("isActive",y.index),k=w.useState("itemProps"),{value:T,setValue:N,disabled:O}=vG(),j=O||u,A=T===m,{getItemProps:R,itemRef:_}=z0({closeOnClick:h,disabled:j,highlighted:E,id:b,store:w,nativeButton:c,nodeId:x?.nodeId,itemMetadata:zv}),F=S.useMemo(()=>({disabled:j,highlighted:E,checked:A}),[j,E,A]),I=tt(q=>{const V={...kt(hl,q.nativeEvent),preventUnmountOnClose:()=>{}};N(m,V)}),H=Ot("div",t,{state:F,stateAttributesMapping:F0,props:[k,{role:"menuitemradio","aria-checked":A,onClick:I},p,R],ref:[_,n,y.ref]});return f.jsx(h8.Provider,{value:F,children:H})}),EG=S.forwardRef(function(t,n){const{render:r,className:i,keepMounted:s=!1,...a}=t,c=SG(),u=S.useRef(null),{transitionStatus:h,setMounted:m}=Ea(c.checked);Xi({open:c.checked,ref:u,onComplete(){c.checked||m(!1)}});const p={checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:h};return Ot("span",t,{state:p,stateAttributesMapping:F0,ref:[n,u],props:{"aria-hidden":!0,...a},enabled:s||c.checked})}),kG=S.createContext(null);function p8(e){return S.useContext(kG)}const TG={...zb,disabled:qe(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:qe(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:qe(e=>e.allowMouseEnter),stickIfOpen:qe(e=>e.stickIfOpen),parent:qe(e=>e.parent),rootId:qe(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:qe(e=>e.activeIndex),isActive:qe((e,t)=>e.activeIndex===t),hoverEnabled:qe(e=>e.hoverEnabled),instantType:qe(e=>e.instantType),lastOpenChangeReason:qe(e=>e.openChangeReason),floatingTreeRoot:qe(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:qe(e=>e.floatingNodeId),floatingParentNodeId:qe(e=>e.floatingParentNodeId),itemProps:qe(e=>e.itemProps),closeDelay:qe(e=>e.closeDelay),hasViewport:qe(e=>e.hasViewport),keyboardEventRelay:qe(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class Fv extends S0{constructor(t){super({...NG(),...t},{positionerRef:S.createRef(),popupRef:S.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:S.createRef(),beforeContentFocusGuardRef:S.createRef(),onOpenChangeComplete:void 0,triggerElements:new Af},TG),this.unsubscribeParentListener=this.observe("parent",n=>{if(this.unsubscribeParentListener?.(),n.type==="menu"){let r=n.store.select("rootId"),i=n.store.select("floatingTreeRoot"),s=n.store.select("keyboardEventRelay");this.unsubscribeParentListener=n.store.subscribe(()=>{const a=n.store.select("rootId"),c=n.store.select("floatingTreeRoot"),u=n.store.select("keyboardEventRelay");r===a&&i===c&&s===u||(r=a,i=c,s=u,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=sr(()=>new Fv(n)).current;return t??r}unsubscribeParentListener=null}function NG(){return{...Pb(),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 Ab,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Bn,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}const m8=S.createContext(void 0);function g8(){return S.useContext(m8)}const y8=pb(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:s,defaultOpen:a=!1,disabled:c=!1,modal:u,loopFocus:h=!0,orientation:m="vertical",actionsRef:p,closeParentOnEsc:y=!1,handle:x,triggerId:b,defaultTriggerId:w=null,highlightItemOnHover:E=!0}=t,k=P0(!0),T=ho(!0),N=p8(!0),O=g8(),j=S.useMemo(()=>O&&T?{type:"menu",store:T.store}:N?{type:"menubar",context:N}:k&&!T?{type:"context-menu",context:k}:{type:void 0},[k,T,N,O]),A=Fv.useStore(x?.store,{open:a,openProp:r,activeTriggerId:w,triggerIdProp:b,parent:j});d0(()=>{r===void 0&&A.state.open===!1&&a===!0&&A.update({open:!0,activeTriggerId:w})}),A.useControlledProp("openProp",r),A.useControlledProp("triggerIdProp",b),A.useContextCallback("onOpenChangeComplete",s);const R=A.useState("floatingTreeRoot"),_=qN(R),F=vs();We(()=>{k&&!T?A.update({parent:{type:"context-menu",context:k},floatingNodeId:_,floatingParentNodeId:F}):T&&A.update({floatingNodeId:_,floatingParentNodeId:F})},[k,T,_,F,A]);const I=A.useState("open"),H=A.useState("activeTriggerElement"),q=A.useState("positionerElement"),V=A.useState("hoverEnabled"),$=A.useState("modal"),U=A.useState("disabled"),P=A.useState("lastOpenChangeReason"),Y=A.useState("parent"),G=A.useState("activeIndex"),X=A.useState("payload"),L=A.useState("floatingParentNodeId"),B=S.useRef(null),W=L!=null;let D;A.useSyncedValues({disabled:c,modal:Y.type===void 0?u:void 0,rootId:kl()});const{openMethod:Q,triggerProps:ee}=Ev(I);Lb(A);const{forceUnmount:J}=Ib(I,A,()=>{A.update({allowMouseEnter:!1,stickIfOpen:!0})}),he=S.useRef(Y.type!=="context-menu"),de=Hn();S.useEffect(()=>{if(I||(B.current=null),Y.type==="context-menu"){if(!I){de.clear(),he.current=!1;return}de.start(500,()=>{he.current=!0})}},[de,I,Y.type]),Sv(I&&$&&P!==Br&&Q!=="touch",q),We(()=>{!I&&!V&&A.set("hoverEnabled",!0)},[I,V,A]);const Se=S.useRef(!0),Re=Hn(),je=tt((Je,Ke)=>{const bt=Ke.reason;if(I===Je&&Ke.trigger===H&&P===bt||(Ke.preventUnmountOnClose=()=>{A.set("preventUnmountingOnClose",!0)},!Je&&Ke.trigger==null&&(Ke.trigger=H??void 0),i?.(Je,Ke),Ke.isCanceled))return;const nt={open:Je,nativeEvent:Ke.event,reason:Ke.reason,nested:W};D?.emit("openchange",nt);const Qe=Ke.event;if(Je===!1&&Qe?.type==="click"&&Qe.pointerType==="touch"&&!Se.current)return;if(!Je&&G!==null){const Ye=A.context.itemDomElements.current[G];queueMicrotask(()=>{Ye?.setAttribute("tabindex","-1")})}Je&&bt===Mc?(Se.current=!1,Re.start(300,()=>{Se.current=!0})):(Se.current=!0,Re.clear());const Ct=(bt===qc||bt===hl)&&Qe.detail===0&&Qe?.isTrusted,$e=!Je&&(bt===x0||bt==null),ge={open:Je,openChangeReason:bt};B.current=Ke.event??null;const Oe=Ke.trigger?.id??null;(Oe||Je)&&(ge.activeTriggerId=Oe,ge.activeTriggerElement=Ke.trigger??null),A.update(ge),Y.type==="menubar"&&(bt===Mc||bt===ml||bt===Br||bt===tm||bt===Ad)?A.set("instantType","group"):Ct||$e?A.set("instantType",Ct?"click":"dismiss"):A.set("instantType",void 0)}),Fe=S.useCallback(Je=>{const Ke=kt(Je);return Ke.preventUnmountOnClose=()=>{A.set("preventUnmountingOnClose",!0)},Ke},[A]),_e=S.useCallback(()=>{A.setOpen(!1,Fe(kb))},[A,Fe]);S.useImperativeHandle(p,()=>({unmount:J,close:_e}),[J,_e]);let De;Y.type==="context-menu"&&(De=Y.context),S.useImperativeHandle(De?.positionerRef,()=>q,[q]),S.useImperativeHandle(De?.actionsRef,()=>({setOpen:je}),[je]);const xe=Fb({popupStore:A,onOpenChange:je});D=xe.context.events,S.useEffect(()=>{const Je=({open:Ke,eventDetails:bt})=>je(Ke,bt);return D.on("setOpen",Je),()=>{D?.off("setOpen",Je)}},[D,je]);const Ge=v0(xe,{enabled:!U,bubbles:{escapeKey:y&&Y.type==="menu"},outsidePress(){return Y.type!=="context-menu"||B.current?.type==="contextmenu"?!0:he.current},externalTree:W?R:void 0}),we=fR(xe,{role:"menu"}),Ae=xR(),pe=S.useCallback(Je=>{A.select("activeIndex")!==Je&&A.set("activeIndex",Je)},[A]),be=dR(xe,{enabled:!U,listRef:A.context.itemDomElements,activeIndex:G,nested:Y.type!==void 0,loopFocus:h,orientation:m,parentOrientation:Y.type==="menubar"?Y.context.orientation:void 0,rtl:Ae==="rtl",disabledIndices:nf,onNavigate:pe,openOnArrowKeyDown:Y.type!=="context-menu",externalTree:W?R:void 0,focusItemOnHover:E}),ne=S.useCallback(Je=>{A.context.typingRef.current=Je},[A]),ye=hR(xe,{listRef:A.context.itemLabels,elementsRef:A.context.itemDomElements,activeIndex:G,resetMs:az,onMatch:Je=>{I&&Je!==G&&A.set("activeIndex",Je)},onTypingChange:ne}),{getReferenceProps:Ce,getFloatingProps:Ve,getItemProps:ct,getTriggerProps:oe}=iu([Ge,we,be,ye]),Ee=S.useMemo(()=>{const Je=Oo(Ce(),{onMouseMove(){A.set("allowMouseEnter",!0)}},ee);return delete Je.role,Je},[Ce,A,ee]),Le=S.useMemo(()=>{const Je=oe();if(!Je)return Je;const Ke=Oo(Je,ee);return delete Ke.role,delete Ke["aria-controls"],Ke},[oe,ee]),Me=S.useMemo(()=>Ve({onMouseMove(){A.set("allowMouseEnter",!0),Y.type==="menu"&&A.set("hoverEnabled",!1)},onClick(){A.select("hoverEnabled")&&A.set("hoverEnabled",!1)},onKeyDown(Je){const Ke=A.select("keyboardEventRelay");Ke&&!Je.isPropagationStopped()&&Ke(Je)}}),[Ve,Y.type,A]),Ue=S.useMemo(()=>ct(),[ct]);A.useSyncedValues({floatingRootContext:xe,activeTriggerProps:Ee,inactiveTriggerProps:Le,popupProps:Me,itemProps:Ue});const dt=S.useMemo(()=>({store:A,parent:j}),[A,j]),xt=f.jsx(i8.Provider,{value:dt,children:typeof n=="function"?n({payload:X}):n});return Y.type===void 0||Y.type==="context-menu"?f.jsx(Vz,{externalTree:R,children:xt}):xt});function RG(e){const t=ho().store,n=S.useMemo(()=>({parentMenu:t}),[t]);return f.jsx(m8.Provider,{value:n,children:f.jsx(y8,{...e})})}function x8(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 s=parseFloat(n.width)||0,a=parseFloat(n.height)||0,c=parseFloat(r.width)||0,u=parseFloat(r.height)||0,h=Math.max(t.width,s,c),m=Math.max(t.height,a,u),p=h-t.width,y=m-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-y/2,bottom:t.bottom+y/2}}function AG(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=yv(),{ref:i,index:s}=cu(e),a=n===s,c=S.useRef(null),u=ps(i,c);return{compositeProps:S.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(s)},onMouseMove(){const m=c.current;if(!t||!m)return;const p=m.hasAttribute("disabled")||m.ariaDisabled==="true";!a&&!p&&m.focus()}}),[a,r,s,t]),compositeRef:u,index:s}}function jG(e){const{render:t,className:n,state:r=Bn,props:i=nf,refs:s=nf,metadata:a,stateAttributesMapping:c,tag:u="div",...h}=e,{compositeProps:m,compositeRef:p}=AG({metadata:a});return Ot(u,e,{state:r,ref:[...s,p],props:[m,...i,h],stateAttributesMapping:c})}function b8(e){if(Fn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!ko(e))return b8(jo(e))}function OG(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=S.useRef(!1);return S.useMemo(()=>t?{onMouseDown:s=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,Zt(s.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:s=>{i.current&&(i.current=!1,s.preventBaseUIHandler())}}:Bn,[t,n,r])}const Mp=2,MG=J6(function(t,n){const{render:r,className:i,disabled:s=!1,nativeButton:a=!0,id:c,openOnHover:u,delay:h=100,closeDelay:m=0,handle:p,payload:y,...x}=t,b=ho(!0),w=p?.store??b?.store;if(!w)throw new Error(Cn(85));const E=ki(c),k=w.useState("isTriggerActive",E),T=w.useState("floatingRootContext"),N=w.useState("isOpenedByTrigger",E),O=S.useRef(null),j=_G(),A=yv(!0),R=Ca(),_=S.useMemo(()=>R??new Ab,[R]),F=qN(_),I=vs(),{registerTrigger:H,isMountedByThisTrigger:q}=sR(E,O,w,{payload:y,closeDelay:m,parent:j,floatingTreeRoot:_,floatingNodeId:F,floatingParentNodeId:I,keyboardEventRelay:A?.relayKeyboardEvent}),V=j.type==="menubar",$=w.useState("disabled"),U=s||$||V&&j.context.disabled,{getButtonProps:P,buttonRef:Y}=Rl({disabled:U,native:a});S.useEffect(()=>{!N&&j.type===void 0&&(w.context.allowMouseUpTriggerRef.current=!1)},[w,N,j.type]);const G=S.useRef(null),X=Hn(),L=tt(we=>{if(!G.current)return;X.clear(),w.context.allowMouseUpTriggerRef.current=!1;const Ae=we.target;if(Nt(G.current,Ae)||Nt(w.select("positionerElement"),Ae)||Ae===G.current||Ae!=null&&b8(Ae)===w.select("rootId"))return;const pe=x8(G.current);we.clientX>=pe.left-Mp&&we.clientX<=pe.right+Mp&&we.clientY>=pe.top-Mp&&we.clientY<=pe.bottom+Mp||_.events.emit("close",{domEvent:we,reason:RN})});S.useEffect(()=>{N&&w.select("lastOpenChangeReason")===Br&&Zt(G.current).addEventListener("mouseup",L,{once:!0})},[N,L,w]);const B=V&&j.context.hasSubmenuOpen,D=Ub(T,{enabled:(u??B)&&!U&&j.type!=="context-menu"&&(!V||B&&!q),handleClose:qb({blockPointerEvents:!V}),mouseOnly:!0,move:!1,restMs:j.type===void 0?h:void 0,delay:{close:m},triggerElementRef:O,externalTree:_,isActiveTrigger:k}),Q=DG(N,w.select("lastOpenChangeReason")),ee=Mb(T,{enabled:!U&&j.type!=="context-menu",event:N&&V?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:j.type===void 0?Q:!1}),J=lR(T,{enabled:!U&&B}),he=OG({open:N,enabled:V,mouseDownAction:"open"}),de=iu([ee,J]),Se={disabled:U,open:N},Re=w.useState("triggerProps",q),je=[G,n,Y,H,O],Fe=[de.getReferenceProps(),D??Bn,Re,{"aria-haspopup":"menu",id:E,onMouseDown:we=>{if(w.select("open"))return;X.start(200,()=>{w.context.allowMouseUpTriggerRef.current=!0}),Zt(we.currentTarget).addEventListener("mouseup",L,{once:!0})}},V?{role:"menuitem"}:{},he,x,P],_e=S.useRef(null),De=tt(we=>{Ci.flushSync(()=>{w.setOpen(!1,kt(ml,we.nativeEvent,we.currentTarget))}),iz(_e.current)?.focus()}),xe=tt(we=>{const Ae=w.select("positionerElement");if(Ae&&Oc(we,Ae))w.context.beforeContentFocusGuardRef.current?.focus();else{Ci.flushSync(()=>{w.setOpen(!1,kt(ml,we.nativeEvent,we.currentTarget))});let pe=rz(w.context.triggerFocusTargetRef.current||O.current);for(;pe!==null&&Nt(Ae,pe);){const be=pe;if(pe=Eb(pe),pe===be)break}pe?.focus()}}),Ge=Ot("button",t,{enabled:!V,stateAttributesMapping:Jy,state:Se,ref:je,props:Fe});return V?f.jsx(jG,{tag:"button",render:r,className:i,state:Se,refs:je,props:Fe,stateAttributesMapping:Jy}):N?f.jsxs(S.Fragment,{children:[f.jsx(Vc,{ref:_e,onFocus:De},`${E}-pre-focus-guard`),f.jsx(S.Fragment,{children:Ge},E),f.jsx(Vc,{ref:w.context.triggerFocusTargetRef,onFocus:xe},`${E}-post-focus-guard`)]}):f.jsx(S.Fragment,{children:Ge},E)});function DG(e,t){const n=Hn(),[r,i]=S.useState(!1);return We(()=>{e&&t==="trigger-hover"?(i(!0),n.start(lz,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function _G(){const e=P0(!0),t=ho(!0),n=p8();return S.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const LG=S.forwardRef(function(t,n){const{className:r,render:i,orientation:s="horizontal",...a}=t;return Ot("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},a]})}),IG=S.forwardRef(function(t,n){const{render:r,className:i,label:s,id:a,nativeButton:c=!1,openOnHover:u=!0,delay:h=100,closeDelay:m=0,disabled:p=!1,...y}=t,x=cu(),b=zf(),{store:w}=ho(),E=ki(a),k=w.useState("open"),T=w.useState("floatingRootContext"),N=w.useState("floatingTreeRoot"),O=oR(E,w),j=S.useCallback(ee=>{const J=O(ee);return ee!==null&&w.select("open")&&w.select("activeTriggerId")==null&&w.update({activeTriggerId:E,activeTriggerElement:ee,closeDelay:m}),J},[O,m,w,E]),A=S.useRef(null),R=S.useCallback(ee=>{A.current=ee,w.set("activeTriggerElement",ee)},[w]),_=g8();if(!_?.parentMenu)throw new Error(Cn(37));w.useSyncedValue("closeDelay",m);const F=_.parentMenu,I=F.useState("itemProps"),H=F.useState("isActive",x.index),q=S.useMemo(()=>({type:"submenu-trigger",setActive(){F.set("activeIndex",x.index)}}),[F,x.index]),V=w.useState("disabled"),$=p||V,{getItemProps:U,itemRef:P}=z0({closeOnClick:!1,disabled:$,highlighted:H,id:E,store:w,typingRef:F.context.typingRef,nativeButton:c,itemMetadata:q,nodeId:b?.nodeId}),Y=w.useState("hoverEnabled"),G=F.useState("allowMouseEnter"),X=Ub(T,{enabled:Y&&u&&!$,handleClose:qb({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:h,delay:G?{open:h,close:m}:0,triggerElementRef:A,externalTree:N}),L=Mb(T,{enabled:!$,event:"mousedown",toggle:!u,ignoreMouse:u,stickIfOpen:!1}),B=iu([L]),W=w.useState("triggerProps",!0);return delete W.id,Ot("div",t,{state:{disabled:$,highlighted:H,open:k},stateAttributesMapping:$b,props:[B.getReferenceProps(),X,W,I,{tabIndex:k||H?0:-1,onBlur(){H&&F.set("activeIndex",null)}},y,U],ref:[n,x.ref,P,j,R]})});function ja({...e}){return f.jsx(y8,{"data-slot":"dropdown-menu",...e})}function Oa({...e}){return f.jsx(MG,{"data-slot":"dropdown-menu-trigger",...e})}function ks({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:i,...s}){return f.jsx(mG,{children:f.jsx(bG,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:f.jsx(hG,{"data-slot":"dropdown-menu-content",className:se("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),...s})})})}function ul({...e}){return f.jsx(lG,{"data-slot":"dropdown-menu-group",...e})}function Lc({className:e,inset:t,...n}){return f.jsx(cG,{"data-slot":"dropdown-menu-label","data-inset":t,className:se("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",e),...n})}function Vn({className:e,inset:t,variant:n="default",...r}){return f.jsx(uG,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:se("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 ra({...e}){return f.jsx(RG,{"data-slot":"dropdown-menu-sub",...e})}function ia({className:e,inset:t,children:n,...r}){return f.jsxs(IG,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:se("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,f.jsx(i0,{className:"ml-auto"})]})}function oa({align:e="start",alignOffset:t=-3,side:n="right",sideOffset:r=0,className:i,...s}){return f.jsx(ks,{"data-slot":"dropdown-menu-sub-content",className:se("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,...s})}function Y2({className:e,children:t,checked:n,inset:r,...i}){return f.jsxs(oG,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:se("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...i,children:[f.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:f.jsx(sG,{children:f.jsx(wf,{})})}),t]})}function PG({...e}){return f.jsx(wG,{"data-slot":"dropdown-menu-radio-group",...e})}function zG({className:e,children:t,inset:n,...r}){return f.jsxs(CG,{"data-slot":"dropdown-menu-radio-item","data-inset":n,className:se("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[f.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:f.jsx(EG,{children:f.jsx(wf,{})})}),t]})}function ls({className:e,...t}){return f.jsx(LG,{"data-slot":"dropdown-menu-separator",className:se("-mx-1 my-1 h-px bg-border",e),...t})}const FG=()=>{const{apiClient:e}=Pe.getState();return e?e.request(jf.LOGOUT):Promise.reject(new Error("Not connected"))},BG=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:ys}),t.invalidateQueries({queryKey:Es().queryKey}),t.invalidateQueries({queryKey:Mf().queryKey}),n?.(...i)},...r,mutationFn:FG})};function ca({className:e,size:t="default",...n}){return f.jsx("div",{"data-slot":"card","data-size":t,className:se("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 HG({className:e,...t}){return f.jsx("div",{"data-slot":"card-title",className:se("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...t})}function Dp({className:e,...t}){return f.jsx("div",{"data-slot":"card-description",className:se("text-sm text-muted-foreground",e),...t})}const UG=2500;function qG({onOpenChange:e,open:t}){const n=tn(),r=Ur(y=>y.isLoggingIn),i=Ur(y=>y.setLoggingIn),s=Pe(y=>y.connectionState),a=Pe(y=>y.selectedProject),[c,u]=S.useState({type:"idle"});S.useEffect(()=>{t||(u({type:"idle"}),i(!1))},[t,i]),S.useEffect(()=>c.type!=="waiting"?void 0:YA(x=>{x.success&&x.user?(lt.success(`Logged in as ${x.user.email}`),n.invalidateQueries({queryKey:ys}),e(!1)):u({message:x.error??"Authentication failed",type:"error"}),i(!1)}),[e,n,a,i,c.type]),S.useEffect(()=>{if(c.type!=="waiting")return;let y=!1;async function x(){try{const w=await n.fetchQuery(fv(a));if(y)return;w.isAuthorized&&w.user&&(lt.success(`Logged in as ${w.user.email}`),i(!1),e(!1))}catch{}}const b=globalThis.setInterval(x,UG);return()=>{y=!0,globalThis.clearInterval(b)}},[e,n,i,c.type]);async function h(){i(!0),u({type:"starting"});try{const y=await $A();if(!Dv(y.authUrl))throw new Error("Received an unsafe OAuth URL from the daemon");window.open(y.authUrl,"_blank","noopener,noreferrer"),u({authUrl:y.authUrl,type:"waiting"})}catch(y){i(!1),u({message:y instanceof Error?y.message:"Unable to start login",type:"error"})}}function m(){u({type:"idle"})}const p=s!=="connected"||r;return f.jsx(Al,{onOpenChange:e,open:t,children:f.jsxs(jl,{children:[f.jsxs(Vr,{children:[f.jsx($r,{children:"Redirecting to ByteRover"}),f.jsxs(bl,{children:["Please sign in to your ",f.jsx("span",{className:"text-foreground",children:"byterover.dev"})," account to continue."]})]}),c.type==="starting"&&f.jsx("div",{className:"rounded-lg border border-blue-500/20 bg-blue-500/5 p-3 text-sm text-blue-700",children:"Starting authentication…"}),c.type==="waiting"&&f.jsxs(ca,{className:"p-4 gap-2",children:[f.jsx("div",{children:"Finish signing in in the new tab."}),f.jsxs("div",{className:"text-xs text-muted-foreground",children:["If the tab didn’t open,"," ",f.jsx("a",{className:"underline underline-offset-2",href:c.authUrl,rel:"noopener noreferrer",target:"_blank",children:"click this link"}),"."]})]}),c.type==="error"&&f.jsx("div",{className:"rounded-lg border border-destructive/20 bg-destructive/5 p-3 text-sm text-destructive",children:c.message}),f.jsx(Na,{children:c.type==="error"?f.jsxs(f.Fragment,{children:[f.jsx(gx,{render:f.jsx(ze,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),f.jsx(ze,{className:"cursor-pointer",onClick:m,children:"Try again"})]}):f.jsxs(f.Fragment,{children:[f.jsx(gx,{render:f.jsx(ze,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),f.jsx(ze,{className:"cursor-pointer",disabled:p,onClick:h,children:c.type==="waiting"?"Waiting for authentication…":"Proceed to Login"})]})})]})})}function VG(){const[e,t]=S.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx(ze,{className:"h-auto rounded-full p-0",onClick:()=>t(!0),variant:"ghost",children:f.jsx(If,{children:f.jsx(Pf,{className:"bg-transparent",children:f.jsx(Nv,{className:"size-4 shrink-0"})})})}),f.jsx(qG,{onOpenChange:t,open:e})]})}function $G(){const e=Ur(i=>i.user),t=BG(),n=tn();if(S.useEffect(()=>{e||n.invalidateQueries({queryKey:ys}).catch(()=>{})},[n,e]),!e)return f.jsxs(ze,{disabled:!0,size:"sm",variant:"outline",children:[f.jsx(Nv,{className:"size-4 shrink-0 text-muted-foreground"}),f.jsx("span",{children:"Signed in"})]});const r=e.name??e.email;return f.jsxs(ja,{children:[f.jsx(Oa,{children:f.jsxs(If,{className:"cursor-pointer",children:[f.jsx(I0,{alt:r,src:e.avatarUrl}),f.jsx(Pf,{children:_0(r)})]})}),f.jsxs(ks,{align:"start",className:"w-(--anchor-width) min-w-56",sideOffset:6,children:[f.jsx(ul,{children:f.jsxs(Lc,{className:"flex flex-col gap-0.5",children:[f.jsx("span",{className:"text-xs tracking-widest text-muted-foreground",children:"Signed in"}),f.jsx("span",{className:"truncate text-sm font-medium text-card-foreground!",children:e.email})]})}),f.jsx(ls,{}),f.jsxs(Vn,{disabled:t.isPending,onClick:()=>t.mutate(),children:[f.jsx($$,{className:"size-4 text-muted-foreground!"}),f.jsx("span",{className:"text-sm",children:t.isPending?"Logging out…":"Log out"})]})]})]})}function YG(){const e=Ur(n=>n.isAuthorized);return Ur(n=>n.isLoadingInitial)?f.jsx(ze,{disabled:!0,size:"icon",variant:"outline",children:f.jsx(Nv,{className:"size-4 shrink-0 text-muted-foreground animate-pulse"})}):e?f.jsx($G,{}):f.jsx(VG,{})}function WG(){const e=Ht(i=>i.seenWelcome),t=Ht(i=>i.tourCompleted),n=Ht(i=>i.startTour),r=!e&&!t;return f.jsxs(ja,{children:[f.jsx(Oa,{render:f.jsxs(ze,{size:"sm",variant:"ghost",children:[f.jsx(F$,{className:"size-4 mr-1"}),"Help",r&&f.jsx("span",{"aria-hidden":!0,className:se("size-1.5 rounded-full bg-orange-500")})]})}),f.jsxs(ks,{align:"end",className:"w-56",children:[f.jsxs(Vn,{className:"bg-primary/8 hover:bg-primary/12 focus:bg-primary/12",onClick:()=>n(),children:[f.jsx(p$,{className:"text-primary-foreground"}),f.jsx("span",{children:t?"Restart the tour":"Take the tour"})]}),f.jsx(ls,{}),f.jsx(Vn,{render:f.jsxs("a",{href:"https://docs.byterover.dev",rel:"noopener noreferrer",target:"_blank",children:[f.jsx(e$,{}),f.jsx("span",{children:"Documentation"})]})}),f.jsx(Vn,{render:f.jsxs("a",{href:"https://github.com/campfirein/byterover-cli/issues",rel:"noopener noreferrer",target:"_blank",children:[f.jsx(n$,{}),f.jsx("span",{children:"Report an issue"})]})})]})]})}function GG(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:s,actionsRef:a,handle:c,triggerId:u,defaultTriggerId:h=null}=e,m=Ta(),p=!!m,y=sr(()=>c?.store??new OA({open:r,openProp:n,activeTriggerId:h,triggerIdProp:u,modal:!0,disablePointerDismissal:!0,nested:p,role:"alertdialog"})).current;y.useControlledProp("openProp",n),y.useControlledProp("triggerIdProp",u),y.useSyncedValue("nested",p),y.useContextCallback("onOpenChange",i),y.useContextCallback("onOpenChangeComplete",s);const x=y.useState("payload");jA({store:y,actionsRef:a,parentContext:m?.store.context});const b=S.useMemo(()=>({store:y}),[y]);return f.jsx(mv.Provider,{value:b,children:typeof t=="function"?t({payload:x}):t})}function Ff({...e}){return f.jsx(GG,{"data-slot":"alert-dialog",...e})}function KG({...e}){return f.jsx(wv,{"data-slot":"alert-dialog-portal",...e})}function QG({className:e,...t}){return f.jsx(gv,{"data-slot":"alert-dialog-overlay",className:se("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 Bf({className:e,size:t="default",...n}){return f.jsxs(KG,{children:[f.jsx(QG,{}),f.jsx(bv,{"data-slot":"alert-dialog-content","data-size":t,className:se("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 Hf({className:e,...t}){return f.jsx("div",{"data-slot":"alert-dialog-header",className:se("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 Uf({className:e,...t}){return f.jsx("div",{"data-slot":"alert-dialog-footer",className:se("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 qf({className:e,...t}){return f.jsx(DA,{"data-slot":"alert-dialog-title",className:se("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 Vf({className:e,...t}){return f.jsx(SA,{"data-slot":"alert-dialog-description",className:se("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}function $f({className:e,variant:t="outline",size:n="default",...r}){return f.jsx(Df,{"data-slot":"alert-dialog-cancel",className:se(e),render:f.jsx(ze,{variant:t,size:n}),...r})}const XG="state:getProjectConfig",ZG=e=>{const{apiClient:t}=Pe.getState();return t?t.request(XG,{projectPath:e}):Promise.reject(new Error("Not connected"))},JG=e=>({enabled:e.length>0,queryFn:()=>ZG(e),queryKey:["project-config",e]}),v8=({projectPath:e,queryConfig:t})=>Mn({...t,...JG(e)}),eK=()=>{const{apiClient:e}=Pe.getState();return e?e.request(pA.GET):Promise.reject(new Error("Not connected"))},tK=()=>({queryFn:eK,queryKey:["projects"]}),w8=({queryConfig:e}={})=>Mn({...tK(),...e}),nK=e=>{const{apiClient:t}=Pe.getState();return t?t.request(pA.REVEAL,e):Promise.reject(new Error("Not connected"))},rK=({mutationConfig:e}={})=>dn({...e,mutationFn:nK}),iK=/^(?:\/Users\/|\/home\/|[A-Za-z]:[/\\]Users[/\\])[^/\\]+([/\\].*)$/;function S8(e){const t=iK.exec(e);return t?`~${t[1]}`:e}function B0(e){return e.replace(/[/\\]+$/,"").split(/[/\\]/).at(-1)||e}const Bk=["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 oK(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 Bk[t%Bk.length]}const sK={lg:"size-7 text-xs",md:"size-6 text-xs",sm:"size-5 text-[10px]"};function Bv({name:e,seed:t,size:n="md"}){return f.jsx("span",{className:se("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-[""]',sK[n],oK(t??e)),children:f.jsx("span",{className:"relative",children:_0(e)})})}function C8({onClick:e,project:t}){const n=B0(t.projectPath);return f.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:[f.jsx(Bv,{name:n,seed:t.projectPath,size:"lg"}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f.jsx("span",{className:"truncate text-sm font-medium leading-5 text-card-foreground",children:n}),f.jsx("span",{className:"truncate text-xs leading-4 text-muted-foreground",children:S8(t.projectPath)})]})]})}function E8({onOpenChange:e,onSelect:t,open:n,projects:r}){const[i,s]=S.useState(""),a=S.useMemo(()=>{const u=i.trim().toLowerCase();return u?r.filter(h=>h.projectPath.toLowerCase().includes(u)):r},[r,i]);function c(u){t(u),e(!1)}return f.jsx(Al,{onOpenChange:e,open:n,children:f.jsxs(jl,{className:"gap-2 sm:max-w-lg",children:[f.jsxs(Vr,{children:[f.jsx($r,{children:"All projects"}),f.jsx(bl,{children:f.jsxs("div",{className:"relative",children:[f.jsx(lu,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),f.jsx(Ki,{autoFocus:!0,className:"pl-9",onChange:u=>s(u.target.value),placeholder:"Search...",value:i})]})})]}),f.jsx("div",{className:"-mx-4 no-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto px-4 mt-2",children:a.length===0?f.jsx("p",{className:"px-2 py-4 text-center text-xs text-muted-foreground",children:"No projects match your search."}):a.map(u=>f.jsx(C8,{onClick:()=>c(u),project:u},u.projectPath))})]})})}const Hk=5;function k8({name:e,project:t,remoteLabel:n}){return f.jsxs(f.Fragment,{children:[f.jsx(Bv,{name:e,seed:t.projectPath}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f.jsx("span",{className:"truncate text-sm font-medium leading-5 text-card-foreground!",children:e}),f.jsx("span",{className:"truncate text-xs leading-4 text-muted-foreground!",children:S8(t.projectPath)}),n&&f.jsx("span",{className:"text-muted-foreground! mono flex items-start gap-1 text-[10px] leading-4",children:f.jsxs("span",{className:"min-w-0 wrap-break-word",children:[f.jsx("span",{children:"Remote space: "}),f.jsx("span",{className:"text-primary-foreground! font-medium",children:n})]})})]})]})}function aK({onSelect:e,project:t,showRemote:n=!1}){const r=B0(t.projectPath),{data:i}=v8({projectPath:t.projectPath,queryConfig:{enabled:n}}),s=i?.brvConfig?.teamName,a=i?.brvConfig?.spaceName,c=s&&a?`${s} / ${a}`:void 0;return f.jsx(Vn,{className:"gap-2 rounded-md",onClick:e,children:f.jsx(k8,{name:r,project:t,remoteLabel:c})})}function lK({isSelected:e,onSelect:t,project:n}){const r=B0(n.projectPath),{data:i}=v8({projectPath:n.projectPath}),s=rK(),a=i?.brvConfig?.teamName,c=i?.brvConfig?.spaceName,u=a&&c?`${a} / ${c}`:void 0,h=i?.remoteUrl&&Dv(i.remoteUrl)?i.remoteUrl:void 0;function m(){s.mutate({projectPath:n.projectPath},{onError(p){lt.error(p instanceof Error?p.message:"Failed to open folder.")}})}return f.jsxs(ra,{children:[f.jsx(ia,{className:"gap-2 rounded-md",children:f.jsx(k8,{name:r,project:n,remoteLabel:u})}),f.jsxs(oa,{className:"min-w-56",children:[f.jsxs(Vn,{disabled:e,onClick:t,children:[f.jsx(WV,{className:"size-4"}),f.jsx("span",{className:"text-sm",children:e?"Current project":"Switch to this project"})]}),f.jsxs(Vn,{disabled:!h,onClick:()=>{h&&window.open(h,"_blank","noopener,noreferrer")},children:[f.jsx(oY,{className:"size-4"}),f.jsx("span",{className:"text-sm",children:"Open Remote space"})]}),f.jsxs(Vn,{disabled:s.isPending,onClick:m,children:[f.jsx(R$,{className:"size-4"}),f.jsx("span",{className:"text-sm",children:"Open local folder"})]})]})]})}function cK(){const e=Pe(b=>b.selectedProject),t=Pe(b=>b.setSelectedProject),{data:n}=w8({queryConfig:{refetchInterval:3e3,refetchIntervalInBackground:!1,staleTime:30*1e3}}),r=S.useMemo(()=>n?.locations??[],[n]),{openProjects:i,recentProjects:s}=S.useMemo(()=>{const b=[],w=[];for(const E of r)E.isActive?b.push(E):w.push(E);return{openProjects:b,recentProjects:w}},[r]),[a,c]=S.useState(!1),[u,h]=S.useState(!1),[m,p]=S.useState(!1),y=B0(e);function x(b){b.projectPath!==e&&t(b.projectPath)}return f.jsxs(f.Fragment,{children:[f.jsxs(ja,{onOpenChange:c,open:a,children:[f.jsxs(Oa,{render:f.jsx(ze,{variant:"ghost"}),children:[e?f.jsx(Bv,{name:y,seed:e,size:"sm"}):null,f.jsx("span",{className:"truncate",children:y||"No project selected"}),f.jsx(_f,{className:"size-4 shrink-0"})]}),f.jsxs(ks,{align:"start",className:"w-(--anchor-width) min-w-72",sideOffset:6,children:[f.jsxs(Vn,{onClick:()=>h(!0),children:[f.jsx(T$,{className:"size-4"}),f.jsx("span",{className:"text-sm",children:"Open Project"})]}),f.jsx(ls,{}),i.length>0&&f.jsxs(ul,{children:[f.jsx(Lc,{children:"Open Projects"}),i.map(b=>f.jsx(lK,{isSelected:b.projectPath===e,onSelect:()=>x(b),project:b},b.projectPath)),f.jsx(ls,{})]}),s.length>0&&f.jsxs(ul,{children:[f.jsx(Lc,{children:"Recent Projects"}),s.slice(0,Hk).map(b=>f.jsx(aK,{onSelect:()=>x(b),project:b},b.projectPath)),s.length>Hk&&f.jsx(Vn,{onClick:()=>p(!0),children:f.jsx("span",{className:"text-xs",children:"See all"})})]})]})]}),f.jsx(Ff,{onOpenChange:h,open:u,children:f.jsxs(Bf,{children:[f.jsxs(Hf,{children:[f.jsx(qf,{children:"Add a project"}),f.jsxs(Vf,{children:["To add a project, run ",f.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."]})]}),f.jsx(Uf,{children:f.jsx($f,{children:"Got it"})})]})}),f.jsx(E8,{onOpenChange:p,onSelect:x,open:m,projects:r})]})}const uK="byterover";function dK(e,t){return e?e.id!==uK&&t?.activeModel?`${e.name} | ${t.activeModel}`:e.name:"No provider configured"}const fK=()=>{const{apiClient:e}=Pe.getState();return e?e.request($n.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"))},Ma=()=>({queryFn:fK,queryKey:["vc","branches","all"],refetchInterval:1e4,refetchIntervalInBackground:!1,staleTime:5e3}),hK=({queryConfig:e}={})=>Mn({...Ma(),...e}),pK=e=>{const{apiClient:t}=Pe.getState();return t?t.request($n.BRANCH,{action:"set-upstream",upstream:e}):Promise.reject(new Error("Not connected"))},mK=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),t.invalidateQueries({queryKey:Ma().queryKey}),n?.(...i)},...r,mutationFn:pK})},gK=e=>{const{apiClient:t}=Pe.getState();return t?t.request($n.CHECKOUT,e):Promise.reject(new Error("Not connected"))},T8=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),t.invalidateQueries({queryKey:Ma().queryKey}),n?.(...i)},...r,mutationFn:gK})},yK=(e={})=>{const{apiClient:t}=Pe.getState();return t?t.request($n.FETCH,e):Promise.reject(new Error("Not connected"))},xK=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),t.invalidateQueries({queryKey:Ma().queryKey}),n?.(...i)},...r,mutationFn:yK})},bK=(e={})=>{const{apiClient:t}=Pe.getState();return t?t.request($n.PULL,e):Promise.reject(new Error("Not connected"))},N8=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),t.invalidateQueries({queryKey:Ma().queryKey}),n?.(...i)},...r,mutationFn:bK})};function vK(e,t){const n=t.trim().toLowerCase();return n===""?[...e]:e.filter(r=>r.name.toLowerCase().includes(n))}const Uk="refs/remotes/";function wK(e){const t=e.startsWith(Uk)?e.slice(Uk.length):e,n=t.indexOf("/");return n===-1?"unknown":t.slice(0,n)}function SK(e){const t=[],n=new Map;for(const r of e)if(r.isRemote){const i=wK(r.name),s=n.get(i);s?s.push(r):n.set(i,[r])}else t.push(r);return{locals:t,remotesByHost:n}}function CK(e,t){return t?e.some(r=>!r.isRemote&&r.name===t)?[...e]:[{isCurrent:!0,isRemote:!1,name:t},...e]:[...e]}const EK=e=>{const{apiClient:t}=Pe.getState();return t?t.request($n.BRANCH,{action:"delete",name:e}):Promise.reject(new Error("Not connected"))},kK=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ma().queryKey}),n?.(...i)},...r,mutationFn:EK})};function TK({branchName:e,onOpenChange:t,open:n}){const r=kK();async function i(){try{await r.mutateAsync(e),lt.success(`Deleted ${e}`),t(!1)}catch(s){lt.error(s instanceof Error?s.message:"Failed to delete branch")}}return f.jsx(Ff,{onOpenChange:t,open:n,children:f.jsxs(Bf,{children:[f.jsxs(Hf,{children:[f.jsx(qf,{children:"Delete branch?"}),f.jsxs(Vf,{children:["Branch ",f.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."]})]}),f.jsxs(Uf,{children:[f.jsx($f,{children:"Cancel"}),f.jsx(ze,{disabled:r.isPending,onClick:i,variant:"destructive",children:r.isPending?"Deleting…":"Delete branch"})]})]})})}function R8(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="string"}const NK=async()=>{const{apiClient:e}=Pe.getState();if(!e)throw new Error("Not connected");try{return{gitInitialized:!0,url:(await e.request($n.REMOTE,{subcommand:"show"})).url}}catch(t){if(R8(t)&&t.code===Ir.GIT_NOT_INITIALIZED)return{gitInitialized:!1,url:void 0};throw t}},Hv=()=>({queryFn:NK,queryKey:["vc","remote"],staleTime:5e3}),RK=({queryConfig:e}={})=>Mn({...Hv(),...e}),AK=()=>{const{apiClient:e}=Pe.getState();return e?e.request($n.INIT):Promise.reject(new Error("Not connected"))},jK=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),t.invalidateQueries({queryKey:Ma().queryKey}),t.invalidateQueries({queryKey:Hv().queryKey}),n?.(...i)},...r,mutationFn:AK})};function Uv(){const e=jK();async function t(){try{const n=await e.mutateAsync();lt.success(n.reinitialized?"Reinitialized version control":"Initialized version control")}catch(n){lt.error(n instanceof Error?n.message:"Failed to initialize")}}return f.jsxs(ze,{disabled:e.isPending,onClick:()=>{t().catch(()=>{})},size:"sm",variant:"outline",children:[f.jsx(kv,{className:"size-4 shrink-0"}),f.jsx("span",{children:e.isPending?"Initializing…":"Initialize Version Control"})]})}function OK({className:e,...t}){return f.jsx("label",{"data-slot":"label",className:se("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 MK=E0("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 Im({className:e,orientation:t="vertical",...n}){return f.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:se(MK({orientation:t}),e),...n})}function Pm({className:e,...t}){return f.jsx(OK,{"data-slot":"field-label",className:se("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 yx({className:e,...t}){return f.jsx("p",{"data-slot":"field-description",className:se("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 A8({className:e,children:t,errors:n,...r}){const i=S.useMemo(()=>{if(t)return t;if(!n?.length)return null;const s=[...new Map(n.map(a=>[a?.message,a])).values()];return s?.length==1?s[0]?.message:f.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:s.map((a,c)=>a?.message&&f.jsx("li",{children:a.message},c))})},[t,n]);return i?f.jsx("div",{role:"alert","data-slot":"field-error",className:se("text-sm font-normal text-destructive",e),...r,children:i}):null}function DK({initialName:e="",onOpenChange:t,open:n,startPoint:r}){const i=S.useId(),[s,a]=S.useState(e),[c,u]=S.useState(),h=T8();S.useEffect(()=>{n&&(a(e),u(void 0))},[e,n]);async function m(){const p=s.trim();if(p){u(void 0);try{await h.mutateAsync({branch:p,create:!0,startPoint:r}),lt.success(r?`Created ${p} from ${r} and switched to it`:`Created and switched to ${p}`),t(!1)}catch(y){u(y instanceof Error?y.message:"Failed to create branch")}}}return f.jsx(Al,{onOpenChange:t,open:n,children:f.jsxs(jl,{children:[f.jsxs(Vr,{children:[f.jsx($r,{children:"New branch"}),f.jsx(bl,{children:r?`Create a branch based on ${r} and switch to it.`:"Create a branch from the current HEAD and switch to it."})]}),f.jsxs(Im,{"data-invalid":!!c,children:[f.jsx(Pm,{htmlFor:i,children:"Branch name"}),f.jsx(Ki,{"aria-invalid":!!c,autoFocus:!0,id:i,onChange:p=>{a(p.target.value),c&&u(void 0)},onKeyDown:p=>{p.key==="Enter"&&m()},placeholder:"Branch name",value:s}),f.jsx(yx,{children:c})]}),f.jsxs(Na,{children:[f.jsx(gx,{render:f.jsx(ze,{className:"cursor-pointer",variant:"ghost"}),children:"Cancel"}),f.jsx(ze,{className:"cursor-pointer",disabled:s.trim().length===0||h.isPending,onClick:m,children:h.isPending?"Creating…":"Create branch"})]})]})})}function _K(e){return e?e.initialized?e.branch?e.branch:"detached":"No git repo":"branch"}function xx(e){const t=e.startsWith("refs/remotes/")?e.slice(13):e,n=t.indexOf("/");return n===-1?t:t.slice(n+1)}function LK(){const e=Cl(),[t,n]=S.useState(!1),[r,i]=S.useState(""),[s,a]=S.useState(null),[c,u]=S.useState(""),[h,m]=S.useState(),[p,y]=S.useState(null),[x,b]=S.useState(new Set(["origin"])),w=Iv(),E=hK({queryConfig:{enabled:w.data?.initialized??!1}}),k=T8(),T=xK(),N=N8(),O=mK(),{locals:j,remotesByHost:A}=S.useMemo(()=>{const D=CK(E.data??[],w.data?.branch),Q=r.trim()===""?D:vK(D,r);return SK(Q)},[E.data,r,w.data?.branch]),{currentLocal:R,hasLocals:_,hasOtherLocals:F,otherLocals:I}=S.useMemo(()=>{let D;const Q=[];for(const ee of j)ee.isCurrent&&!D?D=ee:Q.push(ee);return{currentLocal:D,hasLocals:j.length>0,hasOtherLocals:Q.length>0,otherLocals:Q}},[j]),H=A.size>0;function q(D,Q=""){n(!1),u(Q),m(void 0),a(D)}function V(D){n(!1),u(xx(D)),m(D),a("new-branch")}async function $(D,Q){n(!1);try{await k.mutateAsync({branch:D}),lt.success(Q)}catch(ee){lt.error("Failed to switch branch",{description:kn(ee)})}}function U(D){n(!1),y({branchName:D})}async function P(D){const Q=xx(D.name),ee=(E.data??[]).find(J=>!J.isRemote&&J.name===Q);if(ee){$(ee.name,`Switched to ${ee.name}`).catch(()=>{});return}n(!1);try{await k.mutateAsync({branch:Q,create:!0,startPoint:D.name});try{await O.mutateAsync(D.name)}catch{}lt.success(`Switched to ${Q} (tracking ${D.name})`)}catch(J){lt.error("Failed to checkout remote branch",{description:kn(J)})}}function Y(D){b(Q=>{const ee=new Set(Q);return ee.has(D)?ee.delete(D):ee.add(D),ee})}function G(){n(!1),lt.promise(T.mutateAsync({}),{error:D=>({description:kn(D),message:"Fetch failed"}),loading:"Fetching from remote…",success:"Fetched from remote"})}function X(){n(!1),lt.promise(N.mutateAsync({}),{error:D=>({description:kn(D),message:"Pull failed"}),loading:"Updating project…",success:D=>D.alreadyUpToDate?`${D.branch} is up to date`:`Pulled ${D.branch}`})}const L=w.data!==void 0,B=w.data?.initialized??!1,W=_K(w.data);return L&&!B?f.jsx(Uv,{}):f.jsxs(f.Fragment,{children:[f.jsxs(ja,{onOpenChange:n,open:t,children:[f.jsxs(Oa,{render:f.jsx(ze,{disabled:!L,variant:"ghost"}),children:[f.jsx(kv,{className:"size-4 shrink-0"}),f.jsx("span",{className:"truncate max-w-40",children:W}),f.jsx(_f,{className:"size-4 shrink-0"})]}),f.jsxs(ks,{align:"start",className:"w-80 p-0",sideOffset:6,children:[f.jsxs("div",{className:"flex items-center gap-1.5 p-2 border-b border-border",children:[f.jsxs("div",{className:"relative min-w-0 flex-1",children:[f.jsx(lu,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),f.jsx(Ki,{autoFocus:!0,className:"pl-8",onChange:D=>i(D.target.value),onKeyDown:D=>D.stopPropagation(),placeholder:"Search branches…",value:r})]}),f.jsx(ze,{className:"shrink-0",disabled:T.isPending,onClick:G,size:"icon-sm",title:"Fetch",variant:"ghost",children:f.jsx(ZV,{className:T.isPending?"size-4 animate-pulse":"size-4"})})]}),f.jsxs("div",{className:"max-h-[60vh] overflow-x-hidden overflow-y-auto py-1",children:[r.trim()===""&&f.jsxs(ul,{children:[f.jsxs(Vn,{onClick:X,children:[f.jsx(qV,{className:"size-5"}),f.jsx("span",{children:"Update Project"})]}),f.jsxs(Vn,{onClick:()=>{n(!1),e("/changes")},children:[f.jsx(O$,{className:"size-5"}),f.jsx("span",{children:"Commit..."})]}),f.jsx(ls,{}),f.jsxs(Vn,{onClick:()=>q("new-branch",R?.name||""),children:[f.jsx(Aa,{className:"size-5"}),f.jsx("span",{children:"New Branch..."})]})]}),R?f.jsxs(f.Fragment,{children:[f.jsx(ls,{}),f.jsxs(ul,{children:[f.jsx(Lc,{children:"Current"}),f.jsx(qk,{branch:R,onCheckout:()=>{$(R.name,`Switched to ${R.name}`).catch(()=>{})},onDelete:()=>U(R.name),onNewBranchFrom:()=>V(R.name),trackingBranch:w.data?.trackingBranch})]})]}):null,F&&f.jsxs(f.Fragment,{children:[f.jsx(ls,{}),f.jsxs(ul,{children:[f.jsx(Lc,{children:"Local"}),I.map(D=>f.jsx(qk,{branch:D,onCheckout:()=>{$(D.name,`Switched to ${D.name}`).catch(()=>{})},onDelete:()=>U(D.name),onNewBranchFrom:()=>V(D.name)},D.name))]})]}),H&&f.jsxs(f.Fragment,{children:[f.jsx(ls,{}),f.jsxs(ul,{children:[f.jsx(Lc,{children:"Remote"}),[...A.entries()].map(([D,Q])=>f.jsx(IK,{branches:Q,expanded:x.has(D),host:D,onBranchCheckout:P,onBranchNewBranchFrom:ee=>V(ee.name),onToggle:()=>Y(D)},D))]})]}),!_&&!H&&f.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:r?"No branches match your search.":"No branches."})]})]})]}),f.jsx(DK,{initialName:c,onOpenChange:D=>D?null:a(null),open:s==="new-branch",startPoint:h}),f.jsx(TK,{branchName:p?.branchName??"",onOpenChange:D=>D?null:y(null),open:p!==null})]})}function qk({branch:e,onCheckout:t,onDelete:n,onNewBranchFrom:r,trackingBranch:i}){return f.jsxs(ra,{children:[f.jsxs(ia,{children:[f.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.isCurrent?f.jsx(Ra,{className:"size-4 text-primary"}):null}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:e.name}),i?f.jsx("span",{className:"shrink-0 truncate max-w-32 text-xs text-muted-foreground",children:i}):null]}),f.jsxs(oa,{className:"min-w-56",children:[!e.isCurrent&&f.jsx(Vn,{onClick:t,children:"Checkout"}),f.jsx(Vn,{onClick:r,children:f.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["New Branch from '",e.name,"'..."]})}),!e.isCurrent&&f.jsxs(f.Fragment,{children:[f.jsx(ls,{}),f.jsx(Vn,{onClick:n,children:"Delete…"})]})]})]})}function IK({branches:e,expanded:t,host:n,onBranchCheckout:r,onBranchNewBranchFrom:i,onToggle:s}){return f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.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:s,type:"button",children:[f.jsx(IA,{className:`size-4 shrink-0 text-muted-foreground transition-transform ${t?"rotate-90":""}`}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:n})]}),t?e.map(a=>f.jsx(PK,{branch:a,onCheckout:()=>r(a),onNewBranchFrom:()=>i(a)},a.name)):null]})}function PK({branch:e,onCheckout:t,onNewBranchFrom:n}){const r=xx(e.name);return f.jsxs(ra,{children:[f.jsx(ia,{className:"pl-15",children:f.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:r})}),f.jsxs(oa,{className:"min-w-56",children:[f.jsx(Vn,{onClick:t,children:"Checkout"}),f.jsx(Vn,{onClick:n,children:f.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["New Branch from '",e.name,"'..."]})})]})]})}const zK="byterover",FK={danger:"destructive",inactive:"success",ok:"success",warn:"amber"},Vk={danger:"text-destructive hover:text-destructive",inactive:"",ok:"",warn:"text-amber-400 hover:text-amber-400"};function BK({remaining:e,tone:t}){return f.jsx("span",{className:se("mono inline-flex h-[18px] items-center rounded-full border px-1.5 text-[10px] leading-none",XA[t]),children:D0(e)})}function HK(){const e=Pe(j=>j.version),[t,n]=S.useState(!1),{data:r}=dv(),{data:i}=uv(),{data:s}=pv(),a=r?.providers.find(j=>j.isCurrent),c=a?.id===zK,u=dK(a,i),{data:h}=Av(),{billingSource:m,billingTone:p,needsPickPrompt:y,paidOrg:x,showCreditPill:b}=KA({preferredOrgId:s?.teamId}),w=c&&b,{data:E}=_v(),k=h?.teams?.find(j=>j.id===x?.organizationId)?.slug,T=QA({teamSlug:k,webAppUrl:E?.webAppUrl}),N=!a||c&&y;let O="";return N?O=Vk.warn:c&&(O=Vk[p]),f.jsxs("header",{className:"flex items-center gap-4 px-6 py-3.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("div",{className:"flex items-center gap-1.5 mr-2.5",children:[f.jsx("img",{alt:"ByteRover",className:"w-32",src:GW}),e&&f.jsxs("span",{className:"text-primary-foreground text-xs font-medium",children:["v",e]})]}),f.jsx(cK,{}),f.jsx(LK,{}),f.jsxs(ms,{children:[f.jsxs(gs,{render:f.jsx(ii,{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:[f.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1 shrink-0 rounded-full"}),f.jsx("span",{className:"leading-none",children:"Local"})]}),f.jsx($i,{children:"You're viewing the local web UI, served from the daemon on your machine."})]})]}),f.jsx("div",{className:"flex-1"}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs(ms,{children:[f.jsxs(gs,{render:f.jsx(ze,{className:se("whitespace-nowrap",O),onClick:()=>n(!0),size:"sm",variant:"ghost"}),children:[f.jsxs("span",{className:"relative mr-1 inline-flex size-4 shrink-0",children:[f.jsx(FA,{className:"size-4"}),a&&f.jsx(zk,{className:"border-background absolute -right-0.5 -bottom-0.5 size-2 border-2",tone:c&&y?"amber":c?FK[p]:"success"})]}),u,w&&m&&f.jsx(BK,{remaining:m.remaining,tone:p}),N&&f.jsx(zk,{className:"ml-1",pulsing:!0,tone:"amber"})]}),!a&&f.jsx($i,{children:"Configure provider to power curate & query"}),w&&p==="danger"&&f.jsxs($i,{children:[f.jsx("span",{children:"Out of credits."})," ",T?f.jsx("a",{className:"text-primary-foreground hover:underline",href:T,onClick:j=>j.stopPropagation(),rel:"noopener noreferrer",target:"_blank",children:"Top up"}):f.jsx("span",{children:"Switch team, top up, or use a bring-your-own-key provider."})]}),w&&m&&p==="warn"&&f.jsxs($i,{children:["Running low on credits — ",D0(m.remaining)," remaining."]}),c&&y&&p!=="danger"&&p!=="warn"&&f.jsx($i,{children:"Select a team to bill your usage to."})]}),f.jsx(L0,{onOpenChange:n,open:t}),f.jsx(WG,{}),f.jsx(YG,{})]})]})}function UK(){const{completed:e,inProgress:t,total:n}=tV(),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 qK(){const{data:e}=Iv(),{staged:t,unmerged:n,unstaged:r}=e8(e),i=t.length+r.length+n.length;return i===0?null:f.jsx("span",{className:"ml-1.5 rounded-md bg-[#4f3422] p-1 text-xs font-semibold tabular-nums text-[#ffc53d]",children:i})}function VK(){const e=UK();qW();const t=Ht(c=>c.tourActive),n=Ht(c=>c.tourStep),r=Ht(c=>c.tourTaskId),{pathname:i}=Qi(),s=i.startsWith("/tasks"),a=t&&(n==="curate"||n==="query")&&!r&&!s;return f.jsxs("div",{className:"flex h-screen flex-col",children:[f.jsx(HK,{}),f.jsx("nav",{className:"border-border flex gap-2 border-b px-6",children:e.map(c=>{const u=f.jsxs(X6,{className:({isActive:h})=>se("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":h,"border-transparent text-muted-foreground hover:text-foreground":!h}),to:c.path,children:[f.jsx("span",{children:c.label}),c.badge&&f.jsxs(ii,{className:"tabular-nums",variant:"secondary",children:[c.badgeTone==="active"&&f.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1.5 shrink-0 rounded-full"}),c.badge]}),c.path==="/changes"&&f.jsx(qK,{})]});return c.path==="/tasks"?f.jsx(Lv,{active:a,label:"Click here",children:u},c.path):f.jsx("span",{children:u},c.path)})}),f.jsx("main",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:f.jsx(W6,{})}),f.jsx(UW,{}),f.jsx(BW,{}),f.jsx(cV,{}),f.jsx(fV,{}),f.jsx(VW,{})]})}function $K(){return f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("section",{className:"grid gap-4 grid-cols-3",children:[f.jsxs(ca,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[f.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Total tasks"}),f.jsx("strong",{className:"text-3xl leading-none",children:"0"}),f.jsx(Dp,{children:"Waiting for the skipped task-subscription issue."})]}),f.jsxs(ca,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[f.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Success rate"}),f.jsx("strong",{className:"text-3xl leading-none",children:"0%"}),f.jsx(Dp,{children:"No client-side task history is wired into the web app yet."})]}),f.jsxs(ca,{className:"gap-1 px-4 shadow-none ring-border/80",size:"sm",children:[f.jsx("div",{className:"text-xs tracking-wider uppercase text-muted-foreground",children:"Average duration"}),f.jsx("strong",{className:"text-3xl leading-none",children:"0s"}),f.jsx(Dp,{children:"This will populate once task-store parity lands."})]})]}),f.jsxs(ca,{className:"min-h-56 items-start justify-center gap-3 px-5 shadow-sm ring-border/70",size:"sm",children:[f.jsx(ii,{className:"rounded-sm border-yellow-500/20 bg-yellow-500/10 text-yellow-600",variant:"outline",children:"Empty state"}),f.jsx(HG,{className:"font-semibold",children:"No task data available yet"}),f.jsx(Dp,{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 YK="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",WK={[Ir.CONFIG_KEY_NOT_SET]:{label:"Set identity",target:"/configuration"},[Ir.NO_REMOTE]:{label:"Set remote",target:"/configuration"},[Ir.USER_NOT_CONFIGURED]:{label:"Set identity",target:"/configuration"}};function GK(e){if(typeof e!="object"||e===null||!("code"in e))return;const{code:t}=e;return typeof t=="string"?t:void 0}function pd(e,t,n,r={}){const i=kn(e,t,r),s=WK[GK(e)??""];if(s){lt.error(i,{action:{label:s.label,onClick:()=>n(s.target)}});return}lt.error(i)}const KK=(e={})=>{const{apiClient:t}=Pe.getState();return t?t.request($n.ADD,e):Promise.reject(new Error("Not connected"))},QK=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),n?.(...i)},...r,mutationFn:KK})},XK=({addAll:e,filePaths:t,message:n})=>{const{apiClient:r}=Pe.getState();if(!r)return Promise.reject(new Error("Not connected"));const i=()=>r.request($n.COMMIT,{message:n});if(e||t&&t.length>0){const s=t?{filePaths:t}:{};return r.request($n.ADD,s).then(i)}return i()},ZK=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),n?.(...i)},...r,mutationFn:XK})},JK=()=>{const{apiClient:e}=Pe.getState();return e?e.request($n.MERGE,{action:"abort"}):Promise.reject(new Error("Not connected"))},eQ=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),t.invalidateQueries({queryKey:["vc","diff"]}),t.invalidateQueries({queryKey:["vc","diffs"]}),n?.(...i)},...r,mutationFn:JK})},tQ=e=>{const{apiClient:t}=Pe.getState();return t?t.request($n.MERGE,{action:"continue",message:e.message}):Promise.reject(new Error("Not connected"))},nQ=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),t.invalidateQueries({queryKey:["vc","diff"]}),t.invalidateQueries({queryKey:["vc","diffs"]}),n?.(...i)},...r,mutationFn:tQ})},rQ=(e={})=>{const{apiClient:t}=Pe.getState();return t?t.request($n.PUSH,e):Promise.reject(new Error("Not connected"))},iQ=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),t.invalidateQueries({queryKey:Ma().queryKey}),n?.(...i)},...r,mutationFn:rQ})},oQ=(e={})=>{const{apiClient:t}=Pe.getState();return t?t.request($n.RESET,e):Promise.reject(new Error("Not connected"))},sQ=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),n?.(...i)},...r,mutationFn:oQ})};function aQ(e){return e.status==="unmerged"?"merge":e.isStaged?"staged":"unstaged"}function cm(e){return`${aQ(e)}:${e.path}`}const bx="Please sign in to use sync feature";function $k(e,t){return t?e:f.jsxs(ms,{children:[f.jsx(gs,{render:f.jsx("span",{tabIndex:0}),children:e}),f.jsx($i,{children:bx})]})}function lQ({ahead:e=0,behind:t=0,branch:n,hasTracking:r,isAborting:i=!1,isAuthenticated:s,isPulling:a,isPushing:c,mergeInProgress:u=!1,onAbortMerge:h,onPull:m,onPush:p}){const y=a||c||i,x=s?r?"Pull from upstream":"No upstream tracking branch":bx,b=s?r?"Push to upstream":"Push and set upstream":bx,w=f.jsxs(ze,{className:"h-7 gap-1 px-2 text-sm",disabled:y||!r||!s,onClick:m,size:"sm",title:x,variant:"ghost",children:[a?f.jsx(qr,{className:"size-3.5 animate-spin"}):f.jsx($V,{className:"size-3.5"}),t>0&&f.jsx("span",{className:"text-sm tabular-nums",children:t})]}),E=f.jsxs(ze,{className:"h-7 gap-1 px-2 text-sm",disabled:y||!s,onClick:p,size:"sm",title:b,variant:"ghost",children:[c?f.jsx(qr,{className:"size-3.5 animate-spin"}):f.jsx(QV,{className:"size-3.5"}),e>0&&f.jsx("span",{className:"text-sm tabular-nums",children:e})]});return f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"text-muted-foreground flex min-w-0 items-center gap-1.5",children:[f.jsx(kv,{className:"size-4 shrink-0"}),f.jsx("span",{className:"truncate text-sm font-medium",children:n??"(detached)"})]}),f.jsxs("div",{className:"flex items-center gap-0.5",children:[u&&h&&f.jsxs(ze,{className:"text-destructive h-7 gap-1 px-2 text-sm hover:bg-destructive/10 hover:text-destructive",disabled:y,onClick:h,size:"sm",title:"Abort merge",variant:"ghost",children:[i?f.jsx(qr,{className:"size-3.5 animate-spin"}):f.jsx(g$,{className:"size-3.5"}),f.jsx("span",{children:"Abort"})]}),$k(w,s),$k(E,s)]})]})}function qv({className:e,...t}){return f.jsx("textarea",{"data-slot":"textarea",className:se("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 cQ({canCommit:e,isCommitting:t,message:n,onCommit:r,onMessageChange:i}){const s=a=>{(a.metaKey||a.ctrlKey)&&a.key==="Enter"&&(a.preventDefault(),r())};return f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx(qv,{className:"min-h-20 resize-none",onChange:a=>i(a.target.value),onKeyDown:s,placeholder:"Commit message (Cmd/Ctrl+Enter to commit)",value:n}),f.jsx(ze,{className:"w-full gap-2",disabled:!e||!n.trim()||t,onClick:r,size:"sm",children:"Commit"})]})}const uQ=e=>{const{apiClient:t}=Pe.getState();return t?t.request($n.DIFF,e):Promise.reject(new Error("Not connected"))},dQ=e=>({queryFn:()=>uQ(e),queryKey:["vc","diff",e.path,e.side],staleTime:0}),fQ=({enabled:e=!0,path:t,queryConfig:n,side:r})=>Mn({...dQ({path:t,side:r}),enabled:e&&!!t,...n});function j8({file:e,onOpenFile:t,onStageToggle:n}){const r=e.isStaged?"Unstage":"Stage",i=e.isStaged?Tv:Aa,s=e.status==="deleted";return f.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:[f.jsx(A0,{className:"text-primary-foreground size-4 shrink-0",strokeWidth:2}),f.jsx("span",{className:"text-foreground flex-1 truncate font-mono text-xs",children:e.path}),f.jsx(ze,{className:"size-6 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:s,onClick:t,size:"icon-xs",title:s?"File no longer exists":"Open file",variant:"ghost",children:f.jsx(_m,{className:"size-3"})}),f.jsx(ze,{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:f.jsx(i,{className:"size-3"})})]})}var W2={exports:{}};var Yk;function hQ(){return Yk||(Yk=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var c=arguments[a];c&&(s=i(s,r(c)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var c in s)t.call(s,c)&&s[c]&&(a=i(a,c));return a}function i(s,a){return a?s?s+" "+a:s+a:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(W2)),W2.exports}var pQ=hQ();const oo=eu(pQ);var Wk=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function mQ(e,t){return!!(e===t||Wk(e)&&Wk(t))}function gQ(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!mQ(e[n],t[n]))return!1;return!0}function yQ(e,t){t===void 0&&(t=gQ);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}function xQ(e,t,n){let r=0,i;const s={},a=[];return e.forEach((c,u)=>{const h=t.some(m=>m>=u-n&&m<=u+n);!h&&i===void 0?(i={index:r,startLine:u,endLine:u,lines:1},a.push(i),s[u]=i.index,r++):!h&&i?(i.endLine=u,i.lines++,s[u]=i.index):i=void 0}),{lineBlocks:s,blocks:a}}class Ts{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const s=this.castInput(t,r),a=this.castInput(n,r),c=this.removeEmpty(this.tokenize(s,r)),u=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(c,u,r,i)}diffWithOptionsObj(t,n,r,i){var s;const a=T=>{if(T=this.postProcess(T,r),i){setTimeout(function(){i(T)},0);return}else return T},c=n.length,u=t.length;let h=1,m=c+u;r.maxEditLength!=null&&(m=Math.min(m,r.maxEditLength));const p=(s=r.timeout)!==null&&s!==void 0?s:1/0,y=Date.now()+p,x=[{oldPos:-1,lastComponent:void 0}];let b=this.extractCommon(x[0],n,t,0,r);if(x[0].oldPos+1>=u&&b+1>=c)return a(this.buildValues(x[0].lastComponent,n,t));let w=-1/0,E=1/0;const k=()=>{for(let T=Math.max(w,-h);T<=Math.min(E,h);T+=2){let N;const O=x[T-1],j=x[T+1];O&&(x[T-1]=void 0);let A=!1;if(j){const _=j.oldPos-T;A=j&&0<=_&&_<c}const R=O&&O.oldPos+1<u;if(!A&&!R){x[T]=void 0;continue}if(!R||A&&O.oldPos<j.oldPos?N=this.addToPath(j,!0,!1,0,r):N=this.addToPath(O,!1,!0,1,r),b=this.extractCommon(N,n,t,T,r),N.oldPos+1>=u&&b+1>=c)return a(this.buildValues(N.lastComponent,n,t))||!0;x[T]=N,N.oldPos+1>=u&&(E=Math.min(E,T-1)),b+1>=c&&(w=Math.max(w,T+1))}h++};if(i)(function T(){setTimeout(function(){if(h>m||Date.now()>y)return i(void 0);k()||T()},0)})();else for(;h<=m&&Date.now()<=y;){const T=k();if(T)return T}}addToPath(t,n,r,i,s){const a=t.lastComponent;return a&&!s.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,s){const a=n.length,c=r.length;let u=t.oldPos,h=u-i,m=0;for(;h+1<a&&u+1<c&&this.equals(r[u+1],n[h+1],s);)h++,u++,m++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return m&&!s.oneChangePerToken&&(t.lastComponent={count:m,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=u,h}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 s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();const a=i.length;let c=0,u=0,h=0;for(;c<a;c++){const m=i[c];if(m.removed)m.value=this.join(r.slice(h,h+m.count)),h+=m.count;else{if(!m.added&&this.useLongestToken){let p=n.slice(u,u+m.count);p=p.map(function(y,x){const b=r[h+x];return b.length>y.length?b:y}),m.value=this.join(p)}else m.value=this.join(n.slice(u,u+m.count));u+=m.count,m.added||(h+=m.count)}}return i}}class bQ extends Ts{}const O8=new bQ;function vQ(e,t,n){return O8.diff(e,t,n)}function Gk(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 Kk(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 vx(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 wx(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 md(e,t){return vx(e,t,"")}function _p(e,t){return wx(e,t,"")}function Qk(e,t){return t.slice(0,wQ(e,t))}function wQ(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 s=0;i[0]=0;for(let a=1;a<r;a++){for(t[a]==t[s]?i[a]=i[s]:i[a]=s;s>0&&t[a]!=t[s];)s=i[s];t[a]==t[s]&&s++}s=0;for(let a=n;a<e.length;a++){for(;s>0&&e[a]!=t[s];)s=i[s];e[a]==t[s]&&s++}return s}function SQ(e){return e.includes(`\r
24
+ `)&&!e.startsWith(`
25
+ `)&&!e.match(/[^\r]\n/)}function CQ(e){return!e.includes(`\r
26
+ `)&&e.includes(`
27
+ `)}function M8(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 Sx(e,t){if(t)return Hd(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function wc(e,t){if(t)return Hd(e,t)[0];const n=e.match(/^\s*/);return n?n[0]:""}function Hd(e,t){if(!t)return[wc(e),Sx(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');const n=M8(e,t),r=n[0],i=n[n.length-1],s=/\s/.test(r)?r:"",a=/\s/.test(i)?i:"";return[s,a]}const zm="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}",EQ=new RegExp(`[${zm}]+|\\s+|[^${zm}]`,"ug");class kQ extends Ts{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 a=n.intlSegmenter;if(a.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=M8(t,a)}else r=t.match(EQ)||[];const i=[];let s=null;return r.forEach(a=>{/\s/.test(a)?s==null?i.push(a):i.push(i.pop()+a):s!=null&&/\s/.test(s)?i[i.length-1]==s?i.push(i.pop()+a):i.push(s+a):i.push(a),s=a}),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,s=null;return t.forEach(a=>{a.added?i=a:a.removed?s=a:((i||s)&&Xk(r,s,i,a,n.intlSegmenter),r=a,i=null,s=null)}),(i||s)&&Xk(r,s,i,null,n.intlSegmenter),t}}const D8=new kQ;function TQ(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?L8(e,t,n):D8.diff(e,t,n)}function Xk(e,t,n,r,i){if(t&&n){const[s,a]=Hd(t.value,i),[c,u]=Hd(n.value,i);if(e){const h=Gk(s,c);e.value=wx(e.value,c,h),t.value=md(t.value,h),n.value=md(n.value,h)}if(r){const h=Kk(a,u);r.value=vx(r.value,u,h),t.value=_p(t.value,h),n.value=_p(n.value,h)}}else if(n){if(e){const s=wc(n.value,i);n.value=n.value.substring(s.length)}if(r){const s=wc(r.value,i);r.value=r.value.substring(s.length)}}else if(e&&r){const s=wc(r.value,i),[a,c]=Hd(t.value,i),u=Gk(s,a);t.value=md(t.value,u);const h=Kk(md(s,u),c);t.value=_p(t.value,h),r.value=vx(r.value,s,h),e.value=wx(e.value,s,s.slice(0,s.length-h.length))}else if(r){const s=wc(r.value,i),a=Sx(t.value,i),c=Qk(a,s);t.value=_p(t.value,c)}else if(e){const s=Sx(e.value,i),a=wc(t.value,i),c=Qk(s,a);t.value=md(t.value,c)}}class NQ extends Ts{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${zm}]+|[^\\S\\n\\r]+|[^${zm}]`,"ug");return t.match(n)||[]}}const _8=new NQ;function L8(e,t,n){return _8.diff(e,t,n)}function RQ(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 AQ extends Ts{constructor(){super(...arguments),this.tokenize=I8}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 Vv=new AQ;function xs(e,t,n){return Vv.diff(e,t,n)}function jQ(e,t,n){return n=RQ(n,{ignoreWhitespace:!0}),Vv.diff(e,t,n)}function I8(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 s=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=s:n.push(s)}return n}function OQ(e){return e=="."||e=="!"||e=="?"}class MQ extends Ts{tokenize(t){var n;const r=[];let i=0;for(let s=0;s<t.length;s++){if(s==t.length-1){r.push(t.slice(i));break}if(OQ(t[s])&&t[s+1].match(/\s/)){for(r.push(t.slice(i,s+1)),s=i=s+1;!((n=t[s+1])===null||n===void 0)&&n.match(/\s/);)s++;r.push(t.slice(i,s+1)),i=s+1}}return r}}const P8=new MQ;function DQ(e,t,n){return P8.diff(e,t,n)}class _Q extends Ts{tokenize(t){return t.split(/([{}:;,]|\s+)/)}}const z8=new _Q;function LQ(e,t,n){return z8.diff(e,t,n)}class IQ extends Ts{constructor(){super(...arguments),this.tokenize=I8}get useLongestToken(){return!0}castInput(t,n){const{undefinedReplacement:r,stringifyReplacer:i=(s,a)=>typeof a>"u"?r:a}=n;return typeof t=="string"?t:JSON.stringify(Fm(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 F8=new IQ;function PQ(e,t,n){return F8.diff(e,t,n)}function Fm(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i===void 0?"":i,e));let s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];let a;if(Object.prototype.toString.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),s=0;s<e.length;s+=1)a[s]=Fm(e[s],t,n,r,String(s));return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),typeof e=="object"&&e!==null){t.push(e),a={},n.push(a);const c=[];let u;for(u in e)Object.prototype.hasOwnProperty.call(e,u)&&c.push(u);for(c.sort(),s=0;s<c.length;s+=1)u=c[s],a[u]=Fm(e[u],t,n,r,u);t.pop(),n.pop()}else a=e;return a}class zQ extends Ts{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}}const B8=new zQ;function FQ(e,t,n){return B8.diff(e,t,n)}function H8(e){return Array.isArray(e)?e.map(t=>H8(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 U8(e){return Array.isArray(e)?e.map(t=>U8(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 BQ(e){return Array.isArray(e)||(e=[e]),!e.some(t=>t.hunks.some(n=>n.lines.some(r=>!r.startsWith("\\")&&r.endsWith("\r"))))}function HQ(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 s;return r.startsWith("\\")||r.endsWith("\r")||((s=n.lines[i+1])===null||s===void 0?void 0:s.startsWith("\\"))})))}function $v(e){const t=e.split(/\n/),n=[];let r=0;function i(){const c={};for(n.push(c);r<t.length;){const u=t[r];if(/^(---|\+\+\+|@@)\s/.test(u))break;const h=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(u);h&&(c.index=u.substring(h[0].length).trim()),r++}for(s(c),s(c),c.hunks=[];r<t.length;){const u=t[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(u))break;if(/^@@/.test(u))c.hunks.push(a());else{if(u)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(u));r++}}}function s(c){const u=/^(---|\+\+\+)\s+/.exec(t[r]);if(u){const h=u[1],m=t[r].substring(3).trim().split(" ",2),p=(m[1]||"").trim();let y=m[0].replace(/\\\\/g,"\\");y.startsWith('"')&&y.endsWith('"')&&(y=y.substr(1,y.length-2)),h==="---"?(c.oldFileName=y,c.oldHeader=p):(c.newFileName=y,c.newHeader=p),r++}}function a(){var c;const u=r,h=t[r++],m=h.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),p={oldStart:+m[1],oldLines:typeof m[2]>"u"?1:+m[2],newStart:+m[3],newLines:typeof m[4]>"u"?1:+m[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 b=t[r].length==0&&r!=t.length-1?" ":t[r][0];if(b==="+"||b==="-"||b===" "||b==="\\")p.lines.push(t[r]),b==="+"?y++:b==="-"?x++:b===" "&&(y++,x++);else throw new Error(`Hunk at line ${u+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 "+(u+1));if(x!==p.oldLines)throw new Error("Removed line count did not match for hunk at line "+(u+1));return p}for(;r<t.length;)i();return n}function UQ(e,t,n){let r=!0,i=!1,s=!1,a=1;return function c(){if(r&&!s){if(i?a++:r=!1,e+a<=n)return e+a;s=!0}if(!i)return s||(r=!0),t<=e-a?e-a++:(i=!0,c())}}function q8(e,t,n={}){let r;if(typeof t=="string"?r=$v(t):Array.isArray(t)?r=t:r=[t],r.length>1)throw new Error("applyPatch only works with a single input.");return qQ(e,r[0],n)}function qQ(e,t,n={}){(n.autoConvertLineEndings||n.autoConvertLineEndings==null)&&(SQ(e)&&BQ(t)?t=H8(t):CQ(e)&&HQ(t)&&(t=U8(t)));const r=e.split(`
33
+ `),i=t.hunks,s=n.compareLine||((b,w,E,k)=>w===k),a=n.fuzzFactor||0;let c=0;if(a<0||!Number.isInteger(a))throw new Error("fuzzFactor must be a non-negative integer");if(!i.length)return e;let u="",h=!1,m=!1;for(let b=0;b<i[i.length-1].lines.length;b++){const w=i[i.length-1].lines[b];w[0]=="\\"&&(u[0]=="+"?h=!0:u[0]=="-"&&(m=!0)),u=w}if(h){if(m){if(!a&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!a)return!1}else if(m){if(r[r.length-1]!="")r.push("");else if(!a)return!1}function p(b,w,E,k=0,T=!0,N=[],O=0){let j=0,A=!1;for(;k<b.length;k++){const R=b[k],_=R.length>0?R[0]:" ",F=R.length>0?R.substr(1):R;if(_==="-")if(s(w+1,r[w],_,F))w++,j=0;else return!E||r[w]==null?null:(N[O]=r[w],p(b,w+1,E-1,k,!1,N,O+1));if(_==="+"){if(!T)return null;N[O]=F,O++,j=0,A=!0}if(_===" ")if(j++,N[O]=r[w],s(w+1,r[w],_,F))O++,T=!0,A=!1,w++;else return A||!E?null:r[w]&&(p(b,w+1,E-1,k+1,!1,N,O+1)||p(b,w+1,E-1,k,!1,N,O+1))||p(b,w,E-1,k+1,!1,N,O)}return O-=j,w-=j,N.length=O,{patchedLines:N,oldLineLastI:w-1}}const y=[];let x=0;for(let b=0;b<i.length;b++){const w=i[b];let E;const k=r.length-w.oldLines+a;let T;for(let N=0;N<=a;N++){T=w.oldStart+x-1;const O=UQ(T,c,k);for(;T!==void 0&&(E=p(w.lines,T,N),!E);T=O());if(E)break}if(!E)return!1;for(let N=c;N<T;N++)y.push(r[N]);for(let N=0;N<E.patchedLines.length;N++){const O=E.patchedLines[N];y.push(O)}c=E.oldLineLastI+1,x=T+1-w.oldStart}for(let b=c;b<r.length;b++)y.push(r[b]);return y.join(`
34
+ `)}function VQ(e,t){const n=typeof e=="string"?$v(e):e;let r=0;function i(){const s=n[r++];if(!s)return t.complete();t.loadFile(s,function(a,c){if(a)return t.complete(a);const u=q8(c,s,t);t.patched(s,u,function(h){if(h)return t.complete(h);i()})})}i()}function V8(e){return Array.isArray(e)?e.map(t=>V8(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 $8={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},$Q={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},YQ={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function Cx(e,t,n,r,i,s,a){let c;a?typeof a=="function"?c={callback:a}:c=a:c={},typeof c.context>"u"&&(c.context=4);const u=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:m}=c;xs(n,r,Object.assign(Object.assign({},c),{callback:p=>{const y=h(p);m(y)}}))}else return h(xs(n,r,c));function h(m){if(!m)return;m.push({value:"",lines:[]});function p(T){return T.map(function(N){return" "+N})}const y=[];let x=0,b=0,w=[],E=1,k=1;for(let T=0;T<m.length;T++){const N=m[T],O=N.lines||GQ(N.value);if(N.lines=O,N.added||N.removed){if(!x){const j=m[T-1];x=E,b=k,j&&(w=u>0?p(j.lines.slice(-u)):[],x-=w.length,b-=w.length)}for(const j of O)w.push((N.added?"+":"-")+j);N.added?k+=O.length:E+=O.length}else{if(x)if(O.length<=u*2&&T<m.length-2)for(const j of p(O))w.push(j);else{const j=Math.min(O.length,u);for(const R of p(O.slice(0,j)))w.push(R);const A={oldStart:x,oldLines:E-x+j,newStart:b,newLines:k-b+j,lines:w};y.push(A),x=0,b=0,w=[]}E+=O.length,k+=O.length}}for(const T of y)for(let N=0;N<T.lines.length;N++)T.lines[N].endsWith(`
35
+ `)?T.lines[N]=T.lines[N].slice(0,-1):(T.lines.splice(N+1,0,"\"),N++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:s,hunks:y}}}function Bm(e,t){if(t||(t=$8),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=>Bm(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 s of i.lines)n.push(s)}return n.join(`
37
+ `)+`
38
+ `}function Y8(e,t,n,r,i,s,a){if(typeof a=="function"&&(a={callback:a}),a?.callback){const{callback:c}=a;Cx(e,t,n,r,i,s,Object.assign(Object.assign({},a),{callback:u=>{c(u?Bm(u,a.headerOptions):void 0)}}))}else{const c=Cx(e,t,n,r,i,s,a);return c?Bm(c,a?.headerOptions):void 0}}function WQ(e,t,n,r,i,s){return Y8(e,e,t,n,r,i,s)}function GQ(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 KQ(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 QQ(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(XQ(r.value)),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}return t.join("")}function XQ(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 ZQ=Object.freeze(Object.defineProperty({__proto__:null,Diff:Ts,FILE_HEADERS_ONLY:$Q,INCLUDE_HEADERS:$8,OMIT_HEADERS:YQ,applyPatch:q8,applyPatches:VQ,arrayDiff:B8,canonicalize:Fm,characterDiff:O8,convertChangesToDMP:KQ,convertChangesToXML:QQ,createPatch:WQ,createTwoFilesPatch:Y8,cssDiff:z8,diffArrays:FQ,diffChars:vQ,diffCss:LQ,diffJson:PQ,diffLines:xs,diffSentences:DQ,diffTrimmedLines:jQ,diffWords:TQ,diffWordsWithSpace:L8,formatPatch:Bm,jsonDiff:F8,lineDiff:Vv,parsePatch:$v,reversePatch:V8,sentenceDiff:P8,structuredPatch:Cx,wordDiff:D8,wordsWithSpaceDiff:_8},Symbol.toStringTag,{value:"Module"}));function W8(e){return typeof e>"u"||e===null}function JQ(e){return typeof e=="object"&&e!==null}function eX(e){return Array.isArray(e)?e:W8(e)?[]:[e]}function tX(e,t){var n,r,i,s;if(t)for(s=Object.keys(t),n=0,r=s.length;n<r;n+=1)i=s[n],e[i]=t[i];return e}function nX(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function rX(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var iX=W8,oX=JQ,sX=eX,aX=nX,lX=rX,cX=tX,ur={isNothing:iX,isObject:oX,toArray:sX,repeat:aX,isNegativeZero:lX,extend:cX};function G8(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 af(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=G8(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}af.prototype=Object.create(Error.prototype);af.prototype.constructor=af;af.prototype.toString=function(t){return this.name+": "+G8(this,t)};var ti=af;function G2(e,t,n,r,i){var s="",a="",c=Math.floor(i/2)-1;return r-t>c&&(s=" ... ",t=r-c+s.length),n-r>c&&(a=" ...",n=r+c-a.length),{str:s+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+s.length}}function K2(e,t){return ur.repeat(" ",t-e.length)+e}function uX(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=[],s,a=-1;s=n.exec(e.buffer);)i.push(s.index),r.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var c="",u,h,m=Math.min(e.line+t.linesAfter,i.length).toString().length,p=t.maxLength-(t.indent+m+3);for(u=1;u<=t.linesBefore&&!(a-u<0);u++)h=G2(e.buffer,r[a-u],i[a-u],e.position-(r[a]-r[a-u]),p),c=ur.repeat(" ",t.indent)+K2((e.line-u+1).toString(),m)+" | "+h.str+`
44
+ `+c;for(h=G2(e.buffer,r[a],i[a],e.position,p),c+=ur.repeat(" ",t.indent)+K2((e.line+1).toString(),m)+" | "+h.str+`
45
+ `,c+=ur.repeat("-",t.indent+m+3+h.pos)+`^
46
+ `,u=1;u<=t.linesAfter&&!(a+u>=i.length);u++)h=G2(e.buffer,r[a+u],i[a+u],e.position-(r[a]-r[a+u]),p),c+=ur.repeat(" ",t.indent)+K2((e.line+u+1).toString(),m)+" | "+h.str+`
47
+ `;return c.replace(/\n$/,"")}var dX=uX,fX=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],hX=["scalar","sequence","mapping"];function pX(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function mX(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(fX.indexOf(n)===-1)throw new ti('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=pX(t.styleAliases||null),hX.indexOf(this.kind)===-1)throw new ti('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Or=mX;function Zk(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(s,a){s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi&&(i=a)}),n[i]=r}),n}function gX(){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 Ex(e){return this.extend(e)}Ex.prototype.extend=function(t){var n=[],r=[];if(t instanceof Or)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 ti("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(s){if(!(s instanceof Or))throw new ti("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ti("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ti("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(s){if(!(s instanceof Or))throw new ti("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ex.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Zk(i,"implicit"),i.compiledExplicit=Zk(i,"explicit"),i.compiledTypeMap=gX(i.compiledImplicit,i.compiledExplicit),i};var yX=Ex,xX=new Or("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),bX=new Or("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),vX=new Or("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),wX=new yX({explicit:[xX,bX,vX]});function SX(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function CX(){return null}function EX(e){return e===null}var kX=new Or("tag:yaml.org,2002:null",{kind:"scalar",resolve:SX,construct:CX,predicate:EX,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function TX(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 NX(e){return e==="true"||e==="True"||e==="TRUE"}function RX(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var AX=new Or("tag:yaml.org,2002:bool",{kind:"scalar",resolve:TX,construct:NX,predicate:RX,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 jX(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function OX(e){return 48<=e&&e<=55}function MX(e){return 48<=e&&e<=57}function DX(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(!jX(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!OX(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(!MX(e.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function _X(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 LX(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!ur.isNegativeZero(e)}var IX=new Or("tag:yaml.org,2002:int",{kind:"scalar",resolve:DX,construct:_X,predicate:LX,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"]}}),PX=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function zX(e){return!(e===null||!PX.test(e)||e[e.length-1]==="_")}function FX(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 BX=/^[-+]?[0-9]+e/;function HX(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(ur.isNegativeZero(e))return"-0.0";return n=e.toString(10),BX.test(n)?n.replace("e",".e"):n}function UX(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ur.isNegativeZero(e))}var qX=new Or("tag:yaml.org,2002:float",{kind:"scalar",resolve:zX,construct:FX,predicate:UX,represent:HX,defaultStyle:"lowercase"}),VX=wX.extend({implicit:[kX,AX,IX,qX]}),$X=VX,K8=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q8=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 YX(e){return e===null?!1:K8.exec(e)!==null||Q8.exec(e)!==null}function WX(e){var t,n,r,i,s,a,c,u=0,h=null,m,p,y;if(t=K8.exec(e),t===null&&(t=Q8.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(s=+t[4],a=+t[5],c=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(m=+t[10],p=+(t[11]||0),h=(m*60+p)*6e4,t[9]==="-"&&(h=-h)),y=new Date(Date.UTC(n,r,i,s,a,c,u)),h&&y.setTime(y.getTime()-h),y}function GX(e){return e.toISOString()}var KX=new Or("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:YX,construct:WX,instanceOf:Date,represent:GX});function QX(e){return e==="<<"||e===null}var XX=new Or("tag:yaml.org,2002:merge",{kind:"scalar",resolve:QX}),Yv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
48
+ \r`;function ZX(e){if(e===null)return!1;var t,n,r=0,i=e.length,s=Yv;for(n=0;n<i;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function JX(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,s=Yv,a=0,c=[];for(t=0;t<i;t++)t%4===0&&t&&(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|s.indexOf(r.charAt(t));return n=i%4*6,n===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):n===18?(c.push(a>>10&255),c.push(a>>2&255)):n===12&&c.push(a>>4&255),new Uint8Array(c)}function eZ(e){var t="",n=0,r,i,s=e.length,a=Yv;for(r=0;r<s;r++)r%3===0&&r&&(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]):i===2?(t+=a[n>>10&63],t+=a[n>>4&63],t+=a[n<<2&63],t+=a[64]):i===1&&(t+=a[n>>2&63],t+=a[n<<4&63],t+=a[64],t+=a[64]),t}function tZ(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var nZ=new Or("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ZX,construct:JX,predicate:tZ,represent:eZ}),rZ=Object.prototype.hasOwnProperty,iZ=Object.prototype.toString;function oZ(e){if(e===null)return!0;var t=[],n,r,i,s,a,c=e;for(n=0,r=c.length;n<r;n+=1){if(i=c[n],a=!1,iZ.call(i)!=="[object Object]")return!1;for(s in i)if(rZ.call(i,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function sZ(e){return e!==null?e:[]}var aZ=new Or("tag:yaml.org,2002:omap",{kind:"sequence",resolve:oZ,construct:sZ}),lZ=Object.prototype.toString;function cZ(e){if(e===null)return!0;var t,n,r,i,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(r=a[t],lZ.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;s[t]=[i[0],r[i[0]]]}return!0}function uZ(e){if(e===null)return[];var t,n,r,i,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],i=Object.keys(r),s[t]=[i[0],r[i[0]]];return s}var dZ=new Or("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:cZ,construct:uZ}),fZ=Object.prototype.hasOwnProperty;function hZ(e){if(e===null)return!0;var t,n=e;for(t in n)if(fZ.call(n,t)&&n[t]!==null)return!1;return!0}function pZ(e){return e!==null?e:{}}var mZ=new Or("tag:yaml.org,2002:set",{kind:"mapping",resolve:hZ,construct:pZ}),X8=$X.extend({implicit:[KX,XX],explicit:[nZ,aZ,dZ,mZ]}),xa=Object.prototype.hasOwnProperty,Hm=1,Z8=2,J8=3,Um=4,Q2=1,gZ=2,Jk=3,yZ=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xZ=/[\x85\u2028\u2029]/,bZ=/[,\[\]\{\}]/,e9=/^(?:!|!!|![a-z\-]+!)$/i,t9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function e4(e){return Object.prototype.toString.call(e)}function No(e){return e===10||e===13}function pl(e){return e===9||e===32}function ni(e){return e===9||e===32||e===10||e===13}function Tc(e){return e===44||e===91||e===93||e===123||e===125}function vZ(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function wZ(e){return e===120?2:e===117?4:e===85?8:0}function SZ(e){return 48<=e&&e<=57?e-48:-1}function t4(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 CZ(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function n9(e,t,n){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}var r9=new Array(256),i9=new Array(256);for(var pc=0;pc<256;pc++)r9[pc]=t4(pc)?1:0,i9[pc]=t4(pc);function EZ(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||X8,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 o9(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=dX(n),new ti(t,n)}function pt(e,t){throw o9(e,t)}function qm(e,t){e.onWarning&&e.onWarning.call(null,o9(e,t))}var n4={YAML:function(t,n,r){var i,s,a;t.version!==null&&pt(t,"duplication of %YAML directive"),r.length!==1&&pt(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&pt(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),a=parseInt(i[2],10),s!==1&&pt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&qm(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,s;r.length!==2&&pt(t,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],e9.test(i)||pt(t,"ill-formed tag handle (first argument) of the TAG directive"),xa.call(t.tagMap,i)&&pt(t,'there is a previously declared suffix for "'+i+'" tag handle'),t9.test(s)||pt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{pt(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function ga(e,t,n,r){var i,s,a,c;if(t<n){if(c=e.input.slice(t,n),r)for(i=0,s=c.length;i<s;i+=1)a=c.charCodeAt(i),a===9||32<=a&&a<=1114111||pt(e,"expected valid JSON character");else yZ.test(c)&&pt(e,"the stream contains non-printable characters");e.result+=c}}function r4(e,t,n,r){var i,s,a,c;for(ur.isObject(n)||pt(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),a=0,c=i.length;a<c;a+=1)s=i[a],xa.call(t,s)||(n9(t,s,n[s]),r[s]=!0)}function Nc(e,t,n,r,i,s,a,c,u){var h,m;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),h=0,m=i.length;h<m;h+=1)Array.isArray(i[h])&&pt(e,"nested arrays are not supported inside keys"),typeof i=="object"&&e4(i[h])==="[object Object]"&&(i[h]="[object Object]");if(typeof i=="object"&&e4(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,m=s.length;h<m;h+=1)r4(e,t,s[h],n);else r4(e,t,s,n);else!e.json&&!xa.call(n,i)&&xa.call(t,i)&&(e.line=a||e.line,e.lineStart=c||e.lineStart,e.position=u||e.position,pt(e,"duplicated mapping key")),n9(t,i,s),delete n[i];return t}function Wv(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++):pt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function rr(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;pl(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(No(i))for(Wv(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&&qm(e,"deficient indentation"),r}function H0(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||ni(n)))}function Gv(e,t){t===1?e.result+=" ":t>1&&(e.result+=ur.repeat(`
50
+ `,t-1))}function kZ(e,t,n){var r,i,s,a,c,u,h,m,p=e.kind,y=e.result,x;if(x=e.input.charCodeAt(e.position),ni(x)||Tc(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),ni(i)||n&&Tc(i)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,c=!1;x!==0;){if(x===58){if(i=e.input.charCodeAt(e.position+1),ni(i)||n&&Tc(i))break}else if(x===35){if(r=e.input.charCodeAt(e.position-1),ni(r))break}else{if(e.position===e.lineStart&&H0(e)||n&&Tc(x))break;if(No(x))if(u=e.line,h=e.lineStart,m=e.lineIndent,rr(e,!1,-1),e.lineIndent>=t){c=!0,x=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=u,e.lineStart=h,e.lineIndent=m;break}}c&&(ga(e,s,a,!1),Gv(e,e.line-u),s=a=e.position,c=!1),pl(x)||(a=e.position+1),x=e.input.charCodeAt(++e.position)}return ga(e,s,a,!1),e.result?!0:(e.kind=p,e.result=y,!1)}function TZ(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(ga(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 No(n)?(ga(e,r,i,!0),Gv(e,rr(e,!1,t)),r=i=e.position):e.position===e.lineStart&&H0(e)?pt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);pt(e,"unexpected end of the stream within a single quoted scalar")}function NZ(e,t){var n,r,i,s,a,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 ga(e,n,e.position,!0),e.position++,!0;if(c===92){if(ga(e,n,e.position,!0),c=e.input.charCodeAt(++e.position),No(c))rr(e,!1,t);else if(c<256&&r9[c])e.result+=i9[c],e.position++;else if((a=wZ(c))>0){for(i=a,s=0;i>0;i--)c=e.input.charCodeAt(++e.position),(a=vZ(c))>=0?s=(s<<4)+a:pt(e,"expected hexadecimal character");e.result+=CZ(s),e.position++}else pt(e,"unknown escape sequence");n=r=e.position}else No(c)?(ga(e,n,r,!0),Gv(e,rr(e,!1,t)),n=r=e.position):e.position===e.lineStart&&H0(e)?pt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}pt(e,"unexpected end of the stream within a double quoted scalar")}function RZ(e,t){var n=!0,r,i,s,a=e.tag,c,u=e.anchor,h,m,p,y,x,b=Object.create(null),w,E,k,T;if(T=e.input.charCodeAt(e.position),T===91)m=93,x=!1,c=[];else if(T===123)m=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(rr(e,!0,t),T=e.input.charCodeAt(e.position),T===m)return e.position++,e.tag=a,e.anchor=u,e.kind=x?"mapping":"sequence",e.result=c,!0;n?T===44&&pt(e,"expected the node content, but found ','"):pt(e,"missed comma between flow collection entries"),E=w=k=null,p=y=!1,T===63&&(h=e.input.charCodeAt(e.position+1),ni(h)&&(p=y=!0,e.position++,rr(e,!0,t))),r=e.line,i=e.lineStart,s=e.position,Gc(e,t,Hm,!1,!0),E=e.tag,w=e.result,rr(e,!0,t),T=e.input.charCodeAt(e.position),(y||e.line===r)&&T===58&&(p=!0,T=e.input.charCodeAt(++e.position),rr(e,!0,t),Gc(e,t,Hm,!1,!0),k=e.result),x?Nc(e,c,b,E,w,k,r,i,s):p?c.push(Nc(e,null,b,E,w,k,r,i,s)):c.push(w),rr(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(n=!0,T=e.input.charCodeAt(++e.position)):n=!1}pt(e,"unexpected end of the stream within a flow collection")}function AZ(e,t){var n,r,i=Q2,s=!1,a=!1,c=t,u=0,h=!1,m,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)Q2===i?i=p===43?Jk:gZ:pt(e,"repeat of a chomping mode identifier");else if((m=SZ(p))>=0)m===0?pt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?pt(e,"repeat of an indentation width identifier"):(c=t+m-1,a=!0);else break;if(pl(p)){do p=e.input.charCodeAt(++e.position);while(pl(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!No(p)&&p!==0)}for(;p!==0;){for(Wv(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!a||e.lineIndent<c)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>c&&(c=e.lineIndent),No(p)){u++;continue}if(e.lineIndent<c){i===Jk?e.result+=ur.repeat(`
51
+ `,s?1+u:u):i===Q2&&s&&(e.result+=`
52
+ `);break}for(r?pl(p)?(h=!0,e.result+=ur.repeat(`
53
+ `,s?1+u:u)):h?(h=!1,e.result+=ur.repeat(`
54
+ `,u+1)):u===0?s&&(e.result+=" "):e.result+=ur.repeat(`
55
+ `,u):e.result+=ur.repeat(`
56
+ `,s?1+u:u),s=!0,a=!0,u=0,n=e.position;!No(p)&&p!==0;)p=e.input.charCodeAt(++e.position);ga(e,n,e.position,!1)}return!0}function i4(e,t){var n,r=e.tag,i=e.anchor,s=[],a,c=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),u=e.input.charCodeAt(e.position);u!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,pt(e,"tab characters must not be used in indentation")),!(u!==45||(a=e.input.charCodeAt(e.position+1),!ni(a))));){if(c=!0,e.position++,rr(e,!0,-1)&&e.lineIndent<=t){s.push(null),u=e.input.charCodeAt(e.position);continue}if(n=e.line,Gc(e,t,J8,!1,!0),s.push(e.result),rr(e,!0,-1),u=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&u!==0)pt(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=s,!0):!1}function jZ(e,t,n){var r,i,s,a,c,u,h=e.tag,m=e.anchor,p={},y=Object.create(null),x=null,b=null,w=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,pt(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),s=e.line,(T===63||T===58)&&ni(r))T===63?(E&&(Nc(e,p,y,x,b,null,a,c,u),x=b=w=null),k=!0,E=!0,i=!0):E?(E=!1,i=!0):pt(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(a=e.line,c=e.lineStart,u=e.position,!Gc(e,n,Z8,!1,!0))break;if(e.line===s){for(T=e.input.charCodeAt(e.position);pl(T);)T=e.input.charCodeAt(++e.position);if(T===58)T=e.input.charCodeAt(++e.position),ni(T)||pt(e,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(Nc(e,p,y,x,b,null,a,c,u),x=b=w=null),k=!0,E=!1,i=!1,x=e.tag,b=e.result;else if(k)pt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=m,!0}else if(k)pt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=m,!0}if((e.line===s||e.lineIndent>t)&&(E&&(a=e.line,c=e.lineStart,u=e.position),Gc(e,t,Um,!0,i)&&(E?b=e.result:w=e.result),E||(Nc(e,p,y,x,b,w,a,c,u),x=b=w=null),rr(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&T!==0)pt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return E&&Nc(e,p,y,x,b,null,a,c,u),k&&(e.tag=h,e.anchor=m,e.kind="mapping",e.result=p),k}function OZ(e){var t,n=!1,r=!1,i,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&pt(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(n=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):pt(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!ni(a);)a===33&&(r?pt(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),e9.test(i)||pt(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),bZ.test(s)&&pt(e,"tag suffix cannot contain flow indicator characters")}s&&!t9.test(s)&&pt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{pt(e,"tag name is malformed: "+s)}return n?e.tag=s:xa.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:pt(e,'undeclared tag handle "'+i+'"'),!0}function MZ(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&pt(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!ni(n)&&!Tc(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&pt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function DZ(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&&!ni(r)&&!Tc(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&pt(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),xa.call(e.anchorMap,n)||pt(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],rr(e,!0,-1),!0}function Gc(e,t,n,r,i){var s,a,c,u=1,h=!1,m=!1,p,y,x,b,w,E;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=c=Um===n||J8===n,r&&rr(e,!0,-1)&&(h=!0,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)),u===1)for(;OZ(e)||MZ(e);)rr(e,!0,-1)?(h=!0,c=s,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)):c=!1;if(c&&(c=h||i),(u===1||Um===n)&&(Hm===n||Z8===n?w=t:w=t+1,E=e.position-e.lineStart,u===1?c&&(i4(e,E)||jZ(e,E,w))||RZ(e,w)?m=!0:(a&&AZ(e,w)||TZ(e,w)||NZ(e,w)?m=!0:DZ(e)?(m=!0,(e.tag!==null||e.anchor!==null)&&pt(e,"alias node should not have any properties")):kZ(e,w,Hm===n)&&(m=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(m=c&&i4(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"&&pt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,y=e.implicitTypes.length;p<y;p+=1)if(b=e.implicitTypes[p],b.resolve(e.result)){e.result=b.construct(e.result),e.tag=b.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(xa.call(e.typeMap[e.kind||"fallback"],e.tag))b=e.typeMap[e.kind||"fallback"][e.tag];else for(b=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){b=x[p];break}b||pt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&b.kind!==e.kind&&pt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result,e.tag)?(e.result=b.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):pt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||m}function _Z(e){var t=e.position,n,r,i,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(rr(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),n=e.position;a!==0&&!ni(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&pt(e,"directive name must not be less than one character in length");a!==0;){for(;pl(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!No(a));break}if(No(a))break;for(n=e.position;a!==0&&!ni(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}a!==0&&Wv(e),xa.call(n4,r)?n4[r](e,r,i):qm(e,'unknown document directive "'+r+'"')}if(rr(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,rr(e,!0,-1)):s&&pt(e,"directives end mark is expected"),Gc(e,e.lineIndent-1,Um,!1,!0),rr(e,!0,-1),e.checkLineBreaks&&xZ.test(e.input.slice(t,e.position))&&qm(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&H0(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,rr(e,!0,-1));return}if(e.position<e.length-1)pt(e,"end of the stream or a document separator is expected");else return}function LZ(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 EZ(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,pt(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;)_Z(n);return n.documents}function IZ(e,t){var n=LZ(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new ti("expected a single document in the stream, but found more")}}var PZ=IZ,zZ={load:PZ},s9=Object.prototype.toString,a9=Object.prototype.hasOwnProperty,Kv=65279,FZ=9,lf=10,BZ=13,HZ=32,UZ=33,qZ=34,kx=35,VZ=37,$Z=38,YZ=39,WZ=42,l9=44,GZ=45,Vm=58,KZ=61,QZ=62,XZ=63,ZZ=64,c9=91,u9=93,JZ=96,d9=123,eJ=124,f9=125,Mr={};Mr[0]="\\0";Mr[7]="\\a";Mr[8]="\\b";Mr[9]="\\t";Mr[10]="\\n";Mr[11]="\\v";Mr[12]="\\f";Mr[13]="\\r";Mr[27]="\\e";Mr[34]='\\"';Mr[92]="\\\\";Mr[133]="\\N";Mr[160]="\\_";Mr[8232]="\\L";Mr[8233]="\\P";var tJ=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],nJ=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function rJ(e,t){var n,r,i,s,a,c,u;if(t===null)return{};for(n={},r=Object.keys(t),i=0,s=r.length;i<s;i+=1)a=r[i],c=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),u=e.compiledTypeMap.fallback[a],u&&a9.call(u.styleAliases,c)&&(c=u.styleAliases[c]),n[a]=c;return n}function iJ(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 ti("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+ur.repeat("0",r-t.length)+t}var oJ=1,cf=2;function sJ(e){this.schema=e.schema||X8,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ur.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=rJ(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==='"'?cf:oJ,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 o4(e,t){for(var n=ur.repeat(" ",t),r=0,i=-1,s="",a,c=e.length;r<c;)i=e.indexOf(`
58
+ `,r),i===-1?(a=e.slice(r),r=c):(a=e.slice(r,i+1),r=i+1),a.length&&a!==`
59
+ `&&(s+=n),s+=a;return s}function Tx(e,t){return`
60
+ `+ur.repeat(" ",e.indent*t)}function aJ(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 $m(e){return e===HZ||e===FZ}function uf(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Kv||65536<=e&&e<=1114111}function s4(e){return uf(e)&&e!==Kv&&e!==BZ&&e!==lf}function a4(e,t,n){var r=s4(e),i=r&&!$m(e);return(n?r:r&&e!==l9&&e!==c9&&e!==u9&&e!==d9&&e!==f9)&&e!==kx&&!(t===Vm&&!i)||s4(t)&&!$m(t)&&e===kx||t===Vm&&i}function lJ(e){return uf(e)&&e!==Kv&&!$m(e)&&e!==GZ&&e!==XZ&&e!==Vm&&e!==l9&&e!==c9&&e!==u9&&e!==d9&&e!==f9&&e!==kx&&e!==$Z&&e!==WZ&&e!==UZ&&e!==eJ&&e!==KZ&&e!==QZ&&e!==YZ&&e!==qZ&&e!==VZ&&e!==ZZ&&e!==JZ}function cJ(e){return!$m(e)&&e!==Vm}function Dd(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 h9(e){var t=/^\n* /;return t.test(e)}var p9=1,Nx=2,m9=3,g9=4,Sc=5;function uJ(e,t,n,r,i,s,a,c){var u,h=0,m=null,p=!1,y=!1,x=r!==-1,b=-1,w=lJ(Dd(e,0))&&cJ(Dd(e,e.length-1));if(t||a)for(u=0;u<e.length;h>=65536?u+=2:u++){if(h=Dd(e,u),!uf(h))return Sc;w=w&&a4(h,m,c),m=h}else{for(u=0;u<e.length;h>=65536?u+=2:u++){if(h=Dd(e,u),h===lf)p=!0,x&&(y=y||u-b-1>r&&e[b+1]!==" ",b=u);else if(!uf(h))return Sc;w=w&&a4(h,m,c),m=h}y=y||x&&u-b-1>r&&e[b+1]!==" "}return!p&&!y?w&&!a&&!i(e)?p9:s===cf?Sc:Nx:n>9&&h9(e)?Sc:a?s===cf?Sc:Nx:y?g9:m9}function dJ(e,t,n,r,i){e.dump=(function(){if(t.length===0)return e.quotingType===cf?'""':"''";if(!e.noCompatMode&&(tJ.indexOf(t)!==-1||nJ.test(t)))return e.quotingType===cf?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,n),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),c=r||e.flowLevel>-1&&n>=e.flowLevel;function u(h){return aJ(e,h)}switch(uJ(t,c,e.indent,a,u,e.quotingType,e.forceQuotes&&!r,i)){case p9:return t;case Nx:return"'"+t.replace(/'/g,"''")+"'";case m9:return"|"+l4(t,e.indent)+c4(o4(t,s));case g9:return">"+l4(t,e.indent)+c4(o4(fJ(t,a),s));case Sc:return'"'+hJ(t)+'"';default:throw new ti("impossible error: invalid scalar style")}})()}function l4(e,t){var n=h9(e)?String(t):"",r=e[e.length-1]===`
61
+ `,i=r&&(e[e.length-2]===`
62
+ `||e===`
63
+ `),s=i?"+":r?"":"-";return n+s+`
64
+ `}function c4(e){return e[e.length-1]===`
65
+ `?e.slice(0,-1):e}function fJ(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var h=e.indexOf(`
66
+ `);return h=h!==-1?h:e.length,n.lastIndex=h,u4(e.slice(0,h),t)})(),i=e[0]===`
67
+ `||e[0]===" ",s,a;a=n.exec(e);){var c=a[1],u=a[2];s=u[0]===" ",r+=c+(!i&&!s&&u!==""?`
68
+ `:"")+u4(u,t),i=s}return r}function u4(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,s,a=0,c=0,u="";r=n.exec(e);)c=r.index,c-i>t&&(s=a>i?a:c,u+=`
69
+ `+e.slice(i,s),i=s+1),a=c;return u+=`
70
+ `,e.length-i>t&&a>i?u+=e.slice(i,a)+`
71
+ `+e.slice(a+1):u+=e.slice(i),u.slice(1)}function hJ(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Dd(e,i),r=Mr[n],!r&&uf(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||iJ(n);return t}function pJ(e,t,n){var r="",i=e.tag,s,a,c;for(s=0,a=n.length;s<a;s+=1)c=n[s],e.replacer&&(c=e.replacer.call(n,String(s),c)),(bs(e,t,c,!1,!1)||typeof c>"u"&&bs(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function d4(e,t,n,r){var i="",s=e.tag,a,c,u;for(a=0,c=n.length;a<c;a+=1)u=n[a],e.replacer&&(u=e.replacer.call(n,String(a),u)),(bs(e,t+1,u,!0,!0,!1,!0)||typeof u>"u"&&bs(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=Tx(e,t)),e.dump&&lf===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function mJ(e,t,n){var r="",i=e.tag,s=Object.keys(n),a,c,u,h,m;for(a=0,c=s.length;a<c;a+=1)m="",r!==""&&(m+=", "),e.condenseFlow&&(m+='"'),u=s[a],h=n[u],e.replacer&&(h=e.replacer.call(n,u,h)),bs(e,t,u,!1,!1)&&(e.dump.length>1024&&(m+="? "),m+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),bs(e,t,h,!1,!1)&&(m+=e.dump,r+=m));e.tag=i,e.dump="{"+r+"}"}function gJ(e,t,n,r){var i="",s=e.tag,a=Object.keys(n),c,u,h,m,p,y;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new ti("sortKeys must be a boolean or a function");for(c=0,u=a.length;c<u;c+=1)y="",(!r||i!=="")&&(y+=Tx(e,t)),h=a[c],m=n[h],e.replacer&&(m=e.replacer.call(n,h,m)),bs(e,t+1,h,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&lf===e.dump.charCodeAt(0)?y+="?":y+="? "),y+=e.dump,p&&(y+=Tx(e,t)),bs(e,t+1,m,!0,p)&&(e.dump&&lf===e.dump.charCodeAt(0)?y+=":":y+=": ",y+=e.dump,i+=y));e.tag=s,e.dump=i||"{}"}function f4(e,t,n){var r,i,s,a,c,u;for(i=n?e.explicitTypes:e.implicitTypes,s=0,a=i.length;s<a;s+=1)if(c=i[s],(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(u=e.styleMap[c.tag]||c.defaultStyle,s9.call(c.represent)==="[object Function]")r=c.represent(t,u);else if(a9.call(c.represent,u))r=c.represent[u](t,u);else throw new ti("!<"+c.tag+'> tag resolver accepts not "'+u+'" style');e.dump=r}return!0}return!1}function bs(e,t,n,r,i,s,a){e.tag=null,e.dump=n,f4(e,n,!1)||f4(e,n,!0);var c=s9.call(e.dump),u=r,h;r&&(r=e.flowLevel<0||e.flowLevel>t);var m=c==="[object Object]"||c==="[object Array]",p,y;if(m&&(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(m&&y&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),c==="[object Object]")r&&Object.keys(e.dump).length!==0?(gJ(e,t,e.dump,i),y&&(e.dump="&ref_"+p+e.dump)):(mJ(e,t,e.dump),y&&(e.dump="&ref_"+p+" "+e.dump));else if(c==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?d4(e,t-1,e.dump,i):d4(e,t,e.dump,i),y&&(e.dump="&ref_"+p+e.dump)):(pJ(e,t,e.dump),y&&(e.dump="&ref_"+p+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&dJ(e,e.dump,t,s,u);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ti("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}function yJ(e,t){var n=[],r=[],i,s;for(Rx(e,n,r),i=0,s=r.length;i<s;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(s)}function Rx(e,t,n){var r,i,s;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,s=e.length;i<s;i+=1)Rx(e[i],t,n);else for(r=Object.keys(e),i=0,s=r.length;i<s;i+=1)Rx(e[r[i]],t,n)}function xJ(e,t){t=t||{};var n=new sJ(t);n.noRefs||yJ(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),bs(n,0,r,!0,!0)?n.dump+`
72
+ `:""}var bJ=xJ,vJ={dump:bJ},h4=zZ.load,Ax=vJ.dump;const wJ='(()=>{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',SJ=ZQ;var Rn;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.ADDED=1]="ADDED",e[e.REMOVED=2]="REMOVED",e[e.CHANGED=3]="CHANGED"})(Rn||(Rn={}));function Wi(e,t){return t==="yaml"?Ax(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function CJ(e,t,n="json"){const r=Wi(e,n),i=Wi(t,n);return r===i?[{value:r}]:Qv(e,t,0,n)}function EJ(e,t){return CJ(e,t,"json")}function kJ(e,t){try{const n=JSON.parse(e),r=JSON.parse(t),i=JSON.stringify(n),s=JSON.stringify(r);return i===s?[{value:e}]:xs(e,t,{newlineIsToken:!1})}catch{return xs(e,t,{newlineIsToken:!1})}}function TJ(e,t){const n=h4(e),r=h4(t),i=Ax(n,{indent:2,lineWidth:-1,noRefs:!0}),s=Ax(r,{indent:2,lineWidth:-1,noRefs:!0});return i===s?[{value:e}]:xs(e,t,{newlineIsToken:!1})}function Qv(e,t,n,r="json"){const i=Wi(e,r),s=Wi(t,r);return i===s?[{value:fs(i,n,r)}]:typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null&&!Array.isArray(e)&&!Array.isArray(t)?NJ(e,t,n,r):Array.isArray(e)&&Array.isArray(t)?RJ(e,t,n,r):AJ(i,s,n,r)}function NJ(e,t,n,r="json"){const i=[],s=" ".repeat(n),a=" ".repeat(n+1),c=new Set(Object.keys(e)),u=Object.keys(t),h=[...c].filter(p=>!(p in t)),m=[...u,...h];i.push({value:`{
73
+ `});for(let p=0;p<m.length;p++){const y=m[p],b=p===m.length-1?"":",",w=y in e,E=y in t;if(w&&E){const k=Wi(e[y],r),T=Wi(t[y],r);if(k===T){const N=fs(k,n+1);i.push({value:a+JSON.stringify(y)+": "+N+b+`
74
+ `})}else{const N=a+JSON.stringify(y)+": ",O=Qv(e[y],t[y],n+1,r);if(O.length>0)if(!O[0].removed&&!O[0].added)O[0].value=N+O[0].value;else{const j=O.find(R=>R.removed),A=O.find(R=>R.added);j&&(j.value=N+j.value),A&&(A.value=N+A.value)}if(b&&O.length>0){const j=O[O.length-1];j.value=j.value.replace(/\n$/,b+`
75
+ `)}i.push(...O)}}else if(w){const k=fs(Wi(e[y],r),n+1);i.push({removed:!0,value:a+JSON.stringify(y)+": "+k+b+`
76
+ `})}else{const k=fs(Wi(t[y],r),n+1);i.push({added:!0,value:a+JSON.stringify(y)+": "+k+b+`
77
+ `})}}return i.push({value:s+`}
78
+ `}),i}function RJ(e,t,n,r="json"){const i=[],s=" ".repeat(n),a=" ".repeat(n+1);i.push({value:`[
79
+ `});const c=Math.max(e.length,t.length);for(let u=0;u<c;u++){const m=u===c-1?"":",";if(u>=e.length){const p=fs(Wi(t[u],r),n+1);i.push({added:!0,value:a+p+m+`
80
+ `})}else if(u>=t.length){const p=fs(Wi(e[u],r),n+1);i.push({removed:!0,value:a+p+m+`
81
+ `})}else{const p=Wi(e[u],r),y=Wi(t[u],r);if(p===y){const x=fs(p,n+1);i.push({value:a+x+m+`
82
+ `})}else{const x=Qv(e[u],t[u],n+1,r);if(x.length>0&&(x[0].value=a+x[0].value),m&&x.length>0){const b=x[x.length-1];b.value=b.value.replace(/\n$/,m+`
83
+ `)}i.push(...x)}}}return i.push({value:s+`]
84
+ `}),i}function AJ(e,t,n,r="json"){const i=fs(e,n),s=fs(t,n);return xs(i,s).map(c=>({value:c.value,added:c.added,removed:c.removed}))}function fs(e,t,n="json"){if(t===0)return e;const r=" ".repeat(t);return e.split(`
85
+ `).map((i,s)=>s===0?i:r+i).join(`
86
+ `)}var mr;(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"})(mr||(mr={}));const p4=e=>e===""?[]:e.replace(/\n$/,"").split(`
87
+ `),y9=(e,t,n=mr.CHARS)=>{const i=(typeof n=="string"?SJ[n]:n)(e,t),s={left:[],right:[]};return i.forEach(({added:a,removed:c,value:u})=>{const h={};return a&&(h.type=Rn.ADDED,h.value=u,s.right.push(h)),c&&(h.type=Rn.REMOVED,h.value=u,s.left.push(h)),!c&&!a&&(h.type=Rn.DEFAULT,h.value=u,s.right.push(h),s.left.push(h)),h}),s},jJ=(e,t,n=!1,r=mr.CHARS,i=0,s=[],a=!1)=>{let c=[];if(typeof e=="string"&&typeof t=="string")if(r===mr.JSON)c=kJ(e,t);else if(r===mr.YAML)try{c=TJ(e,t)}catch{c=xs(e,t,{newlineIsToken:!1})}else c=xs(e,t,{newlineIsToken:!1});else c=EJ(e,t);let u=i,h=i,m=[],p=0;const y=[],x=[],b=(w,E,k,T,N)=>p4(w).map((j,A)=>{const R={},_={};if(!(x.includes(`${E}-${A}`)||N&&A!==0)){if(k||T){let F=!0;if(T){h+=1,R.lineNumber=h,R.type=Rn.REMOVED,R.value=j||" ";const I=c[E+1];if(I?.added){const H=p4(I.value)[A];if(H){const q=b(H,E,!0,!1,!0),{value:V,lineNumber:$,type:U}=q[0].right;if(x.push(`${E+1}-${A}`),_.lineNumber=$,R.value===V)F=!1,_.type=0,R.type=0,_.value=V;else{_.type=U;const P=500,Y=j.length>P||V.length>P;if(n||Y)_.value=V;else if(a)R.rawValue=j,R.value=j,_.rawValue=V,_.value=V;else{const G=y9(j,V,r);_.value=G.right,R.value=G.left}}}}}else u+=1,_.lineNumber=u,_.type=Rn.ADDED,_.value=j;F&&!N&&(y.includes(p)||y.push(p))}else h+=1,u+=1,R.lineNumber=h,R.type=Rn.DEFAULT,R.value=j,_.lineNumber=u,_.type=Rn.DEFAULT,_.value=j;return(s?.includes(`L-${R.lineNumber}`)||s?.includes(`R-${_.lineNumber}`)&&!y.includes(p))&&y.push(p),N||(p+=1),{right:_,left:R}}}).filter(Boolean);return c.forEach(({added:w,removed:E,value:k},T)=>{m=[...m,...b(k,T,w,E)]}),{lineInformation:m,diffLines:y}};let gd=null,Ud=null;const OJ=()=>{if(gd!==null)return gd;if(typeof Worker>"u"||typeof Blob>"u"||typeof URL>"u")return Ud=!1,null;try{const e=new Blob([wJ],{type:"application/javascript"});gd=URL.createObjectURL(e),Ud=!0}catch{Ud=!1,gd=null}return gd},MJ=(e,t,n=!1,r=mr.CHARS,i=0,s=[],a=!1)=>{const c=()=>jJ(e,t,n,r,i,s,a),u=OJ();return u?new Promise(h=>{let m;try{m=new Worker(u)}catch{Ud=!1,h(c());return}m.onmessage=p=>{h(p.data),m.terminate()},m.onerror=()=>{Ud=!1,m.terminate(),h(c())},m.postMessage({oldString:e,newString:t,disableWordDiff:n,lineCompareMethod:r,linesOffset:i,showLines:s,deferWordDiff:a})}):Promise.resolve(c())};function m4(){return f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[f.jsx("title",{children:"expand"}),f.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 DJ(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 _J(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 LJ=(function(){function e(n){var r=this;this._insertTag=function(i){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,s),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(_J(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=DJ(i);try{s.insertRule(r,s.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})(),Tr="-ms-",Ym="-moz-",ln="-webkit-",x9="comm",Xv="rule",Zv="decl",IJ="@import",b9="@keyframes",PJ="@layer",zJ=Math.abs,U0=String.fromCharCode,FJ=Object.assign;function BJ(e,t){return Cr(e,0)^45?(((t<<2^Cr(e,0))<<2^Cr(e,1))<<2^Cr(e,2))<<2^Cr(e,3):0}function v9(e){return e.trim()}function HJ(e,t){return(e=t.exec(e))?e[0]:e}function cn(e,t,n){return e.replace(t,n)}function jx(e,t){return e.indexOf(t)}function Cr(e,t){return e.charCodeAt(t)|0}function df(e,t,n){return e.slice(t,n)}function So(e){return e.length}function Jv(e){return e.length}function Lp(e,t){return t.push(e),e}function UJ(e,t){return e.map(t).join("")}var q0=1,Kc=1,w9=0,oi=0,nr=0,uu="";function V0(e,t,n,r,i,s,a){return{value:e,root:t,parent:n,type:r,props:i,children:s,line:q0,column:Kc,length:a,return:""}}function yd(e,t){return FJ(V0("",null,null,"",null,null,0),e,{length:-e.length},t)}function qJ(){return nr}function VJ(){return nr=oi>0?Cr(uu,--oi):0,Kc--,nr===10&&(Kc=1,q0--),nr}function wi(){return nr=oi<w9?Cr(uu,oi++):0,Kc++,nr===10&&(Kc=1,q0++),nr}function Ro(){return Cr(uu,oi)}function um(){return oi}function Yf(e,t){return df(uu,e,t)}function ff(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 S9(e){return q0=Kc=1,w9=So(uu=e),oi=0,[]}function C9(e){return uu="",e}function dm(e){return v9(Yf(oi-1,Ox(e===91?e+2:e===40?e+1:e)))}function $J(e){for(;(nr=Ro())&&nr<33;)wi();return ff(e)>2||ff(nr)>3?"":" "}function YJ(e,t){for(;--t&&wi()&&!(nr<48||nr>102||nr>57&&nr<65||nr>70&&nr<97););return Yf(e,um()+(t<6&&Ro()==32&&wi()==32))}function Ox(e){for(;wi();)switch(nr){case e:return oi;case 34:case 39:e!==34&&e!==39&&Ox(nr);break;case 40:e===41&&Ox(e);break;case 92:wi();break}return oi}function WJ(e,t){for(;wi()&&e+nr!==57;)if(e+nr===84&&Ro()===47)break;return"/*"+Yf(t,oi-1)+"*"+U0(e===47?e:wi())}function GJ(e){for(;!ff(Ro());)wi();return Yf(e,oi)}function KJ(e){return C9(fm("",null,null,null,[""],e=S9(e),0,[0],e))}function fm(e,t,n,r,i,s,a,c,u){for(var h=0,m=0,p=a,y=0,x=0,b=0,w=1,E=1,k=1,T=0,N="",O=i,j=s,A=r,R=N;E;)switch(b=T,T=wi()){case 40:if(b!=108&&Cr(R,p-1)==58){jx(R+=cn(dm(T),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:R+=dm(T);break;case 9:case 10:case 13:case 32:R+=$J(b);break;case 92:R+=YJ(um()-1,7);continue;case 47:switch(Ro()){case 42:case 47:Lp(QJ(WJ(wi(),um()),t,n),u);break;default:R+="/"}break;case 123*w:c[h++]=So(R)*k;case 125*w:case 59:case 0:switch(T){case 0:case 125:E=0;case 59+m:k==-1&&(R=cn(R,/\f/g,"")),x>0&&So(R)-p&&Lp(x>32?y4(R+";",r,n,p-1):y4(cn(R," ","")+";",r,n,p-2),u);break;case 59:R+=";";default:if(Lp(A=g4(R,t,n,h,m,i,c,N,O=[],j=[],p),s),T===123)if(m===0)fm(R,t,A,A,O,s,p,c,j);else switch(y===99&&Cr(R,3)===110?100:y){case 100:case 108:case 109:case 115:fm(e,A,A,r&&Lp(g4(e,A,A,0,0,i,c,N,i,O=[],p),j),i,j,p,c,r?O:j);break;default:fm(R,A,A,A,[""],j,0,c,j)}}h=m=x=0,w=k=1,N=R="",p=a;break;case 58:p=1+So(R),x=b;default:if(w<1){if(T==123)--w;else if(T==125&&w++==0&&VJ()==125)continue}switch(R+=U0(T),T*w){case 38:k=m>0?1:(R+="\f",-1);break;case 44:c[h++]=(So(R)-1)*k,k=1;break;case 64:Ro()===45&&(R+=dm(wi())),y=Ro(),m=p=So(N=R+=GJ(um())),T++;break;case 45:b===45&&So(R)==2&&(w=0)}}return s}function g4(e,t,n,r,i,s,a,c,u,h,m){for(var p=i-1,y=i===0?s:[""],x=Jv(y),b=0,w=0,E=0;b<r;++b)for(var k=0,T=df(e,p+1,p=zJ(w=a[b])),N=e;k<x;++k)(N=v9(w>0?y[k]+" "+T:cn(T,/&\f/g,y[k])))&&(u[E++]=N);return V0(e,t,n,i===0?Xv:c,u,h,m)}function QJ(e,t,n){return V0(e,t,n,x9,U0(qJ()),df(e,2,-2),0)}function y4(e,t,n,r){return V0(e,t,n,Zv,df(e,0,r),df(e,r+1,-1),r)}function Ic(e,t){for(var n="",r=Jv(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function XJ(e,t,n,r){switch(e.type){case PJ:if(e.children.length)break;case IJ:case Zv:return e.return=e.return||e.value;case x9:return"";case b9:return e.return=e.value+"{"+Ic(e.children,r)+"}";case Xv:e.value=e.props.join(",")}return So(n=Ic(e.children,r))?e.return=e.value+"{"+n+"}":""}function ZJ(e){var t=Jv(e);return function(n,r,i,s){for(var a="",c=0;c<t;c++)a+=e[c](n,r,i,s)||"";return a}}function JJ(e){return function(t){t.root||(t=t.return)&&e(t)}}function eee(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var tee=function(t,n,r){for(var i=0,s=0;i=s,s=Ro(),i===38&&s===12&&(n[r]=1),!ff(s);)wi();return Yf(t,oi)},nee=function(t,n){var r=-1,i=44;do switch(ff(i)){case 0:i===38&&Ro()===12&&(n[r]=1),t[r]+=tee(oi-1,n,r);break;case 2:t[r]+=dm(i);break;case 4:if(i===44){t[++r]=Ro()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=U0(i)}while(i=wi());return t},ree=function(t,n){return C9(nee(S9(t),n))},x4=new WeakMap,iee=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&&!x4.get(r))&&!i){x4.set(t,!0);for(var s=[],a=ree(n,s),c=r.props,u=0,h=0;u<a.length;u++)for(var m=0;m<c.length;m++,h++)t.props[h]=s[u]?a[u].replace(/&\f/g,c[m]):c[m]+" "+a[u]}}},oee=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function E9(e,t){switch(BJ(e,t)){case 5103:return ln+"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 ln+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ln+e+Ym+e+Tr+e+e;case 6828:case 4268:return ln+e+Tr+e+e;case 6165:return ln+e+Tr+"flex-"+e+e;case 5187:return ln+e+cn(e,/(\w+).+(:[^]+)/,ln+"box-$1$2"+Tr+"flex-$1$2")+e;case 5443:return ln+e+Tr+"flex-item-"+cn(e,/flex-|-self/,"")+e;case 4675:return ln+e+Tr+"flex-line-pack"+cn(e,/align-content|flex-|-self/,"")+e;case 5548:return ln+e+Tr+cn(e,"shrink","negative")+e;case 5292:return ln+e+Tr+cn(e,"basis","preferred-size")+e;case 6060:return ln+"box-"+cn(e,"-grow","")+ln+e+Tr+cn(e,"grow","positive")+e;case 4554:return ln+cn(e,/([^-])(transform)/g,"$1"+ln+"$2")+e;case 6187:return cn(cn(cn(e,/(zoom-|grab)/,ln+"$1"),/(image-set)/,ln+"$1"),e,"")+e;case 5495:case 3959:return cn(e,/(image-set\([^]*)/,ln+"$1$`$1");case 4968:return cn(cn(e,/(.+:)(flex-)?(.*)/,ln+"box-pack:$3"+Tr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ln+e+e;case 4095:case 3583:case 4068:case 2532:return cn(e,/(.+)-inline(.+)/,ln+"$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(So(e)-1-t>6)switch(Cr(e,t+1)){case 109:if(Cr(e,t+4)!==45)break;case 102:return cn(e,/(.+:)(.+)-([^]+)/,"$1"+ln+"$2-$3$1"+Ym+(Cr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~jx(e,"stretch")?E9(cn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Cr(e,t+1)!==115)break;case 6444:switch(Cr(e,So(e)-3-(~jx(e,"!important")&&10))){case 107:return cn(e,":",":"+ln)+e;case 101:return cn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ln+(Cr(e,14)===45?"inline-":"")+"box$3$1"+ln+"$2$3$1"+Tr+"$2box$3")+e}break;case 5936:switch(Cr(e,t+11)){case 114:return ln+e+Tr+cn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ln+e+Tr+cn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ln+e+Tr+cn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ln+e+Tr+e+e}return e}var see=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Zv:t.return=E9(t.value,t.length);break;case b9:return Ic([yd(t,{value:cn(t.value,"@","@"+ln)})],i);case Xv:if(t.length)return UJ(t.props,function(s){switch(HJ(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ic([yd(t,{props:[cn(s,/:(read-\w+)/,":"+Ym+"$1")]})],i);case"::placeholder":return Ic([yd(t,{props:[cn(s,/:(plac\w+)/,":"+ln+"input-$1")]}),yd(t,{props:[cn(s,/:(plac\w+)/,":"+Ym+"$1")]}),yd(t,{props:[cn(s,/:(plac\w+)/,Tr+"input-$1")]})],i)}return""})}},aee=[see],lee=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(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||aee,s={},a,c=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),k=1;k<E.length;k++)s[E[k]]=!0;c.push(w)});var u,h=[iee,oee];{var m,p=[XJ,JJ(function(w){m.insert(w)})],y=ZJ(h.concat(i,p)),x=function(E){return Ic(KJ(E),y)};u=function(E,k,T,N){m=T,x(E?E+"{"+k.styles+"}":k.styles),N&&(b.inserted[k.name]=!0)}}var b={key:n,sheet:new LJ({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:u};return b.sheet.hydrate(c),b};function cee(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 uee={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},dee=/[A-Z]|^ms/g,fee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,k9=function(t){return t.charCodeAt(1)===45},b4=function(t){return t!=null&&typeof t!="boolean"},X2=eee(function(e){return k9(e)?e:e.replace(dee,"-$&").toLowerCase()}),v4=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(fee,function(r,i,s){return ua={name:i,styles:s,next:ua},i})}return uee[t]!==1&&!k9(t)&&typeof n=="number"&&n!==0?n+"px":n};function Wm(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 ua={name:i.name,styles:i.styles,next:ua},i.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)ua={name:a.name,styles:a.styles,next:ua},a=a.next;var c=s.styles+";";return c}return hee(e,t,n)}}var u=n;if(t==null)return u;var h=t[u];return h!==void 0?h:u}function hee(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Wm(e,t,n[i])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var c=a;t!=null&&t[c]!==void 0?r+=s+"{"+t[c]+"}":b4(c)&&(r+=X2(s)+":"+v4(s,c)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var u=0;u<a.length;u++)b4(a[u])&&(r+=X2(s)+":"+v4(s,a[u])+";");else{var h=Wm(e,t,a);switch(s){case"animation":case"animationName":{r+=X2(s)+":"+h+";";break}default:r+=s+"{"+h+"}"}}}return r}var w4=/label:\s*([^\s;{]+)\s*(;|$)/g,ua;function Z2(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="";ua=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=Wm(n,t,s);else{var a=s;i+=a[0]}for(var c=1;c<e.length;c++)if(i+=Wm(n,t,e[c]),r){var u=s;i+=u[c]}w4.lastIndex=0;for(var h="",m;(m=w4.exec(i))!==null;)h+="-"+m[1];var p=cee(i)+h;return{name:p,styles:i,next:ua}}function T9(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var pee=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},mee=function(t,n,r){pee(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function S4(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function C4(e,t,n){var r=[],i=T9(e,r,n);return r.length<2?n:i+t(r)}var gee=function(t){var n=lee(t);n.sheet.speedy=function(c){this.isSpeedy=c},n.compat=!0;var r=function(){for(var u=arguments.length,h=new Array(u),m=0;m<u;m++)h[m]=arguments[m];var p=Z2(h,n.registered,void 0);return mee(n,p),n.key+"-"+p.name},i=function(){for(var u=arguments.length,h=new Array(u),m=0;m<u;m++)h[m]=arguments[m];var p=Z2(h,n.registered),y="animation-"+p.name;return S4(n,{name:p.name,styles:"@keyframes "+y+"{"+p.styles+"}"}),y},s=function(){for(var u=arguments.length,h=new Array(u),m=0;m<u;m++)h[m]=arguments[m];var p=Z2(h,n.registered);S4(n,p)},a=function(){for(var u=arguments.length,h=new Array(u),m=0;m<u;m++)h[m]=arguments[m];return C4(n.registered,r,yee(h))};return{css:r,cx:a,injectGlobal:s,keyframes:i,hydrate:function(u){u.forEach(function(h){n.inserted[h]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:T9.bind(null,n.registered),merge:C4.bind(null,n.registered,r)}},yee=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var s=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))s=e(i);else{s="";for(var a in i)i[a]&&a&&(s&&(s+=" "),s+=a)}break}default:s=i}s&&(n&&(n+=" "),n+=s)}}return n};const xee=(e,t=!1,n="")=>{const{variables:r={},...i}=e,s={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||{}}},a=t?s.dark:s.light,{css:c,cx:u}=gee({key:"react-diff",nonce:n}),h=c({width:"auto",overflow:"hidden",label:"content"}),m=c({label:"split-view"}),p=c({position:"sticky",top:0,zIndex:2,label:"sticky-header"}),y=c({background:a.diffViewerTitleBackground,color:a.diffViewerTitleColor,padding:"0.5em 1em",display:"flex",alignItems:"center",gap:"0.5em",fontFamily:"monospace",fontSize:12,fill:a.diffViewerTitleColor}),x=c({display:"flex",label:"column-headers"}),b=c({width:"100%",minWidth:"1000px",overflowX:"auto",tableLayout:"fixed",fontSize:12,background:a.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"1.6em",width:"fit-content"},label:"diff-container",borderCollapse:"collapse","@media (max-width: 768px)":{minWidth:"unset"}}),w=c({overflow:"hidden",width:"100%"}),E=c({color:a.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"}}),N=c({background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",margin:0,label:"all-expand-button",":hover":{fill:a.addedGutterColor},":focus":{outline:`1px ${a.addedGutterColor} solid`}}),O=c({background:a.diffViewerTitleBackground,padding:"0.5em",lineHeight:"1.4em",height:"2.4em",overflow:"hidden",width:"50%",borderBottom:`1px solid ${a.diffViewerTitleBorderColor}`,boxSizing:"border-box",fontSize:12,label:"title-block",":only-child":{width:"100%"},":last-child:not(:only-child)":{borderLeft:`1px solid ${a.diffViewerTitleBorderColor}`},[`.${E}`]:{color:a.diffViewerTitleColor}}),j=c({color:a.gutterColor,label:"line-number"}),A=c({background:a.removedBackground,color:a.removedColor,pre:{color:a.removedColor},[`.${j}`]:{color:a.removedGutterColor},label:"diff-removed"}),R=c({background:a.addedBackground,color:a.addedColor,pre:{color:a.addedColor},[`.${j}`]:{color:a.addedGutterColor},label:"diff-added"}),_=c({background:a.changedBackground,[`.${j}`]:{color:a.gutterColor},label:"diff-changed"}),F=c({display:"inline",textDecoration:"none",label:"word-diff"}),I=c({background:a.wordAddedBackground,label:"word-added"}),H=c({background:a.wordRemovedBackground,label:"word-removed"}),q=c({backgroundColor:a.codeFoldGutterBackground,label:"code-fold-gutter",minWidth:"50px",width:"50px",textAlign:"center",fill:a.codeFoldContentColor}),V=c({padding:""}),$=c({background:a.codeFoldBackground,cursor:"pointer",display:"inline",margin:0,border:"none",fill:a.codeFoldContentColor,label:"code-fold-expand-button"}),U=c({color:a.codeFoldContentColor,fontFamily:"monospace",label:"code-fold-content"}),P=c({display:"block",width:"10px",height:"10px",backgroundColor:"#ddd",borderWidth:"1px",borderStyle:"solid",borderColor:a.diffViewerTitleBorderColor}),Y=c({backgroundColor:a.wordAddedBackground}),G=c({backgroundColor:a.wordRemovedBackground}),X=c({backgroundColor:a.codeFoldBackground,fontSize:12,alignItems:"center",userSelect:"none",fontWeight:700,cursor:"pointer",label:"code-fold","&:hover":{color:a.diffViewerColor,fill:a.diffViewerColor,"& *":{color:a.diffViewerColor,fill:a.diffViewerColor}},a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),L=c({backgroundColor:a.emptyLineBackground,label:"empty-line"}),B=c({width:28,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${R}`]:{pre:{color:a.addedColor}},[`&.${A}`]:{pre:{color:a.removedColor}}}),W=c({background:a.highlightBackground,label:"highlighted-line",[`.${I}, .${H}`]:{backgroundColor:"initial"}}),D=c({label:"highlighted-gutter"}),Q=c({userSelect:"none",minWidth:50,width:"50px",padding:"0 10px",whiteSpace:"nowrap",label:"gutter",textAlign:"center",color:a.gutterColor,background:a.gutterBackground,"&:hover":{cursor:"pointer",background:a.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5,textAlign:"center",width:"100%"},[`&.${R}`]:{background:a.addedGutterBackground},[`&.${A}`]:{background:a.removedGutterBackground},[`&.${D}`]:{background:a.highlightGutterBackground,"&:hover":{background:a.highlightGutterBackground}}}),ee=c({"&:hover":{background:a.gutterBackground,cursor:"initial"},label:"empty-gutter"}),J=c({verticalAlign:"baseline",label:"line",textDecoration:"none"}),he=c({}),de={diffContainer:b,diffRemoved:A,diffAdded:R,diffChanged:_,splitView:m,marker:B,highlightedGutter:D,highlightedLine:W,gutter:Q,line:J,lineContent:w,wordDiff:F,wordAdded:I,summary:y,block:P,blockAddition:Y,blockDeletion:G,wordRemoved:H,noSelect:k,noWrap:T,codeFoldGutter:q,codeFoldExpandButton:$,codeFoldContentContainer:V,codeFold:X,emptyGutter:ee,emptyLine:L,lineNumber:j,contentText:E,content:h,column:he,codeFoldContent:U,stickyHeader:p,columnHeaders:x,titleBlock:O,allExpandButton:N},Se=Object.keys(i).reduce((Re,je)=>({...Re,[je]:c(i[je])}),{});return Object.keys(de).reduce((Re,je)=>({...Re,[je]:Se[je]?u(de[je],Se[je]):de[je]}),{})};function bee(){return f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[f.jsx("title",{children:"fold"}),f.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 vee(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 s=[];let a=0;for(;a<e.length;)if(e[a]==="<"){const p=e.indexOf(">",a);if(p===-1){s.push({type:"text",content:e.slice(a)});break}s.push({type:"tag",content:e.slice(a,p+1)}),a=p+1}else{let p=e.indexOf("<",a);p===-1&&(p=e.length),s.push({type:"text",content:e.slice(a,p)}),a=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 u(p){return p===Rn.ADDED?{open:`<ins class="${n.wordDiff} ${n.wordAdded}">`,close:"</ins>"}:p===Rn.REMOVED?{open:`<del class="${n.wordDiff} ${n.wordRemoved}">`,close:"</del>"}:{open:`<span class="${n.wordDiff}">`,close:"</span>"}}let h=0,m="";for(const p of s)if(p.type==="tag")m+=p.content;else{const y=p.content,x=c(y);let b=0,w=0;for(;b<x.length;){const E=h+b,k=r.find(F=>E>=F.start&&E<F.end);if(!k){const F=y[w];m+=F,w++,b++;continue}const T=k.end-E,N=x.length-b,O=Math.min(T,N);let j=w,A=0;for(;A<O&&j<y.length;){if(y[j]==="&"){const F=y.indexOf(";",j);F!==-1&&F-j<10?j=F+1:j++}else j++;A++}const R=y.slice(w,j),_=u(k.type);_?m+=_.open+R+_.close:m+=R,w=j,b+=O}h+=x.length}return m}var Lr;(function(e){e.LEFT="L",e.RIGHT="R"})(Lr||(Lr={}));let wee=class as extends S.Component{styles;wordDiffCache=new Map;contentColumnRef=S.createRef();charMeasureRef=S.createRef();stickyHeaderRef=S.createRef();resizeObserver=null;static defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:mr.CHARS,styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:""};constructor(t){super(t),this.state={expandedBlocks:[],noSelect:void 0,scrollableContainerRef:S.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 s=this.wordDiffCache.get(i);if(!s){const a=this.props.compareMethod===mr.JSON||this.props.compareMethod===mr.YAML?mr.CHARS:this.props.compareMethod,c=y9(t.rawValue,n.rawValue,a);s={left:c.left,right:c.right},this.wordDiffCache.set(i,s)}return{leftValue:s.left,rightValue:s.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,s=28,a=(this.props.splitView,2),c=this.props.splitView?2:1,u=this.props.splitView?2:1,h=a*i+c*s,m=r-h;return Math.max(100,m/u)}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,s,a,c,u){const h=[0],m=new Set;for(let p=0;p<t.length;p++){const y=t[p];if(s){const T=n[p];if(T!==void 0&&!i.includes(T)){const N=r[T].endLine===p;!m.has(T)&&N&&(m.add(T),h.push(h[h.length-1]+as.ESTIMATED_ROW_HEIGHT));continue}}const x=y.left?.value?this.getTextLength(y.left.value):0,b=y.right?.value?this.getTextLength(y.right.value):0,w=u?Math.max(x,b):x||b,E=Math.floor(c/a),k=E>0?Math.max(1,Math.ceil(w/E)):1;h.push(h[h.length-1]+k*as.ESTIMATED_ROW_HEIGHT)}return h}findLineAtOffset(t,n){let r=0,i=n.length-2;for(;r<i;){const s=Math.floor((r+i+1)/2);n[s]<=t?r=s:i=s-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:s,blocks:a}=this.state.computedDiffResult[r]??{};if(!i)return;const c=this.buildCumulativeOffsets(i,s,a,this.state.expandedBlocks,this.props.showDiffOnly,n,t,this.props.splitView);this.setState({cumulativeOffsets:c,contentColumnWidth:t,charWidth:n},()=>{this.onScroll()})};computeStyles=yQ(xee);onLineNumberClickProxy=t=>this.props.onLineNumberClick?n=>this.props.onLineNumberClick(t,n):()=>{};shouldHighlightWordDiff=()=>{const{compareMethod:t}=this.props;return t===mr.CHARS||t===mr.WORDS||t===mr.WORDS_WITH_SPACE||t===mr.JSON||t===mr.YAML};renderWordDiff=(t,n)=>{const r=this.shouldHighlightWordDiff(),i=t.map(a=>typeof a.value=="string"?a.value:"").join("");if(i.length>500)return[f.jsx("span",{children:i},"long-line")];if(n){const a=n(i),c=a?.props?.dangerouslySetInnerHTML?.__html;if(typeof c=="string"){const u=vee(c,t,{wordDiff:this.styles.wordDiff,wordAdded:r?this.styles.wordAdded:"",wordRemoved:r?this.styles.wordRemoved:""});return[S.cloneElement(a,{key:"highlighted-diff",dangerouslySetInnerHTML:{__html:u}})]}}return t.map((a,c)=>{let u;return typeof a.value=="string"?u=a.value:u=void 0,a.type===Rn.ADDED?f.jsx("ins",{className:oo(this.styles.wordDiff,{[this.styles.wordAdded]:r}),children:u},c):a.type===Rn.REMOVED?f.jsx("del",{className:oo(this.styles.wordDiff,{[this.styles.wordRemoved]:r}),children:u},c):f.jsx("span",{className:oo(this.styles.wordDiff),children:u},c)})};renderLine=(t,n,r,i,s,a)=>{const c=`${r}-${t}`,u=`${a}-${s}`,h=this.props.highlightLines.includes(c)||this.props.highlightLines.includes(u),m=n===Rn.ADDED,p=n===Rn.REMOVED,y=n===Rn.CHANGED;let x;const b=Array.isArray(i);b?x=this.renderWordDiff(i,this.props.renderContent):this.props.renderContent?x=this.props.renderContent(i):x=i;let w="div";return m&&!b?w="ins":p&&!b&&(w="del"),f.jsxs(f.Fragment,{children:[!this.props.hideLineNumbers&&f.jsx("td",{onClick:t&&this.onLineNumberClickProxy(c),className:oo(this.styles.gutter,{[this.styles.emptyGutter]:!t,[this.styles.diffAdded]:m,[this.styles.diffRemoved]:p,[this.styles.diffChanged]:y,[this.styles.highlightedGutter]:h}),children:f.jsx("pre",{className:this.styles.lineNumber,children:t})}),!this.props.splitView&&!this.props.hideLineNumbers&&f.jsx("td",{onClick:s&&this.onLineNumberClickProxy(u),className:oo(this.styles.gutter,{[this.styles.emptyGutter]:!s,[this.styles.diffAdded]:m,[this.styles.diffRemoved]:p,[this.styles.diffChanged]:y,[this.styles.highlightedGutter]:h}),children:f.jsx("pre",{className:this.styles.lineNumber,children:s})}),this.props.renderGutter?this.props.renderGutter({lineNumber:t,type:n,prefix:r,value:i,additionalLineNumber:s,additionalPrefix:a,styles:this.styles}):null,f.jsx("td",{className:oo(this.styles.marker,{[this.styles.emptyLine]:!x,[this.styles.diffAdded]:m,[this.styles.diffRemoved]:p,[this.styles.diffChanged]:y,[this.styles.highlightedLine]:h}),children:f.jsxs("pre",{children:[m&&"+",p&&"-"]})}),f.jsx("td",{ref:r===Lr.LEFT&&!this.state.cumulativeOffsets?this.contentColumnRef:void 0,className:oo(this.styles.content,{[this.styles.emptyLine]:!x,[this.styles.diffAdded]:m,[this.styles.diffRemoved]:p,[this.styles.diffChanged]:y,[this.styles.highlightedLine]:h,left:r===Lr.LEFT,right:r===Lr.RIGHT}),onMouseDown:()=>{const E=document.getElementsByClassName(r===Lr.LEFT?"right":"left");for(let k=0;k<E.length;k++)E.item(k).classList.add(this.styles.noSelect)},title:m&&!b?"Added line":p&&!b?"Removed line":void 0,children:f.jsx(w,{className:this.styles.contentText,children:x})})]})};renderSplitView=({left:t,right:n},r)=>{const{leftValue:i,rightValue:s}=this.getWordDiffValues(t,n,r);return f.jsxs("tr",{className:this.styles.line,children:[this.renderLine(t.lineNumber,t.type,Lr.LEFT,i),this.renderLine(n.lineNumber,n.type,Lr.RIGHT,s)]},r)};renderInlineView=({left:t,right:n},r)=>{const{leftValue:i,rightValue:s}=this.getWordDiffValues(t,n,r);let a;return t.type===Rn.REMOVED&&n.type===Rn.ADDED?f.jsxs(S.Fragment,{children:[f.jsx("tr",{className:this.styles.line,children:this.renderLine(t.lineNumber,t.type,Lr.LEFT,i,null)}),f.jsx("tr",{className:this.styles.line,children:this.renderLine(null,n.type,Lr.RIGHT,s,n.lineNumber,Lr.RIGHT)})]},r):(t.type===Rn.REMOVED&&(a=this.renderLine(t.lineNumber,t.type,Lr.LEFT,i,null)),t.type===Rn.DEFAULT&&(a=this.renderLine(t.lineNumber,t.type,Lr.LEFT,i,n.lineNumber,Lr.RIGHT)),n.type===Rn.ADDED&&(a=this.renderLine(null,n.type,Lr.RIGHT,s,n.lineNumber)),f.jsx("tr",{className:this.styles.line,children:a},r))};onBlockClickProxy=t=>()=>this.onBlockExpand(t);renderSkippedLineIndicator=(t,n,r,i)=>{const{hideLineNumbers:s,splitView:a}=this.props,c=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(t,r,i):f.jsxs("span",{className:this.styles.codeFoldContent,children:["@@ -",r-t,",",t," +",i-t,",",t," @@"]}),u=f.jsx("td",{className:this.styles.codeFoldContentContainer,children:f.jsx("button",{type:"button",className:this.styles.codeFoldExpandButton,onClick:this.onBlockClickProxy(n),tabIndex:0,children:c})}),h=!a&&!s,m=f.jsx("td",{className:this.styles.codeFoldGutter,children:f.jsx(m4,{})});return f.jsxs("tr",{className:this.styles.codeFold,onClick:this.onBlockClickProxy(n),role:"button",tabIndex:0,children:[!s&&m,this.props.renderGutter?f.jsx("td",{className:this.styles.codeFoldGutter}):null,f.jsx("td",{className:oo({[this.styles.codeFoldGutter]:h})}),h?f.jsxs(S.Fragment,{children:[f.jsx("td",{}),u]}):f.jsxs(S.Fragment,{children:[u,this.props.renderGutter?f.jsx("td",{}):null,f.jsx("td",{}),f.jsx("td",{}),s?null:f.jsx("td",{})]})]},`${r}-${i}`)};getMemoisedKey=()=>{const{oldValue:t,newValue:n,disableWordDiff:r,compareMethod:i,linesOffset:s,alwaysShowLines:a,extraLinesSurroundingDiff:c}=this.props;return JSON.stringify({oldValue:t,newValue:n,disableWordDiff:r,compareMethod:i,linesOffset:s,alwaysShowLines:a,extraLinesSurroundingDiff:c})};memoisedCompute=async()=>{const{oldValue:t,newValue:n,disableWordDiff:r,compareMethod:i,linesOffset:s}=this.props,a=this.getMemoisedKey();if(this.state.computedDiffResult[a]){this.setState(w=>({...w,isLoading:!1}));return}const c=this.props.infiniteLoading?.containerHeight,u=c?typeof c=="number"?c:parseInt(c,10)||0:0,h=!r&&!!this.props.infiniteLoading&&u>0&&u<2e3,{lineInformation:m,diffLines:p}=await MJ(t,n,r,i,s,this.props.alwaysShowLines,h),y=this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff),{lineBlocks:x,blocks:b}=xQ(m,p,y);this.state.computedDiffResult[a]={lineInformation:m,lineBlocks:x,blocks:b},this.setState(w=>({...w,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,s=i?this.findLineAtOffset(r,i):Math.floor(r/as.ESTIMATED_ROW_HEIGHT);s!==this.state.visibleStartRow&&this.setState({visibleStartRow:s})};renderDiff=()=>{const{splitView:t,infiniteLoading:n,showDiffOnly:r}=this.props,{computedDiffResult:i,expandedBlocks:s,visibleStartRow:a,scrollableContainerRef:c,cumulativeOffsets:u}=this.state,h=this.getMemoisedKey(),{lineInformation:m=[],lineBlocks:p=[],blocks:y=[]}=i[h]??{};let x=0,b=1/0;const w=5;if(n&&c.current){const I=c.current,H=this.getStickyHeaderHeight(),q=Math.max(0,I.scrollTop-H);if(u){const V=u[u.length-1]||0,$=u.length-2;x=Math.max(0,this.findLineAtOffset(q,u)-w),b=this.findLineAtOffset(q+I.clientHeight,u)+w;const U=Math.ceil(I.clientHeight/as.ESTIMATED_ROW_HEIGHT);b=Math.max(b,x+U+w),q+I.clientHeight>=V-w*as.ESTIMATED_ROW_HEIGHT&&(b=$+w)}else{const V=Math.ceil(I.clientHeight/as.ESTIMATED_ROW_HEIGHT);x=Math.max(0,a-w),b=a+V+w}}const E=new Map,k=new Set;let T=0;for(let I=0;I<m.length;I++){const H=p[I];if(r&&H!==void 0)if(s.includes(H))E.set(I,T),T++;else{const q=y[H].endLine===I;!k.has(H)&&q&&(k.add(H),E.set(I,T),T++)}else E.set(I,T),T++}const N=T,O=[];let j=0,A=!1,R=-1;k.clear();for(let I=0;I<m.length;I++){const H=m[I],q=E.get(I);if(q!==void 0&&!(q<x)){if(q>b)break;if(A||(j=u?u[q]||0:q*as.ESTIMATED_ROW_HEIGHT,A=!0),R=q,r){const V=p[I];if(V!==void 0){const $=y[V].endLine===I;if(!s.includes(V)&&$){O.push(f.jsx(S.Fragment,{children:this.renderSkippedLineIndicator(y[V].lines,V,H.left.lineNumber,H.right.lineNumber)},I));continue}if(!s.includes(V))continue}}O.push(t?this.renderSplitView(H,I):this.renderInlineView(H,I))}}const _=u?u[u.length-1]||0:N*as.ESTIMATED_ROW_HEIGHT,F=u&&R>=0?_-(u[R+1]||_):0;return{diffNodes:O,blocks:y,lineInformation:m,totalRenderedRows:N,topPadding:j,bottomPadding:F,totalContentHeight:_,renderedCount:O.length,debug:{visibleRowStart:x,visibleRowEnd:b,totalRows:N,offsetsLength:u?.length??0,renderedCount:O.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:s,splitView:a,compareMethod:c,hideLineNumbers:u,nonce:h}=this.props;if(typeof c=="string"&&c!==mr.JSON&&(typeof t!="string"||typeof n!="string"))throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,r,h);const m=this.renderDiff();this.props.renderGutter;let p=0,y=0;for(const j of m.lineInformation)j.left.type===Rn.ADDED&&y++,j.right.type===Rn.ADDED&&y++,j.left.type===Rn.REMOVED&&p++,j.right.type===Rn.REMOVED&&p++;const x=p+y,b=Math.round(y/x*100),w=[];for(let j=0;j<5;j++)b>j*20?w.push(f.jsx("span",{className:oo(this.styles.block,this.styles.blockAddition)},j)):w.push(f.jsx("span",{className:oo(this.styles.block,this.styles.blockDeletion)},j));const E=this.state.expandedBlocks.length===m.blocks.length,k=this.props.loadingElement,T=this.props.infiniteLoading?{overflowY:"scroll",overflowX:"hidden",height:this.props.infiniteLoading.containerHeight}:{},N=!!this.props.infiniteLoading&&!this.state.cumulativeOffsets,O=f.jsxs("table",{className:oo(this.styles.diffContainer,{[this.styles.splitView]:a,[this.styles.noWrap]:N}),onMouseUp:()=>{const j=document.getElementsByClassName("right");for(let R=0;R<j.length;R++)j.item(R).classList.remove(this.styles.noSelect);const A=document.getElementsByClassName("left");for(let R=0;R<A.length;R++)A.item(R).classList.remove(this.styles.noSelect)},children:[f.jsxs("colgroup",{children:[!this.props.hideLineNumbers&&f.jsx("col",{width:"50px"}),!a&&!this.props.hideLineNumbers&&f.jsx("col",{width:"50px"}),this.props.renderGutter&&f.jsx("col",{width:"50px"}),f.jsx("col",{width:"28px"}),f.jsx("col",{width:"auto"}),a&&f.jsxs(f.Fragment,{children:[!this.props.hideLineNumbers&&f.jsx("col",{width:"50px"}),this.props.renderGutter&&f.jsx("col",{width:"50px"}),f.jsx("col",{width:"28px"}),f.jsx("col",{width:"auto"})]})]}),f.jsx("tbody",{children:m.diffNodes})]});return f.jsxs("div",{style:{...T,position:"relative"},onScroll:this.onScroll,ref:this.state.scrollableContainerRef,children:[(!this.props.hideSummary||i||s)&&f.jsxs("div",{ref:this.stickyHeaderRef,className:this.styles.stickyHeader,children:[!this.props.hideSummary&&f.jsxs("div",{className:this.styles.summary,role:"banner",children:[f.jsx("button",{type:"button",className:this.styles.allExpandButton,onClick:()=>{this.setState({expandedBlocks:E?[]:m.blocks.map(j=>j.index)},()=>this.recalculateOffsets())},children:E?f.jsx(bee,{}):f.jsx(m4,{})})," ",x,f.jsx("div",{style:{display:"flex",gap:"1px"},children:w}),this.props.summary?f.jsx("span",{children:this.props.summary}):null]}),(i||s)&&f.jsxs("div",{className:this.styles.columnHeaders,children:[f.jsx("div",{className:this.styles.titleBlock,children:i?f.jsx("pre",{className:this.styles.contentText,children:i}):null}),a&&f.jsx("div",{className:this.styles.titleBlock,children:s?f.jsx("pre",{className:this.styles.contentText,children:s}):null})]})]}),this.state.isLoading&&k&&f.jsx(k,{}),this.props.infiniteLoading?f.jsx("div",{style:{height:m.totalContentHeight,position:"relative"},children:f.jsx("div",{style:{position:"absolute",top:m.topPadding,left:0,right:0},children:O})}):O,f.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&&f.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:[f.jsx("div",{style:{fontWeight:"bold",marginBottom:"5px",color:"#fff"},children:"Debug Info"}),f.jsxs("div",{children:["scrollTop: ",m.debug.scrollTop]}),f.jsxs("div",{children:["headerHeight: ",m.debug.headerHeight]}),f.jsxs("div",{children:["contentScrollTop: ",m.debug.contentScrollTop]}),f.jsxs("div",{children:["clientHeight: ",m.debug.clientHeight]}),f.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[f.jsxs("div",{children:["visibleRowStart: ",m.debug.visibleRowStart]}),f.jsxs("div",{children:["visibleRowEnd: ",m.debug.visibleRowEnd]})]}),f.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[f.jsxs("div",{children:["totalRows: ",m.debug.totalRows]}),f.jsxs("div",{children:["offsetsLength: ",m.debug.offsetsLength]}),f.jsxs("div",{children:["renderedCount: ",m.debug.renderedCount]})]}),f.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px"},children:[f.jsxs("div",{children:["topPadding: ",m.topPadding.toFixed(0)]}),f.jsxs("div",{children:["bottomPadding: ",m.bottomPadding.toFixed(0)]}),f.jsxs("div",{children:["totalContentHeight: ",m.totalContentHeight.toFixed(0)]})]}),f.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px",color:"#ff0"},children:[f.jsxs("div",{children:["cumulativeOffsets: ",this.state.cumulativeOffsets?"SET":"NULL"]}),f.jsxs("div",{children:["columnWidth: ",this.state.contentColumnWidth?.toFixed(0)??"N/A","px"]}),f.jsxs("div",{children:["charWidth: ",this.state.charWidth?.toFixed(2)??"N/A","px"]}),f.jsxs("div",{children:["charsPerRow: ",this.state.contentColumnWidth&&this.state.charWidth?Math.floor(this.state.contentColumnWidth/this.state.charWidth):"N/A"]})]}),this.state.cumulativeOffsets&&f.jsxs("div",{style:{marginTop:"5px",borderTop:"1px solid #444",paddingTop:"5px",color:"#0ff",fontSize:"10px"},children:[f.jsxs("div",{children:["offsets[",m.debug.visibleRowEnd,"]: ",this.state.cumulativeOffsets[m.debug.visibleRowEnd]?.toFixed(0)??"N/A"]}),f.jsxs("div",{children:["offsets[",m.debug.totalRows-1,"]: ",this.state.cumulativeOffsets[m.debug.totalRows-1]?.toFixed(0)??"N/A"]}),f.jsxs("div",{children:["offsets[",m.debug.totalRows,"]: ",this.state.cumulativeOffsets[m.debug.totalRows]?.toFixed(0)??"N/A"]}),f.jsxs("div",{style:{marginTop:"3px"},children:["viewportEnd: ",(m.debug.contentScrollTop+m.debug.clientHeight).toFixed(0)]}),f.jsxs("div",{style:{marginTop:"3px",color:"#f0f"},children:["scrollHeight: ",this.state.scrollableContainerRef.current?.scrollHeight??"N/A"]}),f.jsxs("div",{children:["maxScrollTop: ",(this.state.scrollableContainerRef.current?.scrollHeight??0)-m.debug.clientHeight]})]})]})]})}};function See(){return f.jsx("div",{className:"bg-card absolute inset-0 z-20 flex items-center justify-center",children:f.jsx(qr,{className:"text-muted-foreground size-5 animate-spin"})})}const Cee={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 Eee({filename:e,hideSummary:t=!1,newContent:n,oldContent:r,showDiffOnly:i=!1,showLoadingOverlay:s=!0,viewMode:a="split"}){return f.jsx(wee,{compareMethod:mr.WORDS,hideSummary:t,loadingElement:s?See:void 0,newValue:n,oldValue:r,showDiffOnly:i,splitView:a==="split",styles:Cee,summary:e,useDarkTheme:!0})}function N9(e){return f.jsx(Eee,{...e})}function kee({file:e,onOpenFile:t,onStageToggle:n}){const r=e.isStaged?"staged":"unstaged",{data:i,error:s,isLoading:a}=fQ({path:e.path,side:r});return a?f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(qr,{className:"text-muted-foreground size-5 animate-spin"})}):s?f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx("p",{className:"text-muted-foreground text-sm",children:kn(s,"Failed to load diff")})}):i?f.jsxs("div",{className:"bg-card flex h-full flex-col overflow-auto rounded-md",children:[f.jsx(j8,{file:e,onOpenFile:()=>t(e),onStageToggle:()=>n(e)}),f.jsx("div",{className:"flex-1 [&>div]:min-h-full",children:f.jsx(N9,{filename:e.path,hideSummary:!0,newContent:i.newContent,oldContent:i.oldContent,viewMode:"split"})})]}):f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx("p",{className:"text-muted-foreground text-sm",children:"No diff available"})})}const Tee=e=>{const{apiClient:t}=Pe.getState();return t?t.request($n.DISCARD,e):Promise.reject(new Error("Not connected"))},Nee=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Ri().queryKey}),n?.(...i)},...r,mutationFn:Tee})};function Ree({files:e,onOpenChange:t,open:n}){const r=Nee(),i=async()=>{try{await r.mutateAsync({filePaths:e.map(a=>a.path)}),lt.success(e.length===1?`Discarded changes in ${e[0].path}`:`Discarded changes in ${e.length} files`),t(!1)}catch(a){lt.error(kn(a,"Failed to discard changes"))}},s=e.length===1;return f.jsx(Ff,{onOpenChange:t,open:n,children:f.jsxs(Bf,{children:[f.jsxs(Hf,{children:[f.jsx(qf,{children:s?"Discard changes?":`Discard changes in ${e.length} files?`}),f.jsx(Vf,{children:s?f.jsxs(f.Fragment,{children:["Unstaged changes in"," ",f.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."})]}),f.jsxs(Uf,{children:[f.jsx($f,{children:"Cancel"}),f.jsx(ze,{disabled:r.isPending,onClick:i,variant:"destructive",children:r.isPending?"Discarding…":"Discard changes"})]})]})})}const Aee={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"}},jee={both_added:"Both added",both_modified:"Both modified",deleted_modified:"Deleted / modified"};function Oee({disabled:e,file:t,isSelected:n,onAction:r,onDiscard:i,onSelect:s}){const a=Aee[t.status],c=t.path.split("/").pop()??t.path,u=t.path.slice(0,t.path.length-c.length).replace(/\/$/,""),h=p=>{p.stopPropagation(),r(t)},m=p=>{p.stopPropagation(),i?.(t)};return f.jsxs("div",{className:se("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:()=>s?.(t),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),s?.(t))},role:"button",tabIndex:0,children:[f.jsx(A0,{className:"text-primary-foreground size-4 shrink-0",strokeWidth:2}),f.jsxs(ms,{disableHoverablePopup:!0,children:[f.jsxs(gs,{render:f.jsx("div",{className:"flex min-w-0 flex-1 items-baseline gap-1.5"}),children:[f.jsx("span",{className:"text-foreground truncate text-sm",children:c}),u&&f.jsx("span",{className:"text-muted-foreground truncate text-xs group-hover:hidden",children:u})]}),f.jsx($i,{className:"pointer-events-none max-w-lg break-all",side:"bottom",children:t.path})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs("div",{className:"hidden items-center gap-1 group-hover:flex group-focus-within:flex",children:[i&&f.jsx(ze,{className:"size-5 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:e,onClick:m,size:"icon-xs",title:"Discard changes",variant:"ghost",children:f.jsx(HA,{className:"size-3"})}),f.jsx(ze,{className:"size-5 transition-colors hover:bg-foreground/15 dark:hover:bg-foreground/15 hover:text-foreground",disabled:e,onClick:h,size:"icon-xs",title:t.isStaged?"Unstage":"Stage",variant:"ghost",children:t.isStaged?f.jsx(Tv,{className:"size-3"}):f.jsx(Aa,{className:"size-3"})})]}),f.jsx("span",{className:se("w-4 text-center font-mono text-xs font-semibold",a.textClass),title:t.conflictType?`Conflict: ${jee[t.conflictType]}`:a.label,children:a.letter})]})]})}function J2(e){e.stopPropagation()}function ey({disabled:e,files:t,isFileSelected:n,label:r,onDiscardFile:i,onDiscardGroup:s,onFileAction:a,onFileSelect:c,onGroupAction:u,onOpenAll:h,openAllLabel:m,variant:p}){const[y,x]=S.useState(!0);if(t.length===0)return null;const b=p==="stage"?Aa:Tv,w=y?_f:IA;return f.jsxs("section",{className:"flex flex-col",children:[f.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:[f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(w,{className:"text-muted-foreground size-3.5",strokeWidth:2.5}),f.jsx("h3",{className:"text-muted-foreground text-sm font-bold",children:r}),f.jsx("span",{className:"text-muted-foreground bg-muted ml-1 rounded px-1.5 py-0.5 text-xs font-medium",children:t.length})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[h&&f.jsx(ze,{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=>{J2(E),h()},size:"icon-xs",title:m??"Open all",variant:"ghost",children:f.jsx(C$,{className:"size-3"})}),s&&f.jsx(ze,{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=>{J2(E),s()},size:"icon-xs",title:"Discard all changes",variant:"ghost",children:f.jsx(HA,{className:"size-3"})}),u&&f.jsx(ze,{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=>{J2(E),u()},size:"icon-xs",title:p==="stage"?"Stage all":"Unstage all",variant:"ghost",children:f.jsx(b,{className:"size-3"})})]})]}),y&&f.jsx(Qb,{delay:500,children:f.jsx("div",{className:"flex flex-col",children:t.map(E=>f.jsx(Oee,{disabled:e,file:E,isSelected:n?.(E),onAction:a,onDiscard:i,onSelect:c},cm(E)))})})]})}const Mee=e=>{const{apiClient:t}=Pe.getState();return t?t.request($n.DIFFS,e):Promise.reject(new Error("Not connected"))},Dee=e=>({placeholderData:$H,queryFn:()=>Mee(e),queryKey:["vc","diffs",e.side,...e.paths],staleTime:0}),_ee=({enabled:e=!0,paths:t,queryConfig:n,side:r})=>Mn({...Dee({paths:t,side:r}),enabled:e&&t.length>0,...n}),Lee=300;function E4({emptyMessage:e,files:t,onOpenFile:n,onStageToggle:r,side:i,title:s}){const a=S.useMemo(()=>t.map(b=>b.path),[t]),{data:c,error:u,isPending:h}=_ee({paths:a,side:i}),m=S.useRef(!1),[p,y]=S.useState(!0);if(S.useEffect(()=>{if(m.current||!c)return;m.current=!0;const b=setTimeout(()=>y(!1),Lee);return()=>clearTimeout(b)},[c]),t.length===0)return f.jsx("div",{className:"flex h-full items-center justify-center bg-card rounded-md",children:f.jsx("p",{className:"text-secondary-foreground text-sm",children:e})});if(u)return f.jsx("div",{className:"flex h-full items-center justify-center bg-card rounded-md",children:f.jsx("p",{className:"text-secondary-foreground text-sm",children:kn(u,"Failed to load diffs")})});const x=h&&!c||p;return f.jsxs("div",{className:"bg-card relative flex h-full flex-col overflow-auto rounded-md",children:[c&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"border-border bg-muted flex items-center gap-2 border-b px-4 py-2 text-sm font-semibold",children:[f.jsx("span",{className:"text-foreground",children:s}),f.jsxs("span",{className:"text-muted-foreground",children:[t.length," file",t.length===1?"":"s"]})]}),f.jsx("div",{className:"flex flex-col gap-4",children:c.diffs.map(b=>{const w=t.find(E=>E.path===b.path);return w?f.jsxs("div",{className:"flex flex-col",children:[f.jsx(j8,{file:w,onOpenFile:()=>n(w),onStageToggle:()=>r(w)}),f.jsx(N9,{filename:b.path,hideSummary:!0,newContent:b.newContent,oldContent:b.oldContent,showDiffOnly:!0,showLoadingOverlay:!1,viewMode:"split"})]},`${i}:${b.path}`):null})})]}),x&&f.jsx("div",{className:"bg-card absolute inset-0 z-30 flex items-center justify-center",children:f.jsx(qr,{className:"text-muted-foreground size-5 animate-spin"})})]})}function Iee({isCommitting:e,onConfirm:t,onOpenChange:n,open:r}){return f.jsx(Ff,{onOpenChange:n,open:r,children:f.jsxs(Bf,{children:[f.jsxs(Hf,{children:[f.jsx(qf,{children:"There are no staged changes to commit"}),f.jsx(Vf,{children:"Would you like to stage all your changes and commit them directly?"})]}),f.jsxs(Uf,{children:[f.jsx($f,{children:"Cancel"}),f.jsx(ze,{disabled:e,onClick:t,children:e?"Committing…":"Stage all & commit"})]})]})})}async function xd(e,t){try{await e}catch(n){lt.error(kn(n,t))}}function Pee(){const e=Cl(),t=Ur(xe=>xe.isAuthorized),n=Pe(xe=>xe.selectedProject),{data:r,isFetching:i,isLoading:s,refetch:a}=Iv(),[c,u]=S.useState(),[h,m]=S.useState("single"),[p,y]=S.useState(),[x,b]=S.useState(""),[w,E]=S.useState(!1),k=QK(),T=sQ(),N=ZK(),O=iQ(),j=N8(),A=eQ(),R=nQ(),{staged:_,unmerged:F,unstaged:I}=S.useMemo(()=>e8(r),[r]),H=S.useMemo(()=>c?[...F,..._,...I].find(xe=>cm(xe)===c):void 0,[c,_,F,I]),q=k.isPending||T.isPending||N.isPending||O.isPending||j.isPending||A.isPending||R.isPending;if(s)return f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(qr,{className:"text-muted-foreground size-5 animate-spin"})});if(!r?.initialized)return f.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4",children:[f.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[f.jsx("h2",{className:"text-foreground text-lg font-semibold",children:"Version control not initialized"}),f.jsx("p",{className:"text-muted-foreground text-sm",children:"Initialize to start tracking changes in this project."})]}),f.jsx(Uv,{})]});const V=xe=>xd(k.mutateAsync({filePaths:[xe.path]}),"Failed to stage file"),$=xe=>xd(T.mutateAsync({filePaths:[xe.path]}),"Failed to unstage file"),U=()=>{const xe=I.map(Ge=>Ge.path);xe.length!==0&&xd(k.mutateAsync({filePaths:xe}),"Failed to stage all")},P=xe=>xd(k.mutateAsync({filePaths:xe}),"Failed to stage"),Y=()=>P(F.map(xe=>xe.path)),G=async()=>{try{await A.mutateAsync(),lt.success("Merge aborted")}catch(xe){lt.error(kn(xe,"Failed to abort merge"))}},X=()=>xd(T.mutateAsync({}),"Failed to unstage all"),L=async xe=>{try{return await N.mutateAsync({message:xe}),lt.success("Committed"),!0}catch(Ge){return pd(Ge,"Failed to commit",e,{projectPath:n}),!1}},B=async xe=>{try{return await R.mutateAsync({message:xe}),lt.success("Merge committed"),!0}catch(Ge){return pd(Ge,"Failed to commit merge",e,{projectPath:n}),!1}},W=async()=>{const xe=x.trim();if(!xe)return;if(r.mergeInProgress){await B(xe)&&b("");return}if(_.length===0&&I.length>0){E(!0);return}await L(xe)&&b("")},D=async()=>{const xe=x.trim();if(xe)try{await k.mutateAsync({}),await L(xe)&&(b(""),E(!1))}catch(Ge){pd(Ge,"Failed to stage & commit",e,{projectPath:n})}},Q=async()=>{try{const xe=await O.mutateAsync({setUpstream:!r.trackingBranch});lt.success(xe.alreadyUpToDate?"Already up to date":`Pushed ${xe.branch}`)}catch(xe){pd(xe,"Failed to push",e)}},ee=async()=>{try{const xe=await j.mutateAsync({});xe.conflicts&&xe.conflicts.length>0?lt.error(`Pull had conflicts in ${xe.conflicts.length} file(s)`):lt.success(xe.alreadyUpToDate?"Already up to date":`Pulled ${xe.branch}`)}catch(xe){pd(xe,"Failed to pull",e)}},J=xe=>{u(cm(xe)),m("single")},he=xe=>cm(xe)===c&&h==="single",de=()=>m("multi-staged"),Se=()=>m("multi-unstaged"),Re=xe=>{e(`/contexts?path=${encodeURIComponent(xe.path)}`)},je=xe=>xe.isStaged?$(xe):V(xe),Fe=xe=>y([xe]),_e=()=>{I.length>0&&y(I)},De=_.length+I.length+F.length>0;return f.jsxs("div",{className:"flex h-full w-full",children:[f.jsxs("aside",{className:"border-border flex h-full w-80 shrink-0 flex-col gap-2",children:[f.jsx(lQ,{ahead:r.ahead,behind:r.behind,branch:r.branch,hasTracking:!!r.trackingBranch,isAborting:A.isPending,isAuthenticated:t,isPulling:j.isPending,isPushing:O.isPending,mergeInProgress:r.mergeInProgress,onAbortMerge:G,onPull:ee,onPush:Q}),f.jsx(cQ,{canCommit:_.length>0||I.length>0,isCommitting:N.isPending,message:x,onCommit:W,onMessageChange:b}),f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto",children:[f.jsx(ey,{disabled:q,files:F,isFileSelected:he,label:"Merge Changes",onFileAction:V,onFileSelect:J,onGroupAction:Y,variant:"stage"}),f.jsx(ey,{disabled:q,files:_,isFileSelected:he,label:"Staged Changes",onFileAction:$,onFileSelect:J,onGroupAction:X,onOpenAll:de,openAllLabel:"Open all staged changes",variant:"unstage"}),f.jsx(ey,{disabled:q,files:I,isFileSelected:he,label:"Changes",onDiscardFile:Fe,onDiscardGroup:_e,onFileAction:V,onFileSelect:J,onGroupAction:U,onOpenAll:Se,openAllLabel:"Open all changes",variant:"stage"})]})]}),f.jsxs("main",{className:"flex h-full flex-1 flex-col overflow-hidden pl-4",children:[h==="multi-staged"&&f.jsx(E4,{emptyMessage:"No staged changes",files:_,onOpenFile:Re,onStageToggle:je,side:"staged",title:"Staged Changes"}),h==="multi-unstaged"&&f.jsx(E4,{emptyMessage:"No changes",files:I,onOpenFile:Re,onStageToggle:je,side:"unstaged",title:"Changes"}),h==="single"&&(H?f.jsx(kee,{file:H,onOpenFile:Re,onStageToggle:je}):De?f.jsxs("div",{className:"bg-card text-secondary-foreground flex h-full flex-col items-center justify-center gap-3 rounded-md text-sm",children:[f.jsx(A0,{className:"size-8",strokeWidth:1.25}),f.jsx("p",{children:"Select a file to view changes"})]}):f.jsxs("div",{className:"flex h-full flex-col items-center justify-center rounded-md bg-card",children:[f.jsx("img",{alt:"",className:"size-30 mb-6",src:YK}),f.jsxs("div",{className:"flex flex-col items-center gap-1 text-center mb-5",children:[f.jsx("p",{className:"text-foreground text-base font-medium",children:"No changes detected"}),f.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."})]}),f.jsx(ze,{className:"w-37",disabled:i,onClick:()=>a(),variant:"secondary",children:"Refresh"})]}))]}),f.jsx(Ree,{files:p??[],onOpenChange:xe=>{xe||y(void 0)},open:p!==void 0&&p.length>0}),f.jsx(Iee,{isCommitting:k.isPending||N.isPending,onConfirm:D,onOpenChange:E,open:w})]})}function zee(){return f.jsx("div",{className:"h-full w-full",children:f.jsx(Pee,{})})}const Fee=["rules","hook","mcp","skill"];new Set(Fee);const Bee=new Set(["hook","mcp","skill"]);function Hee(e){return Bee.has(e)}const Uee=()=>{const{apiClient:e}=Pe.getState();return e?e.request(cv.GET_AGENTS):Promise.reject(new Error("Not connected"))},qee=()=>({gcTime:1/0,queryFn:Uee,queryKey:["connectors","agents"],staleTime:1/0}),Vee=({queryConfig:e}={})=>Mn({...qee(),...e}),$ee=()=>{const{apiClient:e}=Pe.getState();return e?e.request(cv.LIST):Promise.reject(new Error("Not connected"))},R9=()=>({queryFn:$ee,queryKey:["connectors","list"]}),Yee=({queryConfig:e}={})=>Mn({...R9(),...e}),Wee=({agentId:e,connectorType:t})=>{const{apiClient:n}=Pe.getState();return n?n.request(cv.INSTALL,{agentId:e,connectorType:t}):Promise.reject(new Error("Not connected"))},Gee=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:R9().queryKey}),n?.(...i)},...r,mutationFn:Wee})},Kee="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",Qee="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",Xee="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",Zee="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",k4="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",Jee="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",ete="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",tte="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",nte="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",rte="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",ite="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",ote="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",ste="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",ate="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%3eOpenClaude%3c/title%3e%3cdefs%3e%3cmask%20id='openclaude-front-mask'%3e%3crect%20width='24'%20height='24'%20fill='%23fff'/%3e%3crect%20x='3'%20y='2.5'%20width='14'%20height='14'%20rx='2.5'%20fill='%23000'/%3e%3c/mask%3e%3c/defs%3e%3cg%20mask='url(%23openclaude-front-mask)'%3e%3cpath%20d='M8.5%205.5h9a2.5%202.5%200%200%201%202.5%202.5v9a2.5%202.5%200%200%201-2.5%202.5h-9a2.5%202.5%200%200%201-2.5-2.5v-9a2.5%202.5%200%200%201%202.5-2.5zm0%201.5a1%201%200%200%200-1%201v9a1%201%200%200%200%201%201h9a1%201%200%200%200%201-1v-9a1%201%200%200%200-1-1h-9z'/%3e%3c/g%3e%3cpath%20d='M5.5%202.5h9a2.5%202.5%200%200%201%202.5%202.5v9a2.5%202.5%200%200%201-2.5%202.5h-9a2.5%202.5%200%200%201-2.5-2.5v-9a2.5%202.5%200%200%201%202.5-2.5zm0%201.5a1%201%200%200%200-1%201v9a1%201%200%200%200%201%201h9a1%201%200%200%200%201-1v-9a1%201%200%200%200-1-1h-9z'/%3e%3crect%20x='6.8'%20y='6.4'%20width='1.2'%20height='2.4'%20rx='0.6'/%3e%3crect%20x='12'%20y='6.4'%20width='1.2'%20height='2.4'%20rx='0.6'/%3e%3cpath%20d='M5.6%2010.7l.7-.8%202.6%202%200%20.1-2.6%202-.7-.8%201.7-1.2-1.7-1.3z'/%3e%3crect%20x='8.5'%20y='13.4'%20width='3.2'%20height='0.8'%20rx='0.3'/%3e%3c/svg%3e",lte="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",cte="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",ute="/assets/qoder-connector-D9_pSbd_.svg",dte="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",fte="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",hte="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",pte="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",mte="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",gte="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",Gm={Amp:Kee,Antigravity:Qee,"Auggie CLI":Xee,"Augment Code":Zee,"Claude Code":k4,"Claude Desktop":k4,Cline:Jee,Codex:ete,Cursor:tte,"Gemini CLI":nte,"Github Copilot":rte,Junie:ite,"Kilo Code":ote,Kiro:ste,OpenClaude:ate,OpenClaw:lte,OpenCode:cte,Qoder:ute,"Qwen Code":dte,"Roo Code":fte,"Trae.ai":hte,Warp:pte,Windsurf:mte,Zed:gte};function yte({agents:e,connectors:t,onAdd:n,onOpenChange:r,open:i,pendingAgentId:s}){const[a,c]=S.useState("");S.useEffect(()=>{i||c("")},[i]);const u=S.useMemo(()=>new Set(t.map(m=>m.agent)),[t]),h=S.useMemo(()=>{if(!a)return e;const m=a.toLowerCase();return e.filter(p=>p.name.toLowerCase().includes(m))},[e,a]);return f.jsx(Al,{onOpenChange:r,open:i,children:f.jsxs(jl,{className:"flex h-150 flex-col sm:max-w-lg",children:[f.jsx(Vr,{children:f.jsx($r,{children:"Add connector"})}),f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3",children:[f.jsxs("div",{className:"relative shrink-0",children:[f.jsx(lu,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),f.jsx(Ki,{className:"pl-9",onChange:m=>c(m.target.value),placeholder:"Search agents...",value:a})]}),f.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[h.map(m=>{const p=u.has(m.id),y=s===m.id;return f.jsxs("div",{className:"flex items-center justify-between rounded px-3 py-2.5",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[Gm[m.name]?f.jsx("img",{alt:"",className:"size-5 shrink-0",src:Gm[m.name]}):f.jsx("div",{className:"size-5 shrink-0"}),f.jsx("span",{className:"text-foreground text-sm",children:m.name})]}),f.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center",children:y?f.jsx(qr,{className:"text-muted-foreground size-4 animate-spin"}):p?f.jsx(Ra,{className:"text-primary size-4"}):f.jsx(ze,{className:"size-8",onClick:()=>n(m),size:"icon-sm",variant:"outline",children:f.jsx(Aa,{className:"size-4"})})})]},m.id)}),h.length===0&&f.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No agents found"})]})]})]})})}const bd={hook:"Hook",mcp:"MCP",rules:"Rules",skill:"Skill"};function xte(){const{data:e,isLoading:t}=Yee(),{data:n,isLoading:r}=Vee(),i=Gee(),[s,a]=S.useState(!1),[c,u]=S.useState(),h=e?.connectors??[],m=n?.agents??[],p=t||r,y=async(b,w)=>{if(w!==b.connectorType)try{await i.mutateAsync({agentId:b.agent,connectorType:w});const E=Hee(w);lt.success(E?`${b.agent} switched to ${bd[w]}. Restart the agent to apply.`:`${b.agent} switched to ${bd[w]}.`)}catch(E){lt.error(E instanceof Error?E.message:"Failed to switch connector type")}},x=async(b,w)=>{try{await i.mutateAsync({agentId:b,connectorType:w}),lt.success(`${b} connected via ${bd[w]}.`)}catch(E){lt.error(E instanceof Error?E.message:"Failed to install connector")}};return f.jsxs("div",{className:"flex w-full flex-col gap-5",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("h2",{className:"text-foreground text-[0.95rem] font-semibold leading-tight",children:"Connectors"}),f.jsx("p",{className:"text-muted-foreground mt-0.5 text-[0.8125rem] leading-snug",children:"Manage how AI agents connect to ByteRover."})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[p&&f.jsx(qr,{className:"text-muted-foreground size-4 animate-spin"}),f.jsxs(ze,{disabled:p,onClick:()=>a(!0),size:"sm",variant:"outline",children:[f.jsx(Aa,{strokeWidth:3})," Add connector"]})]})]}),f.jsx(yte,{agents:m,connectors:h,onAdd:async b=>{u(b.id);try{await x(b.id,b.defaultConnectorType)}finally{u(void 0)}},onOpenChange:a,open:s,pendingAgentId:c}),p?f.jsx("div",{className:"bg-card border rounded-xl px-6 py-5",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(or,{className:"size-5 shrink-0 rounded-full"}),f.jsx(or,{className:"h-4 flex-1"}),f.jsx(or,{className:"h-8 w-16 shrink-0"})]})}):h.length===0?f.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"No connectors installed. Add one to get started."}):f.jsx("div",{className:"bg-card border rounded-xl px-6 py-5 flex flex-col gap-4",children:h.map((b,w)=>f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[Gm[b.agent]?f.jsx("img",{alt:"",className:"size-5 shrink-0",src:Gm[b.agent]}):f.jsx("div",{className:"size-5 shrink-0"}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{children:b.agent}),f.jsx("span",{className:"text-primary text-xs",children:"Connected"})]})]}),f.jsx("div",{className:"flex items-center",children:f.jsxs(ja,{children:[f.jsxs(Oa,{disabled:i.isPending,render:f.jsx(ze,{className:"text-sm",disabled:i.isPending,size:"sm",variant:"secondary"}),children:[bd[b.connectorType],f.jsx(_f,{className:"size-3.5 shrink-0"})]}),f.jsx(ks,{align:"end",children:b.supportedTypes.map(E=>f.jsx(Vn,{onClick:()=>y(b,E),children:bd[E]},E))})]})})]}),w<h.length-1&&f.jsx("div",{className:"border-b"})]},b.agent))})]})}const vl=()=>{};async function T4(e){const{apiClient:t}=Pe.getState();if(!t)throw new Error("Not connected");try{return(await t.request($n.CONFIG,{key:e})).value}catch(n){if(R8(n)&&n.code===Ir.CONFIG_KEY_NOT_SET)return;throw n}}const bte=async()=>{const[e,t]=await Promise.all([T4("user.name"),T4("user.email")]);return{email:t,name:e}},A9=()=>({queryFn:bte,queryKey:["vc","config"],staleTime:5e3}),vte=({queryConfig:e}={})=>Mn({...A9(),...e}),wte=e=>{const{apiClient:t}=Pe.getState();return t?t.request($n.CONFIG,e):Promise.reject(new Error("Not connected"))},Ste=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:A9().queryKey}),n?.(...i)},...r,mutationFn:wte})},Cte=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Ete(e){const t=e.trim();return t===""?!1:Cte.test(t)}function j9({action:e,children:t,compact:n=!1,description:r,error:i,errorFallback:s="Failed to load",onRetry:a,title:c}){const u=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 f.jsxs("div",{className:"flex w-full flex-col gap-3.5",children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("h2",{className:"text-foreground text-[0.95rem] font-semibold leading-tight",children:c}),f.jsx("p",{className:"text-muted-foreground mt-0.5 text-[0.8125rem] leading-snug",children:r})]}),e]}),i?f.jsxs("p",{className:"text-destructive text-sm",children:["✗ ",kn(i,s),a&&f.jsxs(f.Fragment,{children:[" · ",f.jsx("button",{className:"underline underline-offset-2",onClick:a,type:"button",children:"retry"})]})]}):t&&f.jsx("div",{className:u,children:t})]})}function kte({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 f.jsxs("div",{className:i,children:[f.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:"Identity not configured"}),f.jsx("span",{className:"text-muted-foreground truncate text-xs",children:"Optional — used for commit attribution."})]}),f.jsx(ze,{disabled:e,onClick:n,size:"sm",variant:"secondary",children:"Set manually"})]});const s=r.name??r.email;return f.jsxs("div",{className:i,children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsxs(If,{className:"size-7 shrink-0",children:[f.jsx(I0,{alt:s,src:r.avatarUrl}),f.jsx(Pf,{className:"text-[10px]",children:_0(s)})]}),f.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"text-foreground truncate text-sm font-medium",children:[s," ",f.jsxs("span",{className:"text-muted-foreground font-normal",children:["<",r.email,">"]})]}),f.jsx("span",{className:"text-muted-foreground truncate text-xs",children:"From your ByteRover account — optional, used for commit attribution."})]})]}),f.jsxs("div",{className:"flex shrink-0 gap-1.5",children:[f.jsx(ze,{disabled:e,onClick:n,size:"sm",variant:"ghost",children:"Edit"}),f.jsx(ze,{disabled:e,onClick:t,size:"sm",children:"Apply"})]})]})}function Tte({email:e,name:t,onEdit:n}){return f.jsxs("div",{className:"flex min-h-8 items-center gap-3",children:[f.jsxs("span",{className:"text-foreground min-w-0 flex-1 truncate text-sm",children:[t," ",f.jsxs("span",{className:"text-muted-foreground mono",children:["<",e,">"]})]}),f.jsx(ze,{onClick:n,size:"sm",variant:"ghost",children:"Edit"})]})}function Nte({initial:e,isPending:t,onCancel:n,onSubmit:r}){const i=S.useId(),s=S.useId(),[a,c]=S.useState(e.name),[u,h]=S.useState(e.email),m=a.trim(),p=u.trim(),y=m!==e.name||p!==e.email,x=m.length>0&&p.length>0,b=p.length>0&&!Ete(p),w=b&&y,E=y&&x&&!b&&!t;async function k(N){N.preventDefault(),E&&await r({email:p,name:m})}function T(N){k(N).catch(vl)}return f.jsxs("form",{className:"flex flex-col gap-4",onSubmit:T,children:[f.jsxs(Im,{children:[f.jsx(Pm,{htmlFor:i,children:"Name"}),f.jsx(Ki,{disabled:t,id:i,onChange:N=>c(N.target.value),placeholder:"Your name",value:a})]}),f.jsxs(Im,{"data-invalid":w,children:[f.jsx(Pm,{htmlFor:s,children:"Email"}),f.jsx(Ki,{"aria-invalid":w,disabled:t,id:s,onChange:N=>h(N.target.value),placeholder:"you@example.com",type:"email",value:u}),w&&f.jsx(A8,{children:"Enter a valid email address."})]}),f.jsxs("div",{className:"flex items-center justify-end gap-2",children:[f.jsx(ze,{disabled:t,onClick:n,type:"button",variant:"secondary",children:"Cancel"}),f.jsx(ze,{disabled:!E,type:"submit",children:t?"Saving…":"Save"})]})]})}function Rte(){const{data:e,error:t,isError:n,isLoading:r,refetch:i}=vte(),s=Ste(),a=Ur(b=>b.user),[c,u]=S.useState(!1),h=e?.name??"",m=e?.email??"",p=!!(h&&m);async function y(b){try{b.name&&b.name!==h&&await s.mutateAsync({key:"user.name",value:b.name}),b.email&&b.email!==m&&await s.mutateAsync({key:"user.email",value:b.email}),lt.success("Git identity saved."),u(!1)}catch(w){throw lt.error(kn(w,"Failed to save identity.")),w}}async function x(){if(a)try{await s.mutateAsync({key:"user.name",value:a.name??a.email}),await s.mutateAsync({key:"user.email",value:a.email}),lt.success("Git identity applied from your ByteRover account.")}catch(b){lt.error(kn(b,"Failed to apply identity."))}}return f.jsx(j9,{action:r?f.jsx(qr,{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(vl),title:"Git identity",children:e?c?f.jsx(Nte,{initial:{email:m,name:h},isPending:s.isPending,onCancel:()=>u(!1),onSubmit:y}):p?f.jsx(Tte,{email:m,name:h,onEdit:()=>u(!0)}):f.jsx(kte,{isPending:s.isPending,onApplyAccount:()=>x().catch(vl),onSetManually:()=>u(!0),user:a}):f.jsxs("div",{className:"flex min-h-8 items-center gap-3",children:[f.jsx(or,{className:"h-4 flex-1"}),f.jsx(or,{className:"h-8 w-12"})]})})}const Ate=e=>{const{apiClient:t}=Pe.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($n.REMOTE,n)},jte=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:Hv().queryKey}),n?.(...i)},...r,mutationFn:Ate})},Ote=/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+:[^/].*$/;function O9(e){const t=e.trim();return t===""?"unknown":t.startsWith("https://")?"https":t.startsWith("http://")?"http":t.startsWith("ssh://")?"ssh":t.startsWith("git://")?"git":Ote.test(t)?"ssh":"unknown"}function Mte(e){const t=e.trim();if(t==="")return"URL is required.";const n=O9(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 Dte({action:e,description:t,title:n}){return f.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:[f.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:n}),f.jsx("span",{className:"text-muted-foreground truncate text-xs",children:t})]}),e]})}const ew="origin";function _te({isDeleting:e,onDelete:t,onEdit:n,url:r}){const i=O9(r),s=i==="ssh"||i==="git";return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{className:"flex min-h-8 items-center gap-3",children:[f.jsx("span",{className:"text-foreground w-14 shrink-0 text-sm font-medium",children:ew}),f.jsx("span",{className:"mono text-foreground min-w-0 flex-1 truncate text-sm",children:r}),f.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[f.jsx(ze,{disabled:e,onClick:n,size:"sm",variant:"ghost",children:"Edit"}),f.jsx(ze,{className:"text-destructive hover:text-destructive",disabled:e,onClick:t,size:"sm",variant:"ghost",children:"Delete"})]})]}),s&&f.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 Lte({isPending:e,onConfirm:t,onOpenChange:n,open:r,url:i}){function s(){t().catch(vl)}return f.jsx(Ff,{onOpenChange:n,open:r,children:f.jsxs(Bf,{children:[f.jsxs(Hf,{children:[f.jsxs(qf,{children:["Remove ",f.jsx("span",{className:"mono",children:ew}),"?"]}),f.jsxs(Vf,{children:["Removes ",f.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."]})]}),f.jsxs(Uf,{children:[f.jsx($f,{disabled:e,children:"Cancel"}),f.jsx(ze,{disabled:e,onClick:s,variant:"destructive",children:e?"Removing…":"Remove remote"})]})]})})}function Ite({initial:e,isPending:t,mode:n,onCancel:r,onSubmit:i,placeholder:s,webAppUrl:a}){const c=S.useId(),[u,h]=S.useState(e),[m,p]=S.useState(),y=S.useRef(null),x=u.trim()!==e,b=Mte(u),w=x&&!b&&!t;S.useEffect(()=>{y.current?.focus(),y.current?.select()},[]);async function E(j){if(j.preventDefault(),b){p(b);return}try{await i(u.trim()),p(void 0)}catch(A){p(kn(A,"Failed to save remote"))}}function k(j){E(j).catch(vl)}function T(j){j.key==="Escape"&&(j.preventDefault(),r())}const N=m??(x?b:void 0),O=n==="edit"&&!N&&e!=="";return f.jsxs("form",{className:"flex flex-col gap-4",onSubmit:k,children:[f.jsxs(Im,{"data-invalid":!!N,children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs(Pm,{htmlFor:c,children:[n==="add"?"Adding ":"Editing ",f.jsx("span",{className:"mono text-foreground",children:ew})]}),n==="add"&&a&&f.jsxs(ze,{className:"hidden sm:inline-flex",onClick:()=>window.open(a,"_blank","noopener,noreferrer"),size:"sm",type:"button",variant:"ghost",children:[f.jsx(_m,{className:"size-3.5"}),"Find in ByteRover"]})]}),f.jsx(Ki,{"aria-invalid":!!N,className:"mono",disabled:t,id:c,onChange:j=>{h(j.target.value),m&&p(void 0)},onKeyDown:T,placeholder:s,ref:y,value:u}),N&&f.jsx(A8,{children:N}),!N&&n==="add"&&f.jsx(yx,{children:"Only HTTPS URLs are supported right now."}),O&&f.jsxs(yx,{children:["Replaces current URL ",f.jsx("span",{className:"mono text-foreground",children:e})]})]}),f.jsxs("div",{className:"flex items-center justify-end gap-2",children:[f.jsx(ze,{disabled:t,onClick:r,type:"button",variant:"secondary",children:"Cancel"}),f.jsx(ze,{disabled:!w,type:"submit",children:t?"Saving…":n==="add"?"Add remote":"Replace URL"})]})]})}function Pte(){const{data:e,error:t,isError:n,refetch:r}=RK(),{data:i}=_v(),s=jte(),[a,c]=S.useState(!1),[u,h]=S.useState(!1),m=e?.url,p=e?.gitInitialized,y=!!m,x=p===!0&&!y&&!a,b=`${i?.gitRemoteBaseUrl??"https://example.com"}/team/space.git`;async function w(k){await s.mutateAsync({subcommand:y?"set-url":"add",url:k}),lt.success(y?"Origin replaced.":"Remote added."),c(!1)}async function E(){try{await s.mutateAsync({subcommand:"remove"}),lt.success("Remote removed."),h(!1)}catch(k){lt.error(kn(k,"Failed to remove remote"))}}return f.jsx(j9,{action:x&&f.jsx(ze,{onClick:()=>c(!0),size:"sm",variant:"outline",children:"Add remote"}),compact:!a,description:"Used for push, pull, and fetch.",error:n?t:void 0,errorFallback:"Failed to load remote",onRetry:()=>r().catch(vl),title:"Remotes",children:e?p===!1?f.jsx(Dte,{action:f.jsx(Uv,{}),description:"Initialize version control before adding a remote.",title:"Not initialized"}):a?f.jsx(Ite,{initial:m??"",isPending:s.isPending,mode:y?"edit":"add",onCancel:()=>c(!1),onSubmit:w,placeholder:b,webAppUrl:i?.webAppUrl}):m?f.jsxs(f.Fragment,{children:[f.jsx(_te,{isDeleting:s.isPending&&u,onDelete:()=>h(!0),onEdit:()=>c(!0),url:m}),f.jsx(Lte,{isPending:s.isPending,onConfirm:E,onOpenChange:h,open:u,url:m})]}):f.jsxs("p",{className:"text-muted-foreground text-sm",children:["No remote set. Push and pull need an"," ",f.jsx("code",{className:"mono bg-muted text-foreground rounded px-1 py-0.5 text-xs",children:"origin"})," URL."]}):f.jsxs("div",{className:"flex min-h-8 items-center gap-3",children:[f.jsx(or,{className:"h-4 w-14"}),f.jsx(or,{className:"h-5 w-12 rounded-full"}),f.jsx(or,{className:"h-4 flex-1"}),f.jsx(or,{className:"h-8 w-12"})]})})}function zte(){return f.jsx("div",{className:"flex flex-col items-center pt-8",children:f.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:[f.jsx(Rte,{}),f.jsx(Pte,{}),f.jsx(xte,{})]})})}function Fte(){const[e,t]=S.useState(!0),[n,r]=S.useState(!1),i=S.useCallback(()=>{t(c=>!c)},[]),s=S.useCallback(()=>{r(c=>!c)},[]);return{closeRightPanel:S.useCallback(()=>{r(!1)},[]),isLeftPanelOpen:e,isRightPanelOpen:n,toggleLeftPanel:i,toggleRightPanel:s}}const Bte=e=>{const{apiClient:t}=Pe.getState();return t?t.request(Of.GET_FILE,e):Promise.reject(new Error("Not connected"))},Hte=({branch:e,path:t})=>({queryFn:()=>Bte({branch:e,path:t}),queryKey:["contextTree","file",e,t]}),Ute=({branch:e,path:t,queryConfig:n})=>Mn({...Hte({branch:e,path:t}),enabled:!!t,...n}),qte=e=>{const{apiClient:t}=Pe.getState();return t?t.request(Of.GET_NODES,e):Promise.reject(new Error("Not connected"))},Vte=e=>({queryFn:()=>qte({branch:e}),queryKey:["contextTree","nodes",e]}),$te=({branch:e,queryConfig:t}={})=>Mn({...Vte(e),...t}),Yte=e=>{const{apiClient:t}=Pe.getState();return t?t.request(Of.UPDATE_FILE,e):Promise.reject(new Error("Not connected"))},Wte=({mutationConfig:e}={})=>{const t=tn(),{onSuccess:n,...r}=e??{};return dn({onSuccess(...i){t.invalidateQueries({queryKey:["contextTree"]}),n?.(...i)},...r,mutationFn:Yte})},Wf=e=>e.endsWith(".md"),N4=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&&Wf(i)||t.add(i)}return t},tw=(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=tw(n.children,t);if(r)return r}}},M9=(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&&M9(i.children,t,n+1,r);return r},D9=S.createContext(void 0);function Gte({children:e}){const[t,n]=u0(),r=t.get("branch")??void 0,i=t.get("path")??"",[s,a]=S.useState(()=>N4(i)),[c,u]=S.useState(!1),[h,m]=S.useState(""),{data:p,isFetching:y}=$te({branch:r}),{data:x,isFetching:b}=Ute({branch:r,path:i,queryConfig:{enabled:!!i&&Wf(i)}});S.useEffect(()=>{p?.branch&&!t.has("branch")&&n(V=>{const $=new URLSearchParams(V);return $.set("branch",p.branch),$},{replace:!0})},[p?.branch,t,n]);const w=S.useMemo(()=>p?.nodes??[],[p]),E=S.useMemo(()=>i?tw(w,i):void 0,[w,i]),k=S.useMemo(()=>M9(w,s),[w,s]),T=x?.file,N=S.useCallback(V=>{const $=N4(V);a(U=>new Set([...$,...U]))},[]),O=S.useCallback(V=>{a($=>{const U=new Set($);return U.has(V.path)?U.delete(V.path):U.add(V.path),U})},[]),j=S.useCallback(V=>{N(V.path),n($=>{const U=new URLSearchParams($);return U.set("path",V.path),U},{replace:!0}),u(!1),m("")},[N,n]),A=S.useCallback(()=>{n(V=>{const $=new URLSearchParams(V);return $.delete("path"),$},{replace:!0}),u(!1),m("")},[n]),R=Wte(),_=S.useCallback(()=>{T&&(m(T.content),u(!0))},[T]),F=S.useCallback(()=>{u(!1),m("")},[]),I=S.useCallback(async()=>{!i||!c||(await R.mutateAsync({content:h,path:i}),u(!1))},[h,c,i,R]),H=c&&T!==void 0&&h!==T.content,q={branch:p?.branch??r,cancelEdit:F,editContent:h,enterEditMode:_,expandedPaths:s,fileData:T,flattenedNodes:k,handleSelect:j,handleToggle:O,hasChanges:H,isEditMode:c,isFetchingFile:b,isFetchingTree:y,isUpdating:R.isPending,navigateHome:A,nodes:w,saveChanges:I,selectedNode:E,selectedPath:i,setEditContent:m};return f.jsx(D9.Provider,{value:q,children:e})}function du(){const e=S.useContext(D9);if(!e)throw new Error("useContextTree must be used within a ContextTreeProvider");return e}function Kte({name:e,avatar:t,description:n,timestamp:r,className:i}){return f.jsx("div",{className:se("border-border flex items-center justify-between border-b py-2",i),children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs(If,{className:"size-6",children:[t&&f.jsx(I0,{src:t,alt:e}),f.jsx(Pf,{className:"text-sm font-semibold",children:e[0]||"U"})]}),n&&f.jsx("div",{className:"text-muted-foreground text-sm",children:n}),r&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-muted-foreground font-semibold",children:"·"}),f.jsx("div",{className:"text-muted-foreground text-sm font-semibold",children:r})]})]})})}const Qte=E0("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 Mx({className:e,variant:t="default",size:n="default",closable:r=!1,onClose:i,disabled:s=!1,children:a,...c}){const u=S.useCallback(m=>{m.stopPropagation(),s||i?.()},[s,i]),h=S.useCallback(m=>{(m.key==="Enter"||m.key===" ")&&(m.stopPropagation(),m.preventDefault(),s||i?.())},[s,i]);return f.jsxs("span",{"data-slot":"tag","data-disabled":s||void 0,className:se(Qte({variant:t,size:n}),s&&"pointer-events-none opacity-50",r&&"pr-1",e),...c,children:[f.jsx("span",{className:"truncate",children:a}),r&&f.jsx("button",{type:"button","aria-label":"Remove tag",disabled:s,onClick:u,onKeyDown:h,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:f.jsx(o0,{className:"size-3"})})]})}function Xte({fileName:e,content:t,tags:n=[],isLoading:r,error:i,isEditMode:s,editContent:a,editTags:c=[],onContentChange:u,onTagsChange:h,isUpdating:m,hasChanges:p,canEdit:y,onEnterEditMode:x,onSaveChanges:b,onCancelEdit:w,headerClassName:E,isHistoryVisible:k,onToggleHistory:T,showTags:N=!0,timeline:O,contentView:j}){return r?f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(Gd,{className:"size-4 animate-spin"})}):i?f.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[f.jsx("div",{className:"text-sm text-red-400",children:"Failed to load file content"}),f.jsx("div",{className:"text-sm text-gray-500",children:i})]}):!t&&!s?f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx("div",{className:"text-sm text-gray-500",children:"No content available"})}):s?f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-5",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-foreground text-lg font-semibold",children:e}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(ze,{size:"default",onClick:w,disabled:m,className:"bg-secondary text-secondary-foreground gap-2 px-4 py-2 text-sm hover:bg-neutral-800",children:"Cancel"}),f.jsx(ze,{variant:"default",size:"default",onClick:b,disabled:m||!p,className:"text-foreground gap-2 px-4 py-2 text-sm",children:m?f.jsxs(f.Fragment,{children:[f.jsx(Gd,{className:"size-4 animate-spin"}),"Saving..."]}):"Save"})]})]}),h&&f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:"Tags"}),f.jsxs("div",{className:"bg-background flex flex-wrap items-center gap-2 rounded-lg px-5 py-2 border",children:[c.map(A=>f.jsx(Mx,{variant:"outline",closable:!0,onClose:()=>h(c.filter(R=>R!==A)),className:"text-foreground bg-secondary rounded-sm border-none",children:A},A)),f.jsx("input",{type:"text",placeholder:"Add tag...",disabled:m,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 R=A.currentTarget.value.trim();R&&!c.includes(R)&&(h([...c,R]),A.currentTarget.value="")}}})]})]}),f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[f.jsx("span",{className:"text-foreground text-sm font-medium",children:"Context detail"}),f.jsx(qv,{value:a,onChange:A=>u(A.target.value),disabled:m,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..."})]})]}):f.jsxs("div",{className:"mx-auto flex min-h-0 w-full flex-1 flex-col",children:[f.jsxs("div",{className:se("flex items-center justify-between p-5",E),children:[f.jsx("span",{className:"text-foreground text-lg font-semibold",children:e}),f.jsxs(ja,{children:[f.jsx(Oa,{render:f.jsx(ze,{size:"icon",className:"border-border bg-background hover:bg-muted"}),children:f.jsx(E_,{className:"h-5 w-5"})}),f.jsxs(ks,{align:"end",className:"bg-popover w-32 border-none p-1",children:[y&&f.jsxs(Vn,{className:"bg-popover",onClick:x,children:[f.jsx(P_,{className:"mr-2 h-4 w-4"}),"Edit"]}),f.jsxs(Vn,{className:"bg-popover",onClick:T,children:[f.jsx(j_,{className:"mr-2 h-5 w-5"}),"History"]})]})]})]}),O,N&&n.length>0&&f.jsx("div",{className:"mb-7 flex flex-wrap gap-1.5",children:n.map(A=>f.jsx(Mx,{variant:"default",size:"sm",className:"text-muted-foreground bg-muted rounded-sm border-none",children:A},A))}),f.jsx("div",{className:"overflow-y-auto p-5 pt-0",children:j})]})}function Km({text:e,className:t,delay:n=500}){const r=S.useRef(null),[i,s]=S.useState(!1);S.useEffect(()=>{const c=r.current;c&&s(c.scrollWidth>c.clientWidth)},[e]);const a=se("overflow-hidden text-ellipsis whitespace-nowrap",t);return i?f.jsx(Qb,{delay:n,children:f.jsxs(ms,{children:[f.jsx(gs,{render:f.jsx("span",{ref:r,className:a}),children:e}),f.jsx($i,{className:"[&>[aria-hidden]]:hidden bg-popover text-foreground",children:f.jsx("p",{children:e})})]})}):f.jsx("span",{ref:r,className:a,children:e})}function _9({className:e,...t}){return f.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border",children:f.jsx("table",{"data-slot":"table",className:se("w-full caption-bottom text-sm",e),...t})})}function L9({className:e,...t}){return f.jsx("thead",{"data-slot":"table-header",className:se("[&_tr]:border-b bg-card",e),...t})}function I9({className:e,...t}){return f.jsx("tbody",{"data-slot":"table-body",className:se("[&_tr:last-child]:border-0",e),...t})}function Pc({className:e,...t}){return f.jsx("tr",{"data-slot":"table-row",className:se("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function Fi({className:e,...t}){return f.jsx("th",{"data-slot":"table-head",className:se("h-10 text-left align-middle font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0 px-5",e),...t})}function Nr({className:e,...t}){return f.jsx("td",{"data-slot":"table-cell",className:se("px-5 py-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 h-12.5",e),...t})}function Zte({nodes:e,showBack:t,onNodeClick:n,onBack:r}){return f.jsxs(_9,{className:"overflow-hidden",children:[f.jsx(L9,{className:"bg-popover",children:f.jsxs(Pc,{className:"h-11",children:[f.jsx(Fi,{className:"text-muted-foreground bg-border border-border px-6 text-sm",children:"Memory"}),f.jsx(Fi,{className:"text-muted-foreground border-border bg-border px-6 text-sm",children:"Updated by"}),f.jsx(Fi,{className:"text-muted-foreground border-border bg-border px-6 text-sm",children:"Last Modified"})]})}),f.jsxs(I9,{children:[t&&r&&f.jsxs(Pc,{className:"h-13 cursor-pointer bg-transparent text-sm",onClick:r,children:[f.jsx(Nr,{className:se("text-foreground px-6 hover:underline",{"border-border border-b":e.length>0}),children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Dy,{className:"text-muted-foreground size-4 shrink-0",strokeWidth:2}),f.jsx(Km,{text:".."})]})}),f.jsx(Nr,{className:se("px-6 text-muted-foreground",{"border-border border-b":e.length>0})}),f.jsx(Nr,{className:se("px-6 text-muted-foreground",{"border-border border-b":e.length>0})})]}),e.map((i,s)=>{const a=s===e.length-1;return f.jsxs(Pc,{className:"h-13 cursor-pointer bg-transparent text-sm",onClick:()=>n(i),children:[f.jsx(Nr,{className:se("text-foreground px-6 hover:underline",{"border-border border-b":!a}),children:f.jsxs("div",{className:"flex items-center gap-2",children:[i.type==="tree"?f.jsx(Dy,{className:"text-muted-foreground size-4 shrink-0",strokeWidth:2}):f.jsx(b6,{className:"text-primary size-4 shrink-0",strokeWidth:2}),f.jsx(Km,{text:i.name})]})}),f.jsx(Nr,{className:se("text-muted-foreground px-6",{"border-border border-b":!a}),children:i.type==="blob"&&i.lastUpdatedBy?i.lastUpdatedBy:"-"}),f.jsx(Nr,{className:se("text-muted-foreground px-6",{"border-border border-b":!a}),children:i.type==="blob"&&i.lastUpdatedWhen?i.lastUpdatedWhen:"-"})]},i.path)})]})]})}const P9=6048e5,Jte=864e5,Ip=43200,R4=1440,A4=Symbol.for("constructDateFrom");function Kn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&A4 in e?e[A4](t):e instanceof Date?new e.constructor(t):new Date(t)}function en(e,t){return Kn(t||e,e)}function z9(e,t,n){const r=en(e,n?.in);return isNaN(t)?Kn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function F9(e,t,n){const r=en(e,n?.in);if(isNaN(t))return Kn(e,NaN);if(!t)return r;const i=r.getDate(),s=Kn(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return i>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}let ene={};function fu(){return ene}function Qc(e,t){const n=fu(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=en(e,t?.in),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function hf(e,t){return Qc(e,{...t,weekStartsOn:1})}function B9(e,t){const n=en(e,t?.in),r=n.getFullYear(),i=Kn(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=hf(i),a=Kn(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const c=hf(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Qm(e){const t=en(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 Da(e,...t){const n=Kn.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function Xc(e,t){const n=en(e,t?.in);return n.setHours(0,0,0,0),n}function nw(e,t,n){const[r,i]=Da(n?.in,e,t),s=Xc(r),a=Xc(i),c=+s-Qm(s),u=+a-Qm(a);return Math.round((c-u)/Jte)}function tne(e,t){const n=B9(e,t),r=Kn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),hf(r)}function nne(e,t,n){return z9(e,t*7,n)}function rne(e,t,n){return F9(e,t*12,n)}function ine(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Kn.bind(null,i));const s=en(i,r);(!n||n<s||isNaN(+s))&&(n=s)}),Kn(r,n||NaN)}function one(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Kn.bind(null,i));const s=en(i,r);(!n||n>s||isNaN(+s))&&(n=s)}),Kn(r,n||NaN)}function hm(e,t){const n=+en(e)-+en(t);return n<0?-1:n>0?1:n}function sne(e){return Kn(e,Date.now())}function ane(e,t,n){const[r,i]=Da(n?.in,e,t);return+Xc(r)==+Xc(i)}function H9(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function lne(e){return!(!H9(e)&&typeof e!="number"||isNaN(+en(e)))}function rw(e,t,n){const[r,i]=Da(n?.in,e,t),s=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return s*12+a}function cne(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function une(e,t){return+en(e)-+en(t)}function U9(e,t){const n=en(e,t?.in);return n.setHours(23,59,59,999),n}function q9(e,t){const n=en(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function dne(e,t){const n=en(e,t?.in);return+U9(n,t)==+q9(n,t)}function fne(e,t,n){const[r,i,s]=Da(n?.in,e,e,t),a=hm(i,s),c=Math.abs(rw(i,s));if(c<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*c);let u=hm(i,s)===-a;dne(r)&&c===1&&hm(r,s)===1&&(u=!1);const h=a*(c-+u);return h===0?0:h}function hne(e,t,n){const r=une(e,t)/1e3;return cne(n?.roundingMethod)(r)}function V9(e,t){const[n,r]=Da(e,t.start,t.end);return{start:n,end:r}}function pne(e,t){const{start:n,end:r}=V9(t?.in,e);let i=+n>+r;const s=i?+n:+r,a=i?r:n;a.setHours(0,0,0,0),a.setDate(1);let c=1;const u=[];for(;+a<=s;)u.push(Kn(n,a)),a.setMonth(a.getMonth()+c);return i?u.reverse():u}function mne(e,t){const n=en(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function gne(e,t){const n=en(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function $9(e,t){const n=en(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function yne(e,t){const{start:n,end:r}=V9(t?.in,e);let i=+n>+r;const s=i?+n:+r,a=i?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let c=1;const u=[];for(;+a<=s;)u.push(Kn(n,a)),a.setFullYear(a.getFullYear()+c);return i?u.reverse():u}function Y9(e,t){const n=fu(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=en(e,t?.in),s=i.getDay(),a=(s<r?-7:0)+6-(s-r);return i.setDate(i.getDate()+a),i.setHours(23,59,59,999),i}function xne(e,t){return Y9(e,{...t,weekStartsOn:1})}const bne={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"}},vne=(e,t,n)=>{let r;const i=bne[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 ty(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const wne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Sne={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Cne={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ene={date:ty({formats:wne,defaultWidth:"full"}),time:ty({formats:Sne,defaultWidth:"full"}),dateTime:ty({formats:Cne,defaultWidth:"full"})},kne={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tne=(e,t,n,r)=>kne[e];function vd(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):a;i=e.formattingValues[c]||e.formattingValues[a]}else{const a=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const Nne={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rne={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ane={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"]},jne={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"]},One={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"}},Mne={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"}},Dne=(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"},_ne={ordinalNumber:Dne,era:vd({values:Nne,defaultWidth:"wide"}),quarter:vd({values:Rne,defaultWidth:"wide",argumentCallback:e=>e-1}),month:vd({values:Ane,defaultWidth:"wide"}),day:vd({values:jne,defaultWidth:"wide"}),dayPeriod:vd({values:One,defaultWidth:"wide",formattingValues:Mne,defaultFormattingWidth:"wide"})};function wd(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?Ine(c,p=>p.test(a)):Lne(c,p=>p.test(a));let h;h=e.valueCallback?e.valueCallback(u):u,h=n.valueCallback?n.valueCallback(h):h;const m=t.slice(a.length);return{value:h,rest:m}}}function Lne(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ine(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Pne(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const c=t.slice(i.length);return{value:a,rest:c}}}const zne=/^(\d+)(th|st|nd|rd)?/i,Fne=/\d+/i,Bne={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},Hne={any:[/^b/i,/^(a|c)/i]},Une={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qne={any:[/1/i,/2/i,/3/i,/4/i]},Vne={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},$ne={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]},Yne={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},Wne={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]},Gne={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},Kne={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}},Qne={ordinalNumber:Pne({matchPattern:zne,parsePattern:Fne,valueCallback:e=>parseInt(e,10)}),era:wd({matchPatterns:Bne,defaultMatchWidth:"wide",parsePatterns:Hne,defaultParseWidth:"any"}),quarter:wd({matchPatterns:Une,defaultMatchWidth:"wide",parsePatterns:qne,defaultParseWidth:"any",valueCallback:e=>e+1}),month:wd({matchPatterns:Vne,defaultMatchWidth:"wide",parsePatterns:$ne,defaultParseWidth:"any"}),day:wd({matchPatterns:Yne,defaultMatchWidth:"wide",parsePatterns:Wne,defaultParseWidth:"any"}),dayPeriod:wd({matchPatterns:Gne,defaultMatchWidth:"any",parsePatterns:Kne,defaultParseWidth:"any"})},ol={code:"en-US",formatDistance:vne,formatLong:Ene,formatRelative:Tne,localize:_ne,match:Qne,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xne(e,t){const n=en(e,t?.in);return nw(n,$9(n))+1}function iw(e,t){const n=en(e,t?.in),r=+hf(n)-+tne(n);return Math.round(r/P9)+1}function W9(e,t){const n=en(e,t?.in),r=n.getFullYear(),i=fu(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Kn(t?.in||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const c=Qc(a,t),u=Kn(t?.in||e,0);u.setFullYear(r,0,s),u.setHours(0,0,0,0);const h=Qc(u,t);return+n>=+c?r+1:+n>=+h?r:r-1}function Zne(e,t){const n=fu(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=W9(e,t),s=Kn(t?.in||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Qc(s,t)}function ow(e,t){const n=en(e,t?.in),r=+Qc(n,t)-+Zne(n,t);return Math.round(r/P9)+1}function mn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Js={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return mn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):mn(n+1,2)},d(e,t){return mn(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 mn(e.getHours()%12||12,t.length)},H(e,t){return mn(e.getHours(),t.length)},m(e,t){return mn(e.getMinutes(),t.length)},s(e,t){return mn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return mn(i,t.length)}},mc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},j4={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 Js.y(e,t)},Y:function(e,t,n,r){const i=W9(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return mn(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):mn(s,t.length)},R:function(e,t){const n=B9(e);return mn(n,t.length)},u:function(e,t){const n=e.getFullYear();return mn(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 mn(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 mn(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 Js.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 mn(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=ow(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):mn(i,t.length)},I:function(e,t,n){const r=iw(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):mn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Js.d(e,t)},D:function(e,t,n){const r=Xne(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):mn(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(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return mn(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return mn(s,t.length);case"co":return n.ordinalNumber(s,{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 mn(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=mc.noon:r===0?i=mc.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=mc.evening:r>=12?i=mc.afternoon:r>=4?i=mc.morning:i=mc.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 Js.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Js.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):mn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):mn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Js.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Js.s(e,t)},S:function(e,t){return Js.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return M4(r);case"XXXX":case"XX":return il(r);default:return il(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return M4(r);case"xxxx":case"xx":return il(r);default:return il(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+O4(r,":");default:return"GMT"+il(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+O4(r,":");default:return"GMT"+il(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return mn(r,t.length)},T:function(e,t,n){return mn(+e,t.length)}};function O4(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+mn(s,2)}function M4(e,t){return e%60===0?(e>0?"-":"+")+mn(Math.abs(e)/60,2):il(e,t)}function il(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=mn(Math.trunc(r/60),2),s=mn(r%60,2);return n+i+t+s}const D4=(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"})}},G9=(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"})}},Jne=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return D4(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",D4(r,t)).replace("{{time}}",G9(i,t))},ere={p:G9,P:Jne},tre=/^D+$/,nre=/^Y+$/,rre=["D","DD","YY","YYYY"];function ire(e){return tre.test(e)}function ore(e){return nre.test(e)}function sre(e,t,n){const r=are(e,t,n);if(console.warn(r),rre.includes(e))throw new RangeError(r)}function are(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 lre=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,cre=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ure=/^'([^]*?)'?$/,dre=/''/g,fre=/[a-zA-Z]/;function dl(e,t,n){const r=fu(),i=n?.locale??r.locale??ol,s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=en(e,n?.in);if(!lne(c))throw new RangeError("Invalid time value");let u=t.match(cre).map(m=>{const p=m[0];if(p==="p"||p==="P"){const y=ere[p];return y(m,i.formatLong)}return m}).join("").match(lre).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const p=m[0];if(p==="'")return{isToken:!1,value:hre(m)};if(j4[p])return{isToken:!0,value:m};if(p.match(fre))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(u=i.localize.preprocessor(c,u));const h={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return u.map(m=>{if(!m.isToken)return m.value;const p=m.value;(!n?.useAdditionalWeekYearTokens&&ore(p)||!n?.useAdditionalDayOfYearTokens&&ire(p))&&sre(p,t,String(e));const y=j4[p[0]];return y(c,p,i.localize,h)}).join("")}function hre(e){const t=e.match(ure);return t?t[1].replace(dre,"'"):e}function pre(e,t,n){const r=fu(),i=n?.locale??r.locale??ol,s=2520,a=hm(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[u,h]=Da(n?.in,...a>0?[t,e]:[e,t]),m=hne(h,u),p=(Qm(h)-Qm(u))/1e3,y=Math.round((m-p)/60);let x;if(y<2)return n?.includeSeconds?m<5?i.formatDistance("lessThanXSeconds",5,c):m<10?i.formatDistance("lessThanXSeconds",10,c):m<20?i.formatDistance("lessThanXSeconds",20,c):m<40?i.formatDistance("halfAMinute",0,c):m<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<R4){const b=Math.round(y/60);return i.formatDistance("aboutXHours",b,c)}else{if(y<s)return i.formatDistance("xDays",1,c);if(y<Ip){const b=Math.round(y/R4);return i.formatDistance("xDays",b,c)}else if(y<Ip*2)return x=Math.round(y/Ip),i.formatDistance("aboutXMonths",x,c)}if(x=fne(h,u),x<12){const b=Math.round(y/Ip);return i.formatDistance("xMonths",b,c)}else{const b=x%12,w=Math.trunc(x/12);return b<3?i.formatDistance("aboutXYears",w,c):b<9?i.formatDistance("overXYears",w,c):i.formatDistance("almostXYears",w+1,c)}}function _4(e,t){return pre(e,sne(e),t)}function mre(e,t){const n=en(e,t?.in),r=n.getFullYear(),i=n.getMonth(),s=Kn(n,0);return s.setFullYear(r,i+1,0),s.setHours(0,0,0,0),s.getDate()}function gre(e,t){return en(e,t?.in).getMonth()}function yre(e,t){return en(e,t?.in).getFullYear()}function xre(e,t){return+en(e)>+en(t)}function bre(e,t){return+en(e)<+en(t)}function vre(e,t,n){const[r,i]=Da(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function wre(e,t,n){const[r,i]=Da(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function Sre(e,t,n){const r=en(e,n?.in),i=r.getFullYear(),s=r.getDate(),a=Kn(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const c=mre(a);return r.setMonth(t,Math.min(s,c)),r}function Cre(e,t,n){const r=en(e,n?.in);return isNaN(+r)?Kn(e,NaN):(r.setFullYear(t),r)}const Ere=e=>{const{apiClient:t}=Pe.getState();return t?t.request(Of.GET_FILE_METADATA,e):Promise.reject(new Error("Not connected"))},kre=e=>({queryFn:()=>Ere({paths:e}),queryKey:["contextTree","fileMetadata",...[...e].sort()]}),Tre=({enabled:e=!0,paths:t,queryConfig:n})=>Mn({...kre(t),enabled:e&&t.length>0,...n}),Nre=e=>{const{apiClient:t}=Pe.getState();return t?t.request(Of.GET_HISTORY,e):Promise.reject(new Error("Not connected"))},K9=({enabled:e=!0,path:t})=>SU({enabled:e&&!!t,getNextPageParam:n=>n.hasMore?n.nextCursor:void 0,initialPageParam:void 0,queryFn:({pageParam:n})=>Nre({cursor:n,path:t}),queryKey:["contextTree","history",t]});function Rre({className:e,...t}){return f.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:se(e),...t})}function Are({className:e,...t}){return f.jsx("ol",{"data-slot":"breadcrumb-list",className:se("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5",e),...t})}function ny({className:e,...t}){return f.jsx("li",{"data-slot":"breadcrumb-item",className:se("inline-flex items-center gap-1.5",e),...t})}function L4({className:e,render:t,...n}){return QR({defaultTagName:"a",props:Oo({className:se("transition-colors hover:text-foreground",e)},n),render:t,state:{slot:"breadcrumb-link"}})}function jre({className:e,...t}){return f.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:se("font-normal text-foreground",e),...t})}function I4({children:e,className:t,...n}){return f.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:se("[&>svg]:size-3.5",t),...n,children:e??f.jsx(i0,{})})}function Ore({className:e,...t}){return f.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:se("flex size-5 items-center justify-center [&>svg]:size-4",e),...t,children:[f.jsx(T_,{}),f.jsx("span",{className:"sr-only",children:"More"})]})}const Mre=3;function ry({type:e}){return e==="tree"?f.jsx(PA,{className:"text-secondary-foreground h-4 w-4.5",strokeWidth:2}):f.jsx(A0,{className:"text-primary-foreground size-4",strokeWidth:2})}function P4(){const{handleSelect:e,navigateHome:t,nodes:n,selectedPath:r}=du(),i=S.useMemo(()=>{if(!r)return[];const u=r.split("/").filter(Boolean);return u.map((h,m)=>{const p=u.slice(0,m+1).join("/");return tw(n,p)}).filter(h=>h!==void 0)},[r,n]),s=i.length>Mre,a=s?i.slice(0,-2):[],c=s?i.slice(-2):i;return f.jsx(Rre,{className:"min-w-0 text-sm font-medium",children:f.jsxs(Are,{className:"h-8 flex-nowrap gap-1 whitespace-nowrap sm:gap-1",children:[f.jsx(ny,{children:f.jsx(L4,{className:"cursor-pointer rounded px-1 hover:bg-neutral-800",onClick:t,children:f.jsx(zA,{className:"text-secondary-foreground size-4"})})}),s&&f.jsxs(f.Fragment,{children:[f.jsx(I4,{className:"text-muted-foreground text-sm font-medium",children:"/"}),f.jsx(ny,{children:f.jsxs(ja,{children:[f.jsx(Oa,{className:"flex h-5 cursor-pointer items-center rounded-sm outline-none hover:bg-neutral-800 focus-visible:outline-none",children:f.jsx(Ore,{className:"text-foreground"})}),f.jsx(ks,{align:"start",children:a.map(u=>f.jsxs(Vn,{className:"flex cursor-pointer items-center gap-2 hover:bg-neutral-800",onClick:()=>e(u),children:[f.jsx(ry,{type:u.type}),f.jsx("span",{children:u.name})]},u.path))})]})})]}),c.map((u,h)=>{const m=h===c.length-1;return f.jsxs(S.Fragment,{children:[f.jsx(I4,{className:"text-muted-foreground text-sm font-medium",children:"/"}),f.jsx(ny,{children:m?f.jsxs(jre,{className:"text-secondary-foreground flex items-center gap-2 px-2 text-sm font-medium",children:[f.jsx(ry,{type:u.type}),f.jsx("span",{children:u.name})]}):f.jsxs(L4,{className:"text-muted-foreground flex cursor-pointer items-center gap-2 rounded px-2 text-sm font-medium hover:bg-neutral-800",onClick:()=>e(u),children:[f.jsx(ry,{type:u.type}),f.jsx("span",{children:u.name})]})})]},u.path)})]})})}function z4(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function Dre(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _re=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ire={};function F4(e,t){return(Ire.jsx?Lre:_re).test(e)}const Pre=/[ \t\n\f\r]/g;function zre(e){return typeof e=="object"?e.type==="text"?B4(e.value):!1:B4(e)}function B4(e){return e.replace(Pre,"")===""}class Gf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Gf.prototype.normal={};Gf.prototype.property={};Gf.prototype.space=void 0;function Q9(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Gf(n,r,t)}function pf(e){return e.toLowerCase()}class si{constructor(t,n){this.attribute=n,this.property=t}}si.prototype.attribute="";si.prototype.booleanish=!1;si.prototype.boolean=!1;si.prototype.commaOrSpaceSeparated=!1;si.prototype.commaSeparated=!1;si.prototype.defined=!1;si.prototype.mustUseProperty=!1;si.prototype.number=!1;si.prototype.overloadedBoolean=!1;si.prototype.property="";si.prototype.spaceSeparated=!1;si.prototype.space=void 0;let Fre=0;const Dt=Ol(),tr=Ol(),Dx=Ol(),Be=Ol(),En=Ol(),zc=Ol(),mi=Ol();function Ol(){return 2**++Fre}const _x=Object.freeze(Object.defineProperty({__proto__:null,boolean:Dt,booleanish:tr,commaOrSpaceSeparated:mi,commaSeparated:zc,number:Be,overloadedBoolean:Dx,spaceSeparated:En},Symbol.toStringTag,{value:"Module"})),iy=Object.keys(_x);class sw extends si{constructor(t,n,r,i){let s=-1;if(super(t,n),H4(this,"space",i),typeof r=="number")for(;++s<iy.length;){const a=iy[s];H4(this,iy[s],(r&_x[a])===_x[a])}}}sw.prototype.defined=!0;function H4(e,t,n){n&&(e[t]=n)}function hu(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new sw(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[pf(r)]=r,n[pf(s.attribute)]=r}return new Gf(t,n,e.space)}const X9=hu({properties:{ariaActiveDescendant:null,ariaAtomic:tr,ariaAutoComplete:null,ariaBusy:tr,ariaChecked:tr,ariaColCount:Be,ariaColIndex:Be,ariaColSpan:Be,ariaControls:En,ariaCurrent:null,ariaDescribedBy:En,ariaDetails:null,ariaDisabled:tr,ariaDropEffect:En,ariaErrorMessage:null,ariaExpanded:tr,ariaFlowTo:En,ariaGrabbed:tr,ariaHasPopup:null,ariaHidden:tr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:En,ariaLevel:Be,ariaLive:null,ariaModal:tr,ariaMultiLine:tr,ariaMultiSelectable:tr,ariaOrientation:null,ariaOwns:En,ariaPlaceholder:null,ariaPosInSet:Be,ariaPressed:tr,ariaReadOnly:tr,ariaRelevant:null,ariaRequired:tr,ariaRoleDescription:En,ariaRowCount:Be,ariaRowIndex:Be,ariaRowSpan:Be,ariaSelected:tr,ariaSetSize:Be,ariaSort:null,ariaValueMax:Be,ariaValueMin:Be,ariaValueNow:Be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Z9(e,t){return t in e?e[t]:t}function J9(e,t){return Z9(e,t.toLowerCase())}const Bre=hu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zc,acceptCharset:En,accessKey:En,action:null,allow:null,allowFullScreen:Dt,allowPaymentRequest:Dt,allowUserMedia:Dt,alt:null,as:null,async:Dt,autoCapitalize:null,autoComplete:En,autoFocus:Dt,autoPlay:Dt,blocking:En,capture:null,charSet:null,checked:Dt,cite:null,className:En,cols:Be,colSpan:null,content:null,contentEditable:tr,controls:Dt,controlsList:En,coords:Be|zc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Dt,defer:Dt,dir:null,dirName:null,disabled:Dt,download:Dx,draggable:tr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Dt,formTarget:null,headers:En,height:Be,hidden:Dx,high:Be,href:null,hrefLang:null,htmlFor:En,httpEquiv:En,id:null,imageSizes:null,imageSrcSet:null,inert:Dt,inputMode:null,integrity:null,is:null,isMap:Dt,itemId:null,itemProp:En,itemRef:En,itemScope:Dt,itemType:En,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Dt,low:Be,manifest:null,max:null,maxLength:Be,media:null,method:null,min:null,minLength:Be,multiple:Dt,muted:Dt,name:null,nonce:null,noModule:Dt,noValidate:Dt,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:Dt,optimum:Be,pattern:null,ping:En,placeholder:null,playsInline:Dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Dt,referrerPolicy:null,rel:En,required:Dt,reversed:Dt,rows:Be,rowSpan:Be,sandbox:En,scope:null,scoped:Dt,seamless:Dt,selected:Dt,shadowRootClonable:Dt,shadowRootDelegatesFocus:Dt,shadowRootMode:null,shape:null,size:Be,sizes:null,slot:null,span:Be,spellCheck:tr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Be,step:null,style:null,tabIndex:Be,target:null,title:null,translate:null,type:null,typeMustMatch:Dt,useMap:null,value:tr,width:Be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:En,axis:null,background:null,bgColor:null,border:Be,borderColor:null,bottomMargin:Be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Dt,declare:Dt,event:null,face:null,frame:null,frameBorder:null,hSpace:Be,leftMargin:Be,link:null,longDesc:null,lowSrc:null,marginHeight:Be,marginWidth:Be,noResize:Dt,noHref:Dt,noShade:Dt,noWrap:Dt,object:null,profile:null,prompt:null,rev:null,rightMargin:Be,rules:null,scheme:null,scrolling:tr,standby:null,summary:null,text:null,topMargin:Be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Dt,disableRemotePlayback:Dt,prefix:null,property:null,results:Be,security:null,unselectable:null},space:"html",transform:J9}),Hre=hu({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:mi,accentHeight:Be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Be,amplitude:Be,arabicForm:null,ascent:Be,attributeName:null,attributeType:null,azimuth:Be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Be,by:null,calcMode:null,capHeight:Be,className:En,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:Be,diffuseConstant:Be,direction:null,display:null,dur:null,divisor:Be,dominantBaseline:null,download:Dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Be,enableBackground:null,end:null,event:null,exponent:Be,externalResourcesRequired:null,fill:null,fillOpacity:Be,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:zc,g2:zc,glyphName:zc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Be,horizOriginX:Be,horizOriginY:Be,id:null,ideographic:Be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Be,k:Be,k1:Be,k2:Be,k3:Be,k4:Be,kernelMatrix:mi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Be,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:Be,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:Be,overlineThickness:Be,paintOrder:null,panose1:null,path:null,pathLength:Be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:En,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Be,pointsAtY:Be,pointsAtZ:Be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mi,rev:mi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mi,requiredFeatures:mi,requiredFonts:mi,requiredFormats:mi,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:Be,specularExponent:Be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Be,strikethroughThickness:Be,string:null,stroke:null,strokeDashArray:mi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Be,strokeOpacity:Be,strokeWidth:null,style:null,surfaceScale:Be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mi,tabIndex:Be,tableValues:null,target:null,targetX:Be,targetY:Be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Be,underlineThickness:Be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Be,values:null,vAlphabetic:Be,vMathematical:Be,vectorEffect:null,vHanging:Be,vIdeographic:Be,version:null,vertAdvY:Be,vertOriginX:Be,vertOriginY:Be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Z9}),ej=hu({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()}}),tj=hu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:J9}),nj=hu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ure={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"},qre=/[A-Z]/g,U4=/-[a-z]/g,Vre=/^data[-\w.:]+$/i;function rj(e,t){const n=pf(t);let r=t,i=si;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Vre.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(U4,Yre);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!U4.test(s)){let a=s.replace(qre,$re);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=sw}return new i(r,t)}function $re(e){return"-"+e.toLowerCase()}function Yre(e){return e.charAt(1).toUpperCase()}const ij=Q9([X9,Bre,ej,tj,nj],"html"),$0=Q9([X9,Hre,ej,tj,nj],"svg");function q4(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Wre(e){return e.join(" ").trim()}var gc={},oy,V4;function Gre(){if(V4)return oy;V4=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,u=`
88
+ `,h="/",m="*",p="",y="comment",x="declaration";function b(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var T=1,N=1;function O($){var U=$.match(t);U&&(T+=U.length);var P=$.lastIndexOf(u);N=~P?$.length-P:N+$.length}function j(){var $={line:T,column:N};return function(U){return U.position=new A($),F(),U}}function A($){this.start=$,this.end={line:T,column:N},this.source=k.source}A.prototype.content=E;function R($){var U=new Error(k.source+":"+T+":"+N+": "+$);if(U.reason=$,U.filename=k.source,U.line=T,U.column=N,U.source=E,!k.silent)throw U}function _($){var U=$.exec(E);if(U){var P=U[0];return O(P),E=E.slice(P.length),U}}function F(){_(n)}function I($){var U;for($=$||[];U=H();)U!==!1&&$.push(U);return $}function H(){var $=j();if(!(h!=E.charAt(0)||m!=E.charAt(1))){for(var U=2;p!=E.charAt(U)&&(m!=E.charAt(U)||h!=E.charAt(U+1));)++U;if(U+=2,p===E.charAt(U-1))return R("End of comment missing");var P=E.slice(2,U-2);return N+=2,O(P),E=E.slice(U),N+=2,$({type:y,comment:P})}}function q(){var $=j(),U=_(r);if(U){if(H(),!_(i))return R("property missing ':'");var P=_(s),Y=$({type:x,property:w(U[0].replace(e,p)),value:P?w(P[0].replace(e,p)):p});return _(a),Y}}function V(){var $=[];I($);for(var U;U=q();)U!==!1&&($.push(U),I($));return $}return F(),V()}function w(E){return E?E.replace(c,p):p}return oy=b,oy}var $4;function Kre(){if($4)return gc;$4=1;var e=gc&&gc.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gc,"__esModule",{value:!0}),gc.default=n;const t=e(Gre());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,t.default)(r),c=typeof i=="function";return a.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:m}=u;c?i(h,m,u):m&&(s=s||{},s[h]=m)}),s}return gc}var Sd={},Y4;function Qre(){if(Y4)return Sd;Y4=1,Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},u=function(h,m){return m===void 0&&(m={}),s(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(i,c):h=h.replace(r,c),h.replace(t,a))};return Sd.camelCase=u,Sd}var Cd,W4;function Xre(){if(W4)return Cd;W4=1;var e=Cd&&Cd.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Kre()),n=Qre();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(c,u){c&&u&&(a[(0,n.camelCase)(c,s)]=u)}),a}return r.default=r,Cd=r,Cd}var Zre=Xre();const Jre=eu(Zre),oj=sj("end"),aw=sj("start");function sj(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 eie(e){const t=aw(e),n=oj(e);if(t&&n)return{start:t,end:n}}function qd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?G4(e.position):"start"in e||"end"in e?G4(e):"line"in e||"column"in e?Lx(e):""}function Lx(e){return K4(e&&e.line)+":"+K4(e&&e.column)}function G4(e){return Lx(e&&e.start)+"-"+Lx(e&&e.end)}function K4(e){return e&&typeof e=="number"?e:1}class Dr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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=qd(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Dr.prototype.file="";Dr.prototype.name="";Dr.prototype.reason="";Dr.prototype.message="";Dr.prototype.stack="";Dr.prototype.column=void 0;Dr.prototype.line=void 0;Dr.prototype.ancestors=void 0;Dr.prototype.cause=void 0;Dr.prototype.fatal=void 0;Dr.prototype.place=void 0;Dr.prototype.ruleId=void 0;Dr.prototype.source=void 0;const lw={}.hasOwnProperty,tie=new Map,nie=/[A-Z]/g,rie=new Set(["table","tbody","thead","tfoot","tr"]),iie=new Set(["td","th"]),aj="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function oie(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=hie(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=fie(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"?$0:ij,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=lj(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function lj(e,t,n){if(t.type==="element")return sie(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return aie(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return cie(e,t,n);if(t.type==="mdxjsEsm")return lie(e,t);if(t.type==="root")return uie(e,t,n);if(t.type==="text")return die(e,t)}function sie(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=$0,e.schema=i),e.ancestors.push(t);const s=uj(e,t.tagName,!1),a=pie(e,t);let c=uw(e,t);return rie.has(t.tagName)&&(c=c.filter(function(u){return typeof u=="string"?!zre(u):!0})),cj(e,a,s,t),cw(a,c),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function aie(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)}mf(e,t.position)}function lie(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mf(e,t.position)}function cie(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=$0,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:uj(e,t.name,!0),a=mie(e,t),c=uw(e,t);return cj(e,a,s,t),cw(a,c),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function uie(e,t,n){const r={};return cw(r,uw(e,t)),e.create(t,e.Fragment,r,n)}function die(e,t){return t.value}function cj(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function cw(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fie(e,t,n){return r;function r(i,s,a,c){const h=Array.isArray(a.children)?n:t;return c?h(s,a,c):h(s,a)}}function hie(e,t){return n;function n(r,i,s,a){const c=Array.isArray(s.children),u=aw(r);return t(i,s,a,c,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function pie(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&lw.call(t.properties,i)){const s=gie(e,i,t.properties[i]);if(s){const[a,c]=s;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&iie.has(t.tagName)?r=c:n[a]=c}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function mie(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else mf(e,t.position);else{const i=r.name;let s;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,s=e.evaluater.evaluateExpression(c.expression)}else mf(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function uw(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:tie;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const h=i.get(u)||0;a=u+"-"+h,i.set(u,h+1)}}const c=lj(e,s,a);c!==void 0&&n.push(c)}return n}function gie(e,t,n){const r=rj(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Dre(n):Wre(n)),r.property==="style"){let i=typeof n=="object"?n:yie(e,String(n));return e.stylePropertyNameCase==="css"&&(i=xie(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ure[r.property]||r.property:r.attribute,n]}}function yie(e,t){try{return Jre(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Dr("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=aj+"#cannot-parse-style-attribute",i}}function uj(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const c=F4(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}r=a}else r=F4(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return lw.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);mf(e)}function mf(e,t){const n=new Dr("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=aj+"#cannot-handle-mdx-estrees-without-createevaluater",n}function xie(e){const t={};let n;for(n in e)lw.call(e,n)&&(t[bie(n)]=e[n]);return t}function bie(e){let t=e.replace(nie,vie);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function vie(e){return"-"+e.toLowerCase()}const sy={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"]},wie={};function dw(e,t){const n=wie,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return dj(e,r,i)}function dj(e,t,n){if(Sie(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 Q4(e.children,t,n)}return Array.isArray(e)?Q4(e,t,n):""}function Q4(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=dj(e[i],t,n);return r.join("")}function Sie(e){return!!(e&&typeof e=="object")}const X4=document.createElement("i");function gf(e){const t="&"+e+";";X4.innerHTML=t;const n=X4.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Si(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Vi(e,t){return e.length>0?(Si(e,e.length,0,t),e):t}const Z4={}.hasOwnProperty;function fj(e){const t={};let n=-1;for(;++n<e.length;)Cie(t,e[n]);return t}function Cie(e,t){let n;for(n in t){const i=(Z4.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Z4.call(i,a)||(i[a]=[]);const c=s[a];Eie(i[a],Array.isArray(c)?c:c?[c]:[])}}}function Eie(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Si(e,0,0,r)}function hj(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 co(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hr=_a(/[A-Za-z]/),jr=_a(/[\dA-Za-z]/),kie=_a(/[#-'*+\--9=?A-Z^-~]/);function Xm(e){return e!==null&&(e<32||e===127)}const Ix=_a(/\d/),Tie=_a(/[\dA-Fa-f]/),Nie=_a(/[!-/:-@[-`{-~]/);function mt(e){return e!==null&&e<-2}function Sn(e){return e!==null&&(e<0||e===32)}function _t(e){return e===-2||e===-1||e===32}const Y0=_a(new RegExp("\\p{P}|\\p{S}","u")),wl=_a(/\s/);function _a(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function pu(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&jr(e.charCodeAt(n+1))&&jr(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const c=e.charCodeAt(n+1);s<56320&&c>56319&&c<57344?(a=String.fromCharCode(s,c),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Jt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(u){return _t(u)?(e.enter(n),c(u)):t(u)}function c(u){return _t(u)&&s++<i?(e.consume(u),c):(e.exit(n),t(u))}}const Rie={tokenize:Aie};function Aie(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"),Jt(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),s(c)}function s(c){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return mt(c)?(e.consume(c),e.exit("chunkText"),s):(e.consume(c),a)}}const jie={tokenize:Oie},J4={tokenize:Mie};function Oie(e){const t=this,n=[];let r=0,i,s,a;return c;function c(N){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,u,h)(N)}return h(N)}function u(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const O=t.events.length;let j=O,A;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){A=t.events[j][1].end;break}k(r);let R=O;for(;R<t.events.length;)t.events[R][1].end={...A},R++;return Si(t.events,j+1,0,t.events.slice(O)),t.events.length=R,h(N)}return c(N)}function h(N){if(r===n.length){if(!i)return y(N);if(i.currentConstruct&&i.currentConstruct.concrete)return b(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(J4,m,p)(N)}function m(N){return i&&T(),k(r),y(N)}function p(N){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(N)}function y(N){return t.containerState={},e.attempt(J4,x,b)(N)}function x(N){return r++,n.push([t.currentConstruct,t.containerState]),y(N)}function b(N){if(N===null){i&&T(),k(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),w(N)}function w(N){if(N===null){E(e.exit("chunkFlow"),!0),k(0),e.consume(N);return}return mt(N)?(e.consume(N),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(N),w)}function E(N,O){const j=t.sliceStream(N);if(O&&j.push(null),N.previous=s,s&&(s.next=N),s=N,i.defineSkip(N.start),i.write(j),t.parser.lazy[N.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;const R=t.events.length;let _=R,F,I;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(F){I=t.events[_][1].end;break}F=!0}for(k(r),A=R;A<t.events.length;)t.events[A][1].end={...I},A++;Si(t.events,_+1,0,t.events.slice(R)),t.events.length=A}}function k(N){let O=n.length;for(;O-- >N;){const j=n[O];t.containerState=j[1],j[0].exit.call(t,e)}n.length=N}function T(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Mie(e,t,n){return Jt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zc(e){if(e===null||Sn(e)||wl(e))return 1;if(Y0(e))return 2}function W0(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Px={name:"attention",resolveAll:Die,tokenize:_ie};function Die(e,t){let n=-1,r,i,s,a,c,u,h,m;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;u=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};eT(p,-u),eT(y,u),a={type:u>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},c={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[r][1].end={...a.start},e[n][1].start={...c.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Vi(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Vi(h,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),h=Vi(h,W0(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Vi(h,[["exit",s,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Vi(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Si(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _ie(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Zc(r);let s;return a;function a(u){return s=u,e.enter("attentionSequence"),c(u)}function c(u){if(u===s)return e.consume(u),c;const h=e.exit("attentionSequence"),m=Zc(u),p=!m||m===2&&i||n.includes(u),y=!i||i===2&&m||n.includes(r);return h._open=!!(s===42?p:p&&(i||!y)),h._close=!!(s===42?y:y&&(m||!p)),t(u)}}function eT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Lie={name:"autolink",tokenize:Iie};function Iie(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"),s}function s(x){return Hr(x)?(e.consume(x),a):x===64?n(x):h(x)}function a(x){return x===43||x===45||x===46||jr(x)?(r=1,c(x)):h(x)}function c(x){return x===58?(e.consume(x),r=0,u):(x===43||x===45||x===46||jr(x))&&r++<32?(e.consume(x),c):(r=0,h(x))}function u(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||Xm(x)?n(x):(e.consume(x),u)}function h(x){return x===64?(e.consume(x),m):kie(x)?(e.consume(x),h):n(x)}function m(x){return jr(x)?p(x):n(x)}function p(x){return x===46?(e.consume(x),r=0,m):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||jr(x))&&r++<63){const b=x===45?y:p;return e.consume(x),b}return n(x)}}const Kf={partial:!0,tokenize:Pie};function Pie(e,t,n){return r;function r(s){return _t(s)?Jt(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||mt(s)?t(s):n(s)}}const pj={continuation:{tokenize:Fie},exit:Bie,name:"blockQuote",tokenize:zie};function zie(e,t,n){const r=this;return i;function i(a){if(a===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return _t(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Fie(e,t,n){const r=this;return i;function i(a){return _t(a)?Jt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(pj,t,n)(a)}}function Bie(e){e.exit("blockQuote")}const mj={name:"characterEscape",tokenize:Hie};function Hie(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Nie(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const gj={name:"characterReference",tokenize:Uie};function Uie(e,t,n){const r=this;let i=0,s,a;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),u}function u(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,a=jr,m(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=Tie,m):(e.enter("characterReferenceValue"),s=7,a=Ix,m(p))}function m(p){if(p===59&&i){const y=e.exit("characterReferenceValue");return a===jr&&!gf(r.sliceSerialize(y))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&i++<s?(e.consume(p),m):n(p)}}const tT={partial:!0,tokenize:Vie},nT={concrete:!0,name:"codeFenced",tokenize:qie};function qie(e,t,n){const r=this,i={partial:!0,tokenize:j};let s=0,a=0,c;return u;function u(A){return h(A)}function h(A){const R=r.events[r.events.length-1];return s=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,c=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(A)}function m(A){return A===c?(a++,e.consume(A),m):a<3?n(A):(e.exit("codeFencedFenceSequence"),_t(A)?Jt(e,p,"whitespace")(A):p(A))}function p(A){return A===null||mt(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(tT,w,O)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===null||mt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):_t(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Jt(e,x,"whitespace")(A)):A===96&&A===c?n(A):(e.consume(A),y)}function x(A){return A===null||mt(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||mt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===c?n(A):(e.consume(A),b)}function w(A){return e.attempt(i,O,E)(A)}function E(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),k}function k(A){return s>0&&_t(A)?Jt(e,T,"linePrefix",s+1)(A):T(A)}function T(A){return A===null||mt(A)?e.check(tT,w,O)(A):(e.enter("codeFlowValue"),N(A))}function N(A){return A===null||mt(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),N)}function O(A){return e.exit("codeFenced"),t(A)}function j(A,R,_){let F=0;return I;function I(U){return A.enter("lineEnding"),A.consume(U),A.exit("lineEnding"),H}function H(U){return A.enter("codeFencedFence"),_t(U)?Jt(A,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):q(U)}function q(U){return U===c?(A.enter("codeFencedFenceSequence"),V(U)):_(U)}function V(U){return U===c?(F++,A.consume(U),V):F>=a?(A.exit("codeFencedFenceSequence"),_t(U)?Jt(A,$,"whitespace")(U):$(U)):_(U)}function $(U){return U===null||mt(U)?(A.exit("codeFencedFence"),R(U)):_(U)}}}function Vie(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const ay={name:"codeIndented",tokenize:Yie},$ie={partial:!0,tokenize:Wie};function Yie(e,t,n){const r=this;return i;function i(h){return e.enter("codeIndented"),Jt(e,s,"linePrefix",5)(h)}function s(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?u(h):mt(h)?e.attempt($ie,a,u)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||mt(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function u(h){return e.exit("codeIndented"),t(h)}}function Wie(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):mt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Jt(e,s,"linePrefix",5)(a)}function s(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):mt(a)?i(a):n(a)}}const Gie={name:"codeText",previous:Qie,resolve:Kie,tokenize:Xie};function Kie(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 Qie(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Xie(e,t,n){let r=0,i,s;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),r++,c):(e.exit("codeTextSequence"),u(p))}function u(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),u):p===96?(s=e.enter("codeTextSequence"),i=0,m(p)):mt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||mt(p)?(e.exit("codeTextData"),u(p)):(e.consume(p),h)}function m(p){return p===96?(e.consume(p),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(s.type="codeTextData",h(p))}}class Zie{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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ed(this.left,r),s.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),Ed(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ed(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);Ed(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ed(this.left,n.reverse())}}}function Ed(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 yj(e){const t={};let n=-1,r,i,s,a,c,u,h;const m=new Zie(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Jie(m,n)),n=t[n],h=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=m.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},c=m.slice(i,n),c.unshift(r),m.splice(i,n-i+1,c))}}return Si(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function Jie(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,u=[],h={};let m,p,y=-1,x=n,b=0,w=0;const E=[w];for(;x;){for(;e.get(++i)[1]!==x;);s.push(i),x._tokenizer||(m=r.sliceStream(x),x.next||m.push(null),p&&a.defineSkip(x.start),x._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),x._isInFirstContentOfListItem&&(a._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&&(w=y+1,E.push(w),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(a.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=s.pop();u.push([T,T+k.length-1]),e.splice(T,2,k)}for(u.reverse(),y=-1;++y<u.length;)h[b+u[y][0]]=b+u[y][1],b+=u[y][1]-u[y][0]-1;return h}const eoe={resolve:noe,tokenize:roe},toe={partial:!0,tokenize:ioe};function noe(e){return yj(e),e}function roe(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?s(c):mt(c)?e.check(toe,a,s)(c):(e.consume(c),i)}function s(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ioe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Jt(e,s,"linePrefix")}function s(a){if(a===null||mt(a))return n(a);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(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function xj(e,t,n,r,i,s,a,c,u){const h=u||Number.POSITIVE_INFINITY;let m=0;return p;function p(k){return k===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(k),e.exit(s),y):k===null||k===32||k===41||Xm(k)?n(k):(e.enter(r),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(k))}function y(k){return k===62?(e.enter(s),e.consume(k),e.exit(s),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||mt(k)?n(k):(e.consume(k),k===92?b:x)}function b(k){return k===60||k===62||k===92?(e.consume(k),x):x(k)}function w(k){return!m&&(k===null||k===41||Sn(k))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(r),t(k)):m<h&&k===40?(e.consume(k),m++,w):k===41?(e.consume(k),m--,w):k===null||k===32||k===40||Xm(k)?n(k):(e.consume(k),k===92?E:w)}function E(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function bj(e,t,n,r,i,s){const a=this;let c=0,u;return h;function h(x){return e.enter(r),e.enter(i),e.consume(x),e.exit(i),e.enter(s),m}function m(x){return c>999||x===null||x===91||x===93&&!u||x===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(x):x===93?(e.exit(s),e.enter(i),e.consume(x),e.exit(i),e.exit(r),t):mt(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||mt(x)||c++>999?(e.exit("chunkString"),m(x)):(e.consume(x),u||(u=!_t(x)),x===92?y:p)}function y(x){return x===91||x===92||x===93?(e.consume(x),c++,p):p(x)}}function vj(e,t,n,r,i,s){let a;return c;function c(y){return y===34||y===39||y===40?(e.enter(r),e.enter(i),e.consume(y),e.exit(i),a=y===40?41:y,u):n(y)}function u(y){return y===a?(e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):(e.enter(s),h(y))}function h(y){return y===a?(e.exit(s),u(a)):y===null?n(y):mt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Jt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===a||y===null||mt(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?p:m)}function p(y){return y===a||y===92?(e.consume(y),m):m(y)}}function Vd(e,t){let n;return r;function r(i){return mt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_t(i)?Jt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ooe={name:"definition",tokenize:aoe},soe={partial:!0,tokenize:loe};function aoe(e,t,n){const r=this;let i;return s;function s(x){return e.enter("definition"),a(x)}function a(x){return bj.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return i=co(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),u):n(x)}function u(x){return Sn(x)?Vd(e,h)(x):h(x)}function h(x){return xj(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(soe,p,p)(x)}function p(x){return _t(x)?Jt(e,y,"whitespace")(x):y(x)}function y(x){return x===null||mt(x)?(e.exit("definition"),r.parser.defined.push(i),t(x)):n(x)}}function loe(e,t,n){return r;function r(c){return Sn(c)?Vd(e,i)(c):n(c)}function i(c){return vj(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return _t(c)?Jt(e,a,"whitespace")(c):a(c)}function a(c){return c===null||mt(c)?t(c):n(c)}}const coe={name:"hardBreakEscape",tokenize:uoe};function uoe(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return mt(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const doe={name:"headingAtx",resolve:foe,tokenize:hoe};function foe(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Si(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function hoe(e,t,n){let r=0;return i;function i(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||Sn(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),u(m)):m===null||mt(m)?(e.exit("atxHeading"),t(m)):_t(m)?Jt(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function u(m){return m===35?(e.consume(m),u):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||Sn(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const poe=["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"],rT=["pre","script","style","textarea"],moe={concrete:!0,name:"htmlFlow",resolveTo:xoe,tokenize:boe},goe={partial:!0,tokenize:woe},yoe={partial:!0,tokenize:voe};function xoe(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 boe(e,t,n){const r=this;let i,s,a,c,u;return h;function h(D){return m(D)}function m(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),p}function p(D){return D===33?(e.consume(D),y):D===47?(e.consume(D),s=!0,w):D===63?(e.consume(D),i=3,r.interrupt?t:L):Hr(D)?(e.consume(D),a=String.fromCharCode(D),E):n(D)}function y(D){return D===45?(e.consume(D),i=2,x):D===91?(e.consume(D),i=5,c=0,b):Hr(D)?(e.consume(D),i=4,r.interrupt?t:L):n(D)}function x(D){return D===45?(e.consume(D),r.interrupt?t:L):n(D)}function b(D){const Q="CDATA[";return D===Q.charCodeAt(c++)?(e.consume(D),c===Q.length?r.interrupt?t:q:b):n(D)}function w(D){return Hr(D)?(e.consume(D),a=String.fromCharCode(D),E):n(D)}function E(D){if(D===null||D===47||D===62||Sn(D)){const Q=D===47,ee=a.toLowerCase();return!Q&&!s&&rT.includes(ee)?(i=1,r.interrupt?t(D):q(D)):poe.includes(a.toLowerCase())?(i=6,Q?(e.consume(D),k):r.interrupt?t(D):q(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):s?T(D):N(D))}return D===45||jr(D)?(e.consume(D),a+=String.fromCharCode(D),E):n(D)}function k(D){return D===62?(e.consume(D),r.interrupt?t:q):n(D)}function T(D){return _t(D)?(e.consume(D),T):I(D)}function N(D){return D===47?(e.consume(D),I):D===58||D===95||Hr(D)?(e.consume(D),O):_t(D)?(e.consume(D),N):I(D)}function O(D){return D===45||D===46||D===58||D===95||jr(D)?(e.consume(D),O):j(D)}function j(D){return D===61?(e.consume(D),A):_t(D)?(e.consume(D),j):N(D)}function A(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),u=D,R):_t(D)?(e.consume(D),A):_(D)}function R(D){return D===u?(e.consume(D),u=null,F):D===null||mt(D)?n(D):(e.consume(D),R)}function _(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||Sn(D)?j(D):(e.consume(D),_)}function F(D){return D===47||D===62||_t(D)?N(D):n(D)}function I(D){return D===62?(e.consume(D),H):n(D)}function H(D){return D===null||mt(D)?q(D):_t(D)?(e.consume(D),H):n(D)}function q(D){return D===45&&i===2?(e.consume(D),P):D===60&&i===1?(e.consume(D),Y):D===62&&i===4?(e.consume(D),B):D===63&&i===3?(e.consume(D),L):D===93&&i===5?(e.consume(D),X):mt(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(goe,W,V)(D)):D===null||mt(D)?(e.exit("htmlFlowData"),V(D)):(e.consume(D),q)}function V(D){return e.check(yoe,$,W)(D)}function $(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),U}function U(D){return D===null||mt(D)?V(D):(e.enter("htmlFlowData"),q(D))}function P(D){return D===45?(e.consume(D),L):q(D)}function Y(D){return D===47?(e.consume(D),a="",G):q(D)}function G(D){if(D===62){const Q=a.toLowerCase();return rT.includes(Q)?(e.consume(D),B):q(D)}return Hr(D)&&a.length<8?(e.consume(D),a+=String.fromCharCode(D),G):q(D)}function X(D){return D===93?(e.consume(D),L):q(D)}function L(D){return D===62?(e.consume(D),B):D===45&&i===2?(e.consume(D),L):q(D)}function B(D){return D===null||mt(D)?(e.exit("htmlFlowData"),W(D)):(e.consume(D),B)}function W(D){return e.exit("htmlFlow"),t(D)}}function voe(e,t,n){const r=this;return i;function i(a){return mt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function woe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Kf,t,n)}}const Soe={name:"htmlText",tokenize:Coe};function Coe(e,t,n){const r=this;let i,s,a;return c;function c(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),u}function u(L){return L===33?(e.consume(L),h):L===47?(e.consume(L),j):L===63?(e.consume(L),N):Hr(L)?(e.consume(L),_):n(L)}function h(L){return L===45?(e.consume(L),m):L===91?(e.consume(L),s=0,b):Hr(L)?(e.consume(L),T):n(L)}function m(L){return L===45?(e.consume(L),x):n(L)}function p(L){return L===null?n(L):L===45?(e.consume(L),y):mt(L)?(a=p,Y(L)):(e.consume(L),p)}function y(L){return L===45?(e.consume(L),x):p(L)}function x(L){return L===62?P(L):L===45?y(L):p(L)}function b(L){const B="CDATA[";return L===B.charCodeAt(s++)?(e.consume(L),s===B.length?w:b):n(L)}function w(L){return L===null?n(L):L===93?(e.consume(L),E):mt(L)?(a=w,Y(L)):(e.consume(L),w)}function E(L){return L===93?(e.consume(L),k):w(L)}function k(L){return L===62?P(L):L===93?(e.consume(L),k):w(L)}function T(L){return L===null||L===62?P(L):mt(L)?(a=T,Y(L)):(e.consume(L),T)}function N(L){return L===null?n(L):L===63?(e.consume(L),O):mt(L)?(a=N,Y(L)):(e.consume(L),N)}function O(L){return L===62?P(L):N(L)}function j(L){return Hr(L)?(e.consume(L),A):n(L)}function A(L){return L===45||jr(L)?(e.consume(L),A):R(L)}function R(L){return mt(L)?(a=R,Y(L)):_t(L)?(e.consume(L),R):P(L)}function _(L){return L===45||jr(L)?(e.consume(L),_):L===47||L===62||Sn(L)?F(L):n(L)}function F(L){return L===47?(e.consume(L),P):L===58||L===95||Hr(L)?(e.consume(L),I):mt(L)?(a=F,Y(L)):_t(L)?(e.consume(L),F):P(L)}function I(L){return L===45||L===46||L===58||L===95||jr(L)?(e.consume(L),I):H(L)}function H(L){return L===61?(e.consume(L),q):mt(L)?(a=H,Y(L)):_t(L)?(e.consume(L),H):F(L)}function q(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,V):mt(L)?(a=q,Y(L)):_t(L)?(e.consume(L),q):(e.consume(L),$)}function V(L){return L===i?(e.consume(L),i=void 0,U):L===null?n(L):mt(L)?(a=V,Y(L)):(e.consume(L),V)}function $(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Sn(L)?F(L):(e.consume(L),$)}function U(L){return L===47||L===62||Sn(L)?F(L):n(L)}function P(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function Y(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),G}function G(L){return _t(L)?Jt(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):X(L)}function X(L){return e.enter("htmlTextData"),a(L)}}const fw={name:"labelEnd",resolveAll:Noe,resolveTo:Roe,tokenize:Aoe},Eoe={tokenize:joe},koe={tokenize:Ooe},Toe={tokenize:Moe};function Noe(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&&Si(e,0,e.length,n),e}function Roe(e,t){let n=e.length,r=0,i,s,a,c;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const u={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",u,t],["enter",h,t]],c=Vi(c,e.slice(s+1,s+r+3)),c=Vi(c,[["enter",m,t]]),c=Vi(c,W0(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),c=Vi(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=Vi(c,e.slice(a+1)),c=Vi(c,[["exit",u,t]]),Si(e,s,e.length,c),e}function Aoe(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return c;function c(y){return s?s._inactive?p(y):(a=r.parser.defined.includes(co(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),u):n(y)}function u(y){return y===40?e.attempt(Eoe,m,a?m:p)(y):y===91?e.attempt(koe,m,a?h:p)(y):a?m(y):p(y)}function h(y){return e.attempt(Toe,m,p)(y)}function m(y){return t(y)}function p(y){return s._balanced=!0,n(y)}}function joe(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 Sn(p)?Vd(e,s)(p):s(p)}function s(p){return p===41?m(p):xj(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Sn(p)?Vd(e,u)(p):m(p)}function c(p){return n(p)}function u(p){return p===34||p===39||p===40?vj(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return Sn(p)?Vd(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Ooe(e,t,n){const r=this;return i;function i(c){return bj.call(r,e,s,a,"reference","referenceMarker","referenceString")(c)}function s(c){return r.parser.defined.includes(co(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function Moe(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Doe={name:"labelStartImage",resolveAll:fw.resolveAll,tokenize:_oe};function _oe(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),s}function s(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Loe={name:"labelStartLink",resolveAll:fw.resolveAll,tokenize:Ioe};function Ioe(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ly={name:"lineEnding",tokenize:Poe};function Poe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Jt(e,t,"linePrefix")}}const pm={name:"thematicBreak",tokenize:zoe};function zoe(e,t,n){let r=0,i;return s;function s(h){return e.enter("thematicBreak"),a(h)}function a(h){return i=h,c(h)}function c(h){return h===i?(e.enter("thematicBreakSequence"),u(h)):r>=3&&(h===null||mt(h))?(e.exit("thematicBreak"),t(h)):n(h)}function u(h){return h===i?(e.consume(h),r++,u):(e.exit("thematicBreakSequence"),_t(h)?Jt(e,c,"whitespace")(h):c(h))}}const Jr={continuation:{tokenize:Uoe},exit:Voe,name:"list",tokenize:Hoe},Foe={partial:!0,tokenize:$oe},Boe={partial:!0,tokenize:qoe};function Hoe(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return c;function c(x){const b=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:Ix(x)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(pm,n,h)(x):h(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(x)}return n(x)}function u(x){return Ix(x)&&++a<10?(e.consume(x),u):(!r.interrupt||a<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):n(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(Kf,r.interrupt?n:m,e.attempt(Foe,y,p))}function m(x){return r.containerState.initialBlankLine=!0,s++,y(x)}function p(x){return _t(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),y):n(x)}function y(x){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function Uoe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Kf,i,s);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Jt(e,t,"listItemIndent",r.containerState.size+1)(c)}function s(c){return r.containerState.furtherBlankLines||!_t(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Boe,t,a)(c))}function a(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Jt(e,e.attempt(Jr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function qoe(e,t,n){const r=this;return Jt(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Voe(e){e.exit(this.containerState.type)}function $oe(e,t,n){const r=this;return Jt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!_t(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const iT={name:"setextUnderline",resolveTo:Yoe,tokenize:Woe};function Yoe(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Woe(e,t,n){const r=this;let i;return s;function s(h){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===i?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),_t(h)?Jt(e,u,"lineSuffix")(h):u(h))}function u(h){return h===null||mt(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Goe={tokenize:Koe};function Koe(e){const t=this,n=e.attempt(Kf,r,e.attempt(this.parser.constructs.flowInitial,i,Jt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(eoe,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Qoe={resolveAll:Sj()},Xoe=wj("string"),Zoe=wj("text");function wj(e){return{resolveAll:Sj(e==="text"?Joe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,c);return a;function a(m){return h(m)?s(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),u}function u(m){return h(m)?(n.exit("data"),s(m)):(n.consume(m),u)}function h(m){if(m===null)return!0;const p=i[m];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 Sj(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function Joe(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 s=i.length,a=-1,c=0,u;for(;s--;){const h=i[s];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)u=!0,c++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const ese={42:Jr,43:Jr,45:Jr,48:Jr,49:Jr,50:Jr,51:Jr,52:Jr,53:Jr,54:Jr,55:Jr,56:Jr,57:Jr,62:pj},tse={91:ooe},nse={[-2]:ay,[-1]:ay,32:ay},rse={35:doe,42:pm,45:[iT,pm],60:moe,61:iT,95:pm,96:nT,126:nT},ise={38:gj,92:mj},ose={[-5]:ly,[-4]:ly,[-3]:ly,33:Doe,38:gj,42:Px,60:[Lie,Soe],91:Loe,92:[coe,mj],93:fw,95:Px,96:Gie},sse={null:[Px,Qoe]},ase={null:[42,95]},lse={null:[]},cse=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ase,contentInitial:tse,disable:lse,document:ese,flow:rse,flowInitial:nse,insideSpan:sse,string:ise,text:ose},Symbol.toStringTag,{value:"Module"}));function use(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={},s=[];let a=[],c=[];const u={attempt:R(j),check:R(A),consume:T,enter:N,exit:O,interrupt:R(A,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:b,parser:e,previous:null,sliceSerialize:y,sliceStream:x,write:p};let m=t.tokenize.call(h,u);return t.resolveAll&&s.push(t),h;function p(H){return a=Vi(a,H),E(),a[a.length-1]!==null?[]:(_(t,0),h.events=W0(s,h.events,h),h.events)}function y(H,q){return fse(x(H),q)}function x(H){return dse(a,H)}function b(){const{_bufferIndex:H,_index:q,line:V,column:$,offset:U}=r;return{_bufferIndex:H,_index:q,line:V,column:$,offset:U}}function w(H){i[H.line]=H.column,I()}function E(){let H;for(;r._index<a.length;){const q=a[r._index];if(typeof q=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<q.length;)k(q.charCodeAt(r._bufferIndex));else k(q)}}function k(H){m=m(H)}function T(H){mt(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,I()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=H}function N(H,q){const V=q||{};return V.type=H,V.start=b(),h.events.push(["enter",V,h]),c.push(V),V}function O(H){const q=c.pop();return q.end=b(),h.events.push(["exit",q,h]),q}function j(H,q){_(H,q.from)}function A(H,q){q.restore()}function R(H,q){return V;function V($,U,P){let Y,G,X,L;return Array.isArray($)?W($):"tokenize"in $?W([$]):B($);function B(J){return he;function he(de){const Se=de!==null&&J[de],Re=de!==null&&J.null,je=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(Re)?Re:Re?[Re]:[]];return W(je)(de)}}function W(J){return Y=J,G=0,J.length===0?P:D(J[G])}function D(J){return he;function he(de){return L=F(),X=J,J.partial||(h.currentConstruct=J),J.name&&h.parser.constructs.disable.null.includes(J.name)?ee():J.tokenize.call(q?Object.assign(Object.create(h),q):h,u,Q,ee)(de)}}function Q(J){return H(X,L),U}function ee(J){return L.restore(),++G<Y.length?D(Y[G]):P}}}function _(H,q){H.resolveAll&&!s.includes(H)&&s.push(H),H.resolve&&Si(h.events,q,h.events.length-q,H.resolve(h.events.slice(q),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function F(){const H=b(),q=h.previous,V=h.currentConstruct,$=h.events.length,U=Array.from(c);return{from:$,restore:P};function P(){r=H,h.previous=q,h.currentConstruct=V,h.events.length=$,c=U,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function dse(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function fse(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
89
+ `;break}case-3:{a=`\r
90
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function hse(e){const r={constructs:fj([cse,...(e||{}).extensions||[]]),content:i(Rie),defined:[],document:i(jie),flow:i(Goe),lazy:{},string:i(Xoe),text:i(Zoe)};return r;function i(s){return a;function a(c){return use(r,s,c)}}}function pse(e){for(;!yj(e););return e}const oT=/[\0\t\n\r]/g;function mse(){let e=1,t="",n=!0,r;return i;function i(s,a,c){const u=[];let h,m,p,y,x;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),p=0,t="",n&&(s.charCodeAt(0)===65279&&p++,n=void 0);p<s.length;){if(oT.lastIndex=p,h=oT.exec(s),y=h&&h.index!==void 0?h.index:s.length,x=s.charCodeAt(y),!h){t=s.slice(p);break}if(x===10&&p===y&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),p<y&&(u.push(s.slice(p,y)),e+=y-p),x){case 0:{u.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,u.push(-2);e++<m;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}p=y+1}return c&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const gse=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yse(e){return e.replace(gse,xse)}function xse(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return hj(n.slice(s?2:1),s?16:10)}return gf(n)||e}const Cj={}.hasOwnProperty;function bse(e,t,n){return typeof t!="string"&&(n=t,t=void 0),vse(n)(pse(hse(n).document().write(mse()(e,t,!0))))}function vse(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(pe),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(xe),blockQuote:s(Re),characterEscape:F,characterReference:F,codeFenced:s(je),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(je,a),codeText:s(Fe,a),codeTextData:F,data:F,codeFlowValue:F,definition:s(_e),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(De),hardBreakEscape:s(Ge),hardBreakTrailing:s(Ge),htmlFlow:s(we,a),htmlFlowData:F,htmlText:s(we,a),htmlTextData:F,image:s(Ae),label:a,link:s(pe),listItem:s(ne),listItemValue:y,listOrdered:s(be,p),listUnordered:s(be),paragraph:s(ye),reference:D,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(xe),strong:s(Ce),thematicBreak:s(ct)},exit:{atxHeading:u(),atxHeadingSequence:j,autolink:u(),autolinkEmail:Se,autolinkProtocol:de,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:J,characterReference:he,codeFenced:u(E),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:u(k),codeText:u(U),codeTextData:I,data:I,definition:u(),definitionDestinationString:O,definitionLabelString:T,definitionTitleString:N,emphasis:u(),hardBreakEscape:u(q),hardBreakTrailing:u(q),htmlFlow:u(V),htmlFlowData:I,htmlText:u($),htmlTextData:I,image:u(Y),label:X,labelText:G,lineEnding:H,link:u(P),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Q,resourceDestinationString:L,resourceTitleString:B,resource:W,setextHeading:u(_),setextHeadingLineSequence:R,setextHeadingText:A,strong:u(),thematicBreak:u()}};Ej(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let Ee={type:"root",children:[]};const Le={stack:[Ee],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:m,data:n},Me=[];let Ue=-1;for(;++Ue<oe.length;)if(oe[Ue][1].type==="listOrdered"||oe[Ue][1].type==="listUnordered")if(oe[Ue][0]==="enter")Me.push(Ue);else{const dt=Me.pop();Ue=i(oe,dt,Ue)}for(Ue=-1;++Ue<oe.length;){const dt=t[oe[Ue][0]];Cj.call(dt,oe[Ue][1].type)&&dt[oe[Ue][1].type].call(Object.assign({sliceSerialize:oe[Ue][2].sliceSerialize},Le),oe[Ue][1])}if(Le.tokenStack.length>0){const dt=Le.tokenStack[Le.tokenStack.length-1];(dt[1]||sT).call(Le,void 0,dt[0])}for(Ee.position={start:ea(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:ea(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Ue=-1;++Ue<t.transforms.length;)Ee=t.transforms[Ue](Ee)||Ee;return Ee}function i(oe,Ee,Le){let Me=Ee-1,Ue=-1,dt=!1,xt,Je,Ke,bt;for(;++Me<=Le;){const nt=oe[Me];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?Ue++:Ue--,bt=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(xt&&!bt&&!Ue&&!Ke&&(Ke=Me),bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bt=void 0}if(!Ue&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||Ue===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(xt){let Qe=Me;for(Je=void 0;Qe--;){const Ct=oe[Qe];if(Ct[1].type==="lineEnding"||Ct[1].type==="lineEndingBlank"){if(Ct[0]==="exit")continue;Je&&(oe[Je][1].type="lineEndingBlank",dt=!0),Ct[1].type="lineEnding",Je=Qe}else if(!(Ct[1].type==="linePrefix"||Ct[1].type==="blockQuotePrefix"||Ct[1].type==="blockQuotePrefixWhitespace"||Ct[1].type==="blockQuoteMarker"||Ct[1].type==="listItemIndent"))break}Ke&&(!Je||Ke<Je)&&(xt._spread=!0),xt.end=Object.assign({},Je?oe[Je][1].start:nt[1].end),oe.splice(Je||Me,0,["exit",xt,nt[2]]),Me++,Le++}if(nt[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};xt=Qe,oe.splice(Me,0,["enter",Qe,nt[2]]),Me++,Le++,Ke=void 0,bt=!0}}}return oe[Ee][1]._spread=dt,Le}function s(oe,Ee){return Le;function Le(Me){c.call(this,oe(Me),Me),Ee&&Ee.call(this,Me)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(oe,Ee,Le){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([Ee,Le||void 0]),oe.position={start:ea(Ee.start),end:void 0}}function u(oe){return Ee;function Ee(Le){oe&&oe.call(this,Le),h.call(this,Le)}}function h(oe,Ee){const Le=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==oe.type&&(Ee?Ee.call(this,oe,Me[0]):(Me[1]||sT).call(this,oe,Me[0]));else throw new Error("Cannot close `"+oe.type+"` ("+qd({start:oe.start,end:oe.end})+"): it’s not open");Le.position.end=ea(oe.end)}function m(){return dw(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function y(oe){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function x(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=oe}function b(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=oe}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=oe.replace(/(\r?\n|\r)$/g,"")}function T(oe){const Ee=this.resume(),Le=this.stack[this.stack.length-1];Le.label=Ee,Le.identifier=co(this.sliceSerialize(oe)).toLowerCase()}function N(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=oe}function O(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=oe}function j(oe){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const Le=this.sliceSerialize(oe).length;Ee.depth=Le}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function R(oe){const Ee=this.stack[this.stack.length-1];Ee.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function F(oe){const Le=this.stack[this.stack.length-1].children;let Me=Le[Le.length-1];(!Me||Me.type!=="text")&&(Me=Ve(),Me.position={start:ea(oe.start),end:void 0},Le.push(Me)),this.stack.push(Me)}function I(oe){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(oe),Ee.position.end=ea(oe.end)}function H(oe){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Le=Ee.children[Ee.children.length-1];Le.position.end=ea(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(F.call(this,oe),I.call(this,oe))}function q(){this.data.atHardBreak=!0}function V(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=oe}function $(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=oe}function U(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=oe}function P(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Ee,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function Y(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Ee,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function G(oe){const Ee=this.sliceSerialize(oe),Le=this.stack[this.stack.length-2];Le.label=yse(Ee),Le.identifier=co(Ee).toLowerCase()}function X(){const oe=this.stack[this.stack.length-1],Ee=this.resume(),Le=this.stack[this.stack.length-1];if(this.data.inReference=!0,Le.type==="link"){const Me=oe.children;Le.children=Me}else Le.alt=Ee}function L(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=oe}function B(){const oe=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=oe}function W(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function Q(oe){const Ee=this.resume(),Le=this.stack[this.stack.length-1];Le.label=Ee,Le.identifier=co(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function ee(oe){this.data.characterReferenceType=oe.type}function J(oe){const Ee=this.sliceSerialize(oe),Le=this.data.characterReferenceType;let Me;Le?(Me=hj(Ee,Le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=gf(Ee);const Ue=this.stack[this.stack.length-1];Ue.value+=Me}function he(oe){const Ee=this.stack.pop();Ee.position.end=ea(oe.end)}function de(oe){I.call(this,oe);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(oe)}function Se(oe){I.call(this,oe);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(oe)}function Re(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function _e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function we(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function be(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function ne(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function ye(){return{type:"paragraph",children:[]}}function Ce(){return{type:"strong",children:[]}}function Ve(){return{type:"text",value:""}}function ct(){return{type:"thematicBreak"}}}function ea(e){return{line:e.line,column:e.column,offset:e.offset}}function Ej(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ej(e,r):wse(e,r)}}function wse(e,t){let n;for(n in t)if(Cj.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 sT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qd({start:t.start,end:t.end})+") is still open")}function Sse(e){const t=this;t.parser=n;function n(r){return bse(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Cse(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 Ese(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
91
+ `}]}function kse(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 s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Tse(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nse(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rse(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=pu(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,c+=1,e.footnoteCounts.set(r,c);const u={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(a)}]};e.patch(t,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,h),e.applyData(t,h)}function Ase(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 jse(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function kj(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),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function Ose(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kj(e,t);const i={src:pu(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Mse(e,t){const n={src:pu(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 Dse(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 _se(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kj(e,t);const i={href:pu(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Lse(e,t){const n={href:pu(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 Ise(e,t,n){const r=e.all(t),i=n?Pse(n):Tj(t),s={},a=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(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:[]}),s.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const m=r[c];(i||c!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
93
+ `}),m.type==="element"&&m.tagName==="p"&&!i?a.push(...m.children):a.push(m)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
94
+ `});const h={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,h),e.applyData(t,h)}function Pse(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=Tj(n[r])}return t}function Tj(e){const t=e.spread;return t??e.children.length>1}function zse(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Fse(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bse(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Hse(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Use(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=aw(t.children[1]),u=oj(t.children[t.children.length-1]);c&&u&&(a.position={start:c,end:u}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function qse(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let u=-1;const h=[];for(;++u<c;){const p=t.children[u],y={},x=a?a[u]:void 0;x&&(y.align=x);let b={type:"element",tagName:s,properties:y,children:[]};p&&(b.children=e.all(p),e.patch(p,b),b=e.applyData(p,b)),h.push(b)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function Vse(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const aT=9,lT=32;function $se(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(cT(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(cT(t.slice(i),i>0,!1)),s.join("")}function cT(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===aT||s===lT;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===aT||s===lT;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Yse(e,t){const n={type:"text",value:$se(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Wse(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Gse={blockquote:Cse,break:Ese,code:kse,delete:Tse,emphasis:Nse,footnoteReference:Rse,heading:Ase,html:jse,imageReference:Ose,image:Mse,inlineCode:Dse,linkReference:_se,link:Lse,listItem:Ise,list:zse,paragraph:Fse,root:Bse,strong:Hse,table:Use,tableCell:Vse,tableRow:qse,text:Yse,thematicBreak:Wse,toml:Pp,yaml:Pp,definition:Pp,footnoteDefinition:Pp};function Pp(){}const Nj=-1,G0=0,$d=1,Zm=2,hw=3,pw=4,mw=5,gw=6,Rj=7,Aj=8,uT=typeof self=="object"?self:globalThis,Kse=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case G0:case Nj:return n(a,i);case $d:{const c=n([],i);for(const u of a)c.push(r(u));return c}case Zm:{const c=n({},i);for(const[u,h]of a)c[r(u)]=r(h);return c}case hw:return n(new Date(a),i);case pw:{const{source:c,flags:u}=a;return n(new RegExp(c,u),i)}case mw:{const c=n(new Map,i);for(const[u,h]of a)c.set(r(u),r(h));return c}case gw:{const c=n(new Set,i);for(const u of a)c.add(r(u));return c}case Rj:{const{name:c,message:u}=a;return n(new uT[c](u),i)}case Aj:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(new uT[s](a),i)};return r},dT=e=>Kse(new Map,e)(0),yc="",{toString:Qse}={},{keys:Xse}=Object,kd=e=>{const t=typeof e;if(t!=="object"||!e)return[G0,t];const n=Qse.call(e).slice(8,-1);switch(n){case"Array":return[$d,yc];case"Object":return[Zm,yc];case"Date":return[hw,yc];case"RegExp":return[pw,yc];case"Map":return[mw,yc];case"Set":return[gw,yc];case"DataView":return[$d,n]}return n.includes("Array")?[$d,n]:n.includes("Error")?[Rj,n]:[Zm,n]},zp=([e,t])=>e===G0&&(t==="function"||t==="symbol"),Zse=(e,t,n,r)=>{const i=(a,c)=>{const u=r.push(a)-1;return n.set(c,u),u},s=a=>{if(n.has(a))return n.get(a);let[c,u]=kd(a);switch(c){case G0:{let m=a;switch(u){case"bigint":c=Aj,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);m=null;break;case"undefined":return i([Nj],a)}return i([c,m],a)}case $d:{if(u){let y=a;return u==="DataView"?y=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(y=new Uint8Array(a)),i([u,[...y]],a)}const m=[],p=i([c,m],a);for(const y of a)m.push(s(y));return p}case Zm:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const m=[],p=i([c,m],a);for(const y of Xse(a))(e||!zp(kd(a[y])))&&m.push([s(y),s(a[y])]);return p}case hw:return i([c,a.toISOString()],a);case pw:{const{source:m,flags:p}=a;return i([c,{source:m,flags:p}],a)}case mw:{const m=[],p=i([c,m],a);for(const[y,x]of a)(e||!(zp(kd(y))||zp(kd(x))))&&m.push([s(y),s(x)]);return p}case gw:{const m=[],p=i([c,m],a);for(const y of a)(e||!zp(kd(y)))&&m.push(s(y));return p}}const{message:h}=a;return i([c,{name:u,message:h}],a)};return s},fT=(e,{json:t,lossy:n}={})=>{const r=[];return Zse(!(t||n),!!t,new Map,r)(e),r},Jm=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?dT(fT(e,t)):structuredClone(e):(e,t)=>dT(fT(e,t));function Jse(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 eae(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function tae(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Jse,r=e.options.footnoteBackLabel||eae,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let u=-1;for(;++u<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[u]);if(!h)continue;const m=e.all(h),p=String(h.identifier).toUpperCase(),y=pu(p.toLowerCase());let x=0;const b=[],w=e.footnoteCounts.get(p);for(;w!==void 0&&++x<=w;){b.length>0&&b.push({type:"text",value:" "});let T=typeof n=="string"?n:n(u,x);typeof T=="string"&&(T={type:"text",value:T}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,x),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const E=m[m.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(...b)}else m.push(...b);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(m,!0)};e.patch(h,k),c.push(k)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Jm(a),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 K0=(function(e){if(e==null)return oae;if(typeof e=="function")return Q0(e);if(typeof e=="object")return Array.isArray(e)?nae(e):rae(e);if(typeof e=="string")return iae(e);throw new Error("Expected function, string, or object as test")});function nae(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=K0(e[n]);return Q0(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function rae(e){const t=e;return Q0(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function iae(e){return Q0(t);function t(n){return n&&n.type===e}}function Q0(e){return t;function t(n,r,i){return!!(sae(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function oae(){return!0}function sae(e){return e!==null&&typeof e=="object"&&"type"in e}const jj=[],aae=!0,zx=!1,lae="skip";function Oj(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=K0(i),a=r?-1:1;c(e,void 0,[])();function c(u,h,m){const p=u&&typeof u=="object"?u:{};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 ("+(u.type+(x?"<"+x+">":""))+")"})}return y;function y(){let x=jj,b,w,E;if((!t||s(u,h,m[m.length-1]||void 0))&&(x=cae(n(u,m)),x[0]===zx))return x;if("children"in u&&u.children){const k=u;if(k.children&&x[0]!==lae)for(w=(r?k.children.length:-1)+a,E=m.concat(k);w>-1&&w<k.children.length;){const T=k.children[w];if(b=c(T,w,E)(),b[0]===zx)return b;w=typeof b[1]=="number"?b[1]:w+a}}return x}}}function cae(e){return Array.isArray(e)?e:typeof e=="number"?[aae,e]:e==null?jj:[e]}function yw(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Oj(e,s,c,i);function c(u,h){const m=h[h.length-1],p=m?m.children.indexOf(u):void 0;return a(u,p,m)}}const Fx={}.hasOwnProperty,uae={};function dae(e,t){const n=t||uae,r=new Map,i=new Map,s=new Map,a={...Gse,...n.handlers},c={all:h,applyData:hae,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:u,options:n,patch:fae,wrap:mae};return yw(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:i,y=String(m.identifier).toUpperCase();p.has(y)||p.set(y,m)}}),c;function u(m,p){const y=m.type,x=c.handlers[y];if(Fx.call(c.handlers,y)&&x)return x(c,m,p);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in m){const{children:w,...E}=m,k=Jm(E);return k.children=c.all(m),k}return Jm(m)}return(c.options.unknownHandler||pae)(c,m,p)}function h(m){const p=[];if("children"in m){const y=m.children;let x=-1;for(;++x<y.length;){const b=c.one(y[x],m);if(b){if(x&&y[x-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=hT(b.value)),!Array.isArray(b)&&b.type==="element")){const w=b.children[0];w&&w.type==="text"&&(w.value=hT(w.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function fae(e,t){e.position&&(t.position=eie(e))}function hae(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,Jm(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function pae(e,t){const n=t.data||{},r="value"in t&&!(Fx.call(n,"hProperties")||Fx.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 mae(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 hT(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function pT(e,t){const n=dae(e,t),r=n.one(e,void 0),i=tae(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
100
+ `},i),s}function gae(e,t){return e&&"run"in e?async function(n,r){const i=pT(n,{file:r,...t});await e.run(i,r)}:function(n,r){return pT(n,{file:r,...e||t})}}function mT(e){if(e)throw e}var cy,gT;function yae(){if(gT)return cy;gT=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},s=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!p)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},a=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(r)return r(h,m).value}else return;return h[m]};return cy=function u(){var h,m,p,y,x,b,w=arguments[0],E=1,k=arguments.length,T=!1;for(typeof w=="boolean"&&(T=w,w=arguments[1]||{},E=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});E<k;++E)if(h=arguments[E],h!=null)for(m in h)p=c(w,m),y=c(h,m),w!==y&&(T&&y&&(s(y)||(x=i(y)))?(x?(x=!1,b=p&&i(p)?p:[]):b=p&&s(p)?p:{},a(w,{name:m,newValue:u(T,b,y)})):typeof y<"u"&&a(w,{name:m,newValue:y}));return w},cy}var xae=yae();const uy=eu(xae);function Bx(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 bae(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...i);function c(u,...h){const m=e[++s];let p=-1;if(u){a(u);return}for(;++p<i.length;)(h[p]===null||h[p]===void 0)&&(h[p]=i[p]);i=h,m?vae(m,c)(...h):a(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function vae(e,t){let n;return r;function r(...a){const c=e.length>a.length;let u;c&&a.push(i);try{u=e.apply(this,a)}catch(h){const m=h;if(c&&n)throw m;return i(m)}c||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(a,...c){n||(n=!0,t(a,...c))}function s(a){i(null,a)}}const bo={basename:wae,dirname:Sae,extname:Cae,join:Eae,sep:"/"};function wae(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qf(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Sae(e){if(Qf(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 Cae(e){Qf(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Eae(...e){let t=-1,n;for(;++t<e.length;)Qf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":kae(n)}function kae(e){Qf(e);const t=e.codePointAt(0)===47;let n=Tae(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Tae(e,t){let n="",r=0,i=-1,s=0,a=-1,c,u;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else c===46&&s>-1?s++:s=-1}return n}function Qf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Nae={cwd:Rae};function Rae(){return"/"}function Hx(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Aae(e){if(typeof e=="string")e=new URL(e);else if(!Hx(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 jae(e)}function jae(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 dy=["history","path","basename","stem","extname","dirname"];class Mj{constructor(t){let n;t?Hx(t)?n={path:t}:typeof t=="string"||Oae(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Nae.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<dy.length;){const s=dy[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)dy.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?bo.basename(this.path):void 0}set basename(t){hy(t,"basename"),fy(t,"basename"),this.path=bo.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?bo.dirname(this.path):void 0}set dirname(t){yT(this.basename,"dirname"),this.path=bo.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?bo.extname(this.path):void 0}set extname(t){if(fy(t,"extname"),yT(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=bo.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hx(t)&&(t=Aae(t)),hy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?bo.basename(this.path,this.extname):void 0}set stem(t){hy(t,"stem"),fy(t,"stem"),this.path=bo.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 Dr(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 fy(e,t){if(e&&e.includes(bo.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+bo.sep+"`")}function hy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yT(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Oae(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Mae=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),Dae={}.hasOwnProperty;class xw extends Mae{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=bae()}copy(){const t=new xw;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(uy(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(gy("data",this.frozen),this.namespace[t]=n,this):Dae.call(this.namespace,t)&&this.namespace[t]||void 0:t?(gy("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=Fp(t),r=this.parser||this.Parser;return py("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),py("process",this.parser||this.Parser),my("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const c=Fp(t),u=r.parse(c);r.run(u,c,function(m,p,y){if(m||!p||!y)return h(m);const x=p,b=r.stringify(x,y);Iae(b)?y.value=b:y.result=b,h(m,y)});function h(m,p){m||!p?a(m):s?s(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),py("processSync",this.parser||this.Parser),my("processSync",this.compiler||this.Compiler),this.process(t,i),bT("processSync","process",n),r;function i(s,a){n=!0,mT(s),r=a}}run(t,n,r){xT(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,c){const u=Fp(n);i.run(t,u,h);function h(m,p,y){const x=p||t;m?c(m):a?a(x):r(void 0,x,y)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),bT("runSync","run",r),i;function s(a,c){mT(a),i=c,r=!0}}stringify(t,n){this.freeze();const r=Fp(n),i=this.compiler||this.Compiler;return my("stringify",i),xT(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(gy("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...p]=h;u(m,p)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(i.settings=uy(!0,i.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const p=h[m];s(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,m){let p=-1,y=-1;for(;++p<r.length;)if(r[p][0]===h){y=p;break}if(y===-1)r.push([h,...m]);else if(m.length>0){let[x,...b]=m;const w=r[y][1];Bx(w)&&Bx(x)&&(x=uy(!0,w,x)),r[y]=[h,x,...b]}}}}const _ae=new xw().freeze();function py(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function my(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function gy(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 xT(e){if(!Bx(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bT(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fp(e){return Lae(e)?e:new Mj(e)}function Lae(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Iae(e){return typeof e=="string"||Pae(e)}function Pae(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zae="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vT=[],wT={allowDangerousHtml:!0},Fae=/^(https?|ircs?|mailto|xmpp)$/i,Bae=[{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 Dj(e){const t=Hae(e),n=Uae(e);return qae(t.runSync(t.parse(n),n),e)}function Hae(e){const t=e.rehypePlugins||vT,n=e.remarkPlugins||vT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wT}:wT;return _ae().use(Sse).use(n).use(gae,r).use(t)}function Uae(e){const t=e.children||"",n=new Mj;return typeof t=="string"&&(n.value=t),n}function qae(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,u=t.urlTransform||Vae;for(const m of Bae)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+zae+m.id,void 0);return yw(e,h),oie(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function h(m,p,y){if(m.type==="raw"&&y&&typeof p=="number")return a?y.children.splice(p,1):y.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let x;for(x in sy)if(Object.hasOwn(sy,x)&&Object.hasOwn(m.properties,x)){const b=m.properties[x],w=sy[x];(w===null||w.includes(m.tagName))&&(m.properties[x]=u(String(b||""),x,m))}}if(m.type==="element"){let x=n?!n.includes(m.tagName):s?s.includes(m.tagName):!1;if(!x&&r&&typeof p=="number"&&(x=!r(m,p,y)),x&&y&&typeof p=="number")return c&&m.children?y.children.splice(p,1,...m.children):y.children.splice(p,1),p}}}function Vae(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||Fae.test(e.slice(0,t))?e:""}var yy={exports:{}},ST;function $ae(){return ST||(ST=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(s,a){return i.apply(null,[s].concat(a))}function i(s){for(var a=1,c=[].slice.call(arguments),u=0,h=s.length,m="",p,y=!1,x,b,w=!1,E,k=function(){return c[a++]},T=function(){for(var N="";/\d/.test(s[u]);)N+=s[u++],p=s[u];return N.length>0?parseInt(N):null};u<h;++u)if(p=s[u],y)switch(y=!1,p=="."?(w=!1,p=s[++u]):p=="0"&&s[u+1]=="."?(w=!0,u+=2,p=s[u]):w=!0,E=T(),p){case"b":m+=parseInt(k(),10).toString(2);break;case"c":x=k(),typeof x=="string"||x instanceof String?m+=x:m+=String.fromCharCode(parseInt(x,10));break;case"d":m+=parseInt(k(),10);break;case"f":b=String(parseFloat(k()).toFixed(E||6)),m+=w?b:b.replace(/^0/,"");break;case"j":m+=JSON.stringify(k());break;case"o":m+="0"+parseInt(k(),10).toString(8);break;case"s":m+=k();break;case"x":m+="0x"+parseInt(k(),10).toString(16);break;case"X":m+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:m+=p;break}else p==="%"?y=!0:m+=p;return m}})()})(yy)),yy.exports}var Yae=$ae();const Wae=eu(Yae),Bp=Object.assign(nl(Error),{eval:nl(EvalError),range:nl(RangeError),reference:nl(ReferenceError),syntax:nl(SyntaxError),type:nl(TypeError),uri:nl(URIError)});function nl(e){return t.displayName=e.displayName||e.name,t;function t(n,...r){const i=n&&Wae(n,...r);return new e(i)}}const Hp={}.hasOwnProperty,CT={yaml:"-",toml:"+"};function bw(e){const t=[];let n=-1;const r=Array.isArray(e)?e:e?[e]:["yaml"];for(;++n<r.length;)t[n]=Gae(r[n]);return t}function Gae(e){let t=e;if(typeof t=="string"){if(!Hp.call(CT,t))throw Bp("Missing matter definition for `%s`",t);t={type:t,marker:CT[t]}}else if(typeof t!="object")throw Bp("Expected matter to be an object, not `%j`",t);if(!Hp.call(t,"type"))throw Bp("Missing `type` in matter `%j`",t);if(!Hp.call(t,"fence")&&!Hp.call(t,"marker"))throw Bp("Missing `marker` or `fence` in matter `%j`",t);return t}function Kae(e){const t=bw(e),n={};let r=-1;for(;++r<t.length;){const i=t[r],s=Ux(i,"open").charCodeAt(0),a=Qae(i),c=n[s];Array.isArray(c)?c.push(a):n[s]=[a]}return{flow:n}}function Qae(e){const t=e.anywhere,n=e.type,r=n+"Fence",i=r+"Sequence",s=n+"Value",a={tokenize:m,partial:!0};let c,u=0;return{tokenize:h,concrete:!0};function h(p,y,x){const b=this;return w;function w(R){const _=b.now();return _.column===1&&(_.line===1||t)&&(c=Ux(e,"open"),u=0,R===c.charCodeAt(u))?(p.enter(n),p.enter(r),p.enter(i),E(R)):x(R)}function E(R){return u===c.length?(p.exit(i),_t(R)?(p.enter("whitespace"),k(R)):T(R)):R===c.charCodeAt(u++)?(p.consume(R),E):x(R)}function k(R){return _t(R)?(p.consume(R),k):(p.exit("whitespace"),T(R))}function T(R){return mt(R)?(p.exit(r),p.enter("lineEnding"),p.consume(R),p.exit("lineEnding"),c=Ux(e,"close"),u=0,p.attempt(a,A,N)):x(R)}function N(R){return R===null||mt(R)?j(R):(p.enter(s),O(R))}function O(R){return R===null||mt(R)?(p.exit(s),j(R)):(p.consume(R),O)}function j(R){return R===null?x(R):(p.enter("lineEnding"),p.consume(R),p.exit("lineEnding"),p.attempt(a,A,N))}function A(R){return p.exit(n),y(R)}}function m(p,y,x){let b=0;return w;function w(N){return N===c.charCodeAt(b)?(p.enter(r),p.enter(i),E(N)):x(N)}function E(N){return b===c.length?(p.exit(i),_t(N)?(p.enter("whitespace"),k(N)):T(N)):N===c.charCodeAt(b++)?(p.consume(N),E):x(N)}function k(N){return _t(N)?(p.consume(N),k):(p.exit("whitespace"),T(N))}function T(N){return N===null||mt(N)?(p.exit(r),y(N)):x(N)}}}function Ux(e,t){return e.marker?ET(e.marker,t).repeat(3):ET(e.fence,t)}function ET(e,t){return typeof e=="string"?e:e[t]}function Xae(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Zae(e){const t=bw(e),n={},r={};let i=-1;for(;++i<t.length;){const s=t[i];n[s.type]=Jae(s),r[s.type]=ele,r[s.type+"Value"]=tle}return{enter:n,exit:r}}function Jae(e){return t;function t(n){this.enter({type:e.type,value:""},n),this.buffer()}}function ele(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 tle(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function nle(e){const t=[],n={},r=bw(e);let i=-1;for(;++i<r.length;){const s=r[i];n[s.type]=rle(s);const a=qx(s,"open");t.push({atBreak:!0,character:a.charAt(0),after:Xae(a.charAt(1))})}return{unsafe:t,handlers:n}}function rle(e){const t=qx(e,"open"),n=qx(e,"close");return r;function r(i){return t+(i.value?`
101
+ `+i.value:"")+`
102
+ `+n}}function qx(e,t){return e.marker?kT(e.marker,t).repeat(3):kT(e.fence,t)}function kT(e,t){return typeof e=="string"?e:e[t]}const ile="yaml";function ole(e){const t=this,n=e||ile,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Kae(n)),s.push(Zae(n)),a.push(nle(n))}function TT(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 sle(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ale(e,t,n){const i=K0((n||{}).ignore||[]),s=lle(t);let a=-1;for(;++a<s.length;)Oj(e,"text",c);function c(h,m){let p=-1,y;for(;++p<m.length;){const x=m[p],b=y?y.children:void 0;if(i(x,b?b.indexOf(x):void 0,y))return;y=x}if(y)return u(h,m)}function u(h,m){const p=m[m.length-1],y=s[a][0],x=s[a][1];let b=0;const E=p.children.indexOf(h);let k=!1,T=[];y.lastIndex=0;let N=y.exec(h.value);for(;N;){const O=N.index,j={index:N.index,input:N.input,stack:[...m,h]};let A=x(...N,j);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?y.lastIndex=O+1:(b!==O&&T.push({type:"text",value:h.value.slice(b,O)}),Array.isArray(A)?T.push(...A):A&&T.push(A),b=O+N[0].length,k=!0),!y.global)break;N=y.exec(h.value)}return k?(b<h.value.length&&T.push({type:"text",value:h.value.slice(b)}),p.children.splice(E,1,...T)):T=[h],E+T.length}}function lle(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([cle(i[0]),ule(i[1])])}return t}function cle(e){return typeof e=="string"?new RegExp(sle(e),"g"):e}function ule(e){return typeof e=="function"?e:function(){return e}}const xy="phrasing",by=["autolink","link","image","label"];function dle(){return{transforms:[xle],enter:{literalAutolink:hle,literalAutolinkEmail:vy,literalAutolinkHttp:vy,literalAutolinkWww:vy},exit:{literalAutolink:yle,literalAutolinkEmail:gle,literalAutolinkHttp:ple,literalAutolinkWww:mle}}}function fle(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xy,notInConstruct:by},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xy,notInConstruct:by},{character:":",before:"[ps]",after:"\\/",inConstruct:xy,notInConstruct:by}]}}function hle(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vy(e){this.config.enter.autolinkProtocol.call(this,e)}function ple(e){this.config.exit.autolinkProtocol.call(this,e)}function mle(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 gle(e){this.config.exit.autolinkEmail.call(this,e)}function yle(e){this.exit(e)}function xle(e){ale(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ble],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),vle]],{ignore:["link","linkReference"]})}function ble(e,t,n,r,i){let s="";if(!_j(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!wle(n)))return!1;const a=Sle(n+r);if(!a[0])return!1;const c={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function vle(e,t,n,r){return!_j(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function wle(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 Sle(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=TT(e,"(");let s=TT(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function _j(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||wl(n)||Y0(n))&&(!t||n!==47)}Lj.peek=Ole;function Cle(){this.buffer()}function Ele(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function kle(){this.buffer()}function Tle(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Nle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=co(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Rle(e){this.exit(e)}function Ale(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=co(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jle(e){this.exit(e)}function Ole(){return"["}function Lj(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),c(),a(),s+=i.move("]"),s}function Mle(){return{enter:{gfmFootnoteCallString:Cle,gfmFootnoteCall:Ele,gfmFootnoteDefinitionLabelString:kle,gfmFootnoteDefinition:Tle},exit:{gfmFootnoteCallString:Nle,gfmFootnoteCall:Rle,gfmFootnoteDefinitionLabelString:Ale,gfmFootnoteDefinition:jle}}}function Dle(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Lj},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const c=s.createTracker(a);let u=c.move("[^");const h=s.enter("footnoteDefinition"),m=s.enter("label");return u+=c.move(s.safe(s.associationId(r),{before:u,after:"]"})),m(),u+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),u+=c.move((t?`
103
+ `:" ")+s.indentLines(s.containerFlow(r,c.current()),t?Ij:_le))),h(),u}}function _le(e,t,n){return t===0?e:Ij(e,t,n)}function Ij(e,t,n){return(n?"":" ")+e}const Lle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Pj.peek=Ble;function Ile(){return{canContainEols:["delete"],enter:{strikethrough:zle},exit:{strikethrough:Fle}}}function Ple(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Lle}],handlers:{delete:Pj}}}function zle(e){this.enter({type:"delete",children:[]},e)}function Fle(e){this.exit(e)}function Pj(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function Ble(){return"~"}function Hle(e){return e.length}function Ule(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Hle,s=[],a=[],c=[],u=[];let h=0,m=-1;for(;++m<e.length;){const w=[],E=[];let k=-1;for(e[m].length>h&&(h=e[m].length);++k<e[m].length;){const T=qle(e[m][k]);if(n.alignDelimiters!==!1){const N=i(T);E[k]=N,(u[k]===void 0||N>u[k])&&(u[k]=N)}w.push(T)}a[m]=w,c[m]=E}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<h;)s[p]=NT(r[p]);else{const w=NT(r);for(;++p<h;)s[p]=w}p=-1;const y=[],x=[];for(;++p<h;){const w=s[p];let E="",k="";w===99?(E=":",k=":"):w===108?E=":":w===114&&(k=":");let T=n.alignDelimiters===!1?1:Math.max(1,u[p]-E.length-k.length);const N=E+"-".repeat(T)+k;n.alignDelimiters!==!1&&(T=E.length+T+k.length,T>u[p]&&(u[p]=T),x[p]=T),y[p]=N}a.splice(1,0,y),c.splice(1,0,x),m=-1;const b=[];for(;++m<a.length;){const w=a[m],E=c[m];p=-1;const k=[];for(;++p<h;){const T=w[p]||"";let N="",O="";if(n.alignDelimiters!==!1){const j=u[p]-(E[p]||0),A=s[p];A===114?N=" ".repeat(j):A===99?j%2?(N=" ".repeat(j/2+.5),O=" ".repeat(j/2-.5)):(N=" ".repeat(j/2),O=N):O=" ".repeat(j)}n.delimiterStart!==!1&&!p&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||p)&&k.push(" "),n.alignDelimiters!==!1&&k.push(N),k.push(T),n.alignDelimiters!==!1&&k.push(O),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||p!==h-1)&&k.push("|")}b.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return b.join(`
104
+ `)}function qle(e){return e==null?"":String(e)}function NT(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 Vle(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),$le);return i(),a}function $le(e,t,n){return">"+(n?"":" ")+e}function Yle(e,t){return RT(e,t.inConstruct,!0)&&!RT(e,t.notInConstruct,!1)}function RT(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 AT(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
105
+ `&&Yle(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
106
+ `}function Wle(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function Gle(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 Kle(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 Qle(e,t,n,r){const i=Kle(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Gle(e,n)){const p=n.enter("codeIndented"),y=n.indentLines(s,Xle);return p(),y}const c=n.createTracker(r),u=i.repeat(Math.max(Wle(s,i)+1,3)),h=n.enter("codeFenced");let m=c.move(u);if(e.lang){const p=n.enter(`codeFencedLang${a}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
107
+ `,encode:["`"],...c.current()})),p()}return m+=c.move(`
108
+ `),s&&(m+=c.move(s+`
109
+ `)),m+=c.move(u),h(),m}function Xle(e,t,n){return(n?"":" ")+e}function vw(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 Zle(e,t,n,r){const i=vw(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const u=n.createTracker(r);let h=u.move("[");return h+=u.move(n.safe(n.associationId(e),{before:h,after:"]",...u.current()})),h+=u.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(c=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,{before:h,after:e.title?" ":`
110
+ `,...u.current()}))),c(),e.title&&(c=n.enter(`title${s}`),h+=u.move(" "+i),h+=u.move(n.safe(e.title,{before:h,after:i,...u.current()})),h+=u.move(i),c()),a(),h}function Jle(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 yf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function e0(e,t,n){const r=Zc(e),i=Zc(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}}zj.peek=ece;function zj(e,t,n,r){const i=Jle(n),s=n.enter("emphasis"),a=n.createTracker(r),c=a.move(i);let u=a.move(n.containerPhrasing(e,{after:i,before:c,...a.current()}));const h=u.charCodeAt(0),m=e0(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(u=yf(h)+u.slice(1));const p=u.charCodeAt(u.length-1),y=e0(r.after.charCodeAt(0),p,i);y.inside&&(u=u.slice(0,-1)+yf(p));const x=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+u+x}function ece(e,t,n){return n.options.emphasis||"*"}function tce(e,t){let n=!1;return yw(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,zx}),!!((!e.depth||e.depth<3)&&dw(e)&&(t.options.setext||n))}function nce(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(tce(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),y=n.containerPhrasing(e,{...s.current(),before:`
111
+ `,after:`
112
+ `});return p(),m(),y+`
113
+ `+(i===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
114
+ `))+1))}const a="#".repeat(i),c=n.enter("headingAtx"),u=n.enter("phrasing");s.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
115
+ `,...s.current()});return/^[\t ]/.test(h)&&(h=yf(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),u(),c(),h}Fj.peek=rce;function Fj(e){return e.value||""}function rce(){return"<"}Bj.peek=ice;function Bj(e,t,n,r){const i=vw(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const u=n.createTracker(r);let h=u.move("![");return h+=u.move(n.safe(e.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(c=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),c(),e.title&&(c=n.enter(`title${s}`),h+=u.move(" "+i),h+=u.move(n.safe(e.title,{before:h,after:i,...u.current()})),h+=u.move(i),c()),h+=u.move(")"),a(),h}function ice(){return"!"}Hj.peek=oce;function Hj(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("![");const h=n.safe(e.alt,{before:u,after:"]",...c.current()});u+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:u,after:"]",...c.current()});return a(),n.stack=m,s(),i==="full"||!h||h!==p?u+=c.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=c.move("]"),u}function oce(){return"!"}Uj.peek=sce;function Uj(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],c=n.compilePattern(a);let u;if(a.atBreak)for(;u=c.exec(r);){let h=u.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(u.index+1)}}return i+r+i}function sce(){return"`"}function qj(e,t){const n=dw(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))}Vj.peek=ace;function Vj(e,t,n,r){const i=vw(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let c,u;if(qj(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),c(),n.stack=m,p}c=n.enter("link"),u=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(u=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${s}`),h+=a.move(" "+i),h+=a.move(n.safe(e.title,{before:h,after:i,...a.current()})),h+=a.move(i),u()),h+=a.move(")"),c(),h}function ace(e,t,n){return qj(e,n)?"<":"["}$j.peek=lce;function $j(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("[");const h=n.containerPhrasing(e,{before:u,after:"]",...c.current()});u+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:u,after:"]",...c.current()});return a(),n.stack=m,s(),i==="full"||!h||h!==p?u+=c.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=c.move("]"),u}function lce(){return"["}function ww(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 cce(e){const t=ww(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 uce(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 Yj(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 dce(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?uce(n):ww(n);const c=e.ordered?a==="."?")":".":cce(n);let u=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.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&&(u=!0),Yj(n)===a&&m){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"){u=!0;break}}}}u&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),h}function fce(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 hce(e,t,n,r){const i=fce(n);let s=n.bulletCurrent||ww(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(r);c.move(s+" ".repeat(a-s.length)),c.shift(a);const u=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return u(),h;function m(p,y,x){return y?(x?"":" ".repeat(a))+p:(x?s:s+" ".repeat(a-s.length))+p}}function pce(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const mce=K0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gce(e,t,n,r){return(e.children.some(function(a){return mce(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function yce(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Wj.peek=xce;function Wj(e,t,n,r){const i=yce(n),s=n.enter("strong"),a=n.createTracker(r),c=a.move(i+i);let u=a.move(n.containerPhrasing(e,{after:i,before:c,...a.current()}));const h=u.charCodeAt(0),m=e0(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(u=yf(h)+u.slice(1));const p=u.charCodeAt(u.length-1),y=e0(r.after.charCodeAt(0),p,i);y.inside&&(u=u.slice(0,-1)+yf(p));const x=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+u+x}function xce(e,t,n){return n.options.strong||"*"}function bce(e,t,n,r){return n.safe(e.value,r)}function vce(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 wce(e,t,n){const r=(Yj(n)+(n.options.ruleSpaces?" ":"")).repeat(vce(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Gj={blockquote:Vle,break:AT,code:Qle,definition:Zle,emphasis:zj,hardBreak:AT,heading:nce,html:Fj,image:Bj,imageReference:Hj,inlineCode:Uj,link:Vj,linkReference:$j,list:dce,listItem:hce,paragraph:pce,root:gce,strong:Wj,text:bce,thematicBreak:wce};function Sce(){return{enter:{table:Cce,tableData:jT,tableHeader:jT,tableRow:kce},exit:{codeText:Tce,table:Ece,tableData:wy,tableHeader:wy,tableRow:wy}}}function Cce(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 Ece(e){this.exit(e),this.data.inTable=void 0}function kce(e){this.enter({type:"tableRow",children:[]},e)}function wy(e){this.exit(e)}function jT(e){this.enter({type:"tableCell",children:[]},e)}function Tce(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Nce));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Nce(e,t){return t==="|"?t:e}function Rce(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=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:a,tableCell:u,tableRow:c}};function a(x,b,w,E){return h(m(x,w,E),x.align)}function c(x,b,w,E){const k=p(x,w,E),T=h([k]);return T.slice(0,T.indexOf(`
117
+ `))}function u(x,b,w,E){const k=w.enter("tableCell"),T=w.enter("phrasing"),N=w.containerPhrasing(x,{...E,before:s,after:s});return T(),k(),N}function h(x,b){return Ule(x,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function m(x,b,w){const E=x.children;let k=-1;const T=[],N=b.enter("table");for(;++k<E.length;)T[k]=p(E[k],b,w);return N(),T}function p(x,b,w){const E=x.children;let k=-1;const T=[],N=b.enter("tableRow");for(;++k<E.length;)T[k]=u(E[k],x,b,w);return N(),T}function y(x,b,w){let E=Gj.inlineCode(x,b,w);return w.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function Ace(){return{exit:{taskListCheckValueChecked:OT,taskListCheckValueUnchecked:OT,paragraph:Oce}}}function jce(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mce}}}function OT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Oce(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 s=-1,a;for(;++s<i.length;){const c=i[s];if(c.type==="paragraph"){a=c;break}}a===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 Mce(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);s&&c.move(a);let u=Gj.listItem(e,t,n,{...r,...c.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(m){return m+a}}function Dce(){return[dle(),Mle(),Ile(),Sce(),Ace()]}function _ce(e){return{extensions:[fle(),Dle(e),Ple(),Rce(e),jce()]}}const Lce={tokenize:Hce,partial:!0},Kj={tokenize:Uce,partial:!0},Qj={tokenize:qce,partial:!0},Xj={tokenize:Vce,partial:!0},Ice={tokenize:$ce,partial:!0},Zj={name:"wwwAutolink",tokenize:Fce,previous:eO},Jj={name:"protocolAutolink",tokenize:Bce,previous:tO},Ns={name:"emailAutolink",tokenize:zce,previous:nO},_o={};function Pce(){return{text:_o}}let rl=48;for(;rl<123;)_o[rl]=Ns,rl++,rl===58?rl=65:rl===91&&(rl=97);_o[43]=Ns;_o[45]=Ns;_o[46]=Ns;_o[95]=Ns;_o[72]=[Ns,Jj];_o[104]=[Ns,Jj];_o[87]=[Ns,Zj];_o[119]=[Ns,Zj];function zce(e,t,n){const r=this;let i,s;return a;function a(p){return!Vx(p)||!nO.call(r,r.previous)||Sw(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(p))}function c(p){return Vx(p)?(e.consume(p),c):p===64?(e.consume(p),u):n(p)}function u(p){return p===46?e.check(Ice,m,h)(p):p===45||p===95||jr(p)?(s=!0,e.consume(p),u):m(p)}function h(p){return e.consume(p),i=!0,u}function m(p){return s&&i&&Hr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Fce(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!eO.call(r,r.previous)||Sw(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lce,e.attempt(Kj,e.attempt(Qj,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Bce(e,t,n){const r=this;let i="",s=!1;return a;function a(p){return(p===72||p===104)&&tO.call(r,r.previous)&&!Sw(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),c):n(p)}function c(p){if(Hr(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),u}return n(p)}function u(p){return p===47?(e.consume(p),s?h:(s=!0,u)):n(p)}function h(p){return p===null||Xm(p)||Sn(p)||wl(p)||Y0(p)?n(p):e.attempt(Kj,e.attempt(Qj,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Hce(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function Uce(e,t,n){let r,i,s;return a;function a(h){return h===46||h===95?e.check(Xj,u,c)(h):h===null||Sn(h)||wl(h)||h!==45&&Y0(h)?u(h):(s=!0,e.consume(h),a)}function c(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),a}function u(h){return i||r||!s?n(h):t(h)}}function qce(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Xj,t,s)(a):a===null||Sn(a)||wl(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function Vce(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),s):c===93?(e.consume(c),i):c===60||c===null||Sn(c)||wl(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Sn(c)||wl(c)?t(c):r(c)}function s(c){return Hr(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):Hr(c)?(e.consume(c),a):n(c)}}function $ce(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return jr(s)?n(s):t(s)}}function eO(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Sn(e)}function tO(e){return!Hr(e)}function nO(e){return!(e===47||Vx(e))}function Vx(e){return e===43||e===45||e===46||e===95||jr(e)}function Sw(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 Yce={tokenize:eue,partial:!0};function Wce(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Xce,continuation:{tokenize:Zce},exit:Jce}},text:{91:{name:"gfmFootnoteCall",tokenize:Qce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Gce,resolveTo:Kce}}}}function Gce(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return c;function c(u){if(!a||!a._balanced)return n(u);const h=co(r.sliceSerialize({start:a.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Kce(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function Qce(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return c;function c(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),u}function u(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(s>999||p===93&&!a||p===null||p===91||Sn(p))return n(p);if(p===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return i.includes(co(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Sn(p)||(a=!0),s++,e.consume(p),p===92?m:h}function m(p){return p===91||p===92||p===93?(e.consume(p),s++,h):h(p)}}function Xce(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,c;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(b)}function m(b){if(a>999||b===93&&!c||b===null||b===91||Sn(b))return n(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return s=co(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Sn(b)||(c=!0),a++,e.consume(b),b===92?p:m}function p(b){return b===91||b===92||b===93?(e.consume(b),a++,m):m(b)}function y(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(s)||i.push(s),Jt(e,x,"gfmFootnoteDefinitionWhitespace")):n(b)}function x(b){return t(b)}}function Zce(e,t,n){return e.check(Kf,t,e.attempt(Yce,t,n))}function Jce(e){e.exit("gfmFootnoteDefinition")}function eue(e,t,n){const r=this;return Jt(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function tue(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,c){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let h=u;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[u][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[u][1].end)},p={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[u][1].start)},y=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",p,c]],x=c.parser.constructs.insideSpan.null;x&&Si(y,y.length,0,W0(x,a.slice(h+1,u),c)),Si(y,y.length,0,[["exit",p,c],["enter",a[u][1],c],["exit",a[u][1],c],["exit",m,c]]),Si(a,h-1,u-h+3,y),u=h+y.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function s(a,c,u){const h=this.previous,m=this.events;let p=0;return y;function y(b){return h===126&&m[m.length-1][1].type!=="characterEscape"?u(b):(a.enter("strikethroughSequenceTemporary"),x(b))}function x(b){const w=Zc(h);if(b===126)return p>1?u(b):(a.consume(b),p++,x);if(p<2&&!n)return u(b);const E=a.exit("strikethroughSequenceTemporary"),k=Zc(b);return E._open=!k||k===2&&!!w,E._close=!w||w===2&&!!k,c(b)}}}class nue{constructor(){this.map=[]}add(t,n,r){rue(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[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 s of i)t.push(s);i=r.pop()}this.map.length=0}}function rue(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 iue(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 s=r.length-1;r[s]=r[s]==="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 oue(){return{flow:{null:{name:"table",tokenize:sue,resolveAll:aue}}}}function sue(e,t,n){const r=this;let i=0,s=0,a;return c;function c(I){let H=r.events.length-1;for(;H>-1;){const $=r.events[H][1].type;if($==="lineEnding"||$==="linePrefix")H--;else break}const q=H>-1?r.events[H][1].type:null,V=q==="tableHead"||q==="tableRow"?A:u;return V===A&&r.parser.lazy[r.now().line]?n(I):V(I)}function u(I){return e.enter("tableHead"),e.enter("tableRow"),h(I)}function h(I){return I===124||(a=!0,s+=1),m(I)}function m(I){return I===null?n(I):mt(I)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),x):n(I):_t(I)?Jt(e,m,"whitespace")(I):(s+=1,a&&(a=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),p(I)))}function p(I){return I===null||I===124||Sn(I)?(e.exit("data"),m(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"),a=!1,_t(I)?Jt(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?E(I):I===124?(a=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),w):j(I)}function w(I){return _t(I)?Jt(e,E,"whitespace")(I):E(I)}function E(I){return I===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),k):I===45?(s+=1,k(I)):I===null||mt(I)?O(I):j(I)}function k(I){return I===45?(e.enter("tableDelimiterFiller"),T(I)):j(I)}function T(I){return I===45?(e.consume(I),T):I===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(I))}function N(I){return _t(I)?Jt(e,O,"whitespace")(I):O(I)}function O(I){return I===124?b(I):I===null||mt(I)?!a||i!==s?j(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):j(I)}function j(I){return n(I)}function A(I){return e.enter("tableRow"),R(I)}function R(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),R):I===null||mt(I)?(e.exit("tableRow"),t(I)):_t(I)?Jt(e,R,"whitespace")(I):(e.enter("data"),_(I))}function _(I){return I===null||I===124||Sn(I)?(e.exit("data"),R(I)):(e.consume(I),I===92?F:_)}function F(I){return I===92||I===124?(e.consume(I),_):_(I)}}function aue(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],c=!1,u=0,h,m,p;const y=new nue;for(;++n<e.length;){const x=e[n],b=x[1];x[0]==="enter"?b.type==="tableHead"?(c=!1,u!==0&&(MT(y,t,u,h,m),m=void 0,u=0),h={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},y.add(n,0,[["enter",h,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,p=void 0,s=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},y.add(n,0,[["enter",m,t]])),i=b.type==="tableDelimiterRow"?2:m?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],p=Up(y,t,s,i,void 0,p),s=[0,0,0,0]),a[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],p=Up(y,t,s,i,void 0,p)),s=a,a=[s[1],n,0,0])):b.type==="tableHead"?(c=!0,u=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=n,s[1]!==0?(a[0]=a[1],p=Up(y,t,s,i,n,p)):a[1]!==0&&(p=Up(y,t,a,i,n,p)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&MT(y,t,u,h,m),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=iue(t.events,n))}return e}function Up(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},Cc(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const u=Cc(t.events,n[1]);if(s={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const h=Cc(t.events,n[2]),m=Cc(t.events,n[3]),p={type:c,start:Object.assign({},h),end:Object.assign({},m)};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 b=n[2]+1,w=n[3]-n[2]-1;e.add(b,w,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(s.end=Object.assign({},Cc(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function MT(e,t,n,r,i){const s=[],a=Cc(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Cc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lue={name:"tasklistCheck",tokenize:uue};function cue(){return{text:{91:lue}}}function uue(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return Sn(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(u)}function c(u){return mt(u)?t(u):_t(u)?e.check({tokenize:due},t,n)(u):n(u)}}function due(e,t,n){return Jt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fue(e){return fj([Pce(),Wce(),tue(e),oue(),cue()])}const hue={};function rO(e){const t=this,n=e||hue,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fue(n)),s.push(Dce()),a.push(_ce(n))}function pue(e){return e.includes("<<<<<<<")&&e.includes("=======")&&e.includes(">>>>>>>")}function mue(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 gue(e,t){if(e==null)return{};var n,r,i=mue(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $x(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 yue(e){if(Array.isArray(e))return $x(e)}function xue(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bue(e,t){if(e){if(typeof e=="string")return $x(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)?$x(e,t):void 0}}function vue(){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 Yx(e){return yue(e)||xue(e)||bue(e)||vue()}function xf(e){"@babel/helpers - typeof";return xf=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},xf(e)}function wue(e,t){if(xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sue(e){var t=wue(e,"string");return xf(t)=="symbol"?t:t+""}function iO(e,t,n){return(t=Sue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wx(){return Wx=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},Wx.apply(null,arguments)}function DT(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 Rc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DT(Object(n),!0).forEach(function(r){iO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cue(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 Sy={};function Eue(e){if(e.length===0||e.length===1)return e;var t=e.join(".");return Sy[t]||(Sy[t]=Cue(e)),Sy[t]}function kue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter(function(s){return s!=="token"}),i=Eue(r);return i.reduce(function(s,a){return Rc(Rc({},s),n[a])},t)}function _T(e){return e.join(" ")}function Tue(e,t){var n=0;return function(r){return n+=1,r.map(function(i,s){return oO({node:i,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(s)})})}}function oO(e){var t=e.node,n=e.stylesheet,r=e.style,i=r===void 0?{}:r,s=e.useInlineStyles,a=e.key,c=t.properties,u=t.type,h=t.tagName,m=t.value;if(u==="text")return m;if(h){var p=Tue(n,s),y;if(!s)y=Rc(Rc({},c),{},{className:_T(c.className)});else{var x=Object.keys(n).reduce(function(k,T){return T.split(".").forEach(function(N){k.includes(N)||k.push(N)}),k},[]),b=c.className&&c.className.includes("token")?["token"]:[],w=c.className&&b.concat(c.className.filter(function(k){return!x.includes(k)}));y=Rc(Rc({},c),{},{className:_T(w)||void 0,style:kue(c.className,Object.assign({},c.style,i),n)})}var E=p(t.children);return le.createElement(h,Wx({key:a},y),E)}}const Nue=(function(e,t){var n=e.listLanguages();return n.indexOf(t)!==-1});var Rue=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function LT(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?LT(Object(n),!0).forEach(function(r){iO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Aue=/\n/g;function jue(e){return e.match(Aue)}function Oue(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(i,s){var a=s+n;return le.createElement("span",{key:"line-".concat(s),className:"react-syntax-highlighter-line-number",style:typeof r=="function"?r(a):r},"".concat(a,`
119
+ `))})}function Mue(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=r===void 0?{float:"left",paddingRight:"10px"}:r,s=e.numberStyle,a=s===void 0?{}:s,c=e.startingLineNumber;return le.createElement("code",{style:Object.assign({},n,i)},Oue({lines:t.replace(/\n$/,"").split(`
120
+ `),style:a,startingLineNumber:c}))}function Due(e){return"".concat(e.toString().length,".25em")}function sO(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 aO(e,t,n){var r={display:"inline-block",minWidth:Due(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},i=typeof e=="function"?e(t):e,s=da(da({},r),i);return s}function mm(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,s=e.showInlineLineNumbers,a=e.lineProps,c=a===void 0?{}:a,u=e.className,h=u===void 0?[]:u,m=e.showLineNumbers,p=e.wrapLongLines,y=e.wrapLines,x=y===void 0?!1:y,b=x?da({},typeof c=="function"?c(n):c):{};if(b.className=b.className?[].concat(Yx(b.className.trim().split(/\s+/)),Yx(h)):h,n&&s){var w=aO(r,n,i);t.unshift(sO(n,w))}return p&m&&(b.style=da({display:"flex"},b.style)),{type:"element",tagName:"span",properties:b,children:t}}function lO(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(mm({children:[i],className:Yx(new Set(t))}));else if(i.children){var s,a=t.concat(((s=i.properties)===null||s===void 0?void 0:s.className)||[]);lO(i.children,a).forEach(function(c){return n.push(c)})}}return n}function _ue(e,t,n,r,i,s,a,c,u){var h,m=lO(e.value),p=[],y=-1,x=0;function b(j,A){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return mm({children:j,lineNumber:A,lineNumberStyle:c,largestLineNumber:a,showInlineLineNumbers:i,lineProps:n,className:R,showLineNumbers:r,wrapLongLines:u,wrapLines:t})}function w(j,A){if(r&&A&&i){var R=aO(c,A,a);j.unshift(sO(A,R))}return j}function E(j,A){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||R.length>0?b(j,A,R):w(j,A)}for(var k=function(){var A=m[x],R=A.children[0].value,_=jue(R);if(_){var F=R.split(`
121
+ `);F.forEach(function(I,H){var q=r&&p.length+s,V={type:"text",value:"".concat(I,`
122
+ `)};if(H===0){var $=m.slice(y+1,x).concat(mm({children:[V],className:A.properties.className})),U=E($,q);p.push(U)}else if(H===F.length-1){var P=m[x+1]&&m[x+1].children&&m[x+1].children[0],Y={type:"text",value:"".concat(I)};if(P){var G=mm({children:[Y],className:A.properties.className});m.splice(x+1,0,G)}else{var X=[Y],L=E(X,q,A.properties.className);p.push(L)}}else{var B=[V],W=E(B,q,A.properties.className);p.push(W)}}),y=x}x++};x<m.length;)k();if(y!==m.length-1){var T=m.slice(y+1,m.length);if(T&&T.length){var N=r&&p.length+s,O=E(T,N);p.push(O)}}return t?p:(h=[]).concat.apply(h,p)}function Lue(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(i,s){return oO({node:i,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(s)})})}function cO(e){return e&&typeof e.highlightAuto<"u"}function Iue(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(cO(t)){var s=Nue(t,n);return n==="text"?{value:i,language:"text"}:s?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!=="text"?{value:t.highlight(r,n)}:{value:i}}catch{return{value:i}}}function Pue(e,t){return function(r){var i,s,a=r.language,c=r.children,u=r.style,h=u===void 0?t:u,m=r.customStyle,p=m===void 0?{}:m,y=r.codeTagProps,x=y===void 0?{className:a?"language-".concat(a):void 0,style:da(da({},h['code[class*="language-"]']),h['code[class*="language-'.concat(a,'"]')])}:y,b=r.useInlineStyles,w=b===void 0?!0:b,E=r.showLineNumbers,k=E===void 0?!1:E,T=r.showInlineLineNumbers,N=T===void 0?!0:T,O=r.startingLineNumber,j=O===void 0?1:O,A=r.lineNumberContainerStyle,R=r.lineNumberStyle,_=R===void 0?{}:R,F=r.wrapLines,I=r.wrapLongLines,H=I===void 0?!1:I,q=r.lineProps,V=q===void 0?{}:q,$=r.renderer,U=r.PreTag,P=U===void 0?"pre":U,Y=r.CodeTag,G=Y===void 0?"code":Y,X=r.code,L=X===void 0?(Array.isArray(c)?c[0]:c)||"":X,B=r.astGenerator,W=gue(r,Rue);B=B||e;var D=k?le.createElement(Mue,{containerStyle:A,codeStyle:x.style||{},numberStyle:_,startingLineNumber:j,codeString:L}):null,Q=h.hljs||h['pre[class*="language-"]']||{backgroundColor:"#fff"},ee=cO(B)?"hljs":"prismjs",J=w?Object.assign({},W,{style:Object.assign({},Q,p)}):Object.assign({},W,{className:W.className?"".concat(ee," ").concat(W.className):ee,style:Object.assign({},p)});if(H?x.style=da({whiteSpace:"pre-wrap"},x.style):x.style=da({whiteSpace:"pre"},x.style),!B)return le.createElement(P,J,D,le.createElement(G,x,L));(F===void 0&&$||H)&&(F=!0),$=$||Lue;var he=[{type:"text",value:L}],de=Iue({astGenerator:B,language:a,code:L,defaultCodeValue:he});de.language===null&&(de.value=he);var Se=(i=(s=L.match(/\n/g))===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0,Re=j+Se,je=_ue(de,F,V,k,N,j,Re,_,H);return le.createElement(P,J,le.createElement(G,x,!N&&D,$({rows:je,stylesheet:h,useInlineStyles:w})))}}const IT=/[#.]/g;function zue(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){IT.lastIndex=i;const c=IT.exec(n),u=n.slice(i,c?c.index:n.length);u&&(s?s==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:a=u,i+=u.length),c&&(s=c[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function uO(e,t,n){const r=n?Uue(n):void 0;function i(s,a,...c){let u;if(s==null){u={type:"root",children:[]};const h=a;c.unshift(h)}else{u=zue(s,t);const h=u.tagName.toLowerCase(),m=r?r.get(h):void 0;if(u.tagName=m||h,Fue(a))c.unshift(a);else for(const[p,y]of Object.entries(a))Bue(e,u.properties,p,y)}for(const h of c)Gx(u.children,h);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function Fue(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 s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Bue(e,t,n,r){const i=rj(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=q4(r):i.commaSeparated?s=z4(r):i.commaOrSpaceSeparated?s=q4(z4(r).join(" ")):s=PT(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?Hue(r):String(r);if(Array.isArray(s)){const a=[];for(const c of s)a.push(PT(i,i.property,c));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Gx(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)Gx(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Gx(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function PT(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||pf(n)===pf(t)))return!0}return n}function Hue(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Uue(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const que=["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"],Vue=uO(ij,"div");uO($0,"g",que);const $ue=["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"],zT={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 dO(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function Yue(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Wue(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function FT(e){return Wue(e)||dO(e)}const Gue=["","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 Kue(e,t){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,a=-1,c="",u,h;n.position&&("start"in n.position||"indent"in n.position?(h=n.position.indent,u=n.position.start):u=n.position);let m=(u?u.line:0)||1,p=(u?u.column:0)||1,y=b(),x;for(s--;++s<=e.length;)if(x===10&&(p=(h?h[a]:0)||1),x=e.charCodeAt(s),x===38){const k=e.charCodeAt(s+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=s+1;let N=T,O=T,j;if(k===35){O=++N;const V=e.charCodeAt(O);V===88||V===120?(j="hexadecimal",O=++N):j="decimal"}else j="named";let A="",R="",_="";const F=j==="named"?FT:j==="decimal"?dO:Yue;for(O--;++O<=e.length;){const V=e.charCodeAt(O);if(!F(V))break;_+=String.fromCharCode(V),j==="named"&&$ue.includes(_)&&(A=_,R=gf(_))}let I=e.charCodeAt(O)===59;if(I){O++;const V=j==="named"?gf(_):!1;V&&(A=_,R=V)}let H=1+O-T,q="";if(!(!I&&n.nonTerminated===!1))if(!_)j!=="named"&&w(4,H);else if(j==="named"){if(I&&!R)w(5,1);else if(A!==_&&(O=N+A.length,H=1+O-N,I=!1),!I){const V=A?1:3;if(n.attribute){const $=e.charCodeAt(O);$===61?(w(V,H),R=""):FT($)?R="":w(V,H)}else w(V,H)}q=R}else{I||w(2,H);let V=Number.parseInt(_,j==="hexadecimal"?16:10);if(Que(V))w(7,H),q="�";else if(V in zT)w(6,H),q=zT[V];else{let $="";Xue(V)&&w(6,H),V>65535&&(V-=65536,$+=String.fromCharCode(V>>>10|55296),V=56320|V&1023),q=$+String.fromCharCode(V)}}if(q){E(),y=b(),s=O-1,p+=O-T+1,i.push(q);const V=b();V.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,q,{start:y,end:V},e.slice(T-1,O)),y=V}else _=e.slice(T-1,O),c+=_,p+=_.length,s=O-1}else x===10&&(m++,a++,p=0),Number.isNaN(x)?E():(c+=String.fromCharCode(x),p++);return i.join("");function b(){return{line:m,column:p,offset:s+((u?u.offset:0)||0)}}function w(k,T){let N;n.warning&&(N=b(),N.column+=T,N.offset+=T,n.warning.call(n.warningContext||void 0,Gue[k],N,k))}function E(){c&&(i.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:y,end:b()}),c="")}}function Que(e){return e>=55296&&e<=57343||e>1114111}function Xue(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 Zue=0,qp={},pr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Zue}),e.__id},clone:function e(t,n){n=n||{};var r,i;switch(pr.util.type(t)){case"Object":if(i=pr.util.objId(t),n[i])return n[i];r={},n[i]=r;for(var s in t)t.hasOwnProperty(s)&&(r[s]=e(t[s],n));return r;case"Array":return i=pr.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(a,c){r[c]=e(a,n)}),r);default:return t}}},languages:{plain:qp,plaintext:qp,text:qp,txt:qp,extend:function(e,t){var n=pr.util.clone(pr.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r=r||pr.languages;var i=r[e],s={};for(var a in i)if(i.hasOwnProperty(a)){if(a==t)for(var c in n)n.hasOwnProperty(c)&&(s[c]=n[c]);n.hasOwnProperty(a)||(s[a]=i[a])}var u=r[e];return r[e]=s,pr.languages.DFS(pr.languages,function(h,m){m===u&&h!=e&&(this[h]=s)}),s},DFS:function e(t,n,r,i){i=i||{};var s=pr.util.objId;for(var a in t)if(t.hasOwnProperty(a)){n.call(t,a,t[a],r||a);var c=t[a],u=pr.util.type(c);u==="Object"&&!i[s(c)]?(i[s(c)]=!0,e(c,n,null,i)):u==="Array"&&!i[s(c)]&&(i[s(c)]=!0,e(c,n,a,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(pr.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=pr.tokenize(r.code,r.grammar),pr.hooks.run("after-tokenize",r),Yd.stringify(pr.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 Jue;return gm(i,i.head,e),fO(e,i,t,i.head,0),tde(i)},hooks:{all:{},add:function(e,t){var n=pr.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=pr.hooks.all[e];if(!(!n||!n.length))for(var r=0,i;i=n[r++];)i(t)}},Token:Yd};function Yd(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||"").length|0}function BT(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var s=i[1].length;i.index+=s,i[0]=i[0].slice(s)}return i}function fO(e,t,n,r,i,s){for(var a in n)if(!(!n.hasOwnProperty(a)||!n[a])){var c=n[a];c=Array.isArray(c)?c:[c];for(var u=0;u<c.length;++u){if(s&&s.cause==a+","+u)return;var h=c[u],m=h.inside,p=!!h.lookbehind,y=!!h.greedy,x=h.alias;if(y&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+"g")}for(var w=h.pattern||h,E=r.next,k=i;E!==t.tail&&!(s&&k>=s.reach);k+=E.value.length,E=E.next){var T=E.value;if(t.length>e.length)return;if(!(T instanceof Yd)){var N=1,O;if(y){if(O=BT(w,k,e,p),!O||O.index>=e.length)break;var _=O.index,j=O.index+O[0].length,A=k;for(A+=E.value.length;_>=A;)E=E.next,A+=E.value.length;if(A-=E.value.length,k=A,E.value instanceof Yd)continue;for(var R=E;R!==t.tail&&(A<j||typeof R.value=="string");R=R.next)N++,A+=R.value.length;N--,T=e.slice(k,A),O.index-=k}else if(O=BT(w,0,T,p),!O)continue;var _=O.index,F=O[0],I=T.slice(0,_),H=T.slice(_+F.length),q=k+T.length;s&&q>s.reach&&(s.reach=q);var V=E.prev;I&&(V=gm(t,V,I),k+=I.length),ede(t,V,N);var $=new Yd(a,m?pr.tokenize(F,m):F,x,F);if(E=gm(t,V,$),H&&gm(t,E,H),N>1){var U={cause:a+","+u,reach:q};fO(e,t,n,E.prev,k,U),s&&U.reach>s.reach&&(s.reach=U.reach)}}}}}}function Jue(){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 gm(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 ede(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 tde(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}const hO=pr;function pO(){}pO.prototype=hO;const dr=new pO;dr.highlight=nde;dr.register=rde;dr.alias=ide;dr.registered=ode;dr.listLanguages=sde;dr.util.encode=ade;dr.Token.stringify=Kx;function nde(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(dr.languages,r))n=dr.languages[r];else throw new Error("Unknown language: `"+r+"` is not registered")}return{type:"root",children:hO.highlight.call(dr,e,n,r)}}function rde(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(dr.languages,e.displayName)||e(dr)}function ide(e,t){const n=dr.languages;let r={};typeof e=="string"?t&&(r[e]=t):r=e;let i;for(i in r)if(Object.hasOwn(r,i)){const s=r[i],a=typeof s=="string"?[s]:s;let c=-1;for(;++c<a.length;)n[a[c]]=n[i]}}function ode(e){if(typeof e!="string")throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(dr.languages,e)}function sde(){const e=dr.languages,t=[];let n;for(n in e)Object.hasOwn(e,n)&&typeof e[n]=="object"&&t.push(n);return t}function Kx(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(Kx(e[i],t));return r}const n={attributes:{},classes:["token",e.type],content:Kx(e.content,t),language:t,tag:"span",type:e.type};return e.alias&&n.classes.push(...typeof e.alias=="string"?[e.alias]:e.alias),dr.hooks.run("wrap",n),Vue(n.tag+"."+n.classes.join("."),lde(n.attributes),n.content)}function ade(e){return e}function lde(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=Kue(e[t]));return e}var fn=Pue(dr,{});fn.registerLanguage=function(e,t){return dr.register(t)};fn.alias=function(e,t){return dr.alias(e,t)};Ml.displayName="markup";Ml.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Ml(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 s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};s["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:s},e.languages.insertBefore("markup","cdata",a)}}),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}Cw.displayName="css";Cw.aliases=[];function Cw(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)}X0.displayName="clike";X0.aliases=[];function X0(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:/[{}[\];(),.:]/}}mu.displayName="javascript";mu.aliases=["js"];function mu(e){e.register(X0),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}Ew.displayName="sql";Ew.aliases=[];function Ew(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:/[;[\]()`,.]/}}Xf.displayName="bash";Xf.aliases=["sh","shell"];function Xf(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 s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=i.variable[1].inside,c=0;c<s.length;c++)a[s[c]]=t.languages.bash[s[c]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(e)}Z0.displayName="yaml";Z0.aliases=["yml"];function Z0(e){(function(t){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+r.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+r.source+")?)",s=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(u,h){h=(h||"").replace(/m/g,"")+"m";var m=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return u});return RegExp(m,h)}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"(?:"+s+"|"+a+")"})),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(a),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)}J0.displayName="markdown";J0.aliases=["md"];function J0(e){e.register(Ml),(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,s=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),a=/\|?[ \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("^"+s+a+"(?:"+s+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+s+a+")(?:"+s+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+s+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+s+"$"),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(u){c!==u&&(t.languages.markdown[c].inside.content.inside[u]=t.languages.markdown[u])})}),t.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function u(h){if(!(!h||typeof h=="string"))for(var m=0,p=h.length;m<p;m++){var y=h[m];if(y.type!=="code"){u(y.content);continue}var x=y.content[1],b=y.content[3];if(x&&b&&x.type==="code-language"&&b.type==="code-block"&&typeof x.content=="string"){var w=x.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");w=(/[a-z][\w-]*/i.exec(w)||[""])[0].toLowerCase();var E="language-"+w;b.alias?typeof b.alias=="string"?b.alias=[b.alias,E]:b.alias.push(E):b.alias=[E]}}}u(c.tokens)}),t.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var u="",h=0,m=c.classes.length;h<m;h++){var p=c.classes[h],y=/language-(.+)/.exec(p);if(y){u=y[1];break}}var x=t.languages[u];if(x)c.content=t.highlight(c.content.value,x,u);else if(u&&u!=="none"&&t.plugins.autoloader){var b="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=b,t.plugins.autoloader.loadLanguages(u,function(){var w=document.getElementById(b);w&&(w.innerHTML=t.highlight(w.textContent,t.languages[u],u))})}}}),RegExp(t.languages.markup.tag.pattern.source,"gi"),t.languages.md=t.languages.markdown})(e)}kw.displayName="diff";kw.aliases=[];function kw(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],s=[];/^\w+$/.test(r)||s.push(/\w+/.exec(r)[0]),r==="diff"&&s.push("bold"),t.languages.diff[r]={pattern:RegExp("^(?:["+i+`].*(?:\r
123
+ ?|
124
+ |(?![\\s\\S])))+`,"m"),alias:s,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)}Tw.displayName="go";Tw.aliases=[];function Tw(e){e.register(X0),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"]}Nw.displayName="json";Nw.aliases=["webmanifest"];function Nw(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}Zf.displayName="typescript";Zf.aliases=["ts"];function Zf(e){e.register(mu),(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)}eg.displayName="python";eg.aliases=["py"];function eg(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}tg.displayName="jsx";tg.aliases=[];function tg(e){e.register(mu),e.register(Ml),(function(t){var n=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,s=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(h,m){return h=h.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return s}),RegExp(h,m)}s=a(s).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=a(/<\/?(?:[\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:a(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var c=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(c).join(""):""},u=function(h){for(var m=[],p=0;p<h.length;p++){var y=h[p],x=!1;if(typeof y!="string"&&(y.type==="tag"&&y.content[0]&&y.content[0].type==="tag"?y.content[0].content[0].content==="</"?m.length>0&&m[m.length-1].tagName===c(y.content[0].content[1])&&m.pop():y.content[y.content.length-1].content==="/>"||m.push({tagName:c(y.content[0].content[1]),openedBraces:0}):m.length>0&&y.type==="punctuation"&&y.content==="{"?m[m.length-1].openedBraces++:m.length>0&&m[m.length-1].openedBraces>0&&y.type==="punctuation"&&y.content==="}"?m[m.length-1].openedBraces--:x=!0),(x||typeof y=="string")&&m.length>0&&m[m.length-1].openedBraces===0){var b=c(y);p<h.length-1&&(typeof h[p+1]=="string"||h[p+1].type==="plain-text")&&(b+=c(h[p+1]),h.splice(p+1,1)),p>0&&(typeof h[p-1]=="string"||h[p-1].type==="plain-text")&&(b=c(h[p-1])+b,h.splice(p-1,1),p--),h[p]=new t.Token("plain-text",b,null,b)}y.content&&typeof y.content!="string"&&u(y.content)}};t.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||u(h.tokens)})})(e)}Rw.displayName="tsx";Rw.aliases=[];function Rw(e){e.register(tg),e.register(Zf),(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)}ng.displayName="rust";ng.aliases=[];function ng(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 Aw={'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%)"}};fn.registerLanguage("bash",Xf);fn.registerLanguage("css",Cw);fn.registerLanguage("diff",kw);fn.registerLanguage("go",Tw);fn.registerLanguage("html",Ml);fn.registerLanguage("javascript",mu);fn.registerLanguage("js",mu);fn.registerLanguage("json",Nw);fn.registerLanguage("jsx",tg);fn.registerLanguage("markdown",J0);fn.registerLanguage("markup",Ml);fn.registerLanguage("md",J0);fn.registerLanguage("python",eg);fn.registerLanguage("py",eg);fn.registerLanguage("rust",ng);fn.registerLanguage("rs",ng);fn.registerLanguage("sh",Xf);fn.registerLanguage("shell",Xf);fn.registerLanguage("sql",Ew);fn.registerLanguage("ts",Zf);fn.registerLanguage("tsx",Rw);fn.registerLanguage("typescript",Zf);fn.registerLanguage("xml",Ml);fn.registerLanguage("yaml",Z0);fn.registerLanguage("yml",Z0);const mO=S.memo(({language:e,value:t})=>{const[n,r]=S.useState(!1),i=()=>{r(!0),navigator.clipboard.writeText(t),setTimeout(()=>r(!1),1e3)};return f.jsxs("div",{className:"codeblock border-input relative w-full overflow-hidden rounded border p-2 font-sans dark:bg-zinc-900",children:[f.jsxs("div",{className:"bg-secondary flex w-full items-center justify-between px-2 py-1",children:[f.jsx("span",{className:"text-primary text-lg font-bold lowercase italic",children:e}),f.jsx("div",{className:"flex items-center py-1",children:f.jsxs(ze,{className:"hover:bg-border text-xs focus-visible:ring-1 focus-visible:ring-offset-0",onClick:i,size:"xs",variant:"ghost",children:[n?f.jsx(Ra,{className:"h-4 w-4"}):f.jsx(v$,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Copy code"})]})})]}),f.jsx(fn,{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:Aw,children:t})]})});mO.displayName="CodeBlock";const cde=S.memo(Dj,(e,t)=>e.children===t.children),ude=e=>S.isValidElement(e)&&typeof e.type!="string"&&["h1","h2","h3","h4","h5","h6","p"].includes(e.type.name??""),dde=e=>Array.isArray(e)&&e.some(t=>t?.props?.className==="task-list-item"),fde=e=>S.Children.map(e,t=>ude(t)?f.jsx("div",{className:"mb-1 inline-flex",children:S.createElement(t.type,{...t.props})}):t),hde=[[ole,["yaml","toml"]],rO],pde={a({children:e,href:t}){return t?f.jsx("a",{className:"underline",href:t,rel:"noopener noreferrer",target:"_blank",children:e}):f.jsx(f.Fragment,{children:e})},blockquote({children:e}){return f.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$/,""),s=i.includes(`
125
+ `);return r||s?f.jsx(mO,{language:r,value:i}):f.jsx("code",{className:"border-input bg-secondary rounded border px-1 py-0.5 text-amber-500",children:i})},h1({children:e}){return f.jsx("h1",{className:"text-2xl font-bold",children:e})},h2({children:e}){return f.jsx("h2",{className:"text-xl font-bold",children:e})},h3({children:e}){return f.jsx("h3",{className:"text-lg font-bold",children:e})},h4({children:e}){return f.jsx("h4",{className:"text-base font-bold",children:e})},h5({children:e}){return f.jsx("h5",{className:"text-sm font-bold",children:e})},h6({children:e}){return f.jsx("h6",{className:"text-xs font-bold",children:e})},hr(){return f.jsx("hr",{className:"my-4"})},li({children:e}){return f.jsx("li",{className:"mt-1 [&>ol]:pl-4 [&>ul]:pl-4",children:fde(e)})},ol({children:e}){return f.jsx("ol",{className:"list-inside list-decimal",children:e})},p({children:e}){return f.jsx("p",{className:"mb-2 whitespace-pre-wrap last:mb-0",children:e})},pre({children:e}){return f.jsx("pre",{className:"rounded p-2",children:e})},table({children:e}){return f.jsx("div",{className:"border-input overflow-x-auto rounded text-xs",children:f.jsx("table",{className:"min-w-full divide-y",children:e})})},tbody({children:e}){return f.jsx("tbody",{className:"divide-border divide-y",children:e})},td({children:e}){return f.jsx("td",{className:"whitespace-nowrap px-4 py-2",children:e})},th({children:e}){return f.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium uppercase tracking-wider",children:e})},thead({children:e}){return f.jsx("thead",{children:e})},tr({children:e}){return f.jsx("tr",{children:e})},ul({children:e}){return dde(e)?f.jsx("ul",{className:"list-none",children:e}):f.jsx("ul",{className:"list-inside list-disc",children:e})}};function mde({content:e}){const t=e.split(`
126
+ `);let n="none";return f.jsx("pre",{className:"bg-card overflow-x-auto rounded-md py-2 font-mono text-xs leading-6",children:t.map((r,i)=>{let s="block px-3 whitespace-pre-wrap break-all";return r.startsWith("<<<<<<<")?(s+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="ours"):r.startsWith("=======")&&n!=="none"?(s+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="theirs"):r.startsWith(">>>>>>>")&&(s+=" bg-[#4f3422] text-[#ffc53d] font-semibold",n="none"),f.jsx("span",{className:s,children:r||" "},i)})})}function gde({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 pue(t)?f.jsxs("div",{className:n,children:[f.jsxs("div",{className:"bg-[#4f3422] text-[#ffc53d] mb-2 flex items-center gap-2 rounded-md px-3 py-2 text-xs",children:[f.jsx(BA,{className:"size-3.5 shrink-0"}),f.jsx("span",{children:"Unresolved conflict markers — showing raw content with side highlighting."})]}),f.jsx(mde,{content:t})]}):f.jsx("div",{className:n,children:f.jsx(cde,{components:pde,remarkPlugins:hde,children:t})})}function yde({onToggleHistory:e}){const{cancelEdit:t,editContent:n,enterEditMode:r,fileData:i,handleSelect:s,hasChanges:a,isEditMode:c,isFetchingFile:u,isUpdating:h,navigateHome:m,nodes:p,saveChanges:y,selectedNode:x,selectedPath:b,setEditContent:w}=du(),{data:E,isPending:k}=K9({enabled:!!b&&Wf(b),path:b}),T=E?.pages[0]?.commits[0],N=S.useMemo(()=>!x||x.type!=="tree"?x?[]:p:x.children??[],[x,p]),O=S.useMemo(()=>N.filter(F=>F.type==="blob").map(F=>F.path),[N]),{data:j}=Tre({enabled:O.length>0,paths:O}),A=S.useMemo(()=>{const F=new Map((j?.files??[]).map(I=>[I.path,I]));return N.map(I=>{const H=F.get(I.path);return{lastUpdatedBy:H?.lastUpdatedBy,lastUpdatedWhen:H?.lastUpdatedWhen?_4(new Date(H.lastUpdatedWhen),{addSuffix:!0}):void 0,name:I.name,path:I.path,type:I.type}})},[N,j]),R=F=>{const I=N.find(H=>H.path===F.path);I&&s(I)},_=()=>{if(!b)return;const F=b.split("/").filter(Boolean);if(F.length<=1){m();return}const I=F.slice(0,-1).join("/");s({children:[],name:"..",path:I,type:"tree"})};return x?.type==="blob"?f.jsxs("div",{className:"flex h-full flex-1 flex-col",children:[f.jsx("div",{className:"px-5 pt-5",children:f.jsx(P4,{})}),f.jsx(Xte,{canEdit:!0,content:i?.content??"",contentView:!c&&i?.content?f.jsx(gde,{content:i.content}):void 0,editContent:n,fileName:i?.title??x.name,hasChanges:a,headerClassName:"pt-4 pb-0",isEditMode:c,isHistoryVisible:!1,isLoading:u,isUpdating:h,onCancelEdit:t,onContentChange:w,onEnterEditMode:r,onSaveChanges:y,onToggleHistory:e??vl,showTags:!1,tags:i?.tags,timeline:T?f.jsx(Kte,{className:"mx-5 mb-5",description:`${T.author.name} updated ${x.name}`,name:T.author.name,timestamp:_4(new Date(T.timestamp),{addSuffix:!0})}):k?f.jsxs("div",{className:"border-border mx-5 mb-5 flex items-center gap-2 border-b py-2",children:[f.jsx(or,{className:"size-6 shrink-0 rounded-full"}),f.jsx(or,{className:"h-4 w-56"})]}):void 0})]}):f.jsxs("div",{className:"flex-1 h-full flex-col flex p-5 gap-4",children:[f.jsx(P4,{}),f.jsx(Zte,{nodes:A,onBack:_,onNodeClick:R,showBack:!!b})]})}function HT({title:e,authorName:t,authorAvatar:n,isActive:r,isLast:i,variant:s="default",highlightColor:a="#ED9A00",onClick:c,className:u}){const h=s==="highlight";return f.jsxs("div",{role:c?"button":void 0,onClick:c,className:se("relative flex gap-4 rounded-lg border border-transparent px-4",{"border-primary bg-primary/5":r,"cursor-pointer":!!c},h&&"bg-[#ED9A00]/5",c&&h&&"hover:bg-[#ED9A00]/10",u),children:[f.jsxs("div",{className:"relative top-3 flex flex-col items-center",children:[h?f.jsx("div",{className:"mt-2 size-2 rounded-full",style:{backgroundColor:a}}):r?f.jsx("div",{className:"bg-primary mt-2 size-2 rounded-full"}):f.jsx(v_,{className:"mt-2 size-2 text-neutral-500",strokeWidth:6}),!i&&!r&&!h&&f.jsx("div",{className:"absolute top-4 h-full w-px bg-neutral-800"})]}),f.jsxs("div",{className:"flex-1 space-y-1 py-3",children:[f.jsx(Km,{className:"text-foreground mb-1 block text-sm font-medium",text:e}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsxs(If,{className:"size-4",children:[n&&f.jsx(I0,{src:n}),f.jsx(Pf,{className:"text-[10px]",children:t[0]})]}),f.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:t})]})]})]})}function UT({isActive:e=!1,isLast:t=!1}){return f.jsxs("div",{className:"relative flex gap-4 rounded-lg px-4",children:[f.jsxs("div",{className:"relative top-3 flex flex-col items-center",children:[f.jsx(or,{className:"mt-2 size-2 rounded-full"}),!t&&!e&&f.jsx("div",{className:"absolute top-4 h-full w-px bg-neutral-800"})]}),f.jsxs("div",{className:"flex-1 space-y-1 py-3",children:[f.jsx(or,{className:"h-4 w-3/4"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(or,{className:"size-4 rounded-full"}),f.jsx(or,{className:"h-3 w-24"})]})]})]})}function xde({showCurrent:e=!0,olderCount:t=3,currentLabel:n="Current",olderLabel:r="Older"}){return f.jsxs("div",{className:"space-y-6",children:[e&&f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-xs font-medium text-neutral-400",children:n}),f.jsx(UT,{isActive:!0})]}),t>0&&f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-xs font-medium text-neutral-400",children:r}),Array.from({length:t}).map((i,s)=>f.jsx(UT,{isLast:s===t-1},s))]})]})}function qT({label:e,children:t}){return f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-xs font-medium text-neutral-400",children:e}),t]})}function bde({title:e="Version history",isLoading:t,error:n,isEmpty:r,hasNextPage:i,isFetchingNextPage:s,onLoadMore:a,onClose:c,children:u}){return f.jsxs("div",{className:"flex h-full flex-col",children:[f.jsxs("div",{className:"bg-card flex flex-shrink-0 justify-between rounded-t-xl px-6 py-3 pr-3.5",children:[f.jsx("div",{className:"flex items-center gap-2",children:f.jsx("div",{className:"text-foreground text-sm font-semibold",children:e})}),f.jsx("div",{children:f.jsx(ze,{className:"bg-card hover:bg-muted h-9 w-9 rounded-lg p-2",onClick:c,children:f.jsx(o0,{className:"text-muted-foreground size-5"})})})]}),f.jsx("div",{className:"bg-card flex-1 space-y-6 overflow-y-auto rounded-b-xl p-6",children:t?f.jsx(xde,{showCurrent:!0,olderCount:3}):n?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx("p",{className:"text-sm text-neutral-500",children:"Failed to load history"})}):r?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx("p",{className:"text-sm text-neutral-500",children:"No history available"})}):f.jsxs(f.Fragment,{children:[u,i&&f.jsx(ze,{onClick:a,disabled:s,className:"text-primary w-25 rounded-md bg-transparent text-sm font-medium hover:bg-transparent hover:underline",children:s?f.jsx(Gd,{className:"h-4 w-4 animate-spin"}):"View older"})]})})]})}function vde({onClose:e}){const{selectedPath:t}=du(),{data:n,error:r,fetchNextPage:i,hasNextPage:s,isFetchingNextPage:a,isLoading:c}=K9({enabled:!!t&&Wf(t),path:t}),u=S.useMemo(()=>n?.pages.flatMap(p=>p.commits)??[],[n]),h=u[0],m=u.slice(1);return f.jsxs(bde,{error:!!r,hasNextPage:s,isEmpty:!h,isFetchingNextPage:a,isLoading:c,onClose:e,onLoadMore:i,children:[h&&f.jsx(qT,{label:"Current",children:f.jsx(HT,{authorName:h.author.name,isActive:!0,title:VT(h.timestamp)})}),m.length>0&&f.jsx(qT,{label:"Older",children:m.map((p,y)=>f.jsx(HT,{authorName:p.author.name,isLast:y===m.length-1,title:VT(p.timestamp)},p.sha))})]})}function VT(e){try{return`Updated at ${dl(new Date(e),"MMM d, HH:mm")}`}catch{return"Updated"}}function wde({nodes:e,expandedPaths:t,selectedPath:n,loadingPaths:r,onToggle:i,onSelect:s,disableFileSelect:a,header:c,className:u}){const h=(p,y)=>{p.stopPropagation(),y.type==="tree"&&i(y)},m=p=>{a&&p.type==="blob"||s(p)};return f.jsxs("div",{className:se("flex h-full flex-col",u),children:[c,f.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),b=n===p.path,w=r?.has(p.path);return f.jsxs("div",{className:se("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":b}),style:{paddingLeft:`${String(y*12)}px`},onClick:()=>m(p),children:[Array.from({length:y}).map((E,k)=>f.jsx("div",{className:"absolute top-0 h-full border-l border-neutral-700",style:{left:`${String((k+1)*12)}px`}},k)),f.jsx("div",{className:se("flex h-full items-center rounded px-1 transition-colors hover:bg-neutral-700",{"pointer-events-none":p.type==="blob"}),onClick:E=>h(E,p),children:f.jsx("span",{className:se({invisible:p.type==="blob"}),children:w?f.jsx(Gd,{className:"size-4 animate-spin"}):f.jsx(r0,{className:se("size-4 transition-transform",{"-rotate-90":!x}),size:16})})}),f.jsx("span",{className:"shrink-0",children:p.type==="tree"?f.jsx(Dy,{className:"size-4",strokeWidth:2}):f.jsx(b6,{className:se("size-4",{"text-primary-foreground":b,"text-primary":!b}),strokeWidth:2})}),f.jsx(Km,{text:p.name})]},p.path)})})]})}function Sde({count:e=5,className:t}){return f.jsx("div",{className:se("flex flex-col gap-2",t),children:Array.from({length:e}).map((n,r)=>f.jsxs("div",{className:"flex h-9 items-center gap-4 rounded-lg px-4",children:[f.jsx(or,{className:"size-5 shrink-0 rounded"}),f.jsx(or,{className:"h-4",style:{width:`${String(60+r*17%30)}%`}})]},r))})}function Cde({onCollapseClick:e}){const{navigateHome:t,selectedPath:n}=du(),r=!n,i=s=>{s.stopPropagation(),e?.()};return f.jsxs("div",{className:se("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:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(zA,{className:"size-4",strokeWidth:2}),f.jsx("span",{className:"font-medium",children:"All context"})]}),e&&f.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:f.jsx(u$,{className:"size-5"})})]})}function Ede({onCollapse:e}){const{expandedPaths:t,flattenedNodes:n,handleSelect:r,handleToggle:i,isFetchingTree:s,selectedPath:a}=du();return s&&n.length===0?f.jsx(Sde,{className:"p-2",count:8}):f.jsx(wde,{expandedPaths:t,header:f.jsx(Cde,{onCollapseClick:e}),nodes:n,onSelect:r,onToggle:i,selectedPath:a})}function kde(){const{closeRightPanel:e,isLeftPanelOpen:t,isRightPanelOpen:n,toggleLeftPanel:r,toggleRightPanel:i}=Fte(),{selectedPath:s}=du(),a=n&&Wf(s);return f.jsxs("div",{className:"flex h-full gap-4",children:[t?f.jsx("div",{className:"w-72 shrink-0 overflow-y-auto",children:f.jsx(Ede,{onCollapse:r})}):f.jsx("div",{className:"bg-card flex shrink-0 items-start rounded-xl p-2",children:f.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:f.jsx(f$,{className:"size-5"})})}),f.jsx("div",{className:"bg-card flex min-w-0 flex-1 rounded-xl",children:f.jsx(yde,{onToggleHistory:i})}),a&&f.jsx("div",{className:"w-80 shrink-0 overflow-y-auto",children:f.jsx(vde,{onClose:e})})]})}function Tde(){return f.jsx(Gte,{children:f.jsx(kde,{})})}function Nde(){return f.jsx(Y6,{replace:!0,to:"/contexts"})}const Rde="/assets/not-found-N0eqX-Lm.svg";function $T(){return f.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-6 p-8 text-center",children:[f.jsx("img",{alt:"",className:"w-30",src:Rde}),f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("h1",{className:"text-foreground text-xl font-medium",children:"This page isn't available"}),f.jsx("p",{className:"text-muted-foreground text-sm",children:"We can't find a page with the url you entered."})]}),f.jsx(ze,{className:"px-4",nativeButton:!1,render:f.jsx(hb,{to:"/"}),size:"sm",variant:"secondary",children:"Back to Home"})]})}function Ade(){return f.jsxs("div",{className:"flex flex-col items-center gap-2",children:[f.jsx("img",{alt:"Byterover",className:"size-10",src:nv}),f.jsx("span",{className:"text-lg font-semibold text-foreground",children:"BYTEROVER"})]})}function jde(){const e=Pe(y=>y.isConnected),t=Pe(y=>y.setSelectedProject),n=Pe(y=>y.version),r=Cl(),s=Qi().state?.from?.pathname??"/",{data:a,isLoading:c}=w8({queryConfig:{enabled:e,refetchInterval:3e3,retry:1,staleTime:1e4}}),u=S.useMemo(()=>a?.locations??[],[a]),[h,m]=S.useState(!1);function p(y){t(y.projectPath),r(s,{replace:!0})}return f.jsxs("div",{className:"fixed inset-0 flex items-center justify-center",children:[f.jsxs("div",{className:"flex w-[400px] flex-col gap-4",children:[f.jsxs("div",{className:"flex flex-col items-center gap-2",children:[f.jsx(Ade,{}),f.jsx("div",{className:"flex items-center justify-center gap-1 text-xs font-medium leading-4",children:f.jsxs("span",{className:"text-muted-foreground",children:["Version ",n||"—"]})})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2.5 px-2",children:[f.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:"Recent Projects"}),u.length>0&&f.jsx("button",{className:"text-xs font-medium text-muted-foreground transition-colors hover:text-foreground cursor-pointer",onClick:()=>m(!0),type:"button",children:"See all"})]}),c&&f.jsx("p",{className:"px-2 py-2 text-xs text-muted-foreground",children:"Loading projects..."}),!c&&u.length===0&&f.jsxs("div",{className:"flex flex-col gap-1 px-2 py-2",children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:"No projects found."}),f.jsxs("p",{className:"text-xs text-muted-foreground",children:["Run ",f.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm",children:"brv webui"})," in a project directory to get started."]})]}),f.jsx("div",{className:"flex flex-col",children:u.slice(0,5).map(y=>f.jsx(C8,{onClick:()=>p(y),project:y},y.projectPath))})]})]}),f.jsx(E8,{onOpenChange:m,onSelect:p,open:h,projects:u})]})}function gO({...e}){return f.jsx(MA,{"data-slot":"sheet",...e})}function Ode({...e}){return f.jsx(wv,{"data-slot":"sheet-portal",...e})}function Mde({className:e,...t}){return f.jsx(gv,{"data-slot":"sheet-overlay",className:se("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 yO({className:e,children:t,side:n="right",showCloseButton:r=!0,...i}){return f.jsxs(Ode,{children:[f.jsx(Mde,{}),f.jsxs(bv,{"data-slot":"sheet-content","data-side":n,className:se("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&&f.jsxs(Df,{"data-slot":"sheet-close",render:f.jsx(ze,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[f.jsx(o0,{}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}const Dde="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.",_de="What conventions should I follow when making changes?",Lde={curate:"Step 2 of 4",query:"Step 3 of 4"},Ide=async e=>{const{apiClient:t}=Pe.getState();if(!t)throw new Error("Not connected");const n=await t.request(gr.CLEAR_COMPLETED,e);if(n.error)throw new Error(n.error);return n},Pde=({mutationConfig:e}={})=>dn({...e,mutationFn:Ide}),zde=async e=>{const{apiClient:t}=Pe.getState();if(!t)throw new Error("Not connected");const n=await t.request(gr.DELETE_BULK,e);if(n.error)throw new Error(n.error);return n},Fde=({mutationConfig:e}={})=>dn({...e,mutationFn:zde}),Bde=async e=>{const{apiClient:t}=Pe.getState();if(!t)throw new Error("Not connected");const n=await t.request(gr.DELETE,e);if(!n.success)throw new Error(n.error??"Delete failed");return n},Hde=({mutationConfig:e}={})=>dn({...e,mutationFn:Bde}),Ude=e=>{const{apiClient:t}=Pe.getState();return t?t.request(gr.LIST,e):Promise.reject(new Error("Not connected"))},YT=(e={})=>Mn({queryFn:()=>Ude(e),queryKey:["tasks","list",e]});function qde(e,t){const[n,r]=S.useState(e);return S.useEffect(()=>{const i=setTimeout(()=>r(e),t);return()=>clearTimeout(i)},[e,t]),n}const xO=[{label:"Any duration",value:"all"},{label:"< 5s",value:"short"},{label:"5s – 30s",value:"medium"},{label:"30s – 2m",value:"long"},{label:"> 2m",value:"very-long"}],Vde=new Set(xO.map(e=>e.value));function bO(e){return Vde.has(e)}const $de={all:"Any duration",long:"30s – 2m",medium:"5s – 30s",short:"< 5s","very-long":"> 2m"},Yde={all:{},long:{maxDurationMs:12e4,minDurationMs:3e4},medium:{maxDurationMs:3e4,minDurationMs:5e3},short:{maxDurationMs:5e3},"very-long":{minDurationMs:12e4}};function Wde(e){return Yde[e]}function Gde(e){return $de[e]}const Kde=new Set(["all","cancelled","completed","failed","running"]),Qx=20,Qde=["status","types","providers","models","from","to","duration","q","page","pageSize"];function Xde(e){return e!==null&&Kde.has(e)}function Zde(){const[e,t]=u0(),n=S.useMemo(()=>Jde(e),[e]),r=S.useCallback((s,a=!0)=>{t(c=>{const u=new URLSearchParams(c);for(const[h,m]of Object.entries(s))m===null||m===""||Array.isArray(m)&&m.length===0?u.delete(h):Array.isArray(m)?u.set(h,m.join(",")):u.set(h,m);return a&&u.delete("page"),u})},[t]),i=S.useMemo(()=>({clearAllFilters(){t(s=>{const a=new URLSearchParams(s);for(const c of Qde)a.delete(c);return a})},setDurationPreset(s){r({duration:s==="all"?null:s})},setModelFilter(s){r({models:s})},setPage(s){r({page:s===1?null:String(s)},!1)},setPageSize(s){r({pageSize:s===Qx?null:String(s)})},setProviderFilter(s){r({providers:s})},setSearchQuery(s){r({q:s})},setStatusFilter(s){r({status:s==="all"?null:s})},setTimeRange(s){r({from:s.createdAfter===void 0?null:String(s.createdAfter),to:s.createdBefore===void 0?null:String(s.createdBefore)})},setTypeFilter(s){r({types:s})}}),[r,t]);return{filters:n,...i}}function Jde(e){const t=e.get("status"),n=e.get("duration"),r=e.get("page"),i=e.get("pageSize"),s=e.get("from"),a=e.get("to");return{durationPreset:n!==null&&bO(n)?n:"all",modelFilter:Cy(e.get("models")),page:r?Math.max(1,Number.parseInt(r,10)||1):1,pageSize:i?Math.max(1,Number.parseInt(i,10)||Qx):Qx,providerFilter:Cy(e.get("providers")),searchQuery:e.get("q")??"",statusFilter:Xde(t)?t:"all",typeFilter:Cy(e.get("types")),...s&&Number.isFinite(Number(s))?{createdAfter:Number(s)}:{},...a&&Number.isFinite(Number(a))?{createdBefore:Number(a)}:{}}}function Cy(e){return e?e.split(",").filter(Boolean):[]}function vO(e,t=1e3){const[n,r]=S.useState(()=>Date.now());return S.useEffect(()=>{if(!e)return;const i=globalThis.setInterval(()=>r(Date.now()),t);return()=>{globalThis.clearInterval(i)}},[e,t]),n}const Xx=Nl((e,t)=>({consume(){const{seed:n}=t();return n&&e({seed:null}),n},requestRetry:n=>e({seed:n}),seed:null})),efe={all:void 0,cancelled:["cancelled"],completed:["completed"],failed:["error"],running:["created","started"]};function tfe(e){return efe[e]}const nfe=e=>{const{apiClient:t}=Pe.getState();return t?t.request(gr.CREATE,e):Promise.reject(new Error("Not connected"))},rfe=({mutationConfig:e}={})=>dn({...e,mutationFn:nfe});function ife(e){const t=rfe(),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 s=crypto.randomUUID(),a={...e.projectPath?{clientCwd:e.projectPath,projectPath:e.projectPath}:{},content:e.content.trim(),taskId:s,type:e.type};try{await t.mutateAsync(a);const c=e.type==="query"?"Query":"Curate";lt.success(`${c} task queued`),e.onSubmitted?.(s,e.openDetailAfter),e.onClose()}catch(c){lt.error(c instanceof Error?c.message:"Failed to create task")}}}}const WT={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?"},ofe={curate:"Plain text knowledge to capture into the project context tree.",query:"The agent searches the project context tree and synthesizes an answer."};function sfe({type:e}){return f.jsx("p",{className:"text-muted-foreground/60 text-xs",children:ofe[e]})}function afe(){return f.jsxs("p",{className:"text-muted-foreground/60 mt-2 flex items-center gap-1.5 text-xs",children:[f.jsx(H$,{className:"size-3 shrink-0"}),f.jsxs("span",{children:["For file or folder attachments, use"," ",f.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 lfe({label:e}){return f.jsxs(ii,{className:"text-primary-foreground absolute bottom-2 left-3 gap-1.5 px-2 text-[10px] tracking-[0.08em] uppercase",variant:"secondary",children:[f.jsx("span",{"aria-hidden":!0,className:"bg-primary-foreground size-1.5 rounded-full"}),e]})}let GT=(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 wO(e){return S.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[GT.checked]:""}:{[GT.unchecked]:""}},...O0}),[e.indeterminate])}function cfe(e,t,n,r=!0,i){const[s,a]=S.useState(),c=ki(i?`${i}-label`:void 0),u=e??t??s;return We(()=>{const h=e||t||!r?void 0:ufe(n.current,c);s!==h&&a(h)}),u}function ufe(e,t){const n=dfe(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function dfe(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 SO=S.createContext(void 0);function ffe(){const e=S.useContext(SO);if(e===void 0)throw new Error(Cn(14));return e}const hfe="data-parent",pfe=S.forwardRef(function(t,n){const{checked:r,className:i,defaultChecked:s=!1,"aria-labelledby":a,disabled:c=!1,id:u,indeterminate:h=!1,inputRef:m,name:p,onCheckedChange:y,parent:x=!1,readOnly:b=!1,render:w,required:E=!1,uncheckedValue:k,value:T,nativeButton:N=!1,...O}=t,{clearErrors:j}=jv(),{disabled:A,name:R,setDirty:_,setFilled:F,setFocused:I,setTouched:H,state:q,validationMode:V,validityData:$,shouldValidateOnChange:U,validation:P}=Lf(),Y=zY(),{labelId:G,controlId:X,registerControlId:L,getDescriptionProps:B}=M0(),W=BY(),D=W?.parent,Q=D&&W.allValues,ee=A||Y.disabled||W?.disabled||c,J=R??p,he=T??J,de=ki(),Se=ki();let Re=X;Q?Re=x?Se:`${D.id}-${he}`:u&&(Re=u);let je={};Q&&(x?je=W.parent.getParentProps():he&&(je=W.parent.getChildProps(he)));const Fe=tt(y),{checked:_e=r,indeterminate:De=h,onCheckedChange:xe,...Ge}=je,we=W?.value,Ae=W?.setValue,pe=W?.defaultValue,be=S.useRef(null),ne=sr(()=>Symbol("checkbox-control")),ye=S.useRef(!1),{getButtonProps:Ce,buttonRef:Ve}=Rl({disabled:ee,native:N}),ct=W?.validation??P,[oe,Ee]=Wc({controlled:he&&we&&!x?we.includes(he):_e,default:he&&pe&&!x?pe.includes(he):s,name:"Checkbox",state:"checked"});We(()=>{L!==Er&&(ye.current=!0,L(ne.current,Re))},[Re,W,L,x,ne]),S.useEffect(()=>{const Qe=ne.current;return()=>{!ye.current||L===Er||(ye.current=!1,L(Qe,void 0))}},[L,ne]),Mv({enabled:!W,id:de,commit:ct.commit,value:oe,controlRef:be,name:J,getValue:()=>oe});const Le=S.useRef(null),Me=ps(m,Le,ct.inputRef),Ue=cfe(a,G,Le,!N,Re??void 0);We(()=>{Le.current&&(Le.current.indeterminate=De,oe&&F(!0))},[oe,De,F]),Cv(oe,()=>{W&&!x||(j(J),F(oe),_(oe!==$.initialValue),U()?ct.commit(oe):ct.commit(oe,!0))});const dt=Oo({checked:oe,disabled:ee,name:x?void 0:J,id:N?void 0:Re??void 0,required:E,ref:Me,style:J?DN:Tb,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Qe){if(Qe.nativeEvent.defaultPrevented)return;const Ct=Qe.target.checked,$e=kt(El,Qe.nativeEvent);if(xe?.(Ct,$e),Fe(Ct,$e),!$e.isCanceled&&(Ee(Ct),he&&we&&Ae&&!x)){const ge=Ct?[...we,he]:we.filter(Oe=>Oe!==he);Ae(ge,$e)}},onFocus(){be.current?.focus()}},T!==void 0?{value:(W?oe&&T:T)||""}:Bn,B,W?ct.getValidationProps:ct.getInputValidationProps),xt=Q?!!_e:oe,Je=Q&&De||h;S.useEffect(()=>{if(!D||!he)return;const Qe=D.disabledStatesRef.current;return Qe.set(he,ee),()=>{Qe.delete(he)}},[D,ee,he]);const Ke=S.useMemo(()=>({...q,checked:xt,disabled:ee,readOnly:b,required:E,indeterminate:Je}),[q,xt,ee,b,E,Je]),bt=wO(Ke),nt=Ot("span",t,{state:Ke,ref:[Ve,be,n,W?.registerControlRef],props:[{id:N?Re??void 0:de,role:"checkbox","aria-checked":De?"mixed":oe,"aria-readonly":b||void 0,"aria-required":E||void 0,"aria-labelledby":Ue,[hfe]:x?"":void 0,onFocus(){I(!0)},onBlur(){const Qe=Le.current;Qe&&(H(!0),I(!1),V==="onBlur"&&ct.commit(W?we:Qe.checked))},onClick(Qe){b||ee||(Qe.preventDefault(),Le.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Qe.shiftKey,ctrlKey:Qe.ctrlKey,altKey:Qe.altKey,metaKey:Qe.metaKey})))}},B,ct.getValidationProps,O,Ge,Ce],stateAttributesMapping:bt});return f.jsxs(SO.Provider,{value:Ke,children:[nt,!oe&&!W&&J&&!x&&k!==void 0&&f.jsx("input",{type:"hidden",name:J,value:k}),f.jsx("input",{...dt})]})}),mfe=S.forwardRef(function(t,n){const{render:r,className:i,keepMounted:s=!1,...a}=t,c=ffe(),u=c.checked||c.indeterminate,{mounted:h,transitionStatus:m,setMounted:p}=Ea(u),y=S.useRef(null),x={...c,transitionStatus:m};Xi({open:u,ref:y,onComplete(){u||p(!1)}});const b=wO(c),w=S.useMemo(()=>({...b,...ws,...O0}),[b]),E=s||h,k=Ot("span",t,{ref:[n,y],state:x,stateAttributesMapping:w,props:a});return E?k:null});function gfe({className:e,...t}){return f.jsx(pfe,{"data-slot":"checkbox",className:se("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:f.jsx(mfe,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:f.jsx(wf,{})})})}function yfe({canSubmit:e,hasActiveProvider:t,inTour:n,isPending:r,onClose:i,onOpenDetailChange:s,onSubmit:a,openDetailAfter:c,type:u}){const y=r?u==="query"?"Querying…":"Curating…":n||t?u==="query"?"Query":"Curate":"Connect provider…";return f.jsxs("footer",{className:"border-border flex items-center justify-between gap-3 border-t px-7 py-3.5",children:[n?f.jsx("span",{}):f.jsxs("label",{className:"text-muted-foreground inline-flex cursor-pointer items-center gap-2 text-xs",children:[f.jsx(gfe,{checked:c,onCheckedChange:s}),"Open after submit"]}),f.jsxs("div",{className:"ml-2 flex items-center gap-2",children:[f.jsx(ze,{onClick:i,size:"sm",variant:"ghost",children:"Cancel"}),f.jsx(ze,{disabled:!e||r,onClick:a,size:"sm",children:y})]})]})}function xfe({inTour:e,onTypeChange:t,projectPath:n,tourStepLabel:r,type:i}){return f.jsxs("header",{className:"border-border flex flex-col gap-2 border-b px-7 pt-5 pb-4",children:[r&&f.jsx(j0,{label:r}),f.jsxs("div",{className:"flex items-center justify-between gap-4 pr-10",children:[f.jsxs("h2",{className:"text-foreground flex items-baseline gap-1.5 text-lg font-medium tracking-tight",children:[f.jsx("span",{className:"text-muted-foreground/70 font-normal",children:"New"}),f.jsxs("span",{children:[i," task"]})]}),e?f.jsxs(ms,{children:[f.jsx(gs,{render:f.jsx(KT,{disabled:!0,onChange:t,value:i})}),f.jsx($i,{children:"Locked during the tour — the next step covers the other mode."})]}):f.jsx(KT,{onChange:t,value:i})]}),f.jsxs("p",{className:"text-muted-foreground/70 text-xs",children:[i==="query"?"Searches":"Will dispatch to"," ",f.jsx("span",{className:"text-identifier mono",children:n||"(no project selected)"})]})]})}function KT({disabled:e=!1,onChange:t,value:n}){return f.jsxs("div",{"aria-disabled":e,className:se("border-border bg-muted relative inline-flex rounded-md border p-0.5",e&&"opacity-60"),children:[f.jsx("span",{"aria-hidden":!0,className:se("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=>f.jsx("button",{className:se("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 bfe({initialContent:e,initialType:t,onClose:n,onSubmitted:r,open:i,prefillNotice:s,tourStepLabel:a}){const c=!!a;return f.jsx(gO,{onOpenChange:u=>!u&&n(),open:i,children:f.jsx(yO,{className:se("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&&f.jsx(vfe,{initialContent:e,initialType:t,onClose:n,onSubmitted:r,prefillNotice:s,tourStepLabel:a})})})}function vfe({initialContent:e,initialType:t,onClose:n,onSubmitted:r,prefillNotice:i,tourStepLabel:s}){const a=Pe(H=>H.selectedProject),{data:c}=uv(),[u,h]=S.useState(t??"curate"),[m,p]=S.useState(e??""),[y,x]=S.useState(!0),[b,w]=S.useState(!1),[E,k]=S.useState(!!e),T=S.useRef(null);S.useEffect(()=>{T.current?.focus()},[]);const N=!!c,O=!!s,{canSubmit:j,isPending:A,submit:R}=ife({content:m,hasActiveProvider:N,onClose:n,onProviderRequired:()=>w(!0),onSubmitted:r,openDetailAfter:y,projectPath:a,type:u}),_=H=>{if((H.metaKey||H.ctrlKey)&&H.key==="Enter"){H.preventDefault(),R().catch(()=>{});return}H.key==="Tab"&&!H.shiftKey&&!m&&(H.preventDefault(),p(WT[u]))},F=!!(i&&E&&m===(e??"")),I=H=>{E&&H!==(e??"")&&k(!1),p(H)};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[f.jsx(xfe,{inTour:O,onTypeChange:h,projectPath:a,tourStepLabel:s,type:u}),f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-7 py-5",children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsxs("div",{className:"relative",children:[f.jsx(qv,{className:"bg-card dark:bg-card text-foreground/90 mono min-h-64 pr-4 pb-7 text-sm leading-relaxed",onChange:H=>I(H.target.value),onKeyDown:_,placeholder:WT[u],ref:T,rows:u==="query"?4:6,value:m}),F&&i&&f.jsx(lfe,{label:i}),f.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:[f.jsx("span",{className:"text-muted-foreground/60",children:m?f.jsxs(f.Fragment,{children:[f.jsxs("kbd",{className:"bg-muted text-foreground/70 inline-flex items-center gap-1 rounded px-1.5 py-0.5 leading-none",children:[f.jsx(x$,{className:"size-2.5"})," · Ctrl + Enter"]})," ","to ",u]}):f.jsxs(f.Fragment,{children:[f.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"]})}),f.jsxs("span",{children:[m.length," chars"]})]})]}),f.jsx(sfe,{type:u})]}),u==="curate"&&!O&&f.jsx(afe,{})]}),f.jsx(yfe,{canSubmit:j,hasActiveProvider:N,inTour:O,isPending:A,onClose:n,onOpenDetailChange:x,onSubmit:R,openDetailAfter:y,type:u})]}),f.jsx(L0,{onOpenChange:w,open:b})]})}const CO={curate:"Step 2 of 4",query:"Step 3 of 4"},wfe={curate:"Continue to query",query:"Continue to connector"},Sfe={curate:"Watch the agent capture this knowledge into your context tree.",query:"Watch the agent search the context tree and synthesize an answer."},Cfe={curate:"Knowledge captured. Ready to ask a question about it?",query:"Answer synthesized. One last step — connect ByteRover to your AI tool."};function EO(e){const t=Ht(s=>s.tourActive),n=Ht(s=>s.tourStep),r=Ht(s=>s.tourTaskId);return t&&r===e.taskId&&(n==="curate"||n==="query")?n:null}function Efe(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.":Sfe[t]}function kfe({task:e}){const t=EO(e);return t?f.jsxs("div",{className:"border-primary-foreground/30 bg-primary/8 flex items-center gap-3 rounded-lg border px-4 py-2.5",children:[f.jsx(j0,{label:CO[t]}),f.jsx("span",{className:"text-muted-foreground text-sm",children:Efe(e.status,t)})]}):null}function Tfe({task:e}){const t=Ht(r=>r.advanceTour),n=EO(e);return!n||e.status!=="completed"?null:f.jsxs("div",{className:"border-primary-foreground/40 bg-primary/12 flex items-center gap-4 rounded-lg border px-4 py-3.5",children:[f.jsx("span",{className:"bg-primary-foreground/20 text-primary-foreground grid size-8 shrink-0 place-items-center rounded-full",children:f.jsx(Ra,{className:"size-4",strokeWidth:3})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-foreground text-sm font-medium",children:Cfe[n]}),f.jsxs("p",{className:"text-muted-foreground text-xs",children:[CO[n]," complete"]})]}),f.jsxs(ze,{onClick:()=>t(),type:"button",children:[wfe[n],f.jsx(LA,{className:"size-4"})]})]})}const Nfe=e=>{const{apiClient:t}=Pe.getState();return t?t.request(gr.GET,{taskId:e}):Promise.reject(new Error("Not connected"))},Rfe=(e,t)=>({enabled:t,queryFn:()=>Nfe(e),queryKey:["tasks","detail",e],staleTime:Number.POSITIVE_INFINITY}),Afe=({enabled:e,queryConfig:t,taskId:n})=>Mn({...Rfe(n,e),...t,enabled:e}),jfe=80;function Ofe(e,t=!0){const n=S.useRef(null),r=S.useRef(!0),i=S.useCallback(()=>{const s=n.current;if(!s)return;const a=s.scrollHeight-s.scrollTop-s.clientHeight;r.current=a<jfe},[]);return S.useLayoutEffect(()=>{if(!t)return;const s=n.current;!s||!r.current||(s.scrollTop=s.scrollHeight)},[t,...e]),{onScroll:i,ref:n}}function Mfe(e){const t={content:e.content,createdAt:e.createdAt,status:e.status,taskId:e.taskId,type:e.type,...e.files?{files:e.files}:{},...e.folderPath?{folderPath:e.folderPath}:{},...e.model?{model:e.model}:{},...e.projectPath?{projectPath:e.projectPath}:{},...e.provider?{provider:e.provider}:{},...e.reasoningContents?{reasoningContents:e.reasoningContents}:{},...e.responseContent?{responseContent:e.responseContent}:{},...e.sessionId?{sessionId:e.sessionId}:{},...e.toolCalls?{toolCalls:e.toolCalls}:{}};switch(e.status){case"cancelled":return{...t,completedAt:e.completedAt,...e.startedAt?{startedAt:e.startedAt}:{}};case"completed":return{...t,completedAt:e.completedAt,...e.result?{result:e.result}:{},...e.startedAt?{startedAt:e.startedAt}:{}};case"created":return t;case"error":return{...t,completedAt:e.completedAt,error:e.error,...e.startedAt?{startedAt:e.startedAt}:{}};case"started":return{...t,startedAt:e.startedAt}}}function Dfe(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 Fc=e=>String(e).padStart(2,"0");function kO(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 s=Math.round(i/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}function _d(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}:${Fc(r)}:${Fc(i)}`:`${r}:${Fc(i)}`}function TO(e){const t=new Date(e);return`${Fc(t.getHours())}:${Fc(t.getMinutes())}:${Fc(t.getSeconds())}`}function NO(e){if(!e)return"";const t=e.replace(/^task[_-]?/,"");return t.length>8?t.slice(0,8):t}const ns=e=>On(e,"path")??On(e,"file_path")??On(e,"filePath")??"",_fe=e=>On(e,"command")??"",Lfe=e=>On(e,"code")??"",Td=e=>On(e,"query")??"",Vp=e=>On(e,"path")??On(e,"key")??On(e,"name")??"",Ife=e=>{const t=On(e,"pattern")??"",n=On(e,"path");return n?`${t} in ${n}`:t},Pfe=e=>{const t=On(e,"pattern")??"",n=On(e,"path");return n?`${t} in ${n}`:t},QT=(e,t)=>n=>{const r=n[e];return Array.isArray(r)?`${r.length} ${t}${r.length===1?"":"s"}`:""},XT=(e,t=80)=>e.length>t?`${e.slice(0,t-1)}…`:e,zfe={agentic_map:e=>ns(e)||Td(e),bash_exec:_fe,bash_output:e=>On(e,"processId")??"",batch:QT("calls","call"),code_exec:Lfe,create_knowledge_topic:e=>On(e,"path")??On(e,"topic")??"",curate:e=>On(e,"title")??On(e,"path")??"",delete_memory:Vp,detect_domains:e=>XT(On(e,"data")??"",60),edit_file:ns,edit_memory:Vp,expand_knowledge:e=>On(e,"stubPath")??ns(e),glob_files:Pfe,grep_content:Ife,ingest_resource:e=>On(e,"source")??On(e,"url")??ns(e),kill_process:e=>On(e,"processId")??"",list_directory:ns,list_memories:ns,llm_map:e=>ns(e)||Td(e),read_file:ns,read_memory:Vp,read_todos:()=>"",search_history:Td,search_knowledge:Td,swarm_query:Td,swarm_store:e=>XT(On(e,"content")??"",60),write_file:ns,write_memory:Vp,write_todos:QT("todos","todo")};function Ffe(e){const t=Object.entries(e).find(([,n])=>typeof n=="string"||typeof n=="number");return t?String(t[1]):""}function jw(e){const t=zfe[e.toolName];return t?t(e.args):Ffe(e.args)}function On(e,t){const n=e[t];return typeof n=="string"?n:void 0}const Bfe={a({children:e,href:t}){return t?f.jsx("a",{className:"text-identifier underline-offset-2 hover:underline",href:t,rel:"noopener noreferrer",target:"_blank",children:e}):f.jsx(f.Fragment,{children:e})},blockquote({children:e}){return f.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?f.jsx("div",{className:"border-border/50 bg-muted/40 my-2 overflow-x-auto rounded-md border",children:f.jsx(fn,{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:Aw,children:n})}):f.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 f.jsx("h1",{className:"text-foreground mt-3 mb-2 text-base font-semibold",children:e})},h2({children:e}){return f.jsx("h2",{className:"text-foreground mt-3 mb-2 text-sm font-semibold",children:e})},h3({children:e}){return f.jsx("h3",{className:"text-foreground mt-3 mb-2 text-sm font-semibold",children:e})},li({children:e}){return f.jsx("li",{className:"my-0.5 leading-relaxed",children:e})},ol({children:e}){return f.jsx("ol",{className:"my-2 list-inside list-decimal space-y-1 pl-1",children:e})},p({children:e}){return f.jsx("p",{className:"my-1.5 leading-relaxed first:mt-0 last:mb-0",children:e})},ul({children:e}){return f.jsx("ul",{className:"my-2 list-inside list-disc space-y-1 pl-1",children:e})}},Hfe=[rO],Jf=S.memo(({children:e,className:t})=>f.jsx("div",{className:t??"text-foreground/90 text-sm",children:f.jsx(Dj,{components:Bfe,remarkPlugins:Hfe,children:e})}));Jf.displayName="MarkdownInline";function Ey(){return f.jsx("span",{"aria-hidden":!0,className:"text-muted-foreground/40",children:"·"})}function bf({children:e,count:t}){return f.jsxs("div",{className:"text-muted-foreground mono mb-3 flex items-baseline gap-2 text-[11px] uppercase tracking-wider",children:[f.jsx("span",{children:e}),f.jsx("span",{className:"bg-border/50 h-px flex-1"}),t!==void 0&&f.jsx("span",{className:"tabular-nums",children:t})]})}const Ufe={completed:"bg-emerald-500",error:"bg-red-400",muted:"bg-muted-foreground/60",running:"bg-blue-400"},qfe={completed:"bg-emerald-500/70",error:"bg-red-400/70",muted:"bg-muted-foreground/30",running:"rail-running"};function Ow({flash:e,tone:t,tooltip:n}){const r=f.jsxs("span",{className:"absolute top-1 left-0 grid size-3 place-items-center",children:[f.jsx("span",{className:se("ring-background relative z-10 size-2 rounded-full ring-[1.5px]",Ufe[t],e&&"animate-dot-flash")}),t==="running"&&f.jsx("span",{className:"bg-blue-400 absolute inset-0 rounded-full opacity-50 animate-dot-pulse"})]});return n?f.jsxs(ms,{children:[f.jsx(gs,{render:r}),f.jsx($i,{children:n})]}):r}function RO({tone:e}){const t=e==="completed"?Ra:Rv,n=e==="completed"?"bg-emerald-500":"bg-red-400";return f.jsx("span",{className:"absolute -top-0.5 -left-1 grid size-5 place-items-center",children:f.jsx("span",{className:se("ring-background relative grid size-4 place-items-center rounded-full ring-2",n),children:f.jsx(t,{className:"text-background absolute size-3 stroke-3"})})})}function Vfe(e,t){const n=e.startedAt??e.createdAt,r=e.completedAt??t;return Math.max(0,r-n)}function ZT(e,t){if(!e||!t)return e;const n=t.replaceAll("-","_"),r=new RegExp(`_${n}\\b`,"g");return e.replaceAll(r,"")}const $fe={completed:"text-emerald-500/80",error:"text-red-400/80",running:"text-blue-400/80"},t0={bash_exec:{in:"bash",out:"bash"},bash_output:{in:"bash",out:"bash"},code_exec:{in:"javascript",out:"json"}},Yfe={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 Wfe(e){return Yfe[e]??e.replaceAll("_"," ")}const Gfe={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 Kfe(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 Gfe[r]}const Qfe=new Set(["delete_memory","edit_memory","list_memories","read_memory","write_memory"]),Xfe=new Set(["bash_output"]),Zfe=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 Jfe(e){return e in t0?{format:"code",language:t0[e].in}:Qfe.has(e)?{format:"keypath"}:{format:"markdown"}}function ehe(e,t){return Xfe.has(e)?{format:"plain"}:t?{format:"code",language:t}:e in t0?{format:"code",language:t0[e].out}:Zfe.has(e)?{format:"code",language:"json"}:{format:"markdown"}}const AO=S.memo(({content:e,language:t="bash"})=>f.jsx(fn,{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:Aw,children:e}));AO.displayName="CodeBlock";function the({call:e,flash:t,taskId:n,tooltip:r}){const[i,s]=S.useState(!1),a=S.useMemo(()=>ZT(jw(e),n),[e,n]),c=S.useMemo(()=>ZT(she(e),n),[e,n]),u=S.useMemo(()=>Kfe(e.args),[e.args]),h=Jfe(e.toolName),m=ehe(e.toolName,u),p=c.length>0,y=e.status==="running",x=()=>s(b=>!b);return f.jsxs(f.Fragment,{children:[f.jsx(Ow,{flash:t,tone:e.status,tooltip:r}),f.jsxs("div",{className:"text-muted-foreground mb-2 flex flex-wrap items-baseline gap-2 text-[11px]",children:[f.jsx("span",{className:se("mono uppercase tracking-wider",$fe[e.status]),children:Wfe(e.toolName)}),y&&f.jsx("span",{className:"text-blue-400/80",children:"running"})]}),f.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:[f.jsx(JT,{collapsedHeight:"max-h-5",collapsedLines:nhe,content:a||"—",empty:!a,expanded:i,format:h.format,label:"in",language:h.language}),f.jsx("div",{className:"border-border/50 border-t"}),f.jsx(JT,{collapsedHeight:"max-h-16",collapsedLines:rhe,content:c,empty:!p,expanded:i,format:m.format,label:"out",language:m.language,placeholder:y?"running…":"—"}),!i&&f.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"}),f.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:[f.jsx("span",{children:i?"Click to collapse":"Click to expand"}),i?f.jsx(l$,{className:"size-3.5"}):f.jsx(_f,{className:"size-3.5"})]})]})]})}const nhe=1,rhe=3;function JT({collapsedHeight:e,collapsedLines:t,content:n,empty:r,expanded:i,format:s,label:a,language:c,placeholder:u}){const h=S.useMemo(()=>i?0:Math.max(0,n.split(`
128
+ `).length-t),[n,t,i]),m=()=>{switch(s){case"code":return f.jsx(AO,{content:n,language:c});case"keypath":return f.jsx(ohe,{path:n});case"plain":return f.jsx(ihe,{content:n});default:return f.jsx(Jf,{className:"text-foreground/90 text-sm",children:n})}};return f.jsxs("div",{className:"flex items-start gap-3 px-3 py-2",children:[f.jsxs("span",{className:"text-muted-foreground mono mt-[3px] flex w-7 shrink-0 flex-col items-start text-[10px] uppercase tracking-wider",children:[f.jsx("span",{children:a}),h>0&&f.jsxs("span",{className:"text-muted-foreground/60 mt-1 text-[9px] normal-case tracking-normal",children:["+",h]})]}),f.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto",children:r?f.jsx("span",{className:"text-muted-foreground/60 italic text-xs",children:u??"—"}):i?m():f.jsx("div",{className:se("overflow-hidden",e),children:m()})})]})}function ihe({content:e}){return f.jsx("pre",{className:"text-foreground/85 mono m-0 text-xs leading-6 whitespace-pre-wrap",children:e})}function ohe({path:e}){const t=e.split("/");return f.jsx("span",{className:"text-foreground/90 mono text-sm",children:t.map((n,r)=>f.jsxs(S.Fragment,{children:[r>0&&f.jsx("span",{className:"text-muted-foreground/40 mx-0.5",children:"/"}),n]},r))})}function she(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 ahe={curate:"Curating","curate-folder":"Curating",query:"Querying"};function $p(e,t){return`${e.kind}-${t}-${e.timestamp}`}function ky(e){return e.kind==="reasoning"?"muted":e.call.status==="error"?"error":e.call.status==="running"?"running":"completed"}function lhe({now:e,task:t}){const n=S.useMemo(()=>Dfe(t),[t]),r=$c(t.status),i=S.useRef(null),s=S.useRef(new Map);i.current===null&&(i.current=new Set(n.map((u,h)=>$p(u,h))));const a=[],c=new Set;for(const[u,h]of n.entries()){const m=$p(h,u);i.current.has(m)||a.push(m);const p=ky(h);s.current.get(m)==="running"&&(p==="completed"||p==="error")&&c.add(m)}return S.useEffect(()=>{if(i.current)for(const[u,h]of n.entries()){const m=$p(h,u);i.current.add(m),s.current.set(m,ky(h))}}),n.length===0?f.jsxs("section",{children:[f.jsx(bf,{children:"Event log"}),r?f.jsx("ol",{className:"space-y-5",children:f.jsx(e6,{taskType:t.type})}):f.jsx("p",{className:"text-muted-foreground text-center text-sm py-6",children:"No events captured for this task."})]}):f.jsxs("section",{children:[f.jsx(bf,{count:n.length,children:"Event log"}),f.jsxs("ol",{className:"space-y-5",children:[n.map((u,h)=>{const m=$p(u,h),p=a.indexOf(m),y=h===n.length-1,x=t.status==="completed"&&!!t.result,b=t.status==="error"&&!!t.error,E=!y||r||(x||b),k=n[h+1]?.timestamp??t.completedAt??e;let T=ky(u);return y&&(r?T="running":x?T="completed":b&&(T="error")),f.jsx(che,{endTimestamp:k,event:u,flash:c.has(m),hasNext:E,isNew:p!==-1,railTone:T,staggerIndex:Math.max(p,0),taskId:t.taskId,taskTerminal:la(t.status),tooltip:uhe(u,k)},m)}),r&&f.jsx(e6,{taskType:t.type})]})]})}function e6({taskType:e}){const t=ahe[e]??"Working";return f.jsxs("li",{className:"relative pl-7",children:[f.jsx(Ow,{tone:"running"}),f.jsx("span",{className:"bg-blue-400/70 absolute top-[9px] left-[13px] h-px w-5.5 rounded"}),f.jsx("span",{className:"text-blue-400/70 mono absolute top-[2px] left-10 text-[9px] uppercase tracking-wider",children:"now"}),f.jsxs("span",{className:"text-blue-400 italic text-sm ml-10",children:[t,"…"]})]})}function che({endTimestamp:e,event:t,flash:n,hasNext:r,isNew:i,railTone:s,staggerIndex:a,taskId:c,taskTerminal:u,tooltip:h}){return f.jsxs("li",{className:se("relative pl-7",i&&"animate-in fade-in slide-in-from-bottom-1 duration-300 fill-mode-both"),style:i?{animationDelay:`${a*60}ms`}:void 0,children:[r&&f.jsx("div",{className:se("absolute top-3 -bottom-7 left-[5px] w-0.5 rounded-full",qfe[s])}),t.kind==="reasoning"?f.jsx(fhe,{endTimestamp:e,flash:n,hasNext:r,item:t.item,taskTerminal:u,tooltip:h}):f.jsx(the,{call:t.call,flash:n,taskId:c,tooltip:h})]})}function uhe(e,t){const n=TO(e.timestamp),r=dhe(t-e.timestamp);if(e.kind==="reasoning")return f.jsxs("span",{className:"flex flex-col gap-0.5",children:[f.jsxs("span",{children:[f.jsx("span",{className:"mono text-muted-foreground tabular-nums",children:n}),f.jsxs("span",{className:"mono text-blue-400 ml-2 tabular-nums",children:["+",r]})]}),f.jsx("span",{className:"mono text-foreground/80 text-[10px]",children:"reasoning"})]});const i=jw(e.call).slice(0,60);return f.jsxs("span",{className:"flex flex-col gap-0.5",children:[f.jsxs("span",{children:[f.jsx("span",{className:"mono text-muted-foreground tabular-nums",children:n}),f.jsxs("span",{className:"mono text-blue-400 ml-2 tabular-nums",children:["+",r]})]}),f.jsxs("span",{className:"mono text-foreground/80 text-[10px] wrap-break-word",children:[e.call.toolName,i&&` · ${i}`]})]})}function dhe(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 fhe({endTimestamp:e,flash:t,hasNext:n,item:r,taskTerminal:i,tooltip:s}){const a=(r.isThinking||!r.content)&&!i&&!n,c=a?void 0:hhe(e-r.timestamp);return f.jsxs(f.Fragment,{children:[f.jsx(Ow,{flash:t,tone:"muted",tooltip:s}),f.jsxs("div",{className:"text-muted-foreground mb-1.5 flex items-baseline gap-2 text-[11px]",children:[f.jsx("span",{className:"mono uppercase tracking-wider",children:"reasoning"}),a?f.jsxs("span",{className:"text-blue-400/80 inline-flex items-center gap-1.5 italic",children:[f.jsx("span",{className:"bg-blue-400 size-1 rounded-full animate-pulse"}),"thinking…"]}):c&&f.jsxs("span",{className:"italic",children:["Thought for ",c]})]}),r.content&&f.jsx(Jf,{className:"text-foreground/90 text-sm",children:r.content})]})}function hhe(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 phe={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 jO({className:e,showLabel:t=!0,size:n="sm",status:r}){const{dot:i,label:s,pulse:a,tone:c}=phe[r];return f.jsxs(ii,{className:se(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:[f.jsx("span",{className:se("size-1.5 shrink-0 rounded-full",i,a&&"animate-pill-ping")}),t&&f.jsx("span",{children:s})]})}const mhe={cancelled:"cancelled",completed:"finished",created:"started",error:"finished",started:"started"};function ghe({now:e,task:t}){const n=la(t.status),r=Vfe(t,e),i=t.startedAt??t.createdAt,s=mhe[t.status],a=n?"ran":"running";return f.jsxs("header",{className:"px-6 pt-5 pb-4",children:[f.jsxs("div",{className:"flex items-center gap-3 pr-12",children:[f.jsx(jO,{status:t.status}),f.jsx("h1",{className:"text-foreground min-w-0 flex-1 truncate text-lg leading-tight font-medium tracking-tight",children:t.content||f.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})})]}),f.jsxs("div",{className:"text-muted-foreground mt-2.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[f.jsx(yhe,{taskId:t.taskId}),f.jsx(Ey,{}),f.jsx("span",{className:"mono uppercase tracking-wider",children:gA(t.type)}),f.jsx(Ey,{}),f.jsxs("span",{children:[s," ",kO(i,e)," ago"]}),f.jsx(Ey,{}),f.jsxs("span",{className:se("mono tabular-nums",$c(t.status)?"text-blue-400":"text-muted-foreground"),children:[a," ",_d(r)]})]})]})}function yhe({taskId:e}){const t=async()=>{try{await navigator.clipboard.writeText(e),lt.success("Task ID copied",{duration:2e3})}catch{lt.error("Failed to copy task ID",{duration:3e3})}};return f.jsxs(ms,{children:[f.jsx(gs,{render:f.jsx(ze,{"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:f.jsx("span",{className:"truncate",children:e})}),f.jsx($i,{children:"Click to copy"})]})}function xhe(e){return e==="query"||e==="search"?"query":"curate"}const bhe=new Set(["ERR_LLM_ERROR","ERR_LLM_RATE_LIMIT","ERR_OAUTH_REFRESH_FAILED","ERR_OAUTH_TOKEN_EXPIRED","ERR_PROVIDER_NOT_CONFIGURED"]);function vhe({error:e,hadLlmServiceError:t}){return!!(t||e?.code&&bhe.has(e.code))}function t6({Icon:e,onRemove:t,path:n}){return f.jsxs(ii,{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:[f.jsx(e,{className:"text-muted-foreground"}),f.jsx("span",{className:"mono truncate",children:n}),t&&f.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:f.jsx(Rv,{className:"size-2.5"})})]})}function whe({task:e}){const{folderPath:t}=e,n=e.files??[],r=!!t||n.length>0;return f.jsxs("section",{children:[f.jsx(bf,{children:"Input"}),f.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||f.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})}),r&&f.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5 pl-3",children:[t&&f.jsx(t6,{Icon:PA,path:t}),n.map(i=>f.jsx(t6,{Icon:G$,path:i},i))]})]})}function She({task:e}){const t=e.responseContent??e.streamingContent??"",n=e.isStreaming||!e.responseContent&&$c(e.status);return f.jsxs("section",{children:[f.jsxs("div",{className:"mono mb-2 flex items-baseline gap-2 text-[11px] uppercase tracking-wider",children:[n?f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"text-blue-400 inline-flex items-center gap-1.5",children:[f.jsx("span",{className:"bg-blue-400 size-1 rounded-full animate-pulse"}),"live"]}),f.jsx("span",{className:"text-muted-foreground",children:"agent is responding"})]}):f.jsx("span",{className:"text-muted-foreground",children:"Response"}),f.jsx("span",{className:"bg-border/50 h-px flex-1"})]}),f.jsxs("div",{className:se("pl-3 text-foreground/90 text-sm border-l-2",n?"border-blue-500/30":"border-border"),children:[f.jsx(Jf,{className:"text-foreground/90 text-sm",children:t||" "}),n&&f.jsx("span",{className:"bg-blue-400/70 ml-1 inline-block h-3 w-1.5 align-middle animate-pulse"})]})]})}function Che({content:e}){return f.jsxs("section",{className:"relative pl-8",children:[f.jsx(RO,{tone:"completed"}),f.jsx(bf,{children:"Result"}),f.jsx(ca,{className:"ring-border bg-card p-5",size:"sm",children:f.jsx(Jf,{className:"text-foreground/90 text-sm",children:e})})]})}function Ehe({task:e}){const{error:t}=e,n=Dm(a=>a.openProviderDialog),r=Xx(a=>a.requestRetry),i=vhe({error:t,hadLlmServiceError:!!e.hadLlmServiceError});if(!t)return null;function s(){r({content:e.content,type:xhe(e.type)})}return f.jsxs("section",{className:"relative pl-8",children:[f.jsx(RO,{tone:"error"}),f.jsx(bf,{children:"Error"}),f.jsxs(ca,{className:"bg-red-500/5 p-5 ring-1 ring-red-500/30",size:"sm",children:[f.jsx("p",{className:"text-red-400 text-sm",children:kn(t)}),t.code&&f.jsx("p",{className:"text-muted-foreground mono mt-1 text-[11px]",children:t.code}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[i&&f.jsx(ze,{onClick:n,size:"sm",children:"Configure provider"}),f.jsxs(ze,{onClick:s,size:"sm",variant:i?"secondary":"default",children:[f.jsx(Z$,{className:"size-3.5"}),"Try again"]}),f.jsx("span",{className:"text-muted-foreground text-xs",children:"Your prompt is preserved."})]})]})]})}function n6({taskId:e}){return f.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[f.jsx("h2",{className:"text-foreground text-base font-medium",children:"Task not found"}),f.jsxs("p",{className:"text-muted-foreground max-w-md text-sm",children:["Task ",f.jsx("span",{className:"mono",children:NO(e)})," isn't in the local cache. It may have completed before the page was loaded, or it belongs to a different project."]})]})}function khe(e){return e?!!(e.responseContent&&e.responseContent.length>0||e.toolCalls&&e.toolCalls.length>0):!1}function The({taskId:e}){const t=eV(e),n=t!==void 0&&$c(t.status),r=!khe(t)&&!n,{data:i,isLoading:s}=Afe({enabled:r,taskId:e}),a=i?.task?Mfe(i.task):void 0,c=r?a??t:t,u=c?$c(c.status):!1,h=vO(u),p=Ht(T=>T.tourTaskId)===e,y=c?.reasoningContents?.at(-1),{onScroll:x,ref:b}=Ofe([c?.toolCalls?.length??0,c?.reasoningContents?.length??0,y?.content?.length??0,c?.streamingContent?.length??0,c?.responseContent,c?.result,c?.error?.message,c?.status],u||p);if(r&&s)return f.jsx(Nhe,{});if(r&&i&&i.task===null)return f.jsx(n6,{taskId:e});if(!c)return f.jsx(n6,{taskId:e});const w=u&&(c.streamingContent||c.responseContent),E=c.status==="completed"?c.result:void 0,k=c.status==="error"?c.error:void 0;return f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[f.jsx(ghe,{now:h,task:c}),f.jsx("div",{className:"border-border/50 border-t"}),f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-7 overflow-y-auto px-6 py-5",onScroll:x,ref:b,children:[f.jsx(kfe,{task:c}),f.jsx(whe,{task:c}),f.jsx(lhe,{now:h,task:c}),w&&f.jsx(She,{task:c}),E&&f.jsx(Che,{content:E}),k&&f.jsx(Ehe,{task:c}),f.jsx(Tfe,{task:c})]})]})}function Nhe(){return f.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center text-sm",role:"status",children:"Loading task…"})}function Yp(e){return dl(e,"d MMM yyyy")}function Zx(e){return e.createdAfter!==void 0&&e.createdBefore!==void 0?`${Yp(e.createdAfter)} – ${Yp(e.createdBefore)}`:e.createdAfter!==void 0?`Since ${Yp(e.createdAfter)}`:e.createdBefore!==void 0?`Until ${Yp(e.createdBefore)}`:"Any time"}function Rhe(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Ahe={},Ld={};function fl(e,t){try{const r=(Ahe[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in Ld?Ld[r]:r6(r,r.split(":"))}catch{if(e in Ld)return Ld[e];const n=e?.match(jhe);return n?r6(e,n.slice(1)):NaN}}const jhe=/([+-]\d\d):?(\d\d)?/;function r6(e,t){const n=+(t[0]||0),r=+(t[1]||0),i=+(t[2]||0)/60;return Ld[e]=n*60+r>0?n*60+r+i:n*60-r-i}class Co extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(fl(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),OO(this),Jx(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Co(...n,t):new Co(Date.now(),t)}withTimeZone(t){return new Co(+this,t)}getTimezoneOffset(){const t=-fl(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Jx(this),+this}[Symbol.for("constructDateFrom")](t){return new Co(+new Date(t),this.timeZone)}}const i6=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!i6.test(e))return;const t=e.replace(i6,"$1UTC");Co.prototype[t]&&(e.startsWith("get")?Co.prototype[e]=function(){return this.internal[t]()}:(Co.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Ohe(this),+this},Co.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Jx(this),+this}))});function Jx(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-fl(e.timeZone,e)*60))}function Ohe(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),OO(e)}function OO(e){const t=fl(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const i=-new Date(+e).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),a=i-s,c=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&c&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const u=i-n;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);const h=new Date(+e);h.setUTCSeconds(0);const m=i>0?h.getSeconds():(h.getSeconds()-60)%60,p=Math.round(-(fl(e.timeZone,e)*60))%60;(p||m)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+p),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+m));const y=fl(e.timeZone,e),x=y>0?Math.floor(y):Math.ceil(y),w=-new Date(+e).getTimezoneOffset()-x,E=x!==n,k=w-u;if(E&&k){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+k);const T=fl(e.timeZone,e),N=T>0?Math.floor(T):Math.ceil(T),O=x-N;O&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+O),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+O))}}class Ar extends Co{static tz(t,...n){return n.length?new Ar(...n,t):new Ar(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),i=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+i}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,i]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${i}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,i]=this.tzComponents();return`${t} GMT${n}${r}${i} (${Rhe(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),i=String(Math.abs(t)%60).padStart(2,"0");return[n,r,i]}withTimeZone(t){return new Ar(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ar(+new Date(t),this.timeZone)}}const o6=5,Mhe=4;function Dhe(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),s=t.addDays(i,o6*7-1);return t.getMonth(e)===t.getMonth(s)?o6:Mhe}function MO(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function _he(e,t){const n=MO(e,t),r=Dhe(e,t);return t.addDays(n,r*7-1)}const DO={...ol,labels:{labelDayButton:(e,t,n,r)=>{let i;r&&typeof r.format=="function"?i=r.format.bind(r):i=(a,c)=>dl(a,c,{locale:ol,...n});let s=i(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(i,s)=>dl(i,s,{locale:ol,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let i;r&&typeof r.format=="function"?i=r.format.bind(r):i=(a,c)=>dl(a,c,{locale:ol,...n});let s=i(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(i,s)=>dl(i,s,{locale:ol,...t}),r(e,"cccc")}}};class Ti{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Ar.tz(this.options.timeZone):new this.Date,this.newDate=(r,i,s)=>this.overrides?.newDate?this.overrides.newDate(r,i,s):this.options.timeZone?new Ar(r,i,s,this.options.timeZone):new Date(r,i,s),this.addDays=(r,i)=>this.overrides?.addDays?this.overrides.addDays(r,i):z9(r,i),this.addMonths=(r,i)=>this.overrides?.addMonths?this.overrides.addMonths(r,i):F9(r,i),this.addWeeks=(r,i)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,i):nne(r,i),this.addYears=(r,i)=>this.overrides?.addYears?this.overrides.addYears(r,i):rne(r,i),this.differenceInCalendarDays=(r,i)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,i):nw(r,i),this.differenceInCalendarMonths=(r,i)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,i):rw(r,i),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):pne(r),this.eachYearOfInterval=r=>{const i=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):yne(r),s=new Set(i.map(c=>this.getYear(c)));if(s.size===i.length)return i;const a=[];return s.forEach(c=>{a.push(new Date(c,0,1))}),a},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):_he(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):xne(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):q9(r),this.endOfWeek=(r,i)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,i):Y9(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):gne(r),this.format=(r,i,s)=>{const a=this.overrides?.format?this.overrides.format(r,i,this.options):dl(r,i,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):iw(r),this.getMonth=(r,i)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):gre(r,this.options),this.getYear=(r,i)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):yre(r,this.options),this.getWeek=(r,i)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):ow(r,this.options),this.isAfter=(r,i)=>this.overrides?.isAfter?this.overrides.isAfter(r,i):xre(r,i),this.isBefore=(r,i)=>this.overrides?.isBefore?this.overrides.isBefore(r,i):bre(r,i),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):H9(r),this.isSameDay=(r,i)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,i):ane(r,i),this.isSameMonth=(r,i)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,i):vre(r,i),this.isSameYear=(r,i)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,i):wre(r,i),this.max=r=>this.overrides?.max?this.overrides.max(r):ine(r),this.min=r=>this.overrides?.min?this.overrides.min(r):one(r),this.setMonth=(r,i)=>this.overrides?.setMonth?this.overrides.setMonth(r,i):Sre(r,i),this.setYear=(r,i)=>this.overrides?.setYear?this.overrides.setYear(r,i):Cre(r,i),this.startOfBroadcastWeek=(r,i)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):MO(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):Xc(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):hf(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):mne(r),this.startOfWeek=(r,i)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Qc(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):$9(r),this.options={locale:DO,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let i=0;i<10;i++)r[i.toString()]=n.format(i);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Ti.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:i}=this.options,s=n?.code;if(s&&Ti.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:i}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}Ti.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Lo=new Ti;class _O{constructor(t,n,r=Lo){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Lhe{constructor(t,n){this.date=t,this.weeks=n}}class Ihe{constructor(t,n){this.days=n,this.weekNumber=t}}function Phe(e){return le.createElement("button",{...e})}function zhe(e){return le.createElement("span",{...e})}function Fhe(e){const{size:t=24,orientation:n="left",className:r}=e;return le.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&le.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&le.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&le.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&le.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Bhe(e){const{day:t,modifiers:n,...r}=e;return le.createElement("td",{...r})}function Hhe(e){const{day:t,modifiers:n,...r}=e,i=le.useRef(null);return le.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),le.createElement("button",{ref:i,...r})}var ht;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ht||(ht={}));var _n;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(_n||(_n={}));var lo;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(lo||(lo={}));var gi;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(gi||(gi={}));function Uhe(e){const{options:t,className:n,components:r,classNames:i,...s}=e,a=[i[ht.Dropdown],n].join(" "),c=t?.find(({value:u})=>u===s.value);return le.createElement("span",{"data-disabled":s.disabled,className:i[ht.DropdownRoot]},le.createElement(r.Select,{className:a,...s},t?.map(({value:u,label:h,disabled:m})=>le.createElement(r.Option,{key:u,value:u,disabled:m},h))),le.createElement("span",{className:i[ht.CaptionLabel],"aria-hidden":!0},c?.label,le.createElement(r.Chevron,{orientation:"down",size:18,className:i[ht.Chevron]})))}function qhe(e){return le.createElement("div",{...e})}function Vhe(e){return le.createElement("div",{...e})}function $he(e){const{calendarMonth:t,displayIndex:n,...r}=e;return le.createElement("div",{...r},e.children)}function Yhe(e){const{calendarMonth:t,displayIndex:n,...r}=e;return le.createElement("div",{...r})}function Whe(e){return le.createElement("table",{...e})}function Ghe(e){return le.createElement("div",{...e})}const LO=S.createContext(void 0);function eh(){const e=S.useContext(LO);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Khe(e){const{components:t}=eh();return le.createElement(t.Dropdown,{...e})}function Qhe(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...s}=e,{components:a,classNames:c,labels:{labelPrevious:u,labelNext:h}}=eh(),m=S.useCallback(y=>{i&&n?.(y)},[i,n]),p=S.useCallback(y=>{r&&t?.(y)},[r,t]);return le.createElement("nav",{...s},le.createElement(a.PreviousMonthButton,{type:"button",className:c[ht.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":u(r),onClick:p},le.createElement(a.Chevron,{disabled:r?void 0:!0,className:c[ht.Chevron],orientation:"left"})),le.createElement(a.NextMonthButton,{type:"button",className:c[ht.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":i?void 0:!0,"aria-label":h(i),onClick:m},le.createElement(a.Chevron,{disabled:i?void 0:!0,orientation:"right",className:c[ht.Chevron]})))}function Xhe(e){const{components:t}=eh();return le.createElement(t.Button,{...e})}function Zhe(e){return le.createElement("option",{...e})}function Jhe(e){const{components:t}=eh();return le.createElement(t.Button,{...e})}function epe(e){const{rootRef:t,...n}=e;return le.createElement("div",{...n,ref:t})}function tpe(e){return le.createElement("select",{...e})}function npe(e){const{week:t,...n}=e;return le.createElement("tr",{...n})}function rpe(e){return le.createElement("th",{...e})}function ipe(e){return le.createElement("thead",{"aria-hidden":!0},le.createElement("tr",{...e}))}function ope(e){const{week:t,...n}=e;return le.createElement("th",{...n})}function spe(e){return le.createElement("th",{...e})}function ape(e){return le.createElement("tbody",{...e})}function lpe(e){const{components:t}=eh();return le.createElement(t.Dropdown,{...e})}const cpe=Object.freeze(Object.defineProperty({__proto__:null,Button:Phe,CaptionLabel:zhe,Chevron:Fhe,Day:Bhe,DayButton:Hhe,Dropdown:Uhe,DropdownNav:qhe,Footer:Vhe,Month:$he,MonthCaption:Yhe,MonthGrid:Whe,Months:Ghe,MonthsDropdown:Khe,Nav:Qhe,NextMonthButton:Xhe,Option:Zhe,PreviousMonthButton:Jhe,Root:epe,Select:tpe,Week:npe,WeekNumber:ope,WeekNumberHeader:spe,Weekday:rpe,Weekdays:ipe,Weeks:ape,YearsDropdown:lpe},Symbol.toStringTag,{value:"Module"}));function cs(e,t,n=!1,r=Lo){let{from:i,to:s}=e;const{differenceInCalendarDays:a,isSameDay:c}=r;return i&&s?(a(s,i)<0&&([i,s]=[s,i]),a(t,i)>=(n?1:0)&&a(s,t)>=(n?1:0)):!n&&s?c(s,t):!n&&i?c(i,t):!1}function Mw(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function rg(e){return!!(e&&typeof e=="object"&&"from"in e)}function Dw(e){return!!(e&&typeof e=="object"&&"after"in e)}function _w(e){return!!(e&&typeof e=="object"&&"before"in e)}function IO(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function PO(e,t){return Array.isArray(e)&&e.every(t.isDate)}function us(e,t,n=Lo){const r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:s,isAfter:a}=n;return r.some(c=>{if(typeof c=="boolean")return c;if(n.isDate(c))return i(e,c);if(PO(c,n))return c.some(u=>i(e,u));if(rg(c))return cs(c,e,!1,n);if(IO(c))return Array.isArray(c.dayOfWeek)?c.dayOfWeek.includes(e.getDay()):c.dayOfWeek===e.getDay();if(Mw(c)){const u=s(c.before,e),h=s(c.after,e),m=u>0,p=h<0;return a(c.before,c.after)?p&&m:m||p}return Dw(c)?s(e,c.after)>0:_w(c)?s(c.before,e)>0:typeof c=="function"?c(e):!1})}function upe(e,t,n,r,i){const{disabled:s,hidden:a,modifiers:c,showOutsideDays:u,broadcastCalendar:h,today:m=i.today()}=t,{isSameDay:p,isSameMonth:y,startOfMonth:x,isBefore:b,endOfMonth:w,isAfter:E}=i,k=n&&x(n),T=r&&w(r),N={[_n.focused]:[],[_n.outside]:[],[_n.disabled]:[],[_n.hidden]:[],[_n.today]:[]},O={};for(const j of e){const{date:A,displayMonth:R}=j,_=!!(R&&!y(A,R)),F=!!(k&&b(A,k)),I=!!(T&&E(A,T)),H=!!(s&&us(A,s,i)),q=!!(a&&us(A,a,i))||F||I||!h&&!u&&_||h&&u===!1&&_,V=p(A,m);_&&N.outside.push(j),H&&N.disabled.push(j),q&&N.hidden.push(j),V&&N.today.push(j),c&&Object.keys(c).forEach($=>{const U=c?.[$];U&&us(A,U,i)&&(O[$]?O[$].push(j):O[$]=[j])})}return j=>{const A={[_n.focused]:!1,[_n.disabled]:!1,[_n.hidden]:!1,[_n.outside]:!1,[_n.today]:!1},R={};for(const _ in N){const F=N[_];A[_]=F.some(I=>I===j)}for(const _ in O)R[_]=O[_].some(F=>F===j);return{...A,...R}}}function dpe(e,t,n={}){return Object.entries(e).filter(([,i])=>i===!0).reduce((i,[s])=>(n[s]?i.push(n[s]):t[_n[s]]?i.push(t[_n[s]]):t[lo[s]]&&i.push(t[lo[s]]),i),[t[ht.Day]])}function fpe(e){return{...cpe,...e}}function hpe(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Lw(){const e={};for(const t in ht)e[ht[t]]=`rdp-${ht[t]}`;for(const t in _n)e[_n[t]]=`rdp-${_n[t]}`;for(const t in lo)e[lo[t]]=`rdp-${lo[t]}`;for(const t in gi)e[gi[t]]=`rdp-${gi[t]}`;return e}function zO(e,t,n){return(n??new Ti(t)).formatMonthYear(e)}const ppe=zO;function mpe(e,t,n){return(n??new Ti(t)).format(e,"d")}function gpe(e,t=Lo){return t.format(e,"LLLL")}function ype(e,t,n){return(n??new Ti(t)).format(e,"cccccc")}function xpe(e,t=Lo){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function bpe(){return""}function FO(e,t=Lo){return t.format(e,"yyyy")}const vpe=FO,wpe=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:zO,formatDay:mpe,formatMonthCaption:ppe,formatMonthDropdown:gpe,formatWeekNumber:xpe,formatWeekNumberHeader:bpe,formatWeekdayName:ype,formatYearCaption:vpe,formatYearDropdown:FO},Symbol.toStringTag,{value:"Module"}));function Spe(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...wpe,...e}}function Iw(e,t,n,r){let i=(r??new Ti(n)).format(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}const Cpe=Iw;function Pw(e,t,n){return(n??new Ti(t)).formatMonthYear(e)}const Epe=Pw;function BO(e,t,n,r){let i=(r??new Ti(n)).format(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i}function HO(e){return"Choose the Month"}function UO(){return""}const kpe="Go to the Next Month";function qO(e,t){return kpe}function VO(e){return"Go to the Previous Month"}function $O(e,t,n){return(n??new Ti(t)).format(e,"cccc")}function YO(e,t){return`Week ${e}`}function WO(e){return"Week Number"}function GO(e){return"Choose the Year"}const Tpe=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Epe,labelDay:Cpe,labelDayButton:Iw,labelGrid:Pw,labelGridcell:BO,labelMonthDropdown:HO,labelNav:UO,labelNext:qO,labelPrevious:VO,labelWeekNumber:YO,labelWeekNumberHeader:WO,labelWeekday:$O,labelYearDropdown:GO},Symbol.toStringTag,{value:"Module"})),so=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function Npe(e,t){const n=t.locale?.labels??{};return{...Tpe,...e??{},labelDayButton:so(Iw,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:so(HO,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:so(qO,e?.labelNext,n.labelNext),labelPrevious:so(VO,e?.labelPrevious,n.labelPrevious),labelWeekNumber:so(YO,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:so(GO,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:so(Pw,e?.labelGrid,n.labelGrid),labelGridcell:so(BO,e?.labelGridcell,n.labelGridcell),labelNav:so(UO,e?.labelNav,n.labelNav),labelWeekNumberHeader:so(WO,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:so($O,e?.labelWeekday,n.labelWeekday)}}function Rpe(e,t,n,r,i){const{startOfMonth:s,startOfYear:a,endOfYear:c,eachMonthOfInterval:u,getMonth:h}=i;return u({start:a(e),end:c(e)}).map(y=>{const x=r.formatMonthDropdown(y,i),b=h(y),w=t&&y<s(t)||n&&y>s(n)||!1;return{value:b,label:x,disabled:w}})}function Ape(e,t={},n={}){let r={...t?.[ht.Day]};return Object.entries(e).filter(([,i])=>i===!0).forEach(([i])=>{r={...r,...n?.[i]}}),r}function jpe(e,t,n,r){const i=r??e.today(),s=n?e.startOfBroadcastWeek(i,e):t?e.startOfISOWeek(i):e.startOfWeek(i),a=[];for(let c=0;c<7;c++){const u=e.addDays(s,c);a.push(u)}return a}function Ope(e,t,n,r,i=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,eachYearOfInterval:c,getYear:u}=r,h=s(e),m=a(t),p=c({start:h,end:m});return i&&p.reverse(),p.map(y=>{const x=n.formatYearDropdown(y,r);return{value:u(y),label:x,disabled:!1}})}function Mpe(e,t={}){const{weekStartsOn:n,locale:r}=t,i=n??r?.options?.weekStartsOn??0,s=c=>{const u=typeof c=="number"||typeof c=="string"?new Date(c):c;return new Ar(u.getFullYear(),u.getMonth(),u.getDate(),12,0,0,e)},a=c=>{const u=s(c);return new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0,0)};return{today:()=>s(Ar.tz(e)),newDate:(c,u,h)=>new Ar(c,u,h,12,0,0,e),startOfDay:c=>s(c),startOfWeek:(c,u)=>{const h=s(c),m=u?.weekStartsOn??i,p=(h.getDay()-m+7)%7;return h.setDate(h.getDate()-p),h},startOfISOWeek:c=>{const u=s(c),h=(u.getDay()-1+7)%7;return u.setDate(u.getDate()-h),u},startOfMonth:c=>{const u=s(c);return u.setDate(1),u},startOfYear:c=>{const u=s(c);return u.setMonth(0,1),u},endOfWeek:(c,u)=>{const h=s(c),y=(((u?.weekStartsOn??i)+6)%7-h.getDay()+7)%7;return h.setDate(h.getDate()+y),h},endOfISOWeek:c=>{const u=s(c),h=(7-u.getDay())%7;return u.setDate(u.getDate()+h),u},endOfMonth:c=>{const u=s(c);return u.setMonth(u.getMonth()+1,0),u},endOfYear:c=>{const u=s(c);return u.setMonth(11,31),u},eachMonthOfInterval:c=>{const u=s(c.start),h=s(c.end),m=[],p=new Ar(u.getFullYear(),u.getMonth(),1,12,0,0,e),y=h.getFullYear()*12+h.getMonth();for(;p.getFullYear()*12+p.getMonth()<=y;)m.push(new Ar(p,e)),p.setMonth(p.getMonth()+1,1);return m},addDays:(c,u)=>{const h=s(c);return h.setDate(h.getDate()+u),h},addWeeks:(c,u)=>{const h=s(c);return h.setDate(h.getDate()+u*7),h},addMonths:(c,u)=>{const h=s(c);return h.setMonth(h.getMonth()+u),h},addYears:(c,u)=>{const h=s(c);return h.setFullYear(h.getFullYear()+u),h},eachYearOfInterval:c=>{const u=s(c.start),h=s(c.end),m=[],p=new Ar(u.getFullYear(),0,1,12,0,0,e);for(;p.getFullYear()<=h.getFullYear();)m.push(new Ar(p,e)),p.setFullYear(p.getFullYear()+1,0,1);return m},getWeek:(c,u)=>{const h=a(c);return ow(h,{weekStartsOn:u?.weekStartsOn??i,firstWeekContainsDate:u?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:c=>{const u=a(c);return iw(u)},differenceInCalendarDays:(c,u)=>{const h=a(c),m=a(u);return nw(h,m)},differenceInCalendarMonths:(c,u)=>{const h=a(c),m=a(u);return rw(h,m)}}}const th=e=>e instanceof HTMLElement?e:null,Ty=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Dpe=e=>th(e.querySelector("[data-animated-month]")),Ny=e=>th(e.querySelector("[data-animated-caption]")),Ry=e=>th(e.querySelector("[data-animated-weeks]")),_pe=e=>th(e.querySelector("[data-animated-nav]")),Lpe=e=>th(e.querySelector("[data-animated-weekdays]"));function Ipe(e,t,{classNames:n,months:r,focused:i,dateLib:s}){const a=S.useRef(null),c=S.useRef(r),u=S.useRef(!1);S.useLayoutEffect(()=>{const h=c.current;if(c.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||h.length===0||r.length!==h.length)return;const m=s.isSameMonth(r[0].date,h[0].date),p=s.isAfter(r[0].date,h[0].date),y=p?n[gi.caption_after_enter]:n[gi.caption_before_enter],x=p?n[gi.weeks_after_enter]:n[gi.weeks_before_enter],b=a.current,w=e.current.cloneNode(!0);if(w instanceof HTMLElement?(Ty(w).forEach(N=>{if(!(N instanceof HTMLElement))return;const O=Dpe(N);O&&N.contains(O)&&N.removeChild(O);const j=Ny(N);j&&j.classList.remove(y);const A=Ry(N);A&&A.classList.remove(x)}),a.current=w):a.current=null,u.current||m||i)return;const E=b instanceof HTMLElement?Ty(b):[],k=Ty(e.current);if(k?.every(T=>T instanceof HTMLElement)&&E&&E.every(T=>T instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const T=_pe(e.current);T&&(T.style.zIndex="1"),k.forEach((N,O)=>{const j=E[O];if(!j)return;N.style.position="relative",N.style.overflow="hidden";const A=Ny(N);A&&A.classList.add(y);const R=Ry(N);R&&R.classList.add(x);const _=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),T&&(T.style.zIndex=""),A&&A.classList.remove(y),R&&R.classList.remove(x),N.style.position="",N.style.overflow="",N.contains(j)&&N.removeChild(j)};j.style.pointerEvents="none",j.style.position="absolute",j.style.overflow="hidden",j.setAttribute("aria-hidden","true");const F=Lpe(j);F&&(F.style.opacity="0");const I=Ny(j);I&&(I.classList.add(p?n[gi.caption_before_exit]:n[gi.caption_after_exit]),I.addEventListener("animationend",_));const H=Ry(j);H&&H.classList.add(p?n[gi.weeks_before_exit]:n[gi.weeks_after_exit]),N.insertBefore(j,N.firstChild)})}})}function Ppe(e,t,n,r){const i=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:c,broadcastCalendar:u}=n??{},{addDays:h,differenceInCalendarDays:m,differenceInCalendarMonths:p,endOfBroadcastWeek:y,endOfISOWeek:x,endOfMonth:b,endOfWeek:w,isAfter:E,startOfBroadcastWeek:k,startOfISOWeek:T,startOfWeek:N}=r,O=u?k(i,r):a?T(i):N(i),j=u?y(s):a?x(b(s)):w(b(s)),A=t&&(u?y(t):a?x(t):w(t)),R=A&&E(j,A)?A:j,_=m(R,O),F=p(s,i)+1,I=[];for(let V=0;V<=_;V++){const $=h(O,V);I.push($)}const q=(u?35:42)*F;if(c&&I.length<q){const V=q-I.length;for(let $=0;$<V;$++){const U=h(I[I.length-1],1);I.push(U)}}return I}function zpe(e){const t=[];return e.reduce((n,r)=>{const i=r.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return n.concat(i.slice())},t.slice())}function Fpe(e,t,n,r){const{numberOfMonths:i=1}=n,s=[];for(let a=0;a<i;a++){const c=r.addMonths(e,a);if(t&&c>t)break;s.push(c)}return s}function s6(e,t,n,r){const{month:i,defaultMonth:s,today:a=r.today(),numberOfMonths:c=1}=e;let u=i||s||a;const{differenceInCalendarMonths:h,addMonths:m,startOfMonth:p}=r;if(n&&h(n,u)<c-1){const y=-1*(c-1);u=m(n,y)}return t&&h(u,t)<0&&(u=t),p(u)}function Bpe(e,t,n,r){const{addDays:i,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:c,endOfWeek:u,getISOWeek:h,getWeek:m,startOfBroadcastWeek:p,startOfISOWeek:y,startOfWeek:x}=r,b=e.reduce((w,E)=>{const k=n.broadcastCalendar?p(E,r):n.ISOWeek?y(E):x(E),T=n.broadcastCalendar?s(E):n.ISOWeek?a(c(E)):u(c(E)),N=t.filter(R=>R>=k&&R<=T),O=n.broadcastCalendar?35:42;if(n.fixedWeeks&&N.length<O){const R=t.filter(_=>{const F=O-N.length;return _>T&&_<=i(T,F)});N.push(...R)}const j=N.reduce((R,_)=>{const F=n.ISOWeek?h(_):m(_),I=R.find(q=>q.weekNumber===F),H=new _O(_,E,r);return I?I.days.push(H):R.push(new Ihe(F,[H])),R},[]),A=new Lhe(E,j);return w.push(A),w},[]);return n.reverseMonths?b.reverse():b}function Hpe(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:i,startOfDay:s,startOfMonth:a,endOfMonth:c,addYears:u,endOfYear:h,newDate:m,today:p}=t,{fromYear:y,toYear:x,fromMonth:b,toMonth:w}=e;!n&&b&&(n=b),!n&&y&&(n=t.newDate(y,0,1)),!r&&w&&(r=w),!r&&x&&(r=m(x,11,31));const E=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):y?n=m(y,0,1):!n&&E&&(n=i(u(e.today??p(),-100))),r?r=c(r):x?r=m(x,11,31):!r&&E&&(r=h(e.today??p())),[n&&s(n),r&&s(r)]}function Upe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:s=1}=n,{startOfMonth:a,addMonths:c,differenceInCalendarMonths:u}=r,h=i?s:1,m=a(e);if(!t)return c(m,h);if(!(u(t,e)<s))return c(m,h)}function qpe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:s}=n,{startOfMonth:a,addMonths:c,differenceInCalendarMonths:u}=r,h=i?s??1:1,m=a(e);if(!t)return c(m,-h);if(!(u(m,t)<=0))return c(m,-h)}function Vpe(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function ig(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function $pe(e,t){const[n,r]=Hpe(e,t),{startOfMonth:i,endOfMonth:s}=t,a=s6(e,n,r,t),[c,u]=ig(a,e.month?a:void 0);S.useEffect(()=>{const O=s6(e,n,r,t);u(O)},[e.timeZone]);const{months:h,weeks:m,days:p,previousMonth:y,nextMonth:x}=S.useMemo(()=>{const O=Fpe(c,r,{numberOfMonths:e.numberOfMonths},t),j=Ppe(O,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),A=Bpe(O,j,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),R=Vpe(A),_=zpe(A),F=qpe(c,n,e,t),I=Upe(c,r,e,t);return{months:A,weeks:R,days:_,previousMonth:F,nextMonth:I}},[t,c.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:b,onMonthChange:w}=e,E=O=>m.some(j=>j.days.some(A=>A.isEqualTo(O))),k=O=>{if(b)return;let j=i(O);n&&j<i(n)&&(j=i(n)),r&&j>i(r)&&(j=i(r)),u(j),w?.(j)};return{months:h,weeks:m,days:p,navStart:n,navEnd:r,previousMonth:y,nextMonth:x,goToMonth:k,goToDay:O=>{E(O)||k(O.date)}}}var vo;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(vo||(vo={}));function a6(e){return!e[_n.disabled]&&!e[_n.hidden]&&!e[_n.outside]}function Ype(e,t,n,r){let i,s=-1;for(const a of e){const c=t(a);a6(c)&&(c[_n.focused]&&s<vo.FocusedModifier?(i=a,s=vo.FocusedModifier):r?.isEqualTo(a)&&s<vo.LastFocused?(i=a,s=vo.LastFocused):n(a.date)&&s<vo.Selected?(i=a,s=vo.Selected):c[_n.today]&&s<vo.Today&&(i=a,s=vo.Today))}return i||(i=e.find(a=>a6(t(a)))),i}function Wpe(e,t,n,r,i,s,a){const{ISOWeek:c,broadcastCalendar:u}=s,{addDays:h,addMonths:m,addWeeks:p,addYears:y,endOfBroadcastWeek:x,endOfISOWeek:b,endOfWeek:w,max:E,min:k,startOfBroadcastWeek:T,startOfISOWeek:N,startOfWeek:O}=a;let A={day:h,week:p,month:m,year:y,startOfWeek:R=>u?T(R,a):c?N(R):O(R),endOfWeek:R=>u?x(R):c?b(R):w(R)}[e](n,t==="after"?1:-1);return t==="before"&&r?A=E([r,A]):t==="after"&&i&&(A=k([i,A])),A}function KO(e,t,n,r,i,s,a,c=0){if(c>365)return;const u=Wpe(e,t,n.date,r,i,s,a),h=!!(s.disabled&&us(u,s.disabled,a)),m=!!(s.hidden&&us(u,s.hidden,a)),p=u,y=new _O(u,p,a);return!h&&!m?y:KO(e,t,y,r,i,s,a,c+1)}function Gpe(e,t,n,r,i){const{autoFocus:s}=e,[a,c]=S.useState(),u=Ype(t.days,n,r||(()=>!1),a),[h,m]=S.useState(s?u:void 0);return{isFocusTarget:w=>!!u?.isEqualTo(w),setFocused:m,focused:h,blur:()=>{c(h),m(void 0)},moveFocus:(w,E)=>{if(!h)return;const k=KO(w,E,h,t.navStart,t.navEnd,e,i);k&&(e.disableNavigation&&!t.days.some(N=>N.isEqualTo(k))||(t.goToDay(k),m(k)))}}}function Kpe(e,t){const{selected:n,required:r,onSelect:i}=e,[s,a]=ig(n,i?n:void 0),c=i?n:s,{isSameDay:u}=t,h=x=>c?.some(b=>u(b,x))??!1,{min:m,max:p}=e;return{selected:c,select:(x,b,w)=>{let E=[...c??[]];if(h(x)){if(c?.length===m||r&&c?.length===1)return;E=c?.filter(k=>!u(k,x))}else c?.length===p?E=[x]:E=[...E,x];return i||a(E),i?.(E,x,b,w),E},isSelected:h}}function Qpe(e,t,n=0,r=0,i=!1,s=Lo){const{from:a,to:c}=t||{},{isSameDay:u,isAfter:h,isBefore:m}=s;let p;if(!a&&!c)p={from:e,to:n>0?void 0:e};else if(a&&!c)u(a,e)?n===0?p={from:a,to:e}:i?p={from:a,to:void 0}:p=void 0:m(e,a)?p={from:e,to:a}:p={from:a,to:e};else if(a&&c)if(u(a,e)&&u(c,e))i?p={from:a,to:c}:p=void 0;else if(u(a,e))p={from:a,to:n>0?void 0:e};else if(u(c,e))p={from:e,to:n>0?void 0:e};else if(m(e,a))p={from:e,to:c};else if(h(e,a))p={from:a,to:e};else if(h(e,c))p={from:a,to:e};else throw new Error("Invalid range");if(p?.from&&p?.to){const y=s.differenceInCalendarDays(p.to,p.from);r>0&&y>r?p={from:e,to:void 0}:n>1&&y<n&&(p={from:e,to:void 0})}return p}function Xpe(e,t,n=Lo){const r=Array.isArray(t)?t:[t];let i=e.from;const s=n.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let c=0;c<=a;c++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}function l6(e,t,n=Lo){return cs(e,t.from,!1,n)||cs(e,t.to,!1,n)||cs(t,e.from,!1,n)||cs(t,e.to,!1,n)}function Zpe(e,t,n=Lo){const r=Array.isArray(t)?t:[t];if(r.filter(c=>typeof c!="function").some(c=>typeof c=="boolean"?c:n.isDate(c)?cs(e,c,!1,n):PO(c,n)?c.some(u=>cs(e,u,!1,n)):rg(c)?c.from&&c.to?l6(e,{from:c.from,to:c.to},n):!1:IO(c)?Xpe(e,c.dayOfWeek,n):Mw(c)?n.isAfter(c.before,c.after)?l6(e,{from:n.addDays(c.after,1),to:n.addDays(c.before,-1)},n):us(e.from,c,n)||us(e.to,c,n):Dw(c)||_w(c)?us(e.from,c,n)||us(e.to,c,n):!1))return!0;const a=r.filter(c=>typeof c=="function");if(a.length){let c=e.from;const u=n.differenceInCalendarDays(e.to,e.from);for(let h=0;h<=u;h++){if(a.some(m=>m(c)))return!0;c=n.addDays(c,1)}}return!1}function Jpe(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:i,selected:s,required:a,onSelect:c}=e,[u,h]=ig(s,c?s:void 0),m=c?s:u;return{selected:m,select:(x,b,w)=>{const{min:E,max:k}=e;let T;if(x){const N=m?.from,O=m?.to,j=!!N&&!!O,A=!!N&&!!O&&t.isSameDay(N,O)&&t.isSameDay(x,N);i&&(j||!m?.from)?!a&&A?T=void 0:T={from:x,to:void 0}:T=Qpe(x,m,E,k,a,t)}return r&&n&&T?.from&&T.to&&Zpe({from:T.from,to:T.to},n,t)&&(T.from=x,T.to=void 0),c||h(T),c?.(T,x,b,w),T},isSelected:x=>m&&cs(m,x,!1,t)}}function eme(e,t){const{selected:n,required:r,onSelect:i}=e,[s,a]=ig(n,i?n:void 0),c=i?n:s,{isSameDay:u}=t;return{selected:c,select:(p,y,x)=>{let b=p;return!r&&c&&c&&u(p,c)&&(b=void 0),i||a(b),i?.(b,p,y,x),b},isSelected:p=>c?u(c,p):!1}}function tme(e,t){const n=eme(e,t),r=Kpe(e,t),i=Jpe(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return i;default:return}}function Bi(e,t){return e instanceof Ar&&e.timeZone===t?e:new Ar(e,t)}function xc(e,t,n){return Bi(e,t)}function c6(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?xc(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?xc(r,t):r):rg(e)?{...e,from:e.from?Bi(e.from,t):e.from,to:e.to?Bi(e.to,t):e.to}:Mw(e)?{before:xc(e.before,t),after:xc(e.after,t)}:Dw(e)?{after:xc(e.after,t)}:_w(e)?{before:xc(e.before,t)}:e}function Ay(e,t,n){return e&&(Array.isArray(e)?e.map(r=>c6(r,t)):c6(e,t))}function nme(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Bi(t.today,n)),t.month&&(t.month=Bi(t.month,n)),t.defaultMonth&&(t.defaultMonth=Bi(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Bi(t.startMonth,n)),t.endMonth&&(t.endMonth=Bi(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=Bi(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map($e=>Bi($e,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?Bi(t.selected.from,n):t.selected.from,to:t.selected.to?Bi(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Ay(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Ay(t.hidden,n)),t.modifiers)){const $e={};Object.keys(t.modifiers).forEach(ge=>{$e[ge]=Ay(t.modifiers?.[ge],n)}),t.modifiers=$e}const{components:r,formatters:i,labels:s,dateLib:a,locale:c,classNames:u}=S.useMemo(()=>{const $e={...DO,...t.locale},ge=t.broadcastCalendar?1:t.weekStartsOn,Oe=t.noonSafe&&t.timeZone?Mpe(t.timeZone,{weekStartsOn:ge,locale:$e}):void 0,Ye=t.dateLib&&Oe?{...Oe,...t.dateLib}:t.dateLib??Oe,Rt=new Ti({locale:$e,weekStartsOn:ge,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Ye);return{dateLib:Rt,components:fpe(t.components),formatters:Spe(t.formatters),labels:Npe(t.labels,Rt.options),locale:$e,classNames:{...Lw(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:h,mode:m,navLayout:p,numberOfMonths:y=1,onDayBlur:x,onDayClick:b,onDayFocus:w,onDayKeyDown:E,onDayMouseEnter:k,onDayMouseLeave:T,onNextClick:N,onPrevClick:O,showWeekNumber:j,styles:A}=t,{formatCaption:R,formatDay:_,formatMonthDropdown:F,formatWeekNumber:I,formatWeekNumberHeader:H,formatWeekdayName:q,formatYearDropdown:V}=i,$=$pe(t,a),{days:U,months:P,navStart:Y,navEnd:G,previousMonth:X,nextMonth:L,goToMonth:B}=$,W=upe(U,t,Y,G,a),{isSelected:D,select:Q,selected:ee}=tme(t,a)??{},{blur:J,focused:he,isFocusTarget:de,moveFocus:Se,setFocused:Re}=Gpe(t,$,W,D??(()=>!1),a),{labelDayButton:je,labelGridcell:Fe,labelGrid:_e,labelMonthDropdown:De,labelNav:xe,labelPrevious:Ge,labelNext:we,labelWeekday:Ae,labelWeekNumber:pe,labelWeekNumberHeader:be,labelYearDropdown:ne}=s,ye=S.useMemo(()=>jpe(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),Ce=m!==void 0||b!==void 0,Ve=S.useCallback(()=>{X&&(B(X),O?.(X))},[X,B,O]),ct=S.useCallback(()=>{L&&(B(L),N?.(L))},[B,L,N]),oe=S.useCallback(($e,ge)=>Oe=>{Oe.preventDefault(),Oe.stopPropagation(),Re($e),!ge.disabled&&(Q?.($e.date,ge,Oe),b?.($e.date,ge,Oe))},[Q,b,Re]),Ee=S.useCallback(($e,ge)=>Oe=>{Re($e),w?.($e.date,ge,Oe)},[w,Re]),Le=S.useCallback(($e,ge)=>Oe=>{J(),x?.($e.date,ge,Oe)},[J,x]),Me=S.useCallback(($e,ge)=>Oe=>{const Ye={ArrowLeft:[Oe.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[Oe.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[Oe.shiftKey?"year":"week","after"],ArrowUp:[Oe.shiftKey?"year":"week","before"],PageUp:[Oe.shiftKey?"year":"month","before"],PageDown:[Oe.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Ye[Oe.key]){Oe.preventDefault(),Oe.stopPropagation();const[Rt,Ie]=Ye[Oe.key];Se(Rt,Ie)}E?.($e.date,ge,Oe)},[Se,E,t.dir]),Ue=S.useCallback(($e,ge)=>Oe=>{k?.($e.date,ge,Oe)},[k]),dt=S.useCallback(($e,ge)=>Oe=>{T?.($e.date,ge,Oe)},[T]),xt=S.useCallback($e=>ge=>{const Oe=Number(ge.target.value),Ye=a.setMonth(a.startOfMonth($e),Oe);B(Ye)},[a,B]),Je=S.useCallback($e=>ge=>{const Oe=Number(ge.target.value),Ye=a.setYear(a.startOfMonth($e),Oe);B(Ye)},[a,B]),{className:Ke,style:bt}=S.useMemo(()=>({className:[u[ht.Root],t.className].filter(Boolean).join(" "),style:{...A?.[ht.Root],...t.style}}),[u,t.className,t.style,A]),nt=hpe(t),Qe=S.useRef(null);Ipe(Qe,!!t.animate,{classNames:u,months:P,focused:he,dateLib:a});const Ct={dayPickerProps:t,selected:ee,select:Q,isSelected:D,months:P,nextMonth:L,previousMonth:X,goToMonth:B,getModifiers:W,components:r,classNames:u,styles:A,labels:s,formatters:i};return le.createElement(LO.Provider,{value:Ct},le.createElement(r.Root,{rootRef:t.animate?Qe:void 0,className:Ke,style:bt,dir:t.dir,id:t.id,lang:t.lang??c.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...nt},le.createElement(r.Months,{className:u[ht.Months],style:A?.[ht.Months]},!t.hideNavigation&&!p&&le.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[ht.Nav],style:A?.[ht.Nav],"aria-label":xe(),onPreviousClick:Ve,onNextClick:ct,previousMonth:X,nextMonth:L}),P.map(($e,ge)=>le.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:u[ht.Month],style:A?.[ht.Month],key:ge,displayIndex:ge,calendarMonth:$e},p==="around"&&!t.hideNavigation&&ge===0&&le.createElement(r.PreviousMonthButton,{type:"button",className:u[ht.PreviousMonthButton],tabIndex:X?void 0:-1,"aria-disabled":X?void 0:!0,"aria-label":Ge(X),onClick:Ve,"data-animated-button":t.animate?"true":void 0},le.createElement(r.Chevron,{disabled:X?void 0:!0,className:u[ht.Chevron],orientation:t.dir==="rtl"?"right":"left"})),le.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:u[ht.MonthCaption],style:A?.[ht.MonthCaption],calendarMonth:$e,displayIndex:ge},h?.startsWith("dropdown")?le.createElement(r.DropdownNav,{className:u[ht.Dropdowns],style:A?.[ht.Dropdowns]},(()=>{const Oe=h==="dropdown"||h==="dropdown-months"?le.createElement(r.MonthsDropdown,{key:"month",className:u[ht.MonthsDropdown],"aria-label":De(),classNames:u,components:r,disabled:!!t.disableNavigation,onChange:xt($e.date),options:Rpe($e.date,Y,G,i,a),style:A?.[ht.Dropdown],value:a.getMonth($e.date)}):le.createElement("span",{key:"month"},F($e.date,a)),Ye=h==="dropdown"||h==="dropdown-years"?le.createElement(r.YearsDropdown,{key:"year",className:u[ht.YearsDropdown],"aria-label":ne(a.options),classNames:u,components:r,disabled:!!t.disableNavigation,onChange:Je($e.date),options:Ope(Y,G,i,a,!!t.reverseYears),style:A?.[ht.Dropdown],value:a.getYear($e.date)}):le.createElement("span",{key:"year"},V($e.date,a));return a.getMonthYearOrder()==="year-first"?[Ye,Oe]:[Oe,Ye]})(),le.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},R($e.date,a.options,a))):le.createElement(r.CaptionLabel,{className:u[ht.CaptionLabel],role:"status","aria-live":"polite"},R($e.date,a.options,a))),p==="around"&&!t.hideNavigation&&ge===y-1&&le.createElement(r.NextMonthButton,{type:"button",className:u[ht.NextMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":we(L),onClick:ct,"data-animated-button":t.animate?"true":void 0},le.createElement(r.Chevron,{disabled:L?void 0:!0,className:u[ht.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ge===y-1&&p==="after"&&!t.hideNavigation&&le.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[ht.Nav],style:A?.[ht.Nav],"aria-label":xe(),onPreviousClick:Ve,onNextClick:ct,previousMonth:X,nextMonth:L}),le.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":m==="multiple"||m==="range","aria-label":_e($e.date,a.options,a)||void 0,className:u[ht.MonthGrid],style:A?.[ht.MonthGrid]},!t.hideWeekdays&&le.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:u[ht.Weekdays],style:A?.[ht.Weekdays]},j&&le.createElement(r.WeekNumberHeader,{"aria-label":be(a.options),className:u[ht.WeekNumberHeader],style:A?.[ht.WeekNumberHeader],scope:"col"},H()),ye.map(Oe=>le.createElement(r.Weekday,{"aria-label":Ae(Oe,a.options,a),className:u[ht.Weekday],key:String(Oe),style:A?.[ht.Weekday],scope:"col"},q(Oe,a.options,a)))),le.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:u[ht.Weeks],style:A?.[ht.Weeks]},$e.weeks.map(Oe=>le.createElement(r.Week,{className:u[ht.Week],key:Oe.weekNumber,style:A?.[ht.Week],week:Oe},j&&le.createElement(r.WeekNumber,{week:Oe,style:A?.[ht.WeekNumber],"aria-label":pe(Oe.weekNumber,{locale:c}),className:u[ht.WeekNumber],scope:"row",role:"rowheader"},I(Oe.weekNumber,a)),Oe.days.map(Ye=>{const{date:Rt}=Ye,Ie=W(Ye);if(Ie[_n.focused]=!Ie.hidden&&!!he?.isEqualTo(Ye),Ie[lo.selected]=D?.(Rt)||Ie.selected,rg(ee)){const{from:vn,to:Ut}=ee;Ie[lo.range_start]=!!(vn&&Ut&&a.isSameDay(Rt,vn)),Ie[lo.range_end]=!!(vn&&Ut&&a.isSameDay(Rt,Ut)),Ie[lo.range_middle]=cs(ee,Rt,!0,a)}const Pt=Ape(Ie,A,t.modifiersStyles),sn=dpe(Ie,u,t.modifiersClassNames),nn=!Ce&&!Ie.hidden?Fe(Rt,Ie,a.options,a):void 0;return le.createElement(r.Day,{key:`${Ye.isoDate}_${Ye.displayMonthId}`,day:Ye,modifiers:Ie,className:sn.join(" "),style:Pt,role:"gridcell","aria-selected":Ie.selected||void 0,"aria-label":nn,"data-day":Ye.isoDate,"data-month":Ye.outside?Ye.dateMonthId:void 0,"data-selected":Ie.selected||void 0,"data-disabled":Ie.disabled||void 0,"data-hidden":Ie.hidden||void 0,"data-outside":Ye.outside||void 0,"data-focused":Ie.focused||void 0,"data-today":Ie.today||void 0},!Ie.hidden&&Ce?le.createElement(r.DayButton,{className:u[ht.DayButton],style:A?.[ht.DayButton],type:"button",day:Ye,modifiers:Ie,disabled:!Ie.focused&&Ie.disabled||void 0,"aria-disabled":Ie.focused&&Ie.disabled||void 0,tabIndex:de(Ye)?0:-1,"aria-label":je(Rt,Ie,a.options,a),onClick:oe(Ye,Ie),onBlur:Le(Ye,Ie),onFocus:Ee(Ye,Ie),onKeyDown:Me(Ye,Ie),onMouseEnter:Ue(Ye,Ie),onMouseLeave:dt(Ye,Ie)},_(Rt,a.options,a)):!Ie.hidden&&_(Ye.date,a.options,a))})))))))),t.footer&&le.createElement(r.Footer,{className:u[ht.Footer],style:A?.[ht.Footer],role:"status","aria-live":"polite"},t.footer)))}function rme({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:i="ghost",formatters:s,components:a,...c}){const u=Lw();return f.jsx(nme,{showOutsideDays:n,className:se("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:h=>h.toLocaleString("default",{month:"short"}),...s},classNames:{root:se("w-fit",u.root),months:se("relative flex flex-col gap-4 md:flex-row",u.months),month:se("flex w-full flex-col gap-4",u.month),nav:se("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",u.nav),button_previous:se(mx({variant:i}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",u.button_previous),button_next:se(mx({variant:i}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",u.button_next),month_caption:se("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",u.month_caption),dropdowns:se("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",u.dropdowns),dropdown_root:se("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",u.dropdown_root),dropdown:se("bg-popover absolute inset-0 opacity-0",u.dropdown),caption_label:se("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",u.caption_label),table:"w-full border-collapse",weekdays:se("flex",u.weekdays),weekday:se("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",u.weekday),week:se("mt-2 flex w-full",u.week),week_number_header:se("w-[--cell-size] select-none",u.week_number_header),week_number:se("text-muted-foreground select-none text-[0.8rem]",u.week_number),day:se("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",u.day),range_start:se("bg-accent rounded-l-md",u.range_start),range_middle:se("rounded-none",u.range_middle),range_end:se("bg-accent rounded-r-md",u.range_end),today:se("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",u.today),outside:se("text-muted-foreground aria-selected:text-muted-foreground",u.outside),disabled:se("text-muted-foreground opacity-50",u.disabled),hidden:se("invisible",u.hidden),...t},components:{Root:({className:h,rootRef:m,...p})=>f.jsx("div",{"data-slot":"calendar",ref:m,className:se(h),...p}),Chevron:({className:h,orientation:m,...p})=>m==="left"?f.jsx(x6,{className:se("size-4",h),...p}):m==="right"?f.jsx(i0,{className:se("size-4",h),...p}):f.jsx(r0,{className:se("size-4",h),...p}),DayButton:ime,WeekNumber:({children:h,...m})=>f.jsx("td",{...m,children:f.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:h})}),...a},...c})}function ime({className:e,day:t,modifiers:n,...r}){const i=Lw(),s=S.useRef(null);return S.useEffect(()=>{n.focused&&s.current?.focus()},[n.focused]),f.jsx(ze,{ref:s,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:se("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md [&>span]:text-xs [&>span]:opacity-70",i.day,e),...r})}function ome({createdAfter:e,createdBefore:t,onChange:n}){const r=u6(e,t),[i,s]=S.useState(r);S.useEffect(()=>{s(u6(e,t))},[e,t]);const a=i?.from!==void 0&&i?.from!==null,c=e!==void 0||t!==void 0,u=a&&(Wp(i.from)!==e||Wp(i.to??i.from)!==t),h=()=>{if(!i?.from)return;const p=Xc(i.from).getTime(),y=U9(i.to??i.from).getTime();n({createdAfter:p,createdBefore:y})},m=()=>{s(void 0),n({})};return f.jsxs("div",{onKeyDown:p=>p.stopPropagation(),children:[f.jsx(rme,{className:"min-w-md bg-transparent p-2",mode:"range",numberOfMonths:2,onSelect:s,selected:i}),f.jsxs("div",{className:"border-border flex items-center justify-between border-t px-3 py-2",children:[c?f.jsx("span",{className:"text-foreground text-xs",children:Zx({createdAfter:e,createdBefore:t})}):a?f.jsx("span",{className:"text-muted-foreground text-xs",children:Zx({createdAfter:Wp(i.from),createdBefore:Wp(i.to??i.from)})}):f.jsx("span",{}),f.jsxs("div",{className:"flex items-center gap-2",children:[c&&f.jsx("button",{className:"text-muted-foreground hover:text-foreground text-xs transition",onClick:m,type:"button",children:"Clear"}),a&&u&&f.jsx("button",{className:"bg-primary text-foreground rounded px-2.5 py-1 text-xs font-medium",onClick:h,type:"button",children:"Apply"})]})]})]})}function u6(e,t){if(e!==void 0)return{from:new Date(e),...t===void 0?{}:{to:new Date(t)}}}function Wp(e){return e?e.getTime():void 0}const sme=[{label:"Curate",value:"curate"},{label:"Query",value:"query"}];function ame({availableModels:e,availableProviders:t,createdAfter:n,createdBefore:r,durationPreset:i,modelFilter:s,onDurationChange:a,onModelChange:c,onProviderChange:u,onTimeRangeChange:h,onTypeChange:m,providerFilter:p,providers:y,typeFilter:x}){const b=S.useMemo(()=>new Map(y.map(T=>[T.id,T.name])),[y]),w=S.useMemo(()=>lme(e,p),[e,p]),E=n!==void 0||r!==void 0,k=x.length>0||p.length>0||s.length>0||E||i!=="all";return f.jsxs(ja,{children:[f.jsxs(Oa,{className:"text-muted-foreground hover:text-foreground hover:bg-muted/60 border-border bg-background relative inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-3 text-sm transition-colors",children:[f.jsx(tY,{className:"pointer-events-none size-3.5"}),f.jsx("span",{className:"pointer-events-none",children:"Filter"}),k&&f.jsx("span",{className:"bg-primary pointer-events-none absolute -top-1 -right-1 size-2 rounded-full"})]}),f.jsxs(ks,{align:"start",className:"w-48",children:[f.jsxs(ra,{children:[f.jsx(ia,{className:"cursor-pointer",children:f.jsxs("span",{children:["Type",x.length>0&&f.jsxs("span",{className:"ml-1",children:["(",x.length,")"]})]})}),f.jsx(oa,{className:"w-48",sideOffset:8,children:sme.map(T=>f.jsx(Y2,{checked:x.includes(T.value),className:"cursor-pointer",onCheckedChange:()=>jy(x,T.value,m),children:T.label},T.value))})]}),f.jsxs(ra,{children:[f.jsx(ia,{className:"cursor-pointer",children:f.jsxs("span",{children:["Provider",p.length>0&&f.jsxs("span",{className:"ml-1",children:["(",p.length,")"]})]})}),f.jsx(oa,{className:"w-56",sideOffset:8,children:t.length===0?f.jsx("div",{className:"text-muted-foreground px-2 py-1.5 text-xs",children:"No providers yet"}):t.map(T=>f.jsx(Y2,{checked:p.includes(T),className:"cursor-pointer",onCheckedChange:()=>jy(p,T,u),children:b.get(T)??T},T))})]}),f.jsxs(ra,{children:[f.jsx(ia,{className:"cursor-pointer",children:f.jsxs("span",{children:["Model",s.length>0&&f.jsxs("span",{className:"ml-1",children:["(",s.length,")"]})]})}),f.jsx(oa,{className:"w-56",sideOffset:8,children:w.length===0?f.jsx("div",{className:"text-muted-foreground px-2 py-1.5 text-xs",children:"No models yet"}):w.map(T=>f.jsx(Y2,{checked:s.includes(T),className:"cursor-pointer",onCheckedChange:()=>jy(s,T,c),children:T},T))})]}),f.jsxs(ra,{children:[f.jsx(ia,{className:"cursor-pointer",children:f.jsxs("span",{children:["Time",E&&f.jsx("span",{className:"text-primary ml-1",children:"·"})]})}),f.jsx(oa,{className:"w-fit",sideOffset:8,children:f.jsx(ome,{createdAfter:n,createdBefore:r,onChange:h})})]}),f.jsxs(ra,{children:[f.jsx(ia,{className:"cursor-pointer",children:f.jsxs("span",{children:["Duration",i!=="all"&&f.jsx("span",{className:"text-primary ml-1",children:"·"})]})}),f.jsx(oa,{className:"w-48",sideOffset:8,children:f.jsx(PG,{onValueChange:T=>bO(T)&&a(T),value:i,children:xO.map(T=>f.jsx(zG,{className:"cursor-pointer",value:T.value,children:T.label},T.value))})})]})]})]})}function jy(e,t,n){n(e.includes(t)?e.filter(r=>r!==t):[...e,t])}function lme(e,t){const n=t.length===0?e:e.filter(s=>t.includes(s.providerId)),r=new Set,i=[];for(const s of n)r.has(s.modelId)||(r.add(s.modelId),i.push(s.modelId));return i}const zw={all:"All",cancelled:"Cancelled",completed:"Done",failed:"Failed",running:"Running"},cme={cancelled:"bg-zinc-500",completed:"bg-emerald-500",failed:"bg-red-400",running:"bg-blue-400"};function ume({availableModels:e,availableProviders:t,breakdown:n,createdAfter:r,createdBefore:i,durationPreset:s,modelFilter:a,onDurationChange:c,onModelChange:u,onNewTask:h,onProviderChange:m,onSearchChange:p,onStatusChange:y,onTimeRangeChange:x,onTypeChange:b,providerFilter:w,providers:E,searchQuery:k,statusFilter:T,tourCue:N,typeFilter:O}){return f.jsxs("div",{className:"flex min-h-9 flex-wrap items-center gap-2",children:[Jq.map(j=>{const A=n[j],R=T===j;return f.jsxs("button",{className:se("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition",R?"bg-muted text-foreground font-medium":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),onClick:()=>y(j),type:"button",children:[j!=="all"&&f.jsx("span",{className:se("inline-block size-1.5 rounded-full",cme[j])}),f.jsx("span",{children:zw[j]}),f.jsx("span",{className:"text-muted-foreground tabular-nums",children:A})]},j)}),f.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[f.jsx(ame,{availableModels:e,availableProviders:t,createdAfter:r,createdBefore:i,durationPreset:s,modelFilter:a,onDurationChange:c,onModelChange:u,onProviderChange:m,onTimeRangeChange:x,onTypeChange:b,providerFilter:w,providers:E,typeFilter:O}),f.jsxs("div",{className:"relative",children:[f.jsx(lu,{className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2"}),f.jsx(Ki,{className:"dark:bg-background h-8 min-w-56 pl-8 text-xs border border-border",onChange:j=>p(j.target.value),placeholder:"Search input or id…",type:"text",value:k})]}),f.jsx(Lv,{active:!!N,align:"end",label:N??"",children:f.jsxs(ze,{className:"h-8",onClick:h,size:"sm",variant:"default",children:[f.jsx(Aa,{className:"size-4"}),"New task"]})})]})]})}const dme={curate:"Curate",query:"Query"};function fme({createdAfter:e,createdBefore:t,durationPreset:n,modelFilter:r,onClearAll:i,onDurationChange:s,onModelChange:a,onProviderChange:c,onSearchChange:u,onStatusChange:h,onTimeRangeChange:m,onTypeChange:p,providerFilter:y,providers:x,searchQuery:b,statusFilter:w,typeFilter:E}){const k=S.useMemo(()=>new Map(x.map(N=>[N.id,N.name])),[x]),T=S.useMemo(()=>{const N=[];w!=="all"&&N.push({key:`status:${w}`,label:`Status: ${zw[w]}`,onRemove:()=>h("all")});for(const O of E)N.push({key:`type:${O}`,label:`Type: ${dme[O]??O}`,onRemove:()=>p(E.filter(j=>j!==O))});for(const O of y)N.push({key:`provider:${O}`,label:`Provider: ${k.get(O)??O}`,onRemove:()=>c(y.filter(j=>j!==O))});for(const O of r)N.push({key:`model:${O}`,label:`Model: ${O}`,onRemove:()=>a(r.filter(j=>j!==O))});return(e!==void 0||t!==void 0)&&N.push({key:"time",label:`Time: ${Zx({createdAfter:e,createdBefore:t})}`,onRemove:()=>m({})}),n!=="all"&&N.push({key:`duration:${n}`,label:`Duration: ${Gde(n)}`,onRemove:()=>s("all")}),b.trim()&&N.push({key:"search",label:`“${b.trim()}”`,onRemove:()=>u("")}),N},[w,E,y,r,e,t,n,b,k,h,p,c,a,m,s,u]);return T.length===0?null:f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 px-1",children:[T.map(N=>f.jsx(Mx,{closable:!0,onClose:N.onRemove,variant:"secondary",children:N.label},N.key)),f.jsxs("button",{className:"text-muted-foreground hover:text-foreground inline-flex cursor-pointer items-center gap-1 px-1.5 py-0.5 text-xs transition",onClick:i,type:"button",children:[f.jsx(Rv,{className:"size-3"}),"Clear filters"]})]})}function hme({canDelete:e,count:t,onClear:n,onDelete:r}){return f.jsxs("div",{className:"border-border bg-muted/40 flex min-h-9 items-center gap-3 rounded-md border px-3 text-xs",children:[f.jsxs("span",{className:"text-foreground",children:[f.jsx("span",{className:"text-foreground mono tabular-nums font-medium",children:t})," selected"]}),f.jsx("span",{className:"bg-border h-4 w-px"}),f.jsx(ze,{disabled:!e,onClick:r,size:"xs",variant:"ghost",children:"Delete"}),f.jsx(ze,{className:"ml-auto",onClick:n,size:"xs",variant:"ghost",children:"Clear selection"})]})}function d6({children:e,withDots:t}){return f.jsx(ca,{className:se("ring-border/80 flex min-h-0 flex-1 items-center justify-center p-0",t&&"dot-grid"),size:"sm",children:e})}function pme(){return f.jsx("div",{className:"text-muted-foreground flex h-32 items-center justify-center text-sm",children:"Loading tasks…"})}function mme({hasActiveFilters:e,onClearFilters:t,onNewTask:n,tourCue:r}){return e?f.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4 p-8 text-center",children:[f.jsx(Ok,{className:"text-muted-foreground/70 size-8"}),f.jsxs("div",{children:[f.jsx("h2",{className:"text-foreground text-base font-medium",children:"No matching tasks"}),f.jsx("p",{className:"text-muted-foreground mx-auto mt-1 max-w-sm text-sm leading-relaxed",children:"No tasks match the current filters. Try adjusting or clearing them."})]}),t&&f.jsx(ze,{className:"cursor-pointer",onClick:t,size:"sm",variant:"outline",children:"Clear filters"})]}):f.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4 p-8 text-center",children:[f.jsx(Ok,{className:"text-muted-foreground/70 size-8"}),f.jsxs("div",{children:[f.jsx("h2",{className:"text-foreground text-base font-medium",children:"No tasks yet"}),f.jsxs("p",{className:"text-muted-foreground mx-auto mt-1 max-w-sm text-sm leading-relaxed",children:["Capture knowledge with ",f.jsx("strong",{children:"Curate"})," or ask a question with ",f.jsx("strong",{children:"Query"}),"."]})]}),f.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[f.jsx(Lv,{active:!!r,label:r??"",side:"top",children:f.jsxs(ze,{onClick:n,size:"sm",variant:"default",children:[f.jsx(Aa,{className:"size-4"}),"New task"]})}),f.jsx("span",{className:"text-muted-foreground/60 ml-2 text-sm",children:"or run from the CLI"})]})]})}function gme({onClearSearch:e,query:t,status:n}){return f.jsxs("div",{className:"text-muted-foreground flex h-32 flex-col items-center justify-center gap-2 p-4 text-sm",children:[f.jsxs("span",{children:["No ",n==="all"?"":`${zw[n].toLowerCase()} `,"tasks",t?` match "${t}"`:"","."]}),t&&f.jsx(ze,{onClick:e,size:"xs",variant:"link",children:"Clear search"})]})}function yme({className:e,...t}){return f.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:se("mx-auto flex w-full justify-center",e),...t})}function xme({className:e,...t}){return f.jsx("ul",{"data-slot":"pagination-content",className:se("flex items-center gap-1",e),...t})}function bc({...e}){return f.jsx("li",{"data-slot":"pagination-item",...e})}function og({className:e,isActive:t,size:n="icon",...r}){return f.jsx(ze,{variant:t?"outline":"ghost",size:n,className:se(e),nativeButton:!1,render:f.jsx("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,...r})})}function bme({className:e,...t}){return f.jsx(og,{"aria-label":"Go to first page",size:"icon",className:se(e),...t,children:f.jsx(p_,{})})}function vme({className:e,...t}){return f.jsx(og,{"aria-label":"Go to previous page",size:"icon",className:se(e),...t,children:f.jsx(x6,{})})}function wme({className:e,...t}){return f.jsx(og,{"aria-label":"Go to next page",size:"icon",className:se(e),...t,children:f.jsx(i0,{})})}function Sme({className:e,...t}){return f.jsx(og,{"aria-label":"Go to last page",size:"icon",className:se(e),...t,children:f.jsx(g_,{})})}const QO=S.createContext(null),XO=S.createContext(null);function Io(){const e=S.useContext(QO);if(e===null)throw new Error(Cn(60));return e}function ZO(){const e=S.useContext(XO);if(e===null)throw new Error(Cn(61));return e}const Cme=(e,t)=>Object.is(e,t);function Jc(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Eme(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:Jc(t,r,n))}function Wd(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:Jc(r,t,n))}function kme(e,t,n){return e.filter(r=>!Jc(t,r,n))}function eb(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function JO(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Tme(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(JO(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Nme(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return eb(e)}function Ec(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?eb(e.value):eb(e)}function e7(e,t,n){function r(){return Nme(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const i=t,s=JO(i)?i.flatMap(a=>a.items):i;if(e==null||typeof e!="object"){const a=s.find(c=>c.value===e);return a&&a.label!=null?a.label:r()}if("value"in e){const a=s.find(c=>c&&c.value===e.value);if(a&&a.label!=null)return a.label}}return r()}function Rme(e,t,n){return e.reduce((r,i,s)=>(s>0&&r.push(", "),r.push(f.jsx(S.Fragment,{children:e7(i,t,n)},s)),r),[])}const St={id:qe(e=>e.id),labelId:qe(e=>e.labelId),modal:qe(e=>e.modal),multiple:qe(e=>e.multiple),items:qe(e=>e.items),itemToStringLabel:qe(e=>e.itemToStringLabel),itemToStringValue:qe(e=>e.itemToStringValue),isItemEqualToValue:qe(e=>e.isItemEqualToValue),value:qe(e=>e.value),hasSelectedValue:qe(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Ec(t,r)!==""}),hasNullItemLabel:qe((e,t)=>t?Tme(e.items):!1),open:qe(e=>e.open),mounted:qe(e=>e.mounted),forceMount:qe(e=>e.forceMount),transitionStatus:qe(e=>e.transitionStatus),openMethod:qe(e=>e.openMethod),activeIndex:qe(e=>e.activeIndex),selectedIndex:qe(e=>e.selectedIndex),isActive:qe((e,t)=>e.activeIndex===t),isSelected:qe((e,t,n)=>{const r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(s=>Jc(n,s,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Jc(n,i,r)}),isSelectedByFocus:qe((e,t)=>e.selectedIndex===t),popupProps:qe(e=>e.popupProps),triggerProps:qe(e=>e.triggerProps),triggerElement:qe(e=>e.triggerElement),positionerElement:qe(e=>e.positionerElement),listElement:qe(e=>e.listElement),scrollUpArrowVisible:qe(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:qe(e=>e.scrollDownArrowVisible),hasScrollArrows:qe(e=>e.hasScrollArrows)};function Ame(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:s,defaultOpen:a=!1,onOpenChange:c,name:u,autoComplete:h,disabled:m=!1,readOnly:p=!1,required:y=!1,modal:x=!0,actionsRef:b,inputRef:w,onOpenChangeComplete:E,items:k,multiple:T=!1,itemToStringLabel:N,itemToStringValue:O,isItemEqualToValue:j=Cme,highlightItemOnHover:A=!0,children:R}=e,{clearErrors:_}=jv(),{setDirty:F,setTouched:I,setFocused:H,shouldValidateOnChange:q,validityData:V,setFilled:$,name:U,disabled:P,validation:Y,validationMode:G}=Lf(),X=Ov({id:t}),L=P||m,B=U??u,[W,D]=Wc({controlled:n,default:T?r??nf:r,name:"Select",state:"value"}),[Q,ee]=Wc({controlled:s,default:a,name:"Select",state:"open"}),J=S.useRef([]),he=S.useRef([]),de=S.useRef(null),Se=S.useRef(null),Re=S.useRef(0),je=S.useRef(null),Fe=S.useRef([]),_e=S.useRef(!1),De=S.useRef(!1),xe=S.useRef(null),Ge=S.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),we=S.useRef(!1),{mounted:Ae,setMounted:pe,transitionStatus:be}=Ea(Q),{openMethod:ne,triggerProps:ye}=Ev(Q),Ce=sr(()=>new rR({id:X,labelId:void 0,modal:x,multiple:T,itemToStringLabel:N,itemToStringValue:O,isItemEqualToValue:j,value:W,open:Q,mounted:Ae,transitionStatus:be,items:k,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ve=Et(Ce,St.activeIndex),ct=Et(Ce,St.selectedIndex),oe=Et(Ce,St.triggerElement),Ee=Et(Ce,St.positionerElement),Le=S.useMemo(()=>T&&Array.isArray(W)&&W.length===0?"":Ec(W,O),[T,W,O]),Me=S.useMemo(()=>T&&Array.isArray(W)?W.map(yt=>Ec(yt,O)):Ec(W,O),[T,W,O]),Ue=yr(Ce.state.triggerElement);Mv({id:X,commit:Y.commit,value:W,controlRef:Ue,name:B,getValue:()=>Me});const dt=S.useRef(W);We(()=>{W!==dt.current&&Ce.set("forceMount",!0)},[Ce,W]),We(()=>{$(T?Array.isArray(W)&&W.length>0:W!=null)},[T,W,$]),We(function(){if(Q)return;const zt=Fe.current;if(T){const te=Array.isArray(W)?W:[];if(te.length===0){Ce.set("selectedIndex",null);return}const ae=te[te.length-1],Te=Wd(zt,ae,j);Ce.set("selectedIndex",Te===-1?null:Te);return}const K=Wd(zt,W,j);Ce.set("selectedIndex",K===-1?null:K)},[T,Q,W,Fe,j,Ce]),Cv(W,()=>{_(B),F(W!==V.initialValue),q()?Y.commit(W):Y.commit(W,!0)});const xt=tt((yt,zt)=>{if(c?.(yt,zt),!zt.isCanceled&&(ee(yt),!yt&&(zt.reason===ml||zt.reason===y0)&&(I(!0),H(!1),G==="onBlur"&&Y.commit(W)),!yt&&Ce.state.activeIndex!==null)){const K=J.current[Ce.state.activeIndex];queueMicrotask(()=>{K?.setAttribute("tabindex","-1")})}}),Je=tt(()=>{pe(!1),Ce.set("activeIndex",null),E?.(!1)});Xi({enabled:!b,open:Q,ref:de,onComplete(){Q||Je()}}),S.useImperativeHandle(b,()=>({unmount:Je}),[Je]);const Ke=tt((yt,zt)=>{i?.(yt,zt),!zt.isCanceled&&D(yt)}),bt=tt(()=>{const yt=Ce.state.listElement||de.current;if(!yt)return;const zt=yt.scrollTop,K=yt.scrollTop+yt.clientHeight,te=zt>1,ae=K<yt.scrollHeight-1;Ce.state.scrollUpArrowVisible!==te&&Ce.set("scrollUpArrowVisible",te),Ce.state.scrollDownArrowVisible!==ae&&Ce.set("scrollDownArrowVisible",ae)}),nt=aR({open:Q,onOpenChange:xt,elements:{reference:oe,floating:Ee}}),Qe=Mb(nt,{enabled:!p&&!L,event:"mousedown"}),Ct=v0(nt,{bubbles:!1}),$e=dR(nt,{enabled:!p&&!L,listRef:J,activeIndex:Ve,selectedIndex:ct,disabledIndices:nf,onNavigate(yt){yt===null&&!Q||Ce.set("activeIndex",yt)},focusItemOnHover:!1}),ge=hR(nt,{enabled:!p&&!L&&(Q||!T),listRef:he,activeIndex:Ve,selectedIndex:ct,onMatch(yt){Q?Ce.set("activeIndex",yt):Ke(Fe.current[yt],kt("none"))},onTypingChange(yt){_e.current=yt}}),{getReferenceProps:Oe,getFloatingProps:Ye,getItemProps:Rt}=iu([Qe,Ct,$e,ge]),Ie=S.useMemo(()=>Oo(Oe(),ye,X?{id:X}:Bn),[Oe,ye,X]);d0(()=>{Ce.update({popupProps:Ye(),triggerProps:Ie})}),We(()=>{Ce.update({id:X,modal:x,multiple:T,value:W,open:Q,mounted:Ae,transitionStatus:be,popupProps:Ye(),triggerProps:Ie,items:k,itemToStringLabel:N,itemToStringValue:O,isItemEqualToValue:j,openMethod:ne})},[Ce,X,x,T,W,Q,Ae,be,Ye,Ie,k,N,O,j,ne]);const Pt=S.useMemo(()=>({store:Ce,name:B,required:y,disabled:L,readOnly:p,multiple:T,itemToStringLabel:N,itemToStringValue:O,highlightItemOnHover:A,setValue:Ke,setOpen:xt,listRef:J,popupRef:de,scrollHandlerRef:Se,handleScrollArrowVisibility:bt,scrollArrowsMountedCountRef:Re,getItemProps:Rt,events:nt.context.events,valueRef:je,valuesRef:Fe,labelsRef:he,typingRef:_e,selectionRef:Ge,selectedItemTextRef:xe,validation:Y,onOpenChangeComplete:E,keyboardActiveRef:De,alignItemWithTriggerActiveRef:we,initialValueRef:dt}),[Ce,B,y,L,p,T,N,O,A,Ke,xt,Rt,nt.context.events,Y,E,bt]),sn=ps(w,Y.inputRef),nn=T&&Array.isArray(W)&&W.length>0,vn=T?void 0:B,Ut=S.useMemo(()=>!T||!Array.isArray(W)||!B?null:W.map(yt=>{const zt=Ec(yt,O);return f.jsx("input",{type:"hidden",name:B,value:zt},zt)}),[T,W,B,O]);return f.jsx(QO.Provider,{value:Pt,children:f.jsxs(XO.Provider,{value:nt,children:[R,f.jsx("input",{...Y.getInputValidationProps({onFocus(){Ce.state.triggerElement?.focus({focusVisible:!0})},onChange(yt){if(yt.nativeEvent.defaultPrevented)return;const zt=yt.target.value,K=kt(El,yt.nativeEvent);function te(){if(T)return;const ae=Fe.current.find(Te=>Ec(Te,O).toLowerCase()===zt.toLowerCase());ae!=null&&(F(ae!==V.initialValue),Ke(ae,K),q()&&Y.commit(ae))}Ce.set("forceMount",!0),queueMicrotask(te)}}),id:X&&vn==null?`${X}-hidden-input`:void 0,name:vn,autoComplete:h,value:Le,disabled:L,required:y&&!nn,readOnly:p,ref:sn,style:B?DN:Tb,tabIndex:-1,"aria-hidden":!0}),Ut]})})}function jme(e,t){return e??t}const Gp=2,Ome=400,f6=200,Mme={...Jy,...O0,value:()=>null},Dme=S.forwardRef(function(t,n){const{render:r,className:i,id:s,disabled:a=!1,nativeButton:c=!0,...u}=t,{setTouched:h,setFocused:m,validationMode:p,state:y,disabled:x}=Lf(),{labelId:b}=M0(),{store:w,setOpen:E,selectionRef:k,validation:T,readOnly:N,required:O,alignItemWithTriggerActiveRef:j,disabled:A,keyboardActiveRef:R}=Io(),_=x||A||a,F=Et(w,St.open),I=Et(w,St.value),H=Et(w,St.triggerProps),q=Et(w,St.positionerElement),V=Et(w,St.listElement),$=Et(w,St.id),U=Et(w,St.labelId),P=Et(w,St.hasSelectedValue),Y=!P&&F,G=Et(w,St.hasNullItemLabel,Y),X=s??$,L=jme(b,U);Ov({id:X});const B=yr(q),W=S.useRef(null),{getButtonProps:D,buttonRef:Q}=Rl({disabled:_,native:c}),ee=tt(De=>{w.set("triggerElement",De)}),J=ps(n,W,Q,ee),he=Hn(),de=Hn(),Se=Hn(),Re=Hn();S.useEffect(()=>{if(F)return!(P||G)?Se.start(Ome,()=>{k.current.allowUnselectedMouseUp=!0,k.current.allowSelectedMouseUp=!0}):Re.start(f6,()=>{k.current.allowUnselectedMouseUp=!0,Se.start(f6,()=>{k.current.allowSelectedMouseUp=!0})}),()=>{Se.clear(),Re.clear()};k.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},de.clear()},[F,P,G,k,de,Se,Re]);const je=S.useMemo(()=>V?.id??ef(q)?.id,[V,q]),Fe=Oo(H,{id:X,role:"combobox","aria-expanded":F?"true":"false","aria-haspopup":"listbox","aria-controls":F?je:void 0,"aria-labelledby":L,"aria-readonly":N||void 0,"aria-required":O||void 0,tabIndex:_?-1:0,ref:J,onFocus(De){m(!0),F&&j.current&&E(!1,kt(El,De.nativeEvent)),he.start(0,()=>{w.set("forceMount",!0)})},onBlur(De){Nt(q,De.relatedTarget)||(h(!0),m(!1),p==="onBlur"&&T.commit(I))},onPointerMove(){R.current=!1},onKeyDown(){R.current=!0},onMouseDown(De){if(F)return;const xe=Zt(De.currentTarget);function Ge(we){if(!W.current)return;const Ae=we.target;if(Nt(W.current,Ae)||Nt(B.current,Ae)||Ae===W.current)return;const pe=x8(W.current);we.clientX>=pe.left-Gp&&we.clientX<=pe.right+Gp&&we.clientY>=pe.top-Gp&&we.clientY<=pe.bottom+Gp||E(!1,kt(RN,we))}de.start(0,()=>{xe.addEventListener("mouseup",Ge,{once:!0})})}},T.getValidationProps,u,D);Fe.role="combobox";const _e={...y,open:F,disabled:_,value:I,readOnly:N,placeholder:!P};return Ot("button",t,{ref:[n,W],state:_e,stateAttributesMapping:Mme,props:Fe})}),_me={value:()=>null},Lme=S.forwardRef(function(t,n){const{className:r,render:i,children:s,placeholder:a,...c}=t,{store:u,valueRef:h}=Io(),m=Et(u,St.value),p=Et(u,St.items),y=Et(u,St.itemToStringLabel),x=Et(u,St.hasSelectedValue),b=!x&&a!=null&&s==null,w=Et(u,St.hasNullItemLabel,b),E={value:m,placeholder:!x};let k=null;return typeof s=="function"?k=s(m):s!=null?k=s:!x&&a!=null&&!w?k=a:Array.isArray(m)?k=Rme(m,p,y):k=e7(m,p,y),Ot("span",t,{state:E,ref:[n,h],props:[{children:k},c],stateAttributesMapping:_me})}),Ime=S.forwardRef(function(t,n){const{className:r,render:i,...s}=t,{store:a}=Io(),u={open:Et(a,St.open)};return Ot("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},s],stateAttributesMapping:$b})}),Pme=S.createContext(void 0),zme=S.forwardRef(function(t,n){const{store:r}=Io(),i=Et(r,St.mounted),s=Et(r,St.forceMount);return i||s?f.jsx(Pme.Provider,{value:!0,children:f.jsx(Rb,{ref:n,...t})}):null}),t7=S.createContext(void 0);function Fw(){const e=S.useContext(t7);if(!e)throw new Error(Cn(59));return e}function n0(e,t){e&&Object.assign(e.style,t)}const n7={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Fme={position:"fixed"},Bme=S.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:s,render:a,side:c="bottom",align:u="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:p="clipping-ancestors",collisionPadding:y,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:w,alignItemWithTrigger:E=!0,collisionAvoidance:k=TN,...T}=t,{store:N,listRef:O,labelsRef:j,alignItemWithTriggerActiveRef:A,selectedItemTextRef:R,valuesRef:_,initialValueRef:F,popupRef:I,setValue:H}=Io(),q=ZO(),V=Et(N,St.open),$=Et(N,St.mounted),U=Et(N,St.modal),P=Et(N,St.value),Y=Et(N,St.openMethod),G=Et(N,St.positionerElement),X=Et(N,St.triggerElement),L=Et(N,St.isItemEqualToValue),B=Et(N,St.transitionStatus),W=S.useRef(null),D=S.useRef(null),[Q,ee]=S.useState(E),J=$&&Q&&Y!=="touch";!$&&Q!==E&&ee(E),We(()=>{$||(St.scrollUpArrowVisible(N.state)&&N.set("scrollUpArrowVisible",!1),St.scrollDownArrowVisible(N.state)&&N.set("scrollDownArrowVisible",!1))},[N,$]),S.useImperativeHandle(A,()=>J),Sv((J||U)&&V&&Y!=="touch",X);const he=Yb({anchor:r,floatingRootContext:q,positionMethod:i,mounted:$,side:c,sideOffset:h,align:u,alignOffset:m,arrowPadding:x,collisionBoundary:p,collisionPadding:y,sticky:b,disableAnchorTracking:w??J,collisionAvoidance:k,keepMounted:!0}),de=J?"none":he.side,Se=J?Fme:he.positionerStyles,Re=S.useMemo(()=>{const we={};return V||(we.pointerEvents="none"),{role:"presentation",hidden:!$,style:{...Se,...we}}},[V,$,Se]),je={open:V,side:de,align:he.align,anchorHidden:he.anchorHidden},Fe=tt(we=>{N.set("positionerElement",we)}),_e=Ot("div",t,{ref:[n,Fe],state:je,stateAttributesMapping:Ss,props:[Re,ou(B),T]}),De=S.useRef(0),xe=tt(we=>{if(we.size===0&&De.current===0||_.current.length===0)return;const Ae=De.current;if(De.current=we.size,we.size===Ae)return;const pe=kt(El);if(Ae!==0&&!N.state.multiple&&P!==null&&Wd(_.current,P,L)===-1){const ne=F.current,Ce=ne!=null&&Wd(_.current,ne,L)!==-1?ne:null;H(Ce,pe),Ce===null&&(N.set("selectedIndex",null),R.current=null)}if(Ae!==0&&N.state.multiple&&Array.isArray(P)){const be=ye=>Wd(_.current,ye,L)!==-1,ne=P.filter(ye=>be(ye));(ne.length!==P.length||ne.some(ye=>!Eme(P,ye,L)))&&(H(ne,pe),ne.length===0&&(N.set("selectedIndex",null),R.current=null))}if(V&&J){N.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const be={height:""};n0(G,be),n0(I.current,be)}}),Ge=S.useMemo(()=>({...he,side:de,alignItemWithTriggerActive:J,setControlledAlignItemWithTrigger:ee,scrollUpArrowRef:W,scrollDownArrowRef:D}),[he,de,J,ee]);return f.jsx(d8,{elementsRef:O,labelsRef:j,onMapChange:xe,children:f.jsxs(t7.Provider,{value:Ge,children:[$&&U&&f.jsx(vv,{inert:Wb(!V),cutout:X}),_e]})})});function r7(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const Kp="base-ui-disable-scrollbar",tb={className:Kp,getElement(e){return f.jsx("style",{nonce:e,href:Kp,precedence:"base-ui:low",children:`.${Kp}{scrollbar-width:none}.${Kp}::-webkit-scrollbar{display:none}`})}};function Oy(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Hme=S.createContext(void 0),Ume={disableStyleElements:!1};function qme(){return S.useContext(Hme)??Ume}const rs=1,Vme={...Ss,...ws},$me=S.forwardRef(function(t,n){const{render:r,className:i,finalFocus:s,...a}=t,{store:c,popupRef:u,onOpenChangeComplete:h,setOpen:m,valueRef:p,selectedItemTextRef:y,keyboardActiveRef:x,multiple:b,handleScrollArrowVisibility:w,scrollHandlerRef:E,highlightItemOnHover:k}=Io(),{side:T,align:N,alignItemWithTriggerActive:O,setControlledAlignItemWithTrigger:j,scrollDownArrowRef:A,scrollUpArrowRef:R}=Fw(),_=c8()!=null,F=ZO(),{nonce:I,disableStyleElements:H}=qme(),q=Hn(),V=Et(c,St.id),$=Et(c,St.open),U=Et(c,St.mounted),P=Et(c,St.popupProps),Y=Et(c,St.transitionStatus),G=Et(c,St.triggerElement),X=Et(c,St.positionerElement),L=Et(c,St.listElement),B=S.useRef(0),W=S.useRef(!1),D=S.useRef(0),Q=S.useRef(!1),ee=S.useRef({}),J=b0(),he=tt(je=>{if(!X||!u.current||!Q.current)return;if(W.current||!O){w();return}const Fe=X.style.top==="0px",_e=X.style.bottom==="0px",De=X.getBoundingClientRect().height,xe=Zt(X),Ge=getComputedStyle(X),we=parseFloat(Ge.marginTop),Ae=parseFloat(Ge.marginBottom),pe=h6(getComputedStyle(u.current)),be=Math.min(xe.documentElement.clientHeight-we-Ae,pe),ne=je.scrollTop,ye=Qp(je);let Ce=0,Ve=null,ct=!1,oe=!1;const Ee=Me=>{X.style.height=`${Me}px`},Le=(Me,Ue)=>{const dt=Oy(Me,0,be-De);dt>0&&Ee(De+dt),je.scrollTop=Ue,be-(De+dt)<=rs&&(W.current=!0),w()};if(Fe){const Me=ye-ne,Ue=De+Me,dt=Math.min(Ue,be);if(Ce=dt,Me<=rs){Le(Me,ye);return}be-dt>rs?oe=!0:ct=!0}else if(_e){const Me=ne,Ue=De+Me,dt=Math.min(Ue,be),xt=Ue-be;if(Ce=dt,Me<=rs){Le(Me,0);return}be-dt>rs?Ve=0:(ct=!0,ne<ye&&(Ve=ne-(Me-xt)))}if(Ce=Math.ceil(Ce),Ce!==0&&Ee(Ce),oe||Ve!=null){const Me=Qp(je),Ue=oe?Me:Oy(Ve,0,Me);Math.abs(je.scrollTop-Ue)>rs&&(je.scrollTop=Ue)}(ct||Ce>=be-rs)&&(W.current=!0),w()});S.useImperativeHandle(E,()=>he,[he]),Xi({open:$,ref:u,onComplete(){$&&h?.(!0)}});const de={open:$,transitionStatus:Y,side:T,align:N};We(()=>{!X||!u.current||Object.keys(ee.current).length||(ee.current={top:X.style.top||"0",left:X.style.left||"0",right:X.style.right,height:X.style.height,bottom:X.style.bottom,minHeight:X.style.minHeight,maxHeight:X.style.maxHeight,marginTop:X.style.marginTop,marginBottom:X.style.marginBottom})},[u,X]),We(()=>{$||O||(Q.current=!1,W.current=!1,B.current=0,D.current=0,n0(X,ee.current))},[$,O,X,u]),We(()=>{const je=u.current;if(!(!$||!G||!X||!je||c.state.transitionStatus==="ending")){if(!O){Q.current=!0,J.request(w),je.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const Fe=Wme(je);je.style.removeProperty("--transform-origin");try{const _e=getComputedStyle(X),De=getComputedStyle(je),xe=Zt(G),Ge=qn(X),we=Yme(G),Ae=Xp(G.getBoundingClientRect(),we),pe=Xp(X.getBoundingClientRect(),we),be=Ae.left,ne=Ae.height,ye=L||je,Ce=ye.scrollHeight,Ve=parseFloat(De.borderBottomWidth),ct=parseFloat(_e.marginTop)||10,oe=parseFloat(_e.marginBottom)||10,Ee=parseFloat(_e.minHeight)||100,Le=h6(De),Me=5,Ue=5,dt=20,xt=xe.documentElement.clientHeight-ct-oe,Je=xe.documentElement.clientWidth,Ke=xt-Ae.bottom+ne,bt=y.current,nt=p.current;let Qe,Ct=0,$e=0;if(bt&&nt){const zt=Xp(nt.getBoundingClientRect(),we);Qe=Xp(bt.getBoundingClientRect(),we);const K=zt.left-be,te=Qe.left-pe.left,ae=zt.top-Ae.top+zt.height/2,Te=Qe.top-pe.top+Qe.height/2;Ct=K-te,$e=Te-ae}const ge=Ke+$e+oe+Ve;let Oe=Math.min(xt,ge);const Ye=xt-ct-oe,Rt=ge-Oe,Ie=Math.max(Me,be+Ct),Pt=Je-Ue,sn=Math.max(0,Ie+pe.width-Pt);X.style.left=`${Ie-sn}px`,X.style.height=`${Oe}px`,X.style.maxHeight="auto",X.style.marginTop=`${ct}px`,X.style.marginBottom=`${oe}px`,je.style.height="100%";const nn=Qp(ye),vn=Rt>=nn-rs;vn&&(Oe=Math.min(xt,pe.height)-(Rt-nn));const Ut=Ae.top<dt||Ae.bottom>xt-dt||Math.ceil(Oe)+rs<Math.min(Ce,Ee),yt=(Ge.visualViewport?.scale??1)!==1&&xb;if(Ut||yt){Q.current=!0,n0(X,ee.current),Ci.flushSync(()=>j(!1));return}if(vn){const zt=Math.max(0,xt-ge);X.style.top=pe.height>=Ye?"0":`${zt}px`,X.style.height=`${Oe}px`,ye.scrollTop=Qp(ye),B.current=Math.max(Ee,Oe)}else X.style.bottom="0",B.current=Math.max(Ee,Oe),ye.scrollTop=Rt;if(Qe){const zt=pe.top,K=pe.height,te=Qe.top+Qe.height/2,ae=K>0?(te-zt)/K*100:50,Te=Oy(ae,0,100);je.style.setProperty("--transform-origin",`50% ${Te}%`)}(B.current===xt||Oe>=Le)&&(W.current=!0),w(),setTimeout(()=>{Q.current=!0})}finally{Fe()}})}},[c,$,X,G,p,y,u,w,O,j,J,A,R,L]),S.useEffect(()=>{if(!O||!X||!$)return;const je=qn(X);function Fe(_e){m(!1,kt(pz,_e))}return je.addEventListener("resize",Fe),()=>{je.removeEventListener("resize",Fe)}},[m,O,X,$]);const Se={...L?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${V}-list`},onKeyDown(je){x.current=!0,_&&xv.has(je.key)&&je.stopPropagation()},onMouseMove(){x.current=!1},onPointerLeave(je){if(!k||r7(je)||je.pointerType==="touch")return;const Fe=je.currentTarget;q.start(0,()=>{c.set("activeIndex",null),Fe.focus({preventScroll:!0})})},onScroll(je){L||he(je.currentTarget)},...O&&{style:L?{height:"100%"}:n7}},Re=Ot("div",t,{ref:[n,u],state:de,stateAttributesMapping:Vme,props:[P,Se,ou(Y),{className:!L&&O?tb.className:void 0},a]});return f.jsxs(S.Fragment,{children:[!H&&tb.getElement(I),f.jsx(Ob,{context:F,modal:!1,disabled:!U,returnFocus:s,restoreFocus:!0,children:Re})]})});function h6(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Qp(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function Yme(e){return QN.getScale(e)}function Xp(e,t){return tf({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}const p6=[["transform","none"],["scale","1"],["translate","0 0"]];function Wme(e){const{style:t}=e,n={};for(const[r,i]of p6)n[r]=t.getPropertyValue(r),t.setProperty(r,i,"important");return()=>{for(const[r]of p6){const i=n[r];i?t.setProperty(r,i):t.removeProperty(r)}}}const Gme=S.forwardRef(function(t,n){const{className:r,render:i,...s}=t,{store:a,scrollHandlerRef:c}=Io(),{alignItemWithTriggerActive:u}=Fw(),h=Et(a,St.hasScrollArrows),m=Et(a,St.openMethod),p=Et(a,St.multiple),x={id:`${Et(a,St.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(w){c.current?.(w.currentTarget)},...u&&{style:n7},className:h&&m!=="touch"?tb.className:void 0},b=tt(w=>{a.set("listElement",w)});return Ot("div",t,{ref:[n,b],props:[x,s]})}),i7=S.createContext(void 0);function Bw(){const e=S.useContext(i7);if(!e)throw new Error(Cn(57));return e}const Kme=S.memo(S.forwardRef(function(t,n){const{render:r,className:i,value:s=null,label:a,disabled:c=!1,nativeButton:u=!1,...h}=t,m=S.useRef(null),p=cu({label:a,textRef:m,indexGuessBehavior:a8.GuessFromOrder}),{store:y,getItemProps:x,setOpen:b,setValue:w,selectionRef:E,typingRef:k,valuesRef:T,keyboardActiveRef:N,multiple:O,highlightItemOnHover:j}=Io(),A=Hn(),R=Et(y,St.isActive,p.index),_=Et(y,St.isSelected,p.index,s),F=Et(y,St.isSelectedByFocus,p.index),I=Et(y,St.isItemEqualToValue),H=p.index,q=H!==-1,V=S.useRef(null),$=yr(H);We(()=>{if(!q)return;const J=T.current;return J[H]=s,()=>{delete J[H]}},[q,H,s,T]),We(()=>{if(!q)return;const J=y.state.value;let he=J;O&&Array.isArray(J)&&J.length>0&&(he=J[J.length-1]),he!==void 0&&Jc(s,he,I)&&y.set("selectedIndex",H)},[q,H,O,I,y,s]);const U={disabled:c,selected:_,highlighted:R},P=x({active:R,selected:_});P.onFocus=void 0,P.id=void 0;const Y=S.useRef(null),G=S.useRef("mouse"),X=S.useRef(!1),{getButtonProps:L,buttonRef:B}=Rl({disabled:c,focusableWhenDisabled:!0,native:u,composite:!0});function W(J){const he=y.state.value;if(O){const de=Array.isArray(he)?he:[],Se=_?kme(de,s,I):[...de,s];w(Se,kt(hl,J))}else w(s,kt(hl,J)),b(!1,kt(hl,J))}const D={role:"option","aria-selected":_,tabIndex:R?0:-1,onFocus(){y.set("activeIndex",H)},onMouseEnter(){!N.current&&y.state.selectedIndex===null&&j&&y.set("activeIndex",H)},onMouseMove(){j&&y.set("activeIndex",H)},onMouseLeave(J){!j||N.current||r7(J)||A.start(0,()=>{y.state.activeIndex===H&&y.set("activeIndex",null)})},onTouchStart(){E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(J){Y.current=J.key,y.set("activeIndex",H),J.key===" "&&k.current&&J.preventDefault()},onClick(J){X.current=!1,!(J.type==="keydown"&&Y.current===null)&&(c||J.type==="keydown"&&Y.current===" "&&k.current||G.current!=="touch"&&!R||(Y.current=null,W(J.nativeEvent)))},onPointerEnter(J){G.current=J.pointerType},onPointerDown(J){G.current=J.pointerType,X.current=!0},onMouseUp(){if(c)return;if(X.current){X.current=!1;return}const J=!E.current.allowSelectedMouseUp&&_,he=!E.current.allowUnselectedMouseUp&&!_;J||he||G.current!=="touch"&&!R||V.current?.click()}},Q=Ot("div",t,{ref:[B,n,p.ref,V],state:U,props:[P,D,h,L]}),ee=S.useMemo(()=>({selected:_,indexRef:$,textRef:m,selectedByFocus:F,hasRegistered:q}),[_,$,m,F,q]);return f.jsx(i7.Provider,{value:ee,children:Q})})),Qme=S.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:i}=Bw();return r||i?f.jsx(Xme,{...t,ref:n}):null}),Xme=S.memo(S.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:i,...s}=e,{selected:a}=Bw(),c=S.useRef(null),{transitionStatus:u,setMounted:h}=Ea(a),p=Ot("span",e,{ref:[t,c],state:{selected:a,transitionStatus:u},props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:ws});return Xi({open:a,ref:c,onComplete(){a||h(!1)}}),p})),Zme=S.memo(S.forwardRef(function(t,n){const{indexRef:r,textRef:i,selectedByFocus:s,hasRegistered:a}=Bw(),{selectedItemTextRef:c}=Io(),{className:u,render:h,...m}=t,p=S.useCallback(x=>{if(!x||!a)return;const b=c.current===null||!c.current.isConnected;(s||b&&r.current===0)&&(c.current=x)},[c,r,s,a]);return Ot("div",t,{ref:[p,n,i],props:m})})),o7=S.forwardRef(function(t,n){const{render:r,className:i,direction:s,keepMounted:a=!1,...c}=t,{store:u,popupRef:h,listRef:m,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:y}=Io(),{side:x,scrollDownArrowRef:b,scrollUpArrowRef:w}=Fw(),E=s==="up"?St.scrollUpArrowVisible:St.scrollDownArrowVisible,k=Et(u,E),T=Et(u,St.openMethod),N=k&&T!=="touch",O=Hn(),j=s==="up"?w:b,{transitionStatus:A,setMounted:R}=Ea(N);We(()=>(y.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{y.current=Math.max(0,y.current-1),y.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,y]),Xi({open:N,ref:j,onComplete(){N||R(!1)}});const I=Ot("div",t,{ref:[n,j],state:{direction:s,visible:N,side:x,transitionStatus:A},props:[{"aria-hidden":!0,children:s==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(q){if(q.movementX===0&&q.movementY===0||O.isStarted())return;u.set("activeIndex",null);function V(){const $=u.state.listElement??h.current;if(!$)return;u.set("activeIndex",null),p();const U=$.scrollTop===0,P=Math.round($.scrollTop+$.clientHeight)>=$.scrollHeight;if(m.current.length===0&&(s==="up"?u.set("scrollUpArrowVisible",!U):u.set("scrollDownArrowVisible",!P)),s==="up"&&U||s==="down"&&P){O.clear();return}if((u.state.listElement||h.current)&&m.current&&m.current.length>0){const G=m.current,X=j.current?.offsetHeight||0;if(s==="up"){let L=0;const B=$.scrollTop+X;for(let D=0;D<G.length;D+=1){const Q=G[D];if(Q&&Q.offsetTop>=B){L=D;break}}const W=Math.max(0,L-1);if(W<L){const D=G[W];D&&($.scrollTop=Math.max(0,D.offsetTop-X))}else $.scrollTop=0}else{let L=G.length-1;const B=$.scrollTop+$.clientHeight-X;for(let D=0;D<G.length;D+=1){const Q=G[D];if(Q&&Q.offsetTop+Q.offsetHeight>B){L=Math.max(0,D-1);break}}const W=Math.min(G.length-1,L+1);if(W>L){const D=G[W];D&&($.scrollTop=D.offsetTop+D.offsetHeight-$.clientHeight+X)}else $.scrollTop=$.scrollHeight-$.clientHeight}}O.start(40,V)}O.start(40,V)},onMouseLeave(){O.clear()}},c]});return N||a?I:null}),Jme=S.forwardRef(function(t,n){return f.jsx(o7,{...t,ref:n,direction:"down"})}),e0e=S.forwardRef(function(t,n){return f.jsx(o7,{...t,ref:n,direction:"up"})}),t0e=Ame;function n0e({className:e,...t}){return f.jsx(Lme,{"data-slot":"select-value",className:se("flex flex-1 text-left",e),...t})}function r0e({className:e,size:t="default",children:n,...r}){return f.jsxs(Dme,{"data-slot":"select-trigger","data-size":t,className:se("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none 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 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-background dark:hover:bg-background 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",e),...r,children:[n,f.jsx(Ime,{render:f.jsx(r0,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function i0e({className:e,children:t,side:n="bottom",sideOffset:r=4,align:i="center",alignOffset:s=0,alignItemWithTrigger:a=!0,...c}){return f.jsx(zme,{children:f.jsx(Bme,{side:n,sideOffset:r,align:i,alignOffset:s,alignItemWithTrigger:a,className:"isolate z-50",children:f.jsxs($me,{"data-slot":"select-content","data-align-trigger":a,className:se("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-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:fade-out-0 data-closed:zoom-out-95",e),...c,children:[f.jsx(s0e,{}),f.jsx(Gme,{children:t}),f.jsx(a0e,{})]})})})}function o0e({className:e,children:t,...n}){return f.jsxs(Kme,{"data-slot":"select-item",className:se("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[f.jsx(Zme,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),f.jsx(Qme,{render:f.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:f.jsx(wf,{className:"pointer-events-none"})})]})}function s0e({className:e,...t}){return f.jsx(e0e,{"data-slot":"select-scroll-up-button",className:se("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:f.jsx(f_,{})})}function a0e({className:e,...t}){return f.jsx(Jme,{"data-slot":"select-scroll-down-button",className:se("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:f.jsx(r0,{})})}const m6=[20,50,100];function l0e({onPageChange:e,onPageSizeChange:t,page:n,pageCount:r,pageSize:i,total:s}){if(r<=1&&s<=m6[0])return null;const a=n>1,c=n<r;return f.jsx(yme,{className:"mx-0 w-auto",children:f.jsxs(xme,{children:[f.jsx(bc,{children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-muted-foreground text-sm",children:"Rows per page"}),f.jsxs(t0e,{onValueChange:u=>t(Number(u)),value:String(i),children:[f.jsx(r0e,{className:"h-8 text-xs",size:"sm",children:f.jsx(n0e,{})}),f.jsx(i0e,{children:m6.map(u=>f.jsx(o0e,{value:String(u),children:u},u))})]})]})}),f.jsx(bc,{children:f.jsxs("span",{className:"text-muted-foreground px-2 text-sm",children:["Page ",n," of ",Math.max(r,1)]})}),f.jsx(bc,{children:f.jsx(bme,{"aria-disabled":!a,className:se({"pointer-events-none opacity-50":!a}),onClick:()=>a&&e(1)})}),f.jsx(bc,{children:f.jsx(vme,{"aria-disabled":!a,className:se({"pointer-events-none opacity-50":!a}),onClick:()=>a&&e(n-1)})}),f.jsx(bc,{children:f.jsx(wme,{"aria-disabled":!c,className:se({"pointer-events-none opacity-50":!c}),onClick:()=>c&&e(n+1)})}),f.jsx(bc,{children:f.jsx(Sme,{"aria-disabled":!c,className:se({"pointer-events-none opacity-50":!c}),onClick:()=>c&&e(r)})})]})})}const c0e=80;function u0e(e){if(!$c(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:jw(t),kind:"tool",tool:t.toolName}:n&&n.content.trim()?{kind:"reasoning",text:n.content.trim().replaceAll(/\s+/g," ").slice(0,c0e)}:"thinking"}function d0e(e,t,n){if(!e)return;const r=n||e;return t?`${r}:${t}`:r}const f0e="INTERRUPTED",h0e="Interrupted (daemon terminated)";function p0e(e){return e.status!=="error"||!e.error?!1:e.error.code===f0e||e.error.message===h0e}const is={action:"w-12",checkbox:"w-10",duration:"w-24",id:"w-36",input:"min-w-72",provider:"w-44",started:"w-28",status:"w-36",type:"w-24"};function m0e(e,t){return e.completedAt&&e.startedAt?_d(e.completedAt-e.startedAt):e.startedAt?_d(t-e.startedAt):e.completedAt?_d(e.completedAt-e.createdAt):_d(t-e.createdAt)}function g0e({allSelected:e,filtered:t,now:n,onClearSearch:r,onDelete:i,onRowClick:s,onToggleSelect:a,onToggleSelectAll:c,providerNames:u,searchQuery:h,selectedIds:m,statusFilter:p}){return f.jsxs(_9,{children:[f.jsx(L9,{children:f.jsxs(Pc,{children:[f.jsx(Fi,{className:is.checkbox,children:f.jsx(s7,{checked:e,onChange:c})}),f.jsx(Fi,{className:se(is.id,"text-xs tracking-wider"),children:"ID"}),f.jsx(Fi,{className:se(is.type,"text-xs tracking-wider"),children:"Type"}),f.jsx(Fi,{className:se(is.provider,"text-xs tracking-wider"),children:"Provider"}),f.jsx(Fi,{className:se(is.input,"text-xs tracking-wider"),children:"Input"}),f.jsx(Fi,{className:se(is.status,"text-xs tracking-wider"),children:"Status"}),f.jsx(Fi,{className:se(is.started,"text-right text-xs tracking-wider"),children:"Started"}),f.jsx(Fi,{className:se(is.duration,"text-right text-xs tracking-wider"),children:"Duration"}),f.jsx(Fi,{className:is.action})]})}),f.jsx(I9,{children:t.length===0?f.jsx(Pc,{children:f.jsx(Nr,{className:"text-muted-foreground py-10 text-center text-sm",colSpan:9,children:f.jsx(gme,{onClearSearch:r,query:h,status:p})})}):t.map(y=>f.jsx(y0e,{isSelected:m.has(y.taskId),now:n,onDelete:i,onRowClick:s,onToggleSelect:a,providerNames:u,task:y},y.taskId))})]})}function y0e({isSelected:e,now:t,onDelete:n,onRowClick:r,onToggleSelect:i,providerNames:s,task:a}){const c=la(a.status),u=!c,h=p0e(a),m=u0e(a),p=f.jsxs(Pc,{className:se("cursor-pointer [&>td]:align-middle",{"opacity-60":h}),"data-state":e?"selected":void 0,onClick:()=>r(a.taskId),children:[f.jsxs(Nr,{className:"relative",onClick:y=>y.stopPropagation(),children:[u&&f.jsx("span",{className:"bg-blue-400/70 pointer-events-none absolute top-2 bottom-2 left-0 w-0.5 rounded-full"}),f.jsx(s7,{checked:e,onChange:()=>i(a.taskId)})]}),f.jsx(Nr,{className:"text-identifier mono text-xs",title:a.taskId,children:NO(a.taskId)}),f.jsx(Nr,{children:f.jsx(x0e,{type:a.type})}),f.jsx(Nr,{children:f.jsx(b0e,{model:a.model,provider:a.provider,providerName:a.provider?s.get(a.provider):void 0})}),f.jsxs(Nr,{className:"text-foreground max-w-0",children:[f.jsx("div",{className:"truncate",title:a.content||void 0,children:a.content||f.jsx("span",{className:"text-muted-foreground italic",children:"(empty)"})}),m&&f.jsxs("div",{className:"text-muted-foreground mono mt-1 flex items-center gap-1.5 text-[11px]",children:[f.jsx("span",{className:"text-blue-400",children:"▸"}),m==="thinking"&&f.jsx("span",{className:"italic",children:"thinking…"}),m!=="thinking"&&m.kind==="tool"&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-foreground/80",children:m.tool}),m.arg&&f.jsxs("span",{className:"truncate",children:["· ",m.arg]})]}),m!=="thinking"&&m.kind==="reasoning"&&f.jsx("span",{className:"truncate italic",children:m.text})]})]}),f.jsx(Nr,{children:f.jsx(jO,{status:a.status})}),f.jsxs(Nr,{className:"text-muted-foreground text-right text-xs",title:TO(a.startedAt??a.createdAt),children:[kO(a.startedAt??a.createdAt,t)," ago"]}),f.jsx(Nr,{className:se("text-right mono text-xs tabular-nums",u?"text-blue-400":"text-muted-foreground"),children:m0e(a,t)}),f.jsx(Nr,{className:"text-center",onClick:y=>y.stopPropagation(),children:c&&f.jsx(v0e,{onClick:()=>n(a.taskId)})})]});return h?f.jsxs(ms,{children:[f.jsx(gs,{render:p}),f.jsx($i,{children:"Daemon was restarted while this task was running. The task did not complete."})]}):p}function x0e({type:e}){return f.jsx(ii,{className:"text-muted-foreground mono text-[10px] leading-none uppercase tracking-wider",variant:"outline",children:gA(e)})}function b0e({model:e,provider:t,providerName:n}){const r=d0e(t,e,n);return r?f.jsx(ii,{className:"text-muted-foreground mono max-w-full truncate text-[10px] tracking-wider",title:r,variant:"outline",children:r}):null}function v0e({onClick:e}){return f.jsx(ze,{"aria-label":"Delete",onClick:e,size:"icon-xs",title:"Delete",variant:"ghost",children:f.jsx(aY,{className:"size-3.5"})})}function s7({checked:e,onChange:t}){return f.jsx("input",{checked:e,className:"border-border bg-transparent accent-blue-500 size-3.5 cursor-pointer rounded border",onChange:t,type:"checkbox"})}function w0e(){const[e,t]=u0(),n=e.get("task")??void 0,r=ge=>{t(Oe=>{const Ye=new URLSearchParams(Oe);return Ye.set("task",ge),Ye})},i=S.useCallback(()=>{t(ge=>{const Oe=new URLSearchParams(ge);return Oe.delete("task"),Oe})},[t]),s=Pe(ge=>ge.selectedProject),a=Yc(ge=>ge.clearCompleted),c=Yc(ge=>ge.removeTask),{clearAllFilters:u,filters:h,setDurationPreset:m,setModelFilter:p,setPage:y,setPageSize:x,setProviderFilter:b,setSearchQuery:w,setStatusFilter:E,setTimeRange:k,setTypeFilter:T}=Zde(),{data:N}=dv(),O=N?.providers??[],j=S.useMemo(()=>new Map((N?.providers??[]).map(ge=>[ge.id,ge.name])),[N]),{createdAfter:A,createdBefore:R,durationPreset:_,modelFilter:F,page:I,pageSize:H,providerFilter:q,searchQuery:V,statusFilter:$,typeFilter:U}=h,P=S.useMemo(()=>Wde(_),[_]),Y=qde(V,300),G=S.useMemo(()=>({projectPath:s||void 0,...U.length>0?{type:U}:{},...q.length>0?{provider:q}:{},...F.length>0?{model:F}:{},...A===void 0?{}:{createdAfter:A},...R===void 0?{}:{createdBefore:R},...P,...Y.trim()?{searchText:Y.trim()}:{}}),[s,U,q,F,A,R,P,Y]),X=S.useMemo(()=>tfe($),[$]),{data:L,isLoading:B}=YT({page:I,pageSize:H,...G,...X?{status:X}:{}}),{data:W}=YT({page:1,pageSize:1,...G}),D=L?.tasks??[],Q=W?.counts??{all:0,cancelled:0,completed:0,failed:0,running:0},ee=L?.availableProviders??[],J=L?.availableModels??[],he=vO(Q.running>0),de=$!=="all"||U.length>0||q.length>0||F.length>0||A!==void 0||R!==void 0||_!=="all"||V.trim().length>0,Se=Hde(),Re=Fde(),je=Pde(),[Fe,_e]=S.useState(new Set),[De,xe]=S.useState({open:!1}),Ge=Ht(ge=>ge.tourActive),we=Ht(ge=>ge.tourStep),Ae=Ht(ge=>ge.tourTaskId),pe=Ht(ge=>ge.setTourTaskId),ne=Ge&&(we==="curate"||we==="query"),ye=ne&&!Ae?we==="curate"?"Click to capture knowledge":"Click to ask a question":void 0,Ce=()=>{if(ne){xe({initialContent:we==="curate"?Dde:_de,initialType:we,open:!0});return}xe({open:!0})},Ve=()=>xe({open:!1}),ct=Xx(ge=>ge.seed),oe=Xx(ge=>ge.consume);S.useEffect(()=>{ct&&(xe({initialContent:ct.content,initialType:ct.type,open:!0}),i(),oe())},[ct,oe,i]);const Ee=(ge,Oe)=>{ne&&pe(ge),Oe&&r(ge)},Le=S.useMemo(()=>new Map(D.map(ge=>[ge.taskId,ge])),[D]),Me=S.useMemo(()=>[...D].sort((ge,Oe)=>{const Ye=la(ge.status)?1:0,Rt=la(Oe.status)?1:0;if(Ye!==Rt)return Ye-Rt;const Ie=ge.completedAt??ge.startedAt??ge.createdAt;return(Oe.completedAt??Oe.startedAt??Oe.createdAt)-Ie}),[D]),Ue=Me.length>0&&Me.every(ge=>Fe.has(ge.taskId)),dt=Fe.size>0,xt=Q.completed+Q.failed+Q.cancelled,Je=S.useMemo(()=>{for(const ge of Fe){const Oe=Le.get(ge);if(Oe&&la(Oe.status))return!0}return!1},[Fe,Le]),Ke=ge=>{_e(Oe=>{const Ye=new Set(Oe);return Ye.has(ge)?Ye.delete(ge):Ye.add(ge),Ye})},bt=()=>{_e(ge=>{if(Ue)return new Set;const Oe=new Set(ge);for(const Ye of Me)Oe.add(Ye.taskId);return Oe})},nt=()=>_e(new Set),Qe=ge=>{Se.mutate({taskId:ge},{onError:Oe=>lt.error(Oe.message),onSuccess:()=>c(ge)})},Ct=()=>{const ge=[...Fe].filter(Oe=>{const Ye=Le.get(Oe);return Ye!==void 0&&la(Ye.status)});if(ge.length===0){nt();return}Re.mutate({taskIds:ge},{onError:Oe=>lt.error(Oe.message),onSuccess(){for(const Oe of ge)c(Oe);nt()}})},$e=()=>{je.mutate(s?{projectPath:s}:{},{onError:ge=>lt.error(ge.message),onSuccess:()=>a()})};return f.jsxs("div",{className:"mx-auto flex h-full w-full min-h-0 max-w-7xl flex-col gap-3",children:[dt?f.jsx(hme,{canDelete:Je,count:Fe.size,onClear:nt,onDelete:Ct}):f.jsx(ume,{availableModels:J,availableProviders:ee,breakdown:Q,createdAfter:A,createdBefore:R,durationPreset:_,modelFilter:F,onDurationChange:ge=>{m(ge),nt()},onModelChange:ge=>{p(ge),nt()},onNewTask:Ce,onProviderChange:ge=>{b(ge),nt()},onSearchChange:w,onStatusChange:ge=>{E(ge),nt()},onTimeRangeChange:ge=>{k(ge),nt()},onTypeChange:ge=>{T(ge),nt()},providerFilter:q,providers:O,searchQuery:V,statusFilter:$,tourCue:ye&&D.length>0?ye:void 0,typeFilter:U}),f.jsx(fme,{createdAfter:A,createdBefore:R,durationPreset:_,modelFilter:F,onClearAll:u,onDurationChange:m,onModelChange:p,onProviderChange:b,onSearchChange:w,onStatusChange:E,onTimeRangeChange:k,onTypeChange:T,providerFilter:q,providers:O,searchQuery:V,statusFilter:$,typeFilter:U}),B?f.jsx(d6,{children:f.jsx(pme,{})}):D.length===0?f.jsx(d6,{withDots:!0,children:f.jsx(mme,{hasActiveFilters:de,onClearFilters:u,onNewTask:Ce,tourCue:ye})}):f.jsx(g0e,{allSelected:Ue,filtered:Me,now:he,onClearSearch:()=>w(""),onDelete:Qe,onRowClick:r,onToggleSelect:Ke,onToggleSelectAll:bt,providerNames:j,searchQuery:V,selectedIds:Fe,statusFilter:$}),(L||xt>0)&&f.jsxs("div",{className:"flex items-center justify-between gap-3 px-1",children:[L?f.jsx(l0e,{onPageChange:y,onPageSizeChange:x,page:L.page,pageCount:L.pageCount,pageSize:L.pageSize,total:L.total}):f.jsx("span",{}),xt>0&&f.jsxs(ze,{onClick:$e,size:"xs",variant:"ghost",children:["Clear finished (",xt,")"]})]}),f.jsx(gO,{onOpenChange:ge=>!ge&&i(),open:!!n,children:f.jsx(yO,{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&&f.jsx(The,{taskId:n})})}),f.jsx(bfe,{initialContent:De.initialContent,initialType:De.initialType,onClose:Ve,onSubmitted:Ee,open:De.open,prefillNotice:ne?"example":void 0,tourStepLabel:ne?Lde[we]:void 0})]})}function S0e(){return f.jsx(w0e,{})}const C0e=tP([{element:f.jsx(jde,{}),path:"/projects"},{children:[{children:[{element:f.jsx(Nde,{}),index:!0},{element:f.jsx(zee,{}),path:"changes"},{element:f.jsx(zte,{}),path:"configuration"},{element:f.jsx($K,{}),path:"analytics"},{element:f.jsx(Tde,{}),path:"contexts"},{element:f.jsx(S0e,{}),path:"tasks"},{element:f.jsx($T,{}),path:"*"}],element:f.jsx(VK,{})}],element:f.jsx(aV,{}),path:"/"},{element:f.jsx($T,{}),path:"*"}]);function E0e(){return f.jsxs(Dq,{children:[f.jsx(fP,{router:C0e}),f.jsx(H_,{position:"top-center"})]})}const a7=document.querySelector("#root");if(a7===null)throw new Error("Root element not found");const k0e=CD.createRoot(a7);k0e.render(f.jsx(E0e,{}));