@dendelion/paper-camp 0.10.0 → 0.11.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 (37) hide show
  1. package/dist/app/assets/index-CwotynaS.js +2 -0
  2. package/dist/app/assets/index-CwotynaS.js.map +1 -0
  3. package/dist/app/assets/index-DHHPg0hQ.js +4 -0
  4. package/dist/app/assets/index-DHHPg0hQ.js.map +1 -0
  5. package/dist/app/assets/{index-DrNAzLuW.js → index-DyLHu3dg.js} +2 -2
  6. package/dist/app/assets/{index-DrNAzLuW.js.map → index-DyLHu3dg.js.map} +1 -1
  7. package/dist/app/assets/{index-C2kYil0S.js → index-DzMK8ayh.js} +3 -3
  8. package/dist/app/assets/index-DzMK8ayh.js.map +1 -0
  9. package/dist/app/assets/{main-BJGNGUiz.css → main-B7k4s_9g.css} +1 -1
  10. package/dist/app/assets/main-BNLbBO0E.js +233 -0
  11. package/dist/app/assets/main-BNLbBO0E.js.map +1 -0
  12. package/dist/app/assets/{sidebar-section-Ch50IaLb.js → sidebar-section-DVSoUVEe.js} +2 -2
  13. package/dist/app/assets/{sidebar-section-Ch50IaLb.js.map → sidebar-section-DVSoUVEe.js.map} +1 -1
  14. package/dist/app/index.html +2 -2
  15. package/dist/chunks/{roadmap.C0AQ6pUX.js → roadmap.HCld8rN3.js} +1221 -1130
  16. package/dist/chunks/{roadmap.C0AQ6pUX.js.map → roadmap.HCld8rN3.js.map} +1 -1
  17. package/dist/cli/index.js +6271 -6023
  18. package/dist/cli/index.js.map +1 -1
  19. package/dist/core/git-pr/pr.d.ts +12 -1
  20. package/dist/core/git-pr/pr.d.ts.map +1 -1
  21. package/dist/core/git-pr/scopes.d.ts +3 -0
  22. package/dist/core/git-pr/scopes.d.ts.map +1 -1
  23. package/dist/core/index.js +86 -79
  24. package/dist/core/roadmap.d.ts +2 -0
  25. package/dist/core/roadmap.d.ts.map +1 -1
  26. package/dist/core/scaffold/scaffold.d.ts.map +1 -1
  27. package/dist/types/index.d.ts +6 -1
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/dist/types/index.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/app/assets/index-BnXxehKU.js +0 -2
  32. package/dist/app/assets/index-BnXxehKU.js.map +0 -1
  33. package/dist/app/assets/index-C2kYil0S.js.map +0 -1
  34. package/dist/app/assets/index-CRRHTP77.js +0 -2
  35. package/dist/app/assets/index-CRRHTP77.js.map +0 -1
  36. package/dist/app/assets/main-CyxblUnu.js +0 -233
  37. package/dist/app/assets/main-CyxblUnu.js.map +0 -1
@@ -1,233 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BnXxehKU.js","assets/sidebar-section-Ch50IaLb.js","assets/index-DrNAzLuW.js"])))=>i.map(i=>d[i]);
2
- (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 o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).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)}})();var ec=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nv={exports:{}},Zc={},zv={exports:{}},se={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var ma=Symbol.for("react.element"),V_=Symbol.for("react.portal"),W_=Symbol.for("react.fragment"),U_=Symbol.for("react.strict_mode"),H_=Symbol.for("react.profiler"),G_=Symbol.for("react.provider"),K_=Symbol.for("react.context"),Y_=Symbol.for("react.forward_ref"),q_=Symbol.for("react.suspense"),Q_=Symbol.for("react.memo"),X_=Symbol.for("react.lazy"),lg=Symbol.iterator;function J_(e){return e===null||typeof e!="object"?null:(e=lg&&e[lg]||e["@@iterator"],typeof e=="function"?e:null)}var Ov={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fv=Object.assign,Bv={};function Ls(e,t,n){this.props=e,this.context=t,this.refs=Bv,this.updater=n||Ov}Ls.prototype.isReactComponent={};Ls.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ls.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $v(){}$v.prototype=Ls.prototype;function Xh(e,t,n){this.props=e,this.context=t,this.refs=Bv,this.updater=n||Ov}var Jh=Xh.prototype=new $v;Jh.constructor=Xh;Fv(Jh,Ls.prototype);Jh.isPureReactComponent=!0;var cg=Array.isArray,Vv=Object.prototype.hasOwnProperty,Zh={current:null},Wv={key:!0,ref:!0,__self:!0,__source:!0};function Uv(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Vv.call(t,r)&&!Wv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:ma,type:e,key:s,ref:o,props:i,_owner:Zh.current}}function Z_(e,t){return{$$typeof:ma,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ep(e){return typeof e=="object"&&e!==null&&e.$$typeof===ma}function eC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ug=/\/+/g;function zu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?eC(""+e.key):t.toString(36)}function _l(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ma:case V_:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+zu(o,0):r,cg(i)?(n="",e!=null&&(n=e.replace(ug,"$&/")+"/"),_l(i,t,n,"",function(c){return c})):i!=null&&(ep(i)&&(i=Z_(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(ug,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",cg(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+zu(s,a);o+=_l(s,t,n,l,i)}else if(l=J_(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+zu(s,a++),o+=_l(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function za(e,t,n){if(e==null)return e;var r=[],i=0;return _l(e,r,"","",function(s){return t.call(n,s,i++)}),r}function tC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ft={current:null},Cl={transition:null},nC={ReactCurrentDispatcher:ft,ReactCurrentBatchConfig:Cl,ReactCurrentOwner:Zh};function Hv(){throw Error("act(...) is not supported in production builds of React.")}se.Children={map:za,forEach:function(e,t,n){za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!ep(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=Ls;se.Fragment=W_;se.Profiler=H_;se.PureComponent=Xh;se.StrictMode=U_;se.Suspense=q_;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nC;se.act=Hv;se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Fv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Zh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Vv.call(t,l)&&!Wv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:ma,type:e.type,key:i,ref:s,props:r,_owner:o}};se.createContext=function(e){return e={$$typeof:K_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:G_,_context:e},e.Consumer=e};se.createElement=Uv;se.createFactory=function(e){var t=Uv.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:Y_,render:e}};se.isValidElement=ep;se.lazy=function(e){return{$$typeof:X_,_payload:{_status:-1,_result:e},_init:tC}};se.memo=function(e,t){return{$$typeof:Q_,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=Cl.transition;Cl.transition={};try{e()}finally{Cl.transition=t}};se.unstable_act=Hv;se.useCallback=function(e,t){return ft.current.useCallback(e,t)};se.useContext=function(e){return ft.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return ft.current.useDeferredValue(e)};se.useEffect=function(e,t){return ft.current.useEffect(e,t)};se.useId=function(){return ft.current.useId()};se.useImperativeHandle=function(e,t,n){return ft.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return ft.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return ft.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return ft.current.useMemo(e,t)};se.useReducer=function(e,t,n){return ft.current.useReducer(e,t,n)};se.useRef=function(e){return ft.current.useRef(e)};se.useState=function(e){return ft.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return ft.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return ft.current.useTransition()};se.version="18.3.1";zv.exports=se;var _=zv.exports;const vs=Jc(_);/**
11
- * @license React
12
- * react-jsx-runtime.production.min.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var rC=_,iC=Symbol.for("react.element"),sC=Symbol.for("react.fragment"),oC=Object.prototype.hasOwnProperty,aC=rC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,lC={key:!0,ref:!0,__self:!0,__source:!0};function Gv(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)oC.call(t,r)&&!lC.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:iC,type:e,key:s,ref:o,props:i,_owner:aC.current}}Zc.Fragment=sC;Zc.jsx=Gv;Zc.jsxs=Gv;Nv.exports=Zc;var f=Nv.exports,Kv={exports:{}},Bt={},Yv={exports:{}},qv={};/**
19
- * @license React
20
- * scheduler.production.min.js
21
- *
22
- * Copyright (c) Facebook, Inc. and its affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */(function(e){function t(z,W){var C=z.length;z.push(W);e:for(;0<C;){var $=C-1>>>1,q=z[$];if(0<i(q,W))z[$]=W,z[C]=q,C=$;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var W=z[0],C=z.pop();if(C!==W){z[0]=C;e:for(var $=0,q=z.length,I=q>>>1;$<I;){var ue=2*($+1)-1,me=z[ue],he=ue+1,Pt=z[he];if(0>i(me,C))he<q&&0>i(Pt,me)?(z[$]=Pt,z[he]=C,$=he):(z[$]=me,z[ue]=C,$=ue);else if(he<q&&0>i(Pt,C))z[$]=Pt,z[he]=C,$=he;else break e}}return W}function i(z,W){var C=z.sortIndex-W.sortIndex;return C!==0?C:z.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,h=3,p=!1,m=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(z){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=z)r(c),W.sortIndex=W.expirationTime,t(l,W);else break;W=n(c)}}function b(z){if(x=!1,v(z),!m)if(n(l)!==null)m=!0,B(k);else{var W=n(c);W!==null&&H(b,W.startTime-z)}}function k(z,W){m=!1,x&&(x=!1,g(P),P=-1),p=!0;var C=h;try{for(v(W),d=n(l);d!==null&&(!(d.expirationTime>W)||z&&!R());){var $=d.callback;if(typeof $=="function"){d.callback=null,h=d.priorityLevel;var q=$(d.expirationTime<=W);W=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(l)&&r(l),v(W)}else r(l);d=n(l)}if(d!==null)var I=!0;else{var ue=n(c);ue!==null&&H(b,ue.startTime-W),I=!1}return I}finally{d=null,h=C,p=!1}}var S=!1,E=null,P=-1,T=5,j=-1;function R(){return!(e.unstable_now()-j<T)}function L(){if(E!==null){var z=e.unstable_now();j=z;var W=!0;try{W=E(!0,z)}finally{W?F():(S=!1,E=null)}}else S=!1}var F;if(typeof y=="function")F=function(){y(L)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,M=D.port2;D.port1.onmessage=L,F=function(){M.postMessage(null)}}else F=function(){w(L,0)};function B(z){E=z,S||(S=!0,F())}function H(z,W){P=w(function(){z(e.unstable_now())},W)}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(z){z.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,B(k))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(z){switch(h){case 1:case 2:case 3:var W=3;break;default:W=h}var C=h;h=W;try{return z()}finally{h=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,W){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var C=h;h=z;try{return W()}finally{h=C}},e.unstable_scheduleCallback=function(z,W,C){var $=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?$+C:$):C=$,z){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=C+q,z={id:u++,callback:W,priorityLevel:z,startTime:C,expirationTime:q,sortIndex:-1},C>$?(z.sortIndex=C,t(c,z),n(l)===null&&z===n(c)&&(x?(g(P),P=-1):x=!0,H(b,C-$))):(z.sortIndex=q,t(l,z),m||p||(m=!0,B(k))),z},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(z){var W=h;return function(){var C=h;h=W;try{return z.apply(this,arguments)}finally{h=C}}}})(qv);Yv.exports=qv;var cC=Yv.exports;/**
27
- * @license React
28
- * react-dom.production.min.js
29
- *
30
- * Copyright (c) Facebook, Inc. and its affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var uC=_,Nt=cC;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qv=new Set,Wo={};function Ii(e,t){ws(e,t),ws(e+"Capture",t)}function ws(e,t){for(Wo[e]=t,e=0;e<t.length;e++)Qv.add(t[e])}var Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),df=Object.prototype.hasOwnProperty,dC=/^[: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]*$/,dg={},fg={};function fC(e){return df.call(fg,e)?!0:df.call(dg,e)?!1:dC.test(e)?fg[e]=!0:(dg[e]=!0,!1)}function hC(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pC(e,t,n,r){if(t===null||typeof t>"u"||hC(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new ht(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){et[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var tp=/[\-:]([a-z])/g;function np(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(tp,np);et[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(tp,np);et[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(tp,np);et[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function rp(e,t,n,r){var i=et.hasOwnProperty(t)?et[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(pC(t,n,i,r)&&(n=null),r||i===null?fC(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var rr=uC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Oa=Symbol.for("react.element"),qi=Symbol.for("react.portal"),Qi=Symbol.for("react.fragment"),ip=Symbol.for("react.strict_mode"),ff=Symbol.for("react.profiler"),Xv=Symbol.for("react.provider"),Jv=Symbol.for("react.context"),sp=Symbol.for("react.forward_ref"),hf=Symbol.for("react.suspense"),pf=Symbol.for("react.suspense_list"),op=Symbol.for("react.memo"),yr=Symbol.for("react.lazy"),Zv=Symbol.for("react.offscreen"),hg=Symbol.iterator;function Xs(e){return e===null||typeof e!="object"?null:(e=hg&&e[hg]||e["@@iterator"],typeof e=="function"?e:null)}var Ie=Object.assign,Ou;function vo(e){if(Ou===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ou=t&&t[1]||""}return`
35
- `+Ou+e}var Fu=!1;function Bu(e,t){if(!e||Fu)return"";Fu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
36
- `),s=r.stack.split(`
37
- `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
38
- `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Fu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vo(e):""}function mC(e){switch(e.tag){case 5:return vo(e.type);case 16:return vo("Lazy");case 13:return vo("Suspense");case 19:return vo("SuspenseList");case 0:case 2:case 15:return e=Bu(e.type,!1),e;case 11:return e=Bu(e.type.render,!1),e;case 1:return e=Bu(e.type,!0),e;default:return""}}function mf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Qi:return"Fragment";case qi:return"Portal";case ff:return"Profiler";case ip:return"StrictMode";case hf:return"Suspense";case pf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jv:return(e.displayName||"Context")+".Consumer";case Xv:return(e._context.displayName||"Context")+".Provider";case sp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case op:return t=e.displayName||null,t!==null?t:mf(e.type)||"Memo";case yr:t=e._payload,e=e._init;try{return mf(e(t))}catch{}}return null}function gC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mf(t);case 8:return t===ip?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $r(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function e1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yC(e){var t=e1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fa(e){e._valueTracker||(e._valueTracker=yC(e))}function t1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function tc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function gf(e,t){var n=t.checked;return Ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$r(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function n1(e,t){t=t.checked,t!=null&&rp(e,"checked",t,!1)}function yf(e,t){n1(e,t);var n=$r(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xf(e,t.type,n):t.hasOwnProperty("defaultValue")&&xf(e,t.type,$r(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function xf(e,t,n){(t!=="number"||tc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wo=Array.isArray;function us(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$r(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function vf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return Ie({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(V(92));if(wo(n)){if(1<n.length)throw Error(V(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$r(n)}}function r1(e,t){var n=$r(t.value),r=$r(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function yg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function i1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function wf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?i1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ba,s1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ba=Ba||document.createElement("div"),Ba.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ba.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Po={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xC=["Webkit","ms","Moz","O"];Object.keys(Po).forEach(function(e){xC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Po[t]=Po[e]})});function o1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Po.hasOwnProperty(e)&&Po[e]?(""+t).trim():t+"px"}function a1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=o1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vC=Ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bf(e,t){if(t){if(vC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function kf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sf=null;function ap(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _f=null,ds=null,fs=null;function xg(e){if(e=xa(e)){if(typeof _f!="function")throw Error(V(280));var t=e.stateNode;t&&(t=iu(t),_f(e.stateNode,e.type,t))}}function l1(e){ds?fs?fs.push(e):fs=[e]:ds=e}function c1(){if(ds){var e=ds,t=fs;if(fs=ds=null,xg(e),t)for(e=0;e<t.length;e++)xg(t[e])}}function u1(e,t){return e(t)}function d1(){}var $u=!1;function f1(e,t,n){if($u)return e(t,n);$u=!0;try{return u1(e,t,n)}finally{$u=!1,(ds!==null||fs!==null)&&(d1(),c1())}}function Ho(e,t){var n=e.stateNode;if(n===null)return null;var r=iu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(V(231,t,typeof n));return n}var Cf=!1;if(Jn)try{var Js={};Object.defineProperty(Js,"passive",{get:function(){Cf=!0}}),window.addEventListener("test",Js,Js),window.removeEventListener("test",Js,Js)}catch{Cf=!1}function wC(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var jo=!1,nc=null,rc=!1,Pf=null,bC={onError:function(e){jo=!0,nc=e}};function kC(e,t,n,r,i,s,o,a,l){jo=!1,nc=null,wC.apply(bC,arguments)}function SC(e,t,n,r,i,s,o,a,l){if(kC.apply(this,arguments),jo){if(jo){var c=nc;jo=!1,nc=null}else throw Error(V(198));rc||(rc=!0,Pf=c)}}function Ri(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function vg(e){if(Ri(e)!==e)throw Error(V(188))}function _C(e){var t=e.alternate;if(!t){if(t=Ri(e),t===null)throw Error(V(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return vg(i),e;if(s===r)return vg(i),t;s=s.sibling}throw Error(V(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(V(189))}}if(n.alternate!==r)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function p1(e){return e=_C(e),e!==null?m1(e):null}function m1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=m1(e);if(t!==null)return t;e=e.sibling}return null}var g1=Nt.unstable_scheduleCallback,wg=Nt.unstable_cancelCallback,CC=Nt.unstable_shouldYield,PC=Nt.unstable_requestPaint,ze=Nt.unstable_now,jC=Nt.unstable_getCurrentPriorityLevel,lp=Nt.unstable_ImmediatePriority,y1=Nt.unstable_UserBlockingPriority,ic=Nt.unstable_NormalPriority,EC=Nt.unstable_LowPriority,x1=Nt.unstable_IdlePriority,eu=null,Rn=null;function TC(e){if(Rn&&typeof Rn.onCommitFiberRoot=="function")try{Rn.onCommitFiberRoot(eu,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:MC,IC=Math.log,RC=Math.LN2;function MC(e){return e>>>=0,e===0?32:31-(IC(e)/RC|0)|0}var $a=64,Va=4194304;function bo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function sc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=bo(a):(s&=o,s!==0&&(r=bo(s)))}else o=n&~i,o!==0?r=bo(o):s!==0&&(r=bo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-fn(t),i=1<<n,r|=e[n],t&=~i;return r}function LC(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function AC(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-fn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=LC(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function jf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function v1(){var e=$a;return $a<<=1,!($a&4194240)&&($a=64),e}function Vu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ga(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fn(t),e[t]=n}function DC(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-fn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function cp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-fn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var fe=0;function w1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var b1,up,k1,S1,_1,Ef=!1,Wa=[],Ir=null,Rr=null,Mr=null,Go=new Map,Ko=new Map,wr=[],NC="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function bg(e,t){switch(e){case"focusin":case"focusout":Ir=null;break;case"dragenter":case"dragleave":Rr=null;break;case"mouseover":case"mouseout":Mr=null;break;case"pointerover":case"pointerout":Go.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ko.delete(t.pointerId)}}function Zs(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=xa(t),t!==null&&up(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function zC(e,t,n,r,i){switch(t){case"focusin":return Ir=Zs(Ir,e,t,n,r,i),!0;case"dragenter":return Rr=Zs(Rr,e,t,n,r,i),!0;case"mouseover":return Mr=Zs(Mr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Go.set(s,Zs(Go.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ko.set(s,Zs(Ko.get(s)||null,e,t,n,r,i)),!0}return!1}function C1(e){var t=di(e.target);if(t!==null){var n=Ri(t);if(n!==null){if(t=n.tag,t===13){if(t=h1(n),t!==null){e.blockedOn=t,_1(e.priority,function(){k1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sf=r,n.target.dispatchEvent(r),Sf=null}else return t=xa(n),t!==null&&up(t),e.blockedOn=n,!1;t.shift()}return!0}function kg(e,t,n){Pl(e)&&n.delete(t)}function OC(){Ef=!1,Ir!==null&&Pl(Ir)&&(Ir=null),Rr!==null&&Pl(Rr)&&(Rr=null),Mr!==null&&Pl(Mr)&&(Mr=null),Go.forEach(kg),Ko.forEach(kg)}function eo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ef||(Ef=!0,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,OC)))}function Yo(e){function t(i){return eo(i,e)}if(0<Wa.length){eo(Wa[0],e);for(var n=1;n<Wa.length;n++){var r=Wa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ir!==null&&eo(Ir,e),Rr!==null&&eo(Rr,e),Mr!==null&&eo(Mr,e),Go.forEach(t),Ko.forEach(t),n=0;n<wr.length;n++)r=wr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<wr.length&&(n=wr[0],n.blockedOn===null);)C1(n),n.blockedOn===null&&wr.shift()}var hs=rr.ReactCurrentBatchConfig,oc=!0;function FC(e,t,n,r){var i=fe,s=hs.transition;hs.transition=null;try{fe=1,dp(e,t,n,r)}finally{fe=i,hs.transition=s}}function BC(e,t,n,r){var i=fe,s=hs.transition;hs.transition=null;try{fe=4,dp(e,t,n,r)}finally{fe=i,hs.transition=s}}function dp(e,t,n,r){if(oc){var i=Tf(e,t,n,r);if(i===null)Ju(e,t,r,ac,n),bg(e,r);else if(zC(i,e,t,n,r))r.stopPropagation();else if(bg(e,r),t&4&&-1<NC.indexOf(e)){for(;i!==null;){var s=xa(i);if(s!==null&&b1(s),s=Tf(e,t,n,r),s===null&&Ju(e,t,r,ac,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Ju(e,t,r,null,n)}}var ac=null;function Tf(e,t,n,r){if(ac=null,e=ap(r),e=di(e),e!==null)if(t=Ri(e),t===null)e=null;else if(n=t.tag,n===13){if(e=h1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ac=e,null}function P1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(jC()){case lp:return 1;case y1:return 4;case ic:case EC:return 16;case x1:return 536870912;default:return 16}default:return 16}}var Sr=null,fp=null,jl=null;function j1(){if(jl)return jl;var e,t=fp,n=t.length,r,i="value"in Sr?Sr.value:Sr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return jl=i.slice(e,1<r?1-r:void 0)}function El(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ua(){return!0}function Sg(){return!1}function $t(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ua:Sg,this.isPropagationStopped=Sg,this}return Ie(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ua)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ua)},persist:function(){},isPersistent:Ua}),t}var As={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hp=$t(As),ya=Ie({},As,{view:0,detail:0}),$C=$t(ya),Wu,Uu,to,tu=Ie({},ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==to&&(to&&e.type==="mousemove"?(Wu=e.screenX-to.screenX,Uu=e.screenY-to.screenY):Uu=Wu=0,to=e),Wu)},movementY:function(e){return"movementY"in e?e.movementY:Uu}}),_g=$t(tu),VC=Ie({},tu,{dataTransfer:0}),WC=$t(VC),UC=Ie({},ya,{relatedTarget:0}),Hu=$t(UC),HC=Ie({},As,{animationName:0,elapsedTime:0,pseudoElement:0}),GC=$t(HC),KC=Ie({},As,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),YC=$t(KC),qC=Ie({},As,{data:0}),Cg=$t(qC),QC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XC={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"},JC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JC[e])?!!t[e]:!1}function pp(){return ZC}var eP=Ie({},ya,{key:function(e){if(e.key){var t=QC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=El(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?XC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pp,charCode:function(e){return e.type==="keypress"?El(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?El(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tP=$t(eP),nP=Ie({},tu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pg=$t(nP),rP=Ie({},ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pp}),iP=$t(rP),sP=Ie({},As,{propertyName:0,elapsedTime:0,pseudoElement:0}),oP=$t(sP),aP=Ie({},tu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),lP=$t(aP),cP=[9,13,27,32],mp=Jn&&"CompositionEvent"in window,Eo=null;Jn&&"documentMode"in document&&(Eo=document.documentMode);var uP=Jn&&"TextEvent"in window&&!Eo,E1=Jn&&(!mp||Eo&&8<Eo&&11>=Eo),jg=" ",Eg=!1;function T1(e,t){switch(e){case"keyup":return cP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function dP(e,t){switch(e){case"compositionend":return I1(t);case"keypress":return t.which!==32?null:(Eg=!0,jg);case"textInput":return e=t.data,e===jg&&Eg?null:e;default:return null}}function fP(e,t){if(Xi)return e==="compositionend"||!mp&&T1(e,t)?(e=j1(),jl=fp=Sr=null,Xi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return E1&&t.locale!=="ko"?null:t.data;default:return null}}var hP={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 Tg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hP[e.type]:t==="textarea"}function R1(e,t,n,r){l1(r),t=lc(t,"onChange"),0<t.length&&(n=new hp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var To=null,qo=null;function pP(e){V1(e,0)}function nu(e){var t=es(e);if(t1(t))return e}function mP(e,t){if(e==="change")return t}var M1=!1;if(Jn){var Gu;if(Jn){var Ku="oninput"in document;if(!Ku){var Ig=document.createElement("div");Ig.setAttribute("oninput","return;"),Ku=typeof Ig.oninput=="function"}Gu=Ku}else Gu=!1;M1=Gu&&(!document.documentMode||9<document.documentMode)}function Rg(){To&&(To.detachEvent("onpropertychange",L1),qo=To=null)}function L1(e){if(e.propertyName==="value"&&nu(qo)){var t=[];R1(t,qo,e,ap(e)),f1(pP,t)}}function gP(e,t,n){e==="focusin"?(Rg(),To=t,qo=n,To.attachEvent("onpropertychange",L1)):e==="focusout"&&Rg()}function yP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nu(qo)}function xP(e,t){if(e==="click")return nu(t)}function vP(e,t){if(e==="input"||e==="change")return nu(t)}function wP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:wP;function Qo(e,t){if(mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!df.call(t,i)||!mn(e[i],t[i]))return!1}return!0}function Mg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lg(e,t){var n=Mg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Mg(n)}}function A1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?A1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function D1(){for(var e=window,t=tc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=tc(e.document)}return t}function gp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function bP(e){var t=D1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&A1(n.ownerDocument.documentElement,n)){if(r!==null&&gp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Lg(n,s);var o=Lg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var kP=Jn&&"documentMode"in document&&11>=document.documentMode,Ji=null,If=null,Io=null,Rf=!1;function Ag(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rf||Ji==null||Ji!==tc(r)||(r=Ji,"selectionStart"in r&&gp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Io&&Qo(Io,r)||(Io=r,r=lc(If,"onSelect"),0<r.length&&(t=new hp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ji)))}function Ha(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zi={animationend:Ha("Animation","AnimationEnd"),animationiteration:Ha("Animation","AnimationIteration"),animationstart:Ha("Animation","AnimationStart"),transitionend:Ha("Transition","TransitionEnd")},Yu={},N1={};Jn&&(N1=document.createElement("div").style,"AnimationEvent"in window||(delete Zi.animationend.animation,delete Zi.animationiteration.animation,delete Zi.animationstart.animation),"TransitionEvent"in window||delete Zi.transitionend.transition);function ru(e){if(Yu[e])return Yu[e];if(!Zi[e])return e;var t=Zi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in N1)return Yu[e]=t[n];return e}var z1=ru("animationend"),O1=ru("animationiteration"),F1=ru("animationstart"),B1=ru("transitionend"),$1=new Map,Dg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Gr(e,t){$1.set(e,t),Ii(t,[e])}for(var qu=0;qu<Dg.length;qu++){var Qu=Dg[qu],SP=Qu.toLowerCase(),_P=Qu[0].toUpperCase()+Qu.slice(1);Gr(SP,"on"+_P)}Gr(z1,"onAnimationEnd");Gr(O1,"onAnimationIteration");Gr(F1,"onAnimationStart");Gr("dblclick","onDoubleClick");Gr("focusin","onFocus");Gr("focusout","onBlur");Gr(B1,"onTransitionEnd");ws("onMouseEnter",["mouseout","mouseover"]);ws("onMouseLeave",["mouseout","mouseover"]);ws("onPointerEnter",["pointerout","pointerover"]);ws("onPointerLeave",["pointerout","pointerover"]);Ii("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ii("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ii("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ii("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ii("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ii("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ko="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(" "),CP=new Set("cancel close invalid load scroll toggle".split(" ").concat(ko));function Ng(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,SC(r,t,void 0,e),e.currentTarget=null}function V1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Ng(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;Ng(i,a,c),s=l}}}if(rc)throw e=Pf,rc=!1,Pf=null,e}function _e(e,t){var n=t[Nf];n===void 0&&(n=t[Nf]=new Set);var r=e+"__bubble";n.has(r)||(W1(t,e,2,!1),n.add(r))}function Xu(e,t,n){var r=0;t&&(r|=4),W1(n,e,r,t)}var Ga="_reactListening"+Math.random().toString(36).slice(2);function Xo(e){if(!e[Ga]){e[Ga]=!0,Qv.forEach(function(n){n!=="selectionchange"&&(CP.has(n)||Xu(n,!1,e),Xu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ga]||(t[Ga]=!0,Xu("selectionchange",!1,t))}}function W1(e,t,n,r){switch(P1(t)){case 1:var i=FC;break;case 4:i=BC;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!Cf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ju(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=di(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}f1(function(){var c=s,u=ap(n),d=[];e:{var h=$1.get(e);if(h!==void 0){var p=hp,m=e;switch(e){case"keypress":if(El(n)===0)break e;case"keydown":case"keyup":p=tP;break;case"focusin":m="focus",p=Hu;break;case"focusout":m="blur",p=Hu;break;case"beforeblur":case"afterblur":p=Hu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=_g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=WC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=iP;break;case z1:case O1:case F1:p=GC;break;case B1:p=oP;break;case"scroll":p=$C;break;case"wheel":p=lP;break;case"copy":case"cut":case"paste":p=YC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Pg}var x=(t&4)!==0,w=!x&&e==="scroll",g=x?h!==null?h+"Capture":null:h;x=[];for(var y=c,v;y!==null;){v=y;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,g!==null&&(b=Ho(y,g),b!=null&&x.push(Jo(y,b,v)))),w)break;y=y.return}0<x.length&&(h=new p(h,m,null,n,u),d.push({event:h,listeners:x}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Sf&&(m=n.relatedTarget||n.fromElement)&&(di(m)||m[Zn]))break e;if((p||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=c,m=m?di(m):null,m!==null&&(w=Ri(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=c),p!==m)){if(x=_g,b="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(x=Pg,b="onPointerLeave",g="onPointerEnter",y="pointer"),w=p==null?h:es(p),v=m==null?h:es(m),h=new x(b,y+"leave",p,n,u),h.target=w,h.relatedTarget=v,b=null,di(u)===c&&(x=new x(g,y+"enter",m,n,u),x.target=v,x.relatedTarget=w,b=x),w=b,p&&m)t:{for(x=p,g=m,y=0,v=x;v;v=Oi(v))y++;for(v=0,b=g;b;b=Oi(b))v++;for(;0<y-v;)x=Oi(x),y--;for(;0<v-y;)g=Oi(g),v--;for(;y--;){if(x===g||g!==null&&x===g.alternate)break t;x=Oi(x),g=Oi(g)}x=null}else x=null;p!==null&&zg(d,h,p,x,!1),m!==null&&w!==null&&zg(d,w,m,x,!0)}}e:{if(h=c?es(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var k=mP;else if(Tg(h))if(M1)k=vP;else{k=yP;var S=gP}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=xP);if(k&&(k=k(e,c))){R1(d,k,n,u);break e}S&&S(e,h,c),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&xf(h,"number",h.value)}switch(S=c?es(c):window,e){case"focusin":(Tg(S)||S.contentEditable==="true")&&(Ji=S,If=c,Io=null);break;case"focusout":Io=If=Ji=null;break;case"mousedown":Rf=!0;break;case"contextmenu":case"mouseup":case"dragend":Rf=!1,Ag(d,n,u);break;case"selectionchange":if(kP)break;case"keydown":case"keyup":Ag(d,n,u)}var E;if(mp)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Xi?T1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(E1&&n.locale!=="ko"&&(Xi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Xi&&(E=j1()):(Sr=u,fp="value"in Sr?Sr.value:Sr.textContent,Xi=!0)),S=lc(c,P),0<S.length&&(P=new Cg(P,e,null,n,u),d.push({event:P,listeners:S}),E?P.data=E:(E=I1(n),E!==null&&(P.data=E)))),(E=uP?dP(e,n):fP(e,n))&&(c=lc(c,"onBeforeInput"),0<c.length&&(u=new Cg("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=E))}V1(d,t)})}function Jo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ho(e,n),s!=null&&r.unshift(Jo(e,s,i)),s=Ho(e,t),s!=null&&r.push(Jo(e,s,i))),e=e.return}return r}function Oi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=Ho(n,s),l!=null&&o.unshift(Jo(n,l,a))):i||(l=Ho(n,s),l!=null&&o.push(Jo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var PP=/\r\n?/g,jP=/\u0000|\uFFFD/g;function Og(e){return(typeof e=="string"?e:""+e).replace(PP,`
39
- `).replace(jP,"")}function Ka(e,t,n){if(t=Og(t),Og(e)!==t&&n)throw Error(V(425))}function cc(){}var Mf=null,Lf=null;function Af(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Df=typeof setTimeout=="function"?setTimeout:void 0,EP=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,TP=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(e){return Fg.resolve(null).then(e).catch(IP)}:Df;function IP(e){setTimeout(function(){throw e})}function Zu(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Yo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Yo(t)}function Lr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Bg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ds=Math.random().toString(36).slice(2),En="__reactFiber$"+Ds,Zo="__reactProps$"+Ds,Zn="__reactContainer$"+Ds,Nf="__reactEvents$"+Ds,RP="__reactListeners$"+Ds,MP="__reactHandles$"+Ds;function di(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zn]||n[En]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bg(e);e!==null;){if(n=e[En])return n;e=Bg(e)}return t}e=n,n=e.parentNode}return null}function xa(e){return e=e[En]||e[Zn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function iu(e){return e[Zo]||null}var zf=[],ts=-1;function Kr(e){return{current:e}}function Ce(e){0>ts||(e.current=zf[ts],zf[ts]=null,ts--)}function be(e,t){ts++,zf[ts]=e.current,e.current=t}var Vr={},ot=Kr(Vr),wt=Kr(!1),Ci=Vr;function bs(e,t){var n=e.type.contextTypes;if(!n)return Vr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function bt(e){return e=e.childContextTypes,e!=null}function uc(){Ce(wt),Ce(ot)}function $g(e,t,n){if(ot.current!==Vr)throw Error(V(168));be(ot,t),be(wt,n)}function U1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(V(108,gC(e)||"Unknown",i));return Ie({},n,r)}function dc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vr,Ci=ot.current,be(ot,e),be(wt,wt.current),!0}function Vg(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=U1(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,Ce(wt),Ce(ot),be(ot,e)):Ce(wt),be(wt,n)}var Kn=null,su=!1,ed=!1;function H1(e){Kn===null?Kn=[e]:Kn.push(e)}function LP(e){su=!0,H1(e)}function Yr(){if(!ed&&Kn!==null){ed=!0;var e=0,t=fe;try{var n=Kn;for(fe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Kn=null,su=!1}catch(i){throw Kn!==null&&(Kn=Kn.slice(e+1)),g1(lp,Yr),i}finally{fe=t,ed=!1}}return null}var ns=[],rs=0,fc=null,hc=0,Yt=[],qt=0,Pi=null,Yn=1,qn="";function si(e,t){ns[rs++]=hc,ns[rs++]=fc,fc=e,hc=t}function G1(e,t,n){Yt[qt++]=Yn,Yt[qt++]=qn,Yt[qt++]=Pi,Pi=e;var r=Yn;e=qn;var i=32-fn(r)-1;r&=~(1<<i),n+=1;var s=32-fn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Yn=1<<32-fn(t)+i|n<<i|r,qn=s+e}else Yn=1<<s|n<<i|r,qn=e}function yp(e){e.return!==null&&(si(e,1),G1(e,1,0))}function xp(e){for(;e===fc;)fc=ns[--rs],ns[rs]=null,hc=ns[--rs],ns[rs]=null;for(;e===Pi;)Pi=Yt[--qt],Yt[qt]=null,qn=Yt[--qt],Yt[qt]=null,Yn=Yt[--qt],Yt[qt]=null}var At=null,Mt=null,je=!1,dn=null;function K1(e,t){var n=Xt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Wg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,At=e,Mt=Lr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,At=e,Mt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Pi!==null?{id:Yn,overflow:qn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,At=e,Mt=null,!0):!1;default:return!1}}function Of(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ff(e){if(je){var t=Mt;if(t){var n=t;if(!Wg(e,t)){if(Of(e))throw Error(V(418));t=Lr(n.nextSibling);var r=At;t&&Wg(e,t)?K1(r,n):(e.flags=e.flags&-4097|2,je=!1,At=e)}}else{if(Of(e))throw Error(V(418));e.flags=e.flags&-4097|2,je=!1,At=e}}}function Ug(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;At=e}function Ya(e){if(e!==At)return!1;if(!je)return Ug(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Af(e.type,e.memoizedProps)),t&&(t=Mt)){if(Of(e))throw Y1(),Error(V(418));for(;t;)K1(e,t),t=Lr(t.nextSibling)}if(Ug(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Mt=Lr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Mt=null}}else Mt=At?Lr(e.stateNode.nextSibling):null;return!0}function Y1(){for(var e=Mt;e;)e=Lr(e.nextSibling)}function ks(){Mt=At=null,je=!1}function vp(e){dn===null?dn=[e]:dn.push(e)}var AP=rr.ReactCurrentBatchConfig;function no(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(V(309));var r=n.stateNode}if(!r)throw Error(V(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(V(284));if(!n._owner)throw Error(V(290,e))}return e}function qa(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hg(e){var t=e._init;return t(e._payload)}function q1(e){function t(g,y){if(e){var v=g.deletions;v===null?(g.deletions=[y],g.flags|=16):v.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function i(g,y){return g=zr(g,y),g.index=0,g.sibling=null,g}function s(g,y,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<y?(g.flags|=2,y):v):(g.flags|=2,y)):(g.flags|=1048576,y)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,y,v,b){return y===null||y.tag!==6?(y=ad(v,g.mode,b),y.return=g,y):(y=i(y,v),y.return=g,y)}function l(g,y,v,b){var k=v.type;return k===Qi?u(g,y,v.props.children,b,v.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===yr&&Hg(k)===y.type)?(b=i(y,v.props),b.ref=no(g,y,v),b.return=g,b):(b=Dl(v.type,v.key,v.props,null,g.mode,b),b.ref=no(g,y,v),b.return=g,b)}function c(g,y,v,b){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=ld(v,g.mode,b),y.return=g,y):(y=i(y,v.children||[]),y.return=g,y)}function u(g,y,v,b,k){return y===null||y.tag!==7?(y=xi(v,g.mode,b,k),y.return=g,y):(y=i(y,v),y.return=g,y)}function d(g,y,v){if(typeof y=="string"&&y!==""||typeof y=="number")return y=ad(""+y,g.mode,v),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Oa:return v=Dl(y.type,y.key,y.props,null,g.mode,v),v.ref=no(g,null,y),v.return=g,v;case qi:return y=ld(y,g.mode,v),y.return=g,y;case yr:var b=y._init;return d(g,b(y._payload),v)}if(wo(y)||Xs(y))return y=xi(y,g.mode,v,null),y.return=g,y;qa(g,y)}return null}function h(g,y,v,b){var k=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:a(g,y,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Oa:return v.key===k?l(g,y,v,b):null;case qi:return v.key===k?c(g,y,v,b):null;case yr:return k=v._init,h(g,y,k(v._payload),b)}if(wo(v)||Xs(v))return k!==null?null:u(g,y,v,b,null);qa(g,v)}return null}function p(g,y,v,b,k){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(v)||null,a(y,g,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Oa:return g=g.get(b.key===null?v:b.key)||null,l(y,g,b,k);case qi:return g=g.get(b.key===null?v:b.key)||null,c(y,g,b,k);case yr:var S=b._init;return p(g,y,v,S(b._payload),k)}if(wo(b)||Xs(b))return g=g.get(v)||null,u(y,g,b,k,null);qa(y,b)}return null}function m(g,y,v,b){for(var k=null,S=null,E=y,P=y=0,T=null;E!==null&&P<v.length;P++){E.index>P?(T=E,E=null):T=E.sibling;var j=h(g,E,v[P],b);if(j===null){E===null&&(E=T);break}e&&E&&j.alternate===null&&t(g,E),y=s(j,y,P),S===null?k=j:S.sibling=j,S=j,E=T}if(P===v.length)return n(g,E),je&&si(g,P),k;if(E===null){for(;P<v.length;P++)E=d(g,v[P],b),E!==null&&(y=s(E,y,P),S===null?k=E:S.sibling=E,S=E);return je&&si(g,P),k}for(E=r(g,E);P<v.length;P++)T=p(E,g,P,v[P],b),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?P:T.key),y=s(T,y,P),S===null?k=T:S.sibling=T,S=T);return e&&E.forEach(function(R){return t(g,R)}),je&&si(g,P),k}function x(g,y,v,b){var k=Xs(v);if(typeof k!="function")throw Error(V(150));if(v=k.call(v),v==null)throw Error(V(151));for(var S=k=null,E=y,P=y=0,T=null,j=v.next();E!==null&&!j.done;P++,j=v.next()){E.index>P?(T=E,E=null):T=E.sibling;var R=h(g,E,j.value,b);if(R===null){E===null&&(E=T);break}e&&E&&R.alternate===null&&t(g,E),y=s(R,y,P),S===null?k=R:S.sibling=R,S=R,E=T}if(j.done)return n(g,E),je&&si(g,P),k;if(E===null){for(;!j.done;P++,j=v.next())j=d(g,j.value,b),j!==null&&(y=s(j,y,P),S===null?k=j:S.sibling=j,S=j);return je&&si(g,P),k}for(E=r(g,E);!j.done;P++,j=v.next())j=p(E,g,P,j.value,b),j!==null&&(e&&j.alternate!==null&&E.delete(j.key===null?P:j.key),y=s(j,y,P),S===null?k=j:S.sibling=j,S=j);return e&&E.forEach(function(L){return t(g,L)}),je&&si(g,P),k}function w(g,y,v,b){if(typeof v=="object"&&v!==null&&v.type===Qi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Oa:e:{for(var k=v.key,S=y;S!==null;){if(S.key===k){if(k=v.type,k===Qi){if(S.tag===7){n(g,S.sibling),y=i(S,v.props.children),y.return=g,g=y;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===yr&&Hg(k)===S.type){n(g,S.sibling),y=i(S,v.props),y.ref=no(g,S,v),y.return=g,g=y;break e}n(g,S);break}else t(g,S);S=S.sibling}v.type===Qi?(y=xi(v.props.children,g.mode,b,v.key),y.return=g,g=y):(b=Dl(v.type,v.key,v.props,null,g.mode,b),b.ref=no(g,y,v),b.return=g,g=b)}return o(g);case qi:e:{for(S=v.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),y=i(y,v.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=ld(v,g.mode,b),y.return=g,g=y}return o(g);case yr:return S=v._init,w(g,y,S(v._payload),b)}if(wo(v))return m(g,y,v,b);if(Xs(v))return x(g,y,v,b);qa(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,v),y.return=g,g=y):(n(g,y),y=ad(v,g.mode,b),y.return=g,g=y),o(g)):n(g,y)}return w}var Ss=q1(!0),Q1=q1(!1),pc=Kr(null),mc=null,is=null,wp=null;function bp(){wp=is=mc=null}function kp(e){var t=pc.current;Ce(pc),e._currentValue=t}function Bf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ps(e,t){mc=e,wp=is=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(xt=!0),e.firstContext=null)}function tn(e){var t=e._currentValue;if(wp!==e)if(e={context:e,memoizedValue:t,next:null},is===null){if(mc===null)throw Error(V(308));is=e,mc.dependencies={lanes:0,firstContext:e}}else is=is.next=e;return t}var fi=null;function Sp(e){fi===null?fi=[e]:fi.push(e)}function X1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Sp(t)):(n.next=i.next,i.next=n),t.interleaved=n,er(e,r)}function er(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var xr=!1;function _p(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function J1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ar(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,er(e,n)}return i=r.interleaved,i===null?(t.next=t,Sp(r)):(t.next=i.next,i.next=t),r.interleaved=t,er(e,n)}function Tl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cp(e,n)}}function Gg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function gc(e,t,n,r){var i=e.updateQueue;xr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,u=c=l=null,a=s;do{var h=a.lane,p=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,x=a;switch(h=t,p=n,x.tag){case 1:if(m=x.payload,typeof m=="function"){d=m.call(p,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,h=typeof m=="function"?m.call(p,d,h):m,h==null)break e;d=Ie({},d,h);break e;case 2:xr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Ei|=o,e.lanes=o,e.memoizedState=d}}function Kg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(V(191,i));i.call(r)}}}var va={},Mn=Kr(va),ea=Kr(va),ta=Kr(va);function hi(e){if(e===va)throw Error(V(174));return e}function Cp(e,t){switch(be(ta,t),be(ea,e),be(Mn,va),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:wf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=wf(t,e)}Ce(Mn),be(Mn,t)}function _s(){Ce(Mn),Ce(ea),Ce(ta)}function Z1(e){hi(ta.current);var t=hi(Mn.current),n=wf(t,e.type);t!==n&&(be(ea,e),be(Mn,n))}function Pp(e){ea.current===e&&(Ce(Mn),Ce(ea))}var Ee=Kr(0);function yc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var td=[];function jp(){for(var e=0;e<td.length;e++)td[e]._workInProgressVersionPrimary=null;td.length=0}var Il=rr.ReactCurrentDispatcher,nd=rr.ReactCurrentBatchConfig,ji=0,Te=null,We=null,Ye=null,xc=!1,Ro=!1,na=0,DP=0;function tt(){throw Error(V(321))}function Ep(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function Tp(e,t,n,r,i,s){if(ji=s,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Il.current=e===null||e.memoizedState===null?FP:BP,e=n(r,i),Ro){s=0;do{if(Ro=!1,na=0,25<=s)throw Error(V(301));s+=1,Ye=We=null,t.updateQueue=null,Il.current=$P,e=n(r,i)}while(Ro)}if(Il.current=vc,t=We!==null&&We.next!==null,ji=0,Ye=We=Te=null,xc=!1,t)throw Error(V(300));return e}function Ip(){var e=na!==0;return na=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?Te.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function nn(){if(We===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=Ye===null?Te.memoizedState:Ye.next;if(t!==null)Ye=t,We=e;else{if(e===null)throw Error(V(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Ye===null?Te.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function ra(e,t){return typeof t=="function"?t(e):t}function rd(e){var t=nn(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=We,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var u=c.lane;if((ji&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Te.lanes|=u,Ei|=u}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,mn(r,t.memoizedState)||(xt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Te.lanes|=s,Ei|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function id(e){var t=nn(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);mn(s,t.memoizedState)||(xt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ew(){}function tw(e,t){var n=Te,r=nn(),i=t(),s=!mn(r.memoizedState,i);if(s&&(r.memoizedState=i,xt=!0),r=r.queue,Rp(iw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ye!==null&&Ye.memoizedState.tag&1){if(n.flags|=2048,ia(9,rw.bind(null,n,r,i,t),void 0,null),qe===null)throw Error(V(349));ji&30||nw(n,t,i)}return i}function nw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rw(e,t,n,r){t.value=n,t.getSnapshot=r,sw(t)&&ow(e)}function iw(e,t,n){return n(function(){sw(t)&&ow(e)})}function sw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function ow(e){var t=er(e,1);t!==null&&hn(t,e,1,-1)}function Yg(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t.queue=e,e=e.dispatch=OP.bind(null,Te,e),[t.memoizedState,e]}function ia(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function aw(){return nn().memoizedState}function Rl(e,t,n,r){var i=kn();Te.flags|=e,i.memoizedState=ia(1|t,n,void 0,r===void 0?null:r)}function ou(e,t,n,r){var i=nn();r=r===void 0?null:r;var s=void 0;if(We!==null){var o=We.memoizedState;if(s=o.destroy,r!==null&&Ep(r,o.deps)){i.memoizedState=ia(t,n,s,r);return}}Te.flags|=e,i.memoizedState=ia(1|t,n,s,r)}function qg(e,t){return Rl(8390656,8,e,t)}function Rp(e,t){return ou(2048,8,e,t)}function lw(e,t){return ou(4,2,e,t)}function cw(e,t){return ou(4,4,e,t)}function uw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dw(e,t,n){return n=n!=null?n.concat([e]):null,ou(4,4,uw.bind(null,t,e),n)}function Mp(){}function fw(e,t){var n=nn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ep(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hw(e,t){var n=nn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ep(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pw(e,t,n){return ji&21?(mn(n,t)||(n=v1(),Te.lanes|=n,Ei|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,xt=!0),e.memoizedState=n)}function NP(e,t){var n=fe;fe=n!==0&&4>n?n:4,e(!0);var r=nd.transition;nd.transition={};try{e(!1),t()}finally{fe=n,nd.transition=r}}function mw(){return nn().memoizedState}function zP(e,t,n){var r=Nr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gw(e))yw(t,n);else if(n=X1(e,t,n,r),n!==null){var i=dt();hn(n,e,r,i),xw(n,t,r)}}function OP(e,t,n){var r=Nr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gw(e))yw(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,mn(a,o)){var l=t.interleaved;l===null?(i.next=i,Sp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=X1(e,t,i,r),n!==null&&(i=dt(),hn(n,e,r,i),xw(n,t,r))}}function gw(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function yw(e,t){Ro=xc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cp(e,n)}}var vc={readContext:tn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useInsertionEffect:tt,useLayoutEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useMutableSource:tt,useSyncExternalStore:tt,useId:tt,unstable_isNewReconciler:!1},FP={readContext:tn,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:tn,useEffect:qg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Rl(4194308,4,uw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Rl(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zP.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:Yg,useDebugValue:Mp,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=Yg(!1),t=e[0];return e=NP.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Te,i=kn();if(je){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),qe===null)throw Error(V(349));ji&30||nw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,qg(iw.bind(null,r,s,e),[e]),r.flags|=2048,ia(9,rw.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=kn(),t=qe.identifierPrefix;if(je){var n=qn,r=Yn;n=(r&~(1<<32-fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=na++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=DP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BP={readContext:tn,useCallback:fw,useContext:tn,useEffect:Rp,useImperativeHandle:dw,useInsertionEffect:lw,useLayoutEffect:cw,useMemo:hw,useReducer:rd,useRef:aw,useState:function(){return rd(ra)},useDebugValue:Mp,useDeferredValue:function(e){var t=nn();return pw(t,We.memoizedState,e)},useTransition:function(){var e=rd(ra)[0],t=nn().memoizedState;return[e,t]},useMutableSource:ew,useSyncExternalStore:tw,useId:mw,unstable_isNewReconciler:!1},$P={readContext:tn,useCallback:fw,useContext:tn,useEffect:Rp,useImperativeHandle:dw,useInsertionEffect:lw,useLayoutEffect:cw,useMemo:hw,useReducer:id,useRef:aw,useState:function(){return id(ra)},useDebugValue:Mp,useDeferredValue:function(e){var t=nn();return We===null?t.memoizedState=e:pw(t,We.memoizedState,e)},useTransition:function(){var e=id(ra)[0],t=nn().memoizedState;return[e,t]},useMutableSource:ew,useSyncExternalStore:tw,useId:mw,unstable_isNewReconciler:!1};function cn(e,t){if(e&&e.defaultProps){t=Ie({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function $f(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ie({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var au={isMounted:function(e){return(e=e._reactInternals)?Ri(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=dt(),i=Nr(e),s=Qn(r,i);s.payload=t,n!=null&&(s.callback=n),t=Ar(e,s,i),t!==null&&(hn(t,e,i,r),Tl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=dt(),i=Nr(e),s=Qn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ar(e,s,i),t!==null&&(hn(t,e,i,r),Tl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=dt(),r=Nr(e),i=Qn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Ar(e,i,r),t!==null&&(hn(t,e,r,n),Tl(t,e,r))}};function Qg(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Qo(n,r)||!Qo(i,s):!0}function vw(e,t,n){var r=!1,i=Vr,s=t.contextType;return typeof s=="object"&&s!==null?s=tn(s):(i=bt(t)?Ci:ot.current,r=t.contextTypes,s=(r=r!=null)?bs(e,i):Vr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=au,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Xg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&au.enqueueReplaceState(t,t.state,null)}function Vf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},_p(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=tn(s):(s=bt(t)?Ci:ot.current,i.context=bs(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&($f(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&au.enqueueReplaceState(i,i.state,null),gc(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Cs(e,t){try{var n="",r=t;do n+=mC(r),r=r.return;while(r);var i=n}catch(s){i=`
40
- Error generating stack: `+s.message+`
41
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function sd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var VP=typeof WeakMap=="function"?WeakMap:Map;function ww(e,t,n){n=Qn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bc||(bc=!0,Zf=r),Wf(e,t)},n}function bw(e,t,n){n=Qn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Wf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Wf(e,t),typeof r!="function"&&(Dr===null?Dr=new Set([this]):Dr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Jg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new VP;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=nj.bind(null,e,t,n),t.then(e,e))}function Zg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ey(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Qn(-1,1),t.tag=2,Ar(n,t,1))),n.lanes|=1),e)}var WP=rr.ReactCurrentOwner,xt=!1;function lt(e,t,n,r){t.child=e===null?Q1(t,null,n,r):Ss(t,e.child,n,r)}function ty(e,t,n,r,i){n=n.render;var s=t.ref;return ps(t,i),r=Tp(e,t,n,r,s,i),n=Ip(),e!==null&&!xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,tr(e,t,i)):(je&&n&&yp(t),t.flags|=1,lt(e,t,r,i),t.child)}function ny(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Bp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,kw(e,t,s,r,i)):(e=Dl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Qo,n(o,r)&&e.ref===t.ref)return tr(e,t,i)}return t.flags|=1,e=zr(s,r),e.ref=t.ref,e.return=t,t.child=e}function kw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Qo(s,r)&&e.ref===t.ref)if(xt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(xt=!0);else return t.lanes=e.lanes,tr(e,t,i)}return Uf(e,t,n,r,i)}function Sw(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},be(os,Rt),Rt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,be(os,Rt),Rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,be(os,Rt),Rt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,be(os,Rt),Rt|=r;return lt(e,t,i,n),t.child}function _w(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uf(e,t,n,r,i){var s=bt(n)?Ci:ot.current;return s=bs(t,s),ps(t,i),n=Tp(e,t,n,r,s,i),r=Ip(),e!==null&&!xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,tr(e,t,i)):(je&&r&&yp(t),t.flags|=1,lt(e,t,n,i),t.child)}function ry(e,t,n,r,i){if(bt(n)){var s=!0;dc(t)}else s=!1;if(ps(t,i),t.stateNode===null)Ml(e,t),vw(t,n,r),Vf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=tn(c):(c=bt(n)?Ci:ot.current,c=bs(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Xg(t,o,r,c),xr=!1;var h=t.memoizedState;o.state=h,gc(t,r,o,i),l=t.memoizedState,a!==r||h!==l||wt.current||xr?(typeof u=="function"&&($f(t,n,u,r),l=t.memoizedState),(a=xr||Qg(t,n,a,r,h,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,J1(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:cn(t.type,a),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=tn(l):(l=bt(n)?Ci:ot.current,l=bs(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Xg(t,o,r,l),xr=!1,h=t.memoizedState,o.state=h,gc(t,r,o,i);var m=t.memoizedState;a!==d||h!==m||wt.current||xr?(typeof p=="function"&&($f(t,n,p,r),m=t.memoizedState),(c=xr||Qg(t,n,c,r,h,m,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Hf(e,t,n,r,s,i)}function Hf(e,t,n,r,i,s){_w(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Vg(t,n,!1),tr(e,t,s);r=t.stateNode,WP.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ss(t,e.child,null,s),t.child=Ss(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,i&&Vg(t,n,!0),t.child}function Cw(e){var t=e.stateNode;t.pendingContext?$g(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$g(e,t.context,!1),Cp(e,t.containerInfo)}function iy(e,t,n,r,i){return ks(),vp(i),t.flags|=256,lt(e,t,n,r),t.child}var Gf={dehydrated:null,treeContext:null,retryLane:0};function Kf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Pw(e,t,n){var r=t.pendingProps,i=Ee.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),be(Ee,i&1),e===null)return Ff(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=uu(o,r,0,null),e=xi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Kf(n),t.memoizedState=Gf,e):Lp(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return UP(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=zr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=zr(a,s):(s=xi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Kf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Gf,r}return s=e.child,e=s.sibling,r=zr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Lp(e,t){return t=uu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qa(e,t,n,r){return r!==null&&vp(r),Ss(t,e.child,null,n),e=Lp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UP(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=sd(Error(V(422))),Qa(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=uu({mode:"visible",children:r.children},i,0,null),s=xi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ss(t,e.child,null,o),t.child.memoizedState=Kf(o),t.memoizedState=Gf,s);if(!(t.mode&1))return Qa(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(V(419)),r=sd(s,r,void 0),Qa(e,t,o,r)}if(a=(o&e.childLanes)!==0,xt||a){if(r=qe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,er(e,i),hn(r,e,i,-1))}return Fp(),r=sd(Error(V(421))),Qa(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=rj.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Mt=Lr(i.nextSibling),At=t,je=!0,dn=null,e!==null&&(Yt[qt++]=Yn,Yt[qt++]=qn,Yt[qt++]=Pi,Yn=e.id,qn=e.overflow,Pi=t),t=Lp(t,r.children),t.flags|=4096,t)}function sy(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bf(e.return,t,n)}function od(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function jw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(lt(e,t,r.children,n),r=Ee.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sy(e,n,t);else if(e.tag===19)sy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(be(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&yc(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),od(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&yc(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}od(t,!0,n,null,s);break;case"together":od(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ml(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ei|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=zr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function HP(e,t,n){switch(t.tag){case 3:Cw(t),ks();break;case 5:Z1(t);break;case 1:bt(t.type)&&dc(t);break;case 4:Cp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;be(pc,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(be(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?Pw(e,t,n):(be(Ee,Ee.current&1),e=tr(e,t,n),e!==null?e.sibling:null);be(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,Sw(e,t,n)}return tr(e,t,n)}var Ew,Yf,Tw,Iw;Ew=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Yf=function(){};Tw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,hi(Mn.current);var s=null;switch(n){case"input":i=gf(e,i),r=gf(e,r),s=[];break;case"select":i=Ie({},i,{value:void 0}),r=Ie({},r,{value:void 0}),s=[];break;case"textarea":i=vf(e,i),r=vf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=cc)}bf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Wo.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Wo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&_e("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Iw=function(e,t,n,r){n!==r&&(t.flags|=4)};function ro(e,t){if(!je)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function GP(e,t,n){var r=t.pendingProps;switch(xp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return bt(t.type)&&uc(),nt(t),null;case 3:return r=t.stateNode,_s(),Ce(wt),Ce(ot),jp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ya(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(nh(dn),dn=null))),Yf(e,t),nt(t),null;case 5:Pp(t);var i=hi(ta.current);if(n=t.type,e!==null&&t.stateNode!=null)Tw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(V(166));return nt(t),null}if(e=hi(Mn.current),Ya(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[En]=t,r[Zo]=s,e=(t.mode&1)!==0,n){case"dialog":_e("cancel",r),_e("close",r);break;case"iframe":case"object":case"embed":_e("load",r);break;case"video":case"audio":for(i=0;i<ko.length;i++)_e(ko[i],r);break;case"source":_e("error",r);break;case"img":case"image":case"link":_e("error",r),_e("load",r);break;case"details":_e("toggle",r);break;case"input":pg(r,s),_e("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},_e("invalid",r);break;case"textarea":gg(r,s),_e("invalid",r)}bf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Ka(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ka(r.textContent,a,e),i=["children",""+a]):Wo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&_e("scroll",r)}switch(n){case"input":Fa(r),mg(r,s,!0);break;case"textarea":Fa(r),yg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=cc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=i1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[En]=t,e[Zo]=r,Ew(e,t,!1,!1),t.stateNode=e;e:{switch(o=kf(n,r),n){case"dialog":_e("cancel",e),_e("close",e),i=r;break;case"iframe":case"object":case"embed":_e("load",e),i=r;break;case"video":case"audio":for(i=0;i<ko.length;i++)_e(ko[i],e);i=r;break;case"source":_e("error",e),i=r;break;case"img":case"image":case"link":_e("error",e),_e("load",e),i=r;break;case"details":_e("toggle",e),i=r;break;case"input":pg(e,r),i=gf(e,r),_e("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ie({},r,{value:void 0}),_e("invalid",e);break;case"textarea":gg(e,r),i=vf(e,r),_e("invalid",e);break;default:i=r}bf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?a1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&s1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Uo(e,l):typeof l=="number"&&Uo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Wo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&_e("scroll",e):l!=null&&rp(e,s,l,o))}switch(n){case"input":Fa(e),mg(e,r,!1);break;case"textarea":Fa(e),yg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$r(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?us(e,!!r.multiple,s,!1):r.defaultValue!=null&&us(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=cc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return nt(t),null;case 6:if(e&&t.stateNode!=null)Iw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(V(166));if(n=hi(ta.current),hi(Mn.current),Ya(t)){if(r=t.stateNode,n=t.memoizedProps,r[En]=t,(s=r.nodeValue!==n)&&(e=At,e!==null))switch(e.tag){case 3:Ka(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ka(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[En]=t,t.stateNode=r}return nt(t),null;case 13:if(Ce(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&Mt!==null&&t.mode&1&&!(t.flags&128))Y1(),ks(),t.flags|=98560,s=!1;else if(s=Ya(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(V(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(V(317));s[En]=t}else ks(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;nt(t),s=!1}else dn!==null&&(nh(dn),dn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ee.current&1?Ue===0&&(Ue=3):Fp())),t.updateQueue!==null&&(t.flags|=4),nt(t),null);case 4:return _s(),Yf(e,t),e===null&&Xo(t.stateNode.containerInfo),nt(t),null;case 10:return kp(t.type._context),nt(t),null;case 17:return bt(t.type)&&uc(),nt(t),null;case 19:if(Ce(Ee),s=t.memoizedState,s===null)return nt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)ro(s,!1);else{if(Ue!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=yc(e),o!==null){for(t.flags|=128,ro(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return be(Ee,Ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&ze()>Ps&&(t.flags|=128,r=!0,ro(s,!1),t.lanes=4194304)}else{if(!r)if(e=yc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ro(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!je)return nt(t),null}else 2*ze()-s.renderingStartTime>Ps&&n!==1073741824&&(t.flags|=128,r=!0,ro(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ze(),t.sibling=null,n=Ee.current,be(Ee,r?n&1|2:n&1),t):(nt(t),null);case 22:case 23:return Op(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rt&1073741824&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function KP(e,t){switch(xp(t),t.tag){case 1:return bt(t.type)&&uc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _s(),Ce(wt),Ce(ot),jp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pp(t),null;case 13:if(Ce(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));ks()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(Ee),null;case 4:return _s(),null;case 10:return kp(t.type._context),null;case 22:case 23:return Op(),null;case 24:return null;default:return null}}var Xa=!1,it=!1,YP=typeof WeakSet=="function"?WeakSet:Set,K=null;function ss(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ae(e,t,r)}else n.current=null}function qf(e,t,n){try{n()}catch(r){Ae(e,t,r)}}var oy=!1;function qP(e,t){if(Mf=oc,e=D1(),gp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===i&&(a=o),h===s&&++u===r&&(l=o),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lf={focusedElem:e,selectionRange:n},oc=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var x=m.memoizedProps,w=m.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:cn(t.type,x),w);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(b){Ae(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return m=oy,oy=!1,m}function Mo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&qf(t,n,s)}i=i.next}while(i!==r)}}function lu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Rw(e){var t=e.alternate;t!==null&&(e.alternate=null,Rw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[En],delete t[Zo],delete t[Nf],delete t[RP],delete t[MP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Mw(e){return e.tag===5||e.tag===3||e.tag===4}function ay(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cc));else if(r!==4&&(e=e.child,e!==null))for(Xf(e,t,n),e=e.sibling;e!==null;)Xf(e,t,n),e=e.sibling}function Jf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Jf(e,t,n),e=e.sibling;e!==null;)Jf(e,t,n),e=e.sibling}var Qe=null,un=!1;function ar(e,t,n){for(n=n.child;n!==null;)Lw(e,t,n),n=n.sibling}function Lw(e,t,n){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(eu,n)}catch{}switch(n.tag){case 5:it||ss(n,t);case 6:var r=Qe,i=un;Qe=null,ar(e,t,n),Qe=r,un=i,Qe!==null&&(un?(e=Qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qe.removeChild(n.stateNode));break;case 18:Qe!==null&&(un?(e=Qe,n=n.stateNode,e.nodeType===8?Zu(e.parentNode,n):e.nodeType===1&&Zu(e,n),Yo(e)):Zu(Qe,n.stateNode));break;case 4:r=Qe,i=un,Qe=n.stateNode.containerInfo,un=!0,ar(e,t,n),Qe=r,un=i;break;case 0:case 11:case 14:case 15:if(!it&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&qf(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!it&&(ss(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ae(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(it=(r=it)||n.memoizedState!==null,ar(e,t,n),it=r):ar(e,t,n);break;default:ar(e,t,n)}}function ly(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YP),t.forEach(function(r){var i=ij.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Qe=a.stateNode,un=!1;break e;case 3:Qe=a.stateNode.containerInfo,un=!0;break e;case 4:Qe=a.stateNode.containerInfo,un=!0;break e}a=a.return}if(Qe===null)throw Error(V(160));Lw(s,o,i),Qe=null,un=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Ae(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Aw(t,e),t=t.sibling}function Aw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),xn(e),r&4){try{Mo(3,e,e.return),lu(3,e)}catch(x){Ae(e,e.return,x)}try{Mo(5,e,e.return)}catch(x){Ae(e,e.return,x)}}break;case 1:sn(t,e),xn(e),r&512&&n!==null&&ss(n,n.return);break;case 5:if(sn(t,e),xn(e),r&512&&n!==null&&ss(n,n.return),e.flags&32){var i=e.stateNode;try{Uo(i,"")}catch(x){Ae(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&n1(i,s),kf(a,o);var c=kf(a,s);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?a1(i,d):u==="dangerouslySetInnerHTML"?s1(i,d):u==="children"?Uo(i,d):rp(i,u,d,c)}switch(a){case"input":yf(i,s);break;case"textarea":r1(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?us(i,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?us(i,!!s.multiple,s.defaultValue,!0):us(i,!!s.multiple,s.multiple?[]:"",!1))}i[Zo]=s}catch(x){Ae(e,e.return,x)}}break;case 6:if(sn(t,e),xn(e),r&4){if(e.stateNode===null)throw Error(V(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){Ae(e,e.return,x)}}break;case 3:if(sn(t,e),xn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Yo(t.containerInfo)}catch(x){Ae(e,e.return,x)}break;case 4:sn(t,e),xn(e);break;case 13:sn(t,e),xn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Np=ze())),r&4&&ly(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(it=(c=it)||u,sn(t,e),it=c):sn(t,e),xn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(K=e,u=e.child;u!==null;){for(d=K=u;K!==null;){switch(h=K,p=h.child,h.tag){case 0:case 11:case 14:case 15:Mo(4,h,h.return);break;case 1:ss(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(x){Ae(r,n,x)}}break;case 5:ss(h,h.return);break;case 22:if(h.memoizedState!==null){uy(d);continue}}p!==null?(p.return=h,K=p):uy(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=o1("display",o))}catch(x){Ae(e,e.return,x)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(x){Ae(e,e.return,x)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:sn(t,e),xn(e),r&4&&ly(e);break;case 21:break;default:sn(t,e),xn(e)}}function xn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Mw(n)){var r=n;break e}n=n.return}throw Error(V(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Uo(i,""),r.flags&=-33);var s=ay(e);Jf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=ay(e);Xf(e,a,o);break;default:throw Error(V(161))}}catch(l){Ae(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QP(e,t,n){K=e,Dw(e)}function Dw(e,t,n){for(var r=(e.mode&1)!==0;K!==null;){var i=K,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Xa;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||it;a=Xa;var c=it;if(Xa=o,(it=l)&&!c)for(K=i;K!==null;)o=K,l=o.child,o.tag===22&&o.memoizedState!==null?dy(i):l!==null?(l.return=o,K=l):dy(i);for(;s!==null;)K=s,Dw(s),s=s.sibling;K=i,Xa=a,it=c}cy(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,K=s):cy(e)}}function cy(e){for(;K!==null;){var t=K;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:it||lu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!it)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:cn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Kg(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Kg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Yo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}it||t.flags&512&&Qf(t)}catch(h){Ae(t,t.return,h)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function uy(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function dy(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{lu(4,t)}catch(l){Ae(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ae(t,i,l)}}var s=t.return;try{Qf(t)}catch(l){Ae(t,s,l)}break;case 5:var o=t.return;try{Qf(t)}catch(l){Ae(t,o,l)}}}catch(l){Ae(t,t.return,l)}if(t===e){K=null;break}var a=t.sibling;if(a!==null){a.return=t.return,K=a;break}K=t.return}}var XP=Math.ceil,wc=rr.ReactCurrentDispatcher,Ap=rr.ReactCurrentOwner,Zt=rr.ReactCurrentBatchConfig,le=0,qe=null,Be=null,Ze=0,Rt=0,os=Kr(0),Ue=0,sa=null,Ei=0,cu=0,Dp=0,Lo=null,yt=null,Np=0,Ps=1/0,Gn=null,bc=!1,Zf=null,Dr=null,Ja=!1,_r=null,kc=0,Ao=0,eh=null,Ll=-1,Al=0;function dt(){return le&6?ze():Ll!==-1?Ll:Ll=ze()}function Nr(e){return e.mode&1?le&2&&Ze!==0?Ze&-Ze:AP.transition!==null?(Al===0&&(Al=v1()),Al):(e=fe,e!==0||(e=window.event,e=e===void 0?16:P1(e.type)),e):1}function hn(e,t,n,r){if(50<Ao)throw Ao=0,eh=null,Error(V(185));ga(e,n,r),(!(le&2)||e!==qe)&&(e===qe&&(!(le&2)&&(cu|=n),Ue===4&&br(e,Ze)),kt(e,r),n===1&&le===0&&!(t.mode&1)&&(Ps=ze()+500,su&&Yr()))}function kt(e,t){var n=e.callbackNode;AC(e,t);var r=sc(e,e===qe?Ze:0);if(r===0)n!==null&&wg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&wg(n),t===1)e.tag===0?LP(fy.bind(null,e)):H1(fy.bind(null,e)),TP(function(){!(le&6)&&Yr()}),n=null;else{switch(w1(r)){case 1:n=lp;break;case 4:n=y1;break;case 16:n=ic;break;case 536870912:n=x1;break;default:n=ic}n=Ww(n,Nw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Nw(e,t){if(Ll=-1,Al=0,le&6)throw Error(V(327));var n=e.callbackNode;if(ms()&&e.callbackNode!==n)return null;var r=sc(e,e===qe?Ze:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Sc(e,r);else{t=r;var i=le;le|=2;var s=Ow();(qe!==e||Ze!==t)&&(Gn=null,Ps=ze()+500,yi(e,t));do try{ej();break}catch(a){zw(e,a)}while(!0);bp(),wc.current=s,le=i,Be!==null?t=0:(qe=null,Ze=0,t=Ue)}if(t!==0){if(t===2&&(i=jf(e),i!==0&&(r=i,t=th(e,i))),t===1)throw n=sa,yi(e,0),br(e,r),kt(e,ze()),n;if(t===6)br(e,r);else{if(i=e.current.alternate,!(r&30)&&!JP(i)&&(t=Sc(e,r),t===2&&(s=jf(e),s!==0&&(r=s,t=th(e,s))),t===1))throw n=sa,yi(e,0),br(e,r),kt(e,ze()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(V(345));case 2:oi(e,yt,Gn);break;case 3:if(br(e,r),(r&130023424)===r&&(t=Np+500-ze(),10<t)){if(sc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){dt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Df(oi.bind(null,e,yt,Gn),t);break}oi(e,yt,Gn);break;case 4:if(br(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-fn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=ze()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*XP(r/1960))-r,10<r){e.timeoutHandle=Df(oi.bind(null,e,yt,Gn),r);break}oi(e,yt,Gn);break;case 5:oi(e,yt,Gn);break;default:throw Error(V(329))}}}return kt(e,ze()),e.callbackNode===n?Nw.bind(null,e):null}function th(e,t){var n=Lo;return e.current.memoizedState.isDehydrated&&(yi(e,t).flags|=256),e=Sc(e,t),e!==2&&(t=yt,yt=n,t!==null&&nh(t)),e}function nh(e){yt===null?yt=e:yt.push.apply(yt,e)}function JP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!mn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function br(e,t){for(t&=~Dp,t&=~cu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-fn(t),r=1<<n;e[n]=-1,t&=~r}}function fy(e){if(le&6)throw Error(V(327));ms();var t=sc(e,0);if(!(t&1))return kt(e,ze()),null;var n=Sc(e,t);if(e.tag!==0&&n===2){var r=jf(e);r!==0&&(t=r,n=th(e,r))}if(n===1)throw n=sa,yi(e,0),br(e,t),kt(e,ze()),n;if(n===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,oi(e,yt,Gn),kt(e,ze()),null}function zp(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Ps=ze()+500,su&&Yr())}}function Ti(e){_r!==null&&_r.tag===0&&!(le&6)&&ms();var t=le;le|=1;var n=Zt.transition,r=fe;try{if(Zt.transition=null,fe=1,e)return e()}finally{fe=r,Zt.transition=n,le=t,!(le&6)&&Yr()}}function Op(){Rt=os.current,Ce(os)}function yi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,EP(n)),Be!==null)for(n=Be.return;n!==null;){var r=n;switch(xp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&uc();break;case 3:_s(),Ce(wt),Ce(ot),jp();break;case 5:Pp(r);break;case 4:_s();break;case 13:Ce(Ee);break;case 19:Ce(Ee);break;case 10:kp(r.type._context);break;case 22:case 23:Op()}n=n.return}if(qe=e,Be=e=zr(e.current,null),Ze=Rt=t,Ue=0,sa=null,Dp=cu=Ei=0,yt=Lo=null,fi!==null){for(t=0;t<fi.length;t++)if(n=fi[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}fi=null}return e}function zw(e,t){do{var n=Be;try{if(bp(),Il.current=vc,xc){for(var r=Te.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}xc=!1}if(ji=0,Ye=We=Te=null,Ro=!1,na=0,Ap.current=null,n===null||n.return===null){Ue=1,sa=t,Be=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Ze,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Zg(o);if(p!==null){p.flags&=-257,ey(p,o,a,s,t),p.mode&1&&Jg(s,c,t),t=p,l=c;var m=t.updateQueue;if(m===null){var x=new Set;x.add(l),t.updateQueue=x}else m.add(l);break e}else{if(!(t&1)){Jg(s,c,t),Fp();break e}l=Error(V(426))}}else if(je&&a.mode&1){var w=Zg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),ey(w,o,a,s,t),vp(Cs(l,a));break e}}s=l=Cs(l,a),Ue!==4&&(Ue=2),Lo===null?Lo=[s]:Lo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=ww(s,l,t);Gg(s,g);break e;case 1:a=l;var y=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Dr===null||!Dr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=bw(s,a,t);Gg(s,b);break e}}s=s.return}while(s!==null)}Bw(n)}catch(k){t=k,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function Ow(){var e=wc.current;return wc.current=vc,e===null?vc:e}function Fp(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),qe===null||!(Ei&268435455)&&!(cu&268435455)||br(qe,Ze)}function Sc(e,t){var n=le;le|=2;var r=Ow();(qe!==e||Ze!==t)&&(Gn=null,yi(e,t));do try{ZP();break}catch(i){zw(e,i)}while(!0);if(bp(),le=n,wc.current=r,Be!==null)throw Error(V(261));return qe=null,Ze=0,Ue}function ZP(){for(;Be!==null;)Fw(Be)}function ej(){for(;Be!==null&&!CC();)Fw(Be)}function Fw(e){var t=Vw(e.alternate,e,Rt);e.memoizedProps=e.pendingProps,t===null?Bw(e):Be=t,Ap.current=null}function Bw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=KP(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ue=6,Be=null;return}}else if(n=GP(n,t,Rt),n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);Ue===0&&(Ue=5)}function oi(e,t,n){var r=fe,i=Zt.transition;try{Zt.transition=null,fe=1,tj(e,t,n,r)}finally{Zt.transition=i,fe=r}return null}function tj(e,t,n,r){do ms();while(_r!==null);if(le&6)throw Error(V(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(V(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(DC(e,s),e===qe&&(Be=qe=null,Ze=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ja||(Ja=!0,Ww(ic,function(){return ms(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Zt.transition,Zt.transition=null;var o=fe;fe=1;var a=le;le|=4,Ap.current=null,qP(e,n),Aw(n,e),bP(Lf),oc=!!Mf,Lf=Mf=null,e.current=n,QP(n),PC(),le=a,fe=o,Zt.transition=s}else e.current=n;if(Ja&&(Ja=!1,_r=e,kc=i),s=e.pendingLanes,s===0&&(Dr=null),TC(n.stateNode),kt(e,ze()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(bc)throw bc=!1,e=Zf,Zf=null,e;return kc&1&&e.tag!==0&&ms(),s=e.pendingLanes,s&1?e===eh?Ao++:(Ao=0,eh=e):Ao=0,Yr(),null}function ms(){if(_r!==null){var e=w1(kc),t=Zt.transition,n=fe;try{if(Zt.transition=null,fe=16>e?16:e,_r===null)var r=!1;else{if(e=_r,_r=null,kc=0,le&6)throw Error(V(331));var i=le;for(le|=4,K=e.current;K!==null;){var s=K,o=s.child;if(K.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(K=c;K!==null;){var u=K;switch(u.tag){case 0:case 11:case 15:Mo(8,u,s)}var d=u.child;if(d!==null)d.return=u,K=d;else for(;K!==null;){u=K;var h=u.sibling,p=u.return;if(Rw(u),u===c){K=null;break}if(h!==null){h.return=p,K=h;break}K=p}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}K=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,K=o;else e:for(;K!==null;){if(s=K,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Mo(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,K=g;break e}K=s.return}}var y=e.current;for(K=y;K!==null;){o=K;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,K=v;else e:for(o=y;K!==null;){if(a=K,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:lu(9,a)}}catch(k){Ae(a,a.return,k)}if(a===o){K=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,K=b;break e}K=a.return}}if(le=i,Yr(),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(eu,e)}catch{}r=!0}return r}finally{fe=n,Zt.transition=t}}return!1}function hy(e,t,n){t=Cs(n,t),t=ww(e,t,1),e=Ar(e,t,1),t=dt(),e!==null&&(ga(e,1,t),kt(e,t))}function Ae(e,t,n){if(e.tag===3)hy(e,e,n);else for(;t!==null;){if(t.tag===3){hy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Dr===null||!Dr.has(r))){e=Cs(n,e),e=bw(t,e,1),t=Ar(t,e,1),e=dt(),t!==null&&(ga(t,1,e),kt(t,e));break}}t=t.return}}function nj(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=dt(),e.pingedLanes|=e.suspendedLanes&n,qe===e&&(Ze&n)===n&&(Ue===4||Ue===3&&(Ze&130023424)===Ze&&500>ze()-Np?yi(e,0):Dp|=n),kt(e,t)}function $w(e,t){t===0&&(e.mode&1?(t=Va,Va<<=1,!(Va&130023424)&&(Va=4194304)):t=1);var n=dt();e=er(e,t),e!==null&&(ga(e,t,n),kt(e,n))}function rj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$w(e,n)}function ij(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(V(314))}r!==null&&r.delete(t),$w(e,n)}var Vw;Vw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wt.current)xt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xt=!1,HP(e,t,n);xt=!!(e.flags&131072)}else xt=!1,je&&t.flags&1048576&&G1(t,hc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ml(e,t),e=t.pendingProps;var i=bs(t,ot.current);ps(t,n),i=Tp(null,t,r,e,i,n);var s=Ip();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,bt(r)?(s=!0,dc(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,_p(t),i.updater=au,t.stateNode=i,i._reactInternals=t,Vf(t,r,e,n),t=Hf(null,t,r,!0,s,n)):(t.tag=0,je&&s&&yp(t),lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ml(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=oj(r),e=cn(r,e),i){case 0:t=Uf(null,t,r,e,n);break e;case 1:t=ry(null,t,r,e,n);break e;case 11:t=ty(null,t,r,e,n);break e;case 14:t=ny(null,t,r,cn(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:cn(r,i),Uf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:cn(r,i),ry(e,t,r,i,n);case 3:e:{if(Cw(t),e===null)throw Error(V(387));r=t.pendingProps,s=t.memoizedState,i=s.element,J1(e,t),gc(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Cs(Error(V(423)),t),t=iy(e,t,r,n,i);break e}else if(r!==i){i=Cs(Error(V(424)),t),t=iy(e,t,r,n,i);break e}else for(Mt=Lr(t.stateNode.containerInfo.firstChild),At=t,je=!0,dn=null,n=Q1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ks(),r===i){t=tr(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return Z1(t),e===null&&Ff(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Af(r,i)?o=null:s!==null&&Af(r,s)&&(t.flags|=32),_w(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&Ff(t),null;case 13:return Pw(e,t,n);case 4:return Cp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ss(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:cn(r,i),ty(e,t,r,i,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,be(pc,r._currentValue),r._currentValue=o,s!==null)if(mn(s.value,o)){if(s.children===i.children&&!wt.current){t=tr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Qn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Bf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(V(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Bf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}lt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ps(t,n),i=tn(i),r=r(i),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,i=cn(r,t.pendingProps),i=cn(r.type,i),ny(e,t,r,i,n);case 15:return kw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:cn(r,i),Ml(e,t),t.tag=1,bt(r)?(e=!0,dc(t)):e=!1,ps(t,n),vw(t,r,i),Vf(t,r,i,n),Hf(null,t,r,!0,e,n);case 19:return jw(e,t,n);case 22:return Sw(e,t,n)}throw Error(V(156,t.tag))};function Ww(e,t){return g1(e,t)}function sj(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,n,r){return new sj(e,t,n,r)}function Bp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oj(e){if(typeof e=="function")return Bp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sp)return 11;if(e===op)return 14}return 2}function zr(e,t){var n=e.alternate;return n===null?(n=Xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Bp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Qi:return xi(n.children,i,s,t);case ip:o=8,i|=8;break;case ff:return e=Xt(12,n,t,i|2),e.elementType=ff,e.lanes=s,e;case hf:return e=Xt(13,n,t,i),e.elementType=hf,e.lanes=s,e;case pf:return e=Xt(19,n,t,i),e.elementType=pf,e.lanes=s,e;case Zv:return uu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xv:o=10;break e;case Jv:o=9;break e;case sp:o=11;break e;case op:o=14;break e;case yr:o=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=Xt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function xi(e,t,n,r){return e=Xt(7,e,r,t),e.lanes=n,e}function uu(e,t,n,r){return e=Xt(22,e,r,t),e.elementType=Zv,e.lanes=n,e.stateNode={isHidden:!1},e}function ad(e,t,n){return e=Xt(6,e,null,t),e.lanes=n,e}function ld(e,t,n){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function aj(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vu(0),this.expirationTimes=Vu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $p(e,t,n,r,i,s,o,a,l){return e=new aj(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Xt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_p(s),e}function lj(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Uw(e){if(!e)return Vr;e=e._reactInternals;e:{if(Ri(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var n=e.type;if(bt(n))return U1(e,n,t)}return t}function Hw(e,t,n,r,i,s,o,a,l){return e=$p(n,r,!0,e,i,s,o,a,l),e.context=Uw(null),n=e.current,r=dt(),i=Nr(n),s=Qn(r,i),s.callback=t??null,Ar(n,s,i),e.current.lanes=i,ga(e,i,r),kt(e,r),e}function du(e,t,n,r){var i=t.current,s=dt(),o=Nr(i);return n=Uw(n),t.context===null?t.context=n:t.pendingContext=n,t=Qn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ar(i,t,o),e!==null&&(hn(e,i,o,s),Tl(e,i,o)),o}function _c(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function py(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Vp(e,t){py(e,t),(e=e.alternate)&&py(e,t)}function cj(){return null}var Gw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wp(e){this._internalRoot=e}fu.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));du(e,t,null,null)};fu.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ti(function(){du(null,e,null,null)}),t[Zn]=null}};function fu(e){this._internalRoot=e}fu.prototype.unstable_scheduleHydration=function(e){if(e){var t=S1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wr.length&&t!==0&&t<wr[n].priority;n++);wr.splice(n,0,e),n===0&&C1(e)}};function Up(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function my(){}function uj(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=_c(o);s.call(c)}}var o=Hw(t,r,e,0,null,!1,!1,"",my);return e._reactRootContainer=o,e[Zn]=o.current,Xo(e.nodeType===8?e.parentNode:e),Ti(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=_c(l);a.call(c)}}var l=$p(e,0,!1,null,null,!1,!1,"",my);return e._reactRootContainer=l,e[Zn]=l.current,Xo(e.nodeType===8?e.parentNode:e),Ti(function(){du(t,l,n,r)}),l}function pu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=_c(o);a.call(l)}}du(t,o,e,i)}else o=uj(n,t,e,i,r);return _c(o)}b1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=bo(t.pendingLanes);n!==0&&(cp(t,n|1),kt(t,ze()),!(le&6)&&(Ps=ze()+500,Yr()))}break;case 13:Ti(function(){var r=er(e,1);if(r!==null){var i=dt();hn(r,e,1,i)}}),Vp(e,1)}};up=function(e){if(e.tag===13){var t=er(e,134217728);if(t!==null){var n=dt();hn(t,e,134217728,n)}Vp(e,134217728)}};k1=function(e){if(e.tag===13){var t=Nr(e),n=er(e,t);if(n!==null){var r=dt();hn(n,e,t,r)}Vp(e,t)}};S1=function(){return fe};_1=function(e,t){var n=fe;try{return fe=e,t()}finally{fe=n}};_f=function(e,t,n){switch(t){case"input":if(yf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=iu(r);if(!i)throw Error(V(90));t1(r),yf(r,i)}}}break;case"textarea":r1(e,n);break;case"select":t=n.value,t!=null&&us(e,!!n.multiple,t,!1)}};u1=zp;d1=Ti;var dj={usingClientEntryPoint:!1,Events:[xa,es,iu,l1,c1,zp]},io={findFiberByHostInstance:di,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fj={bundleType:io.bundleType,version:io.version,rendererPackageName:io.rendererPackageName,rendererConfig:io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:rr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=p1(e),e===null?null:e.stateNode},findFiberByHostInstance:io.findFiberByHostInstance||cj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Za=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Za.isDisabled&&Za.supportsFiber)try{eu=Za.inject(fj),Rn=Za}catch{}}Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dj;Bt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Up(t))throw Error(V(200));return lj(e,t,null,n)};Bt.createRoot=function(e,t){if(!Up(e))throw Error(V(299));var n=!1,r="",i=Gw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=$p(e,1,!1,null,null,n,!1,r,i),e[Zn]=t.current,Xo(e.nodeType===8?e.parentNode:e),new Wp(t)};Bt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=p1(t),e=e===null?null:e.stateNode,e};Bt.flushSync=function(e){return Ti(e)};Bt.hydrate=function(e,t,n){if(!hu(t))throw Error(V(200));return pu(null,e,t,!0,n)};Bt.hydrateRoot=function(e,t,n){if(!Up(e))throw Error(V(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Gw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Hw(t,null,e,1,n??null,i,!1,s,o),e[Zn]=t.current,Xo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new fu(t)};Bt.render=function(e,t,n){if(!hu(t))throw Error(V(200));return pu(null,e,t,!1,n)};Bt.unmountComponentAtNode=function(e){if(!hu(e))throw Error(V(40));return e._reactRootContainer?(Ti(function(){pu(null,null,e,!1,function(){e._reactRootContainer=null,e[Zn]=null})}),!0):!1};Bt.unstable_batchedUpdates=zp;Bt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!hu(n))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return pu(e,t,n,!1,r)};Bt.version="18.3.1-next-f1338f8080-20240426";function Kw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kw)}catch(e){console.error(e)}}Kw(),Kv.exports=Bt;var Ns=Kv.exports,Yw,gy=Ns;Yw=gy.createRoot,gy.hydrateRoot;var So=typeof window<"u"?_.useLayoutEffect:_.useEffect;function cd(e){const t=_.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function hj(e,t,n={},r={}){_.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([s])=>{t(s)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function pj(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}const qw=!1;function oa(e){return e[e.length-1]}function mj(e){return typeof e=="function"}function Cr(e,t){return mj(e)?e(t):e}const gj=Object.prototype.hasOwnProperty,yy=Object.prototype.propertyIsEnumerable,yj=()=>Object.create(null),ei=(e,t)=>Pr(e,t,yj);function Pr(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,s=wy(e)&&wy(i);if(!s&&!(js(e)&&js(i)))return i;const o=s?e:xy(e);if(!o)return i;const a=s?i:xy(i);if(!a)return i;const l=o.length,c=a.length,u=s?new Array(c):n();let d=0;for(let h=0;h<c;h++){const p=s?h:a[h],m=e[p],x=i[p];if(m===x){u[p]=m,(s?h<l:gj.call(e,p))&&d++;continue}if(m===null||x===null||typeof m!="object"||typeof x!="object"){u[p]=x;continue}const w=Pr(m,x,n,r+1);u[p]=w,w===m&&d++}return l===c&&d===l?e:u}function xy(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!yy.call(e,i))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const i of n){if(!yy.call(e,i))return!1;r.push(i)}return r}function js(e){if(!vy(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!vy(n)||!n.hasOwnProperty("isPrototypeOf"))}function vy(e){return Object.prototype.toString.call(e)==="[object Object]"}function wy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!vi(e[r],t[r],n))return!1;return!0}if(js(e)&&js(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const o in t)if((!r||t[o]!==void 0)&&!vi(e[o],t[o],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&i++;let s=0;for(const o in t)if((!r||t[o]!==void 0)&&(s++,s>i||!vi(e[o],t[o],n)))return!1;return i===s}return!1}function Es(e){let t,n;const r=new Promise((i,s)=>{t=i,n=s});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e==null||e(i)},r.reject=i=>{r.status="rejected",n(i)},r}function aa(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function xj(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function by(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return xj(t)}const vj=["http:","https:","mailto:","tel:"];function Cc(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function so(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",i;for(;(i=t.exec(e))!==null;)r+=by(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+by(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function wj(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function bj(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Xn(){throw new Error("Invariant failed")}function la(e){const t=new Map;let n,r;const i=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const o=t.get(s);if(o)return i(o),o.value},set(s,o){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const a=t.get(s);if(a)a.value=o,i(a);else{const l={key:s,value:o,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(s,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const jr=4,Qw=5;function kj(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Hp(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,s=e.substring(t,i);if(!s||!s.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(s==="$"){const a=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}if(s.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const o=kj(s);if(o){const[a,l]=o,c=s.charCodeAt(a+1);if(c===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const u=a+3,d=l;if(u<d)return n[0]=3,n[1]=t+a,n[2]=t+u,n[3]=t+d,n[4]=t+l+1,n[5]=i,n}}else if(c===36){const u=a+1,d=a+2;return d===l?(n[0]=2,n[1]=t+a,n[2]=t+u,n[3]=t+d,n[4]=t+l+1,n[5]=e.length,n):(n[0]=1,n[1]=t+a,n[2]=t+d,n[3]=t+l,n[4]=t+l+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function mu(e,t,n,r,i,s,o){var l,c,u,d,h,p,m,x,w,g,y,v,b;o==null||o(n);let a=r;{const k=n.fullPath??n.from,S=k.length,E=((l=n.options)==null?void 0:l.caseSensitive)??e,P=!!((u=(c=n.options)==null?void 0:c.params)!=null&&u.parse&&((h=(d=n.options)==null?void 0:d.skipRouteOnParseError)!=null&&h.params));for(;a<S;){const j=Hp(k,a,t);let R;const L=a,F=j[5];switch(a=F+1,s++,j[0]){case 0:{const D=k.substring(j[2],j[3]);if(E){const M=(p=i.static)==null?void 0:p.get(D);if(M)R=M;else{i.static??(i.static=new Map);const B=pi(n.fullPath??n.from);B.parent=i,B.depth=s,R=B,i.static.set(D,B)}}else{const M=D.toLowerCase(),B=(m=i.staticInsensitive)==null?void 0:m.get(M);if(B)R=B;else{i.staticInsensitive??(i.staticInsensitive=new Map);const H=pi(n.fullPath??n.from);H.parent=i,H.depth=s,R=H,i.staticInsensitive.set(M,H)}}break}case 1:{const D=k.substring(L,j[1]),M=k.substring(j[4],F),B=E&&!!(D||M),H=D?B?D:D.toLowerCase():void 0,z=M?B?M:M.toLowerCase():void 0,W=!P&&((x=i.dynamic)==null?void 0:x.find(C=>!C.skipOnParamError&&C.caseSensitive===B&&C.prefix===H&&C.suffix===z));if(W)R=W;else{const C=dd(1,n.fullPath??n.from,B,H,z);R=C,C.depth=s,C.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(C)}break}case 3:{const D=k.substring(L,j[1]),M=k.substring(j[4],F),B=E&&!!(D||M),H=D?B?D:D.toLowerCase():void 0,z=M?B?M:M.toLowerCase():void 0,W=!P&&((w=i.optional)==null?void 0:w.find(C=>!C.skipOnParamError&&C.caseSensitive===B&&C.prefix===H&&C.suffix===z));if(W)R=W;else{const C=dd(3,n.fullPath??n.from,B,H,z);R=C,C.parent=i,C.depth=s,i.optional??(i.optional=[]),i.optional.push(C)}break}case 2:{const D=k.substring(L,j[1]),M=k.substring(j[4],F),B=E&&!!(D||M),H=D?B?D:D.toLowerCase():void 0,z=M?B?M:M.toLowerCase():void 0,W=dd(2,n.fullPath??n.from,B,H,z);R=W,W.parent=i,W.depth=s,i.wildcard??(i.wildcard=[]),i.wildcard.push(W)}}i=R}if(P&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const j=pi(n.fullPath??n.from);j.kind=Qw,j.parent=i,s++,j.depth=s,i.pathless??(i.pathless=[]),i.pathless.push(j),i=j}const T=(n.path||!n.children)&&!n.isRoot;if(T&&k.endsWith("/")){const j=pi(n.fullPath??n.from);j.kind=jr,j.parent=i,s++,j.depth=s,i.index=j,i=j}i.parse=((y=(g=n.options)==null?void 0:g.params)==null?void 0:y.parse)??null,i.skipOnParamError=P,i.parsingPriority=((b=(v=n.options)==null?void 0:v.skipRouteOnParseError)==null?void 0:b.priority)??0,T&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const k of n.children)mu(e,t,k,a,i,s,o)}function ud(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function vr(e){var t,n,r;if(e.pathless)for(const i of e.pathless)vr(i);if(e.static)for(const i of e.static.values())vr(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())vr(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(ud);for(const i of e.dynamic)vr(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(ud);for(const i of e.optional)vr(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(ud);for(const i of e.wildcard)vr(i)}}function pi(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function dd(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function Sj(e,t){const n=pi("/"),r=new Uint16Array(6);for(const i of e)mu(!1,r,i,1,n,0);vr(n),t.masksTree=n,t.flatCache=la(1e3)}function _j(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=Gp(e,t.masksTree);return t.flatCache.set(e,r),r}function Cj(e,t,n,r,i){e||(e="/"),r||(r="/");const s=t?`case\0${e}`:e;let o=i.singleCache.get(s);return o||(o=pi("/"),mu(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(s,o)),Gp(r,o,n)}function Pj(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||(e="/");let s;try{s=Gp(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)s=null;else throw o}return s&&(s.branch=Tj(s.route)),t.matchCache.set(r,s),s}function jj(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Ej(e,t=!1,n){const r=pi(e.fullPath),i=new Uint16Array(6),s={},o={};let a=0;return mu(t,i,e,1,r,0,l=>{if(n==null||n(l,a),l.id in s&&Xn(),s[l.id]=l,a!==0&&l.path){const c=jj(l.fullPath);(!o[c]||l.fullPath.endsWith("/"))&&(o[c]=l)}a++}),vr(r),{processedTree:{segmentTree:r,singleCache:la(1e3),matchCache:la(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function Gp(e,t,n=!1){const r=e.split("/"),i=Rj(e,r,t,n);if(!i)return null;const[s]=Xw(e,r,i);return{route:i.node.route,rawParams:s,parsedParams:i.parsedParams}}function Xw(e,t,n){var u,d,h,p,m,x,w,g,y,v;const r=Ij(n.node);let i=null;const s=Object.create(null);let o=((u=n.extract)==null?void 0:u.part)??0,a=((d=n.extract)==null?void 0:d.node)??0,l=((h=n.extract)==null?void 0:h.path)??0,c=((p=n.extract)==null?void 0:p.segment)??0;for(;a<r.length;o++,a++,l++,c++){const b=r[a];if(b.kind===jr)break;if(b.kind===Qw){c--,o--,l--;continue}const k=t[o],S=l;if(k&&(l+=k.length),b.kind===1){i??(i=n.node.fullPath.split("/"));const E=i[c],P=((m=b.prefix)==null?void 0:m.length)??0;if(E.charCodeAt(P)===123){const T=((x=b.suffix)==null?void 0:x.length)??0,j=E.substring(P+2,E.length-T-1),R=k.substring(P,k.length-T);s[j]=decodeURIComponent(R)}else{const T=E.substring(1);s[T]=decodeURIComponent(k)}}else if(b.kind===3){if(n.skipped&1<<a){o--,l=S-1;continue}i??(i=n.node.fullPath.split("/"));const E=i[c],P=((w=b.prefix)==null?void 0:w.length)??0,T=((g=b.suffix)==null?void 0:g.length)??0,j=E.substring(P+3,E.length-T-1),R=b.suffix||b.prefix?k.substring(P,k.length-T):k;R&&(s[j]=decodeURIComponent(R))}else if(b.kind===2){const E=b,P=e.substring(S+(((y=E.prefix)==null?void 0:y.length)??0),e.length-(((v=E.suffix)==null?void 0:v.length)??0)),T=decodeURIComponent(P);s["*"]=T,s._splat=T;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:o,node:a,path:l,segment:c}]}function Tj(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ij(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Rj(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!oa(t),s=i&&e!=="/",o=t.length-(i?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let l=null,c=null;for(;a.length;){const u=a.pop(),{node:d,index:h,skipped:p,depth:m,statics:x,dynamics:w,optionals:g}=u;let{extract:y,rawParams:v,parsedParams:b}=u;if(d.kind===2&&d.route&&!tl(c,u))continue;if(d.skipOnParamError){if(!ky(e,t,u))continue;v=u.rawParams,y=u.extract,b=u.parsedParams}r&&d.route&&d.kind!==jr&&tl(l,u)&&(l=u);const k=h===o;if(k&&(d.route&&(!s||d.kind===jr||d.kind===2)&&tl(c,u)&&(c=u),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const S=k?void 0:t[h];let E;if(k&&d.index){const P={node:d.index,index:h,skipped:p,depth:m+1,statics:x,dynamics:w,optionals:g,extract:y,rawParams:v,parsedParams:b};let T=!0;if(d.index.skipOnParamError&&(ky(e,t,P)||(T=!1)),T){if(!w&&!g&&!p&&Mj(x,o))return P;tl(c,P)&&(c=P)}}if(d.wildcard)for(let P=d.wildcard.length-1;P>=0;P--){const T=d.wildcard[P],{prefix:j,suffix:R}=T;if(!(j&&(k||!(T.caseSensitive?S:E??(E=S.toLowerCase())).startsWith(j)))){if(R){if(k)continue;const L=t.slice(h).join("/").slice(-R.length);if((T.caseSensitive?L:L.toLowerCase())!==R)continue}a.push({node:T,index:o,skipped:p,depth:m+1,statics:x,dynamics:w,optionals:g,extract:y,rawParams:v,parsedParams:b})}}if(d.optional){const P=p|1<<m,T=m+1;for(let j=d.optional.length-1;j>=0;j--){const R=d.optional[j];a.push({node:R,index:h,skipped:P,depth:T,statics:x,dynamics:w,optionals:g,extract:y,rawParams:v,parsedParams:b})}if(!k)for(let j=d.optional.length-1;j>=0;j--){const R=d.optional[j],{prefix:L,suffix:F}=R;if(L||F){const D=R.caseSensitive?S:E??(E=S.toLowerCase());if(L&&!D.startsWith(L)||F&&!D.endsWith(F))continue}a.push({node:R,index:h+1,skipped:p,depth:T,statics:x,dynamics:w,optionals:g+el(o,h),extract:y,rawParams:v,parsedParams:b})}}if(!k&&d.dynamic&&S)for(let P=d.dynamic.length-1;P>=0;P--){const T=d.dynamic[P],{prefix:j,suffix:R}=T;if(j||R){const L=T.caseSensitive?S:E??(E=S.toLowerCase());if(j&&!L.startsWith(j)||R&&!L.endsWith(R))continue}a.push({node:T,index:h+1,skipped:p,depth:m+1,statics:x,dynamics:w+el(o,h),optionals:g,extract:y,rawParams:v,parsedParams:b})}if(!k&&d.staticInsensitive){const P=d.staticInsensitive.get(E??(E=S.toLowerCase()));P&&a.push({node:P,index:h+1,skipped:p,depth:m+1,statics:x+el(o,h),dynamics:w,optionals:g,extract:y,rawParams:v,parsedParams:b})}if(!k&&d.static){const P=d.static.get(S);P&&a.push({node:P,index:h+1,skipped:p,depth:m+1,statics:x+el(o,h),dynamics:w,optionals:g,extract:y,rawParams:v,parsedParams:b})}if(d.pathless){const P=m+1;for(let T=d.pathless.length-1;T>=0;T--){const j=d.pathless[T];a.push({node:j,index:h,skipped:p,depth:P,statics:x,dynamics:w,optionals:g,extract:y,rawParams:v,parsedParams:b})}}}if(c)return c;if(r&&l){let u=l.index;for(let h=0;h<l.index;h++)u+=t[h].length;const d=u===e.length?"/":e.slice(u);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(d),l}return null}function el(e,t){return 2**(e-t-1)}function Mj(e,t){return e===2**(t-1)-1}function ky(e,t,n){try{const[r,i]=Xw(e,t,n);n.rawParams=r,n.extract=i;const s=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,s),!0}catch{return null}}function tl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===jr)>(e.node.kind===jr)||t.node.kind===jr==(e.node.kind===jr)&&t.depth>e.depth))):!0}function Nl(e){return Kp(e.filter(t=>t!==void 0).join("/"))}function Kp(e){return e.replace(/\/{2,}/g,"/")}function Jw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Or(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Zw(e){return Or(Jw(e))}function Pc(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Lj(e,t,n){return Pc(e,n)===Pc(t,n)}function Aj({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),s=!i&&t===".";let o;if(r){o=i?t:s?e:e+"\0"+t;const d=r.get(o);if(d)return d}let a;if(s)a=e.split("/");else if(i)a=t.split("/");else{for(a=e.split("/");a.length>1&&oa(a)==="";)a.pop();const d=t.split("/");for(let h=0,p=d.length;h<p;h++){const m=d[h];m===""?h?h===p-1&&a.push(m):a=[m]:m===".."?a.pop():m==="."||a.push(m)}}a.length>1&&(oa(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,c="";for(let d=0;d<a.length;d++){d>0&&(c+="/");const h=a[d];if(!h)continue;l=Hp(h,0,l);const p=l[0];if(p===0){c+=h;continue}const m=l[5],x=h.substring(0,l[1]),w=h.substring(l[4],m),g=h.substring(l[2],l[3]);p===1?c+=x||w?`${x}{$${g}}${w}`:`$${g}`:p===2?c+=x||w?`${x}{$}${w}`:"$":c+=`${x}{-$${g}}${w}`}c=Kp(c);const u=c||"/";return o&&r&&r.set(o,u),u}function Dj(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,s=>t.get(s)??s)}function fd(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>_y(i,n)).join("/"):_y(r,n)}function Sy({path:e,params:t,decoder:n,...r}){let i=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const o=e.length;let a=0,l,c="";for(;a<o;){const u=a;l=Hp(e,u,l);const d=l[5];if(a=d+1,u===d)continue;const h=l[0];if(h===0){c+="/"+e.substring(u,d);continue}if(h===2){const p=t._splat;s._splat=p,s["*"]=p;const m=e.substring(u,l[1]),x=e.substring(l[4],d);if(!p){i=!0,(m||x)&&(c+="/"+m+x);continue}const w=fd("_splat",t,n);c+="/"+m+w+x;continue}if(h===1){const p=e.substring(l[2],l[3]);!i&&!(p in t)&&(i=!0),s[p]=t[p];const m=e.substring(u,l[1]),x=e.substring(l[4],d),w=fd(p,t,n)??"undefined";c+="/"+m+w+x;continue}if(h===3){const p=e.substring(l[2],l[3]),m=t[p];if(m==null)continue;s[p]=m;const x=e.substring(u,l[1]),w=e.substring(l[4],d),g=fd(p,t,n)??"";c+="/"+x+g+w;continue}}return e.endsWith("/")&&(c+="/"),{usedParams:s,interpolatedPath:c||"/",isMissingParams:i}}function _y(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function st(e){return(e==null?void 0:e.isNotFound)===!0}function Nj(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const zj="tsr-scroll-restoration-v1_3";function Oj(){const e=Nj();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");js(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=Cr(r,t)||t},persist:()=>{try{e.setItem(zj,JSON.stringify(t))}catch{}}}}const Cy=Oj(),Fj=e=>e.state.__TSR_key||e.href;function Bj(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let nl=!1;const oo="window",Py="data-scroll-restoration-id";function $j(e,t){if(!Cy)return;const n=Cy;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,nl=!1;const r=e.options.getScrollRestorationKey||Fj,i=new Map;window.history.scrollRestoration="manual";const s=a=>{if(!(nl||!e.isScrollRestoring))if(a.target===document||a.target===window)i.set(oo,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const l=a.target;i.set(l,{scrollX:l.scrollLeft||0,scrollY:l.scrollTop||0})}},o=a=>{var c;if(!e.isScrollRestoring||!a||i.size===0||!n)return;const l=(c=n.state)[a]||(c[a]={});for(const[u,d]of i){let h;if(u===oo)h=oo;else if(u.isConnected){const p=u.getAttribute(Py);h=p?`[${Py}="${p}"]`:Bj(u)}h&&(l[h]=d)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",a=>{o(a.fromLocation?r(a.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",a=>{var d;const l=r(a.toLocation),c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){nl=!0;try{const h=e.isScrollRestoring?n.state[l]:void 0;let p=!1;if(h)for(const m in h){const x=h[m];if(!js(x))continue;const{scrollX:w,scrollY:g}=x;if(!(!Number.isFinite(w)||!Number.isFinite(g))){if(m===oo)window.scrollTo({top:g,left:w,behavior:c}),p=!0;else if(m){let y;try{y=document.querySelector(m)}catch{continue}y&&(y.scrollLeft=w,y.scrollTop=g,p=!0)}}}if(!p){const m=e.history.location.hash.slice(1);if(m){const x=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(x){const w=document.getElementById(m);w&&w.scrollIntoView(x)}}else{const x={top:0,left:0,behavior:c};if(window.scrollTo(x),u)for(const w of u){if(w===oo)continue;const g=typeof w=="function"?w():document.querySelector(w);g&&g.scrollTo(x)}}}}finally{nl=!1}e.isScrollRestoring&&n.set(h=>(h[l]||(h[l]={}),h))}})}function Vj(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function hd(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Wj(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,i]of t.entries()){const s=n[r];s==null?n[r]=hd(i):Array.isArray(s)?s.push(hd(i)):n[r]=[s,hd(i)]}return n}const Uj=Gj(JSON.parse),Hj=Kj(JSON.stringify,JSON.parse);function Gj(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Wj(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function Kj(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const s=Vj(i,r);return s?`?${s}`:""}}const wi="__root__";function Yj(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function vt(e){return e instanceof Response&&!!e.options}function qj(e){return{input:({url:t})=>{for(const n of e)t=rh(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=eb(e[n],t);return t}}}function Qj(e){const t=Zw(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:o})=>{const a=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===i?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=Nl(["/",t,o.pathname]),o)}}function rh(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function eb(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Xj(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:s}=t,o=new Map,a=new Map,l=new Map,c=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),h=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),x=n(e.statusCode),w=n(e.redirect),g=n([]),y=n([]),v=n([]),b=r(()=>pd(o,g.get())),k=r(()=>pd(a,y.get())),S=r(()=>pd(l,v.get())),E=r(()=>g.get()[0]),P=r(()=>g.get().some(H=>{var z;return((z=o.get(H))==null?void 0:z.get().status)==="pending"})),T=r(()=>{var H;return{locationHref:p.get().href,resolvedLocationHref:(H=m.get())==null?void 0:H.href,status:c.get()}}),j=r(()=>({status:c.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:h.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:x.get(),redirect:w.get()})),R=la(64);function L(H){let z=R.get(H);return z||(z=r(()=>{const W=g.get();for(const C of W){const $=o.get(C);if($&&$.routeId===H)return $.get()}}),R.set(H,z)),z}const F={status:c,loadedAt:u,isLoading:d,isTransitioning:h,location:p,resolvedLocation:m,statusCode:x,redirect:w,matchesId:g,pendingIds:y,cachedIds:v,matches:b,pendingMatches:k,cachedMatches:S,firstId:E,hasPending:P,matchRouteDeps:T,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:j,getRouteMatchStore:L,setMatches:D,setPending:M,setCached:B};D(e.matches),s==null||s(F);function D(H){md(H,o,g,n,i)}function M(H){md(H,a,y,n,i)}function B(H){md(H,l,v,n,i)}return F}function pd(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function md(e,t,n,r,i){const s=e.map(a=>a.id),o=new Set(s);i(()=>{for(const a of t.keys())o.has(a)||t.delete(a);for(const a of e){const l=t.get(a.id);if(!l){const c=r(a);c.routeId=a.routeId,t.set(a.id,c);continue}l.routeId=a.routeId,l.get()!==a&&l.set(a)}bj(n.get(),s)||n.set(s)})}const ih=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Jj=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),gu=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),bi=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let s=0;s<=i;s++){const o=e.matches[s];if(!o)continue;const a=e.router.getMatch(o.id);a&&Object.assign(r,a.__routeContext,a.__beforeLoadContext)}return r},jy=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),i=r>=0?r:0;let s=n?e.matches.findIndex(o=>o.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=i);for(let o=s;o>=0;o--){const a=e.matches[o];if(e.router.looseRoutesById[a.routeId].options.notFoundComponent)return o}return n?s:i},Er=(e,t,n)=>{var r,i,s;if(!(!vt(n)&&!st(n)))throw vt(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:vt(n)?"redirected":st(n)?"notFound":o.status==="pending"?"success":o.status,context:bi(e,t.index),isFetching:!1,error:n})),st(n)&&!n.routeId&&(n.routeId=t.routeId),(s=t._nonReactive.loadPromise)==null||s.resolve()),vt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},tb=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Ey=(e,t,n)=>{const r=bi(e,n);e.updateMatch(t,i=>({...i,context:r}))},ao=(e,t,n,r)=>{var a,l;const{id:i,routeId:s}=e.matches[t],o=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Er(e,e.router.getMatch(i),n);try{(l=(a=o.options).onError)==null||l.call(a,n)}catch(c){n=c,Er(e,e.router.getMatch(i),n)}e.updateMatch(i,c=>{var u,d;return(u=c._nonReactive.beforeLoadPromise)==null||u.resolve(),c._nonReactive.beforeLoadPromise=void 0,(d=c._nonReactive.loadPromise)==null||d.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!vt(n)&&!st(n)&&(e.serialError??(e.serialError=n))},nb=(e,t,n,r)=>{var s;if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!gu(e,t)&&(n.options.loader||n.options.beforeLoad||ib(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((s=e.router.options)==null?void 0:s.defaultPendingComponent))){const o=setTimeout(()=>{ih(e)},i);r._nonReactive.pendingTimeout=o}},Zj=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;nb(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Er(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},eE=(e,t,n,r)=>{const i=e.router.getMatch(t);let s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Es(()=>{s==null||s.resolve(),s=void 0});const{paramsError:o,searchError:a}=i;o&&ao(e,n,o,"PARSE_PARAMS"),a&&ao(e,n,a,"VALIDATE_SEARCH"),nb(e,t,r,i);const l=new AbortController;let c=!1;const u=()=>{c||(c=!0,e.updateMatch(t,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:l})))},d=()=>{var b;(b=i._nonReactive.beforeLoadPromise)==null||b.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=Es();const h={...bi(e,n,!1),...i.__routeContext},{search:p,params:m,cause:x}=i,w=gu(e,t),g={search:p,abortController:l,params:m,preload:w,context:h,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:w?"preload":x,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},y=b=>{if(b===void 0){e.router.batch(()=>{u(),d()});return}(vt(b)||st(b))&&(u(),ao(e,n,b,"BEFORE_LOAD")),e.router.batch(()=>{u(),e.updateMatch(t,k=>({...k,__beforeLoadContext:b})),d()})};let v;try{if(v=r.options.beforeLoad(g),aa(v))return u(),v.catch(b=>{ao(e,n,b,"BEFORE_LOAD")}).then(y)}catch(b){u(),ao(e,n,b,"BEFORE_LOAD")}y(v)},tE=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>a(),o=()=>eE(e,n,t,i),a=()=>{if(tb(e,n))return;const l=Zj(e,n,i);return aa(l)?l.then(o):o()};return s()},nE=(e,t,n)=>{var s,o,a,l,c,u;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(o=(s=n.options).head)==null?void 0:o.call(s,i),(l=(a=n.options).scripts)==null?void 0:l.call(a,i),(u=(c=n.options).headers)==null?void 0:u.call(c,i)]).then(([d,h,p])=>({meta:d==null?void 0:d.meta,links:d==null?void 0:d.links,headScripts:d==null?void 0:d.scripts,headers:p,scripts:h,styles:d==null?void 0:d.styles}))},rb=(e,t,n,r,i)=>{const s=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:c}=e.router.getMatch(n),u=bi(e,r),d=gu(e,n);return{params:o,deps:a,preload:!!d,parentMatchPromise:s,abortController:l,context:u,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:d?"preload":c,route:i,...e.router.options.additionalContext}},Ty=async(e,t,n,r,i)=>{var s,o,a,l,c;try{const u=e.router.getMatch(n);try{(!(qw??e.router.isServer)||u.ssr===!0)&&ca(i);const d=i.options.loader,h=typeof d=="function"?d:d==null?void 0:d.handler,p=h==null?void 0:h(rb(e,t,n,r,i)),m=!!h&&aa(p);if((m||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(n,w=>({...w,isFetching:"loader"})),h){const w=m?await p:p;Er(e,e.router.getMatch(n),w),w!==void 0&&e.updateMatch(n,g=>({...g,loaderData:w}))}i._lazyPromise&&await i._lazyPromise;const x=u._nonReactive.minPendingPromise;x&&await x,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,w=>({...w,error:void 0,context:bi(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let h=d;if((h==null?void 0:h.name)==="AbortError"){if(u.abortController.signal.aborted){(s=u._nonReactive.loaderPromise)==null||s.resolve(),u._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:bi(e,r)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,st(d)&&await((a=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:a.call(o)),Er(e,e.router.getMatch(n),d);try{(c=(l=i.options).onError)==null||c.call(l,d)}catch(m){h=m,Er(e,e.router.getMatch(n),m)}!vt(h)&&!st(h)&&await ca(i,["errorComponent"]),e.updateMatch(n,m=>({...m,error:h,context:bi(e,r),status:"error",isFetching:!1}))}}catch(u){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),Er(e,d,u)}},rE=async(e,t,n)=>{var p,m,x,w;async function r(g,y,v,b,k){const S=Date.now()-y.updatedAt,E=g?k.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:k.options.staleTime??e.router.options.defaultStaleTime??0,P=k.options.shouldReload,T=typeof P=="function"?P(rb(e,t,i,n,k)):P,{status:j,invalid:R}=b,L=S>=E&&(!!e.forceStaleReload||b.cause==="enter"||v!==void 0&&v!==b.id);o=j==="success"&&(R||(T??L)),g&&k.options.preload===!1||(o&&!e.sync&&u?(a=!0,(async()=>{var F,D;try{await Ty(e,t,i,n,k);const M=e.router.getMatch(i);(F=M._nonReactive.loaderPromise)==null||F.resolve(),(D=M._nonReactive.loadPromise)==null||D.resolve(),M._nonReactive.loaderPromise=void 0,M._nonReactive.loadPromise=void 0}catch(M){vt(M)&&await e.router.navigate(M.options)}})()):j!=="success"||o?await Ty(e,t,i,n,k):Ey(e,i,n))}const{id:i,routeId:s}=e.matches[n];let o=!1,a=!1;const l=e.router.looseRoutesById[s],c=l.options.loader,u=((typeof c=="function"||c==null?void 0:c.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(tb(e,i)){if(!e.router.getMatch(i))return e.matches[n];Ey(e,i,n)}else{const g=e.router.getMatch(i),y=e.router.stores.matchesId.get()[n],v=((p=y&&e.router.stores.matchStores.get(y)||null)==null?void 0:p.routeId)===s?y:(m=e.router.stores.matches.get().find(k=>k.routeId===s))==null?void 0:m.id,b=gu(e,i);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload&&u)return g;await g._nonReactive.loaderPromise;const k=e.router.getMatch(i),S=k._nonReactive.error||k.error;S&&Er(e,k,S),k.status==="pending"&&await r(b,g,v,k,l)}else{const k=b&&!e.router.stores.matchStores.has(i),S=e.router.getMatch(i);S._nonReactive.loaderPromise=Es(),k!==S.preload&&e.updateMatch(i,E=>({...E,preload:k})),await r(b,g,v,S,l)}}const d=e.router.getMatch(i);a||((x=d._nonReactive.loaderPromise)==null||x.resolve(),(w=d._nonReactive.loadPromise)==null||w.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,a||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;const h=a?d.isFetching:!1;return h!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,g=>({...g,isFetching:h,invalid:!1})),e.router.getMatch(i)):d};async function Iy(e){var h,p;const t=e,n=[];Jj(t.router)&&ih(t);let r;for(let m=0;m<t.matches.length;m++){try{const x=tE(t,m);aa(x)&&await x}catch(x){if(vt(x))throw x;if(st(x))r=x;else if(!t.preload)throw x;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?jy(t,r):void 0,o=r&&t.preload?0:s!==void 0?Math.min(s+1,i):i;let a,l;for(let m=0;m<o;m++)n.push(rE(t,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const x of m){if(x.status!=="rejected")continue;const w=x.reason;if(vt(w))throw w;st(w)?a??(a=w):l??(l=w)}if(l!==void 0)throw l}const c=a??(r&&!t.preload?r:void 0);let u=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!c&&r&&t.preload)return t.matches;if(c){const m=jy(t,c);m===void 0&&Xn();const x=t.matches[m],w=t.router.looseRoutesById[x.routeId],g=(h=t.router.options)==null?void 0:h.defaultNotFoundComponent;!w.options.notFoundComponent&&g&&(w.options.notFoundComponent=g),c.routeId=x.routeId;const y=x.routeId===t.router.routeTree.id;t.updateMatch(x.id,v=>({...v,...y?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:c},isFetching:!1})),u=m,await ca(w,["notFoundComponent"])}else if(!t.preload){const m=t.matches[0];m.globalNotFound||(p=t.router.getMatch(m.id))!=null&&p.globalNotFound&&t.updateMatch(m.id,x=>({...x,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const m=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await ca(m,["errorComponent"])}for(let m=0;m<=u;m++){const{id:x,routeId:w}=t.matches[m],g=t.router.looseRoutesById[w];try{const y=nE(t,x,g);if(y){const v=await y;t.updateMatch(x,b=>({...b,...v}))}}catch(y){console.error(`Error executing head for route ${w}:`,y)}}const d=ih(t);if(aa(d)&&await d,c)throw c;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ry(e,t){const n=t.map(r=>{var i,s;return(s=(i=e.options[r])==null?void 0:i.preload)==null?void 0:s.call(i)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function ca(e,t=zl){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:i,...s}=r.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===zl?(()=>{if(e._componentsPromise===void 0){const r=Ry(e,zl);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ry(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function ib(e){var t;for(const n of zl)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const zl=["component","errorComponent","pendingComponent","notFoundComponent"];var Fr="__TSR_index",My="popstate",Ly="beforeunload";function iE(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},s=async({task:o,navigateOpts:a,...l})=>{var d,h;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const c=((d=e.getBlockers)==null?void 0:d.call(e))??[],u=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&c.length&&u)for(const p of c){const m=jc(l.path,l.state);if(await p.blockerFn({currentLocation:t,nextLocation:m,action:l.type})){(h=e.onBlocked)==null||h.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,a,l)=>{const c=t.state[Fr];a=Ay(c+1,a),s({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const c=t.state[Fr];a=Ay(c,a),s({task:()=>{e.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:o,state:a})},go:(o,a)=>{s({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{s({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[Fr]!==0,createHref:o=>e.createHref(o),block:o=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,o]),()=>{var u,d;const c=((u=e.getBlockers)==null?void 0:u.call(e))??[];(d=e.setBlockers)==null||d.call(e,c.filter(h=>h!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:r}}function Ay(e,t){t||(t={});const n=Yp();return{...t,key:n,__TSR_key:n,[Fr]:e}}function sE(e){var P,T;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,o=j=>i=j,a=j=>j,l=()=>jc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((P=t.history.state)!=null&&P.__TSR_key)&&!((T=t.history.state)!=null&&T.key)){const j=Yp();t.history.replaceState({[Fr]:0,key:j,__TSR_key:j},"")}let c=l(),u,d=!1,h=!1,p=!1,m=!1;const x=()=>c;let w,g;const y=()=>{w&&(E._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),E._ignoreSubscribers=!1,w=void 0,g=void 0,u=void 0)},v=(j,R,L)=>{const F=a(R);g||(u=c),c=jc(R,L),w={href:F,state:L,isPush:(w==null?void 0:w.isPush)||j==="push"},g||(g=Promise.resolve().then(()=>y()))},b=j=>{c=l(),E.notify({type:j})},k=async()=>{if(h){h=!1;return}const j=l(),R=j.state[Fr]-c.state[Fr],L=R===1,F=R===-1,D=!L&&!F||d;d=!1;const M=D?"GO":F?"BACK":"FORWARD",B=D?{type:"GO",index:R}:{type:F?"BACK":"FORWARD"};if(p)p=!1;else{const H=s();if(typeof document<"u"&&H.length){for(const z of H)if(await z.blockerFn({currentLocation:c,nextLocation:j,action:M})){h=!0,t.history.go(1),E.notify(B);return}}}c=l(),E.notify(B)},S=j=>{if(m){m=!1;return}let R=!1;const L=s();if(typeof document<"u"&&L.length)for(const F of L){const D=F.enableBeforeUnload??!0;if(D===!0){R=!0;break}if(typeof D=="function"&&D()===!0){R=!0;break}}if(R)return j.preventDefault(),j.returnValue=""},E=iE({getLocation:x,getLength:()=>t.history.length,pushState:(j,R)=>v("push",j,R),replaceState:(j,R)=>v("replace",j,R),back:j=>(j&&(p=!0),m=!0,t.history.back()),forward:j=>{j&&(p=!0),m=!0,t.history.forward()},go:j=>{d=!0,t.history.go(j)},createHref:j=>a(j),flush:y,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ly,S,{capture:!0}),t.removeEventListener(My,k)},onBlocked:()=>{u&&c!==u&&(c=u)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Ly,S,{capture:!0}),t.addEventListener(My,k),t.history.pushState=function(...j){const R=n.apply(t.history,j);return E._ignoreSubscribers||b("PUSH"),R},t.history.replaceState=function(...j){const R=r.apply(t.history,j);return E._ignoreSubscribers||b("REPLACE"),R},E}function oE(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function jc(e,t){const n=oE(e),r=n.indexOf("#"),i=n.indexOf("?"),s=Yp();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[Fr]:0,key:s,__TSR_key:s}}}function Yp(){return(Math.random()+1).toString(36).substring(7)}function gs(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var aE=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var u;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",s=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Dj(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=sE()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let d;this.resolvePathCache=la(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=Xj(cE(this.latestLocation),d),$j(this)}let a=!1;const l=this.options.basepath??"/",c=this.options.rewrite;if(s||i!==l||o!==c){this.basepath=l;const d=[],h=Zw(l);h&&h!=="/"&&d.push(Qj({basepath:l})),c&&d.push(c),this.rewrite=d.length===0?void 0:d.length===1?d[0]:qj(d),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((u=window.CSS)==null?void 0:u.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Ej(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&Sj(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:l,search:c,hash:u,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const g=this.options.parseSearch(c),y=this.options.stringifySearch(g);return{href:l+y+u,publicHref:l+y+u,pathname:so(l).path,external:!1,searchStr:y,search:ei(r==null?void 0:r.search,g),hash:so(u.slice(1)).path,state:Pr(r==null?void 0:r.state,h)}}const p=new URL(d,this.origin),m=rh(this.rewrite,p),x=this.options.parseSearch(m.search),w=this.options.stringifySearch(x);return m.search=w,{href:m.href.replace(m.origin,""),publicHref:d,pathname:so(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:w,search:ei(r==null?void 0:r.search,x),hash:so(m.hash.slice(1)).path,state:Pr(r==null?void 0:r.state,h)}},s=i(n),{__tempLocation:o,__tempKey:a}=s.state;if(o&&(!a||a===this.tempLocationKey)){const l=i(o);return l.state.key=s.state.key,l.state.__TSR_key=s.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>Aj({base:n,to:Kp(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>uE({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{var j,R;const o=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutesLightweight(o);s.from;const l=s.unsafeRelative==="path"?o.pathname:s.from??a.fullPath,c=this.resolvePathWithBase(l,"."),u=a.search,d=Object.assign(Object.create(null),a.params),h=s.to?this.resolvePathWithBase(c,`${s.to}`):this.resolvePathWithBase(c,"."),p=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?d:Object.assign(d,Cr(s.params,d)),m=this.getMatchedRoutes(h);let x=m.matchedRoutes;if((!m.foundRoute||m.foundRoute.path!=="/"&&m.routeParams["**"])&&this.options.notFoundRoute&&(x=[...x,this.options.notFoundRoute]),Object.keys(p).length>0)for(const L of x){const F=((j=L.options.params)==null?void 0:j.stringify)??L.options.stringifyParams;if(F)try{Object.assign(p,F(p))}catch{}}const w=n.leaveParams?h:so(Sy({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let g=u;if(n._includeValidateSearch&&((R=this.options.search)!=null&&R.strict)){const L={};x.forEach(F=>{if(F.options.validateSearch)try{Object.assign(L,Ol(F.options.validateSearch,{...L,...g}))}catch{}}),g=L}g=dE({search:g,dest:s,destRoutes:x,_includeValidateSearch:n._includeValidateSearch}),g=ei(u,g);const y=this.options.stringifySearch(g),v=s.hash===!0?o.hash:s.hash?Cr(s.hash,o.hash):void 0,b=v?`#${v}`:"";let k=s.state===!0?o.state:s.state?Cr(s.state,o.state):{};k=Pr(o.state,k);const S=`${w}${y}${b}`;let E,P,T=!1;if(this.rewrite){const L=new URL(S,this.origin),F=eb(this.rewrite,L);E=L.href.replace(L.origin,""),F.origin!==this.origin?(P=F.href,T=!0):P=F.pathname+F.search+F.hash}else E=wj(S),P=E;return{publicHref:P,href:E,pathname:w,search:g,searchStr:y,state:k,hash:v??"",external:T,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{const a=r(s);let l=o?r(o):void 0;if(!l){const c=Object.create(null);if(this.options.routeMasks){const u=_j(a.pathname,this.processedTree);if(u){Object.assign(c,u.rawParams);const{from:d,params:h,...p}=u.route,m=h===!1||h===null?Object.create(null):(h??!0)===!0?c:Object.assign(c,Cr(h,c));o={from:n.from,...p,params:m},l=r(o)}}}return l&&(a.maskedLocation=l),a};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const s=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(u=>{i.state[u]=this.latestLocation.state[u]});const c=vi(i.state,this.latestLocation.state);return l.forEach(u=>{delete i.state[u]}),c},o=Or(this.latestLocation.href)===Or(i.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=Es(()=>{a==null||a.resolve(),a=void 0}),o&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:c,...u}=i;l&&(u={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),u.state.__hashScrollIntoViewOptions=c??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](u.publicHref,u.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:o,href:a,...l}={})=>{if(a){const d=this.history.location.state.__TSR_index,h=jc(a,{__TSR_index:n?d:d+1}),p=new URL(h.pathname,this.origin);l.to=rh(this.rewrite,p).pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const c=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=c;const u=this.commitLocation({...c,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===c&&(this.pendingBuiltLocation=void 0)}),u},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:s,...o})=>{var l,c;let a=!1;if(i)try{new URL(`${i}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(n!==void 0||!i){const d=this.buildLocation({to:n,...o});i=i??d.publicHref,s=s??d.publicHref}const u=!a&&s?s:i;if(Cc(u,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const d=((c=(l=this.history).getBlockers)==null?void 0:c.call(l))??[];for(const h of d)if(h!=null&&h.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(s=>s.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,s;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(l=>{this.startTransition(async()=>{var c;try{this.beforeLoad();const u=this.latestLocation,d=gs(u,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...d}),this.emit({type:"onBeforeLoad",...d}),await Iy({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===u.href,matches:this.stores.pendingMatches.get(),location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var w,g;let h=null,p=null,m=null,x=null;this.batch(()=>{const y=this.stores.pendingMatches.get(),v=y.length,b=this.stores.matches.get();h=v?b.filter(E=>!this.stores.pendingMatchStores.has(E.id)):null;const k=new Set;for(const E of this.stores.pendingMatchStores.values())E.routeId&&k.add(E.routeId);const S=new Set;for(const E of this.stores.matchStores.values())E.routeId&&S.add(E.routeId);p=v?b.filter(E=>!k.has(E.routeId)):null,m=v?y.filter(E=>!S.has(E.routeId)):null,x=v?y.filter(E=>S.has(E.routeId)):b,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(y),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(E=>E.status!=="error"&&E.status!=="notFound"&&E.status!=="redirected")]),this.clearExpiredCache())});for(const[y,v]of[[p,"onLeave"],[m,"onEnter"],[x,"onStay"]])if(y)for(const b of y)(g=(w=this.looseRoutesById[b.routeId].options)[v])==null||g.call(w,b)})})}})}catch(u){vt(u)?(r=u,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):st(u)&&(i=u);const d=r?r.status:i?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(d),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&((c=this.commitLocationPromise)==null||c.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),l()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.matches.get().some(l=>l.status==="error")&&(a=500),a!==void 0&&this.stores.statusCode.set(a)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,o=this.stores.resolvedLocation.get(),a=typeof r.types=="function"?r.types(gs(s,o)):r.types;if(a===!1){n();return}i={update:n,types:a}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const a=r(o.get());a.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(l=>l.filter(c=>c!==n)):o.set(a)}})},this.getMatch=n=>{var r,i,s;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((s=this.stores.matchStores.get(n))==null?void 0:s.get())},this.invalidate=n=>{const r=i=>{var s;return((s=n==null?void 0:n.filter)==null?void 0:s.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(i);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const s=i.pathname+i.search+i.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Cc(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=i=>{const s=this.looseRoutesById[i.routeId];if(!s.options.loader)return!0;const o=(i.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=o};this.clearCache({filter:r})},this.loadRouteChunk=ca,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...s,...this.stores.cachedIds.get()]),a=i.filter(l=>!o.has(l.id));if(a.length){const l=this.stores.cachedMatches.get();this.stores.setCached([...l,...a])}try{return i=await Iy({router:this,matches:i,location:r,preload:!0,updateMatch:(l,c)=>{s.has(l)?i=i.map(u=>u.id===l?c(u):u):this.updateMatch(l,c)}}),i}catch(l){if(vt(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});st(l)||console.error(l);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(i);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const o=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=Cj(s.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!vi(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?vi(o.search,s.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Hj,parseSearch:e.parseSearch??Uj,protocolAllowlist:e.protocolAllowlist??vj}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var d,h;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:s}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&i["**"]:Or(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const l=a?hE(this.options.notFoundMode,o):void 0,c=new Array(o.length),u=new Map;for(const p of this.stores.matchStores.values())p.routeId&&u.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const m=o[p],x=c[p-1];let w,g,y;{const M=(x==null?void 0:x.search)??e.search,B=(x==null?void 0:x._strictSearch)??void 0;try{const H=Ol(m.options.validateSearch,{...M})??void 0;w={...M,...H},g={...B,...H},y=void 0}catch(H){let z=H;if(H instanceof Ec||(z=new Ec(H.message,{cause:H})),t!=null&&t.throwOnError)throw z;w=M,g={},y=z}}const v=((h=(d=m.options).loaderDeps)==null?void 0:h.call(d,{search:w}))??"",b=v?JSON.stringify(v):"",{interpolatedPath:k,usedParams:S}=Sy({path:m.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),E=m.id+k+b,P=this.getMatch(E),T=u.get(m.id),j=(P==null?void 0:P._strictParams)??S;let R;if(!P)try{Dy(m,S,s,j)}catch(M){if(st(M)||vt(M)?R=M:R=new lE(M.message,{cause:M}),t!=null&&t.throwOnError)throw R}Object.assign(i,j);const L=T?"stay":"enter";let F;if(P)F={...P,cause:L,params:(T==null?void 0:T.params)??i,_strictParams:j,search:ei(T?T.search:P.search,w),_strictSearch:g};else{const M=m.options.loader||m.options.beforeLoad||m.lazyFn||ib(m)?"pending":"success";F={id:E,ssr:m.options.ssr,index:p,routeId:m.id,params:(T==null?void 0:T.params)??i,_strictParams:j,pathname:k,updatedAt:Date.now(),search:T?ei(T.search,w):w,_strictSearch:g,searchError:void 0,status:M,isFetching:!1,error:void 0,paramsError:R,__routeContext:void 0,_nonReactive:{loadPromise:Es()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:T?Pr(T.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t!=null&&t.preload||(F.globalNotFound=l===m.id),F.searchError=y;const D=this.getParentContext(x);F.context={...D,...F.__routeContext,...F.__beforeLoadContext},c[p]=F}for(let p=0;p<c.length;p++){const m=c[p],x=this.looseRoutesById[m.routeId],w=this.getMatch(m.id),g=u.get(m.routeId);if(m.params=g?ei(g.params,i):i,!w){const y=c[p-1],v=this.getParentContext(y);if(x.options.context){const b={deps:m.loaderDeps,params:m.params,context:v??{},location:e,navigate:k=>this.navigate({...k,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:c,routeId:x.id};m.__routeContext=x.options.context(b)??void 0}m.context={...v,...m.__routeContext,...m.__beforeLoadContext}}}return c}matchRoutesLightweight(e){var u;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=oa(t),s={...e.search};for(const d of t)try{Object.assign(s,Ol(d.options.validateSearch,s))}catch{}const o=oa(this.stores.matchesId.get()),a=o&&((u=this.stores.matchStores.get(o))==null?void 0:u.get()),l=a&&a.routeId===i.id&&a.pathname===e.pathname;let c;if(l)c=a.params;else{const d=Object.assign(Object.create(null),n);for(const h of t)try{Dy(h,n,r??{},d)}catch{}c=d}return{matchedRoutes:t,fullPath:i.fullPath,search:s,params:c}}},Ec=class extends Error{},lE=class extends Error{};function cE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ol(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Ec("Async validation not supported");if(n.issues)throw new Ec(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function uE({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Or(e);let s,o;const a=Pj(i,n,!0);return a&&(s=a.route,Object.assign(r,a.rawParams),o=Object.assign(Object.create(null),a.parsedParams)),{matchedRoutes:(a==null?void 0:a.branch)||[t.__root__],routeParams:r,foundRoute:s,parsedParams:o}}function dE({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return fE(n)(e,t,r??!1)}function fE(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)(i=s.options.search)!=null&&i.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const o=({search:a,next:l})=>{let c=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(c=s.options.preSearchFilters.reduce((d,h)=>h(d),a));const u=l(c);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((d,h)=>h(d),u):u};t.middlewares.push(o)}if(s.options.validateSearch){const o=({search:a,next:l})=>{const c=l(a);if(!t._includeValidateSearch)return c;try{return{...c,...Ol(s.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(o)}}const n=({search:s})=>{const o=t.dest;return o.search?o.search===!0?s:Cr(o.search,s):{}};t.middlewares.push(n);const r=(s,o,a)=>{if(s>=a.length)return o;const l=a[s];return l({search:o,next:u=>r(s+1,u,a)})};return function(o,a,l){return t.dest=a,t._includeValidateSearch=l,r(0,o,t.middlewares)}}function hE(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return wi}function Dy(e,t,n,r){var s;const i=((s=e.options.params)==null?void 0:s.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const o in t)o in n&&(r[o]=n[o]);else{const o=i(r);Object.assign(r,o)}}const pE="Error preloading route! ☝️";var sb=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var l,c;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(c=(l=this.options).getParentRoute)==null?void 0:c.call(l),r?this._path=wi:this.parentRoute||Xn();let i=r?wi:n==null?void 0:n.path;i&&i!=="/"&&(i=Jw(i));const s=(n==null?void 0:n.id)||i;let o=r?wi:Nl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=Nl(["/",o]));const a=o==="__root__"?"/":Nl([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=a,this._to=Or(a)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Yj({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},mE=class extends sb{constructor(e){super(e)}};function gE(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function qp(e){const t=e.errorComponent??Qp;return f.jsx(yE,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var yE=class extends _.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Qp({error:e}){const[t,n]=_.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),t?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function xE({children:e,fallback:t=null}){return ob()?f.jsx(vs.Fragment,{children:e}):f.jsx(vs.Fragment,{children:t})}function ob(){return vs.useSyncExternalStore(vE,()=>!0,()=>!1)}function vE(){return()=>{}}var ab=_.createContext(null);function Vt(e){return _.useContext(ab)}var yu=_.createContext(void 0),wE=_.createContext(void 0),Pe=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Pe||{});function bE({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:s,checkDirty:o,shallowPropagate:a};function r(c,u,d){const h=u.depsTail;if(h!==void 0&&h.dep===c)return;const p=h!==void 0?h.nextDep:u.deps;if(p!==void 0&&p.dep===c){p.version=d,u.depsTail=p;return}const m=c.subsTail;if(m!==void 0&&m.version===d&&m.sub===u)return;const x=u.depsTail=c.subsTail={version:d,dep:c,sub:u,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=x),h!==void 0?h.nextDep=x:u.deps=x,m!==void 0?m.nextSub=x:c.subs=x}function i(c,u=c.sub){const d=c.dep,h=c.prevDep,p=c.nextDep,m=c.nextSub,x=c.prevSub;return p!==void 0?p.prevDep=h:u.depsTail=h,h!==void 0?h.nextDep=p:u.deps=p,m!==void 0?m.prevSub=x:d.subsTail=x,x!==void 0?x.nextSub=m:(d.subs=m)===void 0&&n(d),p}function s(c){let u=c.nextSub,d;e:do{const h=c.sub;let p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(c,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&t(h),p&1){const m=h.subs;if(m!==void 0){const x=(c=m).nextSub;x!==void 0&&(d={value:u,prev:d},u=x);continue}}if((c=u)!==void 0){u=c.nextSub;continue}for(;d!==void 0;)if(c=d.value,d=d.prev,c!==void 0){u=c.nextSub;continue e}break}while(!0)}function o(c,u){let d,h=0,p=!1;e:do{const m=c.dep,x=m.flags;if(u.flags&16)p=!0;else if((x&17)===17){if(e(m)){const w=m.subs;w.nextSub!==void 0&&a(w),p=!0}}else if((x&33)===33){(c.nextSub!==void 0||c.prevSub!==void 0)&&(d={value:c,prev:d}),c=m.deps,u=m,++h;continue}if(!p){const w=c.nextDep;if(w!==void 0){c=w;continue}}for(;h--;){const w=u.subs,g=w.nextSub!==void 0;if(g?(c=d.value,d=d.prev):c=w,p){if(e(u)){g&&a(w),u=c.sub;continue}p=!1}else u.flags&=-33;u=c.sub;const y=c.nextDep;if(y!==void 0){c=y;continue e}}return p}while(!0)}function a(c){do{const u=c.sub,d=u.flags;(d&48)===32&&(u.flags=d|16,(d&6)===2&&t(u))}while((c=c.nextSub)!==void 0)}function l(c,u){let d=u.depsTail;for(;d!==void 0;){if(d===c)return!0;d=d.prevDep}return!1}}function kE(e,t,n){var s,o,a;const r=typeof e=="object",i=r?e:void 0;return{next:(s=r?e.next:e)==null?void 0:s.bind(i),error:(o=r?e.error:t)==null?void 0:o.bind(i),complete:(a=r?e.complete:n)==null?void 0:a.bind(i)}}const sh=[];let Fl=0;const{link:Ny,unlink:SE,propagate:_E,checkDirty:lb,shallowPropagate:zy}=bE({update(e){return e._update()},notify(e){sh[oh++]=e,e.flags&=~Pe.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Pe.Mutable|Pe.Dirty,Tc(e))}});let rl=0,oh=0,Pn,ah=0;function cb(e){try{++ah,e()}finally{--ah||ub()}}function Tc(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=SE(n,e)}function ub(){if(!(ah>0)){for(;rl<oh;){const e=sh[rl];sh[rl++]=void 0,e.notify()}rl=0,oh=0}}function Oy(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Pe.None:Pe.Mutable,get(){return Pn!==void 0&&Ny(i,Pn,Fl),i._snapshot},subscribe(s){const o=kE(s),a={current:!1},l=CE(()=>{var c;i.get(),a.current?(c=o.next)==null||c.call(o,i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const o=Pn,a=(t==null?void 0:t.compare)??Object.is;if(n)Pn=i,++Fl,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=Pe.Mutable|Pe.RecursedCheck);try{const l=i._snapshot,c=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!a(l,c)?(i._snapshot=c,!0):!1}finally{Pn=o,n&&(i.flags&=~Pe.RecursedCheck),Tc(i)}}};return n?(i.flags=Pe.Mutable|Pe.Dirty,i.get=function(){const s=i.flags;if(s&Pe.Dirty||s&Pe.Pending&&lb(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&zy(o)}}else s&Pe.Pending&&(i.flags=s&~Pe.Pending);return Pn!==void 0&&Ny(i,Pn,Fl),i._snapshot}):i.set=function(s){if(i._update(s)){const o=i.subs;o!==void 0&&(_E(o),zy(o),ub())}},i}function CE(e){const t=()=>{const r=Pn;Pn=n,++Fl,n.depsTail=void 0,n.flags=Pe.Watching|Pe.RecursedCheck;try{return e()}finally{Pn=r,n.flags&=~Pe.RecursedCheck,Tc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Pe.Watching|Pe.RecursedCheck,notify(){const r=this.flags;r&Pe.Dirty||r&Pe.Pending&&lb(this.deps,this)?t():this.flags=Pe.Watching},stop(){this.flags=Pe.None,this.depsTail=void 0,Tc(this)}};return t(),n}var db={exports:{}},fb={},hb={exports:{}},pb={};/**
42
- * @license React
43
- * use-sync-external-store-shim.production.js
44
- *
45
- * Copyright (c) Meta Platforms, Inc. and affiliates.
46
- *
47
- * This source code is licensed under the MIT license found in the
48
- * LICENSE file in the root directory of this source tree.
49
- */var Ts=_;function PE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jE=typeof Object.is=="function"?Object.is:PE,EE=Ts.useState,TE=Ts.useEffect,IE=Ts.useLayoutEffect,RE=Ts.useDebugValue;function ME(e,t){var n=t(),r=EE({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return IE(function(){i.value=n,i.getSnapshot=t,gd(i)&&s({inst:i})},[e,n,t]),TE(function(){return gd(i)&&s({inst:i}),e(function(){gd(i)&&s({inst:i})})},[e]),RE(n),n}function gd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jE(e,n)}catch{return!0}}function LE(e,t){return t()}var AE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?LE:ME;pb.useSyncExternalStore=Ts.useSyncExternalStore!==void 0?Ts.useSyncExternalStore:AE;hb.exports=pb;var DE=hb.exports;/**
50
- * @license React
51
- * use-sync-external-store-shim/with-selector.production.js
52
- *
53
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE file in the root directory of this source tree.
57
- */var xu=_,NE=DE;function zE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OE=typeof Object.is=="function"?Object.is:zE,FE=NE.useSyncExternalStore,BE=xu.useRef,$E=xu.useEffect,VE=xu.useMemo,WE=xu.useDebugValue;fb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=BE(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=VE(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),i!==void 0&&o.hasValue){var m=o.value;if(i(m,p))return d=m}return d=p}if(m=d,OE(u,p))return m;var x=r(p);return i!==void 0&&i(m,x)?(u=p,m):(u=p,d=x)}var c=!1,u,d,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,i]);var a=FE(e,s[0],s[1]);return $E(function(){o.hasValue=!0,o.value=a},[a]),WE(a),a};db.exports=fb;var mb=db.exports;const UE=Jc(mb);function HE(e,t){return e===t}function _t(e,t,n=HE){const r=_.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(o);return a},[e]),i=_.useCallback(()=>e==null?void 0:e.get(),[e]);return mb.useSyncExternalStoreWithSelector(r,i,i,t,n)}var GE={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Mi(e){const t=Vt(),n=_.useContext(e.from?wE:yu),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=_.useRef(void 0);return _t(i??GE,o=>{if((e.shouldThrow??!0)&&!o&&Xn(),o===void 0)return;const a=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const l=Pr(s.current,a);return s.current=l,l}return a})}function gb(e){return Mi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function yb(e){const{select:t,...n}=e;return Mi({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function zs(e){return Mi({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Xp(e){return Mi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Nn(e){const t=Vt();return _.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function xb(e){return Mi({...e,select:t=>e.select?e.select(t.context):t.context})}function KE(e,t){const n=Vt(),r=pj(t),{activeProps:i,inactiveProps:s,activeOptions:o,to:a,preload:l,preloadDelay:c,preloadIntentProximity:u,hashScrollIntoView:d,replace:h,startTransition:p,resetScroll:m,viewTransition:x,children:w,target:g,disabled:y,style:v,className:b,onClick:k,onBlur:S,onFocus:E,onMouseEnter:P,onMouseLeave:T,onTouchStart:j,ignoreBlocker:R,params:L,search:F,hash:D,state:M,mask:B,reloadDocument:H,unsafeRelative:z,from:W,_fromLocation:C,...$}=e,q=ob(),I=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ue=_t(n.stores.location,pe=>pe,(pe,N)=>pe.href===N.href),me=_.useMemo(()=>{const pe={_fromLocation:ue,...I};return n.buildLocation(pe)},[n,ue,I]),he=me.maskedLocation?me.maskedLocation.publicHref:me.publicHref,Pt=me.maskedLocation?me.maskedLocation.external:me.external,Ge=_.useMemo(()=>ZE(he,Pt,n.history,y),[y,Pt,he,n.history]),Wt=_.useMemo(()=>{if(Ge!=null&&Ge.external)return Cc(Ge.href,n.protocolAllowlist)?void 0:Ge.href;if(!eT(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),Cc(a,n.protocolAllowlist)?void 0:a}catch{}},[a,Ge,n.protocolAllowlist]),gn=_.useMemo(()=>{if(Wt)return!1;if(o!=null&&o.exact){if(!Lj(ue.pathname,me.pathname,n.basepath))return!1}else{const pe=Pc(ue.pathname,n.basepath),N=Pc(me.pathname,n.basepath);if(!(pe.startsWith(N)&&(pe.length===N.length||pe[N.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!vi(ue.search,me.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?q&&ue.hash===me.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,ue,Wt,q,me.hash,me.pathname,me.search,n.basepath]),Fn=gn?Cr(i,{})??YE:yd,Di=gn?yd:Cr(s,{})??yd,Ma=[b,Fn.className,Di.className].filter(Boolean).join(" "),La=(v||Fn.style||Di.style)&&{...v,...Fn.style,...Di.style},[Aa,Ks]=_.useState(!1),Ys=_.useRef(!1),or=e.reloadDocument||Wt?!1:l??n.options.defaultPreload,Ni=c??n.options.defaultPreloadDelay??0,yn=_.useCallback(()=>{n.preloadRoute({...I,_builtLocation:me}).catch(pe=>{console.warn(pe),console.warn(pE)})},[n,I,me]);hj(r,_.useCallback(pe=>{pe!=null&&pe.isIntersecting&&yn()},[yn]),JE,{disabled:!!y||or!=="viewport"}),_.useEffect(()=>{Ys.current||!y&&or==="render"&&(yn(),Ys.current=!0)},[y,yn,or]);const Du=pe=>{const N=pe.currentTarget.getAttribute("target"),G=g!==void 0?g:N;if(!y&&!tT(pe)&&!pe.defaultPrevented&&(!G||G==="_self")&&pe.button===0){pe.preventDefault(),Ns.flushSync(()=>{Ks(!0)});const Z=n.subscribe("onResolved",()=>{Z(),Ks(!1)});n.navigate({...I,replace:h,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:x,ignoreBlocker:R})}};if(Wt)return{...$,ref:r,href:Wt,...w&&{children:w},...g&&{target:g},...y&&{disabled:y},...v&&{style:v},...b&&{className:b},...k&&{onClick:k},...S&&{onBlur:S},...E&&{onFocus:E},...P&&{onMouseEnter:P},...T&&{onMouseLeave:T},...j&&{onTouchStart:j}};const Da=pe=>{if(y||or!=="intent")return;if(!Ni){yn();return}const N=pe.currentTarget;if(lo.has(N))return;const G=setTimeout(()=>{lo.delete(N),yn()},Ni);lo.set(N,G)},Nu=pe=>{y||or!=="intent"||yn()},Na=pe=>{if(y||!or||!Ni)return;const N=pe.currentTarget,G=lo.get(N);G&&(clearTimeout(G),lo.delete(N))};return{...$,...Fn,...Di,href:Ge==null?void 0:Ge.href,ref:r,onClick:Fi([k,Du]),onBlur:Fi([S,Na]),onFocus:Fi([E,Da]),onMouseEnter:Fi([P,Da]),onMouseLeave:Fi([T,Na]),onTouchStart:Fi([j,Nu]),disabled:!!y,target:g,...La&&{style:La},...Ma&&{className:Ma},...y&&qE,...gn&&QE,...q&&Aa&&XE}}var yd={},YE={className:"active"},qE={role:"link","aria-disabled":!0},QE={"data-status":"active","aria-current":"page"},XE={"data-transitioning":"transitioning"},lo=new WeakMap,JE={rootMargin:"100px"},Fi=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ZE(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function eT(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var vb=_.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...s}=KE(r,t),o=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...l}=s;return _.createElement("a",l,o)}return _.createElement(n,s,o)});function tT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var nT=class extends sb{constructor(e){super(e),this.useMatch=t=>Mi({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>xb({...t,from:this.id}),this.useSearch=t=>Xp({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>zs({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>yb({...t,from:this.id}),this.useLoaderData=t=>gb({...t,from:this.id}),this.useNavigate=()=>Nn({from:this.fullPath}),this.Link=vs.forwardRef((t,n)=>f.jsx(vb,{ref:n,from:this.fullPath,...t}))}};function ir(e){return new nT(e)}var rT=class extends mE{constructor(e){super(e),this.useMatch=t=>Mi({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>xb({...t,from:this.id}),this.useSearch=t=>Xp({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>zs({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>yb({...t,from:this.id}),this.useLoaderData=t=>gb({...t,from:this.id}),this.useNavigate=()=>Nn({from:this.fullPath}),this.Link=vs.forwardRef((t,n)=>f.jsx(vb,{ref:n,from:this.fullPath,...t}))}};function iT(e){return new rT(e)}function sT(e){const t=Vt(),n=`not-found-${_t(t.stores.location,r=>r.pathname)}-${_t(t.stores.status,r=>r)}`;return f.jsx(qp,{getResetKey:()=>n,onCatch:(r,i)=>{var s;if(st(r))(s=e.onCatch)==null||s.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(st(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function oT(){return f.jsx("p",{children:"Not Found"})}function Ki(e){return f.jsx(f.Fragment,{children:e.children})}function wb(e,t,n){return t.options.notFoundComponent?f.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...n}):f.jsx(oT,{})}function aT(e){return null}function lT(){return aT(Vt()),null}var bb=_.memo(function({matchId:t}){const n=Vt(),r=n.stores.matchStores.get(t);r||Xn();const i=_t(n.stores.loadedAt,o=>o),s=_t(r,o=>o);return f.jsx(cT,{router:n,matchId:t,resetKey:i,matchState:_.useMemo(()=>{var l;const o=s.routeId,a=(l=n.routesById[o].parentRoute)==null?void 0:l.id;return{routeId:o,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:a}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function cT({router:e,matchId:t,resetKey:n,matchState:r}){var m,x;const i=e.routesById[r.routeId],s=i.options.pendingComponent??e.options.defaultPendingComponent,o=s?f.jsx(s,{}):null,a=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,c=i.isRoot?i.options.notFoundComponent??((m=e.options.notFoundRoute)==null?void 0:m.options.component):i.options.notFoundComponent,u=r.ssr===!1||r.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??s??(((x=i.options.errorComponent)==null?void 0:x.preload)||u))?_.Suspense:Ki,h=a?qp:Ki,p=c?sT:Ki;return f.jsxs(i.isRoot?i.options.shellComponent??Ki:Ki,{children:[f.jsx(yu.Provider,{value:t,children:f.jsx(d,{fallback:o,children:f.jsx(h,{getResetKey:()=>n,errorComponent:a||Qp,onCatch:(w,g)=>{if(st(w))throw w.routeId??(w.routeId=r.routeId),w;l==null||l(w,g)},children:f.jsx(p,{fallback:w=>{if(w.routeId??(w.routeId=r.routeId),!c||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!i.isRoot)throw w;return _.createElement(c,w)},children:u||r._displayPending?f.jsx(xE,{fallback:o,children:f.jsx(Fy,{matchId:t})}):f.jsx(Fy,{matchId:t})})})})}),r.parentRouteId===wi?f.jsxs(f.Fragment,{children:[f.jsx(uT,{resetKey:n}),e.options.scrollRestoration&&qw?f.jsx(lT,{}):null]}):null]})}function uT({resetKey:e}){const t=Vt(),n=_.useRef(void 0);return So(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...gs(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var Fy=_.memo(function({matchId:t}){const n=Vt(),r=(u,d)=>{var h;return((h=n.getMatch(u.id))==null?void 0:h._nonReactive[d])??u._nonReactive[d]},i=n.stores.matchStores.get(t);i||Xn();const s=_t(i,u=>u),o=s.routeId,a=n.routesById[o],l=_.useMemo(()=>{var d;const u=(d=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:d({routeId:o,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return u?JSON.stringify(u):void 0},[o,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),c=_.useMemo(()=>{const u=a.options.component??n.options.defaultComponent;return u?f.jsx(u,{},l):f.jsx(kb,{})},[l,a.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const u=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(u){const d=n.getMatch(s.id);if(d&&!d._nonReactive.minPendingPromise){const h=Es();d._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),d._nonReactive.minPendingPromise=void 0},u)}}throw r(s,"loadPromise")}if(s.status==="notFound")return st(s.error)||Xn(),wb(n,a,s.error);if(s.status==="redirected")throw vt(s.error)||Xn(),r(s,"loadPromise");if(s.status==="error")throw s.error;return c}),kb=_.memo(function(){const t=Vt(),n=_.useContext(yu);let r,i=!1,s;{const c=n?t.stores.matchStores.get(n):void 0;[r,i]=_t(c,u=>[u==null?void 0:u.routeId,(u==null?void 0:u.globalNotFound)??!1]),s=_t(t.stores.matchesId,u=>u[u.findIndex(d=>d===n)+1])}const o=r?t.routesById[r]:void 0,a=t.options.defaultPendingComponent?f.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||Xn(),wb(t,o,void 0);if(!s)return null;const l=f.jsx(bb,{matchId:s});return r===wi?f.jsx(_.Suspense,{fallback:a,children:l}):l});function dT(){const e=Vt(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),i=_t(e.stores.isLoading,d=>d),s=_t(e.stores.hasPending,d=>d),o=cd(i),a=i||n||s,l=cd(a),c=i||s,u=cd(c);return e.startTransition=d=>{r(!0),_.startTransition(()=>{d(),r(!1)})},_.useEffect(()=>{const d=e.history.subscribe(e.load),h=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Or(e.latestLocation.publicHref)!==Or(h.publicHref)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),So(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(h){console.error(h)}})()},[e]),So(()=>{o&&!i&&e.emit({type:"onLoad",...gs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),So(()=>{u&&!c&&e.emit({type:"onBeforeRouteMount",...gs(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,u,e]),So(()=>{if(l&&!a){const d=gs(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),cb(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&gE(e)}},[a,l,e]),null}function fT(){const e=Vt(),t=e.routesById[wi].options.pendingComponent??e.options.defaultPendingComponent,n=t?f.jsx(t,{}):null,r=f.jsxs(typeof document<"u"&&e.ssr?Ki:_.Suspense,{fallback:n,children:[f.jsx(dT,{}),f.jsx(hT,{})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:r}):r}function hT(){const e=Vt(),t=_t(e.stores.firstId,i=>i),n=_t(e.stores.loadedAt,i=>i),r=t?f.jsx(bb,{matchId:t}):null;return f.jsx(yu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:f.jsx(qp,{getResetKey:()=>n,errorComponent:Qp,onCatch:void 0,children:r})})}var pT=e=>({createMutableStore:Oy,createReadonlyStore:Oy,batch:cb}),mT=e=>new gT(e),gT=class extends aE{constructor(e){super(e,pT)}};function yT({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=f.jsx(ab.Provider,{value:e,children:t});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function xT({router:e,...t}){return f.jsx(yT,{router:e,...t,children:f.jsx(fT,{})})}function vT(e){const t=Vt({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=_.useRef(void 0);return _t(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=Pr(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}const wT="modulepreload",bT=function(e){return"/"+e},By={},Os=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=bT(l),l in By)return;By[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":wT,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},De={serif:"'Luminari', 'Cormorant Garamond', Georgia, serif",body:"'Cormorant Garamond', Georgia, serif",handwritten:"'Caveat', cursive",mono:"'JetBrains Mono', monospace"},A={1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem"},te={"2xs":"0.75rem",xs:"0.875rem",sm:"1rem",base:"1.125rem",md:"1.25rem",lg:"1.5rem"},Ic={tight:1.2,normal:1.5,relaxed:1.7},ie={textPrimary:"#1A1917",textProse:"#1C1B18",textSecondary:"#68635C",textTertiary:"#A8A399",accentAmberDark:"#A67B4F",accentGreenDark:"#5E8A66",accentRoseDark:"#9E5E5E",deskBg:"#1e3a2d",deskLight:"#264a3a",deskText:"#e8e4d9",deskTextMuted:"#a8b5a0",deskBorder:"rgba(200, 210, 195, 0.15)",deskChalk:"#d4e8cb"},Sb={sidebarWidth:224,stackPanelWidth:480};function kT(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ST=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_T=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CT={};function $y(e,t){return(CT.jsx?_T:ST).test(e)}const PT=/[ \t\n\f\r]/g;function jT(e){return typeof e=="object"?e.type==="text"?Vy(e.value):!1:Vy(e)}function Vy(e){return e.replace(PT,"")===""}class wa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}wa.prototype.normal={};wa.prototype.property={};wa.prototype.space=void 0;function _b(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new wa(n,r,t)}function lh(e){return e.toLowerCase()}class Ct{constructor(t,n){this.attribute=n,this.property=t}}Ct.prototype.attribute="";Ct.prototype.booleanish=!1;Ct.prototype.boolean=!1;Ct.prototype.commaOrSpaceSeparated=!1;Ct.prototype.commaSeparated=!1;Ct.prototype.defined=!1;Ct.prototype.mustUseProperty=!1;Ct.prototype.number=!1;Ct.prototype.overloadedBoolean=!1;Ct.prototype.property="";Ct.prototype.spaceSeparated=!1;Ct.prototype.space=void 0;let ET=0;const ee=Li(),Oe=Li(),ch=Li(),U=Li(),ye=Li(),ki=Li(),It=Li();function Li(){return 2**++ET}const uh=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Oe,commaOrSpaceSeparated:It,commaSeparated:ki,number:U,overloadedBoolean:ch,spaceSeparated:ye},Symbol.toStringTag,{value:"Module"})),xd=Object.keys(uh);class Jp extends Ct{constructor(t,n,r,i){let s=-1;if(super(t,n),Wy(this,"space",i),typeof r=="number")for(;++s<xd.length;){const o=xd[s];Wy(this,xd[s],(r&uh[o])===uh[o])}}}Jp.prototype.defined=!0;function Wy(e,t,n){n&&(e[t]=n)}function Fs(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Jp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[lh(r)]=r,n[lh(s.attribute)]=r}return new wa(t,n,e.space)}const Cb=Fs({properties:{ariaActiveDescendant:null,ariaAtomic:Oe,ariaAutoComplete:null,ariaBusy:Oe,ariaChecked:Oe,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:ye,ariaCurrent:null,ariaDescribedBy:ye,ariaDetails:null,ariaDisabled:Oe,ariaDropEffect:ye,ariaErrorMessage:null,ariaExpanded:Oe,ariaFlowTo:ye,ariaGrabbed:Oe,ariaHasPopup:null,ariaHidden:Oe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ye,ariaLevel:U,ariaLive:null,ariaModal:Oe,ariaMultiLine:Oe,ariaMultiSelectable:Oe,ariaOrientation:null,ariaOwns:ye,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Oe,ariaReadOnly:Oe,ariaRelevant:null,ariaRequired:Oe,ariaRoleDescription:ye,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Oe,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Pb(e,t){return t in e?e[t]:t}function jb(e,t){return Pb(e,t.toLowerCase())}const TT=Fs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ki,acceptCharset:ye,accessKey:ye,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alpha:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:ye,autoFocus:ee,autoPlay:ee,blocking:ye,capture:null,charSet:null,checked:ee,cite:null,className:ye,closedBy:null,colorSpace:null,cols:U,colSpan:U,command:null,commandFor:null,content:null,contentEditable:Oe,controls:ee,controlsList:ye,coords:U|ki,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:ch,draggable:Oe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:ye,height:U,hidden:ch,high:U,href:null,hrefLang:null,htmlFor:ye,httpEquiv:ye,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:ye,itemRef:ye,itemScope:ee,itemType:ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:U,pattern:null,ping:ye,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:ye,required:ee,reversed:ee,rows:U,rowSpan:U,sandbox:ye,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootCustomElementRegistry:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shadowRootSerializable:ee,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Oe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Oe,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ye,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Oe,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ee,disablePictureInPicture:ee,disableRemotePlayback:ee,exportParts:ki,part:ye,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:jb}),IT=Fs({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",maskType:"mask-type",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:It,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:ye,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:ki,g2:ki,glyphName:ki,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:It,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:It,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:It,rev:It,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:It,requiredFeatures:It,requiredFonts:It,requiredFormats:It,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:It,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:It,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:It,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pb}),Eb=Fs({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()}}),Tb=Fs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jb}),Ib=Fs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),RT={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"},MT=/[A-Z]/g,Uy=/-[a-z]/g,LT=/^data[-\w.:]+$/i;function AT(e,t){const n=lh(t);let r=t,i=Ct;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&LT.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Uy,NT);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Uy.test(s)){let o=s.replace(MT,DT);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Jp}return new i(r,t)}function DT(e){return"-"+e.toLowerCase()}function NT(e){return e.charAt(1).toUpperCase()}const zT=_b([Cb,TT,Eb,Tb,Ib],"html"),Zp=_b([Cb,IT,Eb,Tb,Ib],"svg");function OT(e){return e.join(" ").trim()}var em={},Hy=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,FT=/\n/g,BT=/^\s*/,$T=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,VT=/^:\s*/,WT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,UT=/^[;\s]*/,HT=/^\s+|\s+$/g,GT=`
58
- `,Gy="/",Ky="*",ui="",KT="comment",YT="declaration";function qT(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var x=m.match(FT);x&&(n+=x.length);var w=m.lastIndexOf(GT);r=~w?m.length-w:r+m.length}function s(){var m={line:n,column:r};return function(x){return x.position=new o(m),c(),x}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var x=new Error(t.source+":"+n+":"+r+": "+m);if(x.reason=m,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function l(m){var x=m.exec(e);if(x){var w=x[0];return i(w),e=e.slice(w.length),x}}function c(){l(BT)}function u(m){var x;for(m=m||[];x=d();)x!==!1&&m.push(x);return m}function d(){var m=s();if(!(Gy!=e.charAt(0)||Ky!=e.charAt(1))){for(var x=2;ui!=e.charAt(x)&&(Ky!=e.charAt(x)||Gy!=e.charAt(x+1));)++x;if(x+=2,ui===e.charAt(x-1))return a("End of comment missing");var w=e.slice(2,x-2);return r+=2,i(w),e=e.slice(x),r+=2,m({type:KT,comment:w})}}function h(){var m=s(),x=l($T);if(x){if(d(),!l(VT))return a("property missing ':'");var w=l(WT),g=m({type:YT,property:Yy(x[0].replace(Hy,ui)),value:w?Yy(w[0].replace(Hy,ui)):ui});return l(UT),g}}function p(){var m=[];u(m);for(var x;x=h();)x!==!1&&(m.push(x),u(m));return m}return c(),p()}function Yy(e){return e?e.replace(HT,ui):ui}var QT=qT,XT=ec&&ec.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(em,"__esModule",{value:!0});em.default=ZT;const JT=XT(QT);function ZT(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,JT.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}var vu={};Object.defineProperty(vu,"__esModule",{value:!0});vu.camelCase=void 0;var e2=/^--[a-zA-Z0-9_-]+$/,t2=/-([a-z])/g,n2=/^[^-]+$/,r2=/^-(webkit|moz|ms|o|khtml)-/,i2=/^-(ms)-/,s2=function(e){return!e||n2.test(e)||e2.test(e)},o2=function(e,t){return t.toUpperCase()},qy=function(e,t){return"".concat(t,"-")},a2=function(e,t){return t===void 0&&(t={}),s2(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(i2,qy):e=e.replace(r2,qy),e.replace(t2,o2))};vu.camelCase=a2;var l2=ec&&ec.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c2=l2(em),u2=vu;function dh(e,t){var n={};return!e||typeof e!="string"||(0,c2.default)(e,function(r,i){r&&i&&(n[(0,u2.camelCase)(r,t)]=i)}),n}dh.default=dh;var d2=dh;const f2=Jc(d2),Rb=Mb("end"),tm=Mb("start");function Mb(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 h2(e){const t=tm(e),n=Rb(e);if(t&&n)return{start:t,end:n}}function Do(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qy(e.position):"start"in e||"end"in e?Qy(e):"line"in e||"column"in e?fh(e):""}function fh(e){return Xy(e&&e.line)+":"+Xy(e&&e.column)}function Qy(e){return fh(e&&e.start)+"-"+fh(e&&e.end)}function Xy(e){return e&&typeof e=="number"?e:1}class at extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!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&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=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=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Do(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=o&&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}}at.prototype.file="";at.prototype.name="";at.prototype.reason="";at.prototype.message="";at.prototype.stack="";at.prototype.column=void 0;at.prototype.line=void 0;at.prototype.ancestors=void 0;at.prototype.cause=void 0;at.prototype.fatal=void 0;at.prototype.place=void 0;at.prototype.ruleId=void 0;at.prototype.source=void 0;const nm={}.hasOwnProperty,p2=new Map,m2=/[A-Z]/g,g2=new Set(["table","tbody","thead","tfoot","tr"]),y2=new Set(["td","th"]),Lb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function x2(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=P2(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=C2(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"?Zp:zT,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Ab(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Ab(e,t,n){if(t.type==="element")return v2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return w2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return k2(e,t,n);if(t.type==="mdxjsEsm")return b2(e,t);if(t.type==="root")return S2(e,t,n);if(t.type==="text")return _2(e,t)}function v2(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Zp,e.schema=i),e.ancestors.push(t);const s=Nb(e,t.tagName,!1),o=j2(e,t);let a=im(e,t);return g2.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!jT(l):!0})),Db(e,o,s,t),rm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function w2(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)}ua(e,t.position)}function b2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ua(e,t.position)}function k2(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Zp,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Nb(e,t.name,!0),o=E2(e,t),a=im(e,t);return Db(e,o,s,t),rm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function S2(e,t,n){const r={};return rm(r,im(e,t)),e.create(t,e.Fragment,r,n)}function _2(e,t){return t.value}function Db(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function rm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function C2(e,t,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:t;return a?c(s,o,a):c(s,o)}}function P2(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=tm(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function j2(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&nm.call(t.properties,i)){const s=T2(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&y2.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function E2(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 o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ua(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 a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else ua(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function im(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:p2;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=Ab(e,s,o);a!==void 0&&n.push(a)}return n}function T2(e,t,n){const r=AT(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?kT(n):OT(n)),r.property==="style"){let i=typeof n=="object"?n:I2(e,String(n));return e.stylePropertyNameCase==="css"&&(i=R2(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?RT[r.property]||r.property:r.attribute,n]}}function I2(e,t){try{return f2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new at("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=Lb+"#cannot-parse-style-attribute",i}}function Nb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=$y(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=$y(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return nm.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ua(e)}function ua(e,t){const n=new at("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=Lb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function R2(e){const t={};let n;for(n in e)nm.call(e,n)&&(t[M2(n)]=e[n]);return t}function M2(e){let t=e.replace(m2,L2);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function L2(e){return"-"+e.toLowerCase()}const vd={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"]},A2={};function D2(e,t){const n=A2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zb(e,r,i)}function zb(e,t,n){if(N2(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 Jy(e.children,t,n)}return Array.isArray(e)?Jy(e,t,n):""}function Jy(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=zb(e[i],t,n);return r.join("")}function N2(e){return!!(e&&typeof e=="object")}const Zy=document.createElement("i");function sm(e){const t="&"+e+";";Zy.innerHTML=t;const n=Zy.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function An(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function Qt(e,t){return e.length>0?(An(e,e.length,0,t),e):t}const ex={}.hasOwnProperty;function z2(e){const t={};let n=-1;for(;++n<e.length;)O2(t,e[n]);return t}function O2(e,t){let n;for(n in t){const i=(ex.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){ex.call(i,o)||(i[o]=[]);const a=s[o];F2(i[o],Array.isArray(a)?a:a?[a]:[])}}}function F2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);An(e,0,0,r)}function Ob(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 ys(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tn=qr(/[A-Za-z]/),Lt=qr(/[\dA-Za-z]/),B2=qr(/[#-'*+\--9=?A-Z^-~]/);function hh(e){return e!==null&&(e<32||e===127)}const ph=qr(/\d/),$2=qr(/[\dA-Fa-f]/),V2=qr(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function St(e){return e!==null&&(e<0||e===32)}function ce(e){return e===-2||e===-1||e===32}const W2=qr(new RegExp("\\p{P}|\\p{S}","u")),U2=qr(/\s/);function qr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bs(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Lt(e.charCodeAt(n+1))&&Lt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ke(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return ce(l)?(e.enter(n),a(l)):t(l)}function a(l){return ce(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const H2={tokenize:G2};function G2(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ke(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return X(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const K2={tokenize:Y2},tx={tokenize:q2};function Y2(e){const t=this,n=[];let r=0,i,s,o;return a;function a(v){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const b=t.events.length;let k=b,S;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){S=t.events[k][1].end;break}g(r);let E=b;for(;E<t.events.length;)t.events[E][1].end={...S},E++;return An(t.events,k+1,0,t.events.slice(b)),t.events.length=E,c(v)}return a(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return m(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tx,u,d)(v)}function u(v){return i&&y(),g(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(v)}function h(v){return t.containerState={},e.attempt(tx,p,m)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function m(v){if(v===null){i&&y(),g(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),x(v)}function x(v){if(v===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return X(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),x)}function w(v,b){const k=t.sliceStream(v);if(b&&k.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(k),t.parser.lazy[v.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const E=t.events.length;let P=E,T,j;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(T){j=t.events[P][1].end;break}T=!0}for(g(r),S=E;S<t.events.length;)t.events[S][1].end={...j},S++;An(t.events,P+1,0,t.events.slice(E)),t.events.length=S}}function g(v){let b=n.length;for(;b-- >v;){const k=n[b];t.containerState=k[1],k[0].exit.call(t,e)}n.length=v}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function q2(e,t,n){return ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nx(e){if(e===null||St(e)||U2(e))return 1;if(W2(e))return 2}function om(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 mh={name:"attention",resolveAll:Q2,tokenize:X2};function Q2(e,t){let n=-1,r,i,s,o,a,l,c,u;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;l=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 d={...e[r][1].end},h={...e[n][1].start};rx(d,-l),rx(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Qt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Qt(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=Qt(c,om(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Qt(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Qt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,An(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function X2(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=nx(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const c=e.exit("attentionSequence"),u=nx(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function rx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const J2={name:"autolink",tokenize:Z2};function Z2(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return Tn(p)?(e.consume(p),o):p===64?n(p):c(p)}function o(p){return p===43||p===45||p===46||Lt(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Lt(p))&&r++<32?(e.consume(p),a):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||hh(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):B2(p)?(e.consume(p),c):n(p)}function u(p){return Lt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Lt(p))&&r++<63){const m=p===45?h:d;return e.consume(p),m}return n(p)}}const wu={partial:!0,tokenize:eI};function eI(e,t,n){return r;function r(s){return ce(s)?ke(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||X(s)?t(s):n(s)}}const Fb={continuation:{tokenize:nI},exit:rI,name:"blockQuote",tokenize:tI};function tI(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return ce(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function nI(e,t,n){const r=this;return i;function i(o){return ce(o)?ke(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(Fb,t,n)(o)}}function rI(e){e.exit("blockQuote")}const Bb={name:"characterEscape",tokenize:iI};function iI(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 V2(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const $b={name:"characterReference",tokenize:sI};function sI(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,o=Lt,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=$2,u):(e.enter("characterReferenceValue"),s=7,o=ph,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Lt&&!sm(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),u):n(d)}}const ix={partial:!0,tokenize:aI},sx={concrete:!0,name:"codeFenced",tokenize:oI};function oI(e,t,n){const r=this,i={partial:!0,tokenize:k};let s=0,o=0,a;return l;function l(S){return c(S)}function c(S){const E=r.events[r.events.length-1];return s=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===a?(o++,e.consume(S),u):o<3?n(S):(e.exit("codeFencedFenceSequence"),ce(S)?ke(e,d,"whitespace")(S):d(S))}function d(S){return S===null||X(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(ix,x,b)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||X(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):ce(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ke(e,p,"whitespace")(S)):S===96&&S===a?n(S):(e.consume(S),h)}function p(S){return S===null||X(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||X(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===a?n(S):(e.consume(S),m)}function x(S){return e.attempt(i,b,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return s>0&&ce(S)?ke(e,y,"linePrefix",s+1)(S):y(S)}function y(S){return S===null||X(S)?e.check(ix,x,b)(S):(e.enter("codeFlowValue"),v(S))}function v(S){return S===null||X(S)?(e.exit("codeFlowValue"),y(S)):(e.consume(S),v)}function b(S){return e.exit("codeFenced"),t(S)}function k(S,E,P){let T=0;return j;function j(M){return S.enter("lineEnding"),S.consume(M),S.exit("lineEnding"),R}function R(M){return S.enter("codeFencedFence"),ce(M)?ke(S,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):L(M)}function L(M){return M===a?(S.enter("codeFencedFenceSequence"),F(M)):P(M)}function F(M){return M===a?(T++,S.consume(M),F):T>=o?(S.exit("codeFencedFenceSequence"),ce(M)?ke(S,D,"whitespace")(M):D(M)):P(M)}function D(M){return M===null||X(M)?(S.exit("codeFencedFence"),E(M)):P(M)}}}function aI(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const wd={name:"codeIndented",tokenize:cI},lI={partial:!0,tokenize:uI};function cI(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ke(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):X(c)?e.attempt(lI,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||X(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function uI(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):X(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ke(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):X(o)?i(o):n(o)}}const dI={name:"codeText",previous:hI,resolve:fI,tokenize:pI};function fI(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 hI(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pI(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,u(d)):X(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||X(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class mI{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&&co(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),co(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),co(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);co(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);co(this.left,n.reverse())}}}function co(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 Vb(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new mI(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,gI(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return An(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function gI(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,d,h=-1,p=n,m=0,x=0;const w=[x];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(x=h+1,w.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const g=a.slice(w[h],w[h+1]),y=s.pop();l.push([y,y+g.length-1]),e.splice(y,2,g)}for(l.reverse(),h=-1;++h<l.length;)c[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return c}const yI={resolve:vI,tokenize:wI},xI={partial:!0,tokenize:bI};function vI(e){return Vb(e),e}function wI(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):X(a)?e.check(xI,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function bI(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ke(e,s,"linePrefix")}function s(o){if(o===null||X(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Wb(e,t,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),h):g===null||g===32||g===41||hh(g)?n(g):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(g))}function h(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),h(g)):g===null||g===60||X(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function x(g){return!u&&(g===null||g===41||St(g))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(g)):u<c&&g===40?(e.consume(g),u++,x):g===41?(e.consume(g),u--,x):g===null||g===32||g===40||hh(g)?n(g):(e.consume(g),g===92?w:x)}function w(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function Ub(e,t,n,r,i,s){const o=this;let a=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),u}function u(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):X(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||X(p)||a++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!ce(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function Hb(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),c(h))}function c(h){return h===o?(e.exit(s),l(o)):h===null?n(h):X(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ke(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||X(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===o||h===92?(e.consume(h),u):u(h)}}function No(e,t){let n;return r;function r(i){return X(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ce(i)?ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const kI={name:"definition",tokenize:_I},SI={partial:!0,tokenize:CI};function _I(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),o(p)}function o(p){return Ub.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ys(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return St(p)?No(e,c)(p):c(p)}function c(p){return Wb(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(SI,d,d)(p)}function d(p){return ce(p)?ke(e,h,"whitespace")(p):h(p)}function h(p){return p===null||X(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function CI(e,t,n){return r;function r(a){return St(a)?No(e,i)(a):n(a)}function i(a){return Hb(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return ce(a)?ke(e,o,"whitespace")(a):o(a)}function o(a){return a===null||X(a)?t(a):n(a)}}const PI={name:"hardBreakEscape",tokenize:jI};function jI(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return X(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const EI={name:"headingAtx",resolve:TI,tokenize:II};function TI(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"},An(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function II(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||St(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||X(u)?(e.exit("atxHeading"),t(u)):ce(u)?ke(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||St(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const RI=["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"],ox=["pre","script","style","textarea"],MI={concrete:!0,name:"htmlFlow",resolveTo:DI,tokenize:NI},LI={partial:!0,tokenize:OI},AI={partial:!0,tokenize:zI};function DI(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 NI(e,t,n){const r=this;let i,s,o,a,l;return c;function c(I){return u(I)}function u(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),d}function d(I){return I===33?(e.consume(I),h):I===47?(e.consume(I),s=!0,x):I===63?(e.consume(I),i=3,r.interrupt?t:C):Tn(I)?(e.consume(I),o=String.fromCharCode(I),w):n(I)}function h(I){return I===45?(e.consume(I),i=2,p):I===91?(e.consume(I),i=5,a=0,m):Tn(I)?(e.consume(I),i=4,r.interrupt?t:C):n(I)}function p(I){return I===45?(e.consume(I),r.interrupt?t:C):n(I)}function m(I){const ue="CDATA[";return I===ue.charCodeAt(a++)?(e.consume(I),a===ue.length?r.interrupt?t:L:m):n(I)}function x(I){return Tn(I)?(e.consume(I),o=String.fromCharCode(I),w):n(I)}function w(I){if(I===null||I===47||I===62||St(I)){const ue=I===47,me=o.toLowerCase();return!ue&&!s&&ox.includes(me)?(i=1,r.interrupt?t(I):L(I)):RI.includes(o.toLowerCase())?(i=6,ue?(e.consume(I),g):r.interrupt?t(I):L(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):s?y(I):v(I))}return I===45||Lt(I)?(e.consume(I),o+=String.fromCharCode(I),w):n(I)}function g(I){return I===62?(e.consume(I),r.interrupt?t:L):n(I)}function y(I){return ce(I)?(e.consume(I),y):j(I)}function v(I){return I===47?(e.consume(I),j):I===58||I===95||Tn(I)?(e.consume(I),b):ce(I)?(e.consume(I),v):j(I)}function b(I){return I===45||I===46||I===58||I===95||Lt(I)?(e.consume(I),b):k(I)}function k(I){return I===61?(e.consume(I),S):ce(I)?(e.consume(I),k):v(I)}function S(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),l=I,E):ce(I)?(e.consume(I),S):P(I)}function E(I){return I===l?(e.consume(I),l=null,T):I===null||X(I)?n(I):(e.consume(I),E)}function P(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||St(I)?k(I):(e.consume(I),P)}function T(I){return I===47||I===62||ce(I)?v(I):n(I)}function j(I){return I===62?(e.consume(I),R):n(I)}function R(I){return I===null||X(I)?L(I):ce(I)?(e.consume(I),R):n(I)}function L(I){return I===45&&i===2?(e.consume(I),B):I===60&&i===1?(e.consume(I),H):I===62&&i===4?(e.consume(I),$):I===63&&i===3?(e.consume(I),C):I===93&&i===5?(e.consume(I),W):X(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(LI,q,F)(I)):I===null||X(I)?(e.exit("htmlFlowData"),F(I)):(e.consume(I),L)}function F(I){return e.check(AI,D,q)(I)}function D(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),M}function M(I){return I===null||X(I)?F(I):(e.enter("htmlFlowData"),L(I))}function B(I){return I===45?(e.consume(I),C):L(I)}function H(I){return I===47?(e.consume(I),o="",z):L(I)}function z(I){if(I===62){const ue=o.toLowerCase();return ox.includes(ue)?(e.consume(I),$):L(I)}return Tn(I)&&o.length<8?(e.consume(I),o+=String.fromCharCode(I),z):L(I)}function W(I){return I===93?(e.consume(I),C):L(I)}function C(I){return I===62?(e.consume(I),$):I===45&&i===2?(e.consume(I),C):L(I)}function $(I){return I===null||X(I)?(e.exit("htmlFlowData"),q(I)):(e.consume(I),$)}function q(I){return e.exit("htmlFlow"),t(I)}}function zI(e,t,n){const r=this;return i;function i(o){return X(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function OI(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(wu,t,n)}}const FI={name:"htmlText",tokenize:BI};function BI(e,t,n){const r=this;let i,s,o;return a;function a(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),l}function l(C){return C===33?(e.consume(C),c):C===47?(e.consume(C),k):C===63?(e.consume(C),v):Tn(C)?(e.consume(C),P):n(C)}function c(C){return C===45?(e.consume(C),u):C===91?(e.consume(C),s=0,m):Tn(C)?(e.consume(C),y):n(C)}function u(C){return C===45?(e.consume(C),p):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),h):X(C)?(o=d,H(C)):(e.consume(C),d)}function h(C){return C===45?(e.consume(C),p):d(C)}function p(C){return C===62?B(C):C===45?h(C):d(C)}function m(C){const $="CDATA[";return C===$.charCodeAt(s++)?(e.consume(C),s===$.length?x:m):n(C)}function x(C){return C===null?n(C):C===93?(e.consume(C),w):X(C)?(o=x,H(C)):(e.consume(C),x)}function w(C){return C===93?(e.consume(C),g):x(C)}function g(C){return C===62?B(C):C===93?(e.consume(C),g):x(C)}function y(C){return C===null||C===62?B(C):X(C)?(o=y,H(C)):(e.consume(C),y)}function v(C){return C===null?n(C):C===63?(e.consume(C),b):X(C)?(o=v,H(C)):(e.consume(C),v)}function b(C){return C===62?B(C):v(C)}function k(C){return Tn(C)?(e.consume(C),S):n(C)}function S(C){return C===45||Lt(C)?(e.consume(C),S):E(C)}function E(C){return X(C)?(o=E,H(C)):ce(C)?(e.consume(C),E):B(C)}function P(C){return C===45||Lt(C)?(e.consume(C),P):C===47||C===62||St(C)?T(C):n(C)}function T(C){return C===47?(e.consume(C),B):C===58||C===95||Tn(C)?(e.consume(C),j):X(C)?(o=T,H(C)):ce(C)?(e.consume(C),T):B(C)}function j(C){return C===45||C===46||C===58||C===95||Lt(C)?(e.consume(C),j):R(C)}function R(C){return C===61?(e.consume(C),L):X(C)?(o=R,H(C)):ce(C)?(e.consume(C),R):T(C)}function L(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),i=C,F):X(C)?(o=L,H(C)):ce(C)?(e.consume(C),L):(e.consume(C),D)}function F(C){return C===i?(e.consume(C),i=void 0,M):C===null?n(C):X(C)?(o=F,H(C)):(e.consume(C),F)}function D(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||St(C)?T(C):(e.consume(C),D)}function M(C){return C===47||C===62||St(C)?T(C):n(C)}function B(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function H(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),z}function z(C){return ce(C)?ke(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):W(C)}function W(C){return e.enter("htmlTextData"),o(C)}}const am={name:"labelEnd",resolveAll:UI,resolveTo:HI,tokenize:GI},$I={tokenize:KI},VI={tokenize:YI},WI={tokenize:qI};function UI(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&&An(e,0,e.length,n),e}function HI(e,t){let n=e.length,r=0,i,s,o,a;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(o){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"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=Qt(a,e.slice(s+1,s+r+3)),a=Qt(a,[["enter",u,t]]),a=Qt(a,om(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=Qt(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=Qt(a,e.slice(o+1)),a=Qt(a,[["exit",l,t]]),An(e,s,e.length,a),e}function GI(e,t,n){const r=this;let i=r.events.length,s,o;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 a;function a(h){return s?s._inactive?d(h):(o=r.parser.defined.includes(ys(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt($I,u,o?u:d)(h):h===91?e.attempt(VI,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(WI,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function KI(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return St(d)?No(e,s)(d):s(d)}function s(d){return d===41?u(d):Wb(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return St(d)?No(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Hb(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return St(d)?No(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function YI(e,t,n){const r=this;return i;function i(a){return Ub.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(ys(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function qI(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 QI={name:"labelStartImage",resolveAll:am.resolveAll,tokenize:XI};function XI(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const JI={name:"labelStartLink",resolveAll:am.resolveAll,tokenize:ZI};function ZI(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const bd={name:"lineEnding",tokenize:eR};function eR(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ke(e,t,"linePrefix")}}const Bl={name:"thematicBreak",tokenize:tR};function tR(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||X(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ce(c)?ke(e,a,"whitespace")(c):a(c))}}const gt={continuation:{tokenize:sR},exit:aR,name:"list",tokenize:iR},nR={partial:!0,tokenize:lR},rR={partial:!0,tokenize:oR};function iR(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,o=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ph(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Bl,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return ph(p)&&++o<10?(e.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(wu,r.interrupt?n:u,e.attempt(nR,h,d))}function u(p){return r.containerState.initialBlankLine=!0,s++,h(p)}function d(p){return ce(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function sR(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(wu,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ke(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!ce(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rR,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ke(e,e.attempt(gt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function oR(e,t,n){const r=this;return ke(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function aR(e){e.exit(this.containerState.type)}function lR(e,t,n){const r=this;return ke(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!ce(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const ax={name:"setextUnderline",resolveTo:cR,tokenize:uR};function cR(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 o={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",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function uR(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),ce(c)?ke(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||X(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const dR={tokenize:fR};function fR(e){const t=this,n=e.attempt(wu,r,e.attempt(this.parser.constructs.flowInitial,i,ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yI,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 hR={resolveAll:Kb()},pR=Gb("string"),mR=Gb("text");function Gb(e){return{resolveAll:Kb(e==="text"?gR:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Kb(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 gR(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,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const yR={42:gt,43:gt,45:gt,48:gt,49:gt,50:gt,51:gt,52:gt,53:gt,54:gt,55:gt,56:gt,57:gt,62:Fb},xR={91:kI},vR={[-2]:wd,[-1]:wd,32:wd},wR={35:EI,42:Bl,45:[ax,Bl],60:MI,61:ax,95:Bl,96:sx,126:sx},bR={38:$b,92:Bb},kR={[-5]:bd,[-4]:bd,[-3]:bd,33:QI,38:$b,42:mh,60:[J2,FI],91:JI,92:[PI,Bb],93:am,95:mh,96:dI},SR={null:[mh,hR]},_R={null:[42,95]},CR={null:[]},PR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_R,contentInitial:xR,disable:CR,document:yR,flow:wR,flowInitial:vR,insideSpan:SR,string:bR,text:kR},Symbol.toStringTag,{value:"Module"}));function jR(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 o=[],a=[];const l={attempt:E(k),check:E(S),consume:y,enter:v,exit:b,interrupt:E(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(R){return o=Qt(o,R),w(),o[o.length-1]!==null?[]:(P(t,0),c.events=om(s,c.events,c),c.events)}function h(R,L){return TR(p(R),L)}function p(R){return ER(o,R)}function m(){const{_bufferIndex:R,_index:L,line:F,column:D,offset:M}=r;return{_bufferIndex:R,_index:L,line:F,column:D,offset:M}}function x(R){i[R.line]=R.column,j()}function w(){let R;for(;r._index<o.length;){const L=o[r._index];if(typeof L=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<L.length;)g(L.charCodeAt(r._bufferIndex));else g(L)}}function g(R){u=u(R)}function y(R){X(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,j()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function v(R,L){const F=L||{};return F.type=R,F.start=m(),c.events.push(["enter",F,c]),a.push(F),F}function b(R){const L=a.pop();return L.end=m(),c.events.push(["exit",L,c]),L}function k(R,L){P(R,L.from)}function S(R,L){L.restore()}function E(R,L){return F;function F(D,M,B){let H,z,W,C;return Array.isArray(D)?q(D):"tokenize"in D?q([D]):$(D);function $(he){return Pt;function Pt(Ge){const Wt=Ge!==null&&he[Ge],gn=Ge!==null&&he.null,Fn=[...Array.isArray(Wt)?Wt:Wt?[Wt]:[],...Array.isArray(gn)?gn:gn?[gn]:[]];return q(Fn)(Ge)}}function q(he){return H=he,z=0,he.length===0?B:I(he[z])}function I(he){return Pt;function Pt(Ge){return C=T(),W=he,he.partial||(c.currentConstruct=he),he.name&&c.parser.constructs.disable.null.includes(he.name)?me():he.tokenize.call(L?Object.assign(Object.create(c),L):c,l,ue,me)(Ge)}}function ue(he){return R(W,C),M}function me(he){return C.restore(),++z<H.length?I(H[z]):B}}}function P(R,L){R.resolveAll&&!s.includes(R)&&s.push(R),R.resolve&&An(c.events,L,c.events.length-L,R.resolve(c.events.slice(L),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function T(){const R=m(),L=c.previous,F=c.currentConstruct,D=c.events.length,M=Array.from(a);return{from:D,restore:B};function B(){r=R,c.previous=L,c.currentConstruct=F,c.events.length=D,a=M,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ER(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function TR(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
59
- `;break}case-3:{o=`\r
60
- `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function IR(e){const r={constructs:z2([PR,...(e||{}).extensions||[]]),content:i(H2),defined:[],document:i(K2),flow:i(dR),lazy:{},string:i(pR),text:i(mR)};return r;function i(s){return o;function o(a){return jR(r,s,a)}}}function RR(e){for(;!Vb(e););return e}const lx=/[\0\t\n\r]/g;function MR(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,d,h,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(lx.lastIndex=d,c=lx.exec(s),h=c&&c.index!==void 0?c.index:s.length,p=s.charCodeAt(h),!c){t=s.slice(d);break}if(p===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const LR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AR(e){return e.replace(LR,DR)}function DR(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Ob(n.slice(s?2:1),s?16:10)}return sm(n)||e}const Yb={}.hasOwnProperty;function NR(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),zR(n)(RR(IR(n).document().write(MR()(e,t,!0))))}function zR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ni),autolinkProtocol:T,autolinkEmail:T,atxHeading:s(Aa),blockQuote:s(gn),characterEscape:T,characterReference:T,codeFenced:s(Fn),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Fn,o),codeText:s(Di,o),codeTextData:T,data:T,codeFlowValue:T,definition:s(Ma),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(La),hardBreakEscape:s(Ks),hardBreakTrailing:s(Ks),htmlFlow:s(Ys,o),htmlFlowData:T,htmlText:s(Ys,o),htmlTextData:T,image:s(or),label:o,link:s(Ni),listItem:s(Du),listItemValue:h,listOrdered:s(yn,d),listUnordered:s(yn),paragraph:s(Da),reference:I,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Aa),strong:s(Nu),thematicBreak:s(pe)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:Wt,autolinkProtocol:Ge,blockQuote:l(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:he,characterReference:Pt,codeFenced:l(w),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:j,codeIndented:l(g),codeText:l(M),codeTextData:j,data:j,definition:l(),definitionDestinationString:b,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(L),hardBreakTrailing:l(L),htmlFlow:l(F),htmlFlowData:j,htmlText:l(D),htmlTextData:j,image:l(H),label:W,labelText:z,lineEnding:R,link:l(B),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ue,resourceDestinationString:C,resourceTitleString:$,resource:q,setextHeading:l(P),setextHeadingLineSequence:E,setextHeadingText:S,strong:l(),thematicBreak:l()}};qb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let G={type:"root",children:[]};const Z={stack:[G],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},oe=[];let ge=-1;for(;++ge<N.length;)if(N[ge][1].type==="listOrdered"||N[ge][1].type==="listUnordered")if(N[ge][0]==="enter")oe.push(ge);else{const rn=oe.pop();ge=i(N,rn,ge)}for(ge=-1;++ge<N.length;){const rn=t[N[ge][0]];Yb.call(rn,N[ge][1].type)&&rn[N[ge][1].type].call(Object.assign({sliceSerialize:N[ge][2].sliceSerialize},Z),N[ge][1])}if(Z.tokenStack.length>0){const rn=Z.tokenStack[Z.tokenStack.length-1];(rn[1]||cx).call(Z,void 0,rn[0])}for(G.position={start:lr(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:lr(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},ge=-1;++ge<t.transforms.length;)G=t.transforms[ge](G)||G;return G}function i(N,G,Z){let oe=G-1,ge=-1,rn=!1,Zr,Bn,qs,Qs;for(;++oe<=Z;){const jt=N[oe];switch(jt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{jt[0]==="enter"?ge++:ge--,Qs=void 0;break}case"lineEndingBlank":{jt[0]==="enter"&&(Zr&&!Qs&&!ge&&!qs&&(qs=oe),Qs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qs=void 0}if(!ge&&jt[0]==="enter"&&jt[1].type==="listItemPrefix"||ge===-1&&jt[0]==="exit"&&(jt[1].type==="listUnordered"||jt[1].type==="listOrdered")){if(Zr){let zi=oe;for(Bn=void 0;zi--;){const $n=N[zi];if($n[1].type==="lineEnding"||$n[1].type==="lineEndingBlank"){if($n[0]==="exit")continue;Bn&&(N[Bn][1].type="lineEndingBlank",rn=!0),$n[1].type="lineEnding",Bn=zi}else if(!($n[1].type==="linePrefix"||$n[1].type==="blockQuotePrefix"||$n[1].type==="blockQuotePrefixWhitespace"||$n[1].type==="blockQuoteMarker"||$n[1].type==="listItemIndent"))break}qs&&(!Bn||qs<Bn)&&(Zr._spread=!0),Zr.end=Object.assign({},Bn?N[Bn][1].start:jt[1].end),N.splice(Bn||oe,0,["exit",Zr,jt[2]]),oe++,Z++}if(jt[1].type==="listItemPrefix"){const zi={type:"listItem",_spread:!1,start:Object.assign({},jt[1].start),end:void 0};Zr=zi,N.splice(oe,0,["enter",zi,jt[2]]),oe++,Z++,qs=void 0,Qs=!0}}}return N[G][1]._spread=rn,Z}function s(N,G){return Z;function Z(oe){a.call(this,N(oe),oe),G&&G.call(this,oe)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(N,G,Z){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([G,Z||void 0]),N.position={start:lr(G.start),end:void 0}}function l(N){return G;function G(Z){N&&N.call(this,Z),c.call(this,Z)}}function c(N,G){const Z=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==N.type&&(G?G.call(this,N,oe[0]):(oe[1]||cx).call(this,N,oe[0]));else throw new Error("Cannot close `"+N.type+"` ("+Do({start:N.start,end:N.end})+"): it’s not open");Z.position.end=lr(N.end)}function u(){return D2(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(N){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function p(){const N=this.resume(),G=this.stack[this.stack.length-1];G.lang=N}function m(){const N=this.resume(),G=this.stack[this.stack.length-1];G.meta=N}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N.replace(/(\r?\n|\r)$/g,"")}function y(N){const G=this.resume(),Z=this.stack[this.stack.length-1];Z.label=G,Z.identifier=ys(this.sliceSerialize(N)).toLowerCase()}function v(){const N=this.resume(),G=this.stack[this.stack.length-1];G.title=N}function b(){const N=this.resume(),G=this.stack[this.stack.length-1];G.url=N}function k(N){const G=this.stack[this.stack.length-1];if(!G.depth){const Z=this.sliceSerialize(N).length;G.depth=Z}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function E(N){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function T(N){const Z=this.stack[this.stack.length-1].children;let oe=Z[Z.length-1];(!oe||oe.type!=="text")&&(oe=Na(),oe.position={start:lr(N.start),end:void 0},Z.push(oe)),this.stack.push(oe)}function j(N){const G=this.stack.pop();G.value+=this.sliceSerialize(N),G.position.end=lr(N.end)}function R(N){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Z=G.children[G.children.length-1];Z.position.end=lr(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(T.call(this,N),j.call(this,N))}function L(){this.data.atHardBreak=!0}function F(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N}function D(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N}function M(){const N=this.resume(),G=this.stack[this.stack.length-1];G.value=N}function B(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=G,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function H(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=G,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function z(N){const G=this.sliceSerialize(N),Z=this.stack[this.stack.length-2];Z.label=AR(G),Z.identifier=ys(G).toLowerCase()}function W(){const N=this.stack[this.stack.length-1],G=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){const oe=N.children;Z.children=oe}else Z.alt=G}function C(){const N=this.resume(),G=this.stack[this.stack.length-1];G.url=N}function $(){const N=this.resume(),G=this.stack[this.stack.length-1];G.title=N}function q(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ue(N){const G=this.resume(),Z=this.stack[this.stack.length-1];Z.label=G,Z.identifier=ys(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function me(N){this.data.characterReferenceType=N.type}function he(N){const G=this.sliceSerialize(N),Z=this.data.characterReferenceType;let oe;Z?(oe=Ob(G,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=sm(G);const ge=this.stack[this.stack.length-1];ge.value+=oe}function Pt(N){const G=this.stack.pop();G.position.end=lr(N.end)}function Ge(N){j.call(this,N);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(N)}function Wt(N){j.call(this,N);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(N)}function gn(){return{type:"blockquote",children:[]}}function Fn(){return{type:"code",lang:null,meta:null,value:""}}function Di(){return{type:"inlineCode",value:""}}function Ma(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function La(){return{type:"emphasis",children:[]}}function Aa(){return{type:"heading",depth:0,children:[]}}function Ks(){return{type:"break"}}function Ys(){return{type:"html",value:""}}function or(){return{type:"image",title:null,url:"",alt:null}}function Ni(){return{type:"link",title:null,url:"",children:[]}}function yn(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function Du(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function Da(){return{type:"paragraph",children:[]}}function Nu(){return{type:"strong",children:[]}}function Na(){return{type:"text",value:""}}function pe(){return{type:"thematicBreak"}}}function lr(e){return{line:e.line,column:e.column,offset:e.offset}}function qb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?qb(e,r):OR(e,r)}}function OR(e,t){let n;for(n in t)if(Yb.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 cx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Do({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Do({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Do({start:t.start,end:t.end})+") is still open")}function FR(e){const t=this;t.parser=n;function n(r){return NR(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function BR(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 $R(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
61
- `}]}function VR(e,t){const n=t.value?t.value+`
62
- `:"",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 WR(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UR(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HR(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Bs(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function GR(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 KR(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Qb(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 o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function YR(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qb(e,t);const i={src:Bs(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 qR(e,t){const n={src:Bs(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 QR(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 XR(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qb(e,t);const i={href:Bs(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 JR(e,t){const n={href:Bs(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 ZR(e,t,n){const r=e.all(t),i=n?eM(n):Xb(t),s={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
63
- `}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
64
- `});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function eM(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=Xb(n[r])}return t}function Xb(e){const t=e.spread;return t??e.children.length>1}function tM(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const 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 nM(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rM(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function iM(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sM(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=tm(t.children[1]),l=Rb(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function oM(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<a;){const d=t.children[l],h={},p=o?o[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:s,properties:h,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),c.push(m)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function aM(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ux=9,dx=32;function lM(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(fx(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(fx(t.slice(i),i>0,!1)),s.join("")}function fx(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===ux||s===dx;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===ux||s===dx;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function cM(e,t){const n={type:"text",value:lM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function uM(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const dM={blockquote:BR,break:$R,code:VR,delete:WR,emphasis:UR,footnoteReference:HR,heading:GR,html:KR,imageReference:YR,image:qR,inlineCode:QR,linkReference:XR,link:JR,listItem:ZR,list:tM,paragraph:nM,root:rM,strong:iM,table:sM,tableCell:aM,tableRow:oM,text:cM,thematicBreak:uM,toml:il,yaml:il,definition:il,footnoteDefinition:il};function il(){}const Jb=-1,bu=0,zo=1,Rc=2,lm=3,cm=4,um=5,dm=6,Zb=7,ek=8,fM=typeof self=="object"?self:globalThis,hx=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new fM[e](t)},hM=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case bu:case Jb:return n(o,i);case zo:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Rc:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case lm:return n(new Date(o),i);case cm:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case um:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case dm:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case Zb:{const{name:a,message:l}=o;return n(hx(a,l),i)}case ek:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(hx(s,o),i)};return r},px=e=>hM(new Map,e)(0),Bi="",{toString:pM}={},{keys:mM}=Object,uo=e=>{const t=typeof e;if(t!=="object"||!e)return[bu,t];const n=pM.call(e).slice(8,-1);switch(n){case"Array":return[zo,Bi];case"Object":return[Rc,Bi];case"Date":return[lm,Bi];case"RegExp":return[cm,Bi];case"Map":return[um,Bi];case"Set":return[dm,Bi];case"DataView":return[zo,n]}return n.includes("Array")?[zo,n]:n.includes("Error")?[Zb,n]:[Rc,n]},sl=([e,t])=>e===bu&&(t==="function"||t==="symbol"),gM=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=uo(o);switch(a){case bu:{let u=o;switch(l){case"bigint":a=ek,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([Jb],o)}return i([a,u],o)}case zo:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const u=[],d=i([a,u],o);for(const h of o)u.push(s(h));return d}case Rc:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const u=[],d=i([a,u],o);for(const h of mM(o))(e||!sl(uo(o[h])))&&u.push([s(h),s(o[h])]);return d}case lm:return i([a,o.toISOString()],o);case cm:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case um:{const u=[],d=i([a,u],o);for(const[h,p]of o)(e||!(sl(uo(h))||sl(uo(p))))&&u.push([s(h),s(p)]);return d}case dm:{const u=[],d=i([a,u],o);for(const h of o)(e||!sl(uo(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},mx=(e,{json:t,lossy:n}={})=>{const r=[];return gM(!(t||n),!!t,new Map,r)(e),r},Mc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?px(mx(e,t)):structuredClone(e):(e,t)=>px(mx(e,t));function yM(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 xM(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function vM(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||yM,r=e.options.footnoteBackLabel||xM,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=Bs(d.toLowerCase());let p=0;const m=[],x=e.footnoteCounts.get(d);for(;x!==void 0&&++p<=x;){m.length>0&&m.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,p);typeof y=="string"&&(y={type:"text",value:y}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const w=u[u.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const y=w.children[w.children.length-1];y&&y.type==="text"?y.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else u.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Mc(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
65
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
66
- `}]}}const tk=function(e){if(e==null)return SM;if(typeof e=="function")return ku(e);if(typeof e=="object")return Array.isArray(e)?wM(e):bM(e);if(typeof e=="string")return kM(e);throw new Error("Expected function, string, or object as test")};function wM(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tk(e[n]);return ku(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function bM(e){const t=e;return ku(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function kM(e){return ku(t);function t(n){return n&&n.type===e}}function ku(e){return t;function t(n,r,i){return!!(_M(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function SM(){return!0}function _M(e){return e!==null&&typeof e=="object"&&"type"in e}const nk=[],CM=!0,gx=!1,PM="skip";function jM(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=tk(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=nk,m,x,w;if((!t||s(l,c,u[u.length-1]||void 0))&&(p=EM(n(l,u)),p[0]===gx))return p;if("children"in l&&l.children){const g=l;if(g.children&&p[0]!==PM)for(x=(r?g.children.length:-1)+o,w=u.concat(g);x>-1&&x<g.children.length;){const y=g.children[x];if(m=a(y,x,w)(),m[0]===gx)return m;x=typeof m[1]=="number"?m[1]:x+o}}return p}}}function EM(e){return Array.isArray(e)?e:typeof e=="number"?[CM,e]:e==null?nk:[e]}function rk(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),jM(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const gh={}.hasOwnProperty,TM={};function IM(e,t){const n=t||TM,r=new Map,i=new Map,s=new Map,o={...dM,...n.handlers},a={all:c,applyData:MM,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:RM,wrap:AM};return rk(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,p=a.handlers[h];if(gh.call(a.handlers,h)&&p)return p(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:x,...w}=u,g=Mc(w);return g.children=a.all(u),g}return Mc(u)}return(a.options.unknownHandler||LM)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],u);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=yx(m.value)),!Array.isArray(m)&&m.type==="element")){const x=m.children[0];x&&x.type==="text"&&(x.value=yx(x.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function RM(e,t){e.position&&(t.position=h2(e))}function MM(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 o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Mc(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function LM(e,t){const n=t.data||{},r="value"in t&&!(gh.call(n,"hProperties")||gh.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 AM(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
67
- `});++r<e.length;)r&&n.push({type:"text",value:`
68
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
69
- `}),n}function yx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xx(e,t){const n=IM(e,t),r=n.one(e,void 0),i=vM(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
70
- `},i),s}function DM(e,t){return e&&"run"in e?async function(n,r){const i=xx(n,{file:r,...t});await e.run(i,r)}:function(n,r){return xx(n,{file:r,...e||t})}}function vx(e){if(e)throw e}var $l=Object.prototype.hasOwnProperty,ik=Object.prototype.toString,wx=Object.defineProperty,bx=Object.getOwnPropertyDescriptor,kx=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ik.call(t)==="[object Array]"},Sx=function(t){if(!t||ik.call(t)!=="[object Object]")return!1;var n=$l.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&$l.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||$l.call(t,i)},_x=function(t,n){wx&&n.name==="__proto__"?wx(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Cx=function(t,n){if(n==="__proto__")if($l.call(t,n)){if(bx)return bx(t,n).value}else return;return t[n]},NM=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=Cx(a,n),i=Cx(t,n),a!==i&&(u&&i&&(Sx(i)||(s=kx(i)))?(s?(s=!1,o=r&&kx(r)?r:[]):o=r&&Sx(r)?r:{},_x(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&_x(a,{name:n,newValue:i}));return a};const kd=Jc(NM);function yh(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 zM(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?OM(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function OM(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const Sn={basename:FM,dirname:BM,extname:$M,join:VM,sep:"/"};function FM(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ba(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 o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function BM(e){if(ba(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 $M(e){ba(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===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 VM(...e){let t=-1,n;for(;++t<e.length;)ba(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":WM(n)}function WM(e){ba(e);const t=e.codePointAt(0)===47;let n=UM(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function UM(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-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(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const HM={cwd:GM};function GM(){return"/"}function xh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function KM(e){if(typeof e=="string")e=new URL(e);else if(!xh(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 YM(e)}function YM(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 Sd=["history","path","basename","stem","extname","dirname"];class sk{constructor(t){let n;t?xh(t)?n={path:t}:typeof t=="string"||qM(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":HM.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Sd.length;){const s=Sd[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)Sd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Sn.basename(this.path):void 0}set basename(t){Cd(t,"basename"),_d(t,"basename"),this.path=Sn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Sn.dirname(this.path):void 0}set dirname(t){Px(this.basename,"dirname"),this.path=Sn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Sn.extname(this.path):void 0}set extname(t){if(_d(t,"extname"),Px(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Sn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){xh(t)&&(t=KM(t)),Cd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Sn.basename(this.path,this.extname):void 0}set stem(t){Cd(t,"stem"),_d(t,"stem"),this.path=Sn.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 at(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 _d(e,t){if(e&&e.includes(Sn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Sn.sep+"`")}function Cd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Px(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function qM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QM=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},XM={}.hasOwnProperty;class fm extends QM{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=zM()}copy(){const t=new fm;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(kd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ed("data",this.frozen),this.namespace[t]=n,this):XM.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ed("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=ol(t),r=this.parser||this.Parser;return Pd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Pd("process",this.parser||this.Parser),jd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=ol(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const p=d,m=r.stringify(p,h);eL(m)?h.value=m:h.result=m,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Pd("processSync",this.parser||this.Parser),jd("processSync",this.compiler||this.Compiler),this.process(t,i),Ex("processSync","process",n),r;function i(s,o){n=!0,vx(s),r=o}}run(t,n,r){jx(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(o,a){const l=ol(n);i.run(t,l,c);function c(u,d,h){const p=d||t;u?a(u):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Ex("runSync","run",r),i;function s(o,a){vx(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=ol(n),i=this.compiler||this.Compiler;return jd("stringify",i),jx(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ed("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))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");a(c.plugins),c.settings&&(i.settings=kd(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[p,...m]=u;const x=r[h][1];yh(x)&&yh(p)&&(p=kd(!0,x,p)),r[h]=[c,p,...m]}}}}const JM=new fm().freeze();function Pd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ed(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 jx(e){if(!yh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ex(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ol(e){return ZM(e)?e:new sk(e)}function ZM(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eL(e){return typeof e=="string"||tL(e)}function tL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tx=[],Ix={allowDangerousHtml:!0},rL=/^(https?|ircs?|mailto|xmpp)$/i,iL=[{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 sL(e){const t=oL(e),n=aL(e);return lL(t.runSync(t.parse(n),n),e)}function oL(e){const t=e.rehypePlugins||Tx,n=e.remarkPlugins||Tx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ix}:Ix;return JM().use(FR).use(n).use(DM,r).use(t)}function aL(e){const t=e.children||"",n=new sk;return typeof t=="string"&&(n.value=t),n}function lL(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||cL;for(const u of iL)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+nL+u.id,void 0);return rk(e,c),x2(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let p;for(p in vd)if(Object.hasOwn(vd,p)&&Object.hasOwn(u.properties,p)){const m=u.properties[p],x=vd[p];(x===null||x.includes(u.tagName))&&(u.properties[p]=l(String(m||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(u,d,h)),p&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function cL(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||rL.test(e.slice(0,t))?e:""}const Td=e=>({fontFamily:De.serif,fontWeight:600,fontSize:e,margin:`${A[6]} 0 ${A[3]}`,lineHeight:1.25}),uL={p:({children:e})=>f.jsx("p",{style:{margin:`0 0 ${A[4]}`},children:e}),strong:({children:e})=>f.jsx("strong",{style:{fontWeight:700},children:e}),h1:({children:e})=>f.jsx("h1",{style:Td(te.lg),children:e}),h2:({children:e})=>f.jsx("h2",{style:Td("1.3rem"),children:e}),h3:({children:e})=>f.jsx("h3",{style:Td("1.1rem"),children:e}),a:({children:e,href:t})=>f.jsx("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:ie.accentAmberDark},children:e}),code:({children:e})=>f.jsx("code",{style:{fontFamily:De.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:3,padding:"0.1em 0.35em"},children:e}),pre:({children:e})=>f.jsx("pre",{style:{fontFamily:De.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:6,padding:`${A[3]} ${A[4]}`,overflowX:"auto",margin:`0 0 ${A[4]}`},children:e}),ul:({children:e})=>f.jsx("ul",{style:{listStyle:"disc",margin:`0 0 ${A[4]}`,paddingLeft:"1.4rem"},children:e}),ol:({children:e})=>f.jsx("ol",{style:{listStyle:"decimal",margin:`0 0 ${A[4]}`,paddingLeft:"1.4rem"},children:e}),li:({children:e})=>f.jsx("li",{style:{marginBottom:"0.4rem"},children:e}),blockquote:({children:e})=>f.jsx("blockquote",{style:{margin:`0 0 ${A[4]}`,paddingLeft:A[4],borderLeft:"3px solid rgba(0,0,0,0.15)",opacity:.85},children:e})},ok=({children:e})=>f.jsx(sL,{components:uL,children:e}),Lc=e=>{const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=Math.floor((Date.now()-t.getTime())/864e5);return n<=0?"today":n===1?"yesterday":n<7?`${n}d ago`:n<30?`${Math.floor(n/7)}w ago`:n<365?`${Math.floor(n/30)}mo ago`:`${Math.floor(n/365)}y ago`},hm=e=>{if(e.phases.length===0)return null;const t=e.phases.filter(n=>n.done).length;return{done:t,total:e.phases.length,pct:Math.round(t/e.phases.length*100)}},Rx=e=>{var t;return((t=hm(e))==null?void 0:t.pct)??null},ak=(e,t)=>e?t.find(n=>n.planId===e&&n.status!=="done"&&n.status!=="error"):void 0,pm=(e,t)=>e.status==="done"||e.status==="dropped"?e.status:ak(e.id,t)?"in-progress":e.status,dL=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")};function Id(e,t){const n=e.split(/(\s+)/).filter(u=>u!==""),r=t.split(/(\s+)/).filter(u=>u!==""),i=n.length,s=r.length,o=Array.from({length:i+1},()=>new Array(s+1).fill(0));for(let u=i-1;u>=0;u--)for(let d=s-1;d>=0;d--)o[u][d]=n[u]===r[d]?o[u+1][d+1]+1:Math.max(o[u+1][d],o[u][d+1]);const a=[];let l=0,c=0;for(;l<i&&c<s;)n[l]===r[c]?(a.push({type:"same",text:n[l]}),l++,c++):o[l+1][c]>=o[l][c+1]?(a.push({type:"removed",text:n[l]}),l++):(a.push({type:"added",text:r[c]}),c++);for(;l<i;)a.push({type:"removed",text:n[l]}),l++;for(;c<s;)a.push({type:"added",text:r[c]}),c++;return fL(a)}function fL(e){const t=[];for(const n of e){const r=t[t.length-1];r&&r.type===n.type?r.text+=n.text:t.push({...n})}return t}const hL=["idea","planned","in-progress","review","done","dropped"],pL=["feat","fix","chore","docs","refactor"],mL=["claude-code","opencode"],lk={"claude-code":"Claude Code",opencode:"OpenCode"},HW={"claude-code":{model:["opus","sonnet","fable","haiku"],effort:["low","medium","high","xhigh","max"]},opencode:{model:null}},GW={phase:{agent:"opencode"},planDraft:{agent:"claude-code"},ideaExtend:{agent:"claude-code"},commitSuggest:{agent:"claude-code"}},gL=["in-progress","review","planned","idea"],yL=["open"],mm={statuses:gL,tags:[],search:"",sortKey:"order",sortDirection:"asc",noteStatuses:yL,subject:null},Mx={"in-progress":0,review:1,planned:2,idea:3,done:4,dropped:5},al=e=>{const t=new Date(e.updated??e.created).getTime();return Number.isNaN(t)?0:t},Lx=e=>{const t=new Date(e.created).getTime();return Number.isNaN(t)?0:t},Ax=e=>{var n;const t=(n=e.id)==null?void 0:n.match(/(\d+)\s*$/);return t?Number(t[1]):Number.POSITIVE_INFINITY},Rd=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},Dx=(e,t)=>t.size===0?!0:e.tags.some(n=>t.has(n)),Oo=(e,t)=>t===null||e===t,gm=(e,t,n,r="asc")=>{if(n==="order")return e.order!==void 0&&t.order!==void 0?(r==="desc"?-1:1)*(e.order-t.order):e.order!==void 0?-1:t.order!==void 0?1:Lx(e)-Lx(t);const i=(()=>{switch(n){case"status":{const s=Mx[e.status]-Mx[t.status];return s!==0?s:al(t)-al(e)}case"updated":return al(t)-al(e);case"title":return e.title.localeCompare(t.title);case"id":return Ax(e)-Ax(t);case"progress":return(Rx(t)??-1)-(Rx(e)??-1);default:return 0}})();return r==="desc"?-i:i},vh=(e,t)=>{const n={};for(const r of e)for(const i of t(r))n[String(i)]=(n[String(i)]??0)+1;return n},Vl=(e,t=mm)=>{const n=new Set(t.tags),r=new Set(t.statuses),i=vh(e.filter(a=>Dx(a,n)&&Rd(a,t.search)&&Oo(a.subject,t.subject)),a=>[a.status]);for(const a of hL)i[a]??(i[a]=0);const s=vh(e.filter(a=>r.has(a.status)&&Rd(a,t.search)&&Oo(a.subject,t.subject)),a=>a.tags);return{rows:e.filter(a=>r.has(a.status)&&Dx(a,n)&&Rd(a,t.search)&&Oo(a.subject,t.subject)).sort((a,l)=>gm(a,l,t.sortKey,t.sortDirection)),statusCounts:i,tagCounts:s}},xL=["open","done","dropped"],vL={open:"idea",done:"done",dropped:"dropped"},Md=(e,t)=>{const n=t.trim().toLowerCase();return n?e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n):!0},wL=e=>e.type==="plan"?e.plan.subject:e.idea.subject,bL=(e,t)=>{var o;const n=[],r=new Map,i=[];for(const a of e){const l=wL(a);if(!l||t&&!t.includes(l)){i.push(a);continue}r.has(l)||(n.push(l),r.set(l,[])),(o=r.get(l))==null||o.push(a)}const s=n.map(a=>({subject:a,rows:r.get(a)??[]}));return i.length>0&&s.push({subject:null,rows:i}),s},Nx=e=>e.type==="plan"?e.plan:e.type==="note"?{title:e.idea.title,id:e.idea.id??void 0,status:vL[e.idea.status??"open"],created:e.idea.created??"",tags:[],body:e.idea.body,phases:[],order:e.idea.order}:{...(e.children.length>0?[...e.children].sort((n,r)=>gm(n,r,"status"))[0]:void 0)??{status:"idea",created:e.idea.created??"",tags:[],body:e.idea.body,phases:[]},title:e.idea.title,id:e.idea.id??void 0,order:e.idea.order},kL=(e,t,n=mm)=>{const{statusCounts:r,tagCounts:i}=Vl(e,n),s=t.filter(p=>p.kind==="note"),o=t.filter(p=>p.kind!=="note"),a=new Set(o.map(p=>p.id).filter(p=>!!p)),l=new Map,c=[];for(const p of e)if(p.idea&&a.has(p.idea)){const m=l.get(p.idea)??[];m.push(p),l.set(p.idea,m)}else c.push(p);const u=new Set(n.noteStatuses),d=vh(s.filter(p=>Md(p,n.search)),p=>[p.status??"open"]);for(const p of xL)d[p]??(d[p]=0);const h=Vl(c,n).rows.map(p=>({type:"plan",plan:p}));for(const p of o){const m=p.id?l.get(p.id)??[]:[],x=Vl(m,n).rows;!Oo(p.subject,n.subject)&&x.length===0||x.length===0&&(m.length>0||!Md(p,n.search))||h.push({type:"idea-group",idea:p,children:x})}for(const p of s)u.has(p.status??"open")&&Md(p,n.search)&&Oo(p.subject,n.subject)&&h.push({type:"note",idea:p});return h.sort((p,m)=>gm(Nx(p),Nx(m),n.sortKey,n.sortDirection)),{rows:h,statusCounts:r,tagCounts:i,noteStatusCounts:d}},SL=.2,_L=5,ck=3,uk=2,dk=1,CL=ck+uk+dk,PL=new Set(["a","an","the","and","or","of","to","in","on","for","is","at","with","this","that","it","as","be","by","are","was","were","from","into","so","but","not","its"]),ll=e=>{const t=e.toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>=2&&!PL.has(n));return new Set(t)},Ld=(e,t)=>{let n=0;for(const r of e)t.has(r)&&(n+=1);return n};function jL(e,t,n={}){const{threshold:r=SL,limit:i=_L}=n,s=ll(e);if(s.size===0)return[];const o=[];for(const a of t){const l=ll(a.title),c=ll(a.body),u=ll((a.tags??[]).join(" ")),h=(Ld(s,l)*ck+Ld(s,u)*uk+Ld(s,c)*dk)/(s.size*CL);h>=r&&o.push({candidate:a,score:h})}return o.sort((a,l)=>l.score-a.score),o.slice(0,i)}const EL=e=>{if(!e.file)return;const t=e.line_start??e.line;if(!t)return e.file;const n=e.line_end&&e.line_end!==t?`-${e.line_end}`:"";return`${e.file}:${t}${n}`},TL=(e,t)=>{const n=e.description??e.title??e.summary;if(!(n!=null&&n.trim()))throw new Error(`Finding ${t+1} has no description/title/summary`);const r=[EL(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},IL=e=>{let t;try{t=JSON.parse(e)}catch{throw new Error("Not valid JSON")}const n=Array.isArray(t)?t:Array.isArray(t==null?void 0:t.findings)?t.findings:null;if(!n)throw new Error('Expected a JSON array of findings, or an object with a "findings" array');if(n.length===0)throw new Error("No findings to add");return n.map((r,i)=>TL(r,i))},fk=async()=>{const e=await fetch("/api/capabilities");return e.ok?(await e.json()).capabilities:null},hk=async()=>{try{const e=await fetch("/api/config");return e.ok?e.json():null}catch{return null}},RL=async e=>{try{const t=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)return{ok:!0};const n=await t.json().catch(()=>null);return{ok:!1,error:n==null?void 0:n.error}}catch(t){return{ok:!1,error:t.message}}},ML=async()=>{try{const e=await fetch("/api/icon");if(!e.ok)return null;const t=await e.blob();return new Promise(n=>{const r=new FileReader;r.onloadend=()=>n(r.result),r.readAsDataURL(t)})}catch{return null}},KW=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},LL=async()=>{try{const e=await fetch("/api/package-name");return e.ok?e.json():null}catch{return null}},AL={},zx=e=>{let t;const n=new Set,r=(u,d)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const p=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(m=>m(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(AL?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},DL=e=>e?zx(e):zx,pk={},{useDebugValue:NL}=vs,{useSyncExternalStoreWithSelector:zL}=UE;let Ox=!1;const OL=e=>e;function FL(e,t=OL,n){(pk?"production":void 0)!=="production"&&n&&!Ox&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Ox=!0);const r=zL(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return NL(r),r}const Fx=e=>{(pk?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?DL(e):e,n=(r,i)=>FL(t,r,i);return Object.assign(n,t),n},BL=e=>e?Fx(e):Fx,zn=async(e,t="Launch failed")=>{if(!e.ok){const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}},$L=async()=>(await fetch("/api/agent/status")).json(),VL=async()=>(await fetch("/api/agent/reconcile-queue")).json(),WL=async(e,t)=>{const n=await fetch("/api/agent/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,phaseIndex:t})});await zn(n)},UL=async(e,t)=>{const n=await fetch("/api/agent/launch-audit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,prompt:t})});await zn(n)},HL=async(e,t)=>{const n=await fetch("/api/agent/launch-reconcile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,prompt:t})});await zn(n)},GL=async(e,t)=>{const n=await fetch("/api/agent/launch-draft",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ideaId:e,prompt:t})});await zn(n)},KL=async(e,t)=>{const n=await fetch("/api/agent/launch-extend",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ideaId:e,prompt:t})});await zn(n)},YL=async e=>{const t=await fetch("/api/agent/launch-suggest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})});await zn(t)},qL=async()=>{const e=await fetch("/api/agent/launch-reconcile-all",{method:"POST"});await zn(e)},QL=async e=>{const t=await fetch("/api/agent/launch-run-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});await zn(t)},XL=async e=>{const t=await fetch("/api/agent/launch-fix-review",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});await zn(t)},JL=async e=>{const t=await fetch("/api/agent/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e})});await zn(t,"Stop failed")},ZL=async()=>(await fetch("/api/tasks")).json(),YW=async e=>{const t=await fetch(`/api/tasks/log?id=${encodeURIComponent(e)}`);if(!t.ok)throw new Error(`Failed to fetch task log: ${t.status}`);return t.json()},eA=async()=>(await fetch("/api/suggestions")).json(),tA=async e=>{const t=await fetch("/api/suggestions/promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({suggestion:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to promote suggestion"}));throw new Error(n.error)}return t.json()},nA=async e=>{const t=await fetch("/api/suggestions/dismiss",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({suggestion:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to dismiss suggestion"}));throw new Error(n.error)}},rA=async()=>(await fetch("/api/docs")).json(),qW=async()=>{const e=await fetch("/api/roadmap");if(!e.ok)throw new Error(`Failed to fetch roadmap: ${e.status}`);return e.json()},iA=async(e,t,n,r)=>{const i=await fetch("/api/roadmap/promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({horizonTitle:e,item:t,subject:n,candidateName:r})});if(!i.ok){const s=await i.json().catch(()=>({error:"Failed to promote roadmap item"}));throw new Error(s.error)}return i.json()},sA=async()=>(await fetch("/api/consistency")).json(),oA=async()=>(await fetch("/api/ideas")).json(),aA=async()=>(await fetch("/api/archivable-ideas")).json(),lA=async e=>{const t=await fetch("/api/ideas/archive",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:e})}),n=await t.json();if(!t.ok)throw new Error(n.error??"Failed to archive ideas");return n},cA=async e=>{const t=await fetch("/api/ideas",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw new Error(n.error??"Failed to create idea");return n.id},mk=async(e,t)=>{const n=await fetch("/api/ideas/check-overlap",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,candidates:t})}),r=await n.json();if(!n.ok)throw new Error(r.error??"Failed to check overlap");return r},uA=async()=>(await fetch("/api/plans")).json(),dA=async e=>{await fetch("/api/plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},fA=async(e,t)=>{const n=await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json().catch(()=>null);throw new Error((r==null?void 0:r.error)??`Failed to update plan (${n.status})`)}};async function $s(e,t){if(e.ok)return;const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}const hA=async()=>{const e=await fetch("/api/git/status");return await $s(e,"Failed to load git status"),e.json()},gk=async(e,t,n)=>{const r=await fetch("/api/git/commit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e,title:t,message:n})});await $s(r,"Commit failed")},pA=async()=>{const e=await fetch("/api/git/push",{method:"POST"});await $s(e,"Push failed")},yk=async e=>{const t=await fetch("/api/git/suggest-commit-message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})});return await $s(t,"Failed to suggest a commit message"),t.json()},mA=async()=>{const e=await fetch("/api/git/sync",{method:"POST"});await $s(e,"Sync failed")},gA=async()=>{const e=await fetch("/api/git/pull",{method:"POST"});await $s(e,"Pull failed")},yA=async e=>{const t=await fetch("/api/git/branch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})}),n=await t.json();if(!t.ok)throw new Error(n.error??"Failed to create branch");return n.branch},xA=async()=>(await fetch("/api/status")).json(),vA=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},wA=async()=>{await fetch("/api/status/fix",{method:"POST"})},bA=async()=>{const e=await fetch("/api/refresh",{method:"POST"});if(!e.ok)throw new Error(`Failed to drop caches: ${e.statusText}`)},ym=e=>e.agentStatus.some(t=>t.status!=="done"&&t.status!=="error"),sr=e=>e.capabilities.length===0||e.capabilities.some(t=>t.id.startsWith("agent:")&&t.status==="ok"),kA=e=>{const t=e.capabilities.find(n=>n.id==="gh");return t===void 0||t.status==="ok"},SA=e=>e.capabilities.filter(t=>t.status!=="ok").length;function cr(e,t,n,r=()=>({}),i){return async()=>{i&&e({[i]:!0});try{const s=await t();e({...n(s),...i&&{[i]:!1}})}catch(s){e({...r(s),...i&&{[i]:!1}})}}}const O=BL((e,t)=>({plans:null,plansLoading:!1,plansError:null,loadPlans:cr(e,uA,n=>({plans:n,plansError:null}),n=>({plansError:String(n)}),"plansLoading"),ideaEntries:[],loadIdeas:cr(e,oA,n=>({ideaEntries:n.entries}),()=>({ideaEntries:[]})),archivableIdeas:[],loadArchivableIdeas:cr(e,aA,n=>({archivableIdeas:n}),()=>({archivableIdeas:[]})),archiveIdeas:async n=>{await lA(n),await Promise.all([t().loadArchivableIdeas(),t().loadPlans(),t().loadIdeas()])},planFilters:mm,togglePlanStatus:n=>e(r=>({planFilters:{...r.planFilters,statuses:r.planFilters.statuses.includes(n)?r.planFilters.statuses.filter(i=>i!==n):[...r.planFilters.statuses,n]}})),togglePlanTag:n=>e(r=>({planFilters:{...r.planFilters,tags:r.planFilters.tags.includes(n)?r.planFilters.tags.filter(i=>i!==n):[...r.planFilters.tags,n]}})),toggleNoteStatus:n=>e(r=>({planFilters:{...r.planFilters,noteStatuses:r.planFilters.noteStatuses.includes(n)?r.planFilters.noteStatuses.filter(i=>i!==n):[...r.planFilters.noteStatuses,n]}})),setPlanSearch:n=>e(r=>({planFilters:{...r.planFilters,search:n}})),setSubjectFilter:n=>e(r=>({planFilters:{...r.planFilters,subject:n}})),setPlanSortKey:n=>e(r=>({planFilters:{...r.planFilters,sortKey:n}})),togglePlanSortDirection:()=>e(n=>({planFilters:{...n.planFilters,sortDirection:n.planFilters.sortDirection==="asc"?"desc":"asc"}})),suggestions:[],suggestionsLoading:!0,loadSuggestions:cr(e,eA,n=>({suggestions:n.entries}),()=>({suggestions:[]}),"suggestionsLoading"),promoteSuggestion:async n=>{const{id:r}=await tA(n);return await Promise.all([t().loadSuggestions(),t().loadPlans(),t().loadIdeas()]),r},dismissSuggestion:async n=>{await nA(n),await t().loadSuggestions()},promoteRoadmapItem:async(n,r,i,s)=>{const{id:o}=await iA(n,r,i,s);return await Promise.all([t().loadPlans(),t().loadIdeas()]),o},taskLog:[],taskLogLoading:!0,loadTaskLog:cr(e,ZL,n=>({taskLog:n.entries}),()=>({taskLog:[]}),"taskLogLoading"),repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await rA();e({repoDocs:n.files,repoDocsLoading:!1});const{activeDocTitle:r}=t();if(!r){const i=["MAIN.md","README.md"].find(s=>n.files.some(o=>o.name===s));i&&e({activeDocTitle:i})}}catch{e({repoDocs:[],repoDocsLoading:!1})}},activeDocTitle:null,setActiveDocTitle:n=>e({activeDocTitle:n}),docSearchQuery:"",setDocSearchQuery:n=>e({docSearchQuery:n}),status:null,refreshing:!1,loadStatus:cr(e,xA,n=>({status:n})),refreshAll:async()=>{e({refreshing:!0});try{await bA().catch(()=>{}),await Promise.all([t().loadPlans(),t().loadIdeas(),t().loadArchivableIdeas(),t().loadSuggestions(),t().loadStatus(),t().loadConsistency(),t().loadGitStatus(),t().loadAgentStatus()]);const n=t().plansError;return n?{ok:!1,error:n}:{ok:!0}}finally{e({refreshing:!1})}},runCheck:async n=>{try{await vA(n)}catch{}},fixQuality:async()=>{try{await wA()}catch{}},commitInFlight:!1,setCommitInFlight:n=>e({commitInFlight:n}),quickCommit:async()=>{const{gitStatus:n,loadGitStatus:r,commitInFlight:i}=t();if(i)return{ok:!1,error:"A commit is already in progress"};if(!n||n.length===0)return{ok:!1,error:"Nothing to commit"};const s=n.map(o=>o.path);e({commitInFlight:!0});try{const{title:o,message:a}=await yk(s);return await gk(s,o,a||void 0),await r()?{ok:!0,title:o}:{ok:!0,title:o,warning:"Committed, but the git status refresh failed — reload to confirm"}}catch(o){return{ok:!1,error:o.message}}finally{e({commitInFlight:!1})}},consistency:[],loadConsistency:cr(e,sA,n=>({consistency:n})),gitStatus:null,gitBranch:null,gitAhead:0,gitBranchHygiene:null,loadGitStatus:async()=>{try{const{branch:n,entries:r,ahead:i,branchHygiene:s}=await hA();return e({gitStatus:r,gitBranch:n,gitAhead:i,gitBranchHygiene:s}),!0}catch{return!1}},capabilities:[],loadCapabilities:cr(e,fk,n=>({capabilities:n??[]}),()=>({capabilities:[]})),agentStatus:[],loadAgentStatus:async()=>{try{const n=await $L();e({agentStatus:n});const r=t().pendingReconcile,i=r?n.find(o=>o.taskKind==="reconcile"&&o.planId===r.planId):void 0;r&&i&&(i.status==="done"?(await t().loadPlans(),e(o=>({reconcileQueue:[...o.reconcileQueue,r],pendingReconcile:null}))):i.status==="error"&&e({pendingReconcile:null}));const s=n.find(o=>o.taskKind==="batch-reconcile");if((s==null?void 0:s.status)==="done"&&!t().batchReconcileConsumed){const o=await VL();o&&o.length>0&&(await t().loadPlans(),e(a=>({reconcileQueue:[...a.reconcileQueue,...o.map(l=>({planId:l.planId,before:l.before}))]}))),e({batchReconcileConsumed:!0})}}catch{}},launchAgent:async(n,r)=>{await WL(n,r),await t().loadAgentStatus()},launchPlanAudit:async(n,r)=>{await UL(n,r),await t().loadAgentStatus()},launchPlanReconcile:async(n,r,i)=>{const s=t().pendingReconcile;if(s)throw new Error(s.planId===n?"A reconcile is already in progress for this plan":"A reconcile is already in progress for another plan");e({pendingReconcile:{planId:n,before:i}});try{await HL(n,r)}catch(o){throw e({pendingReconcile:null}),o}await t().loadAgentStatus()},launchPlanDraft:async(n,r)=>{await GL(n,r),await t().loadAgentStatus()},launchIdeaExtend:async(n,r)=>{await KL(n,r),await t().loadAgentStatus()},launchBatchReconcile:async()=>{e({batchReconcileConsumed:!1}),await qL(),await t().loadAgentStatus()},launchSuggestIdeas:async n=>{await YL(n),await t().loadAgentStatus()},launchRunAll:async n=>{await QL(n),await t().loadAgentStatus()},launchFixReview:async n=>{await XL(n),await t().loadAgentStatus()},stopAgent:async n=>{try{await JL(n)}finally{await t().loadAgentStatus()}},pendingReconcile:null,reconcileQueue:[],removeFromReconcileQueue:n=>e(r=>({reconcileQueue:r.reconcileQueue.filter(i=>i.planId!==n)})),batchReconcileConsumed:!1}));function _A(e){return e.includes("running")?"running":e.includes("fail")?"fail":e.every(t=>t==="stale")?"stale":"pass"}function xm(e){var t,n,r,i;return{qualityStatus:_A([((t=e==null?void 0:e.lint)==null?void 0:t.status)??"stale",((n=e==null?void 0:e.format)==null?void 0:n.status)??"stale"]),testStatus:((r=e==null?void 0:e.test)==null?void 0:r.status)??"stale",consistencyStatus:((i=e==null?void 0:e.consistency)==null?void 0:i.status)??"stale"}}function xk(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=xk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function CA(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xk(e))&&(r&&(r+=" "),r+=t);return r}const vm="-",PA=e=>{const t=EA(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(vm);return a[0]===""&&a.length!==1&&a.shift(),vk(a,t)||jA(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},vk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?vk(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(vm);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Bx=/^\[(.+)\]$/,jA=e=>{if(Bx.test(e)){const t=Bx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},EA=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return IA(Object.entries(e.classGroups),n).forEach(([s,o])=>{wh(o,r,s,t)}),r},wh=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:$x(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(TA(i)){wh(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{wh(o,$x(t,s),n,r)})})},$x=(e,t)=>{let n=e;return t.split(vm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},TA=e=>e.isThemeGetter,IA=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,RA=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},wk="!",MA=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let w=0;w<a.length;w++){let g=a[w];if(c===0){if(g===i&&(r||a.slice(w,w+s)===t)){l.push(a.slice(u,w)),u=w+s;continue}if(g==="/"){d=w;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(u),p=h.startsWith(wk),m=p?h.substring(1):h,x=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:x}};return n?a=>n({className:a,parseClassName:o}):o},LA=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},AA=e=>({cache:RA(e.cacheSize),parseClassName:MA(e),...PA(e)}),DA=/\s+/,NA=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(DA);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(c);let m=!!p,x=r(m?h.substring(0,p):h);if(!x){if(!m){a=c+(a.length>0?" "+a:a);continue}if(x=r(h),!x){a=c+(a.length>0?" "+a:a);continue}m=!1}const w=LA(u).join(":"),g=d?w+wk:w,y=g+x;if(s.includes(y))continue;s.push(y);const v=i(x,m);for(let b=0;b<v.length;++b){const k=v[b];s.push(g+k)}a=c+(a.length>0?" "+a:a)}return a};function zA(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=bk(t))&&(r&&(r+=" "),r+=n);return r}const bk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bk(e[r]))&&(n&&(n+=" "),n+=t);return n};function OA(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=AA(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=NA(l,n);return i(l,u),u}return function(){return s(zA.apply(null,arguments))}}const Se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kk=/^\[(?:([a-z-]+):)?(.+)\]$/i,FA=/^\d+\/\d+$/,BA=new Set(["px","full","screen"]),$A=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VA=/\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$/,WA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vn=e=>xs(e)||BA.has(e)||FA.test(e),ur=e=>Vs(e,"length",ZA),xs=e=>!!e&&!Number.isNaN(Number(e)),Ad=e=>Vs(e,"number",xs),fo=e=>!!e&&Number.isInteger(Number(e)),GA=e=>e.endsWith("%")&&xs(e.slice(0,-1)),ne=e=>kk.test(e),dr=e=>$A.test(e),KA=new Set(["length","size","percentage"]),YA=e=>Vs(e,KA,Sk),qA=e=>Vs(e,"position",Sk),QA=new Set(["image","url"]),XA=e=>Vs(e,QA,tD),JA=e=>Vs(e,"",eD),ho=()=>!0,Vs=(e,t,n)=>{const r=kk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},ZA=e=>VA.test(e)&&!WA.test(e),Sk=()=>!1,eD=e=>UA.test(e),tD=e=>HA.test(e),nD=()=>{const e=Se("colors"),t=Se("spacing"),n=Se("blur"),r=Se("brightness"),i=Se("borderColor"),s=Se("borderRadius"),o=Se("borderSpacing"),a=Se("borderWidth"),l=Se("contrast"),c=Se("grayscale"),u=Se("hueRotate"),d=Se("invert"),h=Se("gap"),p=Se("gradientColorStops"),m=Se("gradientColorStopPositions"),x=Se("inset"),w=Se("margin"),g=Se("opacity"),y=Se("padding"),v=Se("saturate"),b=Se("scale"),k=Se("sepia"),S=Se("skew"),E=Se("space"),P=Se("translate"),T=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",ne,t],L=()=>[ne,t],F=()=>["",Vn,ur],D=()=>["auto",xs,ne],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",ne],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[xs,ne];return{cacheSize:500,separator:":",theme:{colors:[ho],spacing:[Vn,ur],blur:["none","",dr,ne],brightness:$(),borderColor:[e],borderRadius:["none","","full",dr,ne],borderSpacing:L(),borderWidth:F(),contrast:$(),grayscale:W(),hueRotate:$(),invert:W(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[GA,ur],inset:R(),margin:R(),opacity:$(),padding:L(),saturate:$(),scale:$(),sepia:W(),skew:$(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",ne]}],container:["container"],columns:[{columns:[dr]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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"],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:[...M(),ne]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fo,ne]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ne]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",fo,ne]}],"grid-cols":[{"grid-cols":[ho]}],"col-start-end":[{col:["auto",{span:["full",fo,ne]},ne]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[ho]}],"row-start-end":[{row:["auto",{span:[fo,ne]},ne]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ne]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ne,t]}],"min-w":[{"min-w":[ne,t,"min","max","fit"]}],"max-w":[{"max-w":[ne,t,"none","full","min","max","fit","prose",{screen:[dr]},dr]}],h:[{h:[ne,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ne,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dr,ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ad]}],"font-family":[{font:[ho]}],"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:["tighter","tight","normal","wide","wider","widest",ne]}],"line-clamp":[{"line-clamp":["none",xs,Ad]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,ne]}],"list-image":[{"list-image":["none",ne]}],"list-style-type":[{list:["none","disc","decimal",ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,ur]}],"underline-offset":[{"underline-offset":["auto",Vn,ne]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),qA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",YA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},XA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:B()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Vn,ne]}],"outline-w":[{outline:[Vn,ur]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Vn,ur]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dr,JA]}],"shadow-color":[{shadow:[ho]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",dr,ne]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ne]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",ne]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[fo,ne]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ne]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ne]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vn,ur,Ad]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},rD=OA(nD);function Dd(e,t,n){if(e&&e.length){const[r,i]=t,s=Math.PI/180*n,o=Math.cos(s),a=Math.sin(s);for(const l of e){const[c,u]=l;l[0]=(c-r)*o-(u-i)*a+r,l[1]=(c-r)*a+(u-i)*o+i}}}function iD(e,t){return e[0]===t[0]&&e[1]===t[1]}function sD(e,t,n,r=1){const i=n,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(i)for(const c of o)Dd(c,a,i);const l=function(c,u,d){const h=[];for(const y of c){const v=[...y];iD(v[0],v[v.length-1])||v.push([v[0][0],v[0][1]]),v.length>2&&h.push(v)}const p=[];u=Math.max(u,.1);const m=[];for(const y of h)for(let v=0;v<y.length-1;v++){const b=y[v],k=y[v+1];if(b[1]!==k[1]){const S=Math.min(b[1],k[1]);m.push({ymin:S,ymax:Math.max(b[1],k[1]),x:S===b[1]?b[0]:k[0],islope:(k[0]-b[0])/(k[1]-b[1])})}}if(m.sort((y,v)=>y.ymin<v.ymin?-1:y.ymin>v.ymin?1:y.x<v.x?-1:y.x>v.x?1:y.ymax===v.ymax?0:(y.ymax-v.ymax)/Math.abs(y.ymax-v.ymax)),!m.length)return p;let x=[],w=m[0].ymin,g=0;for(;x.length||m.length;){if(m.length){let y=-1;for(let v=0;v<m.length&&!(m[v].ymin>w);v++)y=v;m.splice(0,y+1).forEach(v=>{x.push({s:w,edge:v})})}if(x=x.filter(y=>!(y.edge.ymax<=w)),x.sort((y,v)=>y.edge.x===v.edge.x?0:(y.edge.x-v.edge.x)/Math.abs(y.edge.x-v.edge.x)),(d!==1||g%u==0)&&x.length>1)for(let y=0;y<x.length;y+=2){const v=y+1;if(v>=x.length)break;const b=x[y].edge,k=x[v].edge;p.push([[Math.round(b.x),w],[Math.round(k.x),w]])}w+=d,x.forEach(y=>{y.edge.x=y.edge.x+d*y.edge.islope}),g++}return p}(o,s,r);if(i){for(const c of o)Dd(c,a,-i);(function(c,u,d){const h=[];c.forEach(p=>h.push(...p)),Dd(h,u,d)})(l,a,-i)}return l}function ka(e,t){var n;const r=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let s=1;return t.roughness>=1&&(((n=t.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(s=i),sD(e,i,r,s||1)}class wm{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){const r=ka(t,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(t,n){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}}function Su(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}class oD extends wm{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=ka(t,Object.assign({},n,{hachureGap:r})),s=Math.PI/180*n.hachureAngle,o=[],a=.5*r*Math.cos(s),l=.5*r*Math.sin(s);for(const[c,u]of i)Su([c,u])&&o.push([[c[0]-a,c[1]+l],[...u]],[[c[0]+a,c[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(o,n)}}}class aD extends wm{fillPolygons(t,n){const r=this._fillPolygons(t,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),s=this._fillPolygons(t,i);return r.ops=r.ops.concat(s.ops),r}}class lD{constructor(t){this.helper=t}fillPolygons(t,n){const r=ka(t,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(t,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let s=n.fillWeight;s<0&&(s=n.strokeWidth/2);const o=i/4;for(const a of t){const l=Su(a),c=l/i,u=Math.ceil(c)-1,d=l-u*i,h=(a[0][0]+a[1][0])/2-i/4,p=Math.min(a[0][1],a[1][1]);for(let m=0;m<u;m++){const x=p+d+m*i,w=h-o+2*Math.random()*o,g=x-o+2*Math.random()*o,y=this.helper.ellipse(w,g,s,s,n);r.push(...y.ops)}}return{type:"fillSketch",ops:r}}}class cD{constructor(t){this.helper=t}fillPolygons(t,n){const r=ka(t,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(t,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,s=[];return t.forEach(o=>{const a=Su(o),l=Math.floor(a/(r+i)),c=(a+i-l*(r+i))/2;let u=o[0],d=o[1];u[0]>d[0]&&(u=o[1],d=o[0]);const h=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let p=0;p<l;p++){const m=p*(r+i),x=m+r,w=[u[0]+m*Math.cos(h)+c*Math.cos(h),u[1]+m*Math.sin(h)+c*Math.sin(h)],g=[u[0]+x*Math.cos(h)+c*Math.cos(h),u[1]+x*Math.sin(h)+c*Math.sin(h)];s.push(...this.helper.doubleLineOps(w[0],w[1],g[0],g[1],n))}}),s}}class uD{constructor(t){this.helper=t}fillPolygons(t,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset,s=ka(t,n=Object.assign({},n,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(s,i,n)}}zigzagLines(t,n,r){const i=[];return t.forEach(s=>{const o=Su(s),a=Math.round(o/(2*n));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<a;d++){const h=2*d*n,p=2*(d+1)*n,m=Math.sqrt(2*Math.pow(n,2)),x=[l[0]+h*Math.cos(u),l[1]+h*Math.sin(u)],w=[l[0]+p*Math.cos(u),l[1]+p*Math.sin(u)],g=[x[0]+m*Math.cos(u+Math.PI/4),x[1]+m*Math.sin(u+Math.PI/4)];i.push(...this.helper.doubleLineOps(x[0],x[1],g[0],g[1],r),...this.helper.doubleLineOps(g[0],g[1],w[0],w[1],r))}}),i}}const mt={};class dD{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const fD=0,Nd=1,Vx=2,cl={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function zd(e,t){return e.type===t}function bm(e){const t=[],n=function(o){const a=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:fD,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:Nd,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return a[a.length]={type:Vx,text:""},a}(e);let r="BOD",i=0,s=n[i];for(;!zd(s,Vx);){let o=0;const a=[];if(r==="BOD"){if(s.text!=="M"&&s.text!=="m")return bm("M0,0"+e);i++,o=cl[s.text],r=s.text}else zd(s,Nd)?o=cl[r]:(i++,o=cl[s.text],r=s.text);if(!(i+o<n.length))throw new Error("Path data ended short");for(let l=i;l<i+o;l++){const c=n[l];if(!zd(c,Nd))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof cl[r]!="number")throw new Error("Bad segment: "+r);{const l={key:r,data:a};t.push(l),i+=o,s=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}}return t}function _k(e){let t=0,n=0,r=0,i=0;const s=[];for(const{key:o,data:a}of e)switch(o){case"M":s.push({key:"M",data:[...a]}),[t,n]=a,[r,i]=a;break;case"m":t+=a[0],n+=a[1],s.push({key:"M",data:[t,n]}),r=t,i=n;break;case"L":s.push({key:"L",data:[...a]}),[t,n]=a;break;case"l":t+=a[0],n+=a[1],s.push({key:"L",data:[t,n]});break;case"C":s.push({key:"C",data:[...a]}),t=a[4],n=a[5];break;case"c":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"C",data:l}),t=l[4],n=l[5];break}case"Q":s.push({key:"Q",data:[...a]}),t=a[2],n=a[3];break;case"q":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"Q",data:l}),t=l[2],n=l[3];break}case"A":s.push({key:"A",data:[...a]}),t=a[5],n=a[6];break;case"a":t+=a[5],n+=a[6],s.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,n]});break;case"H":s.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],s.push({key:"V",data:[n]});break;case"S":s.push({key:"S",data:[...a]}),t=a[2],n=a[3];break;case"s":{const l=a.map((c,u)=>u%2?c+n:c+t);s.push({key:"S",data:l}),t=l[2],n=l[3];break}case"T":s.push({key:"T",data:[...a]}),t=a[0],n=a[1];break;case"t":t+=a[0],n+=a[1],s.push({key:"T",data:[t,n]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=r,n=i}return s}function Ck(e){const t=[];let n="",r=0,i=0,s=0,o=0,a=0,l=0;for(const{key:c,data:u}of e){switch(c){case"M":t.push({key:"M",data:[...u]}),[r,i]=u,[s,o]=u;break;case"C":t.push({key:"C",data:[...u]}),r=u[4],i=u[5],a=u[2],l=u[3];break;case"L":t.push({key:"L",data:[...u]}),[r,i]=u;break;case"H":r=u[0],t.push({key:"L",data:[r,i]});break;case"V":i=u[0],t.push({key:"L",data:[r,i]});break;case"S":{let d=0,h=0;n==="C"||n==="S"?(d=r+(r-a),h=i+(i-l)):(d=r,h=i),t.push({key:"C",data:[d,h,...u]}),a=u[0],l=u[1],r=u[2],i=u[3];break}case"T":{const[d,h]=u;let p=0,m=0;n==="Q"||n==="T"?(p=r+(r-a),m=i+(i-l)):(p=r,m=i);const x=r+2*(p-r)/3,w=i+2*(m-i)/3,g=d+2*(p-d)/3,y=h+2*(m-h)/3;t.push({key:"C",data:[x,w,g,y,d,h]}),a=p,l=m,r=d,i=h;break}case"Q":{const[d,h,p,m]=u,x=r+2*(d-r)/3,w=i+2*(h-i)/3,g=p+2*(d-p)/3,y=m+2*(h-m)/3;t.push({key:"C",data:[x,w,g,y,p,m]}),a=d,l=h,r=p,i=m;break}case"A":{const d=Math.abs(u[0]),h=Math.abs(u[1]),p=u[2],m=u[3],x=u[4],w=u[5],g=u[6];d===0||h===0?(t.push({key:"C",data:[r,i,w,g,w,g]}),r=w,i=g):(r!==w||i!==g)&&(Pk(r,i,w,g,d,h,p,m,x).forEach(function(y){t.push({key:"C",data:y})}),r=w,i=g);break}case"Z":t.push({key:"Z",data:[]}),r=s,i=o}n=c}return t}function po(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Pk(e,t,n,r,i,s,o,a,l,c){const u=(d=o,Math.PI*d/180);var d;let h=[],p=0,m=0,x=0,w=0;if(c)[p,m,x,w]=c;else{[e,t]=po(e,t,-u),[n,r]=po(n,r,-u);const F=(e-n)/2,D=(t-r)/2;let M=F*F/(i*i)+D*D/(s*s);M>1&&(M=Math.sqrt(M),i*=M,s*=M);const B=i*i,H=s*s,z=B*H-B*D*D-H*F*F,W=B*D*D+H*F*F,C=(a===l?-1:1)*Math.sqrt(Math.abs(z/W));x=C*i*D/s+(e+n)/2,w=C*-s*F/i+(t+r)/2,p=Math.asin(parseFloat(((t-w)/s).toFixed(9))),m=Math.asin(parseFloat(((r-w)/s).toFixed(9))),e<x&&(p=Math.PI-p),n<x&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),l&&p>m&&(p-=2*Math.PI),!l&&m>p&&(m-=2*Math.PI)}let g=m-p;if(Math.abs(g)>120*Math.PI/180){const F=m,D=n,M=r;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,h=Pk(n=x+i*Math.cos(m),r=w+s*Math.sin(m),D,M,i,s,o,0,l,[m,F,x,w])}g=m-p;const y=Math.cos(p),v=Math.sin(p),b=Math.cos(m),k=Math.sin(m),S=Math.tan(g/4),E=4/3*i*S,P=4/3*s*S,T=[e,t],j=[e+E*v,t-P*y],R=[n+E*k,r-P*b],L=[n,r];if(j[0]=2*T[0]-j[0],j[1]=2*T[1]-j[1],c)return[j,R,L].concat(h);{h=[j,R,L].concat(h);const F=[];for(let D=0;D<h.length;D+=3){const M=po(h[D][0],h[D][1],u),B=po(h[D+1][0],h[D+1][1],u),H=po(h[D+2][0],h[D+2][1],u);F.push([M[0],M[1],B[0],B[1],H[0],H[1]])}return F}}const hD={randOffset:function(e,t){return Q(e,t)},randOffsetWithRange:function(e,t,n){return Ac(e,t,n)},ellipse:function(e,t,n,r,i){const s=Ek(n,r,i);return bh(e,t,i,s).opset},doubleLineOps:function(e,t,n,r,i){return Wr(e,t,n,r,i,!0)}};function jk(e,t,n,r,i){return{type:"path",ops:Wr(e,t,n,r,i)}}function Wl(e,t,n){const r=(e||[]).length;if(r>2){const i=[];for(let s=0;s<r-1;s++)i.push(...Wr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],n));return t&&i.push(...Wr(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}return r===2?jk(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function pD(e,t,n,r,i){return function(s,o){return Wl(s,!0,o)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Wx(e,t){if(e.length){const n=typeof e[0][0]=="number"?[e]:e,r=ul(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:ul(n[0],1.5*(1+.22*t.roughness),Gx(t));for(let s=1;s<n.length;s++){const o=n[s];if(o.length){const a=ul(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ul(o,1.5*(1+.22*t.roughness),Gx(t));for(const c of a)c.op!=="move"&&r.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function Ek(e,t,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),s=2*Math.PI/i;let o=Math.abs(e/2),a=Math.abs(t/2);const l=1-n.curveFitting;return o+=Q(o*l,n),a+=Q(a*l,n),{increment:s,rx:o,ry:a}}function bh(e,t,n,r){const[i,s]=Kx(r.increment,e,t,r.rx,r.ry,1,r.increment*Ac(.1,Ac(.4,1,n),n),n);let o=Dc(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=Kx(r.increment,e,t,r.rx,r.ry,1.5,0,n),l=Dc(a,null,n);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Ux(e,t,n,r,i,s,o,a,l){const c=e,u=t;let d=Math.abs(n/2),h=Math.abs(r/2);d+=Q(.01*d,l),h+=Q(.01*h,l);let p=i,m=s;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);const x=2*Math.PI/l.curveStepCount,w=Math.min(x/2,(m-p)/2),g=Yx(w,c,u,d,h,p,m,1,l);if(!l.disableMultiStroke){const y=Yx(w,c,u,d,h,p,m,1.5,l);g.push(...y)}return o&&(a?g.push(...Wr(c,u,c+d*Math.cos(p),u+h*Math.sin(p),l),...Wr(c,u,c+d*Math.cos(m),u+h*Math.sin(m),l)):g.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+d*Math.cos(p),u+h*Math.sin(p)]})),{type:"path",ops:g}}function Hx(e,t){const n=Ck(_k(bm(e))),r=[];let i=[0,0],s=[0,0];for(const{key:o,data:a}of n)switch(o){case"M":s=[a[0],a[1]],i=[a[0],a[1]];break;case"L":r.push(...Wr(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]];break;case"C":{const[l,c,u,d,h,p]=a;r.push(...mD(l,c,u,d,h,p,s,t)),s=[h,p];break}case"Z":r.push(...Wr(s[0],s[1],i[0],i[1],t)),s=[i[0],i[1]]}return{type:"path",ops:r}}function Od(e,t){const n=[];for(const r of e)if(r.length){const i=t.maxRandomnessOffset||0,s=r.length;if(s>2){n.push({op:"move",data:[r[0][0]+Q(i,t),r[0][1]+Q(i,t)]});for(let o=1;o<s;o++)n.push({op:"lineTo",data:[r[o][0]+Q(i,t),r[o][1]+Q(i,t)]})}}return{type:"fillPath",ops:n}}function $i(e,t){return function(n,r){let i=n.fillStyle||"hachure";if(!mt[i])switch(i){case"zigzag":mt[i]||(mt[i]=new oD(r));break;case"cross-hatch":mt[i]||(mt[i]=new aD(r));break;case"dots":mt[i]||(mt[i]=new lD(r));break;case"dashed":mt[i]||(mt[i]=new cD(r));break;case"zigzag-line":mt[i]||(mt[i]=new uD(r));break;default:i="hachure",mt[i]||(mt[i]=new wm(r))}return mt[i]}(t,hD).fillPolygons(e,t)}function Gx(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Tk(e){return e.randomizer||(e.randomizer=new dD(e.seed||0)),e.randomizer.next()}function Ac(e,t,n,r=1){return n.roughness*r*(Tk(n)*(t-e)+e)}function Q(e,t,n=1){return Ac(-e,e,t,n)}function Wr(e,t,n,r,i,s=!1){const o=s?i.disableMultiStrokeFill:i.disableMultiStroke,a=kh(e,t,n,r,i,!0,!1);if(o)return a;const l=kh(e,t,n,r,i,!0,!0);return a.concat(l)}function kh(e,t,n,r,i,s,o){const a=Math.pow(e-n,2)+Math.pow(t-r,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>a&&(u=l/10);const d=u/2,h=.2+.2*Tk(i);let p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=Q(p,i,c),m=Q(m,i,c);const x=[],w=()=>Q(d,i,c),g=()=>Q(u,i,c),y=i.preserveVertices;return o?x.push({op:"move",data:[e+(y?0:w()),t+(y?0:w())]}):x.push({op:"move",data:[e+(y?0:Q(u,i,c)),t+(y?0:Q(u,i,c))]}),o?x.push({op:"bcurveTo",data:[p+e+(n-e)*h+w(),m+t+(r-t)*h+w(),p+e+2*(n-e)*h+w(),m+t+2*(r-t)*h+w(),n+(y?0:w()),r+(y?0:w())]}):x.push({op:"bcurveTo",data:[p+e+(n-e)*h+g(),m+t+(r-t)*h+g(),p+e+2*(n-e)*h+g(),m+t+2*(r-t)*h+g(),n+(y?0:g()),r+(y?0:g())]}),x}function ul(e,t,n){if(!e.length)return[];const r=[];r.push([e[0][0]+Q(t,n),e[0][1]+Q(t,n)]),r.push([e[0][0]+Q(t,n),e[0][1]+Q(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+Q(t,n),e[i][1]+Q(t,n)]),i===e.length-1&&r.push([e[i][0]+Q(t,n),e[i][1]+Q(t,n)]);return Dc(r,null,n)}function Dc(e,t,n){const r=e.length,i=[];if(r>3){const s=[],o=1-n.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let a=1;a+2<r;a++){const l=e[a];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[a+1][0]-o*e[a-1][0])/6,l[1]+(o*e[a+1][1]-o*e[a-1][1])/6],s[2]=[e[a+1][0]+(o*e[a][0]-o*e[a+2][0])/6,e[a+1][1]+(o*e[a][1]-o*e[a+2][1])/6],s[3]=[e[a+1][0],e[a+1][1]],i.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else r===3?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...kh(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function Kx(e,t,n,r,i,s,o,a){const l=[],c=[];if(a.roughness===0){e/=4,c.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let u=0;u<=2*Math.PI;u+=e){const d=[t+r*Math.cos(u),n+i*Math.sin(u)];l.push(d),c.push(d)}c.push([t+r*Math.cos(0),n+i*Math.sin(0)]),c.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{const u=Q(.5,a)-Math.PI/2;c.push([Q(s,a)+t+.9*r*Math.cos(u-e),Q(s,a)+n+.9*i*Math.sin(u-e)]);const d=2*Math.PI+u-.01;for(let h=u;h<d;h+=e){const p=[Q(s,a)+t+r*Math.cos(h),Q(s,a)+n+i*Math.sin(h)];l.push(p),c.push(p)}c.push([Q(s,a)+t+r*Math.cos(u+2*Math.PI+.5*o),Q(s,a)+n+i*Math.sin(u+2*Math.PI+.5*o)]),c.push([Q(s,a)+t+.98*r*Math.cos(u+o),Q(s,a)+n+.98*i*Math.sin(u+o)]),c.push([Q(s,a)+t+.9*r*Math.cos(u+.5*o),Q(s,a)+n+.9*i*Math.sin(u+.5*o)])}return[c,l]}function Yx(e,t,n,r,i,s,o,a,l){const c=s+Q(.1,l),u=[];u.push([Q(a,l)+t+.9*r*Math.cos(c-e),Q(a,l)+n+.9*i*Math.sin(c-e)]);for(let d=c;d<=o;d+=e)u.push([Q(a,l)+t+r*Math.cos(d),Q(a,l)+n+i*Math.sin(d)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),Dc(u,null,l)}function mD(e,t,n,r,i,s,o,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let u=[0,0];const d=a.disableMultiStroke?1:2,h=a.preserveVertices;for(let p=0;p<d;p++)p===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(h?0:Q(c[0],a)),o[1]+(h?0:Q(c[0],a))]}),u=h?[i,s]:[i+Q(c[p],a),s+Q(c[p],a)],l.push({op:"bcurveTo",data:[e+Q(c[p],a),t+Q(c[p],a),n+Q(c[p],a),r+Q(c[p],a),u[0],u[1]]});return l}function mo(e){return[...e]}function qx(e,t=0){const n=e.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push(mo(e[0]),mo(e[1]),mo(e[2]),mo(e[2]));else{const i=[];i.push(e[0],e[0]);for(let a=1;a<e.length;a++)i.push(e[a]),a===e.length-1&&i.push(e[a]);const s=[],o=1-t;r.push(mo(i[0]));for(let a=1;a+2<i.length;a++){const l=i[a];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*i[a+1][0]-o*i[a-1][0])/6,l[1]+(o*i[a+1][1]-o*i[a-1][1])/6],s[2]=[i[a+1][0]+(o*i[a][0]-o*i[a+2][0])/6,i[a+1][1]+(o*i[a][1]-o*i[a+2][1])/6],s[3]=[i[a+1][0],i[a+1][1]],r.push(s[1],s[2],s[3])}}return r}function Ul(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function gD(e,t,n){const r=Ul(t,n);if(r===0)return Ul(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),Ul(e,ai(t,n,i))}function ai(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Sh(e,t,n,r){const i=r||[];if(function(a,l){const c=a[l+0],u=a[l+1],d=a[l+2],h=a[l+3];let p=3*u[0]-2*c[0]-h[0];p*=p;let m=3*u[1]-2*c[1]-h[1];m*=m;let x=3*d[0]-2*h[0]-c[0];x*=x;let w=3*d[1]-2*h[1]-c[1];return w*=w,p<x&&(p=x),m<w&&(m=w),p+m}(e,t)<n){const a=e[t+0];i.length?(s=i[i.length-1],o=a,Math.sqrt(Ul(s,o))>1&&i.push(a)):i.push(a),i.push(e[t+3])}else{const l=e[t+0],c=e[t+1],u=e[t+2],d=e[t+3],h=ai(l,c,.5),p=ai(c,u,.5),m=ai(u,d,.5),x=ai(h,p,.5),w=ai(p,m,.5),g=ai(x,w,.5);Sh([l,h,x,g],0,n,i),Sh([g,w,m,d],0,n,i)}var s,o;return i}function yD(e,t){return Nc(e,0,e.length,t)}function Nc(e,t,n,r,i){const s=i||[],o=e[t],a=e[n-1];let l=0,c=1;for(let u=t+1;u<n-1;++u){const d=gD(e[u],o,a);d>l&&(l=d,c=u)}return Math.sqrt(l)>r?(Nc(e,t,c+1,r,s),Nc(e,c,n,r,s)):(s.length||s.push(o),s.push(a)),s}function Fd(e,t=.15,n){const r=[],i=(e.length-1)/3;for(let s=0;s<i;s++)Sh(e,3*s,t,r);return n&&n>0?Nc(r,0,r.length,n):r}const Et="none";let zc=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,n,r){return{shape:t,sets:n||[],options:r||this.defaultOptions}}line(t,n,r,i,s){const o=this._o(s);return this._d("line",[jk(t,n,r,i,o)],o)}rectangle(t,n,r,i,s){const o=this._o(s),a=[],l=pD(t,n,r,i,o);if(o.fill){const c=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]];o.fillStyle==="solid"?a.push(Od([c],o)):a.push($i([c],o))}return o.stroke!==Et&&a.push(l),this._d("rectangle",a,o)}ellipse(t,n,r,i,s){const o=this._o(s),a=[],l=Ek(r,i,o),c=bh(t,n,o,l);if(o.fill)if(o.fillStyle==="solid"){const u=bh(t,n,o,l).opset;u.type="fillPath",a.push(u)}else a.push($i([c.estimatedPoints],o));return o.stroke!==Et&&a.push(c.opset),this._d("ellipse",a,o)}circle(t,n,r,i){const s=this.ellipse(t,n,r,r,i);return s.shape="circle",s}linearPath(t,n){const r=this._o(n);return this._d("linearPath",[Wl(t,!1,r)],r)}arc(t,n,r,i,s,o,a=!1,l){const c=this._o(l),u=[],d=Ux(t,n,r,i,s,o,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const h=Object.assign({},c);h.disableMultiStroke=!0;const p=Ux(t,n,r,i,s,o,!0,!1,h);p.type="fillPath",u.push(p)}else u.push(function(h,p,m,x,w,g,y){const v=h,b=p;let k=Math.abs(m/2),S=Math.abs(x/2);k+=Q(.01*k,y),S+=Q(.01*S,y);let E=w,P=g;for(;E<0;)E+=2*Math.PI,P+=2*Math.PI;P-E>2*Math.PI&&(E=0,P=2*Math.PI);const T=(P-E)/y.curveStepCount,j=[];for(let R=E;R<=P;R+=T)j.push([v+k*Math.cos(R),b+S*Math.sin(R)]);return j.push([v+k*Math.cos(P),b+S*Math.sin(P)]),j.push([v,b]),$i([j],y)}(t,n,r,i,s,o,c));return c.stroke!==Et&&u.push(d),this._d("arc",u,c)}curve(t,n){const r=this._o(n),i=[],s=Wx(t,r);if(r.fill&&r.fill!==Et)if(r.fillStyle==="solid"){const o=Wx(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],a=t;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Fd(qx([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):o.push(...Fd(qx(c),10,(1+r.roughness)/2))}o.length&&i.push($i([o],r))}return r.stroke!==Et&&i.push(s),this._d("curve",i,r)}polygon(t,n){const r=this._o(n),i=[],s=Wl(t,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Od([t],r)):i.push($i([t],r))),r.stroke!==Et&&i.push(s),this._d("polygon",i,r)}path(t,n){const r=this._o(n),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=r.fill&&r.fill!=="transparent"&&r.fill!==Et,o=r.stroke!==Et,a=!!(r.simplification&&r.simplification<1),l=function(u,d,h){const p=Ck(_k(bm(u))),m=[];let x=[],w=[0,0],g=[];const y=()=>{g.length>=4&&x.push(...Fd(g,d)),g=[]},v=()=>{y(),x.length&&(m.push(x),x=[])};for(const{key:k,data:S}of p)switch(k){case"M":v(),w=[S[0],S[1]],x.push(w);break;case"L":y(),x.push([S[0],S[1]]);break;case"C":if(!g.length){const E=x.length?x[x.length-1]:w;g.push([E[0],E[1]])}g.push([S[0],S[1]]),g.push([S[2],S[3]]),g.push([S[4],S[5]]);break;case"Z":y(),x.push([w[0],w[1]])}if(v(),!h)return m;const b=[];for(const k of m){const S=yD(k,h);S.length&&b.push(S)}return b}(t,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=Hx(t,r);if(s)if(r.fillStyle==="solid")if(l.length===1){const u=Hx(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else i.push(Od(l,r));else i.push($i(l,r));return o&&(a?l.forEach(u=>{i.push(Wl(u,!1,r))}):i.push(c)),this._d("path",i,r)}opsToPath(t,n){let r="";for(const i of t.ops){const s=typeof n=="number"&&n>=0?i.data.map(o=>+o.toFixed(n)):i.data;switch(i.op){case"move":r+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":r+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":r+=`L${s[0]} ${s[1]} `}}return r.trim()}toPaths(t){const n=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const s of n){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Et};break;case"fillPath":o={d:this.opsToPath(s),stroke:Et,strokeWidth:0,fill:r.fill||Et};break;case"fillSketch":o=this.fillSketch(s,r)}o&&i.push(o)}return i}fillSketch(t,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(t),stroke:n.fill||Et,strokeWidth:r,fill:Et}}_mergedShape(t){return t.filter((n,r)=>r===0||n.op!=="move")}};class xD{constructor(t,n){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new zc(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of n)switch(o.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,o,s),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,s,a),i.restore();break}case"fillSketch":this.fillSketch(i,o,r)}}fillSketch(t,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,n,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,n,r,i="nonzero"){t.beginPath();for(const s of n.ops){const o=typeof r=="number"&&r>=0?s.data.map(a=>+a.toFixed(r)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}n.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,n,r,i,s){const o=this.gen.line(t,n,r,i,s);return this.draw(o),o}rectangle(t,n,r,i,s){const o=this.gen.rectangle(t,n,r,i,s);return this.draw(o),o}ellipse(t,n,r,i,s){const o=this.gen.ellipse(t,n,r,i,s);return this.draw(o),o}circle(t,n,r,i){const s=this.gen.circle(t,n,r,i);return this.draw(s),s}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r),r}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r),r}arc(t,n,r,i,s,o,a=!1,l){const c=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(c),c}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r),r}path(t,n){const r=this.gen.path(t,n);return this.draw(r),r}}const dl="http://www.w3.org/2000/svg";class vD{constructor(t,n){this.svg=t,this.gen=new zc(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(dl,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(dl,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(dl,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,a,r)}l&&s.appendChild(l)}return s}fillSketch(t,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const s=t.createElementNS(dl,"path");return s.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),s.setAttribute("stroke",r.fill||""),s.setAttribute("stroke-width",i+""),s.setAttribute("fill","none"),r.fillLineDash&&s.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,n){return this.gen.opsToPath(t,n)}line(t,n,r,i,s){const o=this.gen.line(t,n,r,i,s);return this.draw(o)}rectangle(t,n,r,i,s){const o=this.gen.rectangle(t,n,r,i,s);return this.draw(o)}ellipse(t,n,r,i,s){const o=this.gen.ellipse(t,n,r,i,s);return this.draw(o)}circle(t,n,r,i){const s=this.gen.circle(t,n,r,i);return this.draw(s)}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r)}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r)}arc(t,n,r,i,s,o,a=!1,l){const c=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(c)}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r)}path(t,n){const r=this.gen.path(t,n);return this.draw(r)}}var wD={canvas:(e,t)=>new xD(e,t),svg:(e,t)=>new vD(e,t),generator:e=>new zc(e),newSeed:()=>zc.newSeed()};const km=_.createContext({});function Sm(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const bD=typeof window<"u",Ik=bD?_.useLayoutEffect:_.useEffect,_u=_.createContext(null);function _m(e,t){e.indexOf(t)===-1&&e.push(t)}function Oc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Dn=(e,t,n)=>n>t?t:n<e?e:n;let Cm=()=>{};const Ur={},Rk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Mk=e=>typeof e=="object"&&e!==null,Lk=e=>/^0[^.\s]+$/u.test(e);function Ak(e){let t;return()=>(t===void 0&&(t=e()),t)}const en=e=>e,Sa=(...e)=>e.reduce((t,n)=>r=>n(t(r))),da=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Pm{constructor(){this.subscriptions=[]}add(t){return _m(this.subscriptions,t),()=>Oc(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Dt=e=>e*1e3,Jt=e=>e/1e3,Dk=(e,t)=>t?e*(1e3/t):0,Nk=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kD=1e-7,SD=12;function _D(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Nk(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>kD&&++a<SD);return o}function _a(e,t,n,r){if(e===t&&n===r)return en;const i=s=>_D(s,0,1,e,n);return s=>s===0||s===1?s:Nk(i(s),t,r)}const zk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ok=e=>t=>1-e(1-t),Fk=_a(.33,1.53,.69,.99),jm=Ok(Fk),Bk=zk(jm),$k=e=>e>=1?1:(e*=2)<1?.5*jm(e):.5*(2-Math.pow(2,-10*(e-1))),Em=e=>1-Math.sin(Math.acos(e)),Vk=Ok(Em),Wk=zk(Em),CD=_a(.42,0,1,1),PD=_a(0,0,.58,1),Uk=_a(.42,0,.58,1),jD=e=>Array.isArray(e)&&typeof e[0]!="number",Hk=e=>Array.isArray(e)&&typeof e[0]=="number",ED={linear:en,easeIn:CD,easeInOut:Uk,easeOut:PD,circIn:Em,circInOut:Wk,circOut:Vk,backIn:jm,backInOut:Bk,backOut:Fk,anticipate:$k},TD=e=>typeof e=="string",Qx=e=>{if(Hk(e)){Cm(e.length===4);const[t,n,r,i]=e;return _a(t,n,r,i)}else if(TD(e))return ED[e];return e},fl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ID(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,h=!1)=>{const m=h&&i?n:r;return d&&o.add(u),m.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,c.process(u))}};return c}const RD=40;function Gk(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=fl.reduce((v,b)=>(v[b]=ID(s),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:p,postRender:m}=o,x=()=>{const v=Ur.useManualTiming,b=v?i.timestamp:performance.now();n=!1,v||(i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,RD),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(x))},w=()=>{n=!0,r=!0,i.isProcessing||e(x)};return{schedule:fl.reduce((v,b)=>{const k=o[b];return v[b]=(S,E=!1,P=!1)=>(n||w(),k.schedule(S,E,P)),v},{}),cancel:v=>{for(let b=0;b<fl.length;b++)o[fl[b]].cancel(v)},state:i,steps:o}}const{schedule:ve,cancel:Hr,state:Xe,steps:Bd}=Gk(typeof requestAnimationFrame<"u"?requestAnimationFrame:en,!0);let Hl;function MD(){Hl=void 0}const ct={now:()=>(Hl===void 0&&ct.set(Xe.isProcessing||Ur.useManualTiming?Xe.timestamp:performance.now()),Hl),set:e=>{Hl=e,queueMicrotask(MD)}},Kk=e=>t=>typeof t=="string"&&t.startsWith(e),Yk=Kk("--"),LD=Kk("var(--"),Tm=e=>LD(e)?AD.test(e.split("/*")[0].trim()):!1,AD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Xx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ws={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},fa={...Ws,transform:e=>Dn(0,1,e)},hl={...Ws,default:1},Fo=e=>Math.round(e*1e5)/1e5,Im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DD(e){return e==null}const ND=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rm=(e,t)=>n=>!!(typeof n=="string"&&ND.test(n)&&n.startsWith(e)||t&&!DD(n)&&Object.prototype.hasOwnProperty.call(n,t)),qk=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Im);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},zD=e=>Dn(0,255,e),$d={...Ws,transform:e=>Math.round(zD(e))},mi={test:Rm("rgb","red"),parse:qk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$d.transform(e)+", "+$d.transform(t)+", "+$d.transform(n)+", "+Fo(fa.transform(r))+")"};function OD(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const _h={test:Rm("#"),parse:OD,transform:mi.transform},Ca=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Hn=Ca("deg"),Ln=Ca("%"),Y=Ca("px"),FD=Ca("vh"),BD=Ca("vw"),Jx={...Ln,parse:e=>Ln.parse(e)/100,transform:e=>Ln.transform(e*100)},as={test:Rm("hsl","hue"),parse:qk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ln.transform(Fo(t))+", "+Ln.transform(Fo(n))+", "+Fo(fa.transform(r))+")"},Fe={test:e=>mi.test(e)||_h.test(e)||as.test(e),parse:e=>mi.test(e)?mi.parse(e):as.test(e)?as.parse(e):_h.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mi.transform(e):as.transform(e),getAnimatableNone:e=>{const t=Fe.parse(e);return t.alpha=0,Fe.transform(t)}},$D=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function VD(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Im))==null?void 0:t.length)||0)+(((n=e.match($D))==null?void 0:n.length)||0)>0}const Qk="number",Xk="color",WD="var",UD="var(",Zx="${}",HD=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Is(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(HD,l=>(Fe.test(l)?(r.color.push(s),i.push(Xk),n.push(Fe.parse(l))):l.startsWith(UD)?(r.var.push(s),i.push(WD),n.push(l)):(r.number.push(s),i.push(Qk),n.push(parseFloat(l))),++s,Zx)).split(Zx);return{values:n,split:a,indexes:r,types:i}}function GD(e){return Is(e).values}function Jk({split:e,types:t}){const n=e.length;return r=>{let i="";for(let s=0;s<n;s++)if(i+=e[s],r[s]!==void 0){const o=t[s];o===Qk?i+=Fo(r[s]):o===Xk?i+=Fe.transform(r[s]):i+=r[s]}return i}}function KD(e){return Jk(Is(e))}const YD=e=>typeof e=="number"?0:Fe.test(e)?Fe.getAnimatableNone(e):e,qD=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:YD(e);function QD(e){const t=Is(e);return Jk(t)(t.values.map((r,i)=>qD(r,t.split[i])))}const pn={test:VD,parse:GD,createTransformer:KD,getAnimatableNone:QD};function Vd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XD({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Vd(l,a,e+1/3),s=Vd(l,a,e),o=Vd(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Fc(e,t){return n=>n>0?t:e}const xe=(e,t,n)=>e+(t-e)*n,Wd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},JD=[_h,mi,as],ZD=e=>JD.find(t=>t.test(e));function e0(e){const t=ZD(e);if(!t)return!1;let n=t.parse(e);return t===as&&(n=XD(n)),n}const t0=(e,t)=>{const n=e0(e),r=e0(t);if(!n||!r)return Fc(e,t);const i={...n};return s=>(i.red=Wd(n.red,r.red,s),i.green=Wd(n.green,r.green,s),i.blue=Wd(n.blue,r.blue,s),i.alpha=xe(n.alpha,r.alpha,s),mi.transform(i))},Ch=new Set(["none","hidden"]);function eN(e,t){return Ch.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tN(e,t){return n=>xe(e,t,n)}function Mm(e){return typeof e=="number"?tN:typeof e=="string"?Tm(e)?Fc:Fe.test(e)?t0:iN:Array.isArray(e)?Zk:typeof e=="object"?Fe.test(e)?t0:nN:Fc}function Zk(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Mm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function nN(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Mm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function rN(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const iN=(e,t)=>{const n=pn.createTransformer(t),r=Is(e),i=Is(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ch.has(e)&&!i.values.length||Ch.has(t)&&!r.values.length?eN(e,t):Sa(Zk(rN(r,i),i.values),n):Fc(e,t)};function eS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xe(e,t,n):Mm(e)(e,t)}const sN=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ve.update(t,n),stop:()=>Hr(t),now:()=>Xe.isProcessing?Xe.timestamp:ct.now()}},tS=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Bc=2e4;function Lm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Bc;)t+=n,r=e.next(t);return t>=Bc?1/0:t}function oN(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Lm(r),Bc);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Jt(i)}}const Le={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ph(e,t){return e*Math.sqrt(1-t*t)}const aN=12;function lN(e,t,n){let r=n;for(let i=1;i<aN;i++)r=r-e(r)/t(r);return r}const Ud=.001;function cN({duration:e=Le.duration,bounce:t=Le.bounce,velocity:n=Le.velocity,mass:r=Le.mass}){let i,s,o=1-t;o=Dn(Le.minDamping,Le.maxDamping,o),e=Dn(Le.minDuration,Le.maxDuration,Jt(e)),o<1?(i=c=>{const u=c*o,d=u*e,h=u-n,p=Ph(c,o),m=Math.exp(-d);return Ud-h/p*m},s=c=>{const d=c*o*e,h=d*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-d),x=Ph(Math.pow(c,2),o);return(-i(c)+Ud>0?-1:1)*((h-p)*m)/x}):(i=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Ud+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=lN(i,s,a);if(e=Dt(e),isNaN(l))return{stiffness:Le.stiffness,damping:Le.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const uN=["duration","bounce"],dN=["stiffness","damping","mass"];function n0(e,t){return t.some(n=>e[n]!==void 0)}function fN(e){let t={velocity:Le.velocity,stiffness:Le.stiffness,damping:Le.damping,mass:Le.mass,isResolvedFromDuration:!1,...e};if(!n0(e,dN)&&n0(e,uN))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Dn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Le.mass,stiffness:i,damping:s}}else{const n=cN({...e,velocity:0});t={...t,...n,mass:Le.mass},t.isResolvedFromDuration=!0}return t}function $c(e=Le.visualDuration,t=Le.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=fN({...n,velocity:-Jt(n.velocity||0)}),m=h||0,x=c/(2*Math.sqrt(l*u)),w=o-s,g=Jt(Math.sqrt(l/u)),y=Math.abs(w)<5;r||(r=y?Le.restSpeed.granular:Le.restSpeed.default),i||(i=y?Le.restDelta.granular:Le.restDelta.default);let v,b,k,S,E,P;if(x<1)k=Ph(g,x),S=(m+x*g*w)/k,v=j=>{const R=Math.exp(-x*g*j);return o-R*(S*Math.sin(k*j)+w*Math.cos(k*j))},E=x*g*S+w*k,P=x*g*w-S*k,b=j=>Math.exp(-x*g*j)*(E*Math.sin(k*j)+P*Math.cos(k*j));else if(x===1){v=R=>o-Math.exp(-g*R)*(w+(m+g*w)*R);const j=m+g*w;b=R=>Math.exp(-g*R)*(g*j*R-m)}else{const j=g*Math.sqrt(x*x-1);v=D=>{const M=Math.exp(-x*g*D),B=Math.min(j*D,300);return o-M*((m+x*g*w)*Math.sinh(B)+j*w*Math.cosh(B))/j};const R=(m+x*g*w)/j,L=x*g*R-w*j,F=x*g*w-R*j;b=D=>{const M=Math.exp(-x*g*D),B=Math.min(j*D,300);return M*(L*Math.sinh(B)+F*Math.cosh(B))}}const T={calculatedDuration:p&&d||null,velocity:j=>Dt(b(j)),next:j=>{if(!p&&x<1){const L=Math.exp(-x*g*j),F=Math.sin(k*j),D=Math.cos(k*j),M=o-L*(S*F+w*D),B=Dt(L*(E*F+P*D));return a.done=Math.abs(B)<=r&&Math.abs(o-M)<=i,a.value=a.done?o:M,a}const R=v(j);if(p)a.done=j>=d;else{const L=Dt(b(j));a.done=Math.abs(L)<=r&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const j=Math.min(Lm(T),Bc),R=tS(L=>T.next(j*L).value,j,30);return j+"ms "+R},toTransition:()=>{}};return T}$c.applyToOptions=e=>{const t=oN(e,100,$c);return e.ease=t.ease,e.duration=Dt(t.duration),e.type="keyframes",e};const hN=5;function nS(e,t,n){const r=Math.max(t-hN,0);return Dk(n-e(r),t-r)}function jh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let x=n*t;const w=d+x,g=o===void 0?w:o(w);g!==w&&(x=g-d);const y=P=>-x*Math.exp(-P/r),v=P=>g+y(P),b=P=>{const T=y(P),j=v(P);h.done=Math.abs(T)<=c,h.value=h.done?g:j};let k,S;const E=P=>{p(h.value)&&(k=P,S=$c({keyframes:[h.value,m(h.value)],velocity:nS(v,P,h.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:P=>{let T=!1;return!S&&k===void 0&&(T=!0,b(P),E(P)),k!==void 0&&P>=k?S.next(P-k):(!T&&b(P),h)}}}function pN(e,t,n){const r=[],i=n||Ur.mix||eS,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||en:t;a=Sa(l,a)}r.push(a)}return r}function mN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Cm(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=pN(t,r,i),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=da(e[d],e[d+1],u);return a[d](h)};return n?u=>c(Dn(e[0],e[s-1],u)):c}function gN(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=da(0,t,r);e.push(xe(n,1,i))}}function yN(e){const t=[0];return gN(t,e.length-1),t}function xN(e,t){return e.map(n=>n*t)}function vN(e,t){return e.map(()=>t||Uk).splice(0,e.length-1)}function Bo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=jD(r)?r.map(Qx):Qx(r),s={done:!1,value:t[0]},o=xN(n&&n.length===t.length?n:yN(t),e),a=mN(o,t,{ease:Array.isArray(i)?i:vN(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const wN=e=>e!==null;function Cu(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(wN),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const bN={decay:jh,inertia:jh,tween:Bo,keyframes:Bo,spring:$c};function rS(e){typeof e.type=="string"&&(e.type=bN[e.type])}class Am{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const kN=e=>e/100;class Vc extends Am{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==ct.now()&&this.tick(ct.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;rS(t);const{type:n=Bo,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Bo;l!==Bo&&typeof a[0]!="number"&&(this.mixKeyframes=Sa(kN,eS(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Lm(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:p,type:m,onUpdate:x,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,b=r;if(d){const P=Math.min(this.currentTime,i)/a;let T=Math.floor(P),j=P%1;!j&&P>=1&&(j=1),j===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(h==="reverse"?(j=1-j,p&&(j-=p/a)):h==="mirror"&&(b=o)),v=Dn(0,1,j)*a}let k;y?(this.delayState.value=u[0],k=this.delayState):k=b.next(v),s&&!y&&(k.value=s(k.value));let{done:S}=k;!y&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return E&&m!==jh&&(k.value=Cu(u,this.options,w,this.speed)),x&&x(k.value),E&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return Jt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Jt(t)}get time(){return Jt(this.currentTime)}set time(t){t=Dt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return nS(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(ct.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Jt(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=sN,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ct.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function SN(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const gi=e=>e*180/Math.PI,Eh=e=>{const t=gi(Math.atan2(e[1],e[0]));return Th(t)},_N={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Eh,rotateZ:Eh,skewX:e=>gi(Math.atan(e[1])),skewY:e=>gi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Th=e=>(e=e%360,e<0&&(e+=360),e),r0=Eh,i0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),s0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),CN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:i0,scaleY:s0,scale:e=>(i0(e)+s0(e))/2,rotateX:e=>Th(gi(Math.atan2(e[6],e[5]))),rotateY:e=>Th(gi(Math.atan2(-e[2],e[0]))),rotateZ:r0,rotate:r0,skewX:e=>gi(Math.atan(e[4])),skewY:e=>gi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ih(e){return e.includes("scale")?1:0}function Rh(e,t){if(!e||e==="none")return Ih(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=CN,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_N,i=a}if(!i)return Ih(t);const s=r[t],o=i[1].split(",").map(jN);return typeof s=="function"?s(o):o[s]}const PN=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Rh(n,t)};function jN(e){return parseFloat(e.trim())}const Us=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hs=new Set([...Us,"pathRotation"]),o0=e=>e===Ws||e===Y,EN=new Set(["x","y","z"]),TN=Us.filter(e=>!EN.has(e));function IN(e){const t=[];return TN.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Tr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Rh(t,"x"),y:(e,{transform:t})=>Rh(t,"y")};Tr.translateX=Tr.x;Tr.translateY=Tr.y;const Si=new Set;let Mh=!1,Lh=!1,Ah=!1;function iS(){if(Lh){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=IN(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Lh=!1,Mh=!1,Si.forEach(e=>e.complete(Ah)),Si.clear()}function sS(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Lh=!0)})}function RN(){Ah=!0,sS(),iS(),Ah=!1}class Dm{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Si.add(this),Mh||(Mh=!0,ve.read(sS),ve.resolveKeyframes(iS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}SN(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Si.delete(this)}cancel(){this.state==="scheduled"&&(Si.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const MN=e=>e.startsWith("--");function oS(e,t,n){MN(t)?e.style.setProperty(t,n):e.style[t]=n}const LN={};function aS(e,t){const n=Ak(e);return()=>LN[t]??n()}const AN=aS(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),lS=aS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_o=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,a0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_o([0,.65,.55,1]),circOut:_o([.55,0,1,.45]),backIn:_o([.31,.01,.66,-.59]),backOut:_o([.33,1.53,.69,.99])};function cS(e,t){if(e)return typeof e=="function"?lS()?tS(e,t):"ease-out":Hk(e)?_o(e):Array.isArray(e)?e.map(n=>cS(n,t)||a0.easeOut):a0[e]}function DN(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=cS(a,i);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function uS(e){return typeof e=="function"&&"applyToOptions"in e}function NN({type:e,...t}){return uS(e)&&lS()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class dS extends Am{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Cm(typeof t.type!="string");const c=NN(t);this.animation=DN(n,r,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=Cu(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),oS(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Jt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Jt(t)}get time(){return Jt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Dt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&AN()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),en):i(this)}}const fS={anticipate:$k,backInOut:Bk,circInOut:Wk};function zN(e){return e in fS}function ON(e){typeof e.ease=="string"&&zN(e.ease)&&(e.ease=fS[e.ease])}const Hd=10;class FN extends dS{constructor(t){ON(t),rS(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Vc({...o,autoplay:!1}),l=Math.max(Hd,ct.now()-this.startTime),c=Dn(0,Hd,l-Hd),u=a.sample(l).value,{name:d}=this.options;s&&d&&oS(s,d,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const l0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(pn.test(e)||e==="0")&&!e.startsWith("url("));function BN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function $N(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=l0(i,t),a=l0(s,t);return!o||!a?!1:BN(e)||(n==="spring"||uS(n))&&r}function Dh(e){e.duration=0,e.type="keyframes"}const hS=new Set(["opacity","clipPath","filter","transform"]),VN=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function WN(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&VN.test(e[t]))return!0;return!1}const UN=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),HN=Ak(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function GN(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return HN()&&n&&(hS.has(n)||UN.has(n)&&WN(a))&&(n!=="transform"||!u)&&!c&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const KN=40;class YN extends Am{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var x,w;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=ct.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:u,...d},p=(u==null?void 0:u.KeyframeResolver)||Dm;this.keyframeResolver=new p(a,(x,w,g)=>this.onKeyframesResolved(x,w,h,!g),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,i){var g,y;this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=ct.now();let d=!0;$N(t,s,o,a)||(d=!1,(Ur.instantAnimations||!l)&&(u==null||u(Cu(t,r,n))),t[0]=t[t.length-1],Dh(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>KN?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=d&&!c&&GN(p),x=(y=(g=p.motionValue)==null?void 0:g.owner)==null?void 0:y.current;let w;if(m)try{w=new FN({...p,element:x})}catch{w=new Vc(p)}else w=new Vc(p);w.finished.then(()=>{this.notifyFinished()}).catch(en),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),RN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function pS(e,t,n,r=0,i=1){const s=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const c0=30,qN=e=>!isNaN(parseFloat(e));class QN{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=ct.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ct.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=qN(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pm);const r=this.events[t].add(n);return t==="change"?()=>{r(),ve.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ct.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>c0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,c0);return Dk(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Rs(e,t){return new QN(e,t)}function mS(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Nm(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?mS(n,e):n}const XN={type:"spring",stiffness:500,damping:25,restSpeed:10},JN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ZN={type:"keyframes",duration:.8},e3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},t3=(e,{keyframes:t})=>t.length>2?ZN:Hs.has(e)?e.startsWith("scale")?JN(t[1]):XN:e3,n3=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function r3(e){for(const t in e)if(!n3.has(t))return!0;return!1}const zm=(e,t,n,r={},i,s)=>o=>{const a=Nm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Dt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};r3(a)||Object.assign(u,t3(e,u)),u.duration&&(u.duration=Dt(u.duration)),u.repeatDelay&&(u.repeatDelay=Dt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Dh(u),u.delay===0&&(d=!0)),(Ur.instantAnimations||Ur.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,Dh(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=Cu(u.keyframes,a);if(h!==void 0){ve.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Vc(u):new YN(u)},i3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function s3(e){const t=i3.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function gS(e,t,n=1){const[r,i]=s3(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Rk(o)?parseFloat(o):o}return Tm(i)?gS(i,t,n+1):i}function u0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Om(e,t,n,r){if(typeof t=="function"){const[i,s]=u0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=u0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function _i(e,t,n){const r=e.getProps();return Om(r,t,n!==void 0?n:r.custom,e)}const yS=new Set(["width","height","top","left","right","bottom",...Us]),Nh=e=>Array.isArray(e);function o3(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Rs(n))}function a3(e){return Nh(e)?e[e.length-1]||0:e}function l3(e,t){const n=_i(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=a3(s[o]);o3(e,o,a)}}const Je=e=>!!(e&&e.getVelocity);function c3(e){return!!(Je(e)&&e.add)}function zh(e,t){const n=e.getValue("willChange");if(c3(n))return n.add(t);if(!n&&Ur.WillChange){const r=new Ur.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Fm(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const u3="framerAppearId",xS="data-"+Fm(u3);function vS(e){return e.props[xS]}function d3({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wS(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?mS(s,l):l;const c=s==null?void 0:s.reduceMotion,u=s==null?void 0:s.skipAnimations;r&&(s=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i],p=s==null?void 0:s.path;p&&p.animateVisualElement(e,a,s,n,d);for(const m in a){const x=e.getValue(m,e.latestValues[m]??null),w=a[m];if(w===void 0||h&&d3(h,m))continue;const g={delay:n,...Nm(s||{},m)};u&&(g.skipAnimations=!0);const y=x.get();if(y!==void 0&&!x.isAnimating()&&!Array.isArray(w)&&w===y&&!g.velocity){ve.update(()=>x.set(w));continue}let v=!1;if(window.MotionHandoffAnimation){const S=vS(e);if(S){const E=window.MotionHandoffAnimation(S,m,ve);E!==null&&(g.startTime=E,v=!0)}}zh(e,m);const b=c??e.shouldReduceMotion;x.start(zm(m,x,w,b&&yS.has(m)?{type:!1}:g,e,v));const k=x.animation;k&&d.push(k)}if(o){const m=()=>ve.update(()=>{o&&l3(e,o)});d.length?Promise.all(d).then(m):m()}return d}function Oh(e,t,n={}){var l;const r=_i(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(wS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return f3(e,t,c,u,d,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>u())}else return Promise.all([s(),o(n.delay)])}function f3(e,t,n=0,r=0,i=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Oh(l,t,{...o,delay:n+(typeof r=="function"?0:r)+pS(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function h3(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Oh(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Oh(e,t,n);else{const i=typeof t=="function"?_i(e,t,n.custom):t;r=Promise.all(wS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const p3={test:e=>e==="auto",parse:e=>e},bS=e=>t=>t.test(e),kS=[Ws,Y,Ln,Hn,BD,FD,p3],d0=e=>kS.find(bS(e));function m3(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Lk(e):!0}const g3=new Set(["brightness","contrast","saturate","opacity"]);function y3(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Im)||[];if(!r)return e;const i=n.replace(r,"");let s=g3.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const x3=/\b([a-z-]*)\(.*?\)/gu,Fh={...pn,getAnimatableNone:e=>{const t=e.match(x3);return t?t.map(y3).join(" "):e}},Bh={...pn,getAnimatableNone:e=>{const t=pn.parse(e);return pn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},f0={...Ws,transform:Math.round},v3={rotate:Hn,pathRotation:Hn,rotateX:Hn,rotateY:Hn,rotateZ:Hn,scale:hl,scaleX:hl,scaleY:hl,scaleZ:hl,skew:Hn,skewX:Hn,skewY:Hn,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:fa,originX:Jx,originY:Jx,originZ:Y},Wc={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,inset:Y,insetBlock:Y,insetBlockStart:Y,insetBlockEnd:Y,insetInline:Y,insetInlineStart:Y,insetInlineEnd:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,paddingBlock:Y,paddingBlockStart:Y,paddingBlockEnd:Y,paddingInline:Y,paddingInlineStart:Y,paddingInlineEnd:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,marginBlock:Y,marginBlockStart:Y,marginBlockEnd:Y,marginInline:Y,marginInlineStart:Y,marginInlineEnd:Y,fontSize:Y,backgroundPositionX:Y,backgroundPositionY:Y,...v3,zIndex:f0,fillOpacity:fa,strokeOpacity:fa,numOctaves:f0},w3={...Wc,color:Fe,backgroundColor:Fe,outlineColor:Fe,fill:Fe,stroke:Fe,borderColor:Fe,borderTopColor:Fe,borderRightColor:Fe,borderBottomColor:Fe,borderLeftColor:Fe,filter:Fh,WebkitFilter:Fh,mask:Bh,WebkitMask:Bh},SS=e=>w3[e],b3=new Set([Fh,Bh]);function _S(e,t){let n=SS(e);return b3.has(n)||(n=pn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const k3=new Set(["auto","none","0"]);function S3(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!k3.has(s)&&Is(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=_S(n,i)}class _3 extends Dm{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Tm(d))){const h=gS(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!yS.has(r)||t.length!==2)return;const[i,s]=t,o=d0(i),a=d0(s),l=Xx(i),c=Xx(s);if(l!==c&&Tr[r]){this.needsMeasurement=!0;return}if(o!==a)if(o0(o)&&o0(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Tr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||m3(t[i]))&&r.push(i);r.length&&S3(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Tr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function CS(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const $h=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gl(e){return Mk(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Bm}=Gk(queueMicrotask,!1),ln={x:!1,y:!1};function PS(){return ln.x||ln.y}function C3(e){return e==="x"||e==="y"?ln[e]?null:(ln[e]=!0,()=>{ln[e]=!1}):ln.x||ln.y?null:(ln.x=ln.y=!0,()=>{ln.x=ln.y=!1})}function jS(e,t){const n=CS(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function P3(e){return!(e.pointerType==="touch"||PS())}function j3(e,t,n={}){const[r,i,s]=jS(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",m)},d=w=>{c&&(c(w),c=void 0),u()},h=w=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(w))},p=()=>{a=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},m=w=>{if(w.pointerType!=="touch"){if(a){l=!0;return}d(w)}},x=w=>{if(!P3(w))return;l=!1;const g=t(o,w);typeof g=="function"&&(c=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",x,i),o.addEventListener("pointerdown",p,i)}),s}const ES=(e,t)=>t?e===t?!0:ES(e,t.parentElement):!1,$m=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,E3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function T3(e){return E3.has(e.tagName)||e.isContentEditable===!0}const I3=new Set(["INPUT","SELECT","TEXTAREA"]);function R3(e){return I3.has(e.tagName)||e.isContentEditable===!0}const Kl=new WeakSet;function h0(e){return t=>{t.key==="Enter"&&e(t)}}function Gd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const M3=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=h0(()=>{if(Kl.has(n))return;Gd(n,"down");const i=h0(()=>{Gd(n,"up")}),s=()=>Gd(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function p0(e){return $m(e)&&!PS()}const m0=new WeakSet;function L3(e,t,n={}){const[r,i,s]=jS(e,n),o=a=>{const l=a.currentTarget;if(!p0(a)||m0.has(a))return;Kl.add(l),n.stopPropagation&&m0.add(a);const c=t(l,a),u=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Kl.has(l)&&Kl.delete(l),p0(p)&&typeof c=="function"&&c(p,{success:m})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||ES(l,p.target))},h=p=>{u(p,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Gl(a)&&(a.addEventListener("focus",c=>M3(c,i)),!T3(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Vm(e){return Mk(e)&&"ownerSVGElement"in e}const Yl=new WeakMap;let gr;const TS=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Vm(r)&&"getBBox"in r?r.getBBox()[t]:r[n],A3=TS("inline","width","offsetWidth"),D3=TS("block","height","offsetHeight");function N3({target:e,borderBoxSize:t}){var n;(n=Yl.get(e))==null||n.forEach(r=>{r(e,{get width(){return A3(e,t)},get height(){return D3(e,t)}})})}function z3(e){e.forEach(N3)}function O3(){typeof ResizeObserver>"u"||(gr=new ResizeObserver(z3))}function F3(e,t){gr||O3();const n=CS(e);return n.forEach(r=>{let i=Yl.get(r);i||(i=new Set,Yl.set(r,i)),i.add(t),gr==null||gr.observe(r)}),()=>{n.forEach(r=>{const i=Yl.get(r);i==null||i.delete(t),i!=null&&i.size||gr==null||gr.unobserve(r)})}}const ql=new Set;let ls;function B3(){ls=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ql.forEach(t=>t(e))},window.addEventListener("resize",ls)}function $3(e){return ql.add(e),ls||B3(),()=>{ql.delete(e),!ql.size&&typeof ls=="function"&&(window.removeEventListener("resize",ls),ls=void 0)}}function g0(e,t){return typeof e=="function"?$3(e):F3(e,t)}function V3(e){return Vm(e)&&e.tagName==="svg"}const W3=[...kS,Fe,pn],U3=e=>W3.find(bS(e)),y0=()=>({translate:0,scale:1,origin:0,originPoint:0}),cs=()=>({x:y0(),y:y0()}),x0=()=>({min:0,max:0}),Ve=()=>({x:x0(),y:x0()}),H3=new WeakMap;function Pu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ha(e){return typeof e=="string"||Array.isArray(e)}const Wm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Um=["initial",...Wm];function ju(e){return Pu(e.animate)||Um.some(t=>ha(e[t]))}function IS(e){return!!(ju(e)||e.variants)}function G3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Je(i))e.addValue(r,i);else if(Je(s))e.addValue(r,Rs(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Rs(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Uc={current:null},Hm={current:!1},K3=typeof window<"u";function RS(){if(Hm.current=!0,!!K3)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Uc.current=e.matches;e.addEventListener("change",t),t()}else Uc.current=!1}const v0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Hc={};function MS(e){Hc=e}function Y3(){return Hc}class q3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Dm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ct.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ve.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=ju(n),this.isVariantNode=IS(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const m=h[p];c[p]!==void 0&&Je(m)&&m.set(c[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,H3.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hm.current||RS(),this.shouldReduceMotion=Uc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Hr(this.notifyUpdate),Hr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&hS.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new dS({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:Dt(u)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=Hs.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ve.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hc){const n=Hc[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ve()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<v0.length;r++){const i=v0[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=G3(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Rs(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Rk(r)||Lk(r))?r=parseFloat(r):!U3(r)&&pn.test(n)&&(r=_S(t,n)),this.setBaseTarget(t,Je(r)?r.get():r)),Je(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Om(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Je(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Bm.render(this.render)}}class LS extends q3{constructor(){super(...arguments),this.KeyframeResolver=_3}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Je(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Qr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function AS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Q3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function X3(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kd(e){return e===void 0||e===1}function Vh({scale:e,scaleX:t,scaleY:n}){return!Kd(e)||!Kd(t)||!Kd(n)}function li(e){return Vh(e)||DS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function DS(e){return w0(e.x)||w0(e.y)}function w0(e){return e&&e!=="0%"}function Gc(e,t,n){const r=e-n,i=t*r;return n+i}function b0(e,t,n,r,i){return i!==void 0&&(e=Gc(e,i,r)),Gc(e,n,r)+t}function Wh(e,t=0,n=1,r,i){e.min=b0(e.min,t,n,r,i),e.max=b0(e.max,t,n,r,i)}function NS(e,{x:t,y:n}){Wh(e.x,t.translate,t.scale,t.originPoint),Wh(e.y,n.translate,n.scale,n.originPoint)}const k0=.999999999999,S0=1.0000000000001;function J3(e,t,n,r=!1){var a;const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=n[l],o=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(jn(e.x,-s.scroll.offset.x),jn(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,NS(e,o)),r&&li(s.latestValues)&&Ql(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<S0&&t.x>k0&&(t.x=1),t.y<S0&&t.y>k0&&(t.y=1)}function jn(e,t){e.min+=t,e.max+=t}function _0(e,t,n,r,i=.5){const s=xe(e.min,e.max,i);Wh(e,t,n,s,r)}function C0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Ql(e,t,n){const r=n??e;_0(e.x,C0(t.x,r.x),t.scaleX,t.scale,t.originX),_0(e.y,C0(t.y,r.y),t.scaleY,t.scale,t.originY)}function zS(e,t){return AS(X3(e.getBoundingClientRect(),t))}function Z3(e,t,n){const r=zS(e,n),{scroll:i}=t;return i&&(jn(r.x,i.offset.x),jn(r.y,i.offset.y)),r}const ez={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tz=Us.length;function nz(e,t,n){let r="",i=!0;for(let o=0;o<tz;o++){const a=Us[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const u=parseFloat(l);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=$h(l,Wc[a]);if(!c){i=!1;const d=ez[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${$h(s,Wc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Gm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Hs.has(l)){o=!0;continue}else if(Yk(l)){i[l]=c;continue}else{const u=$h(c,Wc[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=nz(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}function OS(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function P0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const go={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=P0(e,t.target.x),r=P0(e,t.target.y);return`${n}% ${r}%`}},rz={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=pn.parse(e);if(i.length>5)return r;const s=pn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=xe(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}},Uh={borderRadius:{...go,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:go,borderTopRightRadius:go,borderBottomLeftRadius:go,borderBottomRightRadius:go,boxShadow:rz};function FS(e,{layout:t,layoutId:n}){return Hs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Uh[e]||e==="opacity")}function Km(e,t,n){var o;const r=e.style,i=t==null?void 0:t.style,s={};if(!r)return s;for(const a in r)(Je(r[a])||i&&Je(i[a])||FS(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function iz(e){return window.getComputedStyle(e)}class sz extends LS{constructor(){super(...arguments),this.type="html",this.renderInstance=OS}readValueFromInstance(t,n){var r;if(Hs.has(n))return(r=this.projection)!=null&&r.isProjecting?Ih(n):PN(t,n);{const i=iz(t),s=(Yk(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return zS(t,n)}build(t,n,r){Gm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Km(t,n,r)}}const oz={offset:"stroke-dashoffset",array:"stroke-dasharray"},az={offset:"strokeDashoffset",array:"strokeDasharray"};function lz(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?oz:az;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const cz=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function BS(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(Gm(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const p of cz)d[p]!==void 0&&(h[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&lz(d,i,s,o,!1)}const $S=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),VS=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uz(e,t,n,r){OS(e,t,void 0,r);for(const i in t.attrs)e.setAttribute($S.has(i)?i:Fm(i),t.attrs[i])}function WS(e,t,n){const r=Km(e,t,n);for(const i in e)if(Je(e[i])||Je(t[i])){const s=Us.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class dz extends LS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ve}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Hs.has(n)){const r=SS(n);return r&&r.default||0}return n=$S.has(n)?n:Fm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return WS(t,n,r)}build(t,n,r){BS(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){uz(t,n,r,i)}mount(t){this.isSVGTag=VS(t.tagName),super.mount(t)}}const fz=Um.length;function US(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?US(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<fz;n++){const r=Um[n],i=e.props[r];(ha(i)||i===!1)&&(t[r]=i)}return t}function HS(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const hz=[...Wm].reverse(),pz=Wm.length;function mz(e){return t=>Promise.all(t.map(({animation:n,options:r})=>h3(e,n,r)))}function gz(e){let t=mz(e),n=j0(),r=!0,i=!1;const s=c=>(u,d)=>{var p;const h=_i(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:m,transitionEnd:x,...w}=h;u={...u,...w,...x}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=US(e.parent)||{},h=[],p=new Set;let m={},x=1/0;for(let g=0;g<pz;g++){const y=hz[g],v=n[y],b=u[y]!==void 0?u[y]:d[y],k=ha(b),S=y===c?v.isActive:null;S===!1&&(x=g);let E=b===d[y]&&b!==u[y]&&k;if(E&&(r||i)&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...m},!v.isActive&&S===null||!b&&!v.prevProp||Pu(b)||typeof b=="boolean")continue;if(y==="exit"&&v.isActive&&S!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const P=yz(v.prevProp,b);let T=P||y===c&&v.isActive&&!E&&k||g>x&&k,j=!1;const R=Array.isArray(b)?b:[b];let L=R.reduce(s(y),{});S===!1&&(L={});const{prevResolvedValues:F={}}=v,D={...F,...L},M=z=>{T=!0,p.has(z)&&(j=!0,p.delete(z)),v.needsAnimating[z]=!0;const W=e.getValue(z);W&&(W.liveStyle=!1)};for(const z in D){const W=L[z],C=F[z];if(m.hasOwnProperty(z))continue;let $=!1;Nh(W)&&Nh(C)?$=!HS(W,C)||P:$=W!==C,$?W!=null?M(z):p.add(z):W!==void 0&&p.has(z)?M(z):v.protectedKeys[z]=!0}v.prevProp=b,v.prevResolvedValues=L,v.isActive&&(m={...m,...L}),(r||i)&&e.blockInitialAnimation&&(T=!1);const B=E&&P;T&&(!B||j)&&h.push(...R.map(z=>{const W={type:y};if(typeof z=="string"&&(r||i)&&!B&&e.manuallyAnimateOnMount&&e.parent){const{parent:C}=e,$=_i(C,z);if(C.enteringChildren&&$){const{delayChildren:q}=$.transition||{};W.delay=pS(C.enteringChildren,e,q)}}return{animation:z,options:W}}))}if(p.size){const g={};if(typeof u.initial!="boolean"){const y=_i(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(g.transition=y.transition)}p.forEach(y=>{const v=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),g[y]=v??null}),h.push({animation:g})}let w=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,i=!1,w?t(h):Promise.resolve()}function l(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=j0(),i=!0}}}function yz(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!HS(t,e):!1}function ti(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function j0(){return{animate:ti(!0),whileInView:ti(),whileHover:ti(),whileTap:ti(),whileDrag:ti(),whileFocus:ti(),exit:ti()}}function Hh(e,t){e.min=t.min,e.max=t.max}function on(e,t){Hh(e.x,t.x),Hh(e.y,t.y)}function E0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const GS=1e-4,xz=1-GS,vz=1+GS,KS=.01,wz=0-KS,bz=0+KS;function ut(e){return e.max-e.min}function kz(e,t,n){return Math.abs(e-t)<=n}function T0(e,t,n,r=.5){e.origin=r,e.originPoint=xe(t.min,t.max,e.origin),e.scale=ut(n)/ut(t),e.translate=xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xz&&e.scale<=vz||isNaN(e.scale))&&(e.scale=1),(e.translate>=wz&&e.translate<=bz||isNaN(e.translate))&&(e.translate=0)}function $o(e,t,n,r){T0(e.x,t.x,n.x,r?r.originX:void 0),T0(e.y,t.y,n.y,r?r.originY:void 0)}function I0(e,t,n,r=0){const i=r?xe(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+ut(t)}function Sz(e,t,n,r){I0(e.x,t.x,n.x,r==null?void 0:r.x),I0(e.y,t.y,n.y,r==null?void 0:r.y)}function R0(e,t,n,r=0){const i=r?xe(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+ut(t)}function Kc(e,t,n,r){R0(e.x,t.x,n.x,r==null?void 0:r.x),R0(e.y,t.y,n.y,r==null?void 0:r.y)}function M0(e,t,n,r,i){return e-=t,e=Gc(e,1/n,r),i!==void 0&&(e=Gc(e,1/i,r)),e}function _z(e,t=0,n=1,r=.5,i,s=e,o=e){if(Ln.test(t)&&(t=parseFloat(t),t=xe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=xe(s.min,s.max,r);e===s&&(a-=t),e.min=M0(e.min,t,n,a,i),e.max=M0(e.max,t,n,a,i)}function L0(e,t,[n,r,i],s,o){_z(e,t[n],t[r],t[i],t.scale,s,o)}const Cz=["x","scaleX","originX"],Pz=["y","scaleY","originY"];function A0(e,t,n,r){L0(e.x,t,Cz,n?n.x:void 0,r?r.x:void 0),L0(e.y,t,Pz,n?n.y:void 0,r?r.y:void 0)}function D0(e){return e.translate===0&&e.scale===1}function YS(e){return D0(e.x)&&D0(e.y)}function N0(e,t){return e.min===t.min&&e.max===t.max}function jz(e,t){return N0(e.x,t.x)&&N0(e.y,t.y)}function z0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qS(e,t){return z0(e.x,t.x)&&z0(e.y,t.y)}function O0(e){return ut(e.x)/ut(e.y)}function F0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function _n(e){return[e("x"),e("y")]}function Ez(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,pathRotation:d,rotateX:h,rotateY:p,skewX:m,skewY:x}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),x&&(r+=`skewY(${x}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const QS=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Tz=QS.length,B0=e=>typeof e=="string"?parseFloat(e):e,$0=e=>typeof e=="number"||Y.test(e);function Iz(e,t,n,r,i,s){i?(e.opacity=xe(0,n.opacity??1,Rz(r)),e.opacityExit=xe(t.opacity??1,0,Mz(r))):s&&(e.opacity=xe(t.opacity??1,n.opacity??1,r));for(let o=0;o<Tz;o++){const a=QS[o];let l=V0(t,a),c=V0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||$0(l)===$0(c)?(e[a]=Math.max(xe(B0(l),B0(c),r),0),(Ln.test(c)||Ln.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=xe(t.rotate||0,n.rotate||0,r))}function V0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Rz=XS(0,.5,Vk),Mz=XS(.5,.95,en);function XS(e,t,n){return r=>r<e?0:r>t?1:n(da(e,t,r))}function Lz(e,t,n){const r=Je(e)?e:Rs(e);return r.start(zm("",r,t,n)),r.animation}function pa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Az=(e,t)=>e.depth-t.depth;class Dz{constructor(){this.children=[],this.isDirty=!1}add(t){_m(this.children,t),this.isDirty=!0}remove(t){Oc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Az),this.isDirty=!1,this.children.forEach(t)}}function Nz(e,t){const n=ct.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Hr(r),e(s-t))};return ve.setup(r,!0),()=>Hr(r)}function Xl(e){return Je(e)?e.get():e}class zz{constructor(){this.members=[]}add(t){_m(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(Oc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Oc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=r.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,s,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(i=t.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||o.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Yd=["","X","Y","Z"],Oz=1e3;let Fz=0;function qd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function JS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ve,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&JS(r)}function ZS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Fz++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Vz),this.nodes.forEach(Yz),this.nodes.forEach(qz),this.nodes.forEach(Wz)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Dz)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Pm),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Vm(o)&&!V3(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;ve.read(()=>{d=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=Nz(h,250),Jl.hasAnimatedSinceResize&&(Jl.hasAnimatedSinceResize=!1,this.nodes.forEach(H0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||eO,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=c.getProps(),g=!this.targetLayout||!qS(this.targetLayout,p),y=!d&&h;if(this.options.layoutRoot||this.resumeFrom||y||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Nm(m,"layout"),onPlay:x,onComplete:w};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,y,v.path)}else d||H0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Hr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Qz),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&JS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(Hz),this.nodes.forEach(W0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(U0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Gz),this.nodes.forEach(Kz),this.nodes.forEach(Bz),this.nodes.forEach($z)):this.nodes.forEach(U0),this.clearAllSnapshots();const a=ct.now();Xe.delta=Dn(0,1e3/60,a-Xe.timestamp),Xe.timestamp=a,Xe.isProcessing=!0,Bd.update.process(Xe),Bd.preRender.process(Xe),Bd.render.process(Xe),Xe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uz),this.sharedNodes.forEach(Xz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ve.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ve.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ut(this.snapshot.measuredBox.x)&&!ut(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ve()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!YS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||li(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),tO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ve();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(nO))){const{scroll:u}=this.root;u&&(jn(a.x,u.offset.x),jn(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Ve();if(on(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&on(a,o),jn(a.x,d.offset.x),jn(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var u,d;const c=l||Ve();on(c,o);for(let h=0;h<this.path.length;h++){const p=this.path[h];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(jn(c.x,-p.scroll.offset.x),jn(c.y,-p.scroll.offset.y)),li(p.latestValues)&&Ql(c,p.latestValues,(u=p.layout)==null?void 0:u.layoutBox)}return li(this.latestValues)&&Ql(c,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),c}removeTransform(o){var l;const a=Ve();on(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!li(u.latestValues))continue;let d;u.instance&&(Vh(u.latestValues)&&u.updateSnapshot(),d=Ve(),on(d,u.measurePageBox())),A0(a,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,d)}return li(this.latestValues)&&A0(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Xe.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ve(),this.targetWithTransforms=Ve()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Sz(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):on(this.target,this.layout.layoutBox),NS(this.target,this.targetDelta)):on(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Vh(this.parent.latestValues)||DS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ve(),this.relativeTargetOrigin=Ve(),Kc(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),on(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Xe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;on(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;J3(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ve());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(E0(this.prevProjectionDelta.x,this.projectionDelta.x),E0(this.prevProjectionDelta.y,this.projectionDelta.y)),$o(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!F0(this.projectionDelta.x,this.prevProjectionDelta.x)||!F0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cs(),this.projectionDelta=cs(),this.projectionDeltaWithTransform=cs()}setAnimationOrigin(o,a=!1,l){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=cs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Ve(),m=c?c.source:void 0,x=this.layout?this.layout.source:void 0,w=m!==x,g=this.getStack(),y=!g||g.members.length<=1,v=!!(w&&!y&&this.options.crossfade===!0&&!this.path.some(Zz));this.animationProgress=0;let b;const k=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=S=>{const E=S/1e3,P=k==null?void 0:k(E);P?(h.x.translate=P.x,h.x.scale=xe(o.x.scale,1,E),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=P.y,h.y.scale=xe(o.y.scale,1,E),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(G0(h.x,o.x,E),G0(h.y,o.y,E)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Jz(this.relativeTarget,this.relativeTargetOrigin,p,E),b&&jz(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ve()),on(b,this.relativeTarget)),w&&(this.animationValues=d,Iz(d,u,this.latestValues,E,v,y)),P&&P.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ve.update(()=>{Jl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Rs(0)),this.motionValue.jump(0,!1),this.currentAnimation=Lz(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Oz),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&e_(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ve();const d=ut(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=ut(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}on(a,l),Ql(a,u),$o(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new zz),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&qd("z",o,c,this.animationValues);for(let u=0;u<Yd.length;u++)qd(`rotate${Yd[u]}`,o,c,this.animationValues),qd(`skew${Yd[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xl(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!li(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Ez(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Uh){if(u[m]===void 0)continue;const{correct:x,applyTo:w,isCSSVariable:g}=Uh[m],y=d==="none"?u[m]:x(u[m],c);if(w){const v=w.length;for(let b=0;b<v;b++)o[w[b]]=y}else g?this.options.visualElement.renderState.vars[m]=y:o[m]=y}this.options.layoutId&&(o.pointerEvents=c===this?Xl(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(W0),this.root.sharedNodes.clear()}}}function Bz(e){e.updateLayout()}function $z(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;if(s==="size")_n(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=ut(h);h.min=r[d].min,h.max=h.min+p});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";Hh(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else e_(s,t.layoutBox,r)&&_n(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=ut(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=cs();$o(a,r,t.layoutBox);const l=cs();o?$o(l,e.applyTransform(i,!0),t.measuredBox):$o(l,r,t.layoutBox);const c=!YS(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=e.options.layoutAnchor||void 0,x=Ve();Kc(x,t.layoutBox,h.layoutBox,m);const w=Ve();Kc(w,r,p.layoutBox,m),qS(x,w)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=x,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Vz(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Wz(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Uz(e){e.clearSnapshot()}function W0(e){e.clearMeasurements()}function Hz(e){e.isLayoutDirty=!0,e.updateLayout()}function U0(e){e.isLayoutDirty=!1}function Gz(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Kz(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function H0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yz(e){e.resolveTargetDelta()}function qz(e){e.calcProjection()}function Qz(e){e.resetSkewAndRotation()}function Xz(e){e.removeLeadSnapshot()}function G0(e,t,n){e.translate=xe(t.translate,0,n),e.scale=xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function K0(e,t,n,r){e.min=xe(t.min,n.min,r),e.max=xe(t.max,n.max,r)}function Jz(e,t,n,r){K0(e.x,t.x,n.x,r),K0(e.y,t.y,n.y,r)}function Zz(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const eO={duration:.45,ease:[.4,0,.1,1]},Y0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),q0=Y0("applewebkit/")&&!Y0("chrome/")?Math.round:en;function Q0(e){e.min=q0(e.min),e.max=q0(e.max)}function tO(e){Q0(e.x),Q0(e.y)}function e_(e,t,n){return e==="position"||e==="preserve-aspect"&&!kz(O0(t),O0(n),.2)}function nO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const rO=ZS({attachResizeListener:(e,t)=>pa(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Qd={current:void 0},t_=ZS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Qd.current){const e=new rO({});e.mount(window),e.setOptions({layoutScroll:!0}),Qd.current=e}return Qd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ym=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function X0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function iO(...e){return t=>{let n=!1;const r=e.map(i=>{const s=X0(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():X0(e[i],null)}}}}function sO(...e){return _.useCallback(iO(...e),e)}class oO extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Gl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Gl(r)&&r.offsetWidth||0,s=Gl(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=s-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function aO({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var h;const o=_.useId(),a=_.useRef(null),l=_.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=_.useContext(Ym),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=sO(a,u);return _.useInsertionEffect(()=>{const{width:p,height:m,top:x,left:w,right:g,bottom:y,direction:v}=l.current;if(t||s===!1||!a.current||!p||!m)return;const b=v==="rtl",k=n==="left"?b?`right: ${g}`:`left: ${w}`:b?`left: ${w}`:`right: ${g}`,S=r==="bottom"?`bottom: ${y}`:`top: ${x}`;a.current.dataset.motionPopId=o;const E=document.createElement("style");c&&(E.nonce=c);const P=i??document.head;return P.appendChild(E),E.sheet&&E.sheet.insertRule(`
71
- [data-motion-pop-id="${o}"] {
72
- position: absolute !important;
73
- width: ${p}px !important;
74
- height: ${m}px !important;
75
- ${k}px !important;
76
- ${S}px !important;
77
- }
78
- `),()=>{var T;(T=a.current)==null||T.removeAttribute("data-motion-pop-id"),P.contains(E)&&P.removeChild(E)}},[t]),f.jsx(oO,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:_.cloneElement(e,{ref:d})})}const lO=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=Sm(cO),d=_.useId();let h=!0,p=_.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const x of u.values())if(!x)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,r]);return s&&h&&(p={...p}),_.useMemo(()=>{u.forEach((m,x)=>u.set(x,!1))},[n]),_.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=f.jsx(aO,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),f.jsx(_u.Provider,{value:p,children:e})};function cO(){return new Map}function n_(e=!0){const t=_.useContext(_u);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=_.useId();_.useEffect(()=>{if(e)return i(s)},[e]);const o=_.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const pl=e=>e.key||"";function J0(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const r_=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=n_(o),h=_.useMemo(()=>J0(e),[e]),p=o&&!u?[]:h.map(pl),m=_.useRef(!0),x=_.useRef(h),w=Sm(()=>new Map),g=_.useRef(new Set),[y,v]=_.useState(h),[b,k]=_.useState(h);Ik(()=>{m.current=!1,x.current=h;for(let P=0;P<b.length;P++){const T=pl(b[P]);p.includes(T)?(w.delete(T),g.current.delete(T)):w.get(T)!==!0&&w.set(T,!1)}},[b,p.length,p.join("-")]);const S=[];if(h!==y){let P=[...h];for(let T=0;T<b.length;T++){const j=b[T],R=pl(j);p.includes(R)||(P.splice(T,0,j),S.push(j))}return s==="wait"&&S.length&&(P=S),k(J0(P)),v(h),null}const{forceRender:E}=_.useContext(km);return f.jsx(f.Fragment,{children:b.map(P=>{const T=pl(P),j=o&&!u?!1:h===b||p.includes(T),R=()=>{if(g.current.has(T))return;if(w.has(T))g.current.add(T),w.set(T,!0);else return;let L=!0;w.forEach(F=>{F||(L=!1)}),L&&(E==null||E(),k(x.current),o&&(d==null||d()),r&&r())};return f.jsx(lO,{isPresent:j,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:c,onExitComplete:j?void 0:R,anchorX:a,anchorY:l,children:P},T)})})},i_=_.createContext({strict:!1}),Z0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ev=!1;function uO(){if(ev)return;const e={};for(const t in Z0)e[t]={isEnabled:n=>Z0[t].some(r=>!!n[r])};MS(e),ev=!0}function s_(){return uO(),Y3()}function dO(e){const t=s_();for(const n in e)t[n]={...t[n],...e[n]};MS(t)}const fO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Yc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fO.has(e)}let o_=e=>!Yc(e);function hO(e){typeof e=="function"&&(o_=t=>t.startsWith("on")?!Yc(t):e(t))}try{hO(require("@emotion/is-prop-valid").default)}catch{}function pO(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||Je(e[i])||(o_(i)||n===!0&&Yc(i)||!t&&!Yc(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Eu=_.createContext({});function mO(e,t){if(ju(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ha(n)?n:void 0,animate:ha(r)?r:void 0}}return e.inherit!==!1?t:{}}function gO(e){const{initial:t,animate:n}=mO(e,_.useContext(Eu));return _.useMemo(()=>({initial:t,animate:n}),[tv(t),tv(n)])}function tv(e){return Array.isArray(e)?e.join(" "):e}const qm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function a_(e,t,n){for(const r in t)!Je(t[r])&&!FS(r,n)&&(e[r]=t[r])}function yO({transformTemplate:e},t){return _.useMemo(()=>{const n=qm();return Gm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xO(e,t){const n=e.style||{},r={};return a_(r,n,e),Object.assign(r,yO(e,t)),r}function vO(e,t){const n={},r=xO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const l_=()=>({...qm(),attrs:{}});function wO(e,t,n,r){const i=_.useMemo(()=>{const s=l_();return BS(s,t,VS(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};a_(s,e.style,e),i.style={...s,...i.style}}return i}const bO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qm(e){return typeof e!="string"||e.includes("-")?!1:!!(bO.indexOf(e)>-1||/[A-Z]/u.test(e))}function kO(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??Qm(e)?wO:vO)(t,r,i,e),c=pO(t,typeof e=="string",s),u=e!==_.Fragment?{...c,...l,ref:n}:{},{children:d}=t,h=_.useMemo(()=>Je(d)?d.get():d,[d]);return _.createElement(e,{...u,children:h})}function SO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:_O(n,r,i,e),renderState:t()}}function _O(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=Xl(s[h]);let{initial:o,animate:a}=e;const l=ju(e),c=IS(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Pu(d)){const h=Array.isArray(d)?d:[d];for(let p=0;p<h.length;p++){const m=Om(e,h[p]);if(m){const{transitionEnd:x,transition:w,...g}=m;for(const y in g){let v=g[y];if(Array.isArray(v)){const b=u?v.length-1:0;v=v[b]}v!==null&&(i[y]=v)}for(const y in x)i[y]=x[y]}}}return i}const c_=e=>(t,n)=>{const r=_.useContext(Eu),i=_.useContext(_u),s=()=>SO(e,t,r,i);return n?s():Sm(s)},CO=c_({scrapeMotionValuesFromProps:Km,createRenderState:qm}),PO=c_({scrapeMotionValuesFromProps:WS,createRenderState:l_}),jO=Symbol.for("motionComponentSymbol");function EO(e,t,n){const r=_.useRef(n);_.useInsertionEffect(()=>{r.current=n});const i=_.useRef(null);return _.useCallback(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());const o=r.current;if(typeof o=="function")if(s){const l=o(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(s);else o&&(o.current=s)},[t])}const u_=_.createContext({});function Yi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TO(e,t,n,r,i,s){var v,b;const{visualElement:o}=_.useContext(Eu),a=_.useContext(i_),l=_.useContext(_u),c=_.useContext(Ym),u=c.reducedMotion,d=c.skipAnimations,h=_.useRef(null),p=_.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:s}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,x=_.useContext(u_);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&IO(h.current,n,i,x);const w=_.useRef(!1);_.useInsertionEffect(()=>{m&&w.current&&m.update(n,l)});const g=n[xS],y=_.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,g)));return Ik(()=>{p.current=!0,m&&(w.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),y.current&&m.animationState&&m.animationState.animateChanges())}),_.useEffect(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,g)}),y.current=!1),m.enteringChildren=void 0)}),m}function IO(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:d_(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Yi(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function d_(e){if(e)return e.options.allowProjection!==!1?e.projection:d_(e.parent)}function Xd(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&dO(r);const s=n?n==="svg":Qm(e),o=s?PO:CO;function a(c,u){let d;const h={..._.useContext(Ym),...c,layoutId:RO(c)},{isStatic:p}=h,m=gO(c),x=o(c,p);if(!p&&typeof window<"u"){MO();const w=LO(h);d=w.MeasureLayout,m.visualElement=TO(e,x,h,i,w.ProjectionNode,s)}return f.jsxs(Eu.Provider,{value:m,children:[d&&m.visualElement?f.jsx(d,{visualElement:m.visualElement,...h}):null,kO(e,c,EO(x,m.visualElement,u),x,p,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=_.forwardRef(a);return l[jO]=e,l}function RO({layoutId:e}){const t=_.useContext(km).id;return t&&e!==void 0?t+"-"+e:e}function MO(e,t){_.useContext(i_).strict}function LO(e){const t=s_(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function AO(e,t){if(typeof Proxy>"u")return Xd;const n=new Map,r=(s,o)=>Xd(s,o,e,t),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,Xd(o,void 0,e,t)),n.get(o))})}const DO=(e,t)=>t.isSVG??Qm(e)?new dz(t):new sz(t,{allowProjection:e!==_.Fragment});class NO extends Qr{constructor(t){super(t),t.animationState||(t.animationState=gz(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let zO=0;class OO extends Qr{constructor(){super(...arguments),this.id=zO++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=_i(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...d}=l;for(const h in d)(s=this.node.getValue(h))==null||s.jump(d[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const FO={animation:{Feature:NO},exit:{Feature:OO}};function Pa(e){return{point:{x:e.pageX,y:e.pageY}}}const BO=e=>t=>$m(t)&&e(t,Pa(t));function Vo(e,t,n,r){return pa(e,t,BO(n),r)}const f_=({current:e})=>e?e.ownerDocument.defaultView:null,nv=(e,t)=>Math.abs(e-t);function $O(e,t){const n=nv(e.x,t.x),r=nv(e.y,t.y);return Math.sqrt(n**2+r**2)}const rv=new Set(["auto","scroll"]);class h_{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ml(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Jd(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,x=$O(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!x)return;const{point:w}=p,{timestamp:g}=Xe;this.history.push({...w,timestamp:g});const{onStart:y,onMove:v}=this.handlers;m||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=ml(m,this.transformPagePoint),ve.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:x,onSessionEnd:w,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Jd(p.type==="pointercancel"?this.lastMoveEventInfo:ml(m,this.transformPagePoint),this.history);this.startEvent&&x&&x(p,y),w&&w(p,y)},!$m(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=Pa(t),c=ml(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Xe;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,Jd(c,this.history)),this.removeListeners=Sa(Vo(this.contextWindow,"pointermove",this.handlePointerMove),Vo(this.contextWindow,"pointerup",this.handlePointerUp),Vo(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(rv.has(r.overflowX)||rv.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),ve.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Hr(this.updatePoint)}}function ml(e,t){return t?{point:t(e.point)}:e}function iv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jd({point:e},t){return{point:e,delta:iv(e,p_(t)),offset:iv(e,VO(t)),velocity:WO(t,.1)}}function VO(e){return e[0]}function p_(e){return e[e.length-1]}function WO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=p_(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Dt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Dt(t)*2&&(r=e[1]);const s=Jt(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function UO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?xe(n,e,r.max):Math.min(e,n)),e}function sv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function HO(e,{top:t,left:n,bottom:r,right:i}){return{x:sv(e.x,n,i),y:sv(e.y,t,r)}}function ov(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function GO(e,t){return{x:ov(e.x,t.x),y:ov(e.y,t.y)}}function KO(e,t){let n=.5;const r=ut(e),i=ut(t);return i>r?n=da(t.min,t.max-r,e.min):r>i&&(n=da(e.min,e.max-i,t.min)),Dn(0,1,n)}function YO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Gh=.35;function qO(e=Gh){return e===!1?e=0:e===!0&&(e=Gh),{x:av(e,"left","right"),y:av(e,"top","bottom")}}function av(e,t,n){return{min:lv(e,t),max:lv(e,n)}}function lv(e,t){return typeof e=="number"?e:e[t]||0}const QO=new WeakMap;class XO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ve(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{n&&this.snapToCursor(Pa(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:p,dragPropagation:m,onDragStart:x}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=C3(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_n(g=>{let y=this.getAxisMotionValue(g).get()||0;if(Ln.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[g];b&&(y=ut(b)*(parseFloat(y)/100))}}this.originPoint[g]=y}),x&&ve.update(()=>x(d,h),!1,!0),zh(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:x,onDrag:w}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:g}=h;if(m&&this.currentDirection===null){this.currentDirection=ZO(g),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),w&&ve.update(()=>w(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new h_(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:f_(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ve.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!gl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=UO(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Yi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=HO(r.layoutBox,t):this.constraints=!1,this.elastic=qO(n),i!==this.constraints&&!Yi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&_n(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=YO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yi(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const s=Z3(r,i.root,this.visualElement.getTransformPagePoint());let o=GO(i.layout.layoutBox,s);if(n){const a=n(Q3(o));this.hasMutatedConstraints=!!a,a&&(o=AS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=_n(u=>{if(!gl(u,n,this.currentDirection))return;let d=l&&l[u]||{};(o===!0||o===u)&&(d={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return zh(this.visualElement,t),r.start(zm(t,r,0,n,this.visualElement,!1))}stopAnimation(){_n(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){_n(n=>{const{drag:r}=this.getProps();if(!gl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-xe(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Yi(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_n(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=KO({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),_n(o=>{if(!gl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(xe(l,c,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;QO.set(this.visualElement,this);const t=this.visualElement.current,n=Vo(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,p=h!==t&&R3(h);u&&d&&!p&&this.start(c)});let r;const i=()=>{const{dragConstraints:c}=this.getProps();Yi(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=JO(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ve.read(i);const a=pa(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(_n(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Gh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function cv(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function JO(e,t,n){const r=g0(e,cv(n)),i=g0(t,cv(n));return()=>{r(),i()}}function gl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ZO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class eF extends Qr{constructor(t){super(t),this.removeGroupControls=en,this.removeListeners=en,this.controls=new XO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||en}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Zd=e=>(t,n)=>{e&&ve.update(()=>e(t,n),!1,!0)};class tF extends Qr{constructor(){super(...arguments),this.removePointerDownListener=en}onPointerDown(t){this.session=new h_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:f_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Zd(t),onStart:Zd(n),onMove:Zd(r),onEnd:(s,o)=>{delete this.session,i&&ve.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Vo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ef=!1;class nF extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),ef&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),ef=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ve.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Bm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;ef=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function m_(e){const[t,n]=n_(),r=_.useContext(km);return f.jsx(nF,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(u_),isPresent:t,safeToRemove:n})}const rF={pan:{Feature:tF},drag:{Feature:eF,ProjectionNode:t_,MeasureLayout:m_}};function uv(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ve.postRender(()=>s(t,Pa(t)))}class iF extends Qr{mount(){const{current:t}=this.node;t&&(this.unmount=j3(t,(n,r)=>(uv(this.node,r,"Start"),i=>uv(this.node,i,"End"))))}unmount(){}}class sF extends Qr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sa(pa(this.node.current,"focus",()=>this.onFocus()),pa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ve.postRender(()=>s(t,Pa(t)))}class oF extends Qr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=L3(t,(i,s)=>(dv(this.node,s,"Start"),(o,{success:a})=>dv(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Kh=new WeakMap,tf=new WeakMap,aF=e=>{const t=Kh.get(e.target);t&&t(e)},lF=e=>{e.forEach(aF)};function cF({root:e,...t}){const n=e||document;tf.has(n)||tf.set(n,{});const r=tf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lF,{root:e,...t})),r[i]}function uF(e,t,n){const r=cF(t);return Kh.set(e,n),r.observe(e),()=>{Kh.delete(e),r.unobserve(e)}}const dF={some:0,all:1};class fF extends Qr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:dF[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=u?d:h;p&&p(c)};this.stopObserver=uF(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(hF(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function hF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const pF={inView:{Feature:fF},tap:{Feature:oF},focus:{Feature:sF},hover:{Feature:iF}},mF={layout:{ProjectionNode:t_,MeasureLayout:m_}},gF={...FO,...pF,...rF,...mF},Ms=AO(gF,DO);function Tu(){!Hm.current&&RS();const[e]=_.useState(Uc.current);return e}function Xm(e,t){const n=_.useRef(t);n.current=t,_.useEffect(()=>{if(!e)return;const r=i=>{i.key==="Escape"&&n.current()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e])}const Zl={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem",contentGap:"1.5rem"},de={bgBase:"#FDFCF8",bgSurface:"#FAF8F0",bgElevated:"#F5F1E6",textPrimary:"#1A1917",textSecondary:"#68635C",accentBlue:"#7C9CC0",accentBlueDark:"#51719B",accentGreen:"#8FB996",accentGreenDark:"#5E8A66",accentAmber:"#D4A373",accentAmberDark:"#A67B4F",accentRose:"#C98B8B",accentRoseDark:"#9E5E5E",accentSlate:"#8A9BA8",accentSlateDark:"#5E7080",canvasBase:"#F0EAD8",canvas300:"#E5DBC4",chalkboardBg:"#142e22",chalkboardChalk:"#d4e8cb",chalkboardBorderBase:"#C8D2C3"};function rt(e,t){const n=e.replace("#",""),r=Number.parseInt(n.slice(0,2),16),i=Number.parseInt(n.slice(2,4),16),s=Number.parseInt(n.slice(4,6),16);return`rgba(${r}, ${i}, ${s}, ${t})`}const yF={4:"1rem"};function J(...e){return rD(CA(e))}const xF={height:32,lineHeight:"32px",padding:"0 16px"},vF={white:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.97 0 0 0 0 0.96 0 0 0 0 0.95 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)' opacity='1'/%3E%3C/svg%3E")`,paper:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E")`,speckle:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='speckle'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.4' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23speckle)' opacity='0.14'/%3E%3C/svg%3E")`,parchment:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='par'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.48 0 0 0 0 0.35 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23par)' opacity='1'/%3E%3C/svg%3E")`,canvas:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='cv'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.62 0 0 0 0 0.60 0 0 0 0 0.52 0 0 0 0.42 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23cv)' opacity='1'/%3E%3C/svg%3E")`,kraft:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.50 0 0 0 0 0.35 0 0 0 0 0.20 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)' opacity='1'/%3E%3C/svg%3E")`,chalkboard:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.28 0 0 0 0 0.20 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='1'/%3E%3C/svg%3E")`},wF={white:de.bgBase,paper:de.bgSurface,speckle:de.bgSurface,parchment:de.bgElevated,canvas:de.canvasBase,kraft:de.canvas300,chalkboard:de.chalkboardBg},bF={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function Iu(e){const t=typeof e=="string"?{texture:e}:e,n=t.texture??"paper",r=t.ruledType??"none",i=t.ruledColor??"blue",s=vF[n],o=wF[n],a=bF[i];return r==="none"?{backgroundColor:o,backgroundImage:s,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:r==="lines"?{backgroundColor:o,backgroundImage:`${s}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${a} 31px, ${a} 32px)`,backgroundRepeat:"repeat, repeat",backgroundSize:"200px 200px, 100% 32px"}:{backgroundColor:o,backgroundImage:`${s}, repeating-linear-gradient(180deg, transparent, transparent 31px, ${a} 31px, ${a} 32px), repeating-linear-gradient(90deg, transparent, transparent 31px, ${a} 31px, ${a} 32px)`,backgroundRepeat:"repeat, repeat, repeat",backgroundSize:"200px 200px, 100% 32px, 32px 32px"}}function Ai(e,t="paper"){if(e!==!1)return Iu(e===!0?t:e)}function kF(e){const t=Mu((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=8+Math.round(n*6),i=50,s=50,o=46,a=2+n*14,l=[];for(let c=0;c<r;c++){const u=c/r*Math.PI*2+(t()-.5)*.15*n,d=o+(t()-.5)*a*2;l.push({x:i+Math.cos(u)*d,y:s+Math.sin(u)*d})}return Ru(l)}function SF(e,t){const n=Mu(`${e}-ring`),r=Math.max(0,Math.min(1,t??.5)),i=8+Math.round(r*6),s=50,o=50,a=49,l=2+r*14,c=[];for(let u=0;u<i;u++){const d=u/i*Math.PI*2+(n()-.5)*.15*r,h=a+(n()-.5)*l*2;c.push({x:s+Math.cos(d)*h,y:o+Math.sin(d)*h})}return Ru(c)}function _F(e){const t=Mu((e==null?void 0:e.seed)??Math.random()),n=Math.max(0,Math.min(1,(e==null?void 0:e.wobble)??.5)),r=3+Math.round(n*3),i=2,s=3+n*10,o=[],a=[{ax:i,ay:i,bx:100-i,by:i},{ax:100-i,ay:i,bx:100-i,by:100-i},{ax:100-i,ay:100-i,bx:i,by:100-i},{ax:i,ay:100-i,bx:i,by:i}];for(const l of a)for(let c=0;c<r;c++){const u=(c+.5)/r,d=l.ax+(l.bx-l.ax)*u,h=l.ay+(l.by-l.ay)*u,p=l.bx-l.ax,m=l.by-l.ay,x=Math.sqrt(p*p+m*m)||1,w=-m/x,g=p/x,y=(t()-.5)*s*2;o.push({x:d+w*y,y:h+g*y})}return Ru(o)}function CF(e,t){const n=Mu(`${e}-ring`),r=Math.max(0,Math.min(1,t??.5)),i=3+Math.round(r*3),s=0,o=3+r*10,a=[],l=[{ax:s,ay:s,bx:100-s,by:s},{ax:100-s,ay:s,bx:100-s,by:100-s},{ax:100-s,ay:100-s,bx:s,by:100-s},{ax:s,ay:100-s,bx:s,by:s}];for(const c of l)for(let u=0;u<i;u++){const d=(u+.5)/i,h=c.ax+(c.bx-c.ax)*d,p=c.ay+(c.by-c.ay)*d,m=c.bx-c.ax,x=c.by-c.ay,w=Math.sqrt(m*m+x*x)||1,g=-x/w,y=m/w,v=(n()-.5)*o*2;a.push({x:h+g*v,y:p+y*v})}return Ru(a)}function Ru(e){const t=e.length;if(t<3)return"";let n=`M ${fr(e[0].x)} ${fr(e[0].y)}`;for(let r=0;r<t;r++){const i=e[(r-1+t)%t],s=e[r],o=e[(r+1)%t],a=e[(r+2)%t],l=s.x+(o.x-i.x)/6,c=s.y+(o.y-i.y)/6,u=o.x-(a.x-s.x)/6,d=o.y-(a.y-s.y)/6;n+=` C ${fr(l)} ${fr(c)}, ${fr(u)} ${fr(d)}, ${fr(o.x)} ${fr(o.y)}`}return n+=" Z",n}function fr(e){return e.toFixed(2)}function Mu(e){let t=typeof e=="string"?PF(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function PF(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)||1}function Lu(){const e=_.useId();return _.useMemo(()=>{let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return(t+1)/4294967296},[e])}function Gs(e){const t=Lu();return _.useMemo(()=>({blob:kF({seed:t,wobble:e}),ring:SF(t,e)}),[t,e])}const jF="button-module__button___Z331g",EF="button-module__blobBg___QQFzf",TF="button-module__blobFill___XwLjV",IF="button-module__blobRing___567UW",RF="button-module__isActive___FXNSJ",MF="button-module__primary___ppbyq",LF="button-module__secondary___esy5L",AF="button-module__ghost___NisA0",DF="button-module__danger___Wnvuq",NF="button-module__chalkboard___d3Nqb",zF="button-module__small___u7y8a",OF="button-module__medium___HBIAj",FF="button-module__large___RPzNy",BF="button-module__fullWidth___H0P0F",$F="button-module__iconLeft___s60SZ",VF="button-module__iconRight___75eFu",WF="button-module__label___pXAyM",Ut={button:jF,blobBg:EF,blobFill:TF,blobRing:IF,isActive:RF,primary:MF,secondary:LF,ghost:AF,danger:DF,chalkboard:NF,small:zF,medium:OF,large:FF,fullWidth:BF,iconLeft:$F,iconRight:VF,label:WF},re=_.forwardRef(function({variant:e="primary",surface:t="paper",size:n="medium",icon:r,iconRight:i,fullWidth:s=!1,wobble:o=.5,isActive:a=!1,children:l,className:c,...u},d){const h=Gs(o);return f.jsxs("button",{ref:d,type:"button",className:J(Ut.button,Ut[e],Ut[n],t==="chalkboard"&&Ut.chalkboard,a&&Ut.isActive,s&&Ut.fullWidth,c),...u,children:[f.jsxs("svg",{className:Ut.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:h.blob,className:Ut.blobFill}),f.jsx("path",{d:h.ring,className:Ut.blobRing})]}),r&&f.jsx("span",{className:Ut.iconLeft,children:r}),f.jsx("span",{className:Ut.label,children:l}),i&&f.jsx("span",{className:Ut.iconRight,children:i})]})});function Jm(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const Ke=wD.generator(),UF="sketch-border-module__svg___whV4x",HF="sketch-border-module__behind___lgdYV",GF="sketch-border-module__stroke___vAm-v",KF="sketch-border-module__fill___zlpd6",yl={svg:UF,behind:HF,stroke:GF,fill:KF};function zt({shape:e="rect",radius:t=9,roughness:n=1.2,bowing:r=1,strokeWidth:i=1,inset:s=2,fill:o=!1,clip:a=!1,smooth:l=!1,strokeInset:c=!0,className:u}){const[d]=_.useState(Math.random),h=_.useRef(null),[p,m]=_.useState(null);_.useEffect(()=>{var g;const y=(g=h.current)==null?void 0:g.parentElement;if(!y)return;const v=new ResizeObserver(()=>{const b=y.offsetWidth,k=y.offsetHeight;m(S=>S&&S.width===b&&S.height===k?S:{width:b,height:k})});return v.observe(y),()=>v.disconnect()},[]);const{parts:x,clipPath:w}=_.useMemo(()=>{if(!p||p.width<8||p.height<8)return{parts:null,clipPath:null};const g=Math.max(1,Math.round(d*1e6)),y=g,v=g*2654435761%2147483647,b=P=>Ke.toPaths(Ke.path(P,{seed:y,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:i})).filter(T=>!T.fill||T.fill==="none").map(T=>({d:T.d,filled:!1}));if(l){const P={seed:y,roughness:n,bowing:r,strokeWidth:i,disableMultiStroke:!0},T=R=>Ke.toPaths(R).filter(L=>!L.fill||L.fill==="none").map(L=>({d:L.d,filled:!1}));if(a){const R=xl(e,p,s,t,Vi(v),n*1.1),L=c?fv(i,n):0,F=L?xl(e,p,s+L,t,Vi(v),n*1.1):R;return{parts:T(Ke.path(F,{...P,preserveVertices:!0})),clipPath:R}}const j=e==="circle"?Ke.ellipse(p.width/2,p.height/2,p.width-s*2,p.height-s*2,P):Ke.path(pv(p,s,t,Vi(y)),{...P,preserveVertices:!0});return{parts:T(j),clipPath:null}}if(a){const P=xl(e,p,s,t,Vi(v),n*1.1),T=c?fv(i,n):0,j=T?xl(e,p,s+T,t,Vi(v),n*1.1):P;return{parts:b(j),clipPath:P}}const k=(P,T)=>{const j=T?{fill:"#000",fillStyle:"solid"}:{},R=e==="circle"?Ke.ellipse(p.width/2,p.height/2,p.width-s*2,p.height-s*2,{seed:P,roughness:n,bowing:r,strokeWidth:i,...j}):Ke.path(pv(p,s,t,Vi(P)),{seed:P,roughness:n,bowing:r,preserveVertices:!0,strokeWidth:i,...j});return Ke.toPaths(R)},S=o?k(v,!0).filter(P=>!!P.fill&&P.fill!=="none").map(P=>({d:P.d,filled:!0})):[],E=k(y,!1).filter(P=>!P.fill||P.fill==="none").map(P=>({d:P.d,filled:!1}));return{parts:[...S,...E],clipPath:null}},[p,d,a,l,e,t,n,r,i,s,o,c]);return _.useEffect(()=>{var g;const y=(g=h.current)==null?void 0:g.parentElement;if(y)return w?y.style.setProperty("--sketch-clip",`path("${w}")`):y.style.removeProperty("--sketch-clip"),()=>{y.style.removeProperty("--sketch-clip")}},[w]),f.jsx("svg",{ref:h,className:J(yl.svg,o&&yl.behind,u),viewBox:p?`0 0 ${p.width} ${p.height}`:void 0,"aria-hidden":"true",children:x==null?void 0:x.map((g,y)=>g.filled?f.jsx("path",{className:yl.fill,d:g.d},`f-${y}`):f.jsx("path",{className:yl.stroke,d:g.d,strokeWidth:i},`s-${y}`))})}function fv(e,t){return e/2+t*1.5}function Vi(e){let t=e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function xl(e,t,n,r,i,s){const o=t.width-n*2,a=t.height-n*2,l=t.width/2,c=t.height/2,u=()=>(i()-.5)*s*2,d=[];if(e==="circle")for(let h=0;h<16;h++){const p=h/16*Math.PI*2;d.push({x:l+Math.cos(p)*o/2+u(),y:c+Math.sin(p)*a/2+u()})}else{const h=Math.max(2,Math.min(r,o/2,a/2)),p=n,m=n,x=(y,v,b)=>{for(const k of[0,45,90]){const S=(b+k)*Math.PI/180;d.push({x:y+Math.cos(S)*h+u(),y:v+Math.sin(S)*h+u()})}},w=(y,v,b,k)=>{const S=Math.hypot(b-y,k-v),E=Math.min(12,Math.max(1,Math.round(S/160)));for(let P=1;P<=E;P++){const T=P/(E+1);d.push({x:y+(b-y)*T+u(),y:v+(k-v)*T+u()})}};x(p+h,m+h,180),w(p+h,m,p+o-h,m),x(p+o-h,m+h,270),w(p+o,m+h,p+o,m+a-h),x(p+o-h,m+a-h,0),w(p+o-h,m+a,p+h,m+a),x(p+h,m+a-h,90),w(p,m+a-h,p,m+h);const g=3;return hv([...d.slice(g),...d.slice(0,g)])}return hv(d)}function hv(e){const t=e.length;if(t<3)return"";const n=(i,s)=>Math.max(.001,Math.hypot(s.x-i.x,s.y-i.y)**.5);let r=`M ${e[0].x.toFixed(2)} ${e[0].y.toFixed(2)}`;for(let i=0;i<t;i++){const s=e[(i-1+t)%t],o=e[i],a=e[(i+1)%t],l=e[(i+2)%t],c=n(s,o),u=n(o,a),d=n(a,l),h=a.x-o.x+u*((o.x-s.x)/c-(a.x-s.x)/(c+u)),p=a.y-o.y+u*((o.y-s.y)/c-(a.y-s.y)/(c+u)),m=a.x-o.x+u*((l.x-a.x)/d-(l.x-o.x)/(u+d)),x=a.y-o.y+u*((l.y-a.y)/d-(l.y-o.y)/(u+d)),w=o.x+h/3,g=o.y+p/3,y=a.x-m/3,v=a.y-x/3;r+=` C ${w.toFixed(2)} ${g.toFixed(2)}, ${y.toFixed(2)} ${v.toFixed(2)}, ${a.x.toFixed(2)} ${a.y.toFixed(2)}`}return`${r} Z`}function pv(e,t,n,r){const i=[0,0,0,0].map(()=>Math.max(2,n+(r()-.5)*3));return YF(t,t,e.width-t*2,e.height-t*2,i)}function YF(e,t,n,r,i){const s=u=>Math.min(u,n/2,r/2),[o,a,l,c]=i.map(s);return[`M ${we(e+o)} ${we(t)}`,`L ${we(e+n-a)} ${we(t)}`,`Q ${we(e+n)} ${we(t)} ${we(e+n)} ${we(t+a)}`,`L ${we(e+n)} ${we(t+r-l)}`,`Q ${we(e+n)} ${we(t+r)} ${we(e+n-l)} ${we(t+r)}`,`L ${we(e+c)} ${we(t+r)}`,`Q ${we(e)} ${we(t+r)} ${we(e)} ${we(t+r-c)}`,`L ${we(e)} ${we(t+o)}`,`Q ${we(e)} ${we(t)} ${we(e+o)} ${we(t)}`,"Z"].join(" ")}function we(e){return e.toFixed(2)}const Ot={surface:{radius:12,inset:2.5,roughness:.2,bowing:0,strokeWidth:1.3},field:{radius:8,inset:2,roughness:1.1,strokeWidth:1.3},control:{radius:6,inset:2,roughness:.5,bowing:.6,strokeWidth:1.4},pill:{radius:999,inset:2,roughness:.7,strokeWidth:1}},qF="page-module__page___-uHnG",QF="page-module__outlined___Wwtyg",XF="page-module__surface___sWfI6",JF="page-module__withAccent___lsv-m",ZF="page-module__accentBlue___XxbMV",eB="page-module__accentGreen___Ne6Q8",tB="page-module__accentAmber___kLAwa",nB="page-module__accentRose___O9ZbZ",rB="page-module__accentSlate___xCB66",Co={page:qF,outlined:QF,surface:XF,withAccent:JF,accentBlue:ZF,accentGreen:eB,accentAmber:tB,accentRose:nB,accentSlate:rB},iB=Jm(Co),sB={all:14,top:14,none:2};function g_({children:e,className:t,style:n,texture:r=!0,withAccent:i=!1,accentColor:s="blue",rounded:o="all",outline:a=!1}){const l=Ai(r,{texture:"white",ruledType:"lines",ruledColor:"blue"})??{backgroundColor:"var(--pui-bg-base)"};return f.jsxs("div",{className:J(Co.page,a&&Co.outlined,i&&Co.withAccent,i&&iB[s],t),style:n,children:[f.jsx(zt,{clip:!0,...Ot.surface,radius:sB[o]}),f.jsx("div",{className:Co.surface,style:l,children:e})]})}const oB="layout-module__layout___O1aWi",aB="layout-module__header___I-kxe",lB="layout-module__headerLeft___JChJQ",cB="layout-module__headerTitles___aqSUG",uB="layout-module__headerTitle___wvr39",dB="layout-module__headerSubtitle___6f5BD",fB="layout-module__headerActions___adC12",hB="layout-module__mobileToggle___4WpVG",pB="layout-module__body___tywNf",mB="layout-module__mobileOverlay___tzbBC",gB="layout-module__sidebar___8VKGq",yB="layout-module__sidebarOpen___47rtr",xB="layout-module__sidebarInner___tq2X6",vB="layout-module__logoArea___RLnC0",wB="layout-module__logoText___pAmfV",bB="layout-module__nav___FxcrZ",kB="layout-module__main___9z7bu",SB="layout-module__navIslandFixed___H4TwP",_B="layout-module__content___jL-VB",CB="layout-module__contentWithPage___vVdfN",PB="layout-module__footer___LyakU",jB="layout-module__footerText___8BYxc",Me={layout:oB,header:aB,headerLeft:lB,headerTitles:cB,headerTitle:uB,headerSubtitle:dB,headerActions:fB,mobileToggle:hB,body:pB,mobileOverlay:mB,sidebar:gB,sidebarOpen:yB,sidebarInner:xB,logoArea:vB,logoText:wB,nav:bB,main:kB,navIslandFixed:SB,content:_B,contentWithPage:CB,footer:PB,footerText:jB};function EB(e){return!e||e==="plain"?{backgroundColor:"var(--pui-bg-base)"}:typeof e=="object"&&"image"in e?{backgroundImage:`url(${e.image})`,backgroundRepeat:"repeat",backgroundSize:"200px 200px"}:Iu(e)}function TB({children:e,showHeader:t=!0,showFooter:n=!1,showSidebar:r=!0,showPage:i=!0,background:s="paper",title:o,subtitle:a,headerActions:l,headerHeight:c,headerTexture:u,navigationItems:d=[],activeItemId:h,onNavigate:p,logo:m,footerContent:x,navigationIsland:w,style:g,bleedBottom:y=!0,routeKey:v,stackOpen:b}){const[k,S]=_.useState(!1),E=Tu();Xm(k,()=>S(!1));const P=EB(s),T=r&&d.length>0,j=c!==void 0||u!==void 0?{...u!==void 0?Iu(u):{},...c!==void 0?{height:typeof c=="number"?`${c}px`:c}:{}}:void 0;return f.jsxs("div",{className:Me.layout,style:{...P,...g},children:[t&&f.jsxs("header",{className:Me.header,style:j,children:[f.jsxs("div",{className:Me.headerLeft,children:[T&&f.jsx("button",{type:"button",className:Me.mobileToggle,onClick:()=>S(!0),"aria-label":"Open navigation",children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:f.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),f.jsxs("div",{className:Me.headerTitles,children:[o&&f.jsx("h1",{className:Me.headerTitle,children:o}),a&&f.jsx("span",{className:Me.headerSubtitle,children:a})]})]}),l&&f.jsx("div",{className:Me.headerActions,children:l})]}),f.jsxs("div",{className:Me.body,children:[k&&f.jsx("button",{type:"button",className:Me.mobileOverlay,onClick:()=>S(!1),"aria-label":"Close navigation",tabIndex:-1}),T&&f.jsx("aside",{className:J(Me.sidebar,k&&Me.sidebarOpen),children:f.jsxs("div",{className:Me.sidebarInner,children:[f.jsx("div",{className:Me.logoArea,children:m||f.jsx("span",{className:Me.logoText,children:"Paper UI"})}),f.jsx("nav",{className:Me.nav,"aria-label":"Main navigation",children:d.map(R=>{const L=R.id===h;return f.jsx(re,{variant:"ghost",size:"small",isActive:L,onClick:()=>{p==null||p(R),S(!1)},"aria-current":L?"page":void 0,icon:R.icon,style:xF,children:R.label},R.id)})})]})}),f.jsx("div",{className:Me.main,children:f.jsx("main",{className:i?Me.contentWithPage:Me.content,style:y?{paddingBottom:0}:void 0,children:(()=>{const R=v!==void 0?f.jsx(r_,{mode:"wait",children:f.jsx(Ms.div,{initial:E?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:E?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},v)}):e;return i?f.jsx(g_,{rounded:y?"top":"all",style:y&&w?{paddingBottom:`calc(${Zl.navIslandBottom} + ${Zl.navIslandHeight} + ${yF[4]})`}:void 0,children:R}):R})()})})]}),w&&f.jsx("div",{className:Me.navIslandFixed,children:b!==void 0?f.jsx(Ms.div,{animate:{x:b?`-${Zl.stackPanelWidth/2}px`:0},transition:{duration:E?0:.3,ease:[.4,0,.2,1]},children:w}):w}),n&&f.jsx("footer",{className:Me.footer,children:x||f.jsx("p",{className:Me.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const IB="checkbox-module__wrapper___uLYMI",RB="checkbox-module__blobFill___mPJSR",MB="checkbox-module__input___Ptgt7",LB="checkbox-module__blobBg___bw3sn",AB="checkbox-module__labelLeft___-vAmH",DB="checkbox-module__box___yAh-r",NB="checkbox-module__checkmark___tTyBz",zB="checkbox-module__indeterminateLine___IosI-",OB="checkbox-module__boxWrapper___byjoS",FB="checkbox-module__icon___RO-yn",BB="checkbox-module__labelText___bAnLr",$B="checkbox-module__chalkboard___sv6SL",Tt={wrapper:IB,blobFill:RB,input:MB,blobBg:LB,labelLeft:AB,box:DB,checkmark:NB,indeterminateLine:zB,boxWrapper:OB,icon:FB,labelText:BB,chalkboard:$B},VB=_.forwardRef(function({label:e,labelPosition:t="right",indeterminate:n=!1,wobble:r=.4,surface:i="paper",className:s,checked:o,onChange:a,id:l,...c},u){const d=_.useId(),h=l??d,p=Gs(r),m=_.useRef(null);return _.useEffect(()=>{m.current&&(m.current.indeterminate=n)},[n]),f.jsxs("label",{className:J(Tt.wrapper,t==="left"&&Tt.labelLeft,i==="chalkboard"&&Tt.chalkboard,s),htmlFor:h,children:[f.jsxs("span",{className:Tt.boxWrapper,children:[f.jsx("input",{ref:x=>{m.current=x,typeof u=="function"?u(x):u&&(u.current=x)},id:h,type:"checkbox",className:Tt.input,checked:o,onChange:a,...c}),f.jsx("svg",{className:Tt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:p.blob,className:Tt.blobFill})}),f.jsxs("span",{className:Tt.box,"aria-hidden":"true",children:[f.jsx(zt,{smooth:!0,...Ot.control}),n?f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Tt.icon,children:f.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:Tt.indeterminateLine})}):f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:Tt.icon,children:f.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:Tt.checkmark})})]})]}),e&&f.jsx("span",{className:Tt.labelText,children:e})]})}),WB="icon-button-module__iconButton___avg6i",UB="icon-button-module__blobBg___466Vy",HB="icon-button-module__blobFill___FTN1g",GB="icon-button-module__blobRing___hRdQb",KB="icon-button-module__isActive___XlvtM",YB="icon-button-module__icon___h204x",qB="icon-button-module__ghost___Wbxog",QB="icon-button-module__danger___p0Xz5",XB="icon-button-module__small___bPnCU",JB="icon-button-module__medium___nOxPf",ZB="icon-button-module__large___UBU5z",e4="icon-button-module__chalkboard___mi0sQ",Wn={iconButton:WB,blobBg:UB,blobFill:HB,blobRing:GB,isActive:KB,icon:YB,default:"icon-button-module__default___9frNR",ghost:qB,danger:QB,small:XB,medium:JB,large:ZB,chalkboard:e4},Ft=_.forwardRef(function({icon:e,variant:t="default",surface:n="paper",size:r="medium",label:i,wobble:s=.5,isActive:o=!1,className:a,...l},c){const u=Gs(s);return f.jsxs("button",{ref:c,type:"button",className:J(Wn.iconButton,Wn[t],n==="chalkboard"&&Wn.chalkboard,Wn[r],o&&Wn.isActive,a),"aria-label":i,title:i,...l,children:[f.jsxs("svg",{className:Wn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:u.blob,className:Wn.blobFill}),f.jsx("path",{d:u.ring,className:Wn.blobRing})]}),f.jsx("span",{className:Wn.icon,children:e})]})}),t4="stamp-module__stamp___5qaNY",n4="stamp-module__small___BBlBg",r4="stamp-module__medium___HG2YD",i4="stamp-module__large___aUT0I",s4="stamp-module__blobBg___Mdrdd",o4="stamp-module__blobFill___QyCeB",a4="stamp-module__blobRing___EUDx7",l4="stamp-module__dot___qZyCR",c4="stamp-module__label___T89iH",u4="stamp-module__chalkboard___syI4T",hr={stamp:t4,small:n4,medium:r4,large:i4,blobBg:s4,blobFill:o4,blobRing:a4,dot:l4,label:c4,chalkboard:u4},nf={neutral:{fill:rt(de.accentSlate,.14),text:de.accentSlateDark,ring:rt(de.accentSlateDark,.35)},info:{fill:rt(de.accentBlue,.14),text:de.accentBlueDark,ring:rt(de.accentBlueDark,.35)},success:{fill:rt(de.accentGreen,.16),text:de.accentGreenDark,ring:rt(de.accentGreenDark,.35)},warning:{fill:rt(de.accentAmber,.16),text:de.accentAmberDark,ring:rt(de.accentAmberDark,.4)},error:{fill:rt(de.accentRose,.16),text:de.accentRoseDark,ring:rt(de.accentRoseDark,.35)}},mv={fill:rt(de.chalkboardBorderBase,.1),ring:rt(de.chalkboardBorderBase,.35)};function He({children:e,size:t="medium",variant:n,dot:r=!1,fillColor:i,textColor:s,wobble:o=.3,surface:a="paper",className:l}){const c=Gs(o),u=a==="chalkboard",d=n?u?mv.ring:nf[n].ring:void 0,h=i??(n?u?mv.fill:nf[n].fill:"transparent"),p=s??(n&&!u?nf[n].text:void 0);return f.jsxs("span",{className:J(hr.stamp,hr[t],u&&hr.chalkboard,l),style:p?{color:p}:void 0,children:[f.jsxs("svg",{className:hr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:c.blob,className:hr.blobFill,style:{fill:h}}),d&&f.jsx("path",{d:c.ring,className:hr.blobRing,style:{stroke:d}})]}),r&&f.jsx("span",{className:hr.dot,"aria-hidden":"true"}),f.jsx("span",{className:hr.label,children:e})]})}const d4="copy-button-module__copyButton___-hTo4",f4="copy-button-module__dark___O45N-",h4="copy-button-module__chalkboard___hW4aw",p4="copy-button-module__copied___XlHFr",vl={copyButton:d4,dark:f4,chalkboard:h4,copied:p4};function m4({text:e,variant:t="light",surface:n="paper",className:r,...i}){const[s,o]=_.useState(!1),a=_.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),1500)}catch(l){console.error("Failed to copy:",l)}},[e]);return f.jsx("button",{type:"button",onClick:a,className:J(vl.copyButton,t==="dark"&&vl.dark,n==="chalkboard"&&vl.chalkboard,s&&vl.copied,r),...i,children:s?"Copied!":"Copy"})}function ja({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),f.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function g4({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M9 18h6"}),f.jsx("path",{d:"M10 22h4"}),f.jsx("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"})]})}function y4({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function x4({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function v4({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:f.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function w4({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function y_({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:f.jsx("polyline",{points:"9 18 15 12 9 6"})})}const b4="table-module__tableFrame___KP-90",k4="table-module__tableWrapper___gc3Y3",S4="table-module__toolbar___zhCel",_4="table-module__search___zIBk2",C4="table-module__searchIcon___ayhK8",P4="table-module__searchInput___PqsEG",j4="table-module__toolbarActions___EX6qS",E4="table-module__tableScroll___1gvc4",T4="table-module__table___tdU5g",I4="table-module__th___GQbKk",R4="table-module__td___WktB5",M4="table-module__tr___xeZno",L4="table-module__expandTh___uxkR4",A4="table-module__expandTd___VoBRC",D4="table-module__expandIcon___8V45X",N4="table-module__expandable___R7o2l",z4="table-module__expandedRow___1TbTQ",O4="table-module__expandedCell___sKAaD",F4="table-module__boardScroll___Y1yqm",B4="table-module__board___kFAI-",$4="table-module__boardColumn___-W9bP",V4="table-module__boardColumnHeader___kY3Fj",W4="table-module__accentBlue___PEJ1V",U4="table-module__accentGreen___wJ53r",H4="table-module__accentAmber___Iezjv",G4="table-module__accentRose___W8zxc",K4="table-module__accentSlate___oUZCX",Y4="table-module__boardColumnLabel___JBEed",q4="table-module__boardColumnCount___Pkpiq",Q4="table-module__boardColumnBody___uAgRF",X4="table-module__boardRow___C1P60",J4="table-module__boardEmpty___IKv2W",Z4="table-module__chalkboardFrame___xB3N5",e$="table-module__chalkboardWrapper___KjY5r",t$="table-module__chalkboard___v0m3A",ae={tableFrame:b4,tableWrapper:k4,toolbar:S4,search:_4,searchIcon:C4,searchInput:P4,toolbarActions:j4,tableScroll:E4,table:T4,th:I4,td:R4,tr:M4,expandTh:L4,expandTd:A4,expandIcon:D4,expandable:N4,expandedRow:z4,expandedCell:O4,boardScroll:F4,board:B4,boardColumn:$4,boardColumnHeader:V4,accentBlue:W4,accentGreen:U4,accentAmber:H4,accentRose:G4,accentSlate:K4,boardColumnLabel:Y4,boardColumnCount:q4,boardColumnBody:Q4,boardRow:X4,boardEmpty:J4,chalkboardFrame:Z4,chalkboardWrapper:e$,chalkboard:t$},n$=Jm(ae);function r$({data:e=[],columns:t=[],board:n,surface:r="paper",texture:i=!0,toolbar:s,expandable:o,showExpandColumn:a=!0,rowKey:l,rowClassName:c,className:u}){const d=Ai(i,r==="chalkboard"?"chalkboard":"paper"),h=!!s,[p,m]=_.useState(new Set),x=y=>{m(v=>{const b=new Set(v);return b.has(y)?b.delete(y):b.add(y),b})},w=!!(o&&a),g=w?t.length+1:t.length;return f.jsxs("div",{className:J(ae.tableFrame,r==="chalkboard"&&ae.chalkboardFrame,u),children:[f.jsx(zt,{clip:!0,...Ot.surface}),f.jsxs("div",{className:J(ae.tableWrapper,r==="chalkboard"&&ae.chalkboardWrapper),style:d,children:[h&&f.jsxs("div",{className:ae.toolbar,children:[s.search&&f.jsxs("div",{className:ae.search,children:[f.jsx(i$,{className:ae.searchIcon}),f.jsx("input",{type:"text",className:ae.searchInput,placeholder:s.search.placeholder??"Search...","aria-label":s.search.placeholder??"Search",value:s.search.value,onChange:y=>{var v,b;return(b=(v=s.search)==null?void 0:v.onChange)==null?void 0:b.call(v,y.target.value)}}),f.jsx(zt,{fill:!0,...Ot.field})]}),s.actions&&f.jsx("div",{className:ae.toolbarActions,children:typeof s.actions=="function"?s.actions(r):s.actions})]}),n?f.jsx("div",{className:ae.boardScroll,children:f.jsx("div",{className:ae.board,children:n.map(y=>f.jsxs("div",{className:ae.boardColumn,children:[f.jsxs("div",{className:J(ae.boardColumnHeader,r==="chalkboard"&&ae.chalkboard,y.accent&&n$[y.accent]),children:[f.jsx("span",{className:ae.boardColumnLabel,children:y.label}),f.jsx("span",{className:ae.boardColumnCount,children:y.items.length})]}),f.jsx("div",{className:ae.boardColumnBody,children:y.items.length===0?f.jsx("div",{className:ae.boardEmpty,children:y.emptyLabel??"empty"}):y.items.map((v,b)=>f.jsx("div",{className:J(ae.boardRow,r==="chalkboard"&&ae.chalkboard),children:y.renderItem(v,b,r)},y.getKey?y.getKey(v,b):b))})]},y.key))})}):f.jsx("div",{className:ae.tableScroll,children:f.jsxs("table",{className:J(ae.table,r==="chalkboard"&&ae.chalkboard),children:[f.jsxs("colgroup",{children:[w&&f.jsx("col",{style:{width:"48px"}}),t.map(y=>f.jsx("col",{style:y.width?{width:`${y.width*32}px`}:void 0},y.key))]}),f.jsx("thead",{children:f.jsxs("tr",{children:[w&&f.jsx("th",{className:J(ae.th,ae.expandTh),"aria-label":"Expand"}),t.map(y=>f.jsx("th",{className:ae.th,children:y.header},y.key))]})}),f.jsx("tbody",{children:e.map((y,v)=>{const b=l?l(y,v):v,k=o==null?void 0:o.render(y,v,r),S=!!k,E=S&&p.has(b);return f.jsxs(_.Fragment,{children:[f.jsxs("tr",{className:J(ae.tr,S&&ae.expandable,c==null?void 0:c(y,v)),onClick:()=>S&&x(b),children:[w&&f.jsx("td",{className:J(ae.td,ae.expandTd),children:S&&f.jsx("button",{type:"button",className:ae.expandIcon,"aria-expanded":E,"aria-label":E?"Collapse row":"Expand row",onClick:P=>{P.stopPropagation(),x(b)},children:f.jsx(y_,{size:14})})}),t.map(P=>f.jsx("td",{className:ae.td,children:P.cell(y,v,r)},P.key))]}),E&&f.jsx("tr",{className:ae.expandedRow,children:f.jsx("td",{colSpan:g,className:ae.expandedCell,children:k})})]},b)})})]})})]})]})}function i$({className:e}){return f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[f.jsx("circle",{cx:"11",cy:"11",r:"8"}),f.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}const s$="card-module__borderLayer___WSpJq",o$="card-module__elevated___uhWj9",a$="card-module__textureLayer___Kcofz",l$="card-module__small___HXUTr",c$="card-module__withAccent___2t7bV",u$="card-module__accentBlue___a1KIq",d$="card-module__accentGreen___RNWoA",f$="card-module__accentAmber___uMhom",h$="card-module__accentRose___VPI3t",p$="card-module__accentSlate___-l4jE",m$="card-module__chalkboard___bQ48O",ci={borderLayer:s$,default:"card-module__default___glPy-",elevated:o$,textureLayer:a$,small:l$,withAccent:c$,accentBlue:u$,accentGreen:d$,accentAmber:f$,accentRose:h$,accentSlate:p$,chalkboard:m$},g$=Jm(ci);function Re({children:e,variant:t="default",surface:n="paper",size:r="medium",texture:i="parchment",accent:s=!1,accentColor:o="blue",className:a}){return f.jsxs("div",{className:J(ci.borderLayer,ci[t],n==="chalkboard"&&ci.chalkboard,ci[r],s&&ci.withAccent,s&&g$[o],a),children:[f.jsx(zt,{clip:!0,...Ot.surface}),f.jsx("div",{className:ci.textureLayer,style:n==="chalkboard"?void 0:Ai(i),children:e})]})}const y$="input-module__wrapper___xaEw6",x$="input-module__label___lu7R1",v$="input-module__field___khFpX",w$="input-module__input___h7K-F",b$="input-module__small___SkByh",k$="input-module__medium___0QPuV",S$="input-module__large___zGwRu",_$="input-module__error___QDqga",C$="input-module__disabled___K-5hi",P$="input-module__helperText___njeLH",j$="input-module__helperError___qDBpD",E$="input-module__chalkboard___Xh-5s",vn={wrapper:y$,label:x$,field:v$,input:w$,small:b$,medium:k$,large:S$,error:_$,disabled:C$,helperText:P$,helperError:j$,chalkboard:E$},Ea=_.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a},l){const c=_.useId(),u=o??c;return f.jsxs("div",{className:J(vn.wrapper,i==="chalkboard"&&vn.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:u,className:vn.label,children:e}),f.jsxs("span",{className:J(vn.field,vn[r],n&&vn.error,a.disabled&&vn.disabled),children:[f.jsx("input",{ref:l,id:u,className:vn.input,...a}),f.jsx(zt,{fill:!0,...Ot.field})]}),t&&f.jsx("span",{className:J(vn.helperText,n&&vn.helperError),children:t})]})}),T$="select-module__wrapper___Hc5F3",I$="select-module__label___ay-3s",R$="select-module__nativeSelect___UA2d-",M$="select-module__trigger___xMYHi",L$="select-module__open___w3mbZ",A$="select-module__triggerLabel___ihpER",D$="select-module__placeholder___0VOFP",N$="select-module__small___iU9W9",z$="select-module__chevron___0dCTg",O$="select-module__medium___B-XBN",F$="select-module__large___iII2c",B$="select-module__chevronOpen___cFOYe",$$="select-module__error___P5RBk",V$="select-module__dropdown___Q-uK3",W$="select-module__slideDown___sT374",U$="select-module__options___HmrQ0",H$="select-module__option___vNnue",G$="select-module__optionDisabled___ex2zq",K$="select-module__optionSelected___tAFjn",Y$="select-module__optionHighlighted___zYQLq",q$="select-module__helperText___r5gyn",Q$="select-module__helperError___ydSPT",X$="select-module__chalkboard___sXBw8",Ne={wrapper:T$,label:I$,nativeSelect:R$,trigger:M$,open:L$,triggerLabel:A$,placeholder:D$,small:N$,chevron:z$,medium:O$,large:F$,chevronOpen:B$,error:$$,dropdown:V$,slideDown:W$,options:U$,option:H$,optionDisabled:G$,optionSelected:K$,optionHighlighted:Y$,helperText:q$,helperError:Q$,chalkboard:X$};function Yh({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",options:s,placeholder:o,value:a,defaultValue:l,onChange:c,name:u,disabled:d=!1,width:h,texture:p=!1,className:m}){const x=_.useId(),[w,g]=_.useState(!1),[y,v]=_.useState(-1),[b,k]=_.useState(l??""),[S,E]=_.useState(null),P=_.useRef(null),T=_.useRef(null),j=a!==void 0,R=j?a:b,L=s.find(C=>C.value===R),F=(L==null?void 0:L.label)??o??"Select...",D=_.useCallback(()=>{if(d)return;g(!0);const C=s.findIndex($=>$.value===R);v(C>=0?C:0)},[d,s,R]),M=_.useCallback(()=>{g(!1),v(-1)},[]),B=_.useCallback(C=>{var $;C.disabled||(j||k(C.value),c==null||c(C.value),M(),($=P.current)==null||$.focus())},[j,c,M]),H=_.useCallback(C=>{if(!d)switch(C.key){case"Enter":case" ":C.preventDefault(),w&&y>=0?B(s[y]):D();break;case"Escape":C.preventDefault(),w&&M();break;case"ArrowDown":C.preventDefault(),w?v($=>{let q=$+1;for(;q<s.length&&s[q].disabled;)q++;return q<s.length?q:$}):D();break;case"ArrowUp":C.preventDefault(),w?v($=>{let q=$-1;for(;q>=0&&s[q].disabled;)q--;return q>=0?q:$}):D();break;case"Home":if(C.preventDefault(),w){let $=0;for(;$<s.length&&s[$].disabled;)$++;$<s.length&&v($)}break;case"End":if(C.preventDefault(),w){let $=s.length-1;for(;$>=0&&s[$].disabled;)$--;$>=0&&v($)}break;case"Tab":w&&M();break}},[d,w,y,s,D,M,B]);_.useEffect(()=>{if(!w)return;const C=$=>{var q,I;const ue=$.target;(q=P.current)!=null&&q.contains(ue)||(I=T.current)!=null&&I.contains(ue)||M()};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[w,M]),_.useEffect(()=>{if(!w||y<0||!T.current)return;const C=T.current.querySelector(`[data-option-index="${y}"]`);C==null||C.scrollIntoView({block:"nearest"})},[w,y]),_.useEffect(()=>{if(!w){E(null);return}const C=()=>{if(!P.current)return;const $=P.current.getBoundingClientRect();if($.bottom<0||$.top>window.innerHeight){M();return}E($)};return C(),document.addEventListener("scroll",C,{capture:!0,passive:!0}),window.addEventListener("resize",C,{passive:!0}),()=>{document.removeEventListener("scroll",C,{capture:!0}),window.removeEventListener("resize",C)}},[w,M]);const z=Ai(p),W=z?{"--sketch-fill":z.backgroundColor}:void 0;return f.jsxs("div",{className:J(Ne.wrapper,i==="chalkboard"&&Ne.chalkboard,m),style:h?{width:typeof h=="number"?`${h}px`:h}:void 0,children:[e&&f.jsx("label",{htmlFor:x,className:Ne.label,children:e}),f.jsxs("select",{id:x,name:u,className:Ne.nativeSelect,value:R,onChange:C=>c==null?void 0:c(C.target.value),disabled:d,"aria-hidden":"true",tabIndex:-1,children:[o&&f.jsx("option",{value:"",children:o}),s.map(C=>f.jsx("option",{value:C.value,disabled:C.disabled,children:C.label},C.value))]}),f.jsxs("button",{ref:P,type:"button",role:"combobox","aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?`${x}-listbox`:void 0,"aria-activedescendant":w&&y>=0?`${x}-option-${y}`:void 0,className:J(Ne.trigger,Ne[r],n&&Ne.error,w&&Ne.open,d&&Ne.disabled),onClick:()=>w?M():D(),onKeyDown:H,disabled:d,children:[f.jsx("span",{className:J(Ne.triggerLabel,!L&&Ne.placeholder),children:F}),f.jsx(J$,{className:J(Ne.chevron,w&&Ne.chevronOpen)}),f.jsx(zt,{fill:!0,...Ot.field})]}),w&&S&&Ns.createPortal(f.jsxs("div",{ref:T,id:`${x}-listbox`,role:"listbox",tabIndex:-1,className:Ne.dropdown,style:{...W,position:"fixed",top:S.bottom+6,left:S.left,width:S.width},onKeyDown:C=>{var $;C.key==="Escape"&&(C.preventDefault(),M(),($=P.current)==null||$.focus())},children:[f.jsx(zt,{fill:!0,...Ot.surface}),f.jsx("div",{className:Ne.options,children:s.map((C,$)=>f.jsx("div",{id:`${x}-option-${$}`,role:"option","aria-selected":C.value===R,tabIndex:-1,"data-option-index":$,className:J(Ne.option,C.value===R&&Ne.optionSelected,$===y&&Ne.optionHighlighted,C.disabled&&Ne.optionDisabled),onClick:q=>{q.stopPropagation(),B(C)},onMouseEnter:()=>v($),children:C.label},C.value))})]}),document.body),t&&f.jsx("span",{className:J(Ne.helperText,n&&Ne.helperError),children:t})]})}function J$({className:e}){return f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:f.jsx("polyline",{points:"6 9 12 15 18 9"})})}function x_({variant:e}){switch(e){case"info":return f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),f.jsx("circle",{cx:"12",cy:"8",r:"0.5",fill:"currentColor"})]});case"success":return f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),f.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]});case"warning":return f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),f.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),f.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});case"error":return f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),f.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}}const Z$="alert-module__alert___j7ZRS",e5="alert-module__surface___IaVgU",t5="alert-module__iconWrapper___kLoxT",n5="alert-module__message___klR2U",r5="alert-module__dismiss___f2uoG",i5="alert-module__info___PBo1l",s5="alert-module__success___AVBKS",o5="alert-module__warning___zkMaJ",a5="alert-module__error___cxg96",l5="alert-module__chalkboard___7pgWk",ni={alert:Z$,surface:e5,iconWrapper:t5,message:n5,dismiss:r5,info:i5,success:s5,warning:o5,error:a5,chalkboard:l5};function v_({children:e,variant:t="info",surface:n="paper",texture:r="kraft",dismissible:i=!1,onDismiss:s,className:o}){const a=n==="chalkboard";return f.jsxs("div",{className:J(ni.alert,ni[t],a&&ni.chalkboard,o),role:t==="warning"||t==="error"?"alert":"status",children:[f.jsx(zt,{clip:!0,...Ot.surface}),f.jsx("div",{className:ni.surface,style:a?void 0:Ai(r)}),f.jsx("span",{className:ni.iconWrapper,children:f.jsx(x_,{variant:t})}),f.jsx("div",{className:ni.message,children:e}),i&&f.jsx("button",{type:"button",className:ni.dismiss,onClick:s,"aria-label":"Dismiss alert",children:f.jsx(ja,{size:16})})]})}const c5="modal-module__overlay___a52Ni",u5="modal-module__fadeIn___5OWd5",d5="modal-module__backdrop___RS4yj",f5="modal-module__modal___ZioOV",h5="modal-module__slideUp___vfFrm",p5="modal-module__small___hcxwF",m5="modal-module__medium___mjbM5",g5="modal-module__large___1dzyf",y5="modal-module__header___iP09B",x5="modal-module__title___nj06m",v5="modal-module__close___gQou9",w5="modal-module__body___Y-EdA",b5="modal-module__chalkboard___qY8qo",Un={overlay:c5,fadeIn:u5,backdrop:d5,modal:f5,slideUp:h5,small:p5,medium:m5,large:g5,header:y5,title:x5,close:v5,body:w5,chalkboard:b5},k5='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function Ta({open:e,onClose:t,title:n,children:r,size:i="medium",surface:s="paper",texture:o=!1,className:a}){const l=_.useId(),c=_.useRef(null),u=_.useRef(null);if(Xm(e,t),_.useEffect(()=>{var h;if(!e)return;u.current=document.activeElement,(h=c.current)==null||h.focus();const p=x=>{var w;if(x.key!=="Tab")return;const g=(w=c.current)==null?void 0:w.querySelectorAll(k5);if(!g||g.length===0){x.preventDefault();return}const y=g[0],v=g[g.length-1];x.shiftKey&&document.activeElement===y?(x.preventDefault(),v.focus()):!x.shiftKey&&document.activeElement===v&&(x.preventDefault(),y.focus())};document.addEventListener("keydown",p);const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{var x,w;document.removeEventListener("keydown",p),document.body.style.overflow=m,(w=(x=u.current)==null?void 0:x.focus)==null||w.call(x)}},[e]),!e||typeof document>"u")return null;const d=Ai(o);return Ns.createPortal(f.jsxs("div",{className:Un.overlay,children:[f.jsx("button",{type:"button",className:Un.backdrop,"aria-label":"Close modal",onClick:t}),f.jsxs("div",{ref:c,className:J(Un.modal,Un[i],s==="chalkboard"&&Un.chalkboard,a),style:d,role:"dialog","aria-modal":"true","aria-labelledby":n?l:void 0,tabIndex:-1,children:[f.jsxs("div",{className:Un.header,children:[n&&f.jsx("h2",{id:l,className:Un.title,children:n}),f.jsx("button",{type:"button",className:Un.close,onClick:t,"aria-label":"Close modal",children:f.jsx(ja,{size:18})})]}),f.jsx("div",{className:Un.body,children:r})]})]}),document.body)}const S5="textarea-module__wrapper___NbiNO",_5="textarea-module__label___ejhyZ",C5="textarea-module__field___KluQf",P5="textarea-module__textarea___0y-7v",j5="textarea-module__resizeGrip___lONlE",E5="textarea-module__small___yPyr8",T5="textarea-module__medium___ezQxA",I5="textarea-module__large___xfeKi",R5="textarea-module__error___EkXKJ",M5="textarea-module__disabled___9CKbb",L5="textarea-module__helperText___l1sPh",A5="textarea-module__helperError___VfTLy",D5="textarea-module__chalkboard___zZ0X0",an={wrapper:S5,label:_5,field:C5,textarea:P5,resizeGrip:j5,small:E5,medium:T5,large:I5,error:R5,disabled:M5,helperText:L5,helperError:A5,chalkboard:D5},N5=48,Ia=_.forwardRef(function({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a},l){const c=_.useId(),u=o??c,d=_.useRef(null),h=_.useCallback(m=>{d.current=m,typeof l=="function"?l(m):l&&(l.current=m)},[l]),p=_.useCallback(m=>{const x=d.current;if(!x)return;m.preventDefault();const w=m.clientY,g=x.offsetHeight,y=b=>{x.style.height=`${Math.max(N5,g+b.clientY-w)}px`},v=()=>{window.removeEventListener("pointermove",y),window.removeEventListener("pointerup",v)};window.addEventListener("pointermove",y),window.addEventListener("pointerup",v)},[]);return f.jsxs("div",{className:J(an.wrapper,i==="chalkboard"&&an.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:u,className:an.label,children:e}),f.jsxs("span",{className:J(an.field,an[r],n&&an.error,a.disabled&&an.disabled),children:[f.jsx("textarea",{ref:h,id:u,className:an.textarea,...a}),f.jsx(zt,{fill:!0,...Ot.field}),!a.disabled&&f.jsx("span",{className:an.resizeGrip,onPointerDown:p,"aria-hidden":"true",title:"Drag to resize",children:f.jsxs("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M11 4.5 L4.5 11"}),f.jsx("path",{d:"M11 8.5 L8.5 11"})]})})]}),t&&f.jsx("span",{className:J(an.helperText,n&&an.helperError),children:t})]})}),z5="progress-module__track___a5BMO",O5="progress-module__svg___3U0-E",gv={track:z5,svg:O5},rf=300,pr=1;function F5({value:e,max:t=100,color:n,height:r=6,surface:i="paper",className:s}){const o=t>0?Math.max(0,Math.min(100,Math.round(e/t*100))):0,a=i==="chalkboard",l=Math.max(1,Math.round(Lu()*1e6)),c=a?rt(de.chalkboardBorderBase,.16):rt(de.textPrimary,.12),u=n??(a?de.chalkboardChalk:de.textSecondary),d=_.useMemo(()=>Ke.toPaths(Ke.rectangle(pr,pr,rf-pr*2,r-pr*2,{seed:l,roughness:2.2,fill:c,fillStyle:"solid",stroke:c,strokeWidth:1.5})),[l,c,r]),h=Math.max(o/100*(rf-pr*2),0),p=_.useMemo(()=>h>0?Ke.toPaths(Ke.rectangle(pr,pr,h,r-pr*2,{seed:l+1,roughness:2,fill:u,fillStyle:"solid",stroke:u,strokeWidth:1})):[],[l,u,h,r]);return f.jsx("div",{className:J(gv.track,s),style:{height:r,borderRadius:r/2},children:f.jsxs("svg",{className:gv.svg,viewBox:`0 0 ${rf} ${r}`,preserveAspectRatio:"none","aria-hidden":"true",children:[d.map((m,x)=>f.jsx("path",{d:m.d,stroke:m.stroke,strokeWidth:m.strokeWidth,fill:m.fill},x)),p.map((m,x)=>f.jsx("path",{d:m.d,stroke:m.stroke,strokeWidth:m.strokeWidth,fill:m.fill},x))]})})}function B5(e){const t=Lu();return _.useMemo(()=>({blob:_F({seed:t,wobble:e}),ring:CF(t,e)}),[t,e])}const $5="list-item-module__listItem___-tw9O",V5="list-item-module__clickable___GLJmd",W5="list-item-module__blobBg___O3Mzh",U5="list-item-module__blobFill___dXHk1",H5="list-item-module__blobRing___S9mas",G5="list-item-module__active___UsL8O",K5="list-item-module__small___9dphK",Y5="list-item-module__medium___yGZCr",q5="list-item-module__icon___2b4wU",Q5="list-item-module__label___SIzJ4",X5="list-item-module__action___qGh0-",J5="list-item-module__chalkboard___qpWuM",Ht={listItem:$5,static:"list-item-module__static___qtEX6",clickable:V5,blobBg:W5,blobFill:U5,blobRing:H5,active:G5,small:K5,medium:Y5,icon:q5,label:Q5,action:X5,chalkboard:J5};function qc({active:e=!1,icon:t,action:n,size:r="medium",wobble:i=.5,surface:s="paper",children:o,className:a,...l}){const c=B5(i),u=!!l.onClick;return f.jsxs("button",{type:"button",className:J(Ht.listItem,Ht[r],u&&Ht.clickable,!u&&!e&&Ht.static,e&&Ht.active,s==="chalkboard"&&Ht.chalkboard,a),"aria-current":e?"page":void 0,...l,children:[f.jsxs("svg",{className:Ht.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:c.blob,className:Ht.blobFill}),f.jsx("path",{d:c.ring,className:Ht.blobRing})]}),t&&f.jsx("span",{className:Ht.icon,children:t}),f.jsx("span",{className:Ht.label,children:o}),n&&f.jsx("span",{className:Ht.action,children:n})]})}const Z5="accordion-module__accordion___mqGl-",eV="accordion-module__header___mLfbd",tV="accordion-module__icon___Z90NR",nV="accordion-module__title___HusgG",rV="accordion-module__content___1K0td",iV="accordion-module__chalkboard___am8r4",sV="accordion-module__expanded___836xG",ri={accordion:Z5,header:eV,icon:tV,title:nV,content:rV,chalkboard:iV,expanded:sV};function oV({title:e,children:t,expanded:n=!1,onToggle:r,surface:i="paper",className:s}){return f.jsxs("div",{className:J(ri.accordion,n&&ri.expanded,i==="chalkboard"&&ri.chalkboard,s),children:[f.jsxs("button",{type:"button",className:ri.header,onClick:r,"aria-expanded":n,children:[f.jsx("span",{className:ri.icon,"aria-hidden":"true",children:f.jsx(y_,{size:14})}),f.jsx("span",{className:ri.title,children:e})]}),n&&f.jsx("div",{className:ri.content,children:t})]})}const aV="icon-module__icon___2vrJz",lV="icon-module__blobBg___ENPYJ",cV="icon-module__blobFill___IPbwQ",uV="icon-module__blobRing___1awqV",dV="icon-module__content___TaZR6",fV="icon-module__small___Xp--F",hV="icon-module__medium___tCjMB",pV="icon-module__large___vBtP7",Wi={icon:aV,blobBg:lV,blobFill:cV,blobRing:uV,content:dV,small:fV,medium:hV,large:pV},mV={small:20,medium:24,large:28};function gV({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:i}){const s=Gs(n),o=mV[t];return f.jsxs("span",{className:J(Wi.icon,Wi[t],i),children:[f.jsxs("svg",{className:Wi.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:s.blob,className:Wi.blobFill,style:r?{fill:r}:void 0}),f.jsx("path",{d:s.ring,className:Wi.blobRing})]}),f.jsx("span",{className:Wi.content,style:{width:o,height:o},children:e})]})}const yV="radio-module__wrapper___BB05E",xV="radio-module__blobFill___p5BX4",vV="radio-module__labelLeft___ijB93",wV="radio-module__input___M2nFJ",bV="radio-module__box___H7ofS",kV="radio-module__dot___jVJ-d",SV="radio-module__boxWrapper___Y3qis",_V="radio-module__blobBg___IR-M5",CV="radio-module__labelText___I-nu3",PV="radio-module__chalkboard___IIBqI",wn={wrapper:yV,blobFill:xV,labelLeft:vV,input:wV,box:bV,dot:kV,boxWrapper:SV,blobBg:_V,labelText:CV,chalkboard:PV};_.forwardRef(function({label:e,labelPosition:t="right",wobble:n=.4,surface:r="paper",className:i,checked:s,onChange:o,id:a,...l},c){const u=_.useId(),d=a??u,h=Gs(n);return f.jsxs("label",{className:J(wn.wrapper,t==="left"&&wn.labelLeft,r==="chalkboard"&&wn.chalkboard,i),htmlFor:d,children:[f.jsxs("span",{className:wn.boxWrapper,children:[f.jsx("input",{ref:c,id:d,type:"radio",className:wn.input,checked:s,onChange:o,...l}),f.jsx("svg",{className:wn.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:h.blob,className:wn.blobFill})}),f.jsxs("span",{className:wn.box,"aria-hidden":"true",children:[f.jsx(zt,{smooth:!0,shape:"circle",...Ot.control}),f.jsx("span",{className:wn.dot})]})]}),e&&f.jsx("span",{className:wn.labelText,children:e})]})});const jV="switch-module__wrapper___5-2P1",EV="switch-module__labelLeft___WlT-N",TV="switch-module__input___YKZRj",IV="switch-module__track___QNvnO",RV="switch-module__thumb___cunvF",MV="switch-module__small___WPIxc",LV="switch-module__medium___yPulW",AV="switch-module__large___VlKV1",DV="switch-module__labelText___9Qg39",NV="switch-module__chalkboard___qKTMz",mr={wrapper:jV,labelLeft:EV,input:TV,track:IV,thumb:RV,small:MV,medium:LV,large:AV,labelText:DV,chalkboard:NV},zV=_.forwardRef(function({label:e,labelPosition:t="right",size:n="medium",surface:r="paper",className:i,checked:s,onChange:o,id:a,...l},c){const u=_.useId(),d=a??u;return f.jsxs("label",{className:J(mr.wrapper,mr[n],t==="left"&&mr.labelLeft,r==="chalkboard"&&mr.chalkboard,i),htmlFor:d,children:[f.jsx("input",{ref:c,id:d,type:"checkbox",className:mr.input,checked:s,onChange:o,...l}),f.jsxs("span",{className:mr.track,"aria-hidden":"true",children:[f.jsx(zt,{...Ot.pill}),f.jsx("span",{className:mr.thumb})]}),e&&f.jsx("span",{className:mr.labelText,children:e})]})}),OV="spinner-module__spinner___FDTk2",FV="spinner-module__chalkboard___DLE1z",BV="spinner-module__svg___JnCWN",$V="spinner-module__track___xbnbo",VV="spinner-module__head___j5dWe",yo={spinner:OV,chalkboard:FV,svg:BV,track:$V,head:VV},WV={small:18,medium:28,large:40},yv=25,UV=18,xv=Ke.toPaths(Ke.circle(yv,yv,UV*2,{seed:7,roughness:1.15,disableMultiStroke:!0})).map(e=>e.d).join(" ");function Qc({size:e="medium",color:t,label:n="Loading",surface:r="paper",className:i}){const s=WV[e];return f.jsx("span",{className:J(yo.spinner,r==="chalkboard"&&yo.chalkboard,i),role:"status","aria-label":n,children:f.jsxs("svg",{width:s,height:s,viewBox:"0 0 50 50",className:yo.svg,style:t?{color:t}:void 0,"aria-hidden":"true",children:[f.jsx("path",{className:yo.track,d:xv,fill:"none",pathLength:100,strokeLinecap:"round"}),f.jsx("path",{className:yo.head,d:xv,fill:"none",pathLength:100,strokeLinecap:"round"})]})})}const HV="skeleton-module__skeleton___HCSvg",GV="skeleton-module__pulse___6eCq1",KV="skeleton-module__svg___OzxGp",YV="skeleton-module__text___v17Nv",qV="skeleton-module__rect___wqIJy",QV="skeleton-module__circle___RCmyR",sf={skeleton:HV,pulse:GV,svg:KV,text:YV,rect:qV,circle:QV},vv={text:[0,0,200,24],rect:[0,0,200,100],circle:[0,0,40,40]},Ui=2;function Gt({variant:e="text",width:t,height:n,surface:r="paper",className:i,style:s}){const o=r==="chalkboard",a=Math.max(1,Math.round(Lu()*1e6)),l=o?rt(de.chalkboardBorderBase,.16):rt(de.textPrimary,.09),c=_.useMemo(()=>{const[,,u,d]=vv[e],h=e==="circle"?Ke.ellipse(u/2,d/2,u-Ui*2,d-Ui*2,{seed:a,roughness:1.5,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1}):Ke.rectangle(Ui,Ui,u-Ui*2,d-Ui*2,{seed:a,roughness:1.4,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1});return Ke.toPaths(h)},[e,a,l]);return f.jsx("span",{className:J(sf.skeleton,sf[e],i),style:{width:t,height:n,...s},"aria-hidden":"true",children:f.jsx("svg",{className:sf.svg,viewBox:vv[e].join(" "),preserveAspectRatio:"none","aria-hidden":"true",children:c.map((u,d)=>f.jsx("path",{d:u.d,stroke:u.stroke,strokeWidth:u.strokeWidth,fill:u.fill},d))})})}const XV="divider-module__horizontal___tP3rG",JV="divider-module__line___KnBes",ZV="divider-module__label___WiUwZ",e6="divider-module__vertical___wBSrT",t6="divider-module__chalkboard___gXTde",Hi={horizontal:XV,line:JV,label:ZV,vertical:e6,chalkboard:t6};function wv({orientation:e="horizontal",label:t,surface:n="paper",className:r}){const i=n==="chalkboard"&&Hi.chalkboard;return e==="vertical"?f.jsx("span",{className:J(Hi.vertical,i,r),role:"separator","aria-orientation":"vertical"}):f.jsxs("div",{className:J(Hi.horizontal,i,r),role:"separator",children:[f.jsx("span",{className:Hi.line}),t!=null&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:Hi.label,children:t}),f.jsx("span",{className:Hi.line})]})]})}const n6="tooltip-module__wrapper___XeVNe",r6="tooltip-module__tooltip___e-rkz",i6="tooltip-module__tooltipIn___CZbRw",s6="tooltip-module__top___78WWU",o6="tooltip-module__bottom___Irl3O",a6="tooltip-module__left___C1Ec4",l6="tooltip-module__right___oUA-Z",c6="tooltip-module__chalkboard___Um6dx",wl={wrapper:n6,tooltip:r6,tooltipIn:i6,top:s6,bottom:o6,left:a6,right:l6,chalkboard:c6},bl=8,kl=8,u6=typeof window>"u"?_.useEffect:_.useLayoutEffect;function d6(e,t,n){let r,i;switch(t){case"bottom":r=e.bottom+bl,i=e.left+e.width/2-n.width/2;break;case"left":r=e.top+e.height/2-n.height/2,i=e.left-bl-n.width;break;case"right":r=e.top+e.height/2-n.height/2,i=e.right+bl;break;default:r=e.top-bl-n.height,i=e.left+e.width/2-n.width/2}return i=Math.min(Math.max(i,kl),window.innerWidth-n.width-kl),r=Math.min(Math.max(r,kl),window.innerHeight-n.height-kl),{top:r,left:i}}function $e({content:e,children:t,placement:n="top",delay:r=300,disabled:i=!1,surface:s="paper"}){const o=_.useId(),[a,l]=_.useState(!1),[c,u]=_.useState(!1),[d,h]=_.useState(!1),[p,m]=_.useState(null),[x,w]=_.useState(null),g=_.useRef(null),y=_.useRef(null),v=_.useRef(),b=!i&&!!e&&!d&&(a||c),k=()=>{clearTimeout(v.current),v.current=setTimeout(()=>l(!0),r)},S=()=>{clearTimeout(v.current),l(!1),h(!1)},E=()=>{h(!1),u(!0)},P=()=>{u(!1),h(!1)};Xm(b,()=>h(!0)),_.useEffect(()=>{if(!b){m(null);return}const j=()=>{g.current&&m(g.current.getBoundingClientRect())};return j(),window.addEventListener("scroll",j,{capture:!0,passive:!0}),window.addEventListener("resize",j,{passive:!0}),()=>{window.removeEventListener("scroll",j,{capture:!0}),window.removeEventListener("resize",j)}},[b]),u6(()=>{if(!b){w(null);return}const j=y.current;j&&w({width:j.offsetWidth,height:j.offsetHeight})},[b,e,n]),_.useEffect(()=>()=>clearTimeout(v.current),[]);const T=t.props;return f.jsxs("span",{ref:g,className:wl.wrapper,onMouseEnter:k,onMouseLeave:S,onFocus:E,onBlur:P,children:[_.cloneElement(t,{"aria-describedby":b?o:T["aria-describedby"]}),b&&p&&typeof document<"u"&&Ns.createPortal(f.jsx("span",{ref:y,id:o,role:"tooltip",className:J(wl.tooltip,wl[n],s==="chalkboard"&&wl.chalkboard),style:x?{position:"fixed",...d6(p,n,x)}:{position:"fixed",top:0,left:0,visibility:"hidden"},children:e}),document.body)]})}const f6="toast-module__stack___hDi0s",h6="toast-module__topLeft___Luw-F",p6="toast-module__topCenter___N1DwF",m6="toast-module__topRight___Dtgau",g6="toast-module__bottomLeft___Eb2lo",y6="toast-module__bottomCenter___gs-Yb",x6="toast-module__bottomRight___-0e2j",v6="toast-module__item___RFjtm",w6="toast-module__toastIn___9m9iN",b6="toast-module__card___ZCvJS",k6="toast-module__surface___mfMl0",S6="toast-module__iconWrapper___lnjcC",_6="toast-module__content___AlliM",C6="toast-module__title___1Oqh8",P6="toast-module__description___eiUSB",j6="toast-module__dismiss___tUGx4",E6="toast-module__info___Nh8S9",T6="toast-module__success___hlKLc",I6="toast-module__warning___XUMJt",R6="toast-module__error___pSFFC",M6="toast-module__chalkboard___c49gt",Kt={stack:f6,topLeft:h6,topCenter:p6,topRight:m6,bottomLeft:g6,bottomCenter:y6,bottomRight:x6,item:v6,toastIn:w6,card:b6,surface:k6,iconWrapper:S6,content:_6,title:C6,description:P6,dismiss:j6,info:E6,success:T6,warning:I6,error:R6,chalkboard:M6};function L6({record:e,surface:t="paper",onDismiss:n}){const r=_.useRef(e.duration),i=_.useRef(0),s=_.useRef(),o=_.useCallback(d=>{clearTimeout(s.current),!(d<=0)&&(i.current=Date.now(),s.current=setTimeout(()=>n(e.id),d))},[n,e.id]);_.useEffect(()=>(o(e.duration),()=>clearTimeout(s.current)),[o,e.duration]);const a=()=>{s.current&&(clearTimeout(s.current),r.current-=Date.now()-i.current)},l=()=>o(r.current),c=t==="chalkboard",u=e.variant==="warning"||e.variant==="error"?"alert":"status";return f.jsx("div",{className:Kt.item,onMouseEnter:a,onMouseLeave:l,children:f.jsxs("div",{className:J(Kt.card,Kt[e.variant],c&&Kt.chalkboard),role:u,children:[f.jsx(zt,{clip:!0,...Ot.surface}),f.jsx("div",{className:Kt.surface,style:c?void 0:Ai("kraft")}),f.jsx("span",{className:Kt.iconWrapper,children:f.jsx(x_,{variant:e.variant})}),f.jsxs("div",{className:Kt.content,children:[e.title&&f.jsx("div",{className:Kt.title,children:e.title}),f.jsx("div",{className:Kt.description,children:e.description})]}),f.jsx("button",{type:"button",className:Kt.dismiss,onClick:()=>n(e.id),"aria-label":"Dismiss notification",children:f.jsx(ja,{size:16})})]})})}const w_=_.createContext(null);function A6(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function D6({children:e,position:t="bottom-right",surface:n="paper",defaultDuration:r=5e3}){const[i,s]=_.useState([]),o=_.useRef(0),a=_.useCallback(u=>{s(d=>d.filter(h=>h.id!==u))},[]),l=_.useCallback(u=>{o.current+=1;const d=`toast-${o.current}`;return s(h=>[...h,{id:d,title:u.title,description:u.description,variant:u.variant??"info",duration:u.duration??r}]),d},[r]),c=t.startsWith("top")?[...i].reverse():i;return f.jsxs(w_.Provider,{value:{toast:l,dismiss:a},children:[e,typeof document<"u"&&Ns.createPortal(f.jsx("div",{className:J(Kt.stack,Kt[A6(t)]),role:"region","aria-label":"Notifications",children:c.map(u=>f.jsx(L6,{record:u,surface:n,onDismiss:a},u.id))}),document.body)]})}function pt(){const e=_.useContext(w_);if(!e)throw new Error("useToast must be used within a <ToastProvider>");return e}const N6="breadcrumb-module__breadcrumb___r-ILp",z6="breadcrumb-module__list___V3YFy",O6="breadcrumb-module__item___dDwYf",F6="breadcrumb-module__link___CHC9k",B6="breadcrumb-module__linkButton___XoMW-",$6="breadcrumb-module__current___dprI9",V6="breadcrumb-module__separator___uLhtn",W6="breadcrumb-module__chalkboard___COJpw",bn={breadcrumb:N6,list:z6,item:O6,link:F6,linkButton:B6,current:$6,static:"breadcrumb-module__static___affaf",separator:V6,chalkboard:W6};function bv({items:e,surface:t="paper",className:n}){return f.jsx("nav",{"aria-label":"Breadcrumb",className:J(bn.breadcrumb,t==="chalkboard"&&bn.chalkboard,n),children:f.jsx("ol",{className:bn.list,children:e.map((r,i)=>{const s=i===e.length-1;return f.jsxs("li",{className:bn.item,children:[s?f.jsx("span",{className:bn.current,"aria-current":"page",children:r.label}):r.href?f.jsx("a",{href:r.href,className:bn.link,onClick:r.onClick,children:r.label}):r.onClick?f.jsx("button",{type:"button",className:J(bn.link,bn.linkButton),onClick:r.onClick,children:r.label}):f.jsx("span",{className:bn.static,children:r.label}),!s&&f.jsx(U6,{className:bn.separator})]},r.id)})})})}function U6({className:e}){return f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:f.jsx("polyline",{points:"9 18 15 12 9 6"})})}function Xr(e){const t=e.split(`
79
- `).map(r=>r.trim()).filter(Boolean);return t.find(r=>r.startsWith("!")||r.startsWith("error:")||r.startsWith("fatal:"))??t.at(-1)??e}const Sl=ie.deskBg,kv=ie.deskLight,H6=ie.deskText,Cn=ie.deskTextMuted,G6=ie.deskBorder,Br=ie.deskChalk,Sv=`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.28 0 0 0 0 0.20 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='1'/%3E%3C/svg%3E")`,Zm={fontFamily:De.serif,fontSize:te.base,fontWeight:600,color:Cn,marginBottom:A[3]},kr={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d"},In={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0"},b_=Xr,qh=3,K6="2.75rem",Y6=`calc(${qh} * ${K6} + ${qh-1} * ${A[2]})`,q6=e=>{switch(e.taskKind){case"phase":return e.phaseIndex!==void 0?` — phase ${e.phaseIndex+1}`:"";case"audit":return" — audit";case"batch-reconcile":return" — batch reconcile";case"reconcile":return" — reconcile";case"fix-review":return" — fixing review comments";case"draft":return" — drafting";case"extend":return" — extending";case"commit-suggest":return" — suggesting commit message";case"overlap-check":return" — checking overlap";case"sync":return" — syncing to main";case"run-all":return" — run all phases";default:return""}},Q6=({task:e,onStop:t})=>{const n=Nn(),{toast:r}=pt(),i=()=>n({to:"/tasks",search:{taskId:e.id}}),s=async l=>{l.stopPropagation();try{await t(e.id)}catch(c){r({title:"Failed to stop agent",description:Xr(c.message),variant:"error"})}},o={starting:kr.running,running:kr.running,stopping:kr.running,done:kr.pass,error:kr.fail},a={starting:In.running,running:In.running,stopping:In.running,done:In.pass,error:In.fail};return f.jsx("div",{role:"button",tabIndex:0,onClick:i,onKeyDown:l=>{l.target===l.currentTarget&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),i())},style:{cursor:"pointer",borderRadius:10},children:f.jsx(Re,{surface:"chalkboard",size:"small",className:"stack-task-card",children:f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:A[2]},children:[f.jsxs("span",{style:{fontFamily:De.serif,fontWeight:600,fontSize:te.sm,color:Br,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.planTitle,q6(e)," · ",lk[e.agentId]]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2]},children:[f.jsx(He,{surface:"chalkboard",size:"small",fillColor:o[e.status],textColor:a[e.status],children:e.status}),(e.status==="running"||e.status==="starting"||e.status==="stopping")&&f.jsx(Ft,{icon:f.jsx(ja,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:s,disabled:e.status==="stopping"})]})]})})})},X6=()=>{const e=O(r=>r.agentStatus),t=O(r=>r.stopAgent),n=e.slice(0,qh);return f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:A[6]},children:[f.jsx("div",{style:Zm,children:"Agent"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",justifyContent:n.length>0?"flex-start":"center",gap:A[2],minHeight:Y6},children:n.length>0?n.map(r=>f.jsx(Q6,{task:r,onStop:t},r.id)):f.jsx(Re,{surface:"chalkboard",size:"small",children:f.jsx("p",{style:{opacity:.5,fontSize:te.xs,margin:0,textAlign:"center"},children:"No agent running."})})})]})},k_=({size:e=16})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"m12 3-1.6 4.85a2 2 0 0 1-1.27 1.27L4.27 10.7l4.86 1.6a2 2 0 0 1 1.27 1.27L12 18.4l1.6-4.86a2 2 0 0 1 1.27-1.27l4.86-1.6-4.86-1.6a2 2 0 0 1-1.27-1.27L12 3Z"}),f.jsx("path",{d:"M19 3v3"}),f.jsx("path",{d:"M20.5 4.5h-3"})]}),J6=({size:e=16})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M12 19V5"}),f.jsx("path",{d:"m5 12 7-7 7 7"})]}),Z6=({size:e=16})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M12 5v14"}),f.jsx("path",{d:"m5 12 7 7 7-7"})]}),eg=({size:e=16})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("circle",{cx:"18",cy:"18",r:"3"}),f.jsx("circle",{cx:"6",cy:"6",r:"3"}),f.jsx("path",{d:"M6 9v5c0 .667 3 1 6 1s6-.333 6-1V9"}),f.jsx("path",{d:"M12 17v2"})]}),e8=({size:e=16})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36"}),f.jsx("polyline",{points:"21 3 21 9 15 9"})]}),t8=({size:e=12})=>f.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M6 4l11 6-11 6z"})}),n8=({size:e=12})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round","aria-hidden":"true",children:[f.jsx("circle",{cx:"10",cy:"10",r:"3"}),f.jsx("path",{d:"M2.5 10h4.5M13 10h4.5"})]}),r8=({size:e=12})=>f.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"})}),S_=({size:e=14})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.55,flexShrink:0},children:[f.jsx("title",{children:"Idea"}),f.jsx("path",{d:"M9 18h6M10 22h4M12 2a6 6 0 0 0-3.5 10.9c.53.4.9 1.03.9 1.72V15h5.2v-.38c0-.69.37-1.32.9-1.72A6 6 0 0 0 12 2Z"})]}),i8=({size:e=14})=>f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.55,flexShrink:0},children:[f.jsx("title",{children:"Note"}),f.jsx("path",{d:"M15 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z"}),f.jsx("path",{d:"M15 3v6h6"})]}),_v="papercamp.commitTitle",Cv="papercamp.commitMessage",s8=["core","cli","app","server","agent","plans","ideas","docs","settings","stack","ui","ci","config","deps","repo"];function Pv(e){try{return localStorage.getItem(e)??""}catch{return""}}function jv(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}function o8(e){var a;if(!e)return{title:"",message:""};const t=((a=e.tags)==null?void 0:a.find(l=>s8.includes(l)))??"repo",n=e.kind??"feat",r=!!e.phases.length&&e.phases.every(l=>l.done),i=r?`${n}(${t}): updates`:`${n}(${t}): ${e.title}`,s=e.id?`Refs: ${e.id}`:"",o=!r&&e.phases.length?e.phases.map(l=>`- ${l.text}`).join(`
80
- `):"";return{title:i,message:[o,s].filter(Boolean).join(`
81
-
82
- `)}}function a8(e){const[t,n]=_.useState(new Set),r=_.useRef(new Set);_.useEffect(()=>{if(!e)return;const s=r.current;r.current=new Set(e.map(o=>o.path)),n(o=>{const a=new Set;for(const l of e)(!s.has(l.path)||o.has(l.path))&&a.add(l.path);return a})},[e]);const i=_.useCallback(s=>{n(o=>{const a=new Set(o);return a.has(s)?a.delete(s):a.add(s),a})},[]);return{selectedFiles:t,onToggleFile:i}}const l8=({gitStatus:e,expanded:t,onToggleExpanded:n,selectedFiles:r,onToggleFile:i})=>f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(oV,{title:`${e.length} file${e.length===1?"":"s"} changed`,expanded:t,onToggle:n,children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[2],paddingTop:A[2]},children:e.map(s=>f.jsxs("label",{style:{display:"flex",alignItems:"center",gap:A[2],fontFamily:De.mono,fontSize:te["2xs"],color:Br,cursor:"pointer"},children:[f.jsx("input",{type:"checkbox",checked:r.has(s.path),onChange:()=>i(s.path),style:{accentColor:Br}}),f.jsx("span",{style:{color:s.staged?Br:Cn,minWidth:24},children:s.status}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.path})]},s.path))})})}),c8=({selectedFiles:e,onCommitted:t})=>{var T;const n=O(j=>j.plans),r=O(j=>j.agentStatus),i=O(j=>j.loadGitStatus),s=O(j=>j.commitInFlight),o=O(j=>j.setCommitInFlight),{toast:a}=pt(),[l,c]=_.useState(()=>Pv(_v)),[u,d]=_.useState(()=>Pv(Cv)),[h,p]=_.useState(!1),[m,x]=_.useState(!1),[w,g]=_.useState(null),y=_.useMemo(()=>dL(n==null?void 0:n.entries),[n==null?void 0:n.entries]),{title:v,message:b}=_.useMemo(()=>o8(y),[y]);_.useEffect(()=>{v&&!l&&c(v)},[v,l]);const k=_.useRef(null),S=(T=r.find(j=>j.suggestedCommit))==null?void 0:T.suggestedCommit;_.useEffect(()=>{if(!S){k.current=null;return}const j=`${S.title}
83
- ${S.message}`;k.current!==j&&(k.current=j,c(S.title),d(S.message))},[S]),_.useEffect(()=>{b&&!u&&d(b)},[b,u]),_.useEffect(()=>{jv(_v,l)},[l]),_.useEffect(()=>{jv(Cv,u)},[u]);const E=_.useCallback(async()=>{if(!(!l.trim()||s)){p(!0),o(!0);try{await gk([...e],l.trim(),u.trim()||void 0),c(v),d(""),t(),await i()}catch(j){a({title:"Commit failed",description:b_(j.message),variant:"error"}),await i()}finally{p(!1),o(!1)}}},[l,u,e,v,i,s,o,t,a]),P=_.useCallback(async()=>{if(e.size!==0){x(!0),g(null);try{const j=await yk([...e]);c(j.title),d(j.message)}catch(j){g(j.message)}finally{x(!1)}}},[e]);return f.jsxs(f.Fragment,{children:[w&&f.jsx(v_,{surface:"chalkboard",dismissible:!0,onDismiss:()=>g(null),children:w}),f.jsxs("div",{style:{display:"flex",gap:A[2],alignItems:"center"},children:[f.jsx("div",{style:{flex:1},children:f.jsx(Ea,{surface:"chalkboard",size:"small",placeholder:"Commit title",value:l,onChange:j=>c(j.currentTarget.value)})}),f.jsx(Ft,{icon:f.jsx(k_,{size:16}),surface:"chalkboard",size:"small",label:"Suggest title and message from the diff",disabled:e.size===0||m,onClick:P,wobble:m?1:0})]}),f.jsx(Ia,{surface:"chalkboard",size:"small",placeholder:"Commit message (optional)",value:u,onChange:j=>d(j.currentTarget.value),rows:2}),f.jsx(re,{surface:"chalkboard",size:"small",fullWidth:!0,disabled:e.size===0||!l.trim()||h||s,onClick:E,children:h||s?"Committing…":"Commit"})]})};function of(e){const{toast:t}=pt(),[n,r]=_.useState(!1),i=_.useCallback(async s=>{r(!0);try{await s()}catch(o){t({title:e,description:b_(o.message),variant:"error"})}finally{r(!1)}},[t,e]);return[n,i]}function __(){const e=O(p=>p.loadGitStatus),t=O(p=>p.loadPlans),n=O(p=>p.loadIdeas),r=()=>Promise.all([e(),t(),n()]),[i,s]=of("Push failed"),[o,a]=of("Sync failed"),[l,c]=of("Pull failed");return{pushing:i,syncing:o,pulling:l,handlePush:()=>s(async()=>{await pA(),await e()}),handleSync:()=>a(async()=>{await mA(),await r()}),handlePull:()=>c(async()=>{await gA(),await r()})}}const u8=()=>{const{syncing:e,handleSync:t}=__();return f.jsx(re,{surface:"chalkboard",size:"small",fullWidth:!0,icon:f.jsx(eg,{size:14}),disabled:e,onClick:t,children:e?"Syncing…":"Branch merged — sync to main"})},d8=({gitAhead:e,gitBranchHygiene:t})=>{const{pushing:n,syncing:r,pulling:i,handlePush:s,handleSync:o,handlePull:a}=__();return e>0?f.jsxs(f.Fragment,{children:[f.jsxs("p",{style:{opacity:.5,fontSize:te.xs,margin:0},children:["All changes committed — ",e," commit",e===1?"":"s"," ready to push."]}),f.jsx(re,{surface:"chalkboard",size:"small",icon:f.jsx(J6,{size:14}),disabled:n,onClick:s,children:n?"Pushing…":`Push ${e} commit${e===1?"":"s"}`})]}):f.jsxs(f.Fragment,{children:[f.jsx("p",{style:{opacity:.5,fontSize:te.xs,margin:0},children:"No changed files."}),f.jsxs("div",{style:{display:"flex",gap:A[2],alignItems:"center"},children:[f.jsx($e,{content:t==="clean-on-main"?"Already on clean main":void 0,surface:"chalkboard",children:f.jsx(re,{surface:"chalkboard",size:"small",icon:f.jsx(eg,{size:14}),disabled:r||t==="clean-on-main",onClick:o,children:r?"Syncing…":"Sync to main"})}),f.jsx(re,{surface:"chalkboard",size:"small",icon:f.jsx(Z6,{size:14}),disabled:i,onClick:a,children:i?"Pulling…":"Pull"})]})]})},f8=()=>{const e=O(l=>l.gitStatus),t=O(l=>l.gitBranch),n=O(l=>l.gitAhead),r=O(l=>l.gitBranchHygiene),{selectedFiles:i,onToggleFile:s}=a8(e),[o,a]=_.useState(!1);return f.jsxs("div",{style:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column",padding:A[6]},children:[f.jsxs("div",{style:{...Zm,display:"flex",alignItems:"center",gap:A[2]},children:["Commit",t&&f.jsx(He,{surface:"chalkboard",size:"small",children:t})]}),f.jsx(Re,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:e&&e.length>0?f.jsxs(f.Fragment,{children:[f.jsx(l8,{gitStatus:e,expanded:o,onToggleExpanded:()=>a(!o),selectedFiles:i,onToggleFile:s}),f.jsx("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:A[3],marginTop:A[3]},children:r==="stale-merged"?f.jsx(u8,{}):f.jsx(c8,{selectedFiles:i,onCommitted:()=>a(!1)})})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:A[3]},children:f.jsx(d8,{gitAhead:n,gitBranchHygiene:r})})})]})};function Ev(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function h8(e,t){const n=Ev(e)+Ev(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function p8(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}const m8=()=>{const e=O(x=>x.status),t=O(x=>x.runCheck),n=O(x=>x.fixQuality),r=O(x=>x.consistency),i=O(x=>x.plans),s=Nn(),[o,a]=_.useState(!1),{qualityStatus:l,testStatus:c,consistencyStatus:u}=_.useMemo(()=>xm(e),[e]),d=l==="running"||c==="running"||u==="running",h=r.length>0,p=_.useCallback(x=>x.kind==="blocked-plan-active"&&x.planId?i==null?void 0:i.entries.find(w=>w.id===x.planId):void 0,[i==null?void 0:i.entries]),m=_.useCallback(x=>{const w=p(x);w&&s({to:"/plans/$planId",params:{planId:encodeURIComponent(w.title)}})},[p,s]);return f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:A[6]},children:[f.jsx("div",{style:Zm,children:"Status"}),f.jsx(Re,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:(()=>{var k,S,E;const x={...kr,stale:"transparent"},w={...In,stale:void 0},g=d,y=h;`${((k=e==null?void 0:e.lint)==null?void 0:k.output)||"(none)"}${((S=e==null?void 0:e.format)==null?void 0:S.output)||"(none)"}`;const v=`Fix the failing tests in this repo. Output from the last test run:
84
-
85
- ${((E=e==null?void 0:e.test)==null?void 0:E.output)||"(no output captured)"}`,b=P=>f.jsx($e,{content:P.title,surface:"chalkboard",children:f.jsx("button",{type:"button",className:"stack-check-btn",onClick:()=>{g||P.onClick()},disabled:g,style:{cursor:g?"not-allowed":"pointer",opacity:g&&P.status!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsxs(He,{surface:"chalkboard",size:"small",fillColor:x[P.status],textColor:w[P.status],children:[P.label,f.jsx("span",{style:{visibility:P.status==="running"?"visible":"hidden"},children:"…"})]})})});return f.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:A[3]},children:[f.jsxs("div",{style:{display:"flex",gap:A[2],flexWrap:"wrap",justifyContent:"center"},children:[b({label:"Quality",status:l,title:"Run lint and format checks",onClick:()=>{t("lint"),t("format")}}),b({label:"Tests",status:c,title:"Run tests",onClick:()=>t("test")}),b({label:"Consistency",status:u,title:"Run codebase consistency (knip + dependency-cruiser)",onClick:()=>t("consistency")}),f.jsxs("div",{children:[f.jsx($e,{content:y?"Show plan/decision doc findings":"No plan/decision doc findings",surface:"chalkboard",children:f.jsx("button",{type:"button",className:y?"stack-check-btn":void 0,onClick:()=>{y&&a(P=>!P)},style:{cursor:y?"pointer":"default",display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsx(He,{surface:"chalkboard",size:"small",fillColor:y?kr.fail:kr.pass,textColor:y?In.fail:In.pass,children:"Docs"})})}),o&&y&&f.jsx("div",{style:{marginTop:A[2],display:"flex",flexDirection:"column",gap:A[2]},children:r.map((P,T)=>f.jsx("div",{style:{fontFamily:De.mono,fontSize:te["2xs"],color:Cn},children:p(P)?f.jsx("button",{type:"button",onClick:()=>m(P),style:{background:"none",border:"none",padding:0,color:Br,textDecoration:"underline",cursor:"pointer",font:"inherit",textAlign:"left"},children:P.message}):f.jsx("span",{style:{textAlign:"left"},children:P.message})},`${P.kind}-${P.title}-${T}`))})]})]}),(()=>{var j,R,L;let P,T=null;return g?P=f.jsx("span",{style:{color:Cn},children:"Running checks…"}):l==="fail"?(P=f.jsx("span",{style:{color:Cn},children:h8(((j=e==null?void 0:e.lint)==null?void 0:j.output)??"",((R=e==null?void 0:e.format)==null?void 0:R.output)??"")}),T=f.jsx("button",{type:"button",onClick:n,style:{background:"none",border:"none",padding:0,color:Br,textDecoration:"underline",cursor:"pointer",font:"inherit"},children:"Suggested fix: run biome --write"})):c==="fail"?(P=f.jsx("span",{style:{color:Cn},children:p8(((L=e==null?void 0:e.test)==null?void 0:L.output)??"")}),T=f.jsxs("span",{style:{color:Br},children:["Suggested fix: ",f.jsx(m4,{text:v,surface:"chalkboard"})]})):u==="fail"?(P=f.jsx("span",{style:{color:Cn},children:"Codebase consistency failed (knip / dependency-cruiser)."}),T=f.jsx("span",{style:{color:Cn,opacity:.8},children:"Run pnpm run consistency for details."})):h?P=f.jsx("span",{style:{color:Cn},children:"Plan/decision doc issues — see the Docs stamp."}):l==="pass"&&c==="pass"&&u==="pass"?P=f.jsx("span",{style:{color:In.pass},children:"All checks passing."}):P=f.jsx("span",{style:{color:Cn,opacity:.6},children:"Checks haven't run yet."}),f.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:A[1],fontFamily:De.handwritten,fontSize:te.sm},children:[P,f.jsx("span",{style:{visibility:T?"visible":"hidden"},children:T??" "})]})})()]})})()})]})},g8=({open:e,onToggle:t,pinned:n=!1})=>{const r=e||n,i=O(S=>S.loadPlans),s=O(S=>S.status),o=O(S=>S.loadStatus),a=O(S=>S.consistency),l=O(S=>S.loadConsistency),c=O(S=>S.loadGitStatus),u=O(S=>S.agentStatus),d=O(S=>S.loadAgentStatus),h=O(S=>S.loadSuggestions),p=O(S=>S.loadArchivableIdeas),m=Tu(),x=_.useRef({loadPlans:i,loadStatus:o,loadConsistency:l,loadGitStatus:c,loadAgentStatus:d,loadSuggestions:h,loadArchivableIdeas:p});_.useEffect(()=>{x.current={loadPlans:i,loadStatus:o,loadConsistency:l,loadGitStatus:c,loadAgentStatus:d,loadSuggestions:h,loadArchivableIdeas:p}}),_.useEffect(()=>{x.current.loadStatus(),x.current.loadConsistency(),x.current.loadGitStatus(),x.current.loadAgentStatus(),x.current.loadArchivableIdeas()},[]),_.useEffect(()=>{const S=new EventSource("/api/activity/stream"),E={},P=(T,j,R)=>{E[T]&&clearTimeout(E[T]),E[T]=setTimeout(j,R)};return S.onmessage=T=>{const j=JSON.parse(T.data);if(j.type==="status"){P("status",()=>x.current.loadStatus(),80);return}if(j.type==="agent"){P("agent",()=>x.current.loadAgentStatus(),120);return}j.message==="changed"&&P("activity",()=>{x.current.loadPlans(),x.current.loadSuggestions(),x.current.loadStatus(),x.current.loadConsistency(),x.current.loadGitStatus(),x.current.loadAgentStatus(),x.current.loadArchivableIdeas()},250)},()=>{for(const T of Object.values(E))T&&clearTimeout(T);S.close()}},[]);const{qualityStatus:w,testStatus:g,consistencyStatus:y}=_.useMemo(()=>xm(s),[s]),v=a.length>0,b=w==="fail"||g==="fail"||y==="fail"||v,k=u.some(S=>S.status==="running"||S.status==="starting"||S.status==="stopping");return f.jsxs(f.Fragment,{children:[f.jsx(r_,{children:!r&&f.jsx(Ms.div,{initial:m?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:m?void 0:{opacity:0,x:20},transition:{duration:m?0:.2,ease:"easeOut"},style:{position:"fixed",right:0,top:"50%",transform:"translateY(-50%)",zIndex:300,borderRadius:"6px 0 0 6px",background:Sl,backgroundImage:`${Sv}, linear-gradient(135deg, ${kv} 0%, ${Sl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)"},children:f.jsx(Ft,{icon:k?f.jsx(Qc,{size:"small",surface:"chalkboard",label:"Agent running"}):b?f.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:In.fail,boxShadow:"0 0 6px rgba(214, 160, 160, 0.9)"}}):f.jsx("span",{style:{fontSize:te["2xs"]},children:"S"}),surface:"chalkboard",size:"small",label:k?"Open stack panel — agent running":b?"Open stack panel — checks failing":"Open stack panel",onClick:t,style:{width:28,height:64,borderRadius:"6px 0 0 6px",boxShadow:k?"inset 0 0 0 1px rgba(214, 196, 160, 0.6)":b?"inset 0 0 0 1px rgba(214, 160, 160, 0.6)":void 0}})})}),f.jsxs(Ms.div,{animate:{x:r?0:"100%"},transition:{duration:m?0:.3,ease:[.4,0,.2,1]},style:{position:"fixed",top:0,right:0,bottom:0,width:Sb.stackPanelWidth,borderLeft:"4px solid rgba(61, 53, 43, 0.12)",backgroundColor:Sl,backgroundImage:`${Sv}, linear-gradient(135deg, ${kv} 0%, ${Sl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",color:H6,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:300},children:[f.jsxs("div",{style:{height:80,padding:`0 ${A[6]}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[f.jsx("span",{style:{fontFamily:De.serif,fontSize:te.base,fontWeight:700,color:Br},children:"Stack"}),!n&&f.jsx(Ft,{icon:f.jsx("span",{style:{fontSize:te.sm,lineHeight:1},children:"×"}),surface:"chalkboard",size:"small",label:"Close stack panel",onClick:t,style:{width:28,height:28,border:`1px solid ${G6}`}})]}),f.jsx(wv,{surface:"chalkboard"}),f.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontFamily:De.body},children:[f.jsx(X6,{}),f.jsx(wv,{surface:"chalkboard"}),f.jsx(m8,{}),f.jsx(f8,{})]})]})]})},y8=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),x8=()=>{const[e,t]=_.useState(null),[n,r]=_.useState(null),[i,s]=_.useState(!0);return _.useEffect(()=>{let o=!1;return s(!0),Promise.all([LL().then(a=>{!o&&a&&t(y8(a))}),ML().then(a=>{o||r(a)})]).finally(()=>{o||s(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:i}},C_=()=>{const[e,t]=_.useState([]),[n,r]=_.useState(!0),i=_.useRef([]),s=_.useRef(Promise.resolve());_.useEffect(()=>{let u=!1;return hk().then(d=>{if(!u){const h=(d==null?void 0:d.subjects)??[];i.current=h,t(h),r(!1)}}),()=>{u=!0}},[]);const o=u=>{const d=s.current.then(async()=>{const h=u(i.current);if(h===!1)return!1;const{ok:p}=await RL({subjects:h});return p&&(i.current=h,t(h)),p});return s.current=d,d};return{subjects:e,loading:n,addSubject:u=>o(d=>{const h=u.trim();return!h||d.includes(h)?!1:[...d,h]}),renameSubject:(u,d)=>o(h=>{const p=d.trim();return!p||p!==u&&h.includes(p)?!1:h.map(m=>m===u?p:m)}),removeSubject:u=>o(d=>d.filter(h=>h!==u))}},v8=["repo-docs"],w8=["subjects","setup"];function tg(){const{planId:e}=zs({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function b8(){const{ideaId:e}=zs({strict:!1});return typeof e=="string"?decodeURIComponent(e):null}function k8(){const{section:e}=zs({strict:!1});return v8.includes(e)?e:null}function JW(){const{section:e}=zs({strict:!1});return w8.includes(e)?e:null}function ZW(){const e=k8(),t=O(r=>r.activeDocTitle),n=O(r=>r.repoDocs);return e??(t&&n.some(r=>r.name===t)?"repo-docs":null)}const S8=250;function P_(e,t,n={}){const{debounceMs:r=S8,...i}=n,[s,o]=_.useState(e);_.useEffect(()=>{const c=setTimeout(()=>o(e),r);return()=>clearTimeout(c)},[e,r]);const{threshold:a,limit:l}=i;return _.useMemo(()=>jL(s,t,{threshold:a,limit:l}),[s,t,a,l])}const _8=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=x8(),i=e==="sm"?18:20,s=e==="sm"?te.sm:te.md;return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],minWidth:0},children:[n?f.jsx("img",{src:n,alt:"",style:{width:i,height:i,objectFit:"contain",flexShrink:0}}):f.jsx(gV,{icon:f.jsx(v4,{}),size:"small"}),f.jsx("span",{style:{fontFamily:De.serif,fontWeight:600,fontSize:s,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},children:r?"Loading…":t??"Paper Camp"})]})};function j_(e,t=0){return e?{duration:0,ease:"easeOut"}:{duration:.18,ease:"easeOut",delay:t}}function E_(e,t={y:8}){return{initial:e?void 0:{opacity:0,...t},animate:{opacity:1,x:0,y:0}}}const C8=({routeKey:e,children:t,mobileOpen:n,onMobileClose:r})=>{const i=Tu(),s=_.useRef(null);return _.useEffect(()=>{if(!n)return;const o=a=>{a.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n,r]),_.useEffect(()=>{var a;if(!n)return;const o=document.activeElement;return(a=s.current)==null||a.focus(),()=>{var l;return(l=o==null?void 0:o.focus)==null?void 0:l.call(o)}},[n]),f.jsxs(f.Fragment,{children:[n&&f.jsx("button",{type:"button",className:"lg:hidden fixed inset-0 z-[290] cursor-default border-none p-0",style:{background:"rgba(26, 25, 23, 0.4)",backdropFilter:"blur(4px)"},onClick:r,"aria-label":"Close sidebar",tabIndex:-1}),f.jsx("aside",{ref:s,role:n?"dialog":void 0,"aria-modal":n||void 0,"aria-label":"Sidebar navigation",tabIndex:-1,className:`fixed inset-y-0 left-0 z-[300] transition-transform duration-300 ease-out lg:sticky lg:inset-auto lg:top-0 lg:z-auto lg:translate-x-0 ${n?"translate-x-0":"-translate-x-full"}`,style:{width:Sb.sidebarWidth,flexShrink:0,height:"var(--pc-sidebar-h, 100%)",display:"flex",flexDirection:"column",background:n?"var(--pui-bg-base)":"transparent",boxShadow:n?"2px 0 12px rgba(0,0,0,0.15)":void 0,overflow:"hidden"},children:f.jsx("div",{style:{flex:1,overflowY:"auto",paddingTop:A[5],position:"relative"},children:f.jsx(Ms.div,{...E_(i,{x:-8}),transition:j_(i,.08),children:t},e)})})]})},af={pass:"success",fail:"error",running:"warning",stale:"neutral"},lf={fontSize:te["2xs"]},P8=()=>{const e=O(b=>b.status),t=O(b=>b.agentStatus),n=O(b=>b.gitStatus),r=O(b=>b.gitBranch),i=O(b=>b.gitAhead),s=O(b=>b.runCheck),o=O(b=>b.fixQuality),a=O(b=>b.quickCommit),l=O(b=>b.commitInFlight),c=O(SA),{toast:u}=pt(),d=Nn(),{qualityStatus:h,testStatus:p,consistencyStatus:m}=xm(e),x=h==="running"||p==="running"||m==="running",w=t.find(b=>b.status==="running"||b.status==="starting"||b.status==="stopping"),g=w!==void 0,y=(n==null?void 0:n.length)??0,v=async()=>{if(l||y===0)return;const b=await a();b.ok?u({title:"Committed",description:b.warning??b.title,variant:b.warning?"warning":"success"}):u({title:"Commit failed",description:b.error,variant:"error"})};return f.jsxs("div",{style:{...Iu("kraft"),display:"flex",alignItems:"center",gap:A[3],height:"32px",padding:`0 ${A[4]}`,borderBottom:"1px solid rgba(0,0,0,0.08)",fontSize:te["2xs"],flexShrink:0,boxSizing:"border-box",overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],flexShrink:0},children:[f.jsxs("span",{style:{display:"flex",alignItems:"center",gap:A[1]},children:[f.jsx("span",{style:{opacity:.5},children:"⌥"}),f.jsx("code",{style:{color:ie.textPrimary},children:r??"no branch"})]}),i>0&&f.jsxs("span",{style:{opacity:.6},children:["↑",i]}),f.jsx("span",{style:{opacity:.6},children:y>0?`${y} changed`:"clean"}),g&&f.jsx(Qc,{size:"small",label:`Agent ${w==null?void 0:w.status}…`}),c>0&&f.jsx($e,{content:"Some features are disabled — open Setup to fix",children:f.jsx("button",{type:"button",onClick:()=>d({to:"/settings/$section",params:{section:"setup"}}),style:{background:"none",border:"none",padding:0,cursor:"pointer"},children:f.jsxs(He,{size:"small",variant:"warning",children:["Setup (",c,")"]})})})]}),f.jsx("div",{style:{flex:1}}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2],flexShrink:0},children:[f.jsx($e,{content:"Quality (lint + format)",children:f.jsx(He,{size:"small",variant:af[h],children:"Quality"})}),f.jsx($e,{content:"Tests",children:f.jsx(He,{size:"small",variant:af[p],children:"Tests"})}),f.jsx($e,{content:"Codebase consistency (knip + dependency-cruiser)",children:f.jsx(He,{size:"small",variant:af[m],children:"Consistency"})}),f.jsx($e,{content:"Commit all changes with an auto-suggested message",children:f.jsx(re,{variant:"ghost",size:"small",icon:f.jsx(n8,{}),style:lf,disabled:l||y===0,onClick:v,children:l?"Committing…":y>0?`Commit (${y})`:"Commit"})}),f.jsx(re,{variant:"ghost",size:"small",icon:f.jsx(t8,{}),style:lf,disabled:x,onClick:()=>s("test"),children:"Run tests"}),f.jsx(re,{variant:"ghost",size:"small",icon:f.jsx(k_,{}),style:lf,disabled:x||h!=="fail",onClick:o,children:"Fix quality"})]})]})},j8=({children:e})=>f.jsx("h1",{className:"text-4xl",style:{fontFamily:De.serif,fontWeight:600,color:ie.textPrimary,margin:`0 0 ${A[6]}`,lineHeight:1.1},children:e}),Ra=()=>{const e=O(s=>s.loadPlans),{toast:t}=pt(),[n,r]=_.useState(!1);return{patch:async(s,o,a)=>{r(!0);try{return await fA(s,o),await e(),!0}catch(l){return t({title:(a==null?void 0:a.errorTitle)??"Update failed",description:l.message,variant:"error"}),!1}finally{r(!1)}},updating:n}};function T_(){const[e,t]=_.useState("idle"),[n,r]=_.useState(null),i=_.useRef(null),s=_.useCallback(async a=>{i.current&&clearTimeout(i.current),t("loading"),r(null);try{await a(),t("success"),i.current=setTimeout(()=>{t("idle")},2e3)}catch(l){t("error"),r(l.message),i.current=setTimeout(()=>{t("idle"),r(null)},4e3)}},[]),o=_.useCallback(()=>{i.current&&clearTimeout(i.current),t("idle"),r(null)},[]);return{state:e,errorMessage:n,run:s,reset:o,loading:e==="loading",success:e==="success"}}function E8(e){const t=e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
86
- `),n=e.log&&e.log.length>0?e.log.map(i=>`- ${i.date}: ${i.text}`).join(`
87
- `):"(none)",r=e.clarifications&&e.clarifications.length>0?e.clarifications.map(i=>`- ${i.date}: ${i.text}`).join(`
88
- `):"(none)";return`You are auditing the plan "${e.title}" (${e.id??"no id"}) for missing phases. The plan is a single file at papercamp/ideas/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/ideas/archive/${e.id??"<ID>"}.md. Edit only that file.
89
-
90
- Plan body: ${e.body}
91
-
92
- Current phases:
93
- ${t}
94
-
95
- Log entries (issues, bugs, and review notes recorded so far):
96
- ${n}
97
-
98
- Clarifications (answered scope/design questions):
99
- ${r}
100
-
101
- Task:
102
- 1. Read the plan above, then inspect the relevant code in this repo.
103
- 2. Identify work that is clearly required to fulfil this plan but is covered by no existing phase. The Log entries are the best source — they often record bugs or gaps that were never turned into phases.
104
- 3. If you found missing work: append one \`- [ ] <short phase title>\` line per item at the end of the \`### Phases\` list. You may add detail below a checkbox line as continuation lines indented with 6 spaces. Then append exactly one line to the \`### Log\` section, formatted \`- YYYY-MM-DD: <what was found and appended>\`, creating that section after the Phases list if it does not exist.
105
- 4. If nothing is missing: make no edits at all — no Log line, no empty heading, no "nothing found" note. This audit re-runs regularly and must leave no trace when there is nothing to add.
106
-
107
- Rules:
108
- - Never modify, reorder, check, uncheck, or delete any existing line, even if it looks stale, wrong, or redundant.
109
- - Never touch the YAML frontmatter.
110
- - Append only: new unchecked phases at the end of the list, plus the single Log line.`}function T8(e){const t=e.phases.length>0,n=t?"plan":"idea",r=t?e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
111
- `):"(none — this is a backlog idea with no phases yet)";return`You are reconciling the ${n} "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/ideas/archive/${e.id??"<ID>"}.md. Edit only that file.
112
-
113
- ${t?"Plan":"Idea"} body: ${e.body}
114
-
115
- Current phases:
116
- ${r}
117
-
118
- Task: this ${n} has drifted from the codebase — some ${t?"phase descriptions and body prose":"body prose"} may reference file paths that moved, code symbols that were renamed or removed, or approaches that were superseded during implementation. Find and fix only that drift.
119
-
120
- 1. Read the ${n} above, then inspect the relevant code in this repo to find what has actually changed since the prose was written.
121
- 2. Reword only the sentences or phrases that are now stale: fix references and superseded approaches. Leave everything else byte-identical.
122
- 3. Do not summarize, restructure, or "improve" prose that is still accurate — an unnecessary rewrite is a failure of this task, not a bonus.
123
-
124
- Hard guardrails, never violate these:
125
- - Never touch the YAML frontmatter (id, title, kind, status, created, idea, tags, or any other field).
126
- - Never un-check, check, delete, or reorder any phase line, checked or unchecked.
127
- - Never add or remove phases.
128
- - Never touch the Log or Clarifications sections.
129
- - If nothing is stale, make no edits at all.`}function I8(e){const t=e.log&&e.log.length>0?e.log.map(n=>`- ${n.date}: ${n.text}`).join(`
130
- `):"(none)";return`You are expanding the idea ${e.id??"no id"} ("${e.title}"), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md. Edit only that file, and within it only the \`### Log\` section.
131
-
132
- Current idea body, in full (do not modify this):
133
- ${e.body}
134
-
135
- Prior Log entries:
136
- ${t}
137
-
138
- Task:
139
- 1. Explore this codebase and find what is relevant to the idea: the files it would touch, existing helpers or patterns it should build on, and constraints visible in the code.
140
- 2. Write up what you found as a single dated entry — name specific files and symbols, describe a workable approach, and include the architectural context you found. Keep the idea's original intent — sharpen it, do not redirect it.
141
- 3. Append exactly one line to the \`### Log\` section, formatted \`- YYYY-MM-DD: <what you found>\`, creating that section at the end of the file if it does not exist. Use today's date, and keep the entry to that single physical line (no literal line breaks).
142
-
143
- Keep unchanged:
144
- - the YAML frontmatter (id, title)
145
- - the \`## ${e.id??"IDEA-N"}: ${e.title}\` heading line and the original body prose beneath it
146
-
147
- Append only — never rewrite or delete the idea's existing body or prior Log lines.`}function R8(e){return`You are fleshing out the idea ${e.id??"no id"} ("${e.title}"), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md. Edit only that file, and within it only the \`### Log\` section.
148
-
149
- This idea was just promoted from an AI-generated one-liner suggestion — its current body is only that one-liner, with no deeper context yet:
150
- ${e.body}
151
-
152
- Task:
153
- 1. Explore this codebase and find what is relevant to the idea: the files it would touch, existing helpers or patterns it should build on, and constraints visible in the code.
154
- 2. Write up what you found as a single dated entry — name specific files and symbols, describe a workable approach, and include the architectural context you found. Sharpen the idea's original intent, do not redirect it.
155
- 3. Append exactly one line to the \`### Log\` section, formatted \`- YYYY-MM-DD: <what you found>\`, creating that section at the end of the file if it does not exist. Use today's date, and keep the entry to that single physical line (no literal line breaks).
156
-
157
- Keep unchanged:
158
- - the YAML frontmatter (id, title, status)
159
- - the original body prose beneath the frontmatter
160
-
161
- Append only — never rewrite or delete the idea's existing body or prior Log lines.`}function eU(e,t){return`You are fleshing out the idea ${e.id??"no id"} ("${e.title}"), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md. Edit only that file, and within it only the \`### Log\` section.
162
-
163
- This idea was just promoted from a roadmap item under "${t}" in ROADMAP.md — its current body is only that item's one-line description plus a provenance note, with no deeper context yet:
164
- ${e.body}
165
-
166
- Task:
167
- 1. Explore this codebase and find what is relevant to the idea: the files it would touch, existing helpers or patterns it should build on, and constraints visible in the code.
168
- 2. Write up what you found as a single dated entry — name specific files and symbols, describe a workable approach, and include the architectural context you found. Sharpen the idea's original intent, do not redirect it.
169
- 3. Append exactly one line to the \`### Log\` section, formatted \`- YYYY-MM-DD: <what you found>\`, creating that section at the end of the file if it does not exist. Use today's date, and keep the entry to that single physical line (no literal line breaks).
170
-
171
- Keep unchanged:
172
- - the YAML frontmatter (id, title, status)
173
- - the original body prose beneath the frontmatter
174
-
175
- Append only — never rewrite or delete the idea's existing body or prior Log lines.`}function M8(e,t){const n=t.filter(i=>i.status!=="done"),r=n.length?n.map(i=>{const s=i.phases.map(o=>` - [${o.done?"x":" "}] ${o.text}`).join(`
176
- `);return`### ${i.id??"no id"}: ${i.title} (status: ${i.status}${i.idea?`, idea: ${i.idea}`:""})
177
- ${i.body}
178
- ${s||" (no phases yet)"}`}).join(`
179
-
180
- `):"(no other open plans exist yet)";return`You are drafting a plan for the idea ${e.id??"no id"} ("${e.title}"), stored as a single file at papercamp/ideas/${e.id??"<ID>"}.md. The idea and its plan are ONE file: you draft the plan by editing that existing file in place — never create a new file.
181
-
182
- Idea body, in full:
183
- ${e.body}
184
-
185
- ## What drafting adds to the file (see papercamp/about.md)
186
-
187
- The file already has YAML frontmatter (id, title, status, created, …) and the prose body above. Drafting means:
188
-
189
- 1. Add a \`type\` field to the frontmatter: the Conventional Commits type that best fits (\`feat | fix | chore | docs | refactor\` — most are \`feat\`).
190
- 2. Add 1-4 short subsystem \`tags\` to the frontmatter if it has none.
191
- 3. Append a \`### Phases\` checklist at the end of the file (after any \`### Log\` section move it below the phases — Phases, then Log):
192
-
193
- \`\`\`
194
- ### Phases
195
- - [ ] Short phase title
196
- Optional description of the phase, indented with 6 spaces.
197
- \`\`\`
198
-
199
- Hard rules:
200
- - Never change the \`id\`, \`title\`, \`status\`, or \`created\` fields — \`status\` stays exactly \`idea\`; a human promotes it after reviewing your draft (per papercamp/decisions.md, "Plan-drafting agent writes directly, same as phase execution").
201
- - Never rewrite or delete the existing prose body or \`### Log\` entries — the idea's history stays intact.
202
- - Phases: actionable steps a future agent or human could pick up one at a time — match the granularity of the phases in the entities shown below, not one giant phase.
203
-
204
- ## Every other open (non-done) entity, for scope context
205
-
206
- ${r}
207
-
208
- Use the open entities above only to avoid duplicating in-flight scope and to match phase granularity. Edit only papercamp/ideas/${e.id??"<ID>"}.md — never create, edit, move, or rename any other file.`}function L8(e,t){const n=e.length?e.map(i=>`### ${i.id??"no id"}: ${i.title}
209
- ${i.body}`).join(`
210
-
211
- `):"(no ideas yet)",r=t.length?t.map(i=>`- ${i.date}: ${i.title} — ${i.description}`).join(`
212
- `):"(none yet)";return`You are scanning this repository for ideas worth suggesting, to append to papercamp/suggestions.md — a lightweight holding pen, sibling to decisions.md/open-questions.md/progress.md. Edit only that one file.
213
-
214
- Existing ideas (do not repeat anything already covered here):
215
- ${n}
216
-
217
- Existing suggestions already in the holding pen (do not repeat these either):
218
- ${r}
219
-
220
- Task:
221
- 1. Explore this codebase for gaps, rough edges, or "you might want to do X" hunches that aren't already an idea or an existing suggestion above — things like missing error handling, an obvious follow-up to recent work, a TODO left in code, or a UX gap you notice while reading the app.
222
- 2. For each genuinely new one you find (0 to a handful — do not force a quota), append one line to papercamp/suggestions.md formatted exactly \`- YYYY-MM-DD: Title — one-line description\`, using today's date. Keep the title short (a few words, like an idea title) and the description to a single physical line (no literal line breaks).
223
- 3. If you find nothing worth suggesting, make no edits at all — no empty line, no placeholder.
224
-
225
- Rules:
226
- - Append only — never modify, reorder, or delete any existing line in suggestions.md.
227
- - Never create papercamp/ideas/ files or touch ideas/index.md — a suggestion is not an idea until a human promotes it.
228
- - Never touch any other file in the repo.`}const Au=({idea:e,otherPlans:t})=>{const n=O(d=>d.launchPlanDraft),r=O(sr),{state:i,errorMessage:s,run:o}=T_(),{toast:a}=pt(),l=()=>{const d=e.id;d&&o(async()=>{try{await n(d,M8(e,t))}catch(h){throw a({title:"Draft failed",description:Xr(h.message),variant:"error"}),h}})},c=i==="loading"?"Drafting…":i==="success"?"Draft sent!":i==="error"?"Draft failed":"Draft plan",u=i==="error"?s??"Draft failed":e.id?r?void 0:"No agent CLI found — set up in Settings":"Idea needs an ID before an agent can run";return f.jsx($e,{content:u,children:f.jsx(re,{variant:"ghost",size:"small",onClick:l,disabled:i==="loading"||!e.id||!r,style:{color:i==="error"?ie.accentRoseDark:ie.textSecondary},children:c})})},A8=({children:e,collapsedLines:t=3,resetKey:n})=>{const r=_.useRef(null),[i,s]=_.useState(!1),[o,a]=_.useState(!1);return _.useLayoutEffect(()=>s(!1),[n]),_.useLayoutEffect(()=>{if(i)return;const l=r.current;if(!l)return;const c=()=>a(l.scrollHeight-l.clientHeight>1);c();const u=new ResizeObserver(c);return u.observe(l),()=>u.disconnect()},[i,n]),f.jsxs("div",{children:[f.jsx("div",{ref:r,style:i?void 0:{display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e}),o&&f.jsx("button",{type:"button",onClick:()=>s(l=>!l),"aria-expanded":i,style:{alignSelf:"flex-start",background:"none",border:"none",padding:`${A[1]} 0`,font:"inherit",fontSize:te.xs,opacity:.6,cursor:"pointer",textDecoration:"underline"},children:i?"Show less":"Show more"})]})},Jr=({id:e})=>e?f.jsx(He,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,I_={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},ng={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},nr={idea:{fill:"rgba(138, 155, 168, 0.25)",text:"#5E7080"},planned:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},"in-progress":{fill:"rgba(212, 163, 115, 0.25)",text:"#A67B4F"},review:{fill:"rgba(155, 122, 181, 0.25)",text:"#7B5E9E"},done:{fill:"rgba(168, 155, 168, 0.25)",text:"#6E5E6E"},dropped:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"}},R_={open:"Open",done:"Done",dropped:"Dropped"},Xc={open:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},done:{fill:"rgba(168, 155, 168, 0.25)",text:"#6E5E6E"},dropped:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"}},D8={draft:"Draft",open:"Open",closed:"Closed",merged:"Merged"},Qh={draft:{fill:"rgba(138, 155, 168, 0.25)",text:"#5E7080"},open:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},closed:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"},merged:{fill:"rgba(155, 122, 181, 0.25)",text:"#7B5E9E"}},N8={approved:"Approved","changes-requested":"Changes requested","review-required":"Review required"},Tv={approved:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66"},"changes-requested":{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A"},"review-required":{fill:"rgba(212, 163, 115, 0.25)",text:"#A67B4F"}},z8=({pr:e})=>f.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",onClick:t=>t.stopPropagation(),style:{textDecoration:"none",display:"inline-flex"},children:f.jsx(He,{size:"small",fillColor:Qh[e.state].fill,textColor:Qh[e.state].text,children:f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:A[1]},children:[f.jsx(r8,{}),"#",e.number," ",D8[e.state]]})})}),M_=({pct:e,color:t,height:n=6})=>f.jsx(F5,{value:e,color:t,height:n}),O8=({pr:e})=>{const{reviewDecision:t,unresolvedThreadCount:n,hasNewCommentsSincePush:r}=e;return!t&&!n?null:f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:A[2]},children:[t&&f.jsx(He,{size:"small",fillColor:Tv[t].fill,textColor:Tv[t].text,children:N8[t]}),!!n&&f.jsxs(He,{size:"small",fillColor:nr["in-progress"].fill,textColor:nr["in-progress"].text,children:[n," unaddressed comment",n===1?"":"s",r?" · new":""]})]})},F8=({open:e,onClose:t,onAdd:n})=>{const[r,i]=_.useState(""),[s,o]=_.useState(""),[a,l]=_.useState(!1),[c,u]=_.useState(!1),[d,h]=_.useState(null),[p,m]=_.useState(null),[x,w]=_.useState(!1),[g,y]=_.useState(null),[v,b]=_.useState(null),k=O(D=>{var M;return((M=D.plans)==null?void 0:M.entries)??[]}),{patch:S}=Ra(),E=Nn(),P=P_(r,k.map(D=>({id:D.id,title:D.title,body:D.body,tags:D.tags,log:D.log})));_.useEffect(()=>{e&&(i(""),o(""),l(!1),u(!1),h(null),w(!1),y(null),b(null))},[e]);const T=D=>{t(),E({to:"/plans/$planId",params:{planId:encodeURIComponent(D)}})},j=async()=>{const D=`${r.trim()}${s.trim()?`
229
-
230
- ${s.trim()}`:""}`;if(D){w(!0),b(null),y(null);try{const M=k.map(B=>({id:B.id,title:B.title,body:B.body,tags:B.tags}));y(await mk(D,M))}catch(M){b(M.message)}finally{w(!1)}}},R=D=>{const M=k.find(B=>B.id===D);M&&T(M.title)},L=async(D,M,B)=>{m(D);const z={date:new Date().toISOString().slice(0,10),text:r.trim()},W=await S(M,{log:[...B??[],z]},{errorTitle:"Extend failed"});m(null),W&&t()},F=async D=>{if(D.preventDefault(),!(!r.trim()||c)){h(null),u(!0);try{await n({title:r.trim(),content:s.trim()||void 0,kind:a?"note":void 0}),t()}catch(M){h(M.message)}finally{u(!1)}}};return f.jsx(Ta,{open:e,onClose:t,title:"New idea",size:"small",children:f.jsxs("form",{onSubmit:F,style:{display:"flex",flexDirection:"column",gap:A[4]},children:[f.jsx(Ea,{label:"Title",value:r,onChange:D=>i(D.target.value),placeholder:"Idea title…",disabled:c,autoFocus:!0,required:!0}),P.length>0&&f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("span",{style:{fontSize:te.sm,opacity:.6,fontWeight:600},children:"Similar ideas"}),P.map(({candidate:D})=>{const M={id:D.id??null,title:D.title,body:D.body,log:D.log},B=k.filter(H=>H.id!==D.id);return f.jsx(Re,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2],minWidth:0},children:[f.jsx(Jr,{id:D.id}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:D.title})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(re,{type:"button",variant:"ghost",size:"small",onClick:()=>T(D.title),children:"Open it"}),f.jsx(re,{type:"button",variant:"ghost",size:"small",disabled:!D.id||!r.trim()||p!==null,onClick:()=>D.id&&L(D.id,D.title,D.log),children:p===D.id?"Extending…":"Extend it instead"}),f.jsx(Au,{idea:M,otherPlans:B})]})]})},D.id??D.title)})]}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("div",{children:f.jsx(re,{type:"button",variant:"ghost",size:"small",disabled:!r.trim()||x,onClick:j,children:x?"Checking overlap…":"Check overlap"})}),v&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:te.sm},children:v}),g&&f.jsx(Re,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("span",{style:{fontWeight:600},children:g.verdict==="new"?"Looks genuinely new":g.verdict==="extend"?`Extends ${g.targetId??"an existing idea"}`:`Belongs inside ${g.targetId??"an existing idea"}`}),f.jsx("span",{style:{fontSize:te.sm,opacity:.8},children:g.reasoning}),g.targetId&&f.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:f.jsx(re,{type:"button",variant:"ghost",size:"small",onClick:()=>R(g.targetId),children:"Open it"})})]})})]}),f.jsx(Ia,{label:"Description",value:s,onChange:D=>o(D.target.value),placeholder:"Optional details…",disabled:c,rows:4}),f.jsx(zV,{label:"Note — never needs a plan",checked:a,onChange:D=>l(D.target.checked),disabled:c}),d&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:te.sm},children:d}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(re,{type:"button",variant:"ghost",onClick:t,disabled:c,children:"Cancel"}),f.jsx(re,{type:"submit",variant:"primary",disabled:!r.trim()||c,children:"Add"})]})]})})},B8=({suggestion:e,onClose:t})=>{const n=O(u=>u.promoteSuggestion),r=O(u=>u.launchIdeaExtend),[i,s]=_.useState(!1),[o,a]=_.useState(null),{toast:l}=pt();_.useEffect(()=>{e&&(s(!1),a(null))},[e]);const c=async()=>{if(e){s(!0),a(null);try{const u=await n(e),d=O.getState().ideaEntries.find(h=>h.id===u);if(d)try{await r(u,R8(d))}catch(h){l({title:"Idea created, but the refine agent failed to launch",description:Xr(h.message),variant:"error"})}t()}catch(u){a(u.message)}finally{s(!1)}}};return f.jsx(Ta,{open:e!==null,onClose:t,title:(e==null?void 0:e.title)??"",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[4]},children:[f.jsx("p",{style:{margin:0,opacity:.8},children:e==null?void 0:e.description}),o&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:te.sm},children:o}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(re,{type:"button",variant:"ghost",onClick:t,disabled:i,children:"Cancel"}),f.jsx(re,{type:"button",variant:"primary",onClick:c,disabled:i,children:i?"Moving…":"Move to ideas"})]})]})})},cf=({tokens:e})=>f.jsx(f.Fragment,{children:e.map((t,n)=>{if(t.type==="same")return f.jsx("span",{children:t.text},`${t.type}-${n}`);const r=t.type==="added";return f.jsx("span",{style:{backgroundColor:r?"rgba(143, 185, 150, 0.3)":"rgba(201, 139, 139, 0.3)",textDecoration:r?"none":"line-through",color:r?ie.accentGreenDark:ie.accentRoseDark},children:t.text},`${t.type}-${n}`)})}),Iv=e=>f.jsx("h4",{style:{fontFamily:De.serif,fontSize:te.xs,fontWeight:600,margin:`0 0 ${A[2]}`,opacity:.65},children:e}),$8=({plan:e,before:t,onApprove:n,onDiscard:r,queuePosition:i})=>{const[s,o]=_.useState(!1),a=e.body!==t.body,l=e.phases.map((u,d)=>({phase:u,before:t.phases[d],index:d})).filter(({phase:u,before:d})=>d!==void 0&&(u.text!==d.text||(u.description??"")!==(d.description??""))),c=async()=>{o(!0);try{await r()}finally{o(!1)}};return f.jsx(Ta,{open:!0,title:i?`Review reconcile changes (${i.index} of ${i.total})`:"Review reconcile changes",size:"large",onClose:c,children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[5]},children:[f.jsxs("p",{className:"text-sm",style:{margin:0,opacity:.7},children:['The reconcile agent proposed the rewrite below for "',e.title,'". Approve to keep it, or discard to revert to the prior wording.']}),!a&&l.length===0&&f.jsx("p",{className:"text-sm",style:{margin:0,opacity:.6},children:"No wording changed."}),a&&f.jsxs("div",{children:[Iv("Body"),f.jsx("p",{className:"text-base",style:{margin:0,lineHeight:Ic.normal},children:f.jsx(cf,{tokens:Id(t.body,e.body)})})]}),l.length>0&&f.jsxs("div",{children:[Iv("Phases"),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[3]},children:l.map(({phase:u,before:d,index:h})=>f.jsxs("div",{className:"text-sm",style:{lineHeight:Ic.normal},children:[f.jsx(cf,{tokens:Id(d.text,u.text)}),(u.description||d.description)&&f.jsx("div",{style:{opacity:.85,marginTop:A[1]},children:f.jsx(cf,{tokens:Id(d.description??"",u.description??"")})})]},h))})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(re,{variant:"danger",size:"small",onClick:c,disabled:s,children:"Discard"}),f.jsx(re,{variant:"primary",size:"small",onClick:n,disabled:s,children:"Approve"})]})]})})},V8=()=>{const e=O(u=>u.archivableIdeas),t=O(u=>u.archiveIdeas),[n,r]=_.useState(null),[i,s]=_.useState(!1),{toast:o}=pt(),a=_.useCallback(async u=>{try{await t(u)}catch(d){o({title:"Archive failed",description:d.message,variant:"error"})}},[t,o]),l=_.useCallback(async u=>{r(u.id);try{await a([u.id])}finally{r(null)}},[a]),c=_.useCallback(async()=>{s(!0);try{await a(e.map(u=>u.id))}finally{s(!1)}},[a,e]);return e.length===0?null:f.jsxs("div",{style:{marginTop:A[5]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:A[2],margin:`0 0 ${A[2]}`},children:[f.jsxs("h2",{className:"text-sm",style:{margin:0,opacity:.6},children:["Ready to archive (",e.length,")"]}),f.jsx(re,{variant:"ghost",size:"small",disabled:i||n!==null,onClick:c,children:i?"Archiving…":"Archive all"})]}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:e.map(u=>f.jsx("div",{style:{borderRadius:10},children:f.jsx(Re,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2]},children:[f.jsx(Jr,{id:u.id}),f.jsx("span",{style:{flex:1,minWidth:0,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.title}),f.jsx(Ft,{icon:f.jsx("span",{children:"→"}),variant:"ghost",size:"small",label:`Archive ${u.title}`,disabled:n===u.id||i,onClick:()=>l(u),style:{width:28,height:28}})]})})},u.id))})]})},L_={fontFamily:De.serif,fontWeight:600,fontSize:"1.75rem",lineHeight:Ic.tight},W8=()=>{const e=O(s=>s.launchBatchReconcile),t=O(sr),[n,r]=_.useState(!1),i=async()=>{r(!0);try{await e()}catch(s){alert(s.message)}finally{r(!1)}};return f.jsx($e,{content:t?void 0:"No agent CLI found — set up in Settings",children:f.jsx(re,{variant:"ghost",size:"small",onClick:i,disabled:n||!t,style:{color:ie.textSecondary},children:"Actualise all"})})},U8=({onAdd:e,disabled:t})=>{const[n,r]=_.useState(!1),[i,s]=_.useState(""),[o,a]=_.useState(null),[l,c]=_.useState(!1),u=()=>{r(!1),s(""),a(null)},d=async()=>{let h;try{h=IL(i)}catch(p){a(p instanceof Error?p.message:"Could not parse findings");return}c(!0),a(null);try{await e(h),u()}finally{c(!1)}};return f.jsxs(f.Fragment,{children:[f.jsx($e,{content:"Add /code-review findings as phases",children:f.jsx(Ft,{variant:"ghost",size:"small",onClick:()=>r(!0),disabled:t,"aria-label":"Add code-review findings as phases",icon:f.jsx(w4,{size:16})})}),f.jsx(Ta,{open:n,onClose:u,title:"Add /code-review findings",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[4]},children:[f.jsxs("p",{className:"text-sm",style:{margin:0,opacity:.7},children:["Paste the JSON findings from a ",f.jsx("code",{children:"/code-review"})," run. Each finding becomes a new, unchecked phase on this plan."]}),f.jsx(Ia,{value:i,onChange:h=>s(h.target.value),placeholder:'[{ "description": "...", "file": "src/foo.ts", "line_start": 12, "failure_scenario": "..." }]',rows:10,disabled:l}),o&&f.jsxs(v_,{variant:"warning",children:["Could not add phases — ",o]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(re,{type:"button",variant:"ghost",onClick:u,disabled:l,children:"Cancel"}),f.jsx(re,{type:"button",variant:"primary",onClick:d,disabled:l||!i.trim(),children:"Add phases"})]})]})})]})},H8=pL.map(e=>({value:e,label:e})),G8=({open:e,onClose:t,onAdd:n})=>{const[r,i]=_.useState(""),[s,o]=_.useState(""),[a,l]=_.useState("feat"),[c,u]=_.useState(!1),[d,h]=_.useState(null),[p,m]=_.useState(null),[x,w]=_.useState(!1),[g,y]=_.useState(null),[v,b]=_.useState(null),k=O(M=>{var B;return((B=M.plans)==null?void 0:B.entries)??[]}),{patch:S}=Ra(),E=Nn(),{toast:P}=pt(),T=P_(r,k.map(M=>({id:M.id,title:M.title,body:M.body,tags:M.tags,log:M.log})));_.useEffect(()=>{e&&(i(""),o(""),l("feat"),u(!1),h(null),w(!1),y(null),b(null))},[e]),_.useEffect(()=>{y(null),b(null)},[r,s]);const j=M=>{t(),E({to:"/plans/$planId",params:{planId:encodeURIComponent(M)}})},R=async()=>{const M=`${r.trim()}${s.trim()?`
231
-
232
- ${s.trim()}`:""}`;if(M){w(!0),b(null),y(null);try{const B=k.map(H=>({id:H.id,title:H.title,body:H.body,tags:H.tags}));y(await mk(M,B))}catch(B){b(B.message)}finally{w(!1)}}},L=M=>{const B=k.find(H=>H.id===M);B?j(B.title):P({title:"Plan not found",description:`No plan with id ${M}`,variant:"error"})},F=async(M,B,H)=>{m(M);const W={date:new Date().toISOString().slice(0,10),text:r.trim()},C=await S(B,{log:[...H??[],W]},{errorTitle:"Extend failed"});m(null),C&&t()},D=async M=>{if(M.preventDefault(),!(!r.trim()||c)){h(null),u(!0);try{await n({title:r.trim(),content:s.trim()||void 0,kind:a}),t()}catch(B){h(B.message)}finally{u(!1)}}};return f.jsx(Ta,{open:e,onClose:t,title:"Quick plan",size:"small",children:f.jsxs("form",{onSubmit:D,style:{display:"flex",flexDirection:"column",gap:A[4]},children:[f.jsx(Ea,{label:"Title",value:r,onChange:M=>i(M.target.value),placeholder:"Backlog item title…",disabled:c,autoFocus:!0,required:!0}),T.length>0&&f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("span",{style:{fontSize:te.sm,opacity:.6,fontWeight:600},children:"Similar ideas"}),T.map(({candidate:M})=>{const B={id:M.id??null,title:M.title,body:M.body,log:M.log},H=k.filter(z=>z.id!==M.id);return f.jsx(Re,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2],minWidth:0},children:[f.jsx(Jr,{id:M.id}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M.title})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(re,{type:"button",variant:"ghost",size:"small",onClick:()=>j(M.title),children:"Open it"}),f.jsx(re,{type:"button",variant:"ghost",size:"small",disabled:!M.id||!r.trim()||p!==null,onClick:()=>M.id&&F(M.id,M.title,M.log),children:p===M.id?"Extending…":"Extend it instead"}),f.jsx(Au,{idea:B,otherPlans:H})]})]})},M.id??M.title)})]}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("div",{children:f.jsx(re,{type:"button",variant:"ghost",size:"small",disabled:!r.trim()||x,onClick:R,children:x?"Checking overlap…":"Check overlap"})}),v&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:te.sm},children:v}),g&&f.jsx(Re,{size:"small",texture:"canvas",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx("span",{style:{fontWeight:600},children:g.verdict==="new"?"Looks genuinely new":g.verdict==="extend"?`Extends ${g.targetId??"an existing idea"}`:`Belongs inside ${g.targetId??"an existing idea"}`}),f.jsx("span",{style:{fontSize:te.sm,opacity:.8},children:g.reasoning}),g.targetId&&f.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:f.jsx(re,{type:"button",variant:"ghost",size:"small",onClick:()=>L(g.targetId),children:"Open it"})})]})})]}),f.jsx(Yh,{label:"Kind",value:a,onChange:M=>l(M),options:H8,disabled:c}),f.jsx(Ia,{label:"Description",value:s,onChange:M=>o(M.target.value),placeholder:"Optional details…",disabled:c,rows:4}),d&&f.jsx("p",{style:{margin:0,color:ie.accentRoseDark,fontSize:te.sm},children:d}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:A[2]},children:[f.jsx(re,{type:"button",variant:"ghost",onClick:t,disabled:c,children:"Cancel"}),f.jsx(re,{type:"submit",variant:"primary",disabled:!r.trim()||c,children:"Add"})]})]})})},K8=()=>f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M10 6h10M10 12h10M10 18h10"}),f.jsx("path",{d:"M3 6l1.5 1.5L7 5M3 12l1.5 1.5L7 11M3 18l1.5 1.5L7 17"})]}),Y8=()=>{const e=O(o=>o.loadPlans),t=O(o=>o.gitBranchHygiene),[n,r]=_.useState(!1),i=t==="stale-merged",s=async o=>{await dA(o),await e(),r(!1)};return f.jsxs(f.Fragment,{children:[f.jsx($e,{content:i?"Switch to main first":void 0,children:f.jsx(Ft,{icon:f.jsx(K8,{}),variant:"ghost",size:"small",label:i?"Switch to main first":"Quick plan",disabled:i,onClick:()=>r(!0)})}),f.jsx(G8,{open:n,onClose:()=>r(!1),onAdd:s})]})},q8=({planId:e,phaseIndex:t,disabled:n})=>{const r=O(u=>u.launchAgent),i=O(sr),{toast:s}=pt(),[o,a]=_.useState(!1),l=async u=>{if(u.stopPropagation(),!!e){a(!0);try{await r(e,t)}catch(d){s({title:"Failed to start agent",description:Xr(d.message),variant:"error"})}finally{a(!1)}}},c=e?i?"Start agent on this phase":"No agent CLI found — set up in Settings":"Plan needs an ID before an agent can run";return f.jsx(Ft,{icon:f.jsx("span",{style:{fontSize:12,lineHeight:1},children:"▶"}),variant:"ghost",size:"small",label:c,onClick:l,disabled:n||o||!e||!i,className:"transition-opacity",style:{color:ie.textSecondary}})},Q8=({plan:e,disabled:t})=>{const n=O(l=>l.launchPlanAudit),r=O(sr),[i,s]=_.useState(!1),o=async()=>{if(e.id){s(!0);try{await n(e.id,E8(e))}catch(l){alert(l.message)}finally{s(!1)}}},a=e.id?r?void 0:"No agent CLI found — set up in Settings":"Plan needs an ID before an agent can run";return f.jsx($e,{content:a,children:f.jsx(re,{variant:"ghost",size:"small",onClick:o,disabled:t||i||!e.id||!r,children:"Audit"})})},rg=({idea:e,compact:t})=>{const n=O(h=>h.launchIdeaExtend),r=O(sr),{state:i,errorMessage:s,run:o}=T_(),{toast:a}=pt(),l=e.id,c=()=>{l&&o(async()=>{const h=O.getState().ideaEntries.find(p=>p.id===l);if(!h)throw new Error(`Idea ${l} not found`);try{await n(l,I8(h))}catch(p){throw a({title:"Extension failed",description:Xr(p.message),variant:"error"}),p}})},u=i==="loading"?"Extending…":i==="success"?t?"Sent!":"Extension sent!":i==="error"?"Extension failed":t?"Extend":"Extend with AI",d=i==="error"?s??"Extension failed":l?r?void 0:"No agent CLI found — set up in Settings":"Idea needs an ID before an agent can run";return f.jsx($e,{content:d,children:f.jsx(re,{variant:"ghost",size:"small",onClick:c,disabled:i==="loading"||!l||!r,style:{color:i==="error"?ie.accentRoseDark:void 0},children:u})})},X8=({plan:e,disabled:t})=>{const n=O(u=>u.launchFixReview),r=O(sr),i=O(kA),[s,o]=_.useState(!1),a=async()=>{if(e.id){o(!0);try{await n(e.id)}catch(u){alert(u.message)}finally{o(!1)}}},l=t||s||!e.id||!r||!i,c=e.id?i?r?void 0:"No agent CLI found — set up in Settings":"GitHub CLI needs authentication — set up in Settings":"Plan needs an ID before an agent can run";return f.jsx($e,{content:c,children:f.jsx(qc,{size:"small",icon:f.jsx("span",{style:{color:ie.accentAmberDark},children:"⚑"}),onClick:a,disabled:l,style:l?{opacity:.5}:void 0,children:s?"Starting…":"Fix review comments"})})},J8=()=>{const e=O(i=>i.loadIdeas),[t,n]=_.useState(!1),r=async i=>{await cA(i),await e(),n(!1)};return f.jsxs(f.Fragment,{children:[f.jsx(Ft,{icon:f.jsx(g4,{size:16}),variant:"ghost",size:"small",label:"New idea",onClick:()=>n(!0)}),f.jsx(F8,{open:t,onClose:()=>n(!1),onAdd:r})]})};async function Z8(e){var r;if((r=navigator.clipboard)!=null&&r.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}return document.body.removeChild(t),n}const eW=({planTitle:e,planId:t,phaseIndex:n})=>{const[r,i]=_.useState("idle"),s=async o=>{o.stopPropagation();const a=`Start phase ${n+1} of plan "${e}" in papercamp/ideas/${t??"<ID>"}.md`,l=await Z8(a);i(l?"copied":"failed"),setTimeout(()=>i("idle"),1500)};return f.jsx(Ft,{icon:r==="copied"?f.jsx(y4,{size:16}):r==="failed"?f.jsx(ja,{size:16}):f.jsx(x4,{size:16}),variant:"ghost",size:"small",label:r==="copied"?"Copied":r==="failed"?"Copy failed — select and copy manually":"Copy phase prompt",onClick:s,className:"transition-opacity",style:{color:r==="copied"?"#6A9B72":r==="failed"?"#A06060":ie.textSecondary}})},tW=({plan:e,disabled:t})=>{const n=O(l=>l.launchPlanReconcile),r=O(sr),[i,s]=_.useState(!1),o=async()=>{if(e.id){s(!0);try{await n(e.id,T8(e),{body:e.body,phases:e.phases})}catch(l){alert(l.message)}finally{s(!1)}}},a=e.id?r?void 0:"No agent CLI found — set up in Settings":"Plan needs an ID before an agent can run";return f.jsx($e,{content:a,children:f.jsx(re,{variant:"ghost",size:"small",onClick:o,disabled:t||i||!e.id||!r,children:"Refresh"})})},A_=()=>{const e=O(i=>i.refreshAll),t=O(i=>i.refreshing),{toast:n}=pt(),r=async()=>{if(t)return;const i=await e();i.ok?n({title:"Up to date",description:"Plans, ideas, checks and PR review state re-read.",variant:"success"}):n({title:"Couldn't refresh",description:i.error??"The read failed — is the dev server running?",variant:"error"})};return f.jsx(Ft,{icon:f.jsx("span",{style:{display:"inline-flex"},className:t?"pc-spin":void 0,children:f.jsx(e8,{size:16})}),label:t?"Refreshing…":"Refresh data",size:"small",variant:"ghost",disabled:t,onClick:r})},nW=({plan:e,disabled:t})=>{const n=O(c=>c.launchRunAll),r=O(sr),[i,s]=_.useState(!1),o=async()=>{if(e.id){s(!0);try{await n(e.id)}catch(c){alert(c.message)}finally{s(!1)}}},a=t||i||!e.id||!r,l=e.id?r?void 0:"No agent CLI found — set up in Settings":"Plan needs an ID before an agent can run";return f.jsx($e,{content:l,children:f.jsx(qc,{size:"small",icon:f.jsx("span",{style:{color:ie.textSecondary},children:"▶"}),onClick:o,disabled:a,style:a?{opacity:.5}:void 0,children:i?"Starting…":"Run all phases"})})},rW=()=>{const e=O(c=>c.launchSuggestIdeas),t=O(c=>c.ideaEntries),n=O(c=>c.suggestions),r=O(ym),i=O(sr),{toast:s}=pt(),[o,a]=_.useState(!1),l=async()=>{a(!0);try{await e(L8(t,n))}catch(c){s({title:"Failed to launch",description:Xr(c.message),variant:"error"})}finally{a(!1)}};return f.jsx($e,{content:i?void 0:"No agent CLI found — set up in Settings",children:f.jsx(re,{variant:"ghost",size:"small",onClick:l,disabled:r||o||!i,style:{color:ie.textSecondary},children:"Suggest ideas"})})};function iW(e){const t=e==null?void 0:e.match(/^[a-z]+\/([a-z]+-\d+)-/);return t?t[1].toUpperCase():null}const ig={fontFamily:De.serif,fontSize:te.sm,fontWeight:600,opacity:.65},sW=({plan:e,auditRunning:t,agentBusy:n,agentPhaseIndex:r,planTask:i,updating:s,onTogglePhase:o,onAddReviewPhases:a})=>f.jsxs("div",{style:{marginBottom:A[8]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:A[3],marginBottom:A[3]},children:[f.jsx("h3",{style:{...ig,margin:0},children:"Phases"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2]},children:[t&&f.jsx(Qc,{size:"small",label:"Audit running…"}),(e.status==="review"||e.status==="done")&&f.jsx(Q8,{plan:e}),e.status!=="done"&&f.jsx(tW,{plan:e}),f.jsx(U8,{onAdd:a,disabled:s})]})]}),f.jsx(r$,{data:e.phases,columns:[{key:"checkbox",header:"Status",cell:(l,c)=>f.jsx(VB,{checked:l.done,onChange:()=>o(c),disabled:s}),width:2},{key:"title",header:"Title",cell:l=>f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:A[2],textDecoration:l.done?"line-through":"none",opacity:l.done?.45:1},children:[l.text,l.source==="review"&&f.jsx(He,{size:"small",fillColor:nr.review.fill,textColor:nr.review.text,children:"review"})]})},{key:"actions",header:"Actions",cell:(l,c)=>f.jsxs("div",{style:{display:"flex",gap:A[2],alignItems:"center"},children:[f.jsx(eW,{planTitle:e.title,planId:e.id,phaseIndex:c}),!l.done&&r===c?f.jsx(Qc,{size:"small",label:`Agent ${i==null?void 0:i.status}…`}):!l.done&&f.jsx(q8,{planId:e.id,phaseIndex:c,disabled:n})]}),width:5}],expandable:{render:l=>l.description??null},showExpandColumn:!1,rowClassName:l=>l.source==="review"?"phase-row-review":void 0})]}),oW=({log:e,updating:t,onAdd:n})=>{const[r,i]=_.useState(""),s=async()=>{r.trim()&&await n(r.trim())&&i("")};return f.jsxs("div",{style:{marginBottom:A[8]},children:[f.jsx("h3",{style:{...ig,margin:`0 0 ${A[3]}`},children:"Comments"}),f.jsxs(Re,{size:"small",children:[e&&e.length>0&&f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[3],marginBottom:A[4]},children:e.map((o,a)=>f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[f.jsx("span",{className:"text-sm",style:{fontWeight:600,opacity:.5},children:o.date}),f.jsx("div",{className:"text-sm",style:{background:"rgba(0,0,0,0.05)",borderRadius:A[2],padding:`${A[2]} ${A[3]}`,alignSelf:"flex-start",maxWidth:"100%",opacity:.85},children:o.text})]},`${o.date}-${a}`))}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[2]},children:[f.jsx(Ia,{value:r,onChange:o=>i(o.target.value),placeholder:"Add a comment…",rows:2}),f.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:f.jsx(re,{variant:"secondary",size:"small",onClick:s,disabled:t||!r.trim(),children:"Send"})})]})]})]})},aW=({plan:e})=>{const t=O(P=>P.plans),n=O(P=>P.gitBranch),r=O(P=>P.loadGitStatus),{toast:i}=pt(),{patch:s,updating:o}=Ra(),[a,l]=_.useState(!1),c=O(P=>P.agentStatus),u=O(ym),d=ak(e.id,c),h=d?d.phaseIndex:null,p=(d==null?void 0:d.taskKind)==="audit",m=hm(e),x=e.phases.length>0,w={id:e.id??null,title:e.title,body:e.body,log:e.log},g=((t==null?void 0:t.entries)??[]).filter(P=>P.id!==e.id),y=e.id!==void 0&&iW(n)===e.id,v=e.status==="planned"||e.status==="in-progress"||e.status==="review",b=async()=>{if(e.id){l(!0);try{const P=await yA(e.id);i({title:"Branch ready",description:`Now on ${P}`,variant:"success"}),await r()}catch(P){i({title:"Branch failed",description:Xr(P.message),variant:"error"})}finally{l(!1)}}},k=async P=>{const T=e.phases.map((R,L)=>L===P?{...R,done:!R.done}:R);T.every(R=>R.done)&&e.status==="in-progress"?await s(e.title,{phases:T,status:"review"}):await s(e.title,{phases:T})},S=async P=>{await s(e.title,{phases:[...e.phases,...P]})},E=async P=>{const j={date:new Date().toISOString().slice(0,10),text:P.replace(/\n/g," ")};return s(e.title,{log:[...e.log??[],j]})};return f.jsxs("div",{children:[f.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:A[3],margin:`0 0 ${A[3]}`},children:[f.jsxs("h2",{style:{...L_,margin:0,display:"flex",alignItems:"center",gap:A[3],minWidth:0},children:[f.jsx(Jr,{id:e.id}),e.title]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2],flexShrink:0},children:[f.jsx("span",{className:"text-sm",style:{opacity:.45,whiteSpace:"nowrap"},children:e.updated?`updated ${Lc(e.updated)}`:`created ${Lc(e.created)}`}),f.jsx(A_,{})]})]}),(v||e.pr)&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],flexWrap:"wrap",marginBottom:A[4]},children:[v&&!y&&f.jsx(Re,{size:"small",accent:!0,accentColor:"amber",children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],flexWrap:"wrap"},children:[f.jsxs("span",{className:"text-sm",children:["Working branch: ",f.jsx("code",{children:n??"unknown"})," — not this plan's branch."]}),e.id&&f.jsx($e,{content:`Creates ${(e.kind??"feat").toLowerCase()}/${e.id.toLowerCase()}-… from main, or switches to it if it already exists`,children:f.jsx(re,{variant:"secondary",size:"small",onClick:b,disabled:a,children:a?"Switching…":"Create branch"})})]})}),v&&y&&f.jsxs("span",{className:"text-sm",style:{opacity:.45},children:["Working branch: ",f.jsx("code",{children:n})]}),e.pr&&f.jsx(z8,{pr:e.pr}),e.pr&&f.jsx(O8,{pr:e.pr})]}),m!==null&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],marginBottom:A[4]},children:[f.jsx("div",{style:{flex:1},children:f.jsx(M_,{pct:m.pct,color:I_[pm(e,c)]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[m.done,"/",m.total]})]}),e.body&&f.jsx("div",{style:{marginBottom:A[4],opacity:.85},children:f.jsx(A8,{resetKey:e.id??e.title,children:f.jsx(ok,{children:e.body})})}),e.clarifications&&e.clarifications.length>0&&f.jsxs("div",{style:{marginBottom:A[5]},children:[f.jsx("h3",{style:{...ig,margin:`0 0 ${A[3]}`},children:"Clarifications"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[2],marginBottom:A[3]},children:e.clarifications.map((P,T)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:A[2]},children:P.date}),P.text]},`clar-${P.date}-${T}`))})]}),!x&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],marginBottom:A[8]},children:[f.jsx(Au,{idea:w,otherPlans:g}),f.jsx(rg,{idea:w})]}),x&&f.jsx(sW,{plan:e,auditRunning:p,agentBusy:u,agentPhaseIndex:h,planTask:d,updating:o,onTogglePhase:k,onAddReviewPhases:S}),f.jsx(oW,{log:e.log,updating:o,onAdd:E})]})},xo={fontSize:te.sm,fontWeight:600,opacity:.6,whiteSpace:"nowrap",overflow:"hidden"},sg=36,og=({order:e,done:t})=>f.jsx("span",{style:{flex:`0 0 ${sg}px`,display:"flex",alignItems:"center",justifyContent:"center"},children:t?f.jsx("span",{"aria-label":"Done",style:{color:ie.accentGreenDark,fontSize:te.sm},children:"✓"}):e!==void 0?f.jsx(He,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:f.jsx("span",{style:{fontFamily:De.handwritten,fontSize:te.xs,lineHeight:1},children:e})}):null}),D_=({plans:e,activePlanTitle:t,onOpen:n,showHeader:r=!0})=>{const i="plan-rows-grid",s=O(o=>o.agentStatus);return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[r&&f.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[f.jsx("span",{style:{flex:`0 0 ${sg}px`}}),f.jsx("div",{style:{flex:1,minWidth:0},children:f.jsx(Re,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:i,children:[f.jsx("span",{style:xo,children:"Id"}),f.jsx("span",{style:xo,children:"Title"}),f.jsx("span",{className:"plan-rows-cell-updated",style:xo,children:"Updated"}),f.jsx("span",{style:xo,children:"Progress"}),f.jsx("span",{style:xo,children:"Status"})]})})})]}),e.map(o=>{var c;const a=hm(o),l=pm(o,s);return f.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[f.jsx(og,{order:o.order,done:o.status==="done"}),f.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onClick:n?()=>n(o.title):void 0,onKeyDown:n?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),n(o.title))}:void 0,className:o.title===t?"plan-row-highlighted":void 0,style:{cursor:n?"pointer":void 0,borderRadius:10,flex:1,minWidth:0},children:f.jsx(Re,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{className:i,children:[f.jsx(Jr,{id:o.id}),f.jsx("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.title}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45,whiteSpace:"nowrap"},children:o.updated?Lc(o.updated):Lc(o.created)}),a?f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[1]},children:[f.jsx("div",{style:{flex:1,minWidth:0},children:f.jsx(M_,{pct:a.pct,color:I_[l]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[a.done,"/",a.total]})]}):f.jsx("span",{className:"text-sm",style:{opacity:.3},children:"—"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[1]},children:[f.jsx(He,{size:"small",fillColor:nr[l].fill,textColor:nr[l].text,children:ng[l]}),((c=o.pr)==null?void 0:c.state)==="merged"&&f.jsx($e,{content:`Merged in #${o.pr.number}`,children:f.jsx("span",{style:{display:"inline-flex",color:Qh.merged.text},children:f.jsx(eg,{size:14})})})]})]})})})]},o.title)})]})},lW=5,cW={fontSize:te.sm,fontWeight:600,opacity:.6,whiteSpace:"nowrap",overflow:"hidden"},uW={fontFamily:De.handwritten,fontSize:te.xs,fontWeight:600,opacity:.55,lineHeight:1,padding:`${A[2]} ${A[1]} 0`},Rv={...cW,background:"none",border:"none",padding:0,cursor:"pointer",font:"inherit",color:"inherit",textAlign:"left"},dW=[{key:"id",label:"Id"},{key:"title",label:"Title"},{key:"updated",label:"Updated"},{key:"progress",label:"Progress"},{key:"status",label:"Status"}],N_={display:"flex",alignItems:"center",gap:A[2],minWidth:0,background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left",font:"inherit",color:"inherit",fontWeight:600},z_={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},fW=({rows:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i})=>{const[s,o]=_.useState(new Set),{subjects:a,loading:l}=C_(),c="plan-rows-grid",u=O(v=>v.planFilters.sortKey),d=O(v=>v.planFilters.sortDirection),h=O(v=>v.setPlanSortKey),p=O(v=>v.togglePlanSortDirection),m=v=>{v===u?p():h(v)},x=v=>{o(b=>{const k=new Set(b);return k.has(v)?k.delete(v):k.add(v),k})},w=v=>v.type==="plan"?f.jsx(D_,{plans:[v.plan],activePlanTitle:n,onOpen:r,showHeader:!1},v.plan.title):v.type==="note"?f.jsx(hW,{row:v,onOpen:i},v.idea.title):f.jsx(pW,{row:v,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,expanded:s.has(v.idea.title),onToggleExpanded:()=>x(v.idea.title)},v.idea.title),g=bL(e,l?void 0:a),y=g.length>1;return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[f.jsx("span",{role:"columnheader",style:{flex:`0 0 ${sg}px`,display:"flex",justifyContent:"center"},"aria-sort":u==="order"?d==="asc"?"ascending":"descending":void 0,children:f.jsxs("button",{type:"button",style:Rv,"aria-label":"Sort by run order",onClick:()=>m("order"),children:["#",u==="order"&&(d==="asc"?"▲":"▼")]})}),f.jsx("div",{style:{flex:1,minWidth:0},children:f.jsx(Re,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsx("div",{className:c,children:dW.map(({key:v,label:b})=>{const k=v===u;return f.jsx("span",{role:"columnheader",className:v==="updated"?"plan-rows-cell-updated":void 0,"aria-sort":k?d==="asc"?"ascending":"descending":void 0,children:f.jsxs("button",{type:"button",style:Rv,onClick:()=>m(v),children:[b,k&&(d==="asc"?" ▲":" ▼")]})},v)})})})})]}),y?g.map(v=>f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[f.jsx("div",{style:uW,children:v.subject??"No subject"}),v.rows.map(b=>w(b))]},v.subject??"__no-subject__")):e.map(v=>w(v))]})},hW=({row:e,onOpen:t})=>{const n=e.idea,r=n.status??"open";return f.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[f.jsx(og,{order:n.order,done:r==="done"}),f.jsx("div",{role:t?"button":void 0,tabIndex:t?0:void 0,onClick:t?()=>t(n.title):void 0,onKeyDown:t?i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),t(n.title))}:void 0,style:{cursor:t?"pointer":void 0,borderRadius:10,flex:1,minWidth:0},children:f.jsx(Re,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{className:"plan-rows-grid",children:[n.id?f.jsx(Jr,{id:n.id}):f.jsx("span",{}),f.jsxs("span",{style:{...N_,cursor:"inherit"},children:[f.jsx(i8,{}),f.jsx("span",{style:z_,children:n.title})]}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45},children:"—"}),f.jsx("span",{className:"text-sm",style:{opacity:.3},children:"—"}),f.jsx(He,{size:"small",fillColor:Xc[r].fill,textColor:Xc[r].text,children:R_[r]})]})})})]})},pW=({row:e,plans:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i,expanded:s,onToggleExpanded:o})=>{const a=e.idea,l=e.children,c=l.filter(p=>p.status==="done"),u=l.filter(p=>p.status!=="done"),d=l.length>lW,h=d&&!s?u:l;return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[f.jsx(og,{order:a.order,done:a.status==="done"}),f.jsx("div",{style:{flex:1,minWidth:0},children:f.jsx(Re,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{style:{display:"grid",gridTemplateColumns:"76px minmax(0, 1fr) 84px 1fr",gap:A[2],alignItems:"center"},children:[a.id?f.jsx(Jr,{id:a.id}):f.jsx("span",{}),f.jsxs("button",{type:"button",onClick:()=>i==null?void 0:i(a.title),style:N_,children:[f.jsx(S_,{}),f.jsx("span",{style:z_,children:a.title})]}),f.jsx("span",{className:"plan-rows-cell-updated text-sm",style:{opacity:.45},children:"—"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:A[2]},children:[f.jsx("span",{className:"text-sm",style:{opacity:l.length>0?.6:.3},children:l.length>0?`${c.length}/${l.length} plans done`:"—"}),f.jsx(rg,{idea:a,compact:!0}),f.jsx(Au,{idea:a,otherPlans:t})]})]})})})]}),l.length>0&&f.jsxs("div",{style:{marginLeft:A[5],paddingLeft:A[3],borderLeft:"2px solid rgba(0,0,0,0.08)",display:"flex",flexDirection:"column",gap:A[1]},children:[f.jsx(D_,{plans:h,activePlanTitle:n,onOpen:r,showHeader:!1}),d&&f.jsx("button",{type:"button",onClick:o,style:{alignSelf:"flex-start",background:"none",border:"none",padding:`${A[1]} 0`,opacity:.6,cursor:"pointer",textDecoration:"underline",fontSize:te.xs,font:"inherit"},children:s?"Show less":`+${c.length} done`})]})]})},mW=({plans:e,rows:t,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i})=>{const s=_.useRef(null);return _.useEffect(()=>{var a;if(!n)return;const o=(a=s.current)==null?void 0:a.querySelector(".plan-row-highlighted");o==null||o.scrollIntoView({behavior:"smooth",block:"center"})},[n]),f.jsx("div",{ref:s,children:t.length>0?f.jsx(fW,{rows:t,plans:e,activePlanTitle:n,onOpenPlan:r,onOpenIdea:i}):f.jsx("p",{style:{opacity:.5,padding:`${A[6]} 0`,textAlign:"center"},children:"No plans match your filters."})})},gW=({idea:e})=>f.jsxs("div",{style:{fontFamily:De.body,fontSize:te.base,lineHeight:Ic.relaxed,color:ie.textProse},children:[f.jsxs("h2",{style:{...L_,margin:`0 0 ${A[4]}`,display:"flex",alignItems:"center",gap:A[3]},children:[f.jsx(Jr,{id:e.id??void 0}),e.title,e.status&&f.jsx(He,{size:"small",fillColor:Xc[e.status].fill,textColor:Xc[e.status].text,children:R_[e.status]})]}),f.jsx(ok,{children:e.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^\s*-{3,}\s*(\n|$)/,"").trim()}),f.jsx("div",{style:{marginTop:A[6]},children:f.jsx(rg,{idea:e})})]}),uf="__no-subject__",Gi={fontFamily:De.handwritten,fontSize:te.xs,fontWeight:600,lineHeight:1,color:ie.textTertiary,margin:`0 0 ${A[2]}`},yW=()=>{const e=O(b=>b.plans),t=tg(),n=O(ym),r=O(b=>b.agentStatus),{patch:i,updating:s}=Ra(),{subjects:o}=C_(),a=t?e==null?void 0:e.entries.find(b=>b.title===t):null,[l,c]=_.useState("");if(_.useEffect(()=>{c((a==null?void 0:a.order)!==void 0?String(a==null?void 0:a.order):"")},[a==null?void 0:a.order]),!a)return null;const u=pm(a,r),d=a.status==="in-progress",h=a.status==="review",p=a.status==="dropped",m=a.phases.some(b=>!b.done),x=(a.status==="planned"||d)&&m,w=!!(a.pr&&(a.pr.state==="open"||a.pr.state==="draft")&&a.pr.unresolvedThreadCount),g=b=>i(a.title,b),y=d||h||a.status==="planned",v=async()=>{const b=l.trim(),k=Number(b);if(b===""||!Number.isInteger(k)||k<1){c(a.order!==void 0?String(a.order):"");return}k!==a.order&&await g({order:k})};return f.jsx("div",{style:{marginTop:`calc(-1 * ${A[5]})`},children:f.jsx(Re,{surface:"paper",texture:"speckle",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[5]},children:[f.jsx("h2",{style:{margin:0,fontFamily:De.serif,fontSize:te.base,color:ie.textPrimary},children:"Plan"}),f.jsxs("div",{children:[f.jsx("div",{style:Gi,children:"Status"}),f.jsx(He,{size:"small",fillColor:nr[u].fill,textColor:nr[u].text,children:ng[u]})]}),f.jsxs("div",{children:[f.jsx("div",{style:Gi,children:"Subject"}),f.jsx(Yh,{size:"small",value:a.subject&&o.includes(a.subject)?a.subject:uf,onChange:b=>g({subject:b===uf?null:b}),disabled:s,options:[{value:uf,label:"No subject"},...o.map(b=>({value:b,label:b}))]})]}),y&&f.jsxs("div",{children:[f.jsx("div",{style:Gi,children:"Order"}),f.jsx(Ea,{type:"number",size:"small","aria-label":"Run order",min:1,value:l,onChange:b=>c(b.target.value),onBlur:v,disabled:s})]}),f.jsxs("div",{children:[f.jsx("div",{style:Gi,children:"Agent"}),f.jsx(Yh,{size:"small",value:a.agent??"",onChange:b=>g({agent:b||null}),disabled:s,options:[{value:"",label:"Project default agent"},...mL.map(b=>({value:b,label:lk[b]}))]})]}),a.tags.length>0&&f.jsxs("div",{children:[f.jsx("div",{style:Gi,children:"Tags"}),f.jsx("div",{style:{display:"flex",alignItems:"center",gap:A[1],flexWrap:"wrap"},children:a.tags.map(b=>f.jsx(He,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:b},b))})]}),f.jsxs("div",{children:[f.jsx("div",{style:Gi,children:"Actions"}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:[x&&f.jsx(nW,{plan:a,disabled:n||s}),w&&f.jsx(X8,{plan:a,disabled:n||s}),h&&f.jsx(qc,{size:"small",icon:f.jsx("span",{style:{color:ie.accentGreenDark},children:"✓"}),onClick:()=>g({status:"done"}),disabled:s,style:s?{opacity:.5}:void 0,children:"Approve & close"}),f.jsx(qc,{size:"small",icon:f.jsx("span",{style:{color:p?ie.accentGreenDark:ie.accentRoseDark},children:p?"↺":"⊘"}),onClick:()=>g({status:p?null:"dropped"}),disabled:s,style:s?{opacity:.5}:void 0,children:p?"Reopen plan":"Mark dropped"})]})]})]})})})},Mv=8,xW=["in-progress","review","planned","idea","done","dropped"],vW={...ng,idea:"Backlog"},Lv={fontSize:te["2xs"],fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:ie.textTertiary,margin:`0 0 ${A[2]}`},wW=()=>{const e=O(v=>v.plans),t=tg(),n=O(v=>v.planFilters),r=O(v=>v.togglePlanStatus),i=O(v=>v.togglePlanTag),s=O(v=>v.setPlanSearch),o=O(v=>v.setSubjectFilter),a=Nn(),[l,c]=_.useState(!1);if(!e||t)return null;const{statusCounts:u,tagCounts:d}=Vl(e.entries,n),h=new Set(n.statuses),p=new Set(n.tags),x=[...new Set([...Object.keys(d),...n.tags])].sort((v,b)=>{const k=(d[b]??0)-(d[v]??0);return k!==0?k:v.localeCompare(b)}),w=l?x:x.slice(0,Mv),g=x.length-w.length,y={background:"none",border:"none",padding:0,cursor:"pointer",opacity:.7,textDecoration:"underline",fontSize:te["2xs"]};return f.jsx("div",{style:{marginTop:`calc(-1 * ${A[5]})`},children:f.jsx(Re,{surface:"paper",texture:"speckle",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[5]},children:[f.jsx("h2",{style:{margin:0,fontFamily:De.serif,fontSize:te.base,color:ie.textPrimary},children:"Filters"}),f.jsx(Ea,{type:"search",size:"small",placeholder:"Search plans…","aria-label":"Search plans",value:n.search,onChange:v=>s(v.target.value)}),n.subject!==null&&f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2]},"data-testid":"subject-filter-chip",children:[f.jsxs("span",{style:{fontSize:te["2xs"],opacity:.7},children:["Subject: ",n.subject]}),f.jsx("button",{type:"button",onClick:()=>{o(null),a({to:"/",search:{}})},style:y,children:"Clear"})]}),f.jsxs("div",{children:[f.jsx("div",{style:Lv,children:"Status"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:xW.map(v=>{const b=h.has(v);return f.jsxs("button",{type:"button",onClick:()=>r(v),"aria-pressed":b,style:{display:"flex",alignItems:"center",gap:A[2],width:"100%",padding:`${A[1]} ${A[2]}`,borderRadius:6,border:"none",cursor:"pointer",textAlign:"left",background:b?"rgba(0,0,0,0.05)":"transparent",opacity:b?1:.5},children:[f.jsx("span",{style:{width:9,height:9,borderRadius:"50%",flexShrink:0,background:nr[v].text}}),f.jsx("span",{style:{flex:1,fontSize:te.xs,color:ie.textPrimary},children:vW[v]}),f.jsx("span",{style:{fontSize:te["2xs"],color:ie.textSecondary},children:u[v]})]},v)})})]}),f.jsxs("div",{children:[f.jsx("div",{style:Lv,children:"Tags"}),f.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:A[1],alignItems:"center"},children:[x.length===0&&f.jsx("span",{style:{opacity:.5,fontSize:te["2xs"]},children:"No tags"}),w.map(v=>{const b=p.has(v);return f.jsxs("button",{type:"button",onClick:()=>i(v),"aria-pressed":b,style:{fontSize:te["2xs"],padding:`2px ${A[2]}`,borderRadius:6,border:"0.5px solid rgba(0,0,0,0.12)",cursor:"pointer",background:b?"rgba(0,0,0,0.08)":"transparent",opacity:b?1:.55},children:[v," ",d[v]??0]},v)}),g>0&&f.jsxs("button",{type:"button",onClick:()=>c(!0),style:y,children:["+",g," more"]}),l&&x.length>Mv&&f.jsx("button",{type:"button",onClick:()=>c(!1),style:y,children:"Show less"})]})]})]})})})},Av=()=>f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[3],marginBottom:A[6]},children:[f.jsx("h1",{className:"text-4xl",style:{flex:1,fontFamily:De.serif,fontWeight:600,color:ie.textPrimary,margin:0,lineHeight:1.1},children:"Ideas"}),f.jsx(A_,{}),f.jsx(J8,{}),f.jsx(Y8,{}),f.jsx(rW,{}),f.jsx(W8,{})]}),bW=[{key:"a",title:"72%"},{key:"b",title:"54%"},{key:"c",title:"83%"},{key:"d",title:"46%"},{key:"e",title:"66%"},{key:"f",title:"58%"}],kW=()=>f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},"aria-hidden":"true",children:[f.jsx(Re,{size:"small",texture:"kraft",className:"plan-row-card",children:f.jsxs("div",{className:"plan-rows-grid",children:[f.jsx(Gt,{variant:"text",width:36}),f.jsx(Gt,{variant:"text",width:28}),f.jsx(Gt,{variant:"text",width:44}),f.jsx("span",{className:"plan-rows-cell-updated",children:f.jsx(Gt,{variant:"text",width:56})}),f.jsx(Gt,{variant:"text",width:64}),f.jsx(Gt,{variant:"text",width:48})]})}),bW.map(e=>f.jsx(Re,{size:"small",className:"plan-row-card",children:f.jsxs("div",{className:"plan-rows-grid",children:[f.jsx(Gt,{variant:"text",width:16}),f.jsx(Gt,{variant:"rect",width:44,height:18}),f.jsx(Gt,{variant:"text",width:e.title}),f.jsx("span",{className:"plan-rows-cell-updated",children:f.jsx(Gt,{variant:"text",width:52})}),f.jsx(Gt,{variant:"rect",width:80,height:8}),f.jsx(Gt,{variant:"rect",width:64,height:20})]})},e.key))]}),SW=()=>{const e=O(l=>l.reconcileQueue),t=O(l=>l.removeFromReconcileQueue),n=O(l=>l.plans),{patch:r}=Ra(),i=e[0]??null,s=i?(n==null?void 0:n.entries.find(l=>l.id===i.planId))??null:null;if(_.useEffect(()=>{i&&!s&&t(i.planId)},[i,s,t]),!i||!s)return null;const o=()=>{t(i.planId)},a=async()=>{await r(s.title,{body:i.before.body,phases:i.before.phases},{errorTitle:"Discard failed"})&&t(i.planId)};return f.jsx($8,{plan:s,before:i.before,onApprove:o,onDiscard:a,queuePosition:{index:1,total:e.length}})},_W=({suggestions:e,onOpen:t,onDismiss:n})=>e.length===0?null:f.jsxs("div",{style:{marginTop:A[5]},children:[f.jsx("h2",{className:"text-sm",style:{margin:`0 0 ${A[2]}`,opacity:.6},children:"Suggested from AI"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:A[1]},children:e.map(r=>f.jsx("div",{style:{borderRadius:10},children:f.jsx(Re,{size:"small",texture:"canvas",className:"plan-row-card",children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:A[2]},children:[f.jsxs("button",{type:"button",onClick:()=>t(r),style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:A[2],background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left",font:"inherit",color:"inherit"},children:[f.jsx(S_,{}),f.jsx("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.title})]}),f.jsx(Ft,{icon:f.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Dismiss",style:{width:28,height:28},onClick:()=>n(r)})]})})},`${r.date}-${r.title}`))})]}),ag=()=>{const e=O(k=>k.plans),t=O(k=>k.plansError),n=O(k=>k.ideaEntries),r=O(k=>k.suggestions);O(k=>k.loadPlans);const i=O(k=>k.planFilters),s=O(k=>k.setSubjectFilter),o=tg(),a=b8(),l=O(k=>k.dismissSuggestion),c=Nn(),{toast:u}=pt(),{subject:d}=Xp({strict:!1});_.useEffect(()=>{s(d??null)},[d,s]);const h=()=>{c({to:"/"})},p=k=>{c({to:"/plans/$planId",params:{planId:encodeURIComponent(k)}})},m=k=>{c({to:"/ideas/$ideaId",params:{ideaId:encodeURIComponent(k)}})},[x,w]=_.useState(null),g=async k=>{try{await l(k)}catch(S){u({title:"Failed to dismiss suggestion",description:S.message,variant:"error"})}},y=o?e==null?void 0:e.entries.find(k=>k.title===o):null,v=a?n.find(k=>k.title===a):null;if(t)return f.jsxs("div",{children:[f.jsx(j8,{children:"Ideas"}),f.jsxs(Re,{size:"small",accent:!0,accentColor:"rose",children:[f.jsx("p",{style:{margin:0,fontWeight:600},children:"Couldn't load plans.md"}),f.jsx("p",{style:{margin:0,opacity:.75},children:t})]})]});if(!e)return f.jsxs("div",{children:[f.jsx(Av,{}),f.jsx("output",{"aria-live":"polite",className:"sr-only",children:"Loading plans…"}),f.jsx(kW,{})]});const{rows:b}=kL(e.entries,n,i);return f.jsxs(f.Fragment,{children:[f.jsx(SW,{}),y?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:A[4]},children:f.jsx(bv,{items:[{id:"plans",label:"Ideas",onClick:h},{id:"plan",label:y.title}]})}),f.jsx(aW,{plan:y})]}):v?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:A[4]},children:f.jsx(bv,{items:[{id:"plans",label:"Ideas",onClick:h},{id:"idea",label:v.title}]})}),f.jsx(gW,{idea:v})]}):f.jsxs("div",{children:[f.jsx(Av,{}),e.warnings.length>0&&f.jsxs(Re,{size:"small",accent:!0,accentColor:"amber",children:[f.jsx("p",{style:{margin:0,fontWeight:600},children:"Some entries couldn't be parsed"}),f.jsx("ul",{style:{margin:0,paddingLeft:A[5]},children:e.warnings.map(k=>f.jsxs("li",{children:[k.title,": ",k.message]},k.title))})]}),e.entries.length===0?f.jsxs("p",{style:{opacity:.5},children:["No plans yet. Run ",f.jsx("code",{children:'paper-camp add plan "name"'}),", or add one to the backlog above."]}):f.jsx(mW,{plans:e.entries,rows:b,activePlanTitle:o,onOpenPlan:p,onOpenIdea:m}),f.jsx(V8,{}),f.jsx(_W,{suggestions:r,onOpen:w,onDismiss:g}),f.jsx(B8,{suggestion:x,onClose:()=>w(null)})]})]})},O_=_.lazy(()=>Os(()=>import("./index-BnXxehKU.js"),__vite__mapDeps([0,1])).then(e=>({default:e.DocsPage}))),CW=_.lazy(()=>Os(()=>import("./index-BnXxehKU.js"),__vite__mapDeps([0,1])).then(e=>({default:e.DocsSidebar}))),F_=_.lazy(()=>Os(()=>import("./index-DrNAzLuW.js"),__vite__mapDeps([2,1])).then(e=>({default:e.SettingsPage}))),PW=_.lazy(()=>Os(()=>import("./index-DrNAzLuW.js"),__vite__mapDeps([2,1])).then(e=>({default:e.SettingsSidebar}))),jW=_.lazy(()=>Os(()=>import("./index-C2kYil0S.js"),[]).then(e=>({default:e.TasksPage}))),EW=_.lazy(()=>Os(()=>import("./index-CRRHTP77.js"),[]).then(e=>({default:e.RoadmapPage}))),Dv=[{id:"plans",label:"Ideas",path:"/"},{id:"roadmap",label:"Roadmap",path:"/roadmap"},{id:"docs",label:"Docs",path:"/docs"},{id:"tasks",label:"Tasks",path:"/tasks"},{id:"settings",label:"Settings",path:"/settings"}],B_="stack-open";function TW(){try{return localStorage.getItem(B_)==="true"}catch{return!1}}function IW(e){try{localStorage.setItem(B_,String(e))}catch{}}const RW="(min-width: 1440px)",ii=32;function MW(e){const[t,n]=_.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return _.useEffect(()=>{const r=window.matchMedia(e),i=s=>n(s.matches);return n(r.matches),r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[e]),t}const LW=()=>{var v;const e=Nn(),t=vT({select:b=>b.location.pathname}),n=O(b=>b.loadPlans),r=O(b=>b.loadIdeas),i=O(b=>b.loadSuggestions),s=O(b=>b.loadCapabilities),o=t==="/"||t.startsWith("/plans/")||t.startsWith("/ideas/"),a=t==="/docs"||t.startsWith("/docs/"),l=t==="/settings"||t.startsWith("/settings/"),c=o?"plans":a?"docs":l?"settings":(v=Dv.find(b=>b.path===t))==null?void 0:v.id,u=o||a||l,d=o?"plans":a?"docs":"settings",[h,p]=_.useState(TW),[m,x]=_.useState(!1),w=Tu(),g=MW(RW),y=_.useRef(!1);return _.useEffect(()=>{n(),r(),i(),s()},[n,r,i,s]),_.useEffect(()=>{y.current||t!=="/"||(y.current=!0,Promise.all([hk(),fk()]).then(([b,k])=>{b!=null&&b.setupDismissed||k===null||k.every(S=>S.status==="ok")||e({to:"/settings/$section",params:{section:"setup"}})}))},[t,e]),_.useEffect(()=>{x(!1)},[t]),f.jsxs(D6,{position:"bottom-left",children:[f.jsxs("div",{className:"h-screen box-border min-[1440px]:pr-[480px] flex flex-col",children:[f.jsx(P8,{}),f.jsx(TB,{style:{flex:"1 1 0%",minHeight:0,height:"auto"},background:{texture:"speckle",ruledType:"grid",ruledColor:"blue"},showHeader:!0,headerTexture:"parchment",showSidebar:!1,showPage:!1,bleedBottom:!0,headerActions:f.jsxs(f.Fragment,{children:[u&&f.jsx(Ft,{variant:"ghost",size:"small",className:"lg:hidden",label:"Open sidebar",onClick:()=>x(!0),icon:f.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:f.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",strokeLinecap:"round"})})}),f.jsx(_8,{size:"sm"}),f.jsx("div",{className:"flex-1"}),f.jsx("nav",{"aria-label":"Main navigation",className:"flex items-center gap-1",children:Dv.map(b=>f.jsx(re,{variant:"ghost",size:"small",isActive:b.id===c,onClick:()=>e({to:b.path}),"aria-current":b.id===c?"page":void 0,children:b.label},b.id))})]}),children:f.jsx("div",{className:"flex flex-col h-full min-h-0",children:f.jsx("div",{className:"flex flex-1 min-h-0 justify-center items-start box-border overflow-y-auto",style:{marginTop:-ii,marginLeft:-ii,marginRight:-ii,paddingTop:ii,paddingBottom:ii,paddingLeft:ii,paddingRight:ii},children:f.jsxs("div",{className:"flex min-w-0 justify-center lg:[--pc-sidebar-h:calc(100vh-160px)]",style:{gap:Zl.contentGap,width:"100%"},children:[u&&f.jsxs(C8,{routeKey:d,mobileOpen:m,onMobileClose:()=>x(!1),children:[o&&f.jsxs(f.Fragment,{children:[f.jsx(wW,{}),f.jsx(yW,{})]}),a&&f.jsx(_.Suspense,{fallback:null,children:f.jsx(CW,{})}),l&&f.jsx(_.Suspense,{fallback:null,children:f.jsx(PW,{})})]}),f.jsx("div",{className:"flex flex-col min-w-0",style:{flex:g?"1 1 0%":"0 1 800px"},children:f.jsx(Ms.div,{...E_(w),transition:j_(w),style:{display:"flex",flexDirection:"column",flex:1,minWidth:0},children:f.jsx(g_,{texture:{texture:"parchment"},outline:!0,style:{minHeight:"calc(100vh - 160px)",width:"100%",...g?{maxWidth:"none"}:{}},children:f.jsx(_.Suspense,{fallback:null,children:f.jsx(kb,{})})})},t)})]})})})})]}),f.jsx(g8,{open:h,pinned:g,onToggle:()=>{const b=!h;IW(b),p(b)}})]})},On=iT({component:LW}),AW=ir({getParentRoute:()=>On,path:"/",component:ag,validateSearch:e=>({subject:typeof e.subject=="string"?e.subject:void 0})}),DW=ir({getParentRoute:()=>On,path:"/plans/$planId",component:ag}),NW=ir({getParentRoute:()=>On,path:"/ideas/$ideaId",component:ag}),zW=ir({getParentRoute:()=>On,path:"/docs",component:O_}),OW=ir({getParentRoute:()=>On,path:"/docs/$section",component:O_}),FW=ir({getParentRoute:()=>On,path:"/settings",component:F_}),BW=ir({getParentRoute:()=>On,path:"/settings/$section",component:F_}),$W=ir({getParentRoute:()=>On,path:"/roadmap",component:EW}),VW=ir({getParentRoute:()=>On,path:"/tasks",component:jW,validateSearch:e=>({taskId:typeof e.taskId=="string"?e.taskId:void 0})}),WW=On.addChildren([AW,DW,NW,zW,OW,FW,BW,VW,$W]),UW=mT({routeTree:WW}),$_=document.getElementById("root");if(!$_)throw new Error("#root element not found");Yw($_).render(f.jsx(_.StrictMode,{children:f.jsx(xT,{router:UW})}));export{lk as A,mL as B,Xp as C,GW as D,YW as E,eU as F,Xr as G,qW as H,Ta as J,w4 as K,ok as M,He as O,j8 as P,Ea as X,Yh as Y,re as Z,Nn as a,te as b,ie as c,L_ as d,ZW as e,De as f,pt as g,bv as h,fk as i,f as j,hk as k,Ic as l,v_ as m,wv as n,qc as o,Re as p,RL as q,_ as r,A as s,C_ as t,O as u,Ft as v,JW as w,x8 as x,KW as y,HW as z};
233
- //# sourceMappingURL=main-CyxblUnu.js.map