@dendelion/paper-camp 0.3.0 → 0.5.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 (42) hide show
  1. package/README.md +6 -0
  2. package/dist/app/assets/main-BN5y2u1i.js +216 -0
  3. package/dist/app/assets/main-BN5y2u1i.js.map +1 -0
  4. package/dist/app/assets/main-DvILXiwx.css +1 -0
  5. package/dist/app/index.html +2 -2
  6. package/dist/chunks/{serializer.DL7H4ZTd.js → serializer._5uZJ4OM.js} +966 -826
  7. package/dist/chunks/serializer._5uZJ4OM.js.map +1 -0
  8. package/dist/cli/index.js +17756 -1629
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/core/content-hash.d.ts +14 -0
  11. package/dist/core/content-hash.d.ts.map +1 -0
  12. package/dist/core/content-hash.test.d.ts +2 -0
  13. package/dist/core/content-hash.test.d.ts.map +1 -0
  14. package/dist/core/idea-status.d.ts.map +1 -1
  15. package/dist/core/idea-status.test.d.ts +2 -0
  16. package/dist/core/idea-status.test.d.ts.map +1 -0
  17. package/dist/core/index.d.ts +1 -0
  18. package/dist/core/index.d.ts.map +1 -1
  19. package/dist/core/index.js +22 -21
  20. package/dist/core/parser.d.ts +1 -25
  21. package/dist/core/parser.d.ts.map +1 -1
  22. package/dist/core/readers.d.ts +27 -0
  23. package/dist/core/readers.d.ts.map +1 -0
  24. package/dist/core/readers.test.d.ts +2 -0
  25. package/dist/core/readers.test.d.ts.map +1 -0
  26. package/dist/core/scaffold.d.ts.map +1 -1
  27. package/dist/core/scaffold.test.d.ts +2 -0
  28. package/dist/core/scaffold.test.d.ts.map +1 -0
  29. package/dist/core/schemas.d.ts +5 -0
  30. package/dist/core/schemas.d.ts.map +1 -1
  31. package/dist/core/serializer.d.ts +9 -0
  32. package/dist/core/serializer.d.ts.map +1 -1
  33. package/dist/core/templates.d.ts +9 -0
  34. package/dist/core/templates.d.ts.map +1 -0
  35. package/dist/types/index.d.ts +7 -2
  36. package/dist/types/index.d.ts.map +1 -1
  37. package/dist/types/index.js.map +1 -1
  38. package/package.json +11 -4
  39. package/dist/app/assets/main-8b5RQGnS.js +0 -208
  40. package/dist/app/assets/main-8b5RQGnS.js.map +0 -1
  41. package/dist/app/assets/main-B61tEYvn.css +0 -1
  42. package/dist/chunks/serializer.DL7H4ZTd.js.map +0 -1
@@ -0,0 +1,216 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))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 Wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ev={exports:{}},$u={},tv={exports:{}},oe={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var fa=Symbol.for("react.element"),WS=Symbol.for("react.portal"),HS=Symbol.for("react.fragment"),KS=Symbol.for("react.strict_mode"),GS=Symbol.for("react.profiler"),QS=Symbol.for("react.provider"),YS=Symbol.for("react.context"),qS=Symbol.for("react.forward_ref"),XS=Symbol.for("react.suspense"),ZS=Symbol.for("react.memo"),JS=Symbol.for("react.lazy"),Bm=Symbol.iterator;function e_(e){return e===null||typeof e!="object"?null:(e=Bm&&e[Bm]||e["@@iterator"],typeof e=="function"?e:null)}var nv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rv=Object.assign,iv={};function Ns(e,t,n){this.props=e,this.context=t,this.refs=iv,this.updater=n||nv}Ns.prototype.isReactComponent={};Ns.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")};Ns.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sv(){}sv.prototype=Ns.prototype;function Lh(e,t,n){this.props=e,this.context=t,this.refs=iv,this.updater=n||nv}var Ih=Lh.prototype=new sv;Ih.constructor=Lh;rv(Ih,Ns.prototype);Ih.isPureReactComponent=!0;var Fm=Array.isArray,ov=Object.prototype.hasOwnProperty,Dh={current:null},av={key:!0,ref:!0,__self:!0,__source:!0};function lv(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)ov.call(t,r)&&!av.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),u=0;u<a;u++)l[u]=arguments[u+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:fa,type:e,key:s,ref:o,props:i,_owner:Dh.current}}function t_(e,t){return{$$typeof:fa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Nh(e){return typeof e=="object"&&e!==null&&e.$$typeof===fa}function n_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var $m=/\/+/g;function Sc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?n_(""+e.key):t.toString(36)}function hl(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 fa:case WS:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Sc(o,0):r,Fm(i)?(n="",e!=null&&(n=e.replace($m,"$&/")+"/"),hl(i,t,n,"",function(u){return u})):i!=null&&(Nh(i)&&(i=t_(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace($m,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Fm(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Sc(s,a);o+=hl(s,t,n,l,i)}else if(l=e_(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Sc(s,a++),o+=hl(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 Ra(e,t,n){if(e==null)return e;var r=[],i=0;return hl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function r_(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 gt={current:null},pl={transition:null},i_={ReactCurrentDispatcher:gt,ReactCurrentBatchConfig:pl,ReactCurrentOwner:Dh};function uv(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:Ra,forEach:function(e,t,n){Ra(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ra(e,function(){t++}),t},toArray:function(e){return Ra(e,function(t){return t})||[]},only:function(e){if(!Nh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=Ns;oe.Fragment=HS;oe.Profiler=GS;oe.PureComponent=Lh;oe.StrictMode=KS;oe.Suspense=XS;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i_;oe.act=uv;oe.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=rv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Dh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ov.call(t,l)&&!av.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 u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:fa,type:e.type,key:i,ref:s,props:r,_owner:o}};oe.createContext=function(e){return e={$$typeof:YS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:QS,_context:e},e.Consumer=e};oe.createElement=lv;oe.createFactory=function(e){var t=lv.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:qS,render:e}};oe.isValidElement=Nh;oe.lazy=function(e){return{$$typeof:JS,_payload:{_status:-1,_result:e},_init:r_}};oe.memo=function(e,t){return{$$typeof:ZS,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=pl.transition;pl.transition={};try{e()}finally{pl.transition=t}};oe.unstable_act=uv;oe.useCallback=function(e,t){return gt.current.useCallback(e,t)};oe.useContext=function(e){return gt.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return gt.current.useDeferredValue(e)};oe.useEffect=function(e,t){return gt.current.useEffect(e,t)};oe.useId=function(){return gt.current.useId()};oe.useImperativeHandle=function(e,t,n){return gt.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return gt.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return gt.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return gt.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return gt.current.useReducer(e,t,n)};oe.useRef=function(e){return gt.current.useRef(e)};oe.useState=function(e){return gt.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return gt.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return gt.current.useTransition()};oe.version="18.3.1";tv.exports=oe;var C=tv.exports;const ks=Fu(C);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var s_=C,o_=Symbol.for("react.element"),a_=Symbol.for("react.fragment"),l_=Object.prototype.hasOwnProperty,u_=s_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c_={key:!0,ref:!0,__self:!0,__source:!0};function cv(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)l_.call(t,r)&&!c_.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:o_,type:e,key:s,ref:o,props:i,_owner:u_.current}}$u.Fragment=a_;$u.jsx=cv;$u.jsxs=cv;ev.exports=$u;var f=ev.exports,dv={exports:{}},Wt={},fv={exports:{}},hv={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(z,D){var k=z.length;z.push(D);e:for(;0<k;){var K=k-1>>>1,ne=z[K];if(0<i(ne,D))z[K]=D,z[k]=ne,k=K;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var D=z[0],k=z.pop();if(k!==D){z[0]=k;e:for(var K=0,ne=z.length,T=ne>>>1;K<T;){var he=2*(K+1)-1,ce=z[he],de=he+1,tt=z[de];if(0>i(ce,k))de<ne&&0>i(tt,ce)?(z[K]=tt,z[de]=k,K=de):(z[K]=ce,z[he]=k,K=he);else if(de<ne&&0>i(tt,k))z[K]=tt,z[de]=k,K=de;else break e}}return D}function i(z,D){var k=z.sortIndex-D.sortIndex;return k!==0?k:z.id-D.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=[],u=[],c=1,d=null,h=3,p=!1,m=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(z){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=z)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function b(z){if(y=!1,v(z),!m)if(n(l)!==null)m=!0,F(_);else{var D=n(u);D!==null&&H(b,D.startTime-z)}}function _(z,D){m=!1,y&&(y=!1,g(E),E=-1),p=!0;var k=h;try{for(v(D),d=n(l);d!==null&&(!(d.expirationTime>D)||z&&!R());){var K=d.callback;if(typeof K=="function"){d.callback=null,h=d.priorityLevel;var ne=K(d.expirationTime<=D);D=e.unstable_now(),typeof ne=="function"?d.callback=ne:d===n(l)&&r(l),v(D)}else r(l);d=n(l)}if(d!==null)var T=!0;else{var he=n(u);he!==null&&H(b,he.startTime-D),T=!1}return T}finally{d=null,h=k,p=!1}}var S=!1,j=null,E=-1,M=5,P=-1;function R(){return!(e.unstable_now()-P<M)}function A(){if(j!==null){var z=e.unstable_now();P=z;var D=!0;try{D=j(!0,z)}finally{D?B():(S=!1,j=null)}}else S=!1}var B;if(typeof x=="function")B=function(){x(A)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,O=I.port2;I.port1.onmessage=A,B=function(){O.postMessage(null)}}else B=function(){w(A,0)};function F(z){j=z,S||(S=!0,B())}function H(z,D){E=w(function(){z(e.unstable_now())},D)}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,F(_))},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"):M=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 D=3;break;default:D=h}var k=h;h=D;try{return z()}finally{h=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,D){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var k=h;h=z;try{return D()}finally{h=k}},e.unstable_scheduleCallback=function(z,D,k){var K=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?K+k:K):k=K,z){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=k+ne,z={id:c++,callback:D,priorityLevel:z,startTime:k,expirationTime:ne,sortIndex:-1},k>K?(z.sortIndex=k,t(u,z),n(l)===null&&z===n(u)&&(y?(g(E),E=-1):y=!0,H(b,k-K))):(z.sortIndex=ne,t(l,z),m||p||(m=!0,F(_))),z},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(z){var D=h;return function(){var k=h;h=D;try{return z.apply(this,arguments)}finally{h=k}}}})(hv);fv.exports=hv;var d_=fv.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var f_=C,Ut=d_;function U(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 pv=new Set,Fo={};function Ii(e,t){Ss(e,t),Ss(e+"Capture",t)}function Ss(e,t){for(Fo[e]=t,e=0;e<t.length;e++)pv.add(t[e])}var er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gd=Object.prototype.hasOwnProperty,h_=/^[: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]*$/,Vm={},Um={};function p_(e){return Gd.call(Um,e)?!0:Gd.call(Vm,e)?!1:h_.test(e)?Um[e]=!0:(Vm[e]=!0,!1)}function m_(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 g_(e,t,n,r){if(t===null||typeof t>"u"||m_(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 yt(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 yt(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 yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new yt(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 yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var zh=/[\-:]([a-z])/g;function Oh(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(zh,Oh);et[t]=new yt(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(zh,Oh);et[t]=new yt(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(zh,Oh);et[t]=new yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new yt(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bh(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")&&(g_(t,n,i,r)&&(n=null),r||i===null?p_(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 ir=f_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ma=Symbol.for("react.element"),qi=Symbol.for("react.portal"),Xi=Symbol.for("react.fragment"),Fh=Symbol.for("react.strict_mode"),Qd=Symbol.for("react.profiler"),mv=Symbol.for("react.provider"),gv=Symbol.for("react.context"),$h=Symbol.for("react.forward_ref"),Yd=Symbol.for("react.suspense"),qd=Symbol.for("react.suspense_list"),Vh=Symbol.for("react.memo"),Sr=Symbol.for("react.lazy"),yv=Symbol.for("react.offscreen"),Wm=Symbol.iterator;function Ys(e){return e===null||typeof e!="object"?null:(e=Wm&&e[Wm]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Object.assign,_c;function xo(e){if(_c===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_c=t&&t[1]||""}return`
34
+ `+_c+e}var Cc=!1;function Pc(e,t){if(!e||Cc)return"";Cc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),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=`
37
+ `+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{Cc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xo(e):""}function y_(e){switch(e.tag){case 5:return xo(e.type);case 16:return xo("Lazy");case 13:return xo("Suspense");case 19:return xo("SuspenseList");case 0:case 2:case 15:return e=Pc(e.type,!1),e;case 11:return e=Pc(e.type.render,!1),e;case 1:return e=Pc(e.type,!0),e;default:return""}}function Xd(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 Xi:return"Fragment";case qi:return"Portal";case Qd:return"Profiler";case Fh:return"StrictMode";case Yd:return"Suspense";case qd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gv:return(e.displayName||"Context")+".Consumer";case mv:return(e._context.displayName||"Context")+".Provider";case $h:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vh:return t=e.displayName||null,t!==null?t:Xd(e.type)||"Memo";case Sr:t=e._payload,e=e._init;try{return Xd(e(t))}catch{}}return null}function x_(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 Xd(t);case 8:return t===Fh?"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 Hr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function v_(e){var t=xv(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 Aa(e){e._valueTracker||(e._valueTracker=v_(e))}function vv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hl(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 Zd(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Hm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Hr(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 wv(e,t){t=t.checked,t!=null&&Bh(e,"checked",t,!1)}function Jd(e,t){wv(e,t);var n=Hr(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")?ef(e,t.type,n):t.hasOwnProperty("defaultValue")&&ef(e,t.type,Hr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Km(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 ef(e,t,n){(t!=="number"||Hl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vo=Array.isArray;function ds(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=""+Hr(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 tf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gm(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(vo(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Hr(n)}}function bv(e,t){var n=Hr(t.value),r=Hr(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 Qm(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kv(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 nf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var La,Sv=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(La=La||document.createElement("div"),La.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=La.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $o(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _o={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},w_=["Webkit","ms","Moz","O"];Object.keys(_o).forEach(function(e){w_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_o[t]=_o[e]})});function _v(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_o.hasOwnProperty(e)&&_o[e]?(""+t).trim():t+"px"}function Cv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_v(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var b_=Le({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 rf(e,t){if(t){if(b_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function sf(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 of=null;function Uh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var af=null,fs=null,hs=null;function Ym(e){if(e=ma(e)){if(typeof af!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Ku(t),af(e.stateNode,e.type,t))}}function Pv(e){fs?hs?hs.push(e):hs=[e]:fs=e}function Ev(){if(fs){var e=fs,t=hs;if(hs=fs=null,Ym(e),t)for(e=0;e<t.length;e++)Ym(t[e])}}function jv(e,t){return e(t)}function Tv(){}var Ec=!1;function Rv(e,t,n){if(Ec)return e(t,n);Ec=!0;try{return jv(e,t,n)}finally{Ec=!1,(fs!==null||hs!==null)&&(Tv(),Ev())}}function Vo(e,t){var n=e.stateNode;if(n===null)return null;var r=Ku(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(U(231,t,typeof n));return n}var lf=!1;if(er)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){lf=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{lf=!1}function k_(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Co=!1,Kl=null,Gl=!1,uf=null,S_={onError:function(e){Co=!0,Kl=e}};function __(e,t,n,r,i,s,o,a,l){Co=!1,Kl=null,k_.apply(S_,arguments)}function C_(e,t,n,r,i,s,o,a,l){if(__.apply(this,arguments),Co){if(Co){var u=Kl;Co=!1,Kl=null}else throw Error(U(198));Gl||(Gl=!0,uf=u)}}function Di(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 Mv(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 qm(e){if(Di(e)!==e)throw Error(U(188))}function P_(e){var t=e.alternate;if(!t){if(t=Di(e),t===null)throw Error(U(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 qm(i),e;if(s===r)return qm(i),t;s=s.sibling}throw Error(U(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(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function Av(e){return e=P_(e),e!==null?Lv(e):null}function Lv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Lv(e);if(t!==null)return t;e=e.sibling}return null}var Iv=Ut.unstable_scheduleCallback,Xm=Ut.unstable_cancelCallback,E_=Ut.unstable_shouldYield,j_=Ut.unstable_requestPaint,Oe=Ut.unstable_now,T_=Ut.unstable_getCurrentPriorityLevel,Wh=Ut.unstable_ImmediatePriority,Dv=Ut.unstable_UserBlockingPriority,Ql=Ut.unstable_NormalPriority,R_=Ut.unstable_LowPriority,Nv=Ut.unstable_IdlePriority,Vu=null,An=null;function M_(e){if(An&&typeof An.onCommitFiberRoot=="function")try{An.onCommitFiberRoot(Vu,e,void 0,(e.current.flags&128)===128)}catch{}}var vn=Math.clz32?Math.clz32:I_,A_=Math.log,L_=Math.LN2;function I_(e){return e>>>=0,e===0?32:31-(A_(e)/L_|0)|0}var Ia=64,Da=4194304;function wo(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 Yl(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=wo(a):(s&=o,s!==0&&(r=wo(s)))}else o=n&~i,o!==0?r=wo(o):s!==0&&(r=wo(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-vn(t),i=1<<n,r|=e[n],t&=~i;return r}function D_(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 N_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-vn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=D_(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function cf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function zv(){var e=Ia;return Ia<<=1,!(Ia&4194240)&&(Ia=64),e}function jc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ha(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vn(t),e[t]=n}function z_(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-vn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Hh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-vn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ge=0;function Ov(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Bv,Kh,Fv,$v,Vv,df=!1,Na=[],Dr=null,Nr=null,zr=null,Uo=new Map,Wo=new Map,Pr=[],O_="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 Zm(e,t){switch(e){case"focusin":case"focusout":Dr=null;break;case"dragenter":case"dragleave":Nr=null;break;case"mouseover":case"mouseout":zr=null;break;case"pointerover":case"pointerout":Uo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wo.delete(t.pointerId)}}function Xs(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=ma(t),t!==null&&Kh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function B_(e,t,n,r,i){switch(t){case"focusin":return Dr=Xs(Dr,e,t,n,r,i),!0;case"dragenter":return Nr=Xs(Nr,e,t,n,r,i),!0;case"mouseover":return zr=Xs(zr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Uo.set(s,Xs(Uo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Wo.set(s,Xs(Wo.get(s)||null,e,t,n,r,i)),!0}return!1}function Uv(e){var t=pi(e.target);if(t!==null){var n=Di(t);if(n!==null){if(t=n.tag,t===13){if(t=Mv(n),t!==null){e.blockedOn=t,Vv(e.priority,function(){Fv(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 ml(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ff(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);of=r,n.target.dispatchEvent(r),of=null}else return t=ma(n),t!==null&&Kh(t),e.blockedOn=n,!1;t.shift()}return!0}function Jm(e,t,n){ml(e)&&n.delete(t)}function F_(){df=!1,Dr!==null&&ml(Dr)&&(Dr=null),Nr!==null&&ml(Nr)&&(Nr=null),zr!==null&&ml(zr)&&(zr=null),Uo.forEach(Jm),Wo.forEach(Jm)}function Zs(e,t){e.blockedOn===t&&(e.blockedOn=null,df||(df=!0,Ut.unstable_scheduleCallback(Ut.unstable_NormalPriority,F_)))}function Ho(e){function t(i){return Zs(i,e)}if(0<Na.length){Zs(Na[0],e);for(var n=1;n<Na.length;n++){var r=Na[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Dr!==null&&Zs(Dr,e),Nr!==null&&Zs(Nr,e),zr!==null&&Zs(zr,e),Uo.forEach(t),Wo.forEach(t),n=0;n<Pr.length;n++)r=Pr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Pr.length&&(n=Pr[0],n.blockedOn===null);)Uv(n),n.blockedOn===null&&Pr.shift()}var ps=ir.ReactCurrentBatchConfig,ql=!0;function $_(e,t,n,r){var i=ge,s=ps.transition;ps.transition=null;try{ge=1,Gh(e,t,n,r)}finally{ge=i,ps.transition=s}}function V_(e,t,n,r){var i=ge,s=ps.transition;ps.transition=null;try{ge=4,Gh(e,t,n,r)}finally{ge=i,ps.transition=s}}function Gh(e,t,n,r){if(ql){var i=ff(e,t,n,r);if(i===null)Oc(e,t,r,Xl,n),Zm(e,r);else if(B_(i,e,t,n,r))r.stopPropagation();else if(Zm(e,r),t&4&&-1<O_.indexOf(e)){for(;i!==null;){var s=ma(i);if(s!==null&&Bv(s),s=ff(e,t,n,r),s===null&&Oc(e,t,r,Xl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Oc(e,t,r,null,n)}}var Xl=null;function ff(e,t,n,r){if(Xl=null,e=Uh(r),e=pi(e),e!==null)if(t=Di(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Mv(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 Xl=e,null}function Wv(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(T_()){case Wh:return 1;case Dv:return 4;case Ql:case R_:return 16;case Nv:return 536870912;default:return 16}default:return 16}}var jr=null,Qh=null,gl=null;function Hv(){if(gl)return gl;var e,t=Qh,n=t.length,r,i="value"in jr?jr.value:jr.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 gl=i.slice(e,1<r?1-r:void 0)}function yl(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 za(){return!0}function eg(){return!1}function Ht(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)?za:eg,this.isPropagationStopped=eg,this}return Le(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=za)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=za)},persist:function(){},isPersistent:za}),t}var zs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yh=Ht(zs),pa=Le({},zs,{view:0,detail:0}),U_=Ht(pa),Tc,Rc,Js,Uu=Le({},pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qh,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!==Js&&(Js&&e.type==="mousemove"?(Tc=e.screenX-Js.screenX,Rc=e.screenY-Js.screenY):Rc=Tc=0,Js=e),Tc)},movementY:function(e){return"movementY"in e?e.movementY:Rc}}),tg=Ht(Uu),W_=Le({},Uu,{dataTransfer:0}),H_=Ht(W_),K_=Le({},pa,{relatedTarget:0}),Mc=Ht(K_),G_=Le({},zs,{animationName:0,elapsedTime:0,pseudoElement:0}),Q_=Ht(G_),Y_=Le({},zs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),q_=Ht(Y_),X_=Le({},zs,{data:0}),ng=Ht(X_),Z_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J_={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"},eC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eC[e])?!!t[e]:!1}function qh(){return tC}var nC=Le({},pa,{key:function(e){if(e.key){var t=Z_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?J_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qh,charCode:function(e){return e.type==="keypress"?yl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rC=Ht(nC),iC=Le({},Uu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rg=Ht(iC),sC=Le({},pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qh}),oC=Ht(sC),aC=Le({},zs,{propertyName:0,elapsedTime:0,pseudoElement:0}),lC=Ht(aC),uC=Le({},Uu,{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}),cC=Ht(uC),dC=[9,13,27,32],Xh=er&&"CompositionEvent"in window,Po=null;er&&"documentMode"in document&&(Po=document.documentMode);var fC=er&&"TextEvent"in window&&!Po,Kv=er&&(!Xh||Po&&8<Po&&11>=Po),ig=" ",sg=!1;function Gv(e,t){switch(e){case"keyup":return dC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function hC(e,t){switch(e){case"compositionend":return Qv(t);case"keypress":return t.which!==32?null:(sg=!0,ig);case"textInput":return e=t.data,e===ig&&sg?null:e;default:return null}}function pC(e,t){if(Zi)return e==="compositionend"||!Xh&&Gv(e,t)?(e=Hv(),gl=Qh=jr=null,Zi=!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 Kv&&t.locale!=="ko"?null:t.data;default:return null}}var mC={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 og(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mC[e.type]:t==="textarea"}function Yv(e,t,n,r){Pv(r),t=Zl(t,"onChange"),0<t.length&&(n=new Yh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Eo=null,Ko=null;function gC(e){o1(e,0)}function Wu(e){var t=ts(e);if(vv(t))return e}function yC(e,t){if(e==="change")return t}var qv=!1;if(er){var Ac;if(er){var Lc="oninput"in document;if(!Lc){var ag=document.createElement("div");ag.setAttribute("oninput","return;"),Lc=typeof ag.oninput=="function"}Ac=Lc}else Ac=!1;qv=Ac&&(!document.documentMode||9<document.documentMode)}function lg(){Eo&&(Eo.detachEvent("onpropertychange",Xv),Ko=Eo=null)}function Xv(e){if(e.propertyName==="value"&&Wu(Ko)){var t=[];Yv(t,Ko,e,Uh(e)),Rv(gC,t)}}function xC(e,t,n){e==="focusin"?(lg(),Eo=t,Ko=n,Eo.attachEvent("onpropertychange",Xv)):e==="focusout"&&lg()}function vC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wu(Ko)}function wC(e,t){if(e==="click")return Wu(t)}function bC(e,t){if(e==="input"||e==="change")return Wu(t)}function kC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kn=typeof Object.is=="function"?Object.is:kC;function Go(e,t){if(kn(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(!Gd.call(t,i)||!kn(e[i],t[i]))return!1}return!0}function ug(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cg(e,t){var n=ug(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=ug(n)}}function Zv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jv(){for(var e=window,t=Hl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hl(e.document)}return t}function Zh(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 SC(e){var t=Jv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zv(n.ownerDocument.documentElement,n)){if(r!==null&&Zh(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=cg(n,s);var o=cg(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 _C=er&&"documentMode"in document&&11>=document.documentMode,Ji=null,hf=null,jo=null,pf=!1;function dg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pf||Ji==null||Ji!==Hl(r)||(r=Ji,"selectionStart"in r&&Zh(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}),jo&&Go(jo,r)||(jo=r,r=Zl(hf,"onSelect"),0<r.length&&(t=new Yh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ji)))}function Oa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var es={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionend:Oa("Transition","TransitionEnd")},Ic={},e1={};er&&(e1=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function Hu(e){if(Ic[e])return Ic[e];if(!es[e])return e;var t=es[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in e1)return Ic[e]=t[n];return e}var t1=Hu("animationend"),n1=Hu("animationiteration"),r1=Hu("animationstart"),i1=Hu("transitionend"),s1=new Map,fg="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 qr(e,t){s1.set(e,t),Ii(t,[e])}for(var Dc=0;Dc<fg.length;Dc++){var Nc=fg[Dc],CC=Nc.toLowerCase(),PC=Nc[0].toUpperCase()+Nc.slice(1);qr(CC,"on"+PC)}qr(t1,"onAnimationEnd");qr(n1,"onAnimationIteration");qr(r1,"onAnimationStart");qr("dblclick","onDoubleClick");qr("focusin","onFocus");qr("focusout","onBlur");qr(i1,"onTransitionEnd");Ss("onMouseEnter",["mouseout","mouseover"]);Ss("onMouseLeave",["mouseout","mouseover"]);Ss("onPointerEnter",["pointerout","pointerover"]);Ss("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 bo="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(" "),EC=new Set("cancel close invalid load scroll toggle".split(" ").concat(bo));function hg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,C_(r,t,void 0,e),e.currentTarget=null}function o1(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,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;hg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;hg(i,a,u),s=l}}}if(Gl)throw e=uf,Gl=!1,uf=null,e}function Ce(e,t){var n=t[vf];n===void 0&&(n=t[vf]=new Set);var r=e+"__bubble";n.has(r)||(a1(t,e,2,!1),n.add(r))}function zc(e,t,n){var r=0;t&&(r|=4),a1(n,e,r,t)}var Ba="_reactListening"+Math.random().toString(36).slice(2);function Qo(e){if(!e[Ba]){e[Ba]=!0,pv.forEach(function(n){n!=="selectionchange"&&(EC.has(n)||zc(n,!1,e),zc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ba]||(t[Ba]=!0,zc("selectionchange",!1,t))}}function a1(e,t,n,r){switch(Wv(t)){case 1:var i=$_;break;case 4:i=V_;break;default:i=Gh}n=i.bind(null,t,n,e),i=void 0,!lf||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 Oc(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=pi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}Rv(function(){var u=s,c=Uh(n),d=[];e:{var h=s1.get(e);if(h!==void 0){var p=Yh,m=e;switch(e){case"keypress":if(yl(n)===0)break e;case"keydown":case"keyup":p=rC;break;case"focusin":m="focus",p=Mc;break;case"focusout":m="blur",p=Mc;break;case"beforeblur":case"afterblur":p=Mc;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=tg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=H_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=oC;break;case t1:case n1:case r1:p=Q_;break;case i1:p=lC;break;case"scroll":p=U_;break;case"wheel":p=cC;break;case"copy":case"cut":case"paste":p=q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=rg}var y=(t&4)!==0,w=!y&&e==="scroll",g=y?h!==null?h+"Capture":null:h;y=[];for(var x=u,v;x!==null;){v=x;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,g!==null&&(b=Vo(x,g),b!=null&&y.push(Yo(x,b,v)))),w)break;x=x.return}0<y.length&&(h=new p(h,m,null,n,c),d.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==of&&(m=n.relatedTarget||n.fromElement)&&(pi(m)||m[tr]))break e;if((p||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?pi(m):null,m!==null&&(w=Di(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(y=tg,b="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=rg,b="onPointerLeave",g="onPointerEnter",x="pointer"),w=p==null?h:ts(p),v=m==null?h:ts(m),h=new y(b,x+"leave",p,n,c),h.target=w,h.relatedTarget=v,b=null,pi(c)===u&&(y=new y(g,x+"enter",m,n,c),y.target=v,y.relatedTarget=w,b=y),w=b,p&&m)t:{for(y=p,g=m,x=0,v=y;v;v=Fi(v))x++;for(v=0,b=g;b;b=Fi(b))v++;for(;0<x-v;)y=Fi(y),x--;for(;0<v-x;)g=Fi(g),v--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=Fi(y),g=Fi(g)}y=null}else y=null;p!==null&&pg(d,h,p,y,!1),m!==null&&w!==null&&pg(d,w,m,y,!0)}}e:{if(h=u?ts(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var _=yC;else if(og(h))if(qv)_=bC;else{_=vC;var S=xC}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=wC);if(_&&(_=_(e,u))){Yv(d,_,n,c);break e}S&&S(e,h,u),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&ef(h,"number",h.value)}switch(S=u?ts(u):window,e){case"focusin":(og(S)||S.contentEditable==="true")&&(Ji=S,hf=u,jo=null);break;case"focusout":jo=hf=Ji=null;break;case"mousedown":pf=!0;break;case"contextmenu":case"mouseup":case"dragend":pf=!1,dg(d,n,c);break;case"selectionchange":if(_C)break;case"keydown":case"keyup":dg(d,n,c)}var j;if(Xh)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Zi?Gv(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Kv&&n.locale!=="ko"&&(Zi||E!=="onCompositionStart"?E==="onCompositionEnd"&&Zi&&(j=Hv()):(jr=c,Qh="value"in jr?jr.value:jr.textContent,Zi=!0)),S=Zl(u,E),0<S.length&&(E=new ng(E,e,null,n,c),d.push({event:E,listeners:S}),j?E.data=j:(j=Qv(n),j!==null&&(E.data=j)))),(j=fC?hC(e,n):pC(e,n))&&(u=Zl(u,"onBeforeInput"),0<u.length&&(c=new ng("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=j))}o1(d,t)})}function Yo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Vo(e,n),s!=null&&r.unshift(Yo(e,s,i)),s=Vo(e,t),s!=null&&r.push(Yo(e,s,i))),e=e.return}return r}function Fi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Vo(n,s),l!=null&&o.unshift(Yo(n,l,a))):i||(l=Vo(n,s),l!=null&&o.push(Yo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jC=/\r\n?/g,TC=/\u0000|\uFFFD/g;function mg(e){return(typeof e=="string"?e:""+e).replace(jC,`
38
+ `).replace(TC,"")}function Fa(e,t,n){if(t=mg(t),mg(e)!==t&&n)throw Error(U(425))}function Jl(){}var mf=null,gf=null;function yf(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 xf=typeof setTimeout=="function"?setTimeout:void 0,RC=typeof clearTimeout=="function"?clearTimeout:void 0,gg=typeof Promise=="function"?Promise:void 0,MC=typeof queueMicrotask=="function"?queueMicrotask:typeof gg<"u"?function(e){return gg.resolve(null).then(e).catch(AC)}:xf;function AC(e){setTimeout(function(){throw e})}function Bc(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),Ho(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ho(t)}function Or(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 yg(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 Os=Math.random().toString(36).slice(2),Rn="__reactFiber$"+Os,qo="__reactProps$"+Os,tr="__reactContainer$"+Os,vf="__reactEvents$"+Os,LC="__reactListeners$"+Os,IC="__reactHandles$"+Os;function pi(e){var t=e[Rn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tr]||n[Rn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yg(e);e!==null;){if(n=e[Rn])return n;e=yg(e)}return t}e=n,n=e.parentNode}return null}function ma(e){return e=e[Rn]||e[tr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ts(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Ku(e){return e[qo]||null}var wf=[],ns=-1;function Xr(e){return{current:e}}function Pe(e){0>ns||(e.current=wf[ns],wf[ns]=null,ns--)}function be(e,t){ns++,wf[ns]=e.current,e.current=t}var Kr={},ct=Xr(Kr),_t=Xr(!1),Ti=Kr;function _s(e,t){var n=e.type.contextTypes;if(!n)return Kr;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 Ct(e){return e=e.childContextTypes,e!=null}function eu(){Pe(_t),Pe(ct)}function xg(e,t,n){if(ct.current!==Kr)throw Error(U(168));be(ct,t),be(_t,n)}function l1(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(U(108,x_(e)||"Unknown",i));return Le({},n,r)}function tu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kr,Ti=ct.current,be(ct,e),be(_t,_t.current),!0}function vg(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=l1(e,t,Ti),r.__reactInternalMemoizedMergedChildContext=e,Pe(_t),Pe(ct),be(ct,e)):Pe(_t),be(_t,n)}var Gn=null,Gu=!1,Fc=!1;function u1(e){Gn===null?Gn=[e]:Gn.push(e)}function DC(e){Gu=!0,u1(e)}function Zr(){if(!Fc&&Gn!==null){Fc=!0;var e=0,t=ge;try{var n=Gn;for(ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gn=null,Gu=!1}catch(i){throw Gn!==null&&(Gn=Gn.slice(e+1)),Iv(Wh,Zr),i}finally{ge=t,Fc=!1}}return null}var rs=[],is=0,nu=null,ru=0,Zt=[],Jt=0,Ri=null,Qn=1,Yn="";function li(e,t){rs[is++]=ru,rs[is++]=nu,nu=e,ru=t}function c1(e,t,n){Zt[Jt++]=Qn,Zt[Jt++]=Yn,Zt[Jt++]=Ri,Ri=e;var r=Qn;e=Yn;var i=32-vn(r)-1;r&=~(1<<i),n+=1;var s=32-vn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Qn=1<<32-vn(t)+i|n<<i|r,Yn=s+e}else Qn=1<<s|n<<i|r,Yn=e}function Jh(e){e.return!==null&&(li(e,1),c1(e,1,0))}function ep(e){for(;e===nu;)nu=rs[--is],rs[is]=null,ru=rs[--is],rs[is]=null;for(;e===Ri;)Ri=Zt[--Jt],Zt[Jt]=null,Yn=Zt[--Jt],Zt[Jt]=null,Qn=Zt[--Jt],Zt[Jt]=null}var Ft=null,zt=null,je=!1,yn=null;function d1(e,t){var n=tn(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,Ft=e,zt=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ft=e,zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ri!==null?{id:Qn,overflow:Yn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=tn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ft=e,zt=null,!0):!1;default:return!1}}function bf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function kf(e){if(je){var t=zt;if(t){var n=t;if(!wg(e,t)){if(bf(e))throw Error(U(418));t=Or(n.nextSibling);var r=Ft;t&&wg(e,t)?d1(r,n):(e.flags=e.flags&-4097|2,je=!1,Ft=e)}}else{if(bf(e))throw Error(U(418));e.flags=e.flags&-4097|2,je=!1,Ft=e}}}function bg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function $a(e){if(e!==Ft)return!1;if(!je)return bg(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yf(e.type,e.memoizedProps)),t&&(t=zt)){if(bf(e))throw f1(),Error(U(418));for(;t;)d1(e,t),t=Or(t.nextSibling)}if(bg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){zt=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}zt=null}}else zt=Ft?Or(e.stateNode.nextSibling):null;return!0}function f1(){for(var e=zt;e;)e=Or(e.nextSibling)}function Cs(){zt=Ft=null,je=!1}function tp(e){yn===null?yn=[e]:yn.push(e)}var NC=ir.ReactCurrentBatchConfig;function eo(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(U(309));var r=n.stateNode}if(!r)throw Error(U(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(U(284));if(!n._owner)throw Error(U(290,e))}return e}function Va(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function kg(e){var t=e._init;return t(e._payload)}function h1(e){function t(g,x){if(e){var v=g.deletions;v===null?(g.deletions=[x],g.flags|=16):v.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=Vr(g,x),g.index=0,g.sibling=null,g}function s(g,x,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<x?(g.flags|=2,x):v):(g.flags|=2,x)):(g.flags|=1048576,x)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,x,v,b){return x===null||x.tag!==6?(x=Gc(v,g.mode,b),x.return=g,x):(x=i(x,v),x.return=g,x)}function l(g,x,v,b){var _=v.type;return _===Xi?c(g,x,v.props.children,b,v.key):x!==null&&(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Sr&&kg(_)===x.type)?(b=i(x,v.props),b.ref=eo(g,x,v),b.return=g,b):(b=_l(v.type,v.key,v.props,null,g.mode,b),b.ref=eo(g,x,v),b.return=g,b)}function u(g,x,v,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==v.containerInfo||x.stateNode.implementation!==v.implementation?(x=Qc(v,g.mode,b),x.return=g,x):(x=i(x,v.children||[]),x.return=g,x)}function c(g,x,v,b,_){return x===null||x.tag!==7?(x=ki(v,g.mode,b,_),x.return=g,x):(x=i(x,v),x.return=g,x)}function d(g,x,v){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Gc(""+x,g.mode,v),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ma:return v=_l(x.type,x.key,x.props,null,g.mode,v),v.ref=eo(g,null,x),v.return=g,v;case qi:return x=Qc(x,g.mode,v),x.return=g,x;case Sr:var b=x._init;return d(g,b(x._payload),v)}if(vo(x)||Ys(x))return x=ki(x,g.mode,v,null),x.return=g,x;Va(g,x)}return null}function h(g,x,v,b){var _=x!==null?x.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return _!==null?null:a(g,x,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ma:return v.key===_?l(g,x,v,b):null;case qi:return v.key===_?u(g,x,v,b):null;case Sr:return _=v._init,h(g,x,_(v._payload),b)}if(vo(v)||Ys(v))return _!==null?null:c(g,x,v,b,null);Va(g,v)}return null}function p(g,x,v,b,_){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(v)||null,a(x,g,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Ma:return g=g.get(b.key===null?v:b.key)||null,l(x,g,b,_);case qi:return g=g.get(b.key===null?v:b.key)||null,u(x,g,b,_);case Sr:var S=b._init;return p(g,x,v,S(b._payload),_)}if(vo(b)||Ys(b))return g=g.get(v)||null,c(x,g,b,_,null);Va(x,b)}return null}function m(g,x,v,b){for(var _=null,S=null,j=x,E=x=0,M=null;j!==null&&E<v.length;E++){j.index>E?(M=j,j=null):M=j.sibling;var P=h(g,j,v[E],b);if(P===null){j===null&&(j=M);break}e&&j&&P.alternate===null&&t(g,j),x=s(P,x,E),S===null?_=P:S.sibling=P,S=P,j=M}if(E===v.length)return n(g,j),je&&li(g,E),_;if(j===null){for(;E<v.length;E++)j=d(g,v[E],b),j!==null&&(x=s(j,x,E),S===null?_=j:S.sibling=j,S=j);return je&&li(g,E),_}for(j=r(g,j);E<v.length;E++)M=p(j,g,E,v[E],b),M!==null&&(e&&M.alternate!==null&&j.delete(M.key===null?E:M.key),x=s(M,x,E),S===null?_=M:S.sibling=M,S=M);return e&&j.forEach(function(R){return t(g,R)}),je&&li(g,E),_}function y(g,x,v,b){var _=Ys(v);if(typeof _!="function")throw Error(U(150));if(v=_.call(v),v==null)throw Error(U(151));for(var S=_=null,j=x,E=x=0,M=null,P=v.next();j!==null&&!P.done;E++,P=v.next()){j.index>E?(M=j,j=null):M=j.sibling;var R=h(g,j,P.value,b);if(R===null){j===null&&(j=M);break}e&&j&&R.alternate===null&&t(g,j),x=s(R,x,E),S===null?_=R:S.sibling=R,S=R,j=M}if(P.done)return n(g,j),je&&li(g,E),_;if(j===null){for(;!P.done;E++,P=v.next())P=d(g,P.value,b),P!==null&&(x=s(P,x,E),S===null?_=P:S.sibling=P,S=P);return je&&li(g,E),_}for(j=r(g,j);!P.done;E++,P=v.next())P=p(j,g,E,P.value,b),P!==null&&(e&&P.alternate!==null&&j.delete(P.key===null?E:P.key),x=s(P,x,E),S===null?_=P:S.sibling=P,S=P);return e&&j.forEach(function(A){return t(g,A)}),je&&li(g,E),_}function w(g,x,v,b){if(typeof v=="object"&&v!==null&&v.type===Xi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ma:e:{for(var _=v.key,S=x;S!==null;){if(S.key===_){if(_=v.type,_===Xi){if(S.tag===7){n(g,S.sibling),x=i(S,v.props.children),x.return=g,g=x;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Sr&&kg(_)===S.type){n(g,S.sibling),x=i(S,v.props),x.ref=eo(g,S,v),x.return=g,g=x;break e}n(g,S);break}else t(g,S);S=S.sibling}v.type===Xi?(x=ki(v.props.children,g.mode,b,v.key),x.return=g,g=x):(b=_l(v.type,v.key,v.props,null,g.mode,b),b.ref=eo(g,x,v),b.return=g,g=b)}return o(g);case qi:e:{for(S=v.key;x!==null;){if(x.key===S)if(x.tag===4&&x.stateNode.containerInfo===v.containerInfo&&x.stateNode.implementation===v.implementation){n(g,x.sibling),x=i(x,v.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=Qc(v,g.mode,b),x.return=g,g=x}return o(g);case Sr:return S=v._init,w(g,x,S(v._payload),b)}if(vo(v))return m(g,x,v,b);if(Ys(v))return y(g,x,v,b);Va(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,v),x.return=g,g=x):(n(g,x),x=Gc(v,g.mode,b),x.return=g,g=x),o(g)):n(g,x)}return w}var Ps=h1(!0),p1=h1(!1),iu=Xr(null),su=null,ss=null,np=null;function rp(){np=ss=su=null}function ip(e){var t=iu.current;Pe(iu),e._currentValue=t}function Sf(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 ms(e,t){su=e,np=ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(kt=!0),e.firstContext=null)}function an(e){var t=e._currentValue;if(np!==e)if(e={context:e,memoizedValue:t,next:null},ss===null){if(su===null)throw Error(U(308));ss=e,su.dependencies={lanes:0,firstContext:e}}else ss=ss.next=e;return t}var mi=null;function sp(e){mi===null?mi=[e]:mi.push(e)}function m1(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,nr(e,r)}function nr(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 _r=!1;function op(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function g1(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 Zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Br(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,nr(e,n)}return i=r.interleaved,i===null?(t.next=t,sp(r)):(t.next=i.next,i.next=t),r.interleaved=t,nr(e,n)}function xl(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,Hh(e,n)}}function Sg(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 ou(e,t,n,r){var i=e.updateQueue;_r=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,c=u=l=null,a=s;do{var h=a.lane,p=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(h=t,p=n,y.tag){case 1:if(m=y.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=y.payload,h=typeof m=="function"?m.call(p,d,h):m,h==null)break e;d=Le({},d,h);break e;case 2:_r=!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},c===null?(u=c=p,l=d):c=c.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(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,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);Ai|=o,e.lanes=o,e.memoizedState=d}}function _g(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(U(191,i));i.call(r)}}}var ga={},Ln=Xr(ga),Xo=Xr(ga),Zo=Xr(ga);function gi(e){if(e===ga)throw Error(U(174));return e}function ap(e,t){switch(be(Zo,t),be(Xo,e),be(Ln,ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:nf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=nf(t,e)}Pe(Ln),be(Ln,t)}function Es(){Pe(Ln),Pe(Xo),Pe(Zo)}function y1(e){gi(Zo.current);var t=gi(Ln.current),n=nf(t,e.type);t!==n&&(be(Xo,e),be(Ln,n))}function lp(e){Xo.current===e&&(Pe(Ln),Pe(Xo))}var Me=Xr(0);function au(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 $c=[];function up(){for(var e=0;e<$c.length;e++)$c[e]._workInProgressVersionPrimary=null;$c.length=0}var vl=ir.ReactCurrentDispatcher,Vc=ir.ReactCurrentBatchConfig,Mi=0,Ae=null,He=null,Qe=null,lu=!1,To=!1,Jo=0,zC=0;function st(){throw Error(U(321))}function cp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kn(e[n],t[n]))return!1;return!0}function dp(e,t,n,r,i,s){if(Mi=s,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vl.current=e===null||e.memoizedState===null?$C:VC,e=n(r,i),To){s=0;do{if(To=!1,Jo=0,25<=s)throw Error(U(301));s+=1,Qe=He=null,t.updateQueue=null,vl.current=UC,e=n(r,i)}while(To)}if(vl.current=uu,t=He!==null&&He.next!==null,Mi=0,Qe=He=Ae=null,lu=!1,t)throw Error(U(300));return e}function fp(){var e=Jo!==0;return Jo=0,e}function Cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?Ae.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function ln(){if(He===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Qe===null?Ae.memoizedState:Qe.next;if(t!==null)Qe=t,He=e;else{if(e===null)throw Error(U(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Qe===null?Ae.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function ea(e,t){return typeof t=="function"?t(e):t}function Uc(e){var t=ln(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=He,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,u=s;do{var c=u.lane;if((Mi&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ae.lanes|=c,Ai|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,kn(r,t.memoizedState)||(kt=!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,Ae.lanes|=s,Ai|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wc(e){var t=ln(),n=t.queue;if(n===null)throw Error(U(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);kn(s,t.memoizedState)||(kt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function x1(){}function v1(e,t){var n=Ae,r=ln(),i=t(),s=!kn(r.memoizedState,i);if(s&&(r.memoizedState=i,kt=!0),r=r.queue,hp(k1.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Qe!==null&&Qe.memoizedState.tag&1){if(n.flags|=2048,ta(9,b1.bind(null,n,r,i,t),void 0,null),Ye===null)throw Error(U(349));Mi&30||w1(n,t,i)}return i}function w1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function b1(e,t,n,r){t.value=n,t.getSnapshot=r,S1(t)&&_1(e)}function k1(e,t,n){return n(function(){S1(t)&&_1(e)})}function S1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kn(e,n)}catch{return!0}}function _1(e){var t=nr(e,1);t!==null&&wn(t,e,1,-1)}function Cg(e){var t=Cn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:e},t.queue=e,e=e.dispatch=FC.bind(null,Ae,e),[t.memoizedState,e]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.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 C1(){return ln().memoizedState}function wl(e,t,n,r){var i=Cn();Ae.flags|=e,i.memoizedState=ta(1|t,n,void 0,r===void 0?null:r)}function Qu(e,t,n,r){var i=ln();r=r===void 0?null:r;var s=void 0;if(He!==null){var o=He.memoizedState;if(s=o.destroy,r!==null&&cp(r,o.deps)){i.memoizedState=ta(t,n,s,r);return}}Ae.flags|=e,i.memoizedState=ta(1|t,n,s,r)}function Pg(e,t){return wl(8390656,8,e,t)}function hp(e,t){return Qu(2048,8,e,t)}function P1(e,t){return Qu(4,2,e,t)}function E1(e,t){return Qu(4,4,e,t)}function j1(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 T1(e,t,n){return n=n!=null?n.concat([e]):null,Qu(4,4,j1.bind(null,t,e),n)}function pp(){}function R1(e,t){var n=ln();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&cp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function M1(e,t){var n=ln();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&cp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function A1(e,t,n){return Mi&21?(kn(n,t)||(n=zv(),Ae.lanes|=n,Ai|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,kt=!0),e.memoizedState=n)}function OC(e,t){var n=ge;ge=n!==0&&4>n?n:4,e(!0);var r=Vc.transition;Vc.transition={};try{e(!1),t()}finally{ge=n,Vc.transition=r}}function L1(){return ln().memoizedState}function BC(e,t,n){var r=$r(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},I1(e))D1(t,n);else if(n=m1(e,t,n,r),n!==null){var i=mt();wn(n,e,r,i),N1(n,t,r)}}function FC(e,t,n){var r=$r(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(I1(e))D1(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,kn(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=m1(e,t,i,r),n!==null&&(i=mt(),wn(n,e,r,i),N1(n,t,r))}}function I1(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function D1(e,t){To=lu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function N1(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hh(e,n)}}var uu={readContext:an,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useInsertionEffect:st,useLayoutEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useMutableSource:st,useSyncExternalStore:st,useId:st,unstable_isNewReconciler:!1},$C={readContext:an,useCallback:function(e,t){return Cn().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:Pg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,wl(4194308,4,j1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wl(4194308,4,e,t)},useInsertionEffect:function(e,t){return wl(4,2,e,t)},useMemo:function(e,t){var n=Cn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Cn();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=BC.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=Cn();return e={current:e},t.memoizedState=e},useState:Cg,useDebugValue:pp,useDeferredValue:function(e){return Cn().memoizedState=e},useTransition:function(){var e=Cg(!1),t=e[0];return e=OC.bind(null,e[1]),Cn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ae,i=Cn();if(je){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ye===null)throw Error(U(349));Mi&30||w1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Pg(k1.bind(null,r,s,e),[e]),r.flags|=2048,ta(9,b1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Cn(),t=Ye.identifierPrefix;if(je){var n=Yn,r=Qn;n=(r&~(1<<32-vn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Jo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},VC={readContext:an,useCallback:R1,useContext:an,useEffect:hp,useImperativeHandle:T1,useInsertionEffect:P1,useLayoutEffect:E1,useMemo:M1,useReducer:Uc,useRef:C1,useState:function(){return Uc(ea)},useDebugValue:pp,useDeferredValue:function(e){var t=ln();return A1(t,He.memoizedState,e)},useTransition:function(){var e=Uc(ea)[0],t=ln().memoizedState;return[e,t]},useMutableSource:x1,useSyncExternalStore:v1,useId:L1,unstable_isNewReconciler:!1},UC={readContext:an,useCallback:R1,useContext:an,useEffect:hp,useImperativeHandle:T1,useInsertionEffect:P1,useLayoutEffect:E1,useMemo:M1,useReducer:Wc,useRef:C1,useState:function(){return Wc(ea)},useDebugValue:pp,useDeferredValue:function(e){var t=ln();return He===null?t.memoizedState=e:A1(t,He.memoizedState,e)},useTransition:function(){var e=Wc(ea)[0],t=ln().memoizedState;return[e,t]},useMutableSource:x1,useSyncExternalStore:v1,useId:L1,unstable_isNewReconciler:!1};function mn(e,t){if(e&&e.defaultProps){t=Le({},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:Le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Yu={isMounted:function(e){return(e=e._reactInternals)?Di(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mt(),i=$r(e),s=Zn(r,i);s.payload=t,n!=null&&(s.callback=n),t=Br(e,s,i),t!==null&&(wn(t,e,i,r),xl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mt(),i=$r(e),s=Zn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Br(e,s,i),t!==null&&(wn(t,e,i,r),xl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mt(),r=$r(e),i=Zn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Br(e,i,r),t!==null&&(wn(t,e,r,n),xl(t,e,r))}};function Eg(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?!Go(n,r)||!Go(i,s):!0}function z1(e,t,n){var r=!1,i=Kr,s=t.contextType;return typeof s=="object"&&s!==null?s=an(s):(i=Ct(t)?Ti:ct.current,r=t.contextTypes,s=(r=r!=null)?_s(e,i):Kr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Yu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function jg(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&&Yu.enqueueReplaceState(t,t.state,null)}function Cf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},op(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=an(s):(s=Ct(t)?Ti:ct.current,i.context=_s(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&&Yu.enqueueReplaceState(i,i.state,null),ou(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function js(e,t){try{var n="",r=t;do n+=y_(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Hc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Pf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var WC=typeof WeakMap=="function"?WeakMap:Map;function O1(e,t,n){n=Zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){du||(du=!0,Nf=r),Pf(e,t)},n}function B1(e,t,n){n=Zn(-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(){Pf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Pf(e,t),typeof r!="function"&&(Fr===null?Fr=new Set([this]):Fr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Tg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new WC;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=iP.bind(null,e,t,n),t.then(e,e))}function Rg(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 Mg(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=Zn(-1,1),t.tag=2,Br(n,t,1))),n.lanes|=1),e)}var HC=ir.ReactCurrentOwner,kt=!1;function ft(e,t,n,r){t.child=e===null?p1(t,null,n,r):Ps(t,e.child,n,r)}function Ag(e,t,n,r,i){n=n.render;var s=t.ref;return ms(t,i),r=dp(e,t,n,r,s,i),n=fp(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rr(e,t,i)):(je&&n&&Jh(t),t.flags|=1,ft(e,t,r,i),t.child)}function Lg(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!kp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,F1(e,t,s,r,i)):(e=_l(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:Go,n(o,r)&&e.ref===t.ref)return rr(e,t,i)}return t.flags|=1,e=Vr(s,r),e.ref=t.ref,e.return=t,t.child=e}function F1(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Go(s,r)&&e.ref===t.ref)if(kt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(kt=!0);else return t.lanes=e.lanes,rr(e,t,i)}return Ef(e,t,n,r,i)}function $1(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(as,Nt),Nt|=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(as,Nt),Nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,be(as,Nt),Nt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,be(as,Nt),Nt|=r;return ft(e,t,i,n),t.child}function V1(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ef(e,t,n,r,i){var s=Ct(n)?Ti:ct.current;return s=_s(t,s),ms(t,i),n=dp(e,t,n,r,s,i),r=fp(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rr(e,t,i)):(je&&r&&Jh(t),t.flags|=1,ft(e,t,n,i),t.child)}function Ig(e,t,n,r,i){if(Ct(n)){var s=!0;tu(t)}else s=!1;if(ms(t,i),t.stateNode===null)bl(e,t),z1(t,n,r),Cf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=an(u):(u=Ct(n)?Ti:ct.current,u=_s(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&jg(t,o,r,u),_r=!1;var h=t.memoizedState;o.state=h,ou(t,r,o,i),l=t.memoizedState,a!==r||h!==l||_t.current||_r?(typeof c=="function"&&(_f(t,n,c,r),l=t.memoizedState),(a=_r||Eg(t,n,a,r,h,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,g1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:mn(t.type,a),o.props=u,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=an(l):(l=Ct(n)?Ti:ct.current,l=_s(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&jg(t,o,r,l),_r=!1,h=t.memoizedState,o.state=h,ou(t,r,o,i);var m=t.memoizedState;a!==d||h!==m||_t.current||_r?(typeof p=="function"&&(_f(t,n,p,r),m=t.memoizedState),(u=_r||Eg(t,n,u,r,h,m,l)||!1)?(c||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=u):(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 jf(e,t,n,r,s,i)}function jf(e,t,n,r,i,s){V1(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&vg(t,n,!1),rr(e,t,s);r=t.stateNode,HC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ps(t,e.child,null,s),t.child=Ps(t,null,a,s)):ft(e,t,a,s),t.memoizedState=r.state,i&&vg(t,n,!0),t.child}function U1(e){var t=e.stateNode;t.pendingContext?xg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&xg(e,t.context,!1),ap(e,t.containerInfo)}function Dg(e,t,n,r,i){return Cs(),tp(i),t.flags|=256,ft(e,t,n,r),t.child}var Tf={dehydrated:null,treeContext:null,retryLane:0};function Rf(e){return{baseLanes:e,cachePool:null,transitions:null}}function W1(e,t,n){var r=t.pendingProps,i=Me.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(Me,i&1),e===null)return kf(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=Zu(o,r,0,null),e=ki(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Rf(n),t.memoizedState=Tf,e):mp(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return KC(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=Vr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Vr(a,s):(s=ki(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?Rf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Tf,r}return s=e.child,e=s.sibling,r=Vr(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 mp(e,t){return t=Zu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ua(e,t,n,r){return r!==null&&tp(r),Ps(t,e.child,null,n),e=mp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function KC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Hc(Error(U(422))),Ua(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Zu({mode:"visible",children:r.children},i,0,null),s=ki(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ps(t,e.child,null,o),t.child.memoizedState=Rf(o),t.memoizedState=Tf,s);if(!(t.mode&1))return Ua(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(U(419)),r=Hc(s,r,void 0),Ua(e,t,o,r)}if(a=(o&e.childLanes)!==0,kt||a){if(r=Ye,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,nr(e,i),wn(r,e,i,-1))}return bp(),r=Hc(Error(U(421))),Ua(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=sP.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,zt=Or(i.nextSibling),Ft=t,je=!0,yn=null,e!==null&&(Zt[Jt++]=Qn,Zt[Jt++]=Yn,Zt[Jt++]=Ri,Qn=e.id,Yn=e.overflow,Ri=t),t=mp(t,r.children),t.flags|=4096,t)}function Ng(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sf(e.return,t,n)}function Kc(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 H1(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ft(e,t,r.children,n),r=Me.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&&Ng(e,n,t);else if(e.tag===19)Ng(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(Me,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&&au(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Kc(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&&au(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Kc(t,!0,n,null,s);break;case"together":Kc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ai|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Vr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function GC(e,t,n){switch(t.tag){case 3:U1(t),Cs();break;case 5:y1(t);break;case 1:Ct(t.type)&&tu(t);break;case 4:ap(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;be(iu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(be(Me,Me.current&1),t.flags|=128,null):n&t.child.childLanes?W1(e,t,n):(be(Me,Me.current&1),e=rr(e,t,n),e!==null?e.sibling:null);be(Me,Me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return H1(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(Me,Me.current),r)break;return null;case 22:case 23:return t.lanes=0,$1(e,t,n)}return rr(e,t,n)}var K1,Mf,G1,Q1;K1=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}};Mf=function(){};G1=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,gi(Ln.current);var s=null;switch(n){case"input":i=Zd(e,i),r=Zd(e,r),s=[];break;case"select":i=Le({},i,{value:void 0}),r=Le({},r,{value:void 0}),s=[];break;case"textarea":i=tf(e,i),r=tf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Jl)}rf(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Fo.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="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(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Fo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ce("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Q1=function(e,t,n,r){n!==r&&(t.flags|=4)};function to(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 ot(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 QC(e,t,n){var r=t.pendingProps;switch(ep(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return Ct(t.type)&&eu(),ot(t),null;case 3:return r=t.stateNode,Es(),Pe(_t),Pe(ct),up(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($a(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yn!==null&&(Bf(yn),yn=null))),Mf(e,t),ot(t),null;case 5:lp(t);var i=gi(Zo.current);if(n=t.type,e!==null&&t.stateNode!=null)G1(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return ot(t),null}if(e=gi(Ln.current),$a(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Rn]=t,r[qo]=s,e=(t.mode&1)!==0,n){case"dialog":Ce("cancel",r),Ce("close",r);break;case"iframe":case"object":case"embed":Ce("load",r);break;case"video":case"audio":for(i=0;i<bo.length;i++)Ce(bo[i],r);break;case"source":Ce("error",r);break;case"img":case"image":case"link":Ce("error",r),Ce("load",r);break;case"details":Ce("toggle",r);break;case"input":Hm(r,s),Ce("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ce("invalid",r);break;case"textarea":Gm(r,s),Ce("invalid",r)}rf(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&&Fa(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Fa(r.textContent,a,e),i=["children",""+a]):Fo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ce("scroll",r)}switch(n){case"input":Aa(r),Km(r,s,!0);break;case"textarea":Aa(r),Qm(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Jl)}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=kv(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[Rn]=t,e[qo]=r,K1(e,t,!1,!1),t.stateNode=e;e:{switch(o=sf(n,r),n){case"dialog":Ce("cancel",e),Ce("close",e),i=r;break;case"iframe":case"object":case"embed":Ce("load",e),i=r;break;case"video":case"audio":for(i=0;i<bo.length;i++)Ce(bo[i],e);i=r;break;case"source":Ce("error",e),i=r;break;case"img":case"image":case"link":Ce("error",e),Ce("load",e),i=r;break;case"details":Ce("toggle",e),i=r;break;case"input":Hm(e,r),i=Zd(e,r),Ce("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Le({},r,{value:void 0}),Ce("invalid",e);break;case"textarea":Gm(e,r),i=tf(e,r),Ce("invalid",e);break;default:i=r}rf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Cv(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Sv(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&$o(e,l):typeof l=="number"&&$o(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Fo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ce("scroll",e):l!=null&&Bh(e,s,l,o))}switch(n){case"input":Aa(e),Km(e,r,!1);break;case"textarea":Aa(e),Qm(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Hr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ds(e,!!r.multiple,s,!1):r.defaultValue!=null&&ds(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Jl)}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 ot(t),null;case 6:if(e&&t.stateNode!=null)Q1(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=gi(Zo.current),gi(Ln.current),$a(t)){if(r=t.stateNode,n=t.memoizedProps,r[Rn]=t,(s=r.nodeValue!==n)&&(e=Ft,e!==null))switch(e.tag){case 3:Fa(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fa(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Rn]=t,t.stateNode=r}return ot(t),null;case 13:if(Pe(Me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&zt!==null&&t.mode&1&&!(t.flags&128))f1(),Cs(),t.flags|=98560,s=!1;else if(s=$a(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(U(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(U(317));s[Rn]=t}else Cs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ot(t),s=!1}else yn!==null&&(Bf(yn),yn=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||Me.current&1?Ke===0&&(Ke=3):bp())),t.updateQueue!==null&&(t.flags|=4),ot(t),null);case 4:return Es(),Mf(e,t),e===null&&Qo(t.stateNode.containerInfo),ot(t),null;case 10:return ip(t.type._context),ot(t),null;case 17:return Ct(t.type)&&eu(),ot(t),null;case 19:if(Pe(Me),s=t.memoizedState,s===null)return ot(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)to(s,!1);else{if(Ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=au(e),o!==null){for(t.flags|=128,to(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(Me,Me.current&1|2),t.child}e=e.sibling}s.tail!==null&&Oe()>Ts&&(t.flags|=128,r=!0,to(s,!1),t.lanes=4194304)}else{if(!r)if(e=au(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),to(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!je)return ot(t),null}else 2*Oe()-s.renderingStartTime>Ts&&n!==1073741824&&(t.flags|=128,r=!0,to(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=Oe(),t.sibling=null,n=Me.current,be(Me,r?n&1|2:n&1),t):(ot(t),null);case 22:case 23:return wp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Nt&1073741824&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function YC(e,t){switch(ep(t),t.tag){case 1:return Ct(t.type)&&eu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Es(),Pe(_t),Pe(ct),up(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return lp(t),null;case 13:if(Pe(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Me),null;case 4:return Es(),null;case 10:return ip(t.type._context),null;case 22:case 23:return wp(),null;case 24:return null;default:return null}}var Wa=!1,at=!1,qC=typeof WeakSet=="function"?WeakSet:Set,Q=null;function os(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Af(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var zg=!1;function XC(e,t){if(mf=ql,e=Jv(),Zh(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,u=0,c=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&&++u===i&&(a=o),h===s&&++c===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(gf={focusedElem:e,selectionRange:n},ql=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;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 y=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:mn(t.type,y),w);g.__reactInternalSnapshotBeforeUpdate=x}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(U(163))}}catch(b){Ne(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return m=zg,zg=!1,m}function Ro(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&&Af(t,n,s)}i=i.next}while(i!==r)}}function qu(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 Lf(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 Y1(e){var t=e.alternate;t!==null&&(e.alternate=null,Y1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rn],delete t[qo],delete t[vf],delete t[LC],delete t[IC])),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 q1(e){return e.tag===5||e.tag===3||e.tag===4}function Og(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||q1(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 If(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=Jl));else if(r!==4&&(e=e.child,e!==null))for(If(e,t,n),e=e.sibling;e!==null;)If(e,t,n),e=e.sibling}function Df(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(Df(e,t,n),e=e.sibling;e!==null;)Df(e,t,n),e=e.sibling}var qe=null,gn=!1;function cr(e,t,n){for(n=n.child;n!==null;)X1(e,t,n),n=n.sibling}function X1(e,t,n){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(Vu,n)}catch{}switch(n.tag){case 5:at||os(n,t);case 6:var r=qe,i=gn;qe=null,cr(e,t,n),qe=r,gn=i,qe!==null&&(gn?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(gn?(e=qe,n=n.stateNode,e.nodeType===8?Bc(e.parentNode,n):e.nodeType===1&&Bc(e,n),Ho(e)):Bc(qe,n.stateNode));break;case 4:r=qe,i=gn,qe=n.stateNode.containerInfo,gn=!0,cr(e,t,n),qe=r,gn=i;break;case 0:case 11:case 14:case 15:if(!at&&(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)&&Af(n,t,o),i=i.next}while(i!==r)}cr(e,t,n);break;case 1:if(!at&&(os(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}cr(e,t,n);break;case 21:cr(e,t,n);break;case 22:n.mode&1?(at=(r=at)||n.memoizedState!==null,cr(e,t,n),at=r):cr(e,t,n);break;default:cr(e,t,n)}}function Bg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qC),t.forEach(function(r){var i=oP.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cn(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,gn=!1;break e;case 3:qe=a.stateNode.containerInfo,gn=!0;break e;case 4:qe=a.stateNode.containerInfo,gn=!0;break e}a=a.return}if(qe===null)throw Error(U(160));X1(s,o,i),qe=null,gn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ne(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Z1(t,e),t=t.sibling}function Z1(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(cn(t,e),_n(e),r&4){try{Ro(3,e,e.return),qu(3,e)}catch(y){Ne(e,e.return,y)}try{Ro(5,e,e.return)}catch(y){Ne(e,e.return,y)}}break;case 1:cn(t,e),_n(e),r&512&&n!==null&&os(n,n.return);break;case 5:if(cn(t,e),_n(e),r&512&&n!==null&&os(n,n.return),e.flags&32){var i=e.stateNode;try{$o(i,"")}catch(y){Ne(e,e.return,y)}}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&&wv(i,s),sf(a,o);var u=sf(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Cv(i,d):c==="dangerouslySetInnerHTML"?Sv(i,d):c==="children"?$o(i,d):Bh(i,c,d,u)}switch(a){case"input":Jd(i,s);break;case"textarea":bv(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?ds(i,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?ds(i,!!s.multiple,s.defaultValue,!0):ds(i,!!s.multiple,s.multiple?[]:"",!1))}i[qo]=s}catch(y){Ne(e,e.return,y)}}break;case 6:if(cn(t,e),_n(e),r&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){Ne(e,e.return,y)}}break;case 3:if(cn(t,e),_n(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ho(t.containerInfo)}catch(y){Ne(e,e.return,y)}break;case 4:cn(t,e),_n(e);break;case 13:cn(t,e),_n(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(xp=Oe())),r&4&&Bg(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(at=(u=at)||c,cn(t,e),at=u):cn(t,e),_n(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Q=e,c=e.child;c!==null;){for(d=Q=c;Q!==null;){switch(h=Q,p=h.child,h.tag){case 0:case 11:case 14:case 15:Ro(4,h,h.return);break;case 1:os(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(y){Ne(r,n,y)}}break;case 5:os(h,h.return);break;case 22:if(h.memoizedState!==null){$g(d);continue}}p!==null?(p.return=h,Q=p):$g(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(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=_v("display",o))}catch(y){Ne(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){Ne(e,e.return,y)}}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;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:cn(t,e),_n(e),r&4&&Bg(e);break;case 21:break;default:cn(t,e),_n(e)}}function _n(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(q1(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($o(i,""),r.flags&=-33);var s=Og(e);Df(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Og(e);If(e,a,o);break;default:throw Error(U(161))}}catch(l){Ne(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ZC(e,t,n){Q=e,J1(e)}function J1(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var i=Q,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Wa;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||at;a=Wa;var u=at;if(Wa=o,(at=l)&&!u)for(Q=i;Q!==null;)o=Q,l=o.child,o.tag===22&&o.memoizedState!==null?Vg(i):l!==null?(l.return=o,Q=l):Vg(i);for(;s!==null;)Q=s,J1(s),s=s.sibling;Q=i,Wa=a,at=u}Fg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Q=s):Fg(e)}}function Fg(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:at||qu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!at)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&_g(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}_g(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 u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ho(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}at||t.flags&512&&Lf(t)}catch(h){Ne(t,t.return,h)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function $g(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function Vg(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qu(4,t)}catch(l){Ne(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ne(t,i,l)}}var s=t.return;try{Lf(t)}catch(l){Ne(t,s,l)}break;case 5:var o=t.return;try{Lf(t)}catch(l){Ne(t,o,l)}}}catch(l){Ne(t,t.return,l)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var JC=Math.ceil,cu=ir.ReactCurrentDispatcher,gp=ir.ReactCurrentOwner,sn=ir.ReactCurrentBatchConfig,le=0,Ye=null,Ve=null,Je=0,Nt=0,as=Xr(0),Ke=0,na=null,Ai=0,Xu=0,yp=0,Mo=null,bt=null,xp=0,Ts=1/0,Kn=null,du=!1,Nf=null,Fr=null,Ha=!1,Tr=null,fu=0,Ao=0,zf=null,kl=-1,Sl=0;function mt(){return le&6?Oe():kl!==-1?kl:kl=Oe()}function $r(e){return e.mode&1?le&2&&Je!==0?Je&-Je:NC.transition!==null?(Sl===0&&(Sl=zv()),Sl):(e=ge,e!==0||(e=window.event,e=e===void 0?16:Wv(e.type)),e):1}function wn(e,t,n,r){if(50<Ao)throw Ao=0,zf=null,Error(U(185));ha(e,n,r),(!(le&2)||e!==Ye)&&(e===Ye&&(!(le&2)&&(Xu|=n),Ke===4&&Er(e,Je)),Pt(e,r),n===1&&le===0&&!(t.mode&1)&&(Ts=Oe()+500,Gu&&Zr()))}function Pt(e,t){var n=e.callbackNode;N_(e,t);var r=Yl(e,e===Ye?Je:0);if(r===0)n!==null&&Xm(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Xm(n),t===1)e.tag===0?DC(Ug.bind(null,e)):u1(Ug.bind(null,e)),MC(function(){!(le&6)&&Zr()}),n=null;else{switch(Ov(r)){case 1:n=Wh;break;case 4:n=Dv;break;case 16:n=Ql;break;case 536870912:n=Nv;break;default:n=Ql}n=aw(n,ew.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ew(e,t){if(kl=-1,Sl=0,le&6)throw Error(U(327));var n=e.callbackNode;if(gs()&&e.callbackNode!==n)return null;var r=Yl(e,e===Ye?Je:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=hu(e,r);else{t=r;var i=le;le|=2;var s=nw();(Ye!==e||Je!==t)&&(Kn=null,Ts=Oe()+500,bi(e,t));do try{nP();break}catch(a){tw(e,a)}while(!0);rp(),cu.current=s,le=i,Ve!==null?t=0:(Ye=null,Je=0,t=Ke)}if(t!==0){if(t===2&&(i=cf(e),i!==0&&(r=i,t=Of(e,i))),t===1)throw n=na,bi(e,0),Er(e,r),Pt(e,Oe()),n;if(t===6)Er(e,r);else{if(i=e.current.alternate,!(r&30)&&!eP(i)&&(t=hu(e,r),t===2&&(s=cf(e),s!==0&&(r=s,t=Of(e,s))),t===1))throw n=na,bi(e,0),Er(e,r),Pt(e,Oe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:ui(e,bt,Kn);break;case 3:if(Er(e,r),(r&130023424)===r&&(t=xp+500-Oe(),10<t)){if(Yl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){mt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=xf(ui.bind(null,e,bt,Kn),t);break}ui(e,bt,Kn);break;case 4:if(Er(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-vn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JC(r/1960))-r,10<r){e.timeoutHandle=xf(ui.bind(null,e,bt,Kn),r);break}ui(e,bt,Kn);break;case 5:ui(e,bt,Kn);break;default:throw Error(U(329))}}}return Pt(e,Oe()),e.callbackNode===n?ew.bind(null,e):null}function Of(e,t){var n=Mo;return e.current.memoizedState.isDehydrated&&(bi(e,t).flags|=256),e=hu(e,t),e!==2&&(t=bt,bt=n,t!==null&&Bf(t)),e}function Bf(e){bt===null?bt=e:bt.push.apply(bt,e)}function eP(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(!kn(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 Er(e,t){for(t&=~yp,t&=~Xu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-vn(t),r=1<<n;e[n]=-1,t&=~r}}function Ug(e){if(le&6)throw Error(U(327));gs();var t=Yl(e,0);if(!(t&1))return Pt(e,Oe()),null;var n=hu(e,t);if(e.tag!==0&&n===2){var r=cf(e);r!==0&&(t=r,n=Of(e,r))}if(n===1)throw n=na,bi(e,0),Er(e,t),Pt(e,Oe()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ui(e,bt,Kn),Pt(e,Oe()),null}function vp(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Ts=Oe()+500,Gu&&Zr())}}function Li(e){Tr!==null&&Tr.tag===0&&!(le&6)&&gs();var t=le;le|=1;var n=sn.transition,r=ge;try{if(sn.transition=null,ge=1,e)return e()}finally{ge=r,sn.transition=n,le=t,!(le&6)&&Zr()}}function wp(){Nt=as.current,Pe(as)}function bi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,RC(n)),Ve!==null)for(n=Ve.return;n!==null;){var r=n;switch(ep(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&eu();break;case 3:Es(),Pe(_t),Pe(ct),up();break;case 5:lp(r);break;case 4:Es();break;case 13:Pe(Me);break;case 19:Pe(Me);break;case 10:ip(r.type._context);break;case 22:case 23:wp()}n=n.return}if(Ye=e,Ve=e=Vr(e.current,null),Je=Nt=t,Ke=0,na=null,yp=Xu=Ai=0,bt=Mo=null,mi!==null){for(t=0;t<mi.length;t++)if(n=mi[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}mi=null}return e}function tw(e,t){do{var n=Ve;try{if(rp(),vl.current=uu,lu){for(var r=Ae.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}lu=!1}if(Mi=0,Qe=He=Ae=null,To=!1,Jo=0,gp.current=null,n===null||n.return===null){Ke=1,na=t,Ve=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Je,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Rg(o);if(p!==null){p.flags&=-257,Mg(p,o,a,s,t),p.mode&1&&Tg(s,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var y=new Set;y.add(l),t.updateQueue=y}else m.add(l);break e}else{if(!(t&1)){Tg(s,u,t),bp();break e}l=Error(U(426))}}else if(je&&a.mode&1){var w=Rg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Mg(w,o,a,s,t),tp(js(l,a));break e}}s=l=js(l,a),Ke!==4&&(Ke=2),Mo===null?Mo=[s]:Mo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=O1(s,l,t);Sg(s,g);break e;case 1:a=l;var x=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Fr===null||!Fr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=B1(s,a,t);Sg(s,b);break e}}s=s.return}while(s!==null)}iw(n)}catch(_){t=_,Ve===n&&n!==null&&(Ve=n=n.return);continue}break}while(!0)}function nw(){var e=cu.current;return cu.current=uu,e===null?uu:e}function bp(){(Ke===0||Ke===3||Ke===2)&&(Ke=4),Ye===null||!(Ai&268435455)&&!(Xu&268435455)||Er(Ye,Je)}function hu(e,t){var n=le;le|=2;var r=nw();(Ye!==e||Je!==t)&&(Kn=null,bi(e,t));do try{tP();break}catch(i){tw(e,i)}while(!0);if(rp(),le=n,cu.current=r,Ve!==null)throw Error(U(261));return Ye=null,Je=0,Ke}function tP(){for(;Ve!==null;)rw(Ve)}function nP(){for(;Ve!==null&&!E_();)rw(Ve)}function rw(e){var t=ow(e.alternate,e,Nt);e.memoizedProps=e.pendingProps,t===null?iw(e):Ve=t,gp.current=null}function iw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=YC(n,t),n!==null){n.flags&=32767,Ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ke=6,Ve=null;return}}else if(n=QC(n,t,Nt),n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);Ke===0&&(Ke=5)}function ui(e,t,n){var r=ge,i=sn.transition;try{sn.transition=null,ge=1,rP(e,t,n,r)}finally{sn.transition=i,ge=r}return null}function rP(e,t,n,r){do gs();while(Tr!==null);if(le&6)throw Error(U(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(U(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(z_(e,s),e===Ye&&(Ve=Ye=null,Je=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ha||(Ha=!0,aw(Ql,function(){return gs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=sn.transition,sn.transition=null;var o=ge;ge=1;var a=le;le|=4,gp.current=null,XC(e,n),Z1(n,e),SC(gf),ql=!!mf,gf=mf=null,e.current=n,ZC(n),j_(),le=a,ge=o,sn.transition=s}else e.current=n;if(Ha&&(Ha=!1,Tr=e,fu=i),s=e.pendingLanes,s===0&&(Fr=null),M_(n.stateNode),Pt(e,Oe()),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(du)throw du=!1,e=Nf,Nf=null,e;return fu&1&&e.tag!==0&&gs(),s=e.pendingLanes,s&1?e===zf?Ao++:(Ao=0,zf=e):Ao=0,Zr(),null}function gs(){if(Tr!==null){var e=Ov(fu),t=sn.transition,n=ge;try{if(sn.transition=null,ge=16>e?16:e,Tr===null)var r=!1;else{if(e=Tr,Tr=null,fu=0,le&6)throw Error(U(331));var i=le;for(le|=4,Q=e.current;Q!==null;){var s=Q,o=s.child;if(Q.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(Q=u;Q!==null;){var c=Q;switch(c.tag){case 0:case 11:case 15:Ro(8,c,s)}var d=c.child;if(d!==null)d.return=c,Q=d;else for(;Q!==null;){c=Q;var h=c.sibling,p=c.return;if(Y1(c),c===u){Q=null;break}if(h!==null){h.return=p,Q=h;break}Q=p}}}var m=s.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}Q=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Q=o;else e:for(;Q!==null;){if(s=Q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ro(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,Q=g;break e}Q=s.return}}var x=e.current;for(Q=x;Q!==null;){o=Q;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,Q=v;else e:for(o=x;Q!==null;){if(a=Q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:qu(9,a)}}catch(_){Ne(a,a.return,_)}if(a===o){Q=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,Q=b;break e}Q=a.return}}if(le=i,Zr(),An&&typeof An.onPostCommitFiberRoot=="function")try{An.onPostCommitFiberRoot(Vu,e)}catch{}r=!0}return r}finally{ge=n,sn.transition=t}}return!1}function Wg(e,t,n){t=js(n,t),t=O1(e,t,1),e=Br(e,t,1),t=mt(),e!==null&&(ha(e,1,t),Pt(e,t))}function Ne(e,t,n){if(e.tag===3)Wg(e,e,n);else for(;t!==null;){if(t.tag===3){Wg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Fr===null||!Fr.has(r))){e=js(n,e),e=B1(t,e,1),t=Br(t,e,1),e=mt(),t!==null&&(ha(t,1,e),Pt(t,e));break}}t=t.return}}function iP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=mt(),e.pingedLanes|=e.suspendedLanes&n,Ye===e&&(Je&n)===n&&(Ke===4||Ke===3&&(Je&130023424)===Je&&500>Oe()-xp?bi(e,0):yp|=n),Pt(e,t)}function sw(e,t){t===0&&(e.mode&1?(t=Da,Da<<=1,!(Da&130023424)&&(Da=4194304)):t=1);var n=mt();e=nr(e,t),e!==null&&(ha(e,t,n),Pt(e,n))}function sP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sw(e,n)}function oP(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(U(314))}r!==null&&r.delete(t),sw(e,n)}var ow;ow=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_t.current)kt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return kt=!1,GC(e,t,n);kt=!!(e.flags&131072)}else kt=!1,je&&t.flags&1048576&&c1(t,ru,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bl(e,t),e=t.pendingProps;var i=_s(t,ct.current);ms(t,n),i=dp(null,t,r,e,i,n);var s=fp();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,Ct(r)?(s=!0,tu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,op(t),i.updater=Yu,t.stateNode=i,i._reactInternals=t,Cf(t,r,e,n),t=jf(null,t,r,!0,s,n)):(t.tag=0,je&&s&&Jh(t),ft(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lP(r),e=mn(r,e),i){case 0:t=Ef(null,t,r,e,n);break e;case 1:t=Ig(null,t,r,e,n);break e;case 11:t=Ag(null,t,r,e,n);break e;case 14:t=Lg(null,t,r,mn(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Ef(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Ig(e,t,r,i,n);case 3:e:{if(U1(t),e===null)throw Error(U(387));r=t.pendingProps,s=t.memoizedState,i=s.element,g1(e,t),ou(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=js(Error(U(423)),t),t=Dg(e,t,r,n,i);break e}else if(r!==i){i=js(Error(U(424)),t),t=Dg(e,t,r,n,i);break e}else for(zt=Or(t.stateNode.containerInfo.firstChild),Ft=t,je=!0,yn=null,n=p1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cs(),r===i){t=rr(e,t,n);break e}ft(e,t,r,n)}t=t.child}return t;case 5:return y1(t),e===null&&kf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,yf(r,i)?o=null:s!==null&&yf(r,s)&&(t.flags|=32),V1(e,t),ft(e,t,o,n),t.child;case 6:return e===null&&kf(t),null;case 13:return W1(e,t,n);case 4:return ap(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ps(t,null,r,n):ft(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Ag(e,t,r,i,n);case 7:return ft(e,t,t.pendingProps,n),t.child;case 8:return ft(e,t,t.pendingProps.children,n),t.child;case 12:return ft(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(iu,r._currentValue),r._currentValue=o,s!==null)if(kn(s.value,o)){if(s.children===i.children&&!_t.current){t=rr(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=Zn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Sf(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(U(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Sf(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}ft(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ms(t,n),i=an(i),r=r(i),t.flags|=1,ft(e,t,r,n),t.child;case 14:return r=t.type,i=mn(r,t.pendingProps),i=mn(r.type,i),Lg(e,t,r,i,n);case 15:return F1(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),bl(e,t),t.tag=1,Ct(r)?(e=!0,tu(t)):e=!1,ms(t,n),z1(t,r,i),Cf(t,r,i,n),jf(null,t,r,!0,e,n);case 19:return H1(e,t,n);case 22:return $1(e,t,n)}throw Error(U(156,t.tag))};function aw(e,t){return Iv(e,t)}function aP(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 tn(e,t,n,r){return new aP(e,t,n,r)}function kp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lP(e){if(typeof e=="function")return kp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$h)return 11;if(e===Vh)return 14}return 2}function Vr(e,t){var n=e.alternate;return n===null?(n=tn(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 _l(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")kp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Xi:return ki(n.children,i,s,t);case Fh:o=8,i|=8;break;case Qd:return e=tn(12,n,t,i|2),e.elementType=Qd,e.lanes=s,e;case Yd:return e=tn(13,n,t,i),e.elementType=Yd,e.lanes=s,e;case qd:return e=tn(19,n,t,i),e.elementType=qd,e.lanes=s,e;case yv:return Zu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mv:o=10;break e;case gv:o=9;break e;case $h:o=11;break e;case Vh:o=14;break e;case Sr:o=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=tn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function ki(e,t,n,r){return e=tn(7,e,r,t),e.lanes=n,e}function Zu(e,t,n,r){return e=tn(22,e,r,t),e.elementType=yv,e.lanes=n,e.stateNode={isHidden:!1},e}function Gc(e,t,n){return e=tn(6,e,null,t),e.lanes=n,e}function Qc(e,t,n){return t=tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uP(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=jc(0),this.expirationTimes=jc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Sp(e,t,n,r,i,s,o,a,l){return e=new uP(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=tn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},op(s),e}function cP(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 lw(e){if(!e)return Kr;e=e._reactInternals;e:{if(Di(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(Ct(n))return l1(e,n,t)}return t}function uw(e,t,n,r,i,s,o,a,l){return e=Sp(n,r,!0,e,i,s,o,a,l),e.context=lw(null),n=e.current,r=mt(),i=$r(n),s=Zn(r,i),s.callback=t??null,Br(n,s,i),e.current.lanes=i,ha(e,i,r),Pt(e,r),e}function Ju(e,t,n,r){var i=t.current,s=mt(),o=$r(i);return n=lw(n),t.context===null?t.context=n:t.pendingContext=n,t=Zn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Br(i,t,o),e!==null&&(wn(e,i,o,s),xl(e,i,o)),o}function pu(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 Hg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _p(e,t){Hg(e,t),(e=e.alternate)&&Hg(e,t)}function dP(){return null}var cw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cp(e){this._internalRoot=e}ec.prototype.render=Cp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));Ju(e,t,null,null)};ec.prototype.unmount=Cp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Li(function(){Ju(null,e,null,null)}),t[tr]=null}};function ec(e){this._internalRoot=e}ec.prototype.unstable_scheduleHydration=function(e){if(e){var t=$v();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pr.length&&t!==0&&t<Pr[n].priority;n++);Pr.splice(n,0,e),n===0&&Uv(e)}};function Pp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Kg(){}function fP(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=pu(o);s.call(u)}}var o=uw(t,r,e,0,null,!1,!1,"",Kg);return e._reactRootContainer=o,e[tr]=o.current,Qo(e.nodeType===8?e.parentNode:e),Li(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=pu(l);a.call(u)}}var l=Sp(e,0,!1,null,null,!1,!1,"",Kg);return e._reactRootContainer=l,e[tr]=l.current,Qo(e.nodeType===8?e.parentNode:e),Li(function(){Ju(t,l,n,r)}),l}function nc(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=pu(o);a.call(l)}}Ju(t,o,e,i)}else o=fP(n,t,e,i,r);return pu(o)}Bv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wo(t.pendingLanes);n!==0&&(Hh(t,n|1),Pt(t,Oe()),!(le&6)&&(Ts=Oe()+500,Zr()))}break;case 13:Li(function(){var r=nr(e,1);if(r!==null){var i=mt();wn(r,e,1,i)}}),_p(e,1)}};Kh=function(e){if(e.tag===13){var t=nr(e,134217728);if(t!==null){var n=mt();wn(t,e,134217728,n)}_p(e,134217728)}};Fv=function(e){if(e.tag===13){var t=$r(e),n=nr(e,t);if(n!==null){var r=mt();wn(n,e,t,r)}_p(e,t)}};$v=function(){return ge};Vv=function(e,t){var n=ge;try{return ge=e,t()}finally{ge=n}};af=function(e,t,n){switch(t){case"input":if(Jd(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=Ku(r);if(!i)throw Error(U(90));vv(r),Jd(r,i)}}}break;case"textarea":bv(e,n);break;case"select":t=n.value,t!=null&&ds(e,!!n.multiple,t,!1)}};jv=vp;Tv=Li;var hP={usingClientEntryPoint:!1,Events:[ma,ts,Ku,Pv,Ev,vp]},no={findFiberByHostInstance:pi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},pP={bundleType:no.bundleType,version:no.version,rendererPackageName:no.rendererPackageName,rendererConfig:no.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ir.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Av(e),e===null?null:e.stateNode},findFiberByHostInstance:no.findFiberByHostInstance||dP,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 Ka=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ka.isDisabled&&Ka.supportsFiber)try{Vu=Ka.inject(pP),An=Ka}catch{}}Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hP;Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pp(t))throw Error(U(200));return cP(e,t,null,n)};Wt.createRoot=function(e,t){if(!Pp(e))throw Error(U(299));var n=!1,r="",i=cw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Sp(e,1,!1,null,null,n,!1,r,i),e[tr]=t.current,Qo(e.nodeType===8?e.parentNode:e),new Cp(t)};Wt.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(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=Av(t),e=e===null?null:e.stateNode,e};Wt.flushSync=function(e){return Li(e)};Wt.hydrate=function(e,t,n){if(!tc(t))throw Error(U(200));return nc(null,e,t,!0,n)};Wt.hydrateRoot=function(e,t,n){if(!Pp(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=cw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=uw(t,null,e,1,n??null,i,!1,s,o),e[tr]=t.current,Qo(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 ec(t)};Wt.render=function(e,t,n){if(!tc(t))throw Error(U(200));return nc(null,e,t,!1,n)};Wt.unmountComponentAtNode=function(e){if(!tc(e))throw Error(U(40));return e._reactRootContainer?(Li(function(){nc(null,null,e,!1,function(){e._reactRootContainer=null,e[tr]=null})}),!0):!1};Wt.unstable_batchedUpdates=vp;Wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!tc(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return nc(e,t,n,!1,r)};Wt.version="18.3.1-next-f1338f8080-20240426";function dw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dw)}catch(e){console.error(e)}}dw(),dv.exports=Wt;var Bs=dv.exports,fw,Gg=Bs;fw=Gg.createRoot,Gg.hydrateRoot;var ko=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Yc(e){const t=C.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function mP(e,t,n={},r={}){C.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 gP(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}const hw=!1;function ra(e){return e[e.length-1]}function yP(e){return typeof e=="function"}function Rr(e,t){return yP(e)?e(t):e}const xP=Object.prototype.hasOwnProperty,Qg=Object.prototype.propertyIsEnumerable,vP=()=>Object.create(null),ii=(e,t)=>Mr(e,t,vP);function Mr(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,s=Xg(e)&&Xg(i);if(!s&&!(Rs(e)&&Rs(i)))return i;const o=s?e:Yg(e);if(!o)return i;const a=s?i:Yg(i);if(!a)return i;const l=o.length,u=a.length,c=s?new Array(u):n();let d=0;for(let h=0;h<u;h++){const p=s?h:a[h],m=e[p],y=i[p];if(m===y){c[p]=m,(s?h<l:xP.call(e,p))&&d++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[p]=y;continue}const w=Mr(m,y,n,r+1);c[p]=w,w===m&&d++}return l===u&&d===l?e:c}function Yg(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!Qg.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(!Qg.call(e,i))return!1;r.push(i)}return r}function Rs(e){if(!qg(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!qg(n)||!n.hasOwnProperty("isPrototypeOf"))}function qg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Si(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(!Si(e[r],t[r],n))return!1;return!0}if(Rs(e)&&Rs(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)&&!Si(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||!Si(e[o],t[o],n)))return!1;return i===s}return!1}function Ms(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 ia(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function wP(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Zg(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 wP(t)}const bP=["http:","https:","mailto:","tel:"];function mu(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ro(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+=Zg(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+Zg(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function kP(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function SP(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Jn(){throw new Error("Invariant failed")}function sa(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 Ar=4,pw=5;function _P(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 Ep(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=_P(s);if(o){const[a,l]=o,u=s.charCodeAt(a+1);if(u===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const c=a+3,d=l;if(c<d)return n[0]=3,n[1]=t+a,n[2]=t+c,n[3]=t+d,n[4]=t+l+1,n[5]=i,n}}else if(u===36){const c=a+1,d=a+2;return d===l?(n[0]=2,n[1]=t+a,n[2]=t+c,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 rc(e,t,n,r,i,s,o){var l,u,c,d,h,p,m,y,w,g,x,v,b;o==null||o(n);let a=r;{const _=n.fullPath??n.from,S=_.length,j=((l=n.options)==null?void 0:l.caseSensitive)??e,E=!!((c=(u=n.options)==null?void 0:u.params)!=null&&c.parse&&((h=(d=n.options)==null?void 0:d.skipRouteOnParseError)!=null&&h.params));for(;a<S;){const P=Ep(_,a,t);let R;const A=a,B=P[5];switch(a=B+1,s++,P[0]){case 0:{const I=_.substring(P[2],P[3]);if(j){const O=(p=i.static)==null?void 0:p.get(I);if(O)R=O;else{i.static??(i.static=new Map);const F=yi(n.fullPath??n.from);F.parent=i,F.depth=s,R=F,i.static.set(I,F)}}else{const O=I.toLowerCase(),F=(m=i.staticInsensitive)==null?void 0:m.get(O);if(F)R=F;else{i.staticInsensitive??(i.staticInsensitive=new Map);const H=yi(n.fullPath??n.from);H.parent=i,H.depth=s,R=H,i.staticInsensitive.set(O,H)}}break}case 1:{const I=_.substring(A,P[1]),O=_.substring(P[4],B),F=j&&!!(I||O),H=I?F?I:I.toLowerCase():void 0,z=O?F?O:O.toLowerCase():void 0,D=!E&&((y=i.dynamic)==null?void 0:y.find(k=>!k.skipOnParamError&&k.caseSensitive===F&&k.prefix===H&&k.suffix===z));if(D)R=D;else{const k=Xc(1,n.fullPath??n.from,F,H,z);R=k,k.depth=s,k.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(k)}break}case 3:{const I=_.substring(A,P[1]),O=_.substring(P[4],B),F=j&&!!(I||O),H=I?F?I:I.toLowerCase():void 0,z=O?F?O:O.toLowerCase():void 0,D=!E&&((w=i.optional)==null?void 0:w.find(k=>!k.skipOnParamError&&k.caseSensitive===F&&k.prefix===H&&k.suffix===z));if(D)R=D;else{const k=Xc(3,n.fullPath??n.from,F,H,z);R=k,k.parent=i,k.depth=s,i.optional??(i.optional=[]),i.optional.push(k)}break}case 2:{const I=_.substring(A,P[1]),O=_.substring(P[4],B),F=j&&!!(I||O),H=I?F?I:I.toLowerCase():void 0,z=O?F?O:O.toLowerCase():void 0,D=Xc(2,n.fullPath??n.from,F,H,z);R=D,D.parent=i,D.depth=s,i.wildcard??(i.wildcard=[]),i.wildcard.push(D)}}i=R}if(E&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const P=yi(n.fullPath??n.from);P.kind=pw,P.parent=i,s++,P.depth=s,i.pathless??(i.pathless=[]),i.pathless.push(P),i=P}const M=(n.path||!n.children)&&!n.isRoot;if(M&&_.endsWith("/")){const P=yi(n.fullPath??n.from);P.kind=Ar,P.parent=i,s++,P.depth=s,i.index=P,i=P}i.parse=((x=(g=n.options)==null?void 0:g.params)==null?void 0:x.parse)??null,i.skipOnParamError=E,i.parsingPriority=((b=(v=n.options)==null?void 0:v.skipRouteOnParseError)==null?void 0:b.priority)??0,M&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const _ of n.children)rc(e,t,_,a,i,s,o)}function qc(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 Cr(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Cr(i);if(e.static)for(const i of e.static.values())Cr(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Cr(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(qc);for(const i of e.dynamic)Cr(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(qc);for(const i of e.optional)Cr(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(qc);for(const i of e.wildcard)Cr(i)}}function yi(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 Xc(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 CP(e,t){const n=yi("/"),r=new Uint16Array(6);for(const i of e)rc(!1,r,i,1,n,0);Cr(n),t.masksTree=n,t.flatCache=sa(1e3)}function PP(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=jp(e,t.masksTree);return t.flatCache.set(e,r),r}function EP(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=yi("/"),rc(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(s,o)),jp(r,o,n)}function jP(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=jp(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)s=null;else throw o}return s&&(s.branch=MP(s.route)),t.matchCache.set(r,s),s}function TP(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function RP(e,t=!1,n){const r=yi(e.fullPath),i=new Uint16Array(6),s={},o={};let a=0;return rc(t,i,e,1,r,0,l=>{if(n==null||n(l,a),l.id in s&&Jn(),s[l.id]=l,a!==0&&l.path){const u=TP(l.fullPath);(!o[u]||l.fullPath.endsWith("/"))&&(o[u]=l)}a++}),Cr(r),{processedTree:{segmentTree:r,singleCache:sa(1e3),matchCache:sa(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function jp(e,t,n=!1){const r=e.split("/"),i=LP(e,r,t,n);if(!i)return null;const[s]=mw(e,r,i);return{route:i.node.route,rawParams:s,parsedParams:i.parsedParams}}function mw(e,t,n){var c,d,h,p,m,y,w,g,x,v;const r=AP(n.node);let i=null;const s=Object.create(null);let o=((c=n.extract)==null?void 0:c.part)??0,a=((d=n.extract)==null?void 0:d.node)??0,l=((h=n.extract)==null?void 0:h.path)??0,u=((p=n.extract)==null?void 0:p.segment)??0;for(;a<r.length;o++,a++,l++,u++){const b=r[a];if(b.kind===Ar)break;if(b.kind===pw){u--,o--,l--;continue}const _=t[o],S=l;if(_&&(l+=_.length),b.kind===1){i??(i=n.node.fullPath.split("/"));const j=i[u],E=((m=b.prefix)==null?void 0:m.length)??0;if(j.charCodeAt(E)===123){const M=((y=b.suffix)==null?void 0:y.length)??0,P=j.substring(E+2,j.length-M-1),R=_.substring(E,_.length-M);s[P]=decodeURIComponent(R)}else{const M=j.substring(1);s[M]=decodeURIComponent(_)}}else if(b.kind===3){if(n.skipped&1<<a){o--,l=S-1;continue}i??(i=n.node.fullPath.split("/"));const j=i[u],E=((w=b.prefix)==null?void 0:w.length)??0,M=((g=b.suffix)==null?void 0:g.length)??0,P=j.substring(E+3,j.length-M-1),R=b.suffix||b.prefix?_.substring(E,_.length-M):_;R&&(s[P]=decodeURIComponent(R))}else if(b.kind===2){const j=b,E=e.substring(S+(((x=j.prefix)==null?void 0:x.length)??0),e.length-(((v=j.suffix)==null?void 0:v.length)??0)),M=decodeURIComponent(E);s["*"]=M,s._splat=M;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:o,node:a,path:l,segment:u}]}function MP(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function AP(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function LP(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!ra(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,u=null;for(;a.length;){const c=a.pop(),{node:d,index:h,skipped:p,depth:m,statics:y,dynamics:w,optionals:g}=c;let{extract:x,rawParams:v,parsedParams:b}=c;if(d.kind===2&&d.route&&!Qa(u,c))continue;if(d.skipOnParamError){if(!Jg(e,t,c))continue;v=c.rawParams,x=c.extract,b=c.parsedParams}r&&d.route&&d.kind!==Ar&&Qa(l,c)&&(l=c);const _=h===o;if(_&&(d.route&&(!s||d.kind===Ar||d.kind===2)&&Qa(u,c)&&(u=c),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const S=_?void 0:t[h];let j;if(_&&d.index){const E={node:d.index,index:h,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b};let M=!0;if(d.index.skipOnParamError&&(Jg(e,t,E)||(M=!1)),M){if(!w&&!g&&!p&&IP(y,o))return E;Qa(u,E)&&(u=E)}}if(d.wildcard)for(let E=d.wildcard.length-1;E>=0;E--){const M=d.wildcard[E],{prefix:P,suffix:R}=M;if(!(P&&(_||!(M.caseSensitive?S:j??(j=S.toLowerCase())).startsWith(P)))){if(R){if(_)continue;const A=t.slice(h).join("/").slice(-R.length);if((M.caseSensitive?A:A.toLowerCase())!==R)continue}a.push({node:M,index:o,skipped:p,depth:m+1,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}}if(d.optional){const E=p|1<<m,M=m+1;for(let P=d.optional.length-1;P>=0;P--){const R=d.optional[P];a.push({node:R,index:h,skipped:E,depth:M,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!_)for(let P=d.optional.length-1;P>=0;P--){const R=d.optional[P],{prefix:A,suffix:B}=R;if(A||B){const I=R.caseSensitive?S:j??(j=S.toLowerCase());if(A&&!I.startsWith(A)||B&&!I.endsWith(B))continue}a.push({node:R,index:h+1,skipped:p,depth:M,statics:y,dynamics:w,optionals:g+Ga(o,h),extract:x,rawParams:v,parsedParams:b})}}if(!_&&d.dynamic&&S)for(let E=d.dynamic.length-1;E>=0;E--){const M=d.dynamic[E],{prefix:P,suffix:R}=M;if(P||R){const A=M.caseSensitive?S:j??(j=S.toLowerCase());if(P&&!A.startsWith(P)||R&&!A.endsWith(R))continue}a.push({node:M,index:h+1,skipped:p,depth:m+1,statics:y,dynamics:w+Ga(o,h),optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!_&&d.staticInsensitive){const E=d.staticInsensitive.get(j??(j=S.toLowerCase()));E&&a.push({node:E,index:h+1,skipped:p,depth:m+1,statics:y+Ga(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(!_&&d.static){const E=d.static.get(S);E&&a.push({node:E,index:h+1,skipped:p,depth:m+1,statics:y+Ga(o,h),dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}if(d.pathless){const E=m+1;for(let M=d.pathless.length-1;M>=0;M--){const P=d.pathless[M];a.push({node:P,index:h,skipped:p,depth:E,statics:y,dynamics:w,optionals:g,extract:x,rawParams:v,parsedParams:b})}}}if(u)return u;if(r&&l){let c=l.index;for(let h=0;h<l.index;h++)c+=t[h].length;const d=c===e.length?"/":e.slice(c);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(d),l}return null}function Ga(e,t){return 2**(e-t-1)}function IP(e,t){return e===2**(t-1)-1}function Jg(e,t,n){try{const[r,i]=mw(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 Qa(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===Ar)>(e.node.kind===Ar)||t.node.kind===Ar==(e.node.kind===Ar)&&t.depth>e.depth))):!0}function Cl(e){return Tp(e.filter(t=>t!==void 0).join("/"))}function Tp(e){return e.replace(/\/{2,}/g,"/")}function gw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ur(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function yw(e){return Ur(gw(e))}function gu(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function DP(e,t,n){return gu(e,n)===gu(t,n)}function NP({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&&ra(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&&(ra(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let l,u="";for(let d=0;d<a.length;d++){d>0&&(u+="/");const h=a[d];if(!h)continue;l=Ep(h,0,l);const p=l[0];if(p===0){u+=h;continue}const m=l[5],y=h.substring(0,l[1]),w=h.substring(l[4],m),g=h.substring(l[2],l[3]);p===1?u+=y||w?`${y}{$${g}}${w}`:`$${g}`:p===2?u+=y||w?`${y}{$}${w}`:"$":u+=`${y}{-$${g}}${w}`}u=Tp(u);const c=u||"/";return o&&r&&r.set(o,c),c}function zP(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 Zc(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=>ty(i,n)).join("/"):ty(r,n)}function ey({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,u="";for(;a<o;){const c=a;l=Ep(e,c,l);const d=l[5];if(a=d+1,c===d)continue;const h=l[0];if(h===0){u+="/"+e.substring(c,d);continue}if(h===2){const p=t._splat;s._splat=p,s["*"]=p;const m=e.substring(c,l[1]),y=e.substring(l[4],d);if(!p){i=!0,(m||y)&&(u+="/"+m+y);continue}const w=Zc("_splat",t,n);u+="/"+m+w+y;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(c,l[1]),y=e.substring(l[4],d),w=Zc(p,t,n)??"undefined";u+="/"+m+w+y;continue}if(h===3){const p=e.substring(l[2],l[3]),m=t[p];if(m==null)continue;s[p]=m;const y=e.substring(c,l[1]),w=e.substring(l[4],d),g=Zc(p,t,n)??"";u+="/"+y+g+w;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:s,interpolatedPath:u||"/",isMissingParams:i}}function ty(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function ut(e){return(e==null?void 0:e.isNotFound)===!0}function OP(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const BP="tsr-scroll-restoration-v1_3";function FP(){const e=OP();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Rs(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=Rr(r,t)||t},persist:()=>{try{e.setItem(BP,JSON.stringify(t))}catch{}}}}const ny=FP(),$P=e=>e.state.__TSR_key||e.href;function VP(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 Ya=!1;const io="window",ry="data-scroll-restoration-id";function UP(e,t){if(!ny)return;const n=ny;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Ya=!1;const r=e.options.getScrollRestorationKey||$P,i=new Map;window.history.scrollRestoration="manual";const s=a=>{if(!(Ya||!e.isScrollRestoring))if(a.target===document||a.target===window)i.set(io,{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 u;if(!e.isScrollRestoring||!a||i.size===0||!n)return;const l=(u=n.state)[a]||(u[a]={});for(const[c,d]of i){let h;if(c===io)h=io;else if(c.isConnected){const p=c.getAttribute(ry);h=p?`[${ry}="${p}"]`:VP(c)}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),u=e.options.scrollRestorationBehavior,c=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Ya=!0;try{const h=e.isScrollRestoring?n.state[l]:void 0;let p=!1;if(h)for(const m in h){const y=h[m];if(!Rs(y))continue;const{scrollX:w,scrollY:g}=y;if(!(!Number.isFinite(w)||!Number.isFinite(g))){if(m===io)window.scrollTo({top:g,left:w,behavior:u}),p=!0;else if(m){let x;try{x=document.querySelector(m)}catch{continue}x&&(x.scrollLeft=w,x.scrollTop=g,p=!0)}}}if(!p){const m=e.history.location.hash.slice(1);if(m){const y=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(y){const w=document.getElementById(m);w&&w.scrollIntoView(y)}}else{const y={top:0,left:0,behavior:u};if(window.scrollTo(y),c)for(const w of c){if(w===io)continue;const g=typeof w=="function"?w():document.querySelector(w);g&&g.scrollTo(y)}}}}finally{Ya=!1}e.isScrollRestoring&&n.set(h=>(h[l]||(h[l]={}),h))}})}function WP(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 Jc(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function HP(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]=Jc(i):Array.isArray(s)?s.push(Jc(i)):n[r]=[s,Jc(i)]}return n}const KP=QP(JSON.parse),GP=YP(JSON.stringify,JSON.parse);function QP(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=HP(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function YP(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=WP(i,r);return s?`?${s}`:""}}const _i="__root__";function qP(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 St(e){return e instanceof Response&&!!e.options}function XP(e){return{input:({url:t})=>{for(const n of e)t=Ff(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=xw(e[n],t);return t}}}function ZP(e){const t=yw(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=Cl(["/",t,o.pathname]),o)}}function Ff(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 xw(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 JP(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:s}=t,o=new Map,a=new Map,l=new Map,u=n(e.status),c=n(e.loadedAt),d=n(e.isLoading),h=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),y=n(e.statusCode),w=n(e.redirect),g=n([]),x=n([]),v=n([]),b=r(()=>ed(o,g.get())),_=r(()=>ed(a,x.get())),S=r(()=>ed(l,v.get())),j=r(()=>g.get()[0]),E=r(()=>g.get().some(H=>{var z;return((z=o.get(H))==null?void 0:z.get().status)==="pending"})),M=r(()=>{var H;return{locationHref:p.get().href,resolvedLocationHref:(H=m.get())==null?void 0:H.href,status:u.get()}}),P=r(()=>({status:u.get(),loadedAt:c.get(),isLoading:d.get(),isTransitioning:h.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:w.get()})),R=sa(64);function A(H){let z=R.get(H);return z||(z=r(()=>{const D=g.get();for(const k of D){const K=o.get(k);if(K&&K.routeId===H)return K.get()}}),R.set(H,z)),z}const B={status:u,loadedAt:c,isLoading:d,isTransitioning:h,location:p,resolvedLocation:m,statusCode:y,redirect:w,matchesId:g,pendingIds:x,cachedIds:v,matches:b,pendingMatches:_,cachedMatches:S,firstId:j,hasPending:E,matchRouteDeps:M,matchStores:o,pendingMatchStores:a,cachedMatchStores:l,__store:P,getRouteMatchStore:A,setMatches:I,setPending:O,setCached:F};I(e.matches),s==null||s(B);function I(H){td(H,o,g,n,i)}function O(H){td(H,a,x,n,i)}function F(H){td(H,l,v,n,i)}return B}function ed(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function td(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 u=r(a);u.routeId=a.routeId,t.set(a.id,u);continue}l.routeId=a.routeId,l.get()!==a&&l.set(a)}SP(n.get(),s)||n.set(s)})}const $f=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},eE=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),ic=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ci=(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},iy=(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},Lr=(e,t,n)=>{var r,i,s;if(!(!St(n)&&!ut(n)))throw St(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:St(n)?"redirected":ut(n)?"notFound":o.status==="pending"?"success":o.status,context:Ci(e,t.index),isFetching:!1,error:n})),ut(n)&&!n.routeId&&(n.routeId=t.routeId),(s=t._nonReactive.loadPromise)==null||s.resolve()),St(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},vw=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},sy=(e,t,n)=>{const r=Ci(e,n);e.updateMatch(t,i=>({...i,context:r}))},so=(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),Lr(e,e.router.getMatch(i),n);try{(l=(a=o.options).onError)==null||l.call(a,n)}catch(u){n=u,Lr(e,e.router.getMatch(i),n)}e.updateMatch(i,u=>{var c,d;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(d=u._nonReactive.loadPromise)==null||d.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!St(n)&&!ut(n)&&(e.serialError??(e.serialError=n))},ww=(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&&!ic(e,t)&&(n.options.loader||n.options.beforeLoad||kw(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((s=e.router.options)==null?void 0:s.defaultPendingComponent))){const o=setTimeout(()=>{$f(e)},i);r._nonReactive.pendingTimeout=o}},tE=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;ww(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Lr(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},nE=(e,t,n,r)=>{const i=e.router.getMatch(t);let s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Ms(()=>{s==null||s.resolve(),s=void 0});const{paramsError:o,searchError:a}=i;o&&so(e,n,o,"PARSE_PARAMS"),a&&so(e,n,a,"VALIDATE_SEARCH"),ww(e,t,r,i);const l=new AbortController;let u=!1;const c=()=>{u||(u=!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,_=>({..._,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{c(),d()});return}i._nonReactive.beforeLoadPromise=Ms();const h={...Ci(e,n,!1),...i.__routeContext},{search:p,params:m,cause:y}=i,w=ic(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":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},x=b=>{if(b===void 0){e.router.batch(()=>{c(),d()});return}(St(b)||ut(b))&&(c(),so(e,n,b,"BEFORE_LOAD")),e.router.batch(()=>{c(),e.updateMatch(t,_=>({..._,__beforeLoadContext:b})),d()})};let v;try{if(v=r.options.beforeLoad(g),ia(v))return c(),v.catch(b=>{so(e,n,b,"BEFORE_LOAD")}).then(x)}catch(b){c(),so(e,n,b,"BEFORE_LOAD")}x(v)},rE=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>a(),o=()=>nE(e,n,t,i),a=()=>{if(vw(e,n))return;const l=tE(e,n,i);return ia(l)?l.then(o):o()};return s()},iE=(e,t,n)=>{var s,o,a,l,u,c;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),(c=(u=n.options).headers)==null?void 0:c.call(u,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}))},bw=(e,t,n,r,i)=>{const s=t[r-1],{params:o,loaderDeps:a,abortController:l,cause:u}=e.router.getMatch(n),c=Ci(e,r),d=ic(e,n);return{params:o,deps:a,preload:!!d,parentMatchPromise:s,abortController:l,context:c,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:d?"preload":u,route:i,...e.router.options.additionalContext}},oy=async(e,t,n,r,i)=>{var s,o,a,l,u;try{const c=e.router.getMatch(n);try{(!(hw??e.router.isServer)||c.ssr===!0)&&oa(i);const d=i.options.loader,h=typeof d=="function"?d:d==null?void 0:d.handler,p=h==null?void 0:h(bw(e,t,n,r,i)),m=!!h&&ia(p);if((m||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(n,w=>({...w,isFetching:"loader"})),h){const w=m?await p:p;Lr(e,e.router.getMatch(n),w),w!==void 0&&e.updateMatch(n,g=>({...g,loaderData:w}))}i._lazyPromise&&await i._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,w=>({...w,error:void 0,context:Ci(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let h=d;if((h==null?void 0:h.name)==="AbortError"){if(c.abortController.signal.aborted){(s=c._nonReactive.loaderPromise)==null||s.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:Ci(e,r)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,ut(d)&&await((a=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:a.call(o)),Lr(e,e.router.getMatch(n),d);try{(u=(l=i.options).onError)==null||u.call(l,d)}catch(m){h=m,Lr(e,e.router.getMatch(n),m)}!St(h)&&!ut(h)&&await oa(i,["errorComponent"]),e.updateMatch(n,m=>({...m,error:h,context:Ci(e,r),status:"error",isFetching:!1}))}}catch(c){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),Lr(e,d,c)}},sE=async(e,t,n)=>{var p,m,y,w;async function r(g,x,v,b,_){const S=Date.now()-x.updatedAt,j=g?_.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:_.options.staleTime??e.router.options.defaultStaleTime??0,E=_.options.shouldReload,M=typeof E=="function"?E(bw(e,t,i,n,_)):E,{status:P,invalid:R}=b,A=S>=j&&(!!e.forceStaleReload||b.cause==="enter"||v!==void 0&&v!==b.id);o=P==="success"&&(R||(M??A)),g&&_.options.preload===!1||(o&&!e.sync&&c?(a=!0,(async()=>{var B,I;try{await oy(e,t,i,n,_);const O=e.router.getMatch(i);(B=O._nonReactive.loaderPromise)==null||B.resolve(),(I=O._nonReactive.loadPromise)==null||I.resolve(),O._nonReactive.loaderPromise=void 0,O._nonReactive.loadPromise=void 0}catch(O){St(O)&&await e.router.navigate(O.options)}})()):P!=="success"||o?await oy(e,t,i,n,_):sy(e,i,n))}const{id:i,routeId:s}=e.matches[n];let o=!1,a=!1;const l=e.router.looseRoutesById[s],u=l.options.loader,c=((typeof u=="function"||u==null?void 0:u.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(vw(e,i)){if(!e.router.getMatch(i))return e.matches[n];sy(e,i,n)}else{const g=e.router.getMatch(i),x=e.router.stores.matchesId.get()[n],v=((p=x&&e.router.stores.matchStores.get(x)||null)==null?void 0:p.routeId)===s?x:(m=e.router.stores.matches.get().find(_=>_.routeId===s))==null?void 0:m.id,b=ic(e,i);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload&&c)return g;await g._nonReactive.loaderPromise;const _=e.router.getMatch(i),S=_._nonReactive.error||_.error;S&&Lr(e,_,S),_.status==="pending"&&await r(b,g,v,_,l)}else{const _=b&&!e.router.stores.matchStores.has(i),S=e.router.getMatch(i);S._nonReactive.loaderPromise=Ms(),_!==S.preload&&e.updateMatch(i,j=>({...j,preload:_})),await r(b,g,v,S,l)}}const d=e.router.getMatch(i);a||((y=d._nonReactive.loaderPromise)==null||y.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 ay(e){var h,p;const t=e,n=[];eE(t.router)&&$f(t);let r;for(let m=0;m<t.matches.length;m++){try{const y=rE(t,m);ia(y)&&await y}catch(y){if(St(y))throw y;if(ut(y))r=y;else if(!t.preload)throw y;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?iy(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(sE(t,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const y of m){if(y.status!=="rejected")continue;const w=y.reason;if(St(w))throw w;ut(w)?a??(a=w):l??(l=w)}if(l!==void 0)throw l}const u=a??(r&&!t.preload?r:void 0);let c=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const m=iy(t,u);m===void 0&&Jn();const y=t.matches[m],w=t.router.looseRoutesById[y.routeId],g=(h=t.router.options)==null?void 0:h.defaultNotFoundComponent;!w.options.notFoundComponent&&g&&(w.options.notFoundComponent=g),u.routeId=y.routeId;const x=y.routeId===t.router.routeTree.id;t.updateMatch(y.id,v=>({...v,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),c=m,await oa(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,y=>({...y,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const m=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await oa(m,["errorComponent"])}for(let m=0;m<=c;m++){const{id:y,routeId:w}=t.matches[m],g=t.router.looseRoutesById[w];try{const x=iE(t,y,g);if(x){const v=await x;t.updateMatch(y,b=>({...b,...v}))}}catch(x){console.error(`Error executing head for route ${w}:`,x)}}const d=$f(t);if(ia(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function ly(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 oa(e,t=Pl){!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===Pl?(()=>{if(e._componentsPromise===void 0){const r=ly(e,Pl);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():ly(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function kw(e){var t;for(const n of Pl)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Pl=["component","errorComponent","pendingComponent","notFoundComponent"];var Wr="__TSR_index",uy="popstate",cy="beforeunload";function oE(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 u=((d=e.getBlockers)==null?void 0:d.call(e))??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&c)for(const p of u){const m=yu(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 u=t.state[Wr];a=dy(u+1,a),s({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const u=t.state[Wr];a=dy(u,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[Wr]!==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 c,d;const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];(d=e.setBlockers)==null||d.call(e,u.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 dy(e,t){t||(t={});const n=Rp();return{...t,key:n,__TSR_key:n,[Wr]:e}}function aE(e){var E,M;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,o=P=>i=P,a=P=>P,l=()=>yu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((E=t.history.state)!=null&&E.__TSR_key)&&!((M=t.history.state)!=null&&M.key)){const P=Rp();t.history.replaceState({[Wr]:0,key:P,__TSR_key:P},"")}let u=l(),c,d=!1,h=!1,p=!1,m=!1;const y=()=>u;let w,g;const x=()=>{w&&(j._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),j._ignoreSubscribers=!1,w=void 0,g=void 0,c=void 0)},v=(P,R,A)=>{const B=a(R);g||(c=u),u=yu(R,A),w={href:B,state:A,isPush:(w==null?void 0:w.isPush)||P==="push"},g||(g=Promise.resolve().then(()=>x()))},b=P=>{u=l(),j.notify({type:P})},_=async()=>{if(h){h=!1;return}const P=l(),R=P.state[Wr]-u.state[Wr],A=R===1,B=R===-1,I=!A&&!B||d;d=!1;const O=I?"GO":B?"BACK":"FORWARD",F=I?{type:"GO",index:R}:{type:B?"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:u,nextLocation:P,action:O})){h=!0,t.history.go(1),j.notify(F);return}}}u=l(),j.notify(F)},S=P=>{if(m){m=!1;return}let R=!1;const A=s();if(typeof document<"u"&&A.length)for(const B of A){const I=B.enableBeforeUnload??!0;if(I===!0){R=!0;break}if(typeof I=="function"&&I()===!0){R=!0;break}}if(R)return P.preventDefault(),P.returnValue=""},j=oE({getLocation:y,getLength:()=>t.history.length,pushState:(P,R)=>v("push",P,R),replaceState:(P,R)=>v("replace",P,R),back:P=>(P&&(p=!0),m=!0,t.history.back()),forward:P=>{P&&(p=!0),m=!0,t.history.forward()},go:P=>{d=!0,t.history.go(P)},createHref:P=>a(P),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(cy,S,{capture:!0}),t.removeEventListener(uy,_)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(cy,S,{capture:!0}),t.addEventListener(uy,_),t.history.pushState=function(...P){const R=n.apply(t.history,P);return j._ignoreSubscribers||b("PUSH"),R},t.history.replaceState=function(...P){const R=r.apply(t.history,P);return j._ignoreSubscribers||b("REPLACE"),R},j}function lE(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function yu(e,t){const n=lE(e),r=n.indexOf("#"),i=n.indexOf("?"),s=Rp();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||{[Wr]:0,key:s,__TSR_key:s}}}function Rp(){return(Math.random()+1).toString(36).substring(7)}function ys(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 uE=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 c;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=zP(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=aE()),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=sa(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=JP(dE(this.latestLocation),d),UP(this)}let a=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(s||i!==l||o!==u){this.basepath=l;const d=[],h=yw(l);h&&h!=="/"&&d.push(ZP({basepath:l})),u&&d.push(u),this.rewrite=d.length===0?void 0:d.length===1?d[0]:XP(d),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((c=window.CSS)==null?void 0:c.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=RP(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&CP(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:u,hash:c,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const g=this.options.parseSearch(u),x=this.options.stringifySearch(g);return{href:l+x+c,publicHref:l+x+c,pathname:ro(l).path,external:!1,searchStr:x,search:ii(r==null?void 0:r.search,g),hash:ro(c.slice(1)).path,state:Mr(r==null?void 0:r.state,h)}}const p=new URL(d,this.origin),m=Ff(this.rewrite,p),y=this.options.parseSearch(m.search),w=this.options.stringifySearch(y);return m.search=w,{href:m.href.replace(m.origin,""),publicHref:d,pathname:ro(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:w,search:ii(r==null?void 0:r.search,y),hash:ro(m.hash.slice(1)).path,state:Mr(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)=>NP({base:n,to:Tp(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=>fE({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 P,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,u=this.resolvePathWithBase(l,"."),c=a.search,d=Object.assign(Object.create(null),a.params),h=s.to?this.resolvePathWithBase(u,`${s.to}`):this.resolvePathWithBase(u,"."),p=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?d:Object.assign(d,Rr(s.params,d)),m=this.getMatchedRoutes(h);let y=m.matchedRoutes;if((!m.foundRoute||m.foundRoute.path!=="/"&&m.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(p).length>0)for(const A of y){const B=((P=A.options.params)==null?void 0:P.stringify)??A.options.stringifyParams;if(B)try{Object.assign(p,B(p))}catch{}}const w=n.leaveParams?h:ro(ey({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let g=c;if(n._includeValidateSearch&&((R=this.options.search)!=null&&R.strict)){const A={};y.forEach(B=>{if(B.options.validateSearch)try{Object.assign(A,El(B.options.validateSearch,{...A,...g}))}catch{}}),g=A}g=hE({search:g,dest:s,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),g=ii(c,g);const x=this.options.stringifySearch(g),v=s.hash===!0?o.hash:s.hash?Rr(s.hash,o.hash):void 0,b=v?`#${v}`:"";let _=s.state===!0?o.state:s.state?Rr(s.state,o.state):{};_=Mr(o.state,_);const S=`${w}${x}${b}`;let j,E,M=!1;if(this.rewrite){const A=new URL(S,this.origin),B=xw(this.rewrite,A);j=A.href.replace(A.origin,""),B.origin!==this.origin?(E=B.href,M=!0):E=B.pathname+B.search+B.hash}else j=kP(S),E=j;return{publicHref:E,href:j,pathname:w,search:g,searchStr:x,state:_,hash:v??"",external:M,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{const a=r(s);let l=o?r(o):void 0;if(!l){const u=Object.create(null);if(this.options.routeMasks){const c=PP(a.pathname,this.processedTree);if(c){Object.assign(u,c.rawParams);const{from:d,params:h,...p}=c.route,m=h===!1||h===null?Object.create(null):(h??!0)===!0?u:Object.assign(u,Rr(h,u));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(c=>{i.state[c]=this.latestLocation.state[c]});const u=Si(i.state,this.latestLocation.state);return l.forEach(c=>{delete i.state[c]}),u},o=Ur(this.latestLocation.href)===Ur(i.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=Ms(()=>{a==null||a.resolve(),a=void 0}),o&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...c}=i;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](c.publicHref,c.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=yu(a,{__TSR_index:n?d:d+1}),p=new URL(h.pathname,this.origin);l.to=Ff(this.rewrite,p).pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:s,...o})=>{var l,u;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 c=!a&&s?s:i;if(mu(c,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const d=((u=(l=this.history).getBlockers)==null?void 0:u.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(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),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 u;try{this.beforeLoad();const c=this.latestLocation,d=ys(c,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...d}),this.emit({type:"onBeforeLoad",...d}),await ay({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===c.href,matches:this.stores.pendingMatches.get(),location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var w,g;let h=null,p=null,m=null,y=null;this.batch(()=>{const x=this.stores.pendingMatches.get(),v=x.length,b=this.stores.matches.get();h=v?b.filter(j=>!this.stores.pendingMatchStores.has(j.id)):null;const _=new Set;for(const j of this.stores.pendingMatchStores.values())j.routeId&&_.add(j.routeId);const S=new Set;for(const j of this.stores.matchStores.values())j.routeId&&S.add(j.routeId);p=v?b.filter(j=>!_.has(j.routeId)):null,m=v?x.filter(j=>!S.has(j.routeId)):null,y=v?x.filter(j=>S.has(j.routeId)):b,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(x),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(j=>j.status!=="error"&&j.status!=="notFound"&&j.status!=="redirected")]),this.clearExpiredCache())});for(const[x,v]of[[p,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(x)for(const b of x)(g=(w=this.looseRoutesById[b.routeId].options)[v])==null||g.call(w,b)})})}})}catch(c){St(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):ut(c)&&(i=c);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&&((u=this.commitLocationPromise)==null||u.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(ys(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(u=>u!==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&&mu(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=oa,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 ay({router:this,matches:i,location:r,preload:!0,updateMatch:(l,u)=>{s.has(l)?i=i.map(c=>c.id===l?u(c):c):this.updateMatch(l,u)}}),i}catch(l){if(St(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:r});ut(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=EP(s.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!a||n.params&&!Si(a.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Si(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??GP,parseSearch:e.parseSearch??KP,protocolAllowlist:e.protocolAllowlist??bP}),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["**"]:Ur(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const l=a?mE(this.options.notFoundMode,o):void 0,u=new Array(o.length),c=new Map;for(const p of this.stores.matchStores.values())p.routeId&&c.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const m=o[p],y=u[p-1];let w,g,x;{const O=(y==null?void 0:y.search)??e.search,F=(y==null?void 0:y._strictSearch)??void 0;try{const H=El(m.options.validateSearch,{...O})??void 0;w={...O,...H},g={...F,...H},x=void 0}catch(H){let z=H;if(H instanceof xu||(z=new xu(H.message,{cause:H})),t!=null&&t.throwOnError)throw z;w=O,g={},x=z}}const v=((h=(d=m.options).loaderDeps)==null?void 0:h.call(d,{search:w}))??"",b=v?JSON.stringify(v):"",{interpolatedPath:_,usedParams:S}=ey({path:m.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),j=m.id+_+b,E=this.getMatch(j),M=c.get(m.id),P=(E==null?void 0:E._strictParams)??S;let R;if(!E)try{fy(m,S,s,P)}catch(O){if(ut(O)||St(O)?R=O:R=new cE(O.message,{cause:O}),t!=null&&t.throwOnError)throw R}Object.assign(i,P);const A=M?"stay":"enter";let B;if(E)B={...E,cause:A,params:(M==null?void 0:M.params)??i,_strictParams:P,search:ii(M?M.search:E.search,w),_strictSearch:g};else{const O=m.options.loader||m.options.beforeLoad||m.lazyFn||kw(m)?"pending":"success";B={id:j,ssr:m.options.ssr,index:p,routeId:m.id,params:(M==null?void 0:M.params)??i,_strictParams:P,pathname:_,updatedAt:Date.now(),search:M?ii(M.search,w):w,_strictSearch:g,searchError:void 0,status:O,isFetching:!1,error:void 0,paramsError:R,__routeContext:void 0,_nonReactive:{loadPromise:Ms()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:A,loaderDeps:M?Mr(M.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||(B.globalNotFound=l===m.id),B.searchError=x;const I=this.getParentContext(y);B.context={...I,...B.__routeContext,...B.__beforeLoadContext},u[p]=B}for(let p=0;p<u.length;p++){const m=u[p],y=this.looseRoutesById[m.routeId],w=this.getMatch(m.id),g=c.get(m.routeId);if(m.params=g?ii(g.params,i):i,!w){const x=u[p-1],v=this.getParentContext(x);if(y.options.context){const b={deps:m.loaderDeps,params:m.params,context:v??{},location:e,navigate:_=>this.navigate({..._,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:y.id};m.__routeContext=y.options.context(b)??void 0}m.context={...v,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(e){var c;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=ra(t),s={...e.search};for(const d of t)try{Object.assign(s,El(d.options.validateSearch,s))}catch{}const o=ra(this.stores.matchesId.get()),a=o&&((c=this.stores.matchStores.get(o))==null?void 0:c.get()),l=a&&a.routeId===i.id&&a.pathname===e.pathname;let u;if(l)u=a.params;else{const d=Object.assign(Object.create(null),n);for(const h of t)try{fy(h,n,r??{},d)}catch{}u=d}return{matchedRoutes:t,fullPath:i.fullPath,search:s,params:u}}},xu=class extends Error{},cE=class extends Error{};function dE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function El(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new xu("Async validation not supported");if(n.issues)throw new xu(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 fE({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Ur(e);let s,o;const a=jP(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 hE({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return pE(n)(e,t,r??!1)}function pE(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 u=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(u=s.options.preSearchFilters.reduce((d,h)=>h(d),a));const c=l(u);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((d,h)=>h(d),c):c};t.middlewares.push(o)}if(s.options.validateSearch){const o=({search:a,next:l})=>{const u=l(a);if(!t._includeValidateSearch)return u;try{return{...u,...El(s.options.validateSearch,u)??void 0}}catch{return u}};t.middlewares.push(o)}}const n=({search:s})=>{const o=t.dest;return o.search?o.search===!0?s:Rr(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:c=>r(s+1,c,a)})};return function(o,a,l){return t.dest=a,t._includeValidateSearch=l,r(0,o,t.middlewares)}}function mE(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 _i}function fy(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 gE="Error preloading route! ☝️";var Sw=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,u;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=_i:this.parentRoute||Jn();let i=r?_i:n==null?void 0:n.path;i&&i!=="/"&&(i=gw(i));const s=(n==null?void 0:n.id)||i;let o=r?_i:Cl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=Cl(["/",o]));const a=o==="__root__"?"/":Cl([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=a,this._to=Ur(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=>qP({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.")}},yE=class extends Sw{constructor(e){super(e)}};function xE(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 Mp(e){const t=e.errorComponent??Ap;return f.jsx(vE,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var vE=class extends C.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 Ap({error:e}){const[t,n]=C.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 wE({children:e,fallback:t=null}){return _w()?f.jsx(ks.Fragment,{children:e}):f.jsx(ks.Fragment,{children:t})}function _w(){return ks.useSyncExternalStore(bE,()=>!0,()=>!1)}function bE(){return()=>{}}var Cw=C.createContext(null);function Kt(e){return C.useContext(Cw)}var sc=C.createContext(void 0),kE=C.createContext(void 0),Ee=(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))(Ee||{});function SE({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:s,checkDirty:o,shallowPropagate:a};function r(u,c,d){const h=c.depsTail;if(h!==void 0&&h.dep===u)return;const p=h!==void 0?h.nextDep:c.deps;if(p!==void 0&&p.dep===u){p.version=d,c.depsTail=p;return}const m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===c)return;const y=c.depsTail=u.subsTail={version:d,dep:u,sub:c,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=y),h!==void 0?h.nextDep=y:c.deps=y,m!==void 0?m.nextSub=y:u.subs=y}function i(u,c=u.sub){const d=u.dep,h=u.prevDep,p=u.nextDep,m=u.nextSub,y=u.prevSub;return p!==void 0?p.prevDep=h:c.depsTail=h,h!==void 0?h.nextDep=p:c.deps=p,m!==void 0?m.prevSub=y:d.subsTail=y,y!==void 0?y.nextSub=m:(d.subs=m)===void 0&&n(d),p}function s(u){let c=u.nextSub,d;e:do{const h=u.sub;let p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(u,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 y=(u=m).nextSub;y!==void 0&&(d={value:c,prev:d},c=y);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let d,h=0,p=!1;e:do{const m=u.dep,y=m.flags;if(c.flags&16)p=!0;else if((y&17)===17){if(e(m)){const w=m.subs;w.nextSub!==void 0&&a(w),p=!0}}else if((y&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,c=m,++h;continue}if(!p){const w=u.nextDep;if(w!==void 0){u=w;continue}}for(;h--;){const w=c.subs,g=w.nextSub!==void 0;if(g?(u=d.value,d=d.prev):u=w,p){if(e(c)){g&&a(w),c=u.sub;continue}p=!1}else c.flags&=-33;c=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return p}while(!0)}function a(u){do{const c=u.sub,d=c.flags;(d&48)===32&&(c.flags=d|16,(d&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let d=c.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function _E(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 Vf=[];let jl=0;const{link:hy,unlink:CE,propagate:PE,checkDirty:Pw,shallowPropagate:py}=SE({update(e){return e._update()},notify(e){Vf[Uf++]=e,e.flags&=~Ee.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ee.Mutable|Ee.Dirty,vu(e))}});let qa=0,Uf=0,jn,Wf=0;function Ew(e){try{++Wf,e()}finally{--Wf||jw()}}function vu(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=CE(n,e)}function jw(){if(!(Wf>0)){for(;qa<Uf;){const e=Vf[qa];Vf[qa++]=void 0,e.notify()}qa=0,Uf=0}}function my(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?Ee.None:Ee.Mutable,get(){return jn!==void 0&&hy(i,jn,jl),i._snapshot},subscribe(s){const o=_E(s),a={current:!1},l=EE(()=>{var u;i.get(),a.current?(u=o.next)==null||u.call(o,i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const o=jn,a=(t==null?void 0:t.compare)??Object.is;if(n)jn=i,++jl,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=Ee.Mutable|Ee.RecursedCheck);try{const l=i._snapshot,u=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!a(l,u)?(i._snapshot=u,!0):!1}finally{jn=o,n&&(i.flags&=~Ee.RecursedCheck),vu(i)}}};return n?(i.flags=Ee.Mutable|Ee.Dirty,i.get=function(){const s=i.flags;if(s&Ee.Dirty||s&Ee.Pending&&Pw(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&py(o)}}else s&Ee.Pending&&(i.flags=s&~Ee.Pending);return jn!==void 0&&hy(i,jn,jl),i._snapshot}):i.set=function(s){if(i._update(s)){const o=i.subs;o!==void 0&&(PE(o),py(o),jw())}},i}function EE(e){const t=()=>{const r=jn;jn=n,++jl,n.depsTail=void 0,n.flags=Ee.Watching|Ee.RecursedCheck;try{return e()}finally{jn=r,n.flags&=~Ee.RecursedCheck,vu(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ee.Watching|Ee.RecursedCheck,notify(){const r=this.flags;r&Ee.Dirty||r&Ee.Pending&&Pw(this.deps,this)?t():this.flags=Ee.Watching},stop(){this.flags=Ee.None,this.depsTail=void 0,vu(this)}};return t(),n}var Tw={exports:{}},Rw={},Mw={exports:{}},Aw={};/**
41
+ * @license React
42
+ * use-sync-external-store-shim.production.js
43
+ *
44
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */var As=C;function jE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var TE=typeof Object.is=="function"?Object.is:jE,RE=As.useState,ME=As.useEffect,AE=As.useLayoutEffect,LE=As.useDebugValue;function IE(e,t){var n=t(),r=RE({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return AE(function(){i.value=n,i.getSnapshot=t,nd(i)&&s({inst:i})},[e,n,t]),ME(function(){return nd(i)&&s({inst:i}),e(function(){nd(i)&&s({inst:i})})},[e]),LE(n),n}function nd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!TE(e,n)}catch{return!0}}function DE(e,t){return t()}var NE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?DE:IE;Aw.useSyncExternalStore=As.useSyncExternalStore!==void 0?As.useSyncExternalStore:NE;Mw.exports=Aw;var zE=Mw.exports;/**
49
+ * @license React
50
+ * use-sync-external-store-shim/with-selector.production.js
51
+ *
52
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE file in the root directory of this source tree.
56
+ */var oc=C,OE=zE;function BE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FE=typeof Object.is=="function"?Object.is:BE,$E=OE.useSyncExternalStore,VE=oc.useRef,UE=oc.useEffect,WE=oc.useMemo,HE=oc.useDebugValue;Rw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=VE(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=WE(function(){function l(p){if(!u){if(u=!0,c=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,FE(c,p))return m;var y=r(p);return i!==void 0&&i(m,y)?(c=p,m):(c=p,d=y)}var u=!1,c,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=$E(e,s[0],s[1]);return UE(function(){o.hasValue=!0,o.value=a},[a]),HE(a),a};Tw.exports=Rw;var Lw=Tw.exports;const KE=Fu(Lw);function GE(e,t){return e===t}function Tt(e,t,n=GE){const r=C.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(o);return a},[e]),i=C.useCallback(()=>e==null?void 0:e.get(),[e]);return Lw.useSyncExternalStoreWithSelector(r,i,i,t,n)}var QE={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ni(e){const t=Kt(),n=C.useContext(e.from?kE:sc),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=C.useRef(void 0);return Tt(i??QE,o=>{if((e.shouldThrow??!0)&&!o&&Jn(),o===void 0)return;const a=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const l=Mr(s.current,a);return s.current=l,l}return a})}function Iw(e){return Ni({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Dw(e){const{select:t,...n}=e;return Ni({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Nw(e){return Ni({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 zw(e){return Ni({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Fs(e){const t=Kt();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function Ow(e){return Ni({...e,select:t=>e.select?e.select(t.context):t.context})}function YE(e,t){const n=Kt(),r=gP(t),{activeProps:i,inactiveProps:s,activeOptions:o,to:a,preload:l,preloadDelay:u,preloadIntentProximity:c,hashScrollIntoView:d,replace:h,startTransition:p,resetScroll:m,viewTransition:y,children:w,target:g,disabled:x,style:v,className:b,onClick:_,onBlur:S,onFocus:j,onMouseEnter:E,onMouseLeave:M,onTouchStart:P,ignoreBlocker:R,params:A,search:B,hash:I,state:O,mask:F,reloadDocument:H,unsafeRelative:z,from:D,_fromLocation:k,...K}=e,ne=_w(),T=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),he=Tt(n.stores.location,ue=>ue,(ue,N)=>ue.href===N.href),ce=C.useMemo(()=>{const ue={_fromLocation:he,...T};return n.buildLocation(ue)},[n,he,T]),de=ce.maskedLocation?ce.maskedLocation.publicHref:ce.publicHref,tt=ce.maskedLocation?ce.maskedLocation.external:ce.external,ze=C.useMemo(()=>tj(de,tt,n.history,x),[x,tt,de,n.history]),nt=C.useMemo(()=>{if(ze!=null&&ze.external)return mu(ze.href,n.protocolAllowlist)?void 0:ze.href;if(!nj(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),mu(a,n.protocolAllowlist)?void 0:a}catch{}},[a,ze,n.protocolAllowlist]),Mt=C.useMemo(()=>{if(nt)return!1;if(o!=null&&o.exact){if(!DP(he.pathname,ce.pathname,n.basepath))return!1}else{const ue=gu(he.pathname,n.basepath),N=gu(ce.pathname,n.basepath);if(!(ue.startsWith(N)&&(ue.length===N.length||ue[N.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Si(he.search,ce.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?ne&&he.hash===ce.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,he,nt,ne,ce.hash,ce.pathname,ce.search,n.basepath]),Gt=Mt?Rr(i,{})??qE:rd,Bn=Mt?rd:Rr(s,{})??rd,sr=[b,Gt.className,Bn.className].filter(Boolean).join(" "),Fn=(v||Gt.style||Bn.style)&&{...v,...Gt.style,...Bn.style},[or,Ge]=C.useState(!1),Se=C.useRef(!1),xt=e.reloadDocument||nt?!1:l??n.options.defaultPreload,Qt=u??n.options.defaultPreloadDelay??0,rt=C.useCallback(()=>{n.preloadRoute({...T,_builtLocation:ce}).catch(ue=>{console.warn(ue),console.warn(gE)})},[n,T,ce]);mP(r,C.useCallback(ue=>{ue!=null&&ue.isIntersecting&&rt()},[rt]),ej,{disabled:!!x||xt!=="viewport"}),C.useEffect(()=>{Se.current||!x&&xt==="render"&&(rt(),Se.current=!0)},[x,rt,xt]);const Qs=ue=>{const N=ue.currentTarget.getAttribute("target"),V=g!==void 0?g:N;if(!x&&!rj(ue)&&!ue.defaultPrevented&&(!V||V==="_self")&&ue.button===0){ue.preventDefault(),Bs.flushSync(()=>{Ge(!0)});const q=n.subscribe("onResolved",()=>{q(),Ge(!1)});n.navigate({...T,replace:h,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:y,ignoreBlocker:R})}};if(nt)return{...K,ref:r,href:nt,...w&&{children:w},...g&&{target:g},...x&&{disabled:x},...v&&{style:v},...b&&{className:b},..._&&{onClick:_},...S&&{onBlur:S},...j&&{onFocus:j},...E&&{onMouseEnter:E},...M&&{onMouseLeave:M},...P&&{onTouchStart:P}};const ar=ue=>{if(x||xt!=="intent")return;if(!Qt){rt();return}const N=ue.currentTarget;if(oo.has(N))return;const V=setTimeout(()=>{oo.delete(N),rt()},Qt);oo.set(N,V)},ti=ue=>{x||xt!=="intent"||rt()},lr=ue=>{if(x||!xt||!Qt)return;const N=ue.currentTarget,V=oo.get(N);V&&(clearTimeout(V),oo.delete(N))};return{...K,...Gt,...Bn,href:ze==null?void 0:ze.href,ref:r,onClick:$i([_,Qs]),onBlur:$i([S,lr]),onFocus:$i([j,ar]),onMouseEnter:$i([E,ar]),onMouseLeave:$i([M,lr]),onTouchStart:$i([P,ti]),disabled:!!x,target:g,...Fn&&{style:Fn},...sr&&{className:sr},...x&&XE,...Mt&&ZE,...ne&&or&&JE}}var rd={},qE={className:"active"},XE={role:"link","aria-disabled":!0},ZE={"data-status":"active","aria-current":"page"},JE={"data-transitioning":"transitioning"},oo=new WeakMap,ej={rootMargin:"100px"},$i=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function tj(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function nj(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Bw=C.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...s}=YE(r,t),o=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...l}=s;return C.createElement("a",l,o)}return C.createElement(n,s,o)});function rj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var ij=class extends Sw{constructor(e){super(e),this.useMatch=t=>Ni({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Ow({...t,from:this.id}),this.useSearch=t=>zw({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Nw({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Dw({...t,from:this.id}),this.useLoaderData=t=>Iw({...t,from:this.id}),this.useNavigate=()=>Fs({from:this.fullPath}),this.Link=ks.forwardRef((t,n)=>f.jsx(Bw,{ref:n,from:this.fullPath,...t}))}};function ac(e){return new ij(e)}var sj=class extends yE{constructor(e){super(e),this.useMatch=t=>Ni({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Ow({...t,from:this.id}),this.useSearch=t=>zw({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Nw({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Dw({...t,from:this.id}),this.useLoaderData=t=>Iw({...t,from:this.id}),this.useNavigate=()=>Fs({from:this.fullPath}),this.Link=ks.forwardRef((t,n)=>f.jsx(Bw,{ref:n,from:this.fullPath,...t}))}};function oj(e){return new sj(e)}function aj(e){const t=Kt(),n=`not-found-${Tt(t.stores.location,r=>r.pathname)}-${Tt(t.stores.status,r=>r)}`;return f.jsx(Mp,{getResetKey:()=>n,onCatch:(r,i)=>{var s;if(ut(r))(s=e.onCatch)==null||s.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(ut(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function lj(){return f.jsx("p",{children:"Not Found"})}function Qi(e){return f.jsx(f.Fragment,{children:e.children})}function Fw(e,t,n){return t.options.notFoundComponent?f.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...n}):f.jsx(lj,{})}function uj(e){return null}function cj(){return uj(Kt()),null}var $w=C.memo(function({matchId:t}){const n=Kt(),r=n.stores.matchStores.get(t);r||Jn();const i=Tt(n.stores.loadedAt,o=>o),s=Tt(r,o=>o);return f.jsx(dj,{router:n,matchId:t,resetKey:i,matchState:C.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 dj({router:e,matchId:t,resetKey:n,matchState:r}){var m,y;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,u=i.isRoot?i.options.notFoundComponent??((m=e.options.notFoundRoute)==null?void 0:m.options.component):i.options.notFoundComponent,c=r.ssr===!1||r.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||c)&&(i.options.wrapInSuspense??s??(((y=i.options.errorComponent)==null?void 0:y.preload)||c))?C.Suspense:Qi,h=a?Mp:Qi,p=u?aj:Qi;return f.jsxs(i.isRoot?i.options.shellComponent??Qi:Qi,{children:[f.jsx(sc.Provider,{value:t,children:f.jsx(d,{fallback:o,children:f.jsx(h,{getResetKey:()=>n,errorComponent:a||Ap,onCatch:(w,g)=>{if(ut(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),!u||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!i.isRoot)throw w;return C.createElement(u,w)},children:c||r._displayPending?f.jsx(wE,{fallback:o,children:f.jsx(gy,{matchId:t})}):f.jsx(gy,{matchId:t})})})})}),r.parentRouteId===_i?f.jsxs(f.Fragment,{children:[f.jsx(fj,{resetKey:n}),e.options.scrollRestoration&&hw?f.jsx(cj,{}):null]}):null]})}function fj({resetKey:e}){const t=Kt(),n=C.useRef(void 0);return ko(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...ys(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var gy=C.memo(function({matchId:t}){const n=Kt(),r=(c,d)=>{var h;return((h=n.getMatch(c.id))==null?void 0:h._nonReactive[d])??c._nonReactive[d]},i=n.stores.matchStores.get(t);i||Jn();const s=Tt(i,c=>c),o=s.routeId,a=n.routesById[o],l=C.useMemo(()=>{var d;const c=(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 c?JSON.stringify(c):void 0},[o,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),u=C.useMemo(()=>{const c=a.options.component??n.options.defaultComponent;return c?f.jsx(c,{},l):f.jsx(Vw,{})},[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 c=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const d=n.getMatch(s.id);if(d&&!d._nonReactive.minPendingPromise){const h=Ms();d._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),d._nonReactive.minPendingPromise=void 0},c)}}throw r(s,"loadPromise")}if(s.status==="notFound")return ut(s.error)||Jn(),Fw(n,a,s.error);if(s.status==="redirected")throw St(s.error)||Jn(),r(s,"loadPromise");if(s.status==="error")throw s.error;return u}),Vw=C.memo(function(){const t=Kt(),n=C.useContext(sc);let r,i=!1,s;{const u=n?t.stores.matchStores.get(n):void 0;[r,i]=Tt(u,c=>[c==null?void 0:c.routeId,(c==null?void 0:c.globalNotFound)??!1]),s=Tt(t.stores.matchesId,c=>c[c.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||Jn(),Fw(t,o,void 0);if(!s)return null;const l=f.jsx($w,{matchId:s});return r===_i?f.jsx(C.Suspense,{fallback:a,children:l}):l});function hj(){const e=Kt(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=Tt(e.stores.isLoading,d=>d),s=Tt(e.stores.hasPending,d=>d),o=Yc(i),a=i||n||s,l=Yc(a),u=i||s,c=Yc(u);return e.startTransition=d=>{r(!0),C.startTransition(()=>{d(),r(!1)})},C.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 Ur(e.latestLocation.publicHref)!==Ur(h.publicHref)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),ko(()=>{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]),ko(()=>{o&&!i&&e.emit({type:"onLoad",...ys(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),ko(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...ys(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,c,e]),ko(()=>{if(l&&!a){const d=ys(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),Ew(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&xE(e)}},[a,l,e]),null}function pj(){const e=Kt(),t=e.routesById[_i].options.pendingComponent??e.options.defaultPendingComponent,n=t?f.jsx(t,{}):null,r=f.jsxs(typeof document<"u"&&e.ssr?Qi:C.Suspense,{fallback:n,children:[f.jsx(hj,{}),f.jsx(mj,{})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:r}):r}function mj(){const e=Kt(),t=Tt(e.stores.firstId,i=>i),n=Tt(e.stores.loadedAt,i=>i),r=t?f.jsx($w,{matchId:t}):null;return f.jsx(sc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:f.jsx(Mp,{getResetKey:()=>n,errorComponent:Ap,onCatch:void 0,children:r})})}var gj=e=>({createMutableStore:my,createReadonlyStore:my,batch:Ew}),yj=e=>new xj(e),xj=class extends uE{constructor(e){super(e,gj)}};function vj({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(Cw.Provider,{value:e,children:t});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function wj({router:e,...t}){return f.jsx(vj,{router:e,...t,children:f.jsx(pj,{})})}function Lp(e){const t=Kt({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=C.useRef(void 0);return Tt(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=Mr(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}const Ip=C.createContext({});function Dp(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const bj=typeof window<"u",Uw=bj?C.useLayoutEffect:C.useEffect,lc=C.createContext(null);function Np(e,t){e.indexOf(t)===-1&&e.push(t)}function wu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Nn=(e,t,n)=>n>t?t:n<e?e:n;let zp=()=>{};const Gr={},Ww=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Hw=e=>typeof e=="object"&&e!==null,Kw=e=>/^0[^.\s]+$/u.test(e);function Gw(e){let t;return()=>(t===void 0&&(t=e()),t)}const on=e=>e,ya=(...e)=>e.reduce((t,n)=>r=>n(t(r))),aa=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Op{constructor(){this.subscriptions=[]}add(t){return Np(this.subscriptions,t),()=>wu(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 $t=e=>e*1e3,nn=e=>e/1e3,Qw=(e,t)=>t?e*(1e3/t):0,Yw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kj=1e-7,Sj=12;function _j(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Yw(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>kj&&++a<Sj);return o}function xa(e,t,n,r){if(e===t&&n===r)return on;const i=s=>_j(s,0,1,e,n);return s=>s===0||s===1?s:Yw(i(s),t,r)}const qw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Xw=e=>t=>1-e(1-t),Zw=xa(.33,1.53,.69,.99),Bp=Xw(Zw),Jw=qw(Bp),eb=e=>e>=1?1:(e*=2)<1?.5*Bp(e):.5*(2-Math.pow(2,-10*(e-1))),Fp=e=>1-Math.sin(Math.acos(e)),tb=Xw(Fp),nb=qw(Fp),Cj=xa(.42,0,1,1),Pj=xa(0,0,.58,1),rb=xa(.42,0,.58,1),Ej=e=>Array.isArray(e)&&typeof e[0]!="number",ib=e=>Array.isArray(e)&&typeof e[0]=="number",jj={linear:on,easeIn:Cj,easeInOut:rb,easeOut:Pj,circIn:Fp,circInOut:nb,circOut:tb,backIn:Bp,backInOut:Jw,backOut:Zw,anticipate:eb},Tj=e=>typeof e=="string",yy=e=>{if(ib(e)){zp(e.length===4);const[t,n,r,i]=e;return xa(t,n,r,i)}else if(Tj(e))return jj[e];return e},Xa=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Rj(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(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,h=!1)=>{const m=h&&i?n:r;return d&&o.add(c),m.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const Mj=40;function sb(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Xa.reduce((v,b)=>(v[b]=Rj(s),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:m}=o,y=()=>{const v=Gr.useManualTiming,b=v?i.timestamp:performance.now();n=!1,v||(i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,Mj),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},w=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:Xa.reduce((v,b)=>{const _=o[b];return v[b]=(S,j=!1,E=!1)=>(n||w(),_.schedule(S,j,E)),v},{}),cancel:v=>{for(let b=0;b<Xa.length;b++)o[Xa[b]].cancel(v)},state:i,steps:o}}const{schedule:we,cancel:Qr,state:Xe,steps:id}=sb(typeof requestAnimationFrame<"u"?requestAnimationFrame:on,!0);let Tl;function Aj(){Tl=void 0}const ht={now:()=>(Tl===void 0&&ht.set(Xe.isProcessing||Gr.useManualTiming?Xe.timestamp:performance.now()),Tl),set:e=>{Tl=e,queueMicrotask(Aj)}},ob=e=>t=>typeof t=="string"&&t.startsWith(e),ab=ob("--"),Lj=ob("var(--"),$p=e=>Lj(e)?Ij.test(e.split("/*")[0].trim()):!1,Ij=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function xy(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const $s={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},la={...$s,transform:e=>Nn(0,1,e)},Za={...$s,default:1},Lo=e=>Math.round(e*1e5)/1e5,Vp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Dj(e){return e==null}const Nj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Up=(e,t)=>n=>!!(typeof n=="string"&&Nj.test(n)&&n.startsWith(e)||t&&!Dj(n)&&Object.prototype.hasOwnProperty.call(n,t)),lb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Vp);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},zj=e=>Nn(0,255,e),sd={...$s,transform:e=>Math.round(zj(e))},xi={test:Up("rgb","red"),parse:lb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+sd.transform(e)+", "+sd.transform(t)+", "+sd.transform(n)+", "+Lo(la.transform(r))+")"};function Oj(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 Hf={test:Up("#"),parse:Oj,transform:xi.transform},va=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Hn=va("deg"),In=va("%"),Y=va("px"),Bj=va("vh"),Fj=va("vw"),vy={...In,parse:e=>In.parse(e)/100,transform:e=>In.transform(e*100)},ls={test:Up("hsl","hue"),parse:lb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+In.transform(Lo(t))+", "+In.transform(Lo(n))+", "+Lo(la.transform(r))+")"},$e={test:e=>xi.test(e)||Hf.test(e)||ls.test(e),parse:e=>xi.test(e)?xi.parse(e):ls.test(e)?ls.parse(e):Hf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xi.transform(e):ls.transform(e),getAnimatableNone:e=>{const t=$e.parse(e);return t.alpha=0,$e.transform(t)}},$j=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vj(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vp))==null?void 0:t.length)||0)+(((n=e.match($j))==null?void 0:n.length)||0)>0}const ub="number",cb="color",Uj="var",Wj="var(",wy="${}",Hj=/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 Ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(Hj,l=>($e.test(l)?(r.color.push(s),i.push(cb),n.push($e.parse(l))):l.startsWith(Wj)?(r.var.push(s),i.push(Uj),n.push(l)):(r.number.push(s),i.push(ub),n.push(parseFloat(l))),++s,wy)).split(wy);return{values:n,split:a,indexes:r,types:i}}function Kj(e){return Ls(e).values}function db({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===ub?i+=Lo(r[s]):o===cb?i+=$e.transform(r[s]):i+=r[s]}return i}}function Gj(e){return db(Ls(e))}const Qj=e=>typeof e=="number"?0:$e.test(e)?$e.getAnimatableNone(e):e,Yj=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Qj(e);function qj(e){const t=Ls(e);return db(t)(t.values.map((r,i)=>Yj(r,t.split[i])))}const bn={test:Vj,parse:Kj,createTransformer:Gj,getAnimatableNone:qj};function od(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 Xj({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=od(l,a,e+1/3),s=od(l,a,e),o=od(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function bu(e,t){return n=>n>0?t:e}const ve=(e,t,n)=>e+(t-e)*n,ad=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Zj=[Hf,xi,ls],Jj=e=>Zj.find(t=>t.test(e));function by(e){const t=Jj(e);if(!t)return!1;let n=t.parse(e);return t===ls&&(n=Xj(n)),n}const ky=(e,t)=>{const n=by(e),r=by(t);if(!n||!r)return bu(e,t);const i={...n};return s=>(i.red=ad(n.red,r.red,s),i.green=ad(n.green,r.green,s),i.blue=ad(n.blue,r.blue,s),i.alpha=ve(n.alpha,r.alpha,s),xi.transform(i))},Kf=new Set(["none","hidden"]);function eT(e,t){return Kf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tT(e,t){return n=>ve(e,t,n)}function Wp(e){return typeof e=="number"?tT:typeof e=="string"?$p(e)?bu:$e.test(e)?ky:iT:Array.isArray(e)?fb:typeof e=="object"?$e.test(e)?ky:nT:bu}function fb(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Wp(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function nT(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Wp(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function rT(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 iT=(e,t)=>{const n=bn.createTransformer(t),r=Ls(e),i=Ls(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?Kf.has(e)&&!i.values.length||Kf.has(t)&&!r.values.length?eT(e,t):ya(fb(rT(r,i),i.values),n):bu(e,t)};function hb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ve(e,t,n):Wp(e)(e,t)}const sT=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>we.update(t,n),stop:()=>Qr(t),now:()=>Xe.isProcessing?Xe.timestamp:ht.now()}},pb=(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)})`},ku=2e4;function Hp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ku;)t+=n,r=e.next(t);return t>=ku?1/0:t}function oT(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Hp(r),ku);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:nn(i)}}const De={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 Gf(e,t){return e*Math.sqrt(1-t*t)}const aT=12;function lT(e,t,n){let r=n;for(let i=1;i<aT;i++)r=r-e(r)/t(r);return r}const ld=.001;function uT({duration:e=De.duration,bounce:t=De.bounce,velocity:n=De.velocity,mass:r=De.mass}){let i,s,o=1-t;o=Nn(De.minDamping,De.maxDamping,o),e=Nn(De.minDuration,De.maxDuration,nn(e)),o<1?(i=u=>{const c=u*o,d=c*e,h=c-n,p=Gf(u,o),m=Math.exp(-d);return ld-h/p*m},s=u=>{const d=u*o*e,h=d*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),y=Gf(Math.pow(u,2),o);return(-i(u)+ld>0?-1:1)*((h-p)*m)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-ld+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=lT(i,s,a);if(e=$t(e),isNaN(l))return{stiffness:De.stiffness,damping:De.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const cT=["duration","bounce"],dT=["stiffness","damping","mass"];function Sy(e,t){return t.some(n=>e[n]!==void 0)}function fT(e){let t={velocity:De.velocity,stiffness:De.stiffness,damping:De.damping,mass:De.mass,isResolvedFromDuration:!1,...e};if(!Sy(e,dT)&&Sy(e,cT))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Nn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:De.mass,stiffness:i,damping:s}}else{const n=uT({...e,velocity:0});t={...t,...n,mass:De.mass},t.isResolvedFromDuration=!0}return t}function Su(e=De.visualDuration,t=De.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:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:p}=fT({...n,velocity:-nn(n.velocity||0)}),m=h||0,y=u/(2*Math.sqrt(l*c)),w=o-s,g=nn(Math.sqrt(l/c)),x=Math.abs(w)<5;r||(r=x?De.restSpeed.granular:De.restSpeed.default),i||(i=x?De.restDelta.granular:De.restDelta.default);let v,b,_,S,j,E;if(y<1)_=Gf(g,y),S=(m+y*g*w)/_,v=P=>{const R=Math.exp(-y*g*P);return o-R*(S*Math.sin(_*P)+w*Math.cos(_*P))},j=y*g*S+w*_,E=y*g*w-S*_,b=P=>Math.exp(-y*g*P)*(j*Math.sin(_*P)+E*Math.cos(_*P));else if(y===1){v=R=>o-Math.exp(-g*R)*(w+(m+g*w)*R);const P=m+g*w;b=R=>Math.exp(-g*R)*(g*P*R-m)}else{const P=g*Math.sqrt(y*y-1);v=I=>{const O=Math.exp(-y*g*I),F=Math.min(P*I,300);return o-O*((m+y*g*w)*Math.sinh(F)+P*w*Math.cosh(F))/P};const R=(m+y*g*w)/P,A=y*g*R-w*P,B=y*g*w-R*P;b=I=>{const O=Math.exp(-y*g*I),F=Math.min(P*I,300);return O*(A*Math.sinh(F)+B*Math.cosh(F))}}const M={calculatedDuration:p&&d||null,velocity:P=>$t(b(P)),next:P=>{if(!p&&y<1){const A=Math.exp(-y*g*P),B=Math.sin(_*P),I=Math.cos(_*P),O=o-A*(S*B+w*I),F=$t(A*(j*B+E*I));return a.done=Math.abs(F)<=r&&Math.abs(o-O)<=i,a.value=a.done?o:O,a}const R=v(P);if(p)a.done=P>=d;else{const A=$t(b(P));a.done=Math.abs(A)<=r&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const P=Math.min(Hp(M),ku),R=pb(A=>M.next(P*A).value,P,30);return P+"ms "+R},toTransition:()=>{}};return M}Su.applyToOptions=e=>{const t=oT(e,100,Su);return e.ease=t.ease,e.duration=$t(t.duration),e.type="keyframes",e};const hT=5;function mb(e,t,n){const r=Math.max(t-hT,0);return Qw(n-e(r),t-r)}function Qf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},p=E=>a!==void 0&&E<a||l!==void 0&&E>l,m=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let y=n*t;const w=d+y,g=o===void 0?w:o(w);g!==w&&(y=g-d);const x=E=>-y*Math.exp(-E/r),v=E=>g+x(E),b=E=>{const M=x(E),P=v(E);h.done=Math.abs(M)<=u,h.value=h.done?g:P};let _,S;const j=E=>{p(h.value)&&(_=E,S=Su({keyframes:[h.value,m(h.value)],velocity:mb(v,E,h.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return j(0),{calculatedDuration:null,next:E=>{let M=!1;return!S&&_===void 0&&(M=!0,b(E),j(E)),_!==void 0&&E>=_?S.next(E-_):(!M&&b(E),h)}}}function pT(e,t,n){const r=[],i=n||Gr.mix||hb,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]||on:t;a=ya(l,a)}r.push(a)}return r}function mT(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(zp(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=pT(t,r,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=aa(e[d],e[d+1],c);return a[d](h)};return n?c=>u(Nn(e[0],e[s-1],c)):u}function gT(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=aa(0,t,r);e.push(ve(n,1,i))}}function yT(e){const t=[0];return gT(t,e.length-1),t}function xT(e,t){return e.map(n=>n*t)}function vT(e,t){return e.map(()=>t||rb).splice(0,e.length-1)}function Io({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Ej(r)?r.map(yy):yy(r),s={done:!1,value:t[0]},o=xT(n&&n.length===t.length?n:yT(t),e),a=mT(o,t,{ease:Array.isArray(i)?i:vT(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const wT=e=>e!==null;function uc(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(wT),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const bT={decay:Qf,inertia:Qf,tween:Io,keyframes:Io,spring:Su};function gb(e){typeof e.type=="string"&&(e.type=bT[e.type])}class Kp{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 kT=e=>e/100;class _u extends Kp{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!==ht.now()&&this.tick(ht.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;gb(t);const{type:n=Io,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Io;l!==Io&&typeof a[0]!="number"&&(this.mixKeyframes=ya(kT,hb(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Hp(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}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:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:p,type:m,onUpdate:y,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-u*(this.playbackSpeed>=0?1:-1),x=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 E=Math.min(this.currentTime,i)/a;let M=Math.floor(E),P=E%1;!P&&E>=1&&(P=1),P===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(h==="reverse"?(P=1-P,p&&(P-=p/a)):h==="mirror"&&(b=o)),v=Nn(0,1,P)*a}let _;x?(this.delayState.value=c[0],_=this.delayState):_=b.next(v),s&&!x&&(_.value=s(_.value));let{done:S}=_;!x&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return j&&m!==Qf&&(_.value=uc(c,this.options,w,this.speed)),y&&y(_.value),j&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return nn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+nn(t)}get time(){return nn(this.currentTime)}set time(t){t=$t(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 mb(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(ht.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=nn(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=sT,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(ht.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 ST(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const vi=e=>e*180/Math.PI,Yf=e=>{const t=vi(Math.atan2(e[1],e[0]));return qf(t)},_T={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yf,rotateZ:Yf,skewX:e=>vi(Math.atan(e[1])),skewY:e=>vi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qf=e=>(e=e%360,e<0&&(e+=360),e),_y=Yf,Cy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Py=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),CT={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cy,scaleY:Py,scale:e=>(Cy(e)+Py(e))/2,rotateX:e=>qf(vi(Math.atan2(e[6],e[5]))),rotateY:e=>qf(vi(Math.atan2(-e[2],e[0]))),rotateZ:_y,rotate:_y,skewX:e=>vi(Math.atan(e[4])),skewY:e=>vi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xf(e){return e.includes("scale")?1:0}function Zf(e,t){if(!e||e==="none")return Xf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=CT,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_T,i=a}if(!i)return Xf(t);const s=r[t],o=i[1].split(",").map(ET);return typeof s=="function"?s(o):o[s]}const PT=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zf(n,t)};function ET(e){return parseFloat(e.trim())}const Vs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Us=new Set([...Vs,"pathRotation"]),Ey=e=>e===$s||e===Y,jT=new Set(["x","y","z"]),TT=Vs.filter(e=>!jT.has(e));function RT(e){const t=[];return TT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ir={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})=>Zf(t,"x"),y:(e,{transform:t})=>Zf(t,"y")};Ir.translateX=Ir.x;Ir.translateY=Ir.y;const Pi=new Set;let Jf=!1,eh=!1,th=!1;function yb(){if(eh){const e=Array.from(Pi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=RT(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)})}eh=!1,Jf=!1,Pi.forEach(e=>e.complete(th)),Pi.clear()}function xb(){Pi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eh=!0)})}function MT(){th=!0,xb(),yb(),th=!1}class Gp{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?(Pi.add(this),Jf||(Jf=!0,we.read(xb),we.resolveKeyframes(yb))):(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])}ST(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Pi.delete(this)}cancel(){this.state==="scheduled"&&(Pi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const AT=e=>e.startsWith("--");function vb(e,t,n){AT(t)?e.style.setProperty(t,n):e.style[t]=n}const LT={};function wb(e,t){const n=Gw(e);return()=>LT[t]??n()}const IT=wb(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),bb=wb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),So=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:So([0,.65,.55,1]),circOut:So([.55,0,1,.45]),backIn:So([.31,.01,.66,-.59]),backOut:So([.33,1.53,.69,.99])};function kb(e,t){if(e)return typeof e=="function"?bb()?pb(e,t):"ease-out":ib(e)?So(e):Array.isArray(e)?e.map(n=>kb(n,t)||jy.easeOut):jy[e]}function DT(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=kb(a,i);Array.isArray(d)&&(c.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 u&&(h.pseudoElement=u),e.animate(c,h)}function Sb(e){return typeof e=="function"&&"applyToOptions"in e}function NT({type:e,...t}){return Sb(e)&&bb()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class _b extends Kp{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,zp(typeof t.type!="string");const u=NT(t);this.animation=DT(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=uc(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),vb(n,r,c),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 nn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+nn(t)}get time(){return nn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$t(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&&IT()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),on):i(this)}}const Cb={anticipate:eb,backInOut:Jw,circInOut:nb};function zT(e){return e in Cb}function OT(e){typeof e.ease=="string"&&zT(e.ease)&&(e.ease=Cb[e.ease])}const ud=10;class BT extends _b{constructor(t){OT(t),gb(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 _u({...o,autoplay:!1}),l=Math.max(ud,ht.now()-this.startTime),u=Nn(0,ud,l-ud),c=a.sample(l).value,{name:d}=this.options;s&&d&&vb(s,d,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Ty=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(bn.test(e)||e==="0")&&!e.startsWith("url("));function FT(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 $T(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=Ty(i,t),a=Ty(s,t);return!o||!a?!1:FT(e)||(n==="spring"||Sb(n))&&r}function nh(e){e.duration=0,e.type="keyframes"}const Pb=new Set(["opacity","clipPath","filter","transform"]),VT=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function UT(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&VT.test(e[t]))return!0;return!1}const WT=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),HT=Gw(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function KT(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:u,transformTemplate:c}=t.owner.getProps();return HT()&&n&&(Pb.has(n)||WT.has(n)&&UT(a))&&(n!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const GT=40;class QT extends Kp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var m;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=ht.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},p=(c==null?void 0:c.KeyframeResolver)||Gp;this.keyframeResolver=new p(a,(y,w,g)=>this.onKeyframesResolved(y,w,h,!g),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,i){var g,x;this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=ht.now();let d=!0;$T(t,s,o,a)||(d=!1,(Gr.instantAnimations||!l)&&(c==null||c(uc(t,r,n))),t[0]=t[t.length-1],nh(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>GT?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=d&&!u&&KT(p),y=(x=(g=p.motionValue)==null?void 0:g.owner)==null?void 0:x.current;let w;if(m)try{w=new BT({...p,element:y})}catch{w=new _u(p)}else w=new _u(p);w.finished.then(()=>{this.notifyFinished()}).catch(on),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(),MT()),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 Eb(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const Ry=30,YT=e=>!isNaN(parseFloat(e));class qT{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=ht.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=ht.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=YT(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 Op);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.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=ht.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ry)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ry);return Qw(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 Is(e,t){return new qT(e,t)}function jb(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Qp(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?jb(n,e):n}const XT={type:"spring",stiffness:500,damping:25,restSpeed:10},ZT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),JT={type:"keyframes",duration:.8},e2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},t2=(e,{keyframes:t})=>t.length>2?JT:Us.has(e)?e.startsWith("scale")?ZT(t[1]):XT:e2,n2=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function r2(e){for(const t in e)if(!n2.has(t))return!0;return!1}const Yp=(e,t,n,r={},i,s)=>o=>{const a=Qp(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-$t(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,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};r2(a)||Object.assign(c,t2(e,c)),c.duration&&(c.duration=$t(c.duration)),c.repeatDelay&&(c.repeatDelay=$t(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(nh(c),c.delay===0&&(d=!0)),(Gr.instantAnimations||Gr.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(d=!0,nh(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=uc(c.keyframes,a);if(h!==void 0){we.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new _u(c):new QT(c)},i2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function s2(e){const t=i2.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Tb(e,t,n=1){const[r,i]=s2(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Ww(o)?parseFloat(o):o}return $p(i)?Tb(i,t,n+1):i}function My(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function qp(e,t,n,r){if(typeof t=="function"){const[i,s]=My(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]=My(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Ei(e,t,n){const r=e.getProps();return qp(r,t,n!==void 0?n:r.custom,e)}const Rb=new Set(["width","height","top","left","right","bottom",...Vs]),rh=e=>Array.isArray(e);function o2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Is(n))}function a2(e){return rh(e)?e[e.length-1]||0:e}function l2(e,t){const n=Ei(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=a2(s[o]);o2(e,o,a)}}const Ze=e=>!!(e&&e.getVelocity);function u2(e){return!!(Ze(e)&&e.add)}function ih(e,t){const n=e.getValue("willChange");if(u2(n))return n.add(t);if(!n&&Gr.WillChange){const r=new Gr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Xp(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const c2="framerAppearId",Mb="data-"+Xp(c2);function Ab(e){return e.props[Mb]}function d2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Lb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?jb(s,l):l;const u=s==null?void 0:s.reduceMotion,c=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 y=e.getValue(m,e.latestValues[m]??null),w=a[m];if(w===void 0||h&&d2(h,m))continue;const g={delay:n,...Qp(s||{},m)};c&&(g.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(w)&&w===x&&!g.velocity){we.update(()=>y.set(w));continue}let v=!1;if(window.MotionHandoffAnimation){const S=Ab(e);if(S){const j=window.MotionHandoffAnimation(S,m,we);j!==null&&(g.startTime=j,v=!0)}}ih(e,m);const b=u??e.shouldReduceMotion;y.start(Yp(m,y,w,b&&Rb.has(m)?{type:!1}:g,e,v));const _=y.animation;_&&d.push(_)}if(o){const m=()=>we.update(()=>{o&&l2(e,o)});d.length?Promise.all(d).then(m):m()}return d}function sh(e,t,n={}){var l;const r=Ei(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(Lb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=i;return f2(e,t,u,c,d,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function f2(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(sh(l,t,{...o,delay:n+(typeof r=="function"?0:r)+Eb(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function h2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>sh(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=sh(e,t,n);else{const i=typeof t=="function"?Ei(e,t,n.custom):t;r=Promise.all(Lb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const p2={test:e=>e==="auto",parse:e=>e},Ib=e=>t=>t.test(e),Db=[$s,Y,In,Hn,Fj,Bj,p2],Ay=e=>Db.find(Ib(e));function m2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Kw(e):!0}const g2=new Set(["brightness","contrast","saturate","opacity"]);function y2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vp)||[];if(!r)return e;const i=n.replace(r,"");let s=g2.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const x2=/\b([a-z-]*)\(.*?\)/gu,oh={...bn,getAnimatableNone:e=>{const t=e.match(x2);return t?t.map(y2).join(" "):e}},ah={...bn,getAnimatableNone:e=>{const t=bn.parse(e);return bn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Ly={...$s,transform:Math.round},v2={rotate:Hn,pathRotation:Hn,rotateX:Hn,rotateY:Hn,rotateZ:Hn,scale:Za,scaleX:Za,scaleY:Za,scaleZ:Za,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:la,originX:vy,originY:vy,originZ:Y},Cu={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,...v2,zIndex:Ly,fillOpacity:la,strokeOpacity:la,numOctaves:Ly},w2={...Cu,color:$e,backgroundColor:$e,outlineColor:$e,fill:$e,stroke:$e,borderColor:$e,borderTopColor:$e,borderRightColor:$e,borderBottomColor:$e,borderLeftColor:$e,filter:oh,WebkitFilter:oh,mask:ah,WebkitMask:ah},Nb=e=>w2[e],b2=new Set([oh,ah]);function zb(e,t){let n=Nb(e);return b2.has(n)||(n=bn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const k2=new Set(["auto","none","0"]);function S2(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!k2.has(s)&&Ls(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=zb(n,i)}class _2 extends Gp{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 c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),$p(d))){const h=Tb(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Rb.has(r)||t.length!==2)return;const[i,s]=t,o=Ay(i),a=Ay(s),l=xy(i),u=xy(s);if(l!==u&&Ir[r]){this.needsMeasurement=!0;return}if(o!==a)if(Ey(o)&&Ey(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else Ir[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||m2(t[i]))&&r.push(i);r.length&&S2(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=Ir[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]=Ir[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,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Ob(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 lh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Rl(e){return Hw(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Zp}=sb(queueMicrotask,!1),hn={x:!1,y:!1};function Bb(){return hn.x||hn.y}function C2(e){return e==="x"||e==="y"?hn[e]?null:(hn[e]=!0,()=>{hn[e]=!1}):hn.x||hn.y?null:(hn.x=hn.y=!0,()=>{hn.x=hn.y=!1})}function Fb(e,t){const n=Ob(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function P2(e){return!(e.pointerType==="touch"||Bb())}function E2(e,t,n={}){const[r,i,s]=Fb(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},d=w=>{u&&(u(w),u=void 0),c()},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)}},y=w=>{if(!P2(w))return;l=!1;const g=t(o,w);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",p,i)}),s}const $b=(e,t)=>t?e===t?!0:$b(e,t.parentElement):!1,Jp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,j2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function T2(e){return j2.has(e.tagName)||e.isContentEditable===!0}const R2=new Set(["INPUT","SELECT","TEXTAREA"]);function M2(e){return R2.has(e.tagName)||e.isContentEditable===!0}const Ml=new WeakSet;function Iy(e){return t=>{t.key==="Enter"&&e(t)}}function cd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const A2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Iy(()=>{if(Ml.has(n))return;cd(n,"down");const i=Iy(()=>{cd(n,"up")}),s=()=>cd(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 Dy(e){return Jp(e)&&!Bb()}const Ny=new WeakSet;function L2(e,t,n={}){const[r,i,s]=Fb(e,n),o=a=>{const l=a.currentTarget;if(!Dy(a)||Ny.has(a))return;Ml.add(l),n.stopPropagation&&Ny.add(a);const u=t(l,a),c=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Ml.has(l)&&Ml.delete(l),Dy(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{c(p,l===window||l===document||n.useGlobalTarget||$b(l,p.target))},h=p=>{c(p,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Rl(a)&&(a.addEventListener("focus",u=>A2(u,i)),!T2(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function em(e){return Hw(e)&&"ownerSVGElement"in e}const Al=new WeakMap;let kr;const Vb=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:em(r)&&"getBBox"in r?r.getBBox()[t]:r[n],I2=Vb("inline","width","offsetWidth"),D2=Vb("block","height","offsetHeight");function N2({target:e,borderBoxSize:t}){var n;(n=Al.get(e))==null||n.forEach(r=>{r(e,{get width(){return I2(e,t)},get height(){return D2(e,t)}})})}function z2(e){e.forEach(N2)}function O2(){typeof ResizeObserver>"u"||(kr=new ResizeObserver(z2))}function B2(e,t){kr||O2();const n=Ob(e);return n.forEach(r=>{let i=Al.get(r);i||(i=new Set,Al.set(r,i)),i.add(t),kr==null||kr.observe(r)}),()=>{n.forEach(r=>{const i=Al.get(r);i==null||i.delete(t),i!=null&&i.size||kr==null||kr.unobserve(r)})}}const Ll=new Set;let us;function F2(){us=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ll.forEach(t=>t(e))},window.addEventListener("resize",us)}function $2(e){return Ll.add(e),us||F2(),()=>{Ll.delete(e),!Ll.size&&typeof us=="function"&&(window.removeEventListener("resize",us),us=void 0)}}function zy(e,t){return typeof e=="function"?$2(e):B2(e,t)}function V2(e){return em(e)&&e.tagName==="svg"}const U2=[...Db,$e,bn],W2=e=>U2.find(Ib(e)),Oy=()=>({translate:0,scale:1,origin:0,originPoint:0}),cs=()=>({x:Oy(),y:Oy()}),By=()=>({min:0,max:0}),We=()=>({x:By(),y:By()}),H2=new WeakMap;function cc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ua(e){return typeof e=="string"||Array.isArray(e)}const tm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nm=["initial",...tm];function dc(e){return cc(e.animate)||nm.some(t=>ua(e[t]))}function Ub(e){return!!(dc(e)||e.variants)}function K2(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Ze(i))e.addValue(r,i);else if(Ze(s))e.addValue(r,Is(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,Is(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pu={current:null},rm={current:!1},G2=typeof window<"u";function Wb(){if(rm.current=!0,!!G2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pu.current=e.matches;e.addEventListener("change",t),t()}else Pu.current=!1}const Fy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Eu={};function Hb(e){Eu=e}function Q2(){return Eu}class Y2{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=Gp,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=ht.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,we.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,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=dc(n),this.isVariantNode=Ub(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];u[p]!==void 0&&Ze(m)&&m.set(u[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,H2.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:(rm.current||Wb(),this.shouldReduceMotion=Pu.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(),Qr(this.notifyUpdate),Qr(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&&Pb.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new _b({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:$t(c)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=Us.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&we.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 Eu){const n=Eu[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):We()}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<Fy.length;r++){const i=Fy[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=K2(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=Is(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"&&(Ww(r)||Kw(r))?r=parseFloat(r):!W2(r)&&bn.test(n)&&(r=zb(t,n)),this.setBaseTarget(t,Ze(r)?r.get():r)),Ze(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=qp(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&&!Ze(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 Op),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Zp.render(this.render)}}class Kb extends Y2{constructor(){super(...arguments),this.KeyframeResolver=_2}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;Ze(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Jr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Gb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function q2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function X2(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 dd(e){return e===void 0||e===1}function uh({scale:e,scaleX:t,scaleY:n}){return!dd(e)||!dd(t)||!dd(n)}function ci(e){return uh(e)||Qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Qb(e){return $y(e.x)||$y(e.y)}function $y(e){return e&&e!=="0%"}function ju(e,t,n){const r=e-n,i=t*r;return n+i}function Vy(e,t,n,r,i){return i!==void 0&&(e=ju(e,i,r)),ju(e,n,r)+t}function ch(e,t=0,n=1,r,i){e.min=Vy(e.min,t,n,r,i),e.max=Vy(e.max,t,n,r,i)}function Yb(e,{x:t,y:n}){ch(e.x,t.translate,t.scale,t.originPoint),ch(e.y,n.translate,n.scale,n.originPoint)}const Uy=.999999999999,Wy=1.0000000000001;function Z2(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:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(Tn(e.x,-s.scroll.offset.x),Tn(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Yb(e,o)),r&&ci(s.latestValues)&&Il(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<Wy&&t.x>Uy&&(t.x=1),t.y<Wy&&t.y>Uy&&(t.y=1)}function Tn(e,t){e.min+=t,e.max+=t}function Hy(e,t,n,r,i=.5){const s=ve(e.min,e.max,i);ch(e,t,n,s,r)}function Ky(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Il(e,t,n){const r=n??e;Hy(e.x,Ky(t.x,r.x),t.scaleX,t.scale,t.originX),Hy(e.y,Ky(t.y,r.y),t.scaleY,t.scale,t.originY)}function qb(e,t){return Gb(X2(e.getBoundingClientRect(),t))}function J2(e,t,n){const r=qb(e,n),{scroll:i}=t;return i&&(Tn(r.x,i.offset.x),Tn(r.y,i.offset.y)),r}const eR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tR=Vs.length;function nR(e,t,n){let r="",i=!0;for(let o=0;o<tR;o++){const a=Vs[o],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=lh(l,Cu[a]);if(!u){i=!1;const d=eR[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}const s=e.pathRotation;return s&&(i=!1,r+=`rotate(${lh(s,Cu.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function im(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Us.has(l)){o=!0;continue}else if(ab(l)){i[l]=u;continue}else{const c=lh(u,Cu[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=nR(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}function Xb(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 Gy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ao={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=Gy(e,t.target.x),r=Gy(e,t.target.y);return`${n}% ${r}%`}},rR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=bn.parse(e);if(i.length>5)return r;const s=bn.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 u=ve(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},dh={borderRadius:{...ao,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ao,borderTopRightRadius:ao,borderBottomLeftRadius:ao,borderBottomRightRadius:ao,boxShadow:rR};function Zb(e,{layout:t,layoutId:n}){return Us.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!dh[e]||e==="opacity")}function sm(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)(Ze(r[a])||i&&Ze(i[a])||Zb(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function iR(e){return window.getComputedStyle(e)}class sR extends Kb{constructor(){super(...arguments),this.type="html",this.renderInstance=Xb}readValueFromInstance(t,n){var r;if(Us.has(n))return(r=this.projection)!=null&&r.isProjecting?Xf(n):PT(t,n);{const i=iR(t),s=(ab(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return qb(t,n)}build(t,n,r){im(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return sm(t,n,r)}}const oR={offset:"stroke-dashoffset",array:"stroke-dasharray"},aR={offset:"strokeDashoffset",array:"strokeDasharray"};function lR(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?oR:aR;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const uR=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Jb(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(im(e,a,u),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=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const p of uR)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&&lR(d,i,s,o,!1)}const ek=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"]),tk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cR(e,t,n,r){Xb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ek.has(i)?i:Xp(i),t.attrs[i])}function nk(e,t,n){const r=sm(e,t,n);for(const i in e)if(Ze(e[i])||Ze(t[i])){const s=Vs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class dR extends Kb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=We}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Us.has(n)){const r=Nb(n);return r&&r.default||0}return n=ek.has(n)?n:Xp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return nk(t,n,r)}build(t,n,r){Jb(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){cR(t,n,r,i)}mount(t){this.isSVGTag=tk(t.tagName),super.mount(t)}}const fR=nm.length;function rk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?rk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<fR;n++){const r=nm[n],i=e.props[r];(ua(i)||i===!1)&&(t[r]=i)}return t}function ik(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 hR=[...tm].reverse(),pR=tm.length;function mR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>h2(e,n,r)))}function gR(e){let t=mR(e),n=Qy(),r=!0,i=!1;const s=u=>(c,d)=>{var p;const h=Ei(e,d,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:m,transitionEnd:y,...w}=h;c={...c,...w,...y}}return c};function o(u){t=u(e)}function a(u){const{props:c}=e,d=rk(e.parent)||{},h=[],p=new Set;let m={},y=1/0;for(let g=0;g<pR;g++){const x=hR[g],v=n[x],b=c[x]!==void 0?c[x]:d[x],_=ua(b),S=x===u?v.isActive:null;S===!1&&(y=g);let j=b===d[x]&&b!==c[x]&&_;if(j&&(r||i)&&e.manuallyAnimateOnMount&&(j=!1),v.protectedKeys={...m},!v.isActive&&S===null||!b&&!v.prevProp||cc(b)||typeof b=="boolean")continue;if(x==="exit"&&v.isActive&&S!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const E=yR(v.prevProp,b);let M=E||x===u&&v.isActive&&!j&&_||g>y&&_,P=!1;const R=Array.isArray(b)?b:[b];let A=R.reduce(s(x),{});S===!1&&(A={});const{prevResolvedValues:B={}}=v,I={...B,...A},O=z=>{M=!0,p.has(z)&&(P=!0,p.delete(z)),v.needsAnimating[z]=!0;const D=e.getValue(z);D&&(D.liveStyle=!1)};for(const z in I){const D=A[z],k=B[z];if(m.hasOwnProperty(z))continue;let K=!1;rh(D)&&rh(k)?K=!ik(D,k)||E:K=D!==k,K?D!=null?O(z):p.add(z):D!==void 0&&p.has(z)?O(z):v.protectedKeys[z]=!0}v.prevProp=b,v.prevResolvedValues=A,v.isActive&&(m={...m,...A}),(r||i)&&e.blockInitialAnimation&&(M=!1);const F=j&&E;M&&(!F||P)&&h.push(...R.map(z=>{const D={type:x};if(typeof z=="string"&&(r||i)&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:k}=e,K=Ei(k,z);if(k.enteringChildren&&K){const{delayChildren:ne}=K.transition||{};D.delay=Eb(k.enteringChildren,e,ne)}}return{animation:z,options:D}}))}if(p.size){const g={};if(typeof c.initial!="boolean"){const x=Ei(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(g.transition=x.transition)}p.forEach(x=>{const v=e.getBaseTarget(x),b=e.getValue(x);b&&(b.liveStyle=!0),g[x]=v??null}),h.push({animation:g})}let w=!!h.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,i=!1,w?t(h):Promise.resolve()}function l(u,c){var h;if(n[u].isActive===c)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(u,c)}),n[u].isActive=c;const d=a(u);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Qy(),i=!0}}}function yR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ik(t,e):!1}function si(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qy(){return{animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()}}function fh(e,t){e.min=t.min,e.max=t.max}function dn(e,t){fh(e.x,t.x),fh(e.y,t.y)}function Yy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const sk=1e-4,xR=1-sk,vR=1+sk,ok=.01,wR=0-ok,bR=0+ok;function pt(e){return e.max-e.min}function kR(e,t,n){return Math.abs(e-t)<=n}function qy(e,t,n,r=.5){e.origin=r,e.originPoint=ve(t.min,t.max,e.origin),e.scale=pt(n)/pt(t),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xR&&e.scale<=vR||isNaN(e.scale))&&(e.scale=1),(e.translate>=wR&&e.translate<=bR||isNaN(e.translate))&&(e.translate=0)}function Do(e,t,n,r){qy(e.x,t.x,n.x,r?r.originX:void 0),qy(e.y,t.y,n.y,r?r.originY:void 0)}function Xy(e,t,n,r=0){const i=r?ve(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+pt(t)}function SR(e,t,n,r){Xy(e.x,t.x,n.x,r==null?void 0:r.x),Xy(e.y,t.y,n.y,r==null?void 0:r.y)}function Zy(e,t,n,r=0){const i=r?ve(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+pt(t)}function Tu(e,t,n,r){Zy(e.x,t.x,n.x,r==null?void 0:r.x),Zy(e.y,t.y,n.y,r==null?void 0:r.y)}function Jy(e,t,n,r,i){return e-=t,e=ju(e,1/n,r),i!==void 0&&(e=ju(e,1/i,r)),e}function _R(e,t=0,n=1,r=.5,i,s=e,o=e){if(In.test(t)&&(t=parseFloat(t),t=ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ve(s.min,s.max,r);e===s&&(a-=t),e.min=Jy(e.min,t,n,a,i),e.max=Jy(e.max,t,n,a,i)}function ex(e,t,[n,r,i],s,o){_R(e,t[n],t[r],t[i],t.scale,s,o)}const CR=["x","scaleX","originX"],PR=["y","scaleY","originY"];function tx(e,t,n,r){ex(e.x,t,CR,n?n.x:void 0,r?r.x:void 0),ex(e.y,t,PR,n?n.y:void 0,r?r.y:void 0)}function nx(e){return e.translate===0&&e.scale===1}function ak(e){return nx(e.x)&&nx(e.y)}function rx(e,t){return e.min===t.min&&e.max===t.max}function ER(e,t){return rx(e.x,t.x)&&rx(e.y,t.y)}function ix(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function lk(e,t){return ix(e.x,t.x)&&ix(e.y,t.y)}function sx(e){return pt(e.x)/pt(e.y)}function ox(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Pn(e){return[e("x"),e("y")]}function jR(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:u,rotate:c,pathRotation:d,rotateX:h,rotateY:p,skewX:m,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}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 uk=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],TR=uk.length,ax=e=>typeof e=="string"?parseFloat(e):e,lx=e=>typeof e=="number"||Y.test(e);function RR(e,t,n,r,i,s){i?(e.opacity=ve(0,n.opacity??1,MR(r)),e.opacityExit=ve(t.opacity??1,0,AR(r))):s&&(e.opacity=ve(t.opacity??1,n.opacity??1,r));for(let o=0;o<TR;o++){const a=uk[o];let l=ux(t,a),u=ux(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||lx(l)===lx(u)?(e[a]=Math.max(ve(ax(l),ax(u),r),0),(In.test(u)||In.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=ve(t.rotate||0,n.rotate||0,r))}function ux(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const MR=ck(0,.5,tb),AR=ck(.5,.95,on);function ck(e,t,n){return r=>r<e?0:r>t?1:n(aa(e,t,r))}function LR(e,t,n){const r=Ze(e)?e:Is(e);return r.start(Yp("",r,t,n)),r.animation}function ca(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const IR=(e,t)=>e.depth-t.depth;class DR{constructor(){this.children=[],this.isDirty=!1}add(t){Np(this.children,t),this.isDirty=!0}remove(t){wu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(IR),this.isDirty=!1,this.children.forEach(t)}}function NR(e,t){const n=ht.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Qr(r),e(s-t))};return we.setup(r,!0),()=>Qr(r)}function Dl(e){return Ze(e)?e.get():e}class zR{constructor(){this.members=[]}add(t){Np(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&&(wu(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(wu(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 Nl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},fd=["","X","Y","Z"],OR=1e3;let BR=0;function hd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ab(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&dk(r)}function fk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=BR++,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(VR),this.nodes.forEach(QR),this.nodes.forEach(YR),this.nodes.forEach(UR)},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 DR)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Op),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=em(o)&&!V2(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;we.read(()=>{d=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=NR(h,250),Nl.hasAnimatedSinceResize&&(Nl.hasAnimatedSinceResize=!1,this.nodes.forEach(fx)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||eM,{onLayoutAnimationStart:y,onLayoutAnimationComplete:w}=u.getProps(),g=!this.targetLayout||!lk(this.targetLayout,p),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Qp(m,"layout"),onPlay:y,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x,v.path)}else d||fx(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(),Qr(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(qR),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&&dk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];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 u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(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(HR),this.nodes.forEach(cx);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(dx);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(KR),this.nodes.forEach(GR),this.nodes.forEach(FR),this.nodes.forEach($R)):this.nodes.forEach(dx),this.clearAllSnapshots();const a=ht.now();Xe.delta=Nn(0,1e3/60,a-Xe.timestamp),Xe.timestamp=a,Xe.isProcessing=!0,id.update.process(Xe),id.preRender.process(Xe),id.render.process(Xe),Xe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(WR),this.sharedNodes.forEach(XR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pt(this.snapshot.measuredBox.x)&&!pt(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=We()),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&&!ak(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ci(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),tM(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return We();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(nM))){const{scroll:c}=this.root;c&&(Tn(a.x,c.offset.x),Tn(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=We();if(dn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:h}=c;c!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&dn(a,o),Tn(a.x,d.offset.x),Tn(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var c,d;const u=l||We();dn(u,o);for(let h=0;h<this.path.length;h++){const p=this.path[h];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Tn(u.x,-p.scroll.offset.x),Tn(u.y,-p.scroll.offset.y)),ci(p.latestValues)&&Il(u,p.latestValues,(c=p.layout)==null?void 0:c.layoutBox)}return ci(this.latestValues)&&Il(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(o){var l;const a=We();dn(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!ci(c.latestValues))continue;let d;c.instance&&(uh(c.latestValues)&&c.updateSnapshot(),d=We(),dn(d,c.measurePageBox())),tx(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return ci(this.latestValues)&&tx(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:c,layoutId:d}=this.options;if(!this.layout||!(c||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=We(),this.targetWithTransforms=We()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),SR(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):dn(this.target,this.layout.layoutBox),Yb(this.target,this.targetDelta)):dn(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||uh(this.parent.latestValues)||Qb(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=We(),this.relativeTargetOrigin=We(),Tu(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),dn(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:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;dn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;Z2(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=We());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Yy(this.prevProjectionDelta.x,this.projectionDelta.x),Yy(this.prevProjectionDelta.y,this.projectionDelta.y)),Do(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!ox(this.projectionDelta.x,this.prevProjectionDelta.x)||!ox(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 u=this.snapshot,c=u?u.latestValues:{},d={...this.latestValues},h=cs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=We(),m=u?u.source:void 0,y=this.layout?this.layout.source:void 0,w=m!==y,g=this.getStack(),x=!g||g.members.length<=1,v=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(JR));this.animationProgress=0;let b;const _=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=S=>{const j=S/1e3,E=_==null?void 0:_(j);E?(h.x.translate=E.x,h.x.scale=ve(o.x.scale,1,j),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=E.y,h.y.scale=ve(o.y.scale,1,j),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(hx(h.x,o.x,j),hx(h.y,o.y,j)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tu(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ZR(this.relativeTarget,this.relativeTargetOrigin,p,j),b&&ER(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=We()),dn(b,this.relativeTarget)),w&&(this.animationValues=d,RR(d,c,this.latestValues,j,v,x)),E&&E.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=E.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Qr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Nl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Is(0)),this.motionValue.jump(0,!1),this.currentAnimation=LR(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},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(OR),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&hk(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||We();const d=pt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=pt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}dn(a,l),Il(a,c),Do(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new zR),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.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 u=this.getStack();u&&u.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 u={};l.z&&hd("z",o,u,this.animationValues);for(let c=0;c<fd.length;c++)hd(`rotate${fd[c]}`,o,u,this.animationValues),hd(`skew${fd[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);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=Dl(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Dl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ci(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=jR(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in dh){if(c[m]===void 0)continue;const{correct:y,applyTo:w,isCSSVariable:g}=dh[m],x=d==="none"?c[m]:y(c[m],u);if(w){const v=w.length;for(let b=0;b<v;b++)o[w[b]]=x}else g?this.options.visualElement.renderState.vars[m]=x:o[m]=x}this.options.layoutId&&(o.pointerEvents=u===this?Dl(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(cx),this.root.sharedNodes.clear()}}}function FR(e){e.updateLayout()}function $R(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")Pn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=pt(h);h.min=r[d].min,h.max=h.min+p});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";fh(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else hk(s,t.layoutBox,r)&&Pn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=pt(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();Do(a,r,t.layoutBox);const l=cs();o?Do(l,e.applyTransform(i,!0),t.measuredBox):Do(l,r,t.layoutBox);const u=!ak(a);let c=!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,y=We();Tu(y,t.layoutBox,h.layoutBox,m);const w=We();Tu(w,r,p.layoutBox,m),lk(y,w)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function VR(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 UR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function WR(e){e.clearSnapshot()}function cx(e){e.clearMeasurements()}function HR(e){e.isLayoutDirty=!0,e.updateLayout()}function dx(e){e.isLayoutDirty=!1}function KR(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function GR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function fx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function QR(e){e.resolveTargetDelta()}function YR(e){e.calcProjection()}function qR(e){e.resetSkewAndRotation()}function XR(e){e.removeLeadSnapshot()}function hx(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function px(e,t,n,r){e.min=ve(t.min,n.min,r),e.max=ve(t.max,n.max,r)}function ZR(e,t,n,r){px(e.x,t.x,n.x,r),px(e.y,t.y,n.y,r)}function JR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const eM={duration:.45,ease:[.4,0,.1,1]},mx=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),gx=mx("applewebkit/")&&!mx("chrome/")?Math.round:on;function yx(e){e.min=gx(e.min),e.max=gx(e.max)}function tM(e){yx(e.x),yx(e.y)}function hk(e,t,n){return e==="position"||e==="preserve-aspect"&&!kR(sx(t),sx(n),.2)}function nM(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const rM=fk({attachResizeListener:(e,t)=>ca(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}),pd={current:void 0},pk=fk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pd.current){const e=new rM({});e.mount(window),e.setOptions({layoutScroll:!0}),pd.current=e}return pd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),om=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function xx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function iM(...e){return t=>{let n=!1;const r=e.map(i=>{const s=xx(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():xx(e[i],null)}}}}function sM(...e){return C.useCallback(iM(...e),e)}class oM extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Rl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Rl(r)&&r.offsetWidth||0,s=Rl(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 aM({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var h;const o=C.useId(),a=C.useRef(null),l=C.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=C.useContext(om),c=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=sM(a,c);return C.useInsertionEffect(()=>{const{width:p,height:m,top:y,left:w,right:g,bottom:x,direction:v}=l.current;if(t||s===!1||!a.current||!p||!m)return;const b=v==="rtl",_=n==="left"?b?`right: ${g}`:`left: ${w}`:b?`left: ${w}`:`right: ${g}`,S=r==="bottom"?`bottom: ${x}`:`top: ${y}`;a.current.dataset.motionPopId=o;const j=document.createElement("style");u&&(j.nonce=u);const E=i??document.head;return E.appendChild(j),j.sheet&&j.sheet.insertRule(`
57
+ [data-motion-pop-id="${o}"] {
58
+ position: absolute !important;
59
+ width: ${p}px !important;
60
+ height: ${m}px !important;
61
+ ${_}px !important;
62
+ ${S}px !important;
63
+ }
64
+ `),()=>{var M;(M=a.current)==null||M.removeAttribute("data-motion-pop-id"),E.contains(j)&&E.removeChild(j)}},[t]),f.jsx(oM,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:C.cloneElement(e,{ref:d})})}const lM=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Dp(uM),d=C.useId();let h=!0,p=C.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:m=>{c.set(m,!0);for(const y of c.values())if(!y)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return s&&h&&(p={...p}),C.useMemo(()=>{c.forEach((m,y)=>c.set(y,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=f.jsx(aM,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),f.jsx(lc.Provider,{value:p,children:e})};function uM(){return new Map}function mk(e=!0){const t=C.useContext(lc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=C.useId();C.useEffect(()=>{if(e)return i(s)},[e]);const o=C.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Ja=e=>e.key||"";function vx(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const fc=({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:u})=>{const[c,d]=mk(o),h=C.useMemo(()=>vx(e),[e]),p=o&&!c?[]:h.map(Ja),m=C.useRef(!0),y=C.useRef(h),w=Dp(()=>new Map),g=C.useRef(new Set),[x,v]=C.useState(h),[b,_]=C.useState(h);Uw(()=>{m.current=!1,y.current=h;for(let E=0;E<b.length;E++){const M=Ja(b[E]);p.includes(M)?(w.delete(M),g.current.delete(M)):w.get(M)!==!0&&w.set(M,!1)}},[b,p.length,p.join("-")]);const S=[];if(h!==x){let E=[...h];for(let M=0;M<b.length;M++){const P=b[M],R=Ja(P);p.includes(R)||(E.splice(M,0,P),S.push(P))}return s==="wait"&&S.length&&(E=S),_(vx(E)),v(h),null}const{forceRender:j}=C.useContext(Ip);return f.jsx(f.Fragment,{children:b.map(E=>{const M=Ja(E),P=o&&!c?!1:h===b||p.includes(M),R=()=>{if(g.current.has(M))return;if(w.has(M))g.current.add(M),w.set(M,!0);else return;let A=!0;w.forEach(B=>{B||(A=!1)}),A&&(j==null||j(),_(y.current),o&&(d==null||d()),r&&r())};return f.jsx(lM,{isPresent:P,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:P?void 0:R,anchorX:a,anchorY:l,children:E},M)})})},gk=C.createContext({strict:!1}),wx={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 bx=!1;function cM(){if(bx)return;const e={};for(const t in wx)e[t]={isEnabled:n=>wx[t].some(r=>!!n[r])};Hb(e),bx=!0}function yk(){return cM(),Q2()}function dM(e){const t=yk();for(const n in e)t[n]={...t[n],...e[n]};Hb(t)}const fM=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 Ru(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fM.has(e)}let xk=e=>!Ru(e);function hM(e){typeof e=="function"&&(xk=t=>t.startsWith("on")?!Ru(t):e(t))}try{hM(require("@emotion/is-prop-valid").default)}catch{}function pM(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||Ze(e[i])||(xk(i)||n===!0&&Ru(i)||!t&&!Ru(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const hc=C.createContext({});function mM(e,t){if(dc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ua(n)?n:void 0,animate:ua(r)?r:void 0}}return e.inherit!==!1?t:{}}function gM(e){const{initial:t,animate:n}=mM(e,C.useContext(hc));return C.useMemo(()=>({initial:t,animate:n}),[kx(t),kx(n)])}function kx(e){return Array.isArray(e)?e.join(" "):e}const am=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vk(e,t,n){for(const r in t)!Ze(t[r])&&!Zb(r,n)&&(e[r]=t[r])}function yM({transformTemplate:e},t){return C.useMemo(()=>{const n=am();return im(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xM(e,t){const n=e.style||{},r={};return vk(r,n,e),Object.assign(r,yM(e,t)),r}function vM(e,t){const n={},r=xM(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 wk=()=>({...am(),attrs:{}});function wM(e,t,n,r){const i=C.useMemo(()=>{const s=wk();return Jb(s,t,tk(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};vk(s,e.style,e),i.style={...s,...i.style}}return i}const bM=["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 lm(e){return typeof e!="string"||e.includes("-")?!1:!!(bM.indexOf(e)>-1||/[A-Z]/u.test(e))}function kM(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??lm(e)?wM:vM)(t,r,i,e),u=pM(t,typeof e=="string",s),c=e!==C.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=C.useMemo(()=>Ze(d)?d.get():d,[d]);return C.createElement(e,{...c,children:h})}function SM({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:_M(n,r,i,e),renderState:t()}}function _M(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=Dl(s[h]);let{initial:o,animate:a}=e;const l=dc(e),u=Ub(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!cc(d)){const h=Array.isArray(d)?d:[d];for(let p=0;p<h.length;p++){const m=qp(e,h[p]);if(m){const{transitionEnd:y,transition:w,...g}=m;for(const x in g){let v=g[x];if(Array.isArray(v)){const b=c?v.length-1:0;v=v[b]}v!==null&&(i[x]=v)}for(const x in y)i[x]=y[x]}}}return i}const bk=e=>(t,n)=>{const r=C.useContext(hc),i=C.useContext(lc),s=()=>SM(e,t,r,i);return n?s():Dp(s)},CM=bk({scrapeMotionValuesFromProps:sm,createRenderState:am}),PM=bk({scrapeMotionValuesFromProps:nk,createRenderState:wk}),EM=Symbol.for("motionComponentSymbol");function jM(e,t,n){const r=C.useRef(n);C.useInsertionEffect(()=>{r.current=n});const i=C.useRef(null);return C.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 kk=C.createContext({});function Yi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TM(e,t,n,r,i,s){var v,b;const{visualElement:o}=C.useContext(hc),a=C.useContext(gk),l=C.useContext(lc),u=C.useContext(om),c=u.reducedMotion,d=u.skipAnimations,h=C.useRef(null),p=C.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:c,skipAnimations:d,isSVG:s}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=C.useContext(kk);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&RM(h.current,n,i,y);const w=C.useRef(!1);C.useInsertionEffect(()=>{m&&w.current&&m.update(n,l)});const g=n[Mb],x=C.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,g)));return Uw(()=>{p.current=!0,m&&(w.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),C.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,g)}),x.current=!1),m.enteringChildren=void 0)}),m}function RM(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Sk(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:u,layoutAnchor:c})}function Sk(e){if(e)return e.options.allowProjection!==!1?e.projection:Sk(e.parent)}function md(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&dM(r);const s=n?n==="svg":lm(e),o=s?PM:CM;function a(u,c){let d;const h={...C.useContext(om),...u,layoutId:MM(u)},{isStatic:p}=h,m=gM(u),y=o(u,p);if(!p&&typeof window<"u"){AM();const w=LM(h);d=w.MeasureLayout,m.visualElement=TM(e,y,h,i,w.ProjectionNode,s)}return f.jsxs(hc.Provider,{value:m,children:[d&&m.visualElement?f.jsx(d,{visualElement:m.visualElement,...h}):null,kM(e,u,jM(y,m.visualElement,c),y,p,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=C.forwardRef(a);return l[EM]=e,l}function MM({layoutId:e}){const t=C.useContext(Ip).id;return t&&e!==void 0?t+"-"+e:e}function AM(e,t){C.useContext(gk).strict}function LM(e){const t=yk(),{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 IM(e,t){if(typeof Proxy>"u")return md;const n=new Map,r=(s,o)=>md(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,md(o,void 0,e,t)),n.get(o))})}const DM=(e,t)=>t.isSVG??lm(e)?new dR(t):new sR(t,{allowProjection:e!==C.Fragment});class NM extends Jr{constructor(t){super(t),t.animationState||(t.animationState=gR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();cc(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 zM=0;class OM extends Jr{constructor(){super(...arguments),this.id=zM++,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=Ei(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...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 BM={animation:{Feature:NM},exit:{Feature:OM}};function wa(e){return{point:{x:e.pageX,y:e.pageY}}}const FM=e=>t=>Jp(t)&&e(t,wa(t));function No(e,t,n,r){return ca(e,t,FM(n),r)}const _k=({current:e})=>e?e.ownerDocument.defaultView:null,Sx=(e,t)=>Math.abs(e-t);function $M(e,t){const n=Sx(e.x,t.x),r=Sx(e.y,t.y);return Math.sqrt(n**2+r**2)}const _x=new Set(["auto","scroll"]);class Ck{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=el(this.lastRawMoveEventInfo,this.transformPagePoint));const p=gd(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=$M(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:w}=p,{timestamp:g}=Xe;this.history.push({...w,timestamp:g});const{onStart:x,onMove:v}=this.handlers;m||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=el(m,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:y,onSessionEnd:w,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=gd(p.type==="pointercancel"?this.lastMoveEventInfo:el(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,x),w&&w(p,x)},!Jp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=wa(t),u=el(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=Xe;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,gd(u,this.history)),this.removeListeners=ya(No(this.contextWindow,"pointermove",this.handlePointerMove),No(this.contextWindow,"pointerup",this.handlePointerUp),No(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(_x.has(r.overflowX)||_x.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),we.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Qr(this.updatePoint)}}function el(e,t){return t?{point:t(e.point)}:e}function Cx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gd({point:e},t){return{point:e,delta:Cx(e,Pk(t)),offset:Cx(e,VM(t)),velocity:UM(t,.1)}}function VM(e){return e[0]}function Pk(e){return e[e.length-1]}function UM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Pk(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>$t(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>$t(t)*2&&(r=e[1]);const s=nn(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 WM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ve(n,e,r.max):Math.min(e,n)),e}function Px(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 HM(e,{top:t,left:n,bottom:r,right:i}){return{x:Px(e.x,n,i),y:Px(e.y,t,r)}}function Ex(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 KM(e,t){return{x:Ex(e.x,t.x),y:Ex(e.y,t.y)}}function GM(e,t){let n=.5;const r=pt(e),i=pt(t);return i>r?n=aa(t.min,t.max-r,e.min):r>i&&(n=aa(e.min,e.max-i,t.min)),Nn(0,1,n)}function QM(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 hh=.35;function YM(e=hh){return e===!1?e=0:e===!0&&(e=hh),{x:jx(e,"left","right"),y:jx(e,"top","bottom")}}function jx(e,t,n){return{min:Tx(e,t),max:Tx(e,n)}}function Tx(e,t){return typeof e=="number"?e:e[t]||0}const qM=new WeakMap;class XM{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=We(),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(wa(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:p,dragPropagation:m,onDragStart:y}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=C2(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),Pn(g=>{let x=this.getAxisMotionValue(g).get()||0;if(In.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[g];b&&(x=pt(b)*(parseFloat(x)/100))}}this.originPoint[g]=x}),y&&we.update(()=>y(d,h),!1,!0),ih(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:y,onDrag:w}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:g}=h;if(m&&this.currentDirection===null){this.currentDirection=JM(g),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),w&&we.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},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ck(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:_k(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&&we.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||!tl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=WM(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=HM(r.layoutBox,t):this.constraints=!1,this.elastic=YM(n),i!==this.constraints&&!Yi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Pn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=QM(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=J2(r,i.root,this.visualElement.getTransformPagePoint());let o=KM(i.layout.layoutBox,s);if(n){const a=n(q2(o));this.hasMutatedConstraints=!!a,a&&(o=Gb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Pn(c=>{if(!tl(c,n,this.currentDirection))return;let d=l&&l[c]||{};(o===!0||o===c)&&(d={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ih(this.visualElement,t),r.start(Yp(t,r,0,n,this.visualElement,!1))}stopAnimation(){Pn(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){Pn(n=>{const{drag:r}=this.getProps();if(!tl(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]-ve(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};Pn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=GM({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(),Pn(o=>{if(!tl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(ve(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;qM.set(this.visualElement,this);const t=this.visualElement.current,n=No(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,p=h!==t&&M2(h);c&&d&&!p&&this.start(u)});let r;const i=()=>{const{dragConstraints:u}=this.getProps();Yi(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=ZM(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),we.read(i);const a=ca(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Pn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[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=hh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Rx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ZM(e,t,n){const r=zy(e,Rx(n)),i=zy(t,Rx(n));return()=>{r(),i()}}function tl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function JM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class eA extends Jr{constructor(t){super(t),this.removeGroupControls=on,this.removeListeners=on,this.controls=new XM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||on}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 yd=e=>(t,n)=>{e&&we.update(()=>e(t,n),!1,!0)};class tA extends Jr{constructor(){super(...arguments),this.removePointerDownListener=on}onPointerDown(t){this.session=new Ck(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_k(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:yd(t),onStart:yd(n),onMove:yd(r),onEnd:(s,o)=>{delete this.session,i&&we.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=No(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 xd=!1;class nA extends C.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),xd&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Nl.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}),xd=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||we.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(),Zp.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;xd=!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 Ek(e){const[t,n]=mk(),r=C.useContext(Ip);return f.jsx(nA,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(kk),isPresent:t,safeToRemove:n})}const rA={pan:{Feature:tA},drag:{Feature:eA,ProjectionNode:pk,MeasureLayout:Ek}};function Mx(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&&we.postRender(()=>s(t,wa(t)))}class iA extends Jr{mount(){const{current:t}=this.node;t&&(this.unmount=E2(t,(n,r)=>(Mx(this.node,r,"Start"),i=>Mx(this.node,i,"End"))))}unmount(){}}class sA extends Jr{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=ya(ca(this.node.current,"focus",()=>this.onFocus()),ca(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ax(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&&we.postRender(()=>s(t,wa(t)))}class oA extends Jr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=L2(t,(i,s)=>(Ax(this.node,s,"Start"),(o,{success:a})=>Ax(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const ph=new WeakMap,vd=new WeakMap,aA=e=>{const t=ph.get(e.target);t&&t(e)},lA=e=>{e.forEach(aA)};function uA({root:e,...t}){const n=e||document;vd.has(n)||vd.set(n,{});const r=vd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lA,{root:e,...t})),r[i]}function cA(e,t,n){const r=uA(t);return ph.set(e,n),r.observe(e),()=>{ph.delete(e),r.unobserve(e)}}const dA={some:0,all:1};class fA extends Jr{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:dA[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=c?d:h;p&&p(u)};this.stopObserver=cA(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(hA(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function hA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const pA={inView:{Feature:fA},tap:{Feature:oA},focus:{Feature:sA},hover:{Feature:iA}},mA={layout:{ProjectionNode:pk,MeasureLayout:Ek}},gA={...BM,...pA,...rA,...mA},Ds=IM(gA,DM);function pc(){!rm.current&&Wb();const[e]=C.useState(Pu.current);return e}function jk(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=jk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function yA(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jk(e))&&(r&&(r+=" "),r+=t);return r}const um="-",xA=e=>{const t=wA(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(um);return a[0]===""&&a.length!==1&&a.shift(),Tk(a,t)||vA(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Tk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Tk(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(um);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Lx=/^\[(.+)\]$/,vA=e=>{if(Lx.test(e)){const t=Lx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},wA=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return kA(Object.entries(e.classGroups),n).forEach(([s,o])=>{mh(o,r,s,t)}),r},mh=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Ix(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(bA(i)){mh(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{mh(o,Ix(t,s),n,r)})})},Ix=(e,t)=>{let n=e;return t.split(um).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bA=e=>e.isThemeGetter,kA=(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,SA=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)}}},Rk="!",_A=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===i&&(r||a.slice(w,w+s)===t)){l.push(a.slice(c,w)),c=w+s;continue}if(g==="/"){d=w;continue}}g==="["?u++:g==="]"&&u--}const h=l.length===0?a:a.substring(c),p=h.startsWith(Rk),m=p?h.substring(1):h,y=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},CA=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},PA=e=>({cache:SA(e.cacheSize),parseClassName:_A(e),...xA(e)}),EA=/\s+/,jA=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(EA);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let m=!!p,y=r(m?h.substring(0,p):h);if(!y){if(!m){a=u+(a.length>0?" "+a:a);continue}if(y=r(h),!y){a=u+(a.length>0?" "+a:a);continue}m=!1}const w=CA(c).join(":"),g=d?w+Rk:w,x=g+y;if(s.includes(x))continue;s.push(x);const v=i(y,m);for(let b=0;b<v.length;++b){const _=v[b];s.push(g+_)}a=u+(a.length>0?" "+a:a)}return a};function TA(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Mk(t))&&(r&&(r+=" "),r+=n);return r}const Mk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Mk(e[r]))&&(n&&(n+=" "),n+=t);return n};function RA(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=PA(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=jA(l,n);return i(l,c),c}return function(){return s(TA.apply(null,arguments))}}const _e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ak=/^\[(?:([a-z-]+):)?(.+)\]$/i,MA=/^\d+\/\d+$/,AA=new Set(["px","full","screen"]),LA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IA=/\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$/,DA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,NA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vn=e=>xs(e)||AA.has(e)||MA.test(e),dr=e=>Ws(e,"length",HA),xs=e=>!!e&&!Number.isNaN(Number(e)),wd=e=>Ws(e,"number",xs),lo=e=>!!e&&Number.isInteger(Number(e)),OA=e=>e.endsWith("%")&&xs(e.slice(0,-1)),te=e=>Ak.test(e),fr=e=>LA.test(e),BA=new Set(["length","size","percentage"]),FA=e=>Ws(e,BA,Lk),$A=e=>Ws(e,"position",Lk),VA=new Set(["image","url"]),UA=e=>Ws(e,VA,GA),WA=e=>Ws(e,"",KA),uo=()=>!0,Ws=(e,t,n)=>{const r=Ak.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},HA=e=>IA.test(e)&&!DA.test(e),Lk=()=>!1,KA=e=>NA.test(e),GA=e=>zA.test(e),QA=()=>{const e=_e("colors"),t=_e("spacing"),n=_e("blur"),r=_e("brightness"),i=_e("borderColor"),s=_e("borderRadius"),o=_e("borderSpacing"),a=_e("borderWidth"),l=_e("contrast"),u=_e("grayscale"),c=_e("hueRotate"),d=_e("invert"),h=_e("gap"),p=_e("gradientColorStops"),m=_e("gradientColorStopPositions"),y=_e("inset"),w=_e("margin"),g=_e("opacity"),x=_e("padding"),v=_e("saturate"),b=_e("scale"),_=_e("sepia"),S=_e("skew"),j=_e("space"),E=_e("translate"),M=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",te,t],A=()=>[te,t],B=()=>["",Vn,dr],I=()=>["auto",xs,te],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["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"],D=()=>["","0",te],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[xs,te];return{cacheSize:500,separator:":",theme:{colors:[uo],spacing:[Vn,dr],blur:["none","",fr,te],brightness:K(),borderColor:[e],borderRadius:["none","","full",fr,te],borderSpacing:A(),borderWidth:B(),contrast:K(),grayscale:D(),hueRotate:K(),invert:D(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[OA,dr],inset:R(),margin:R(),opacity:K(),padding:A(),saturate:K(),scale:K(),sepia:D(),skew:K(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[fr]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:[...O(),te]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",lo,te]}],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",te]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",lo,te]}],"grid-cols":[{"grid-cols":[uo]}],"col-start-end":[{col:["auto",{span:["full",lo,te]},te]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[uo]}],"row-start-end":[{row:["auto",{span:[lo,te]},te]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],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:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],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":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[fr]},fr]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",fr,dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wd]}],"font-family":[{font:[uo]}],"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",te]}],"line-clamp":[{"line-clamp":["none",xs,wd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"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:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,dr]}],"underline-offset":[{"underline-offset":["auto",Vn,te]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],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",te]}],"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:[...O(),$A]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",FA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},UA]}],"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:[...F(),"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:F()}],"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:["",...F()]}],"outline-offset":[{"outline-offset":[Vn,te]}],"outline-w":[{outline:[Vn,dr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Vn,dr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fr,WA]}],"shadow-color":[{shadow:[uo]}],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",fr,te]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"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",te]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[lo,te]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"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",te]}],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",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vn,dr,wd]}],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"]}}},YA=RA(QA);function bd(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[u,c]=l;l[0]=(u-r)*o-(c-i)*a+r,l[1]=(u-r)*a+(c-i)*o+i}}}function qA(e,t){return e[0]===t[0]&&e[1]===t[1]}function XA(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 u of o)bd(u,a,i);const l=function(u,c,d){const h=[];for(const x of u){const v=[...x];qA(v[0],v[v.length-1])||v.push([v[0][0],v[0][1]]),v.length>2&&h.push(v)}const p=[];c=Math.max(c,.1);const m=[];for(const x of h)for(let v=0;v<x.length-1;v++){const b=x[v],_=x[v+1];if(b[1]!==_[1]){const S=Math.min(b[1],_[1]);m.push({ymin:S,ymax:Math.max(b[1],_[1]),x:S===b[1]?b[0]:_[0],islope:(_[0]-b[0])/(_[1]-b[1])})}}if(m.sort((x,v)=>x.ymin<v.ymin?-1:x.ymin>v.ymin?1:x.x<v.x?-1:x.x>v.x?1:x.ymax===v.ymax?0:(x.ymax-v.ymax)/Math.abs(x.ymax-v.ymax)),!m.length)return p;let y=[],w=m[0].ymin,g=0;for(;y.length||m.length;){if(m.length){let x=-1;for(let v=0;v<m.length&&!(m[v].ymin>w);v++)x=v;m.splice(0,x+1).forEach(v=>{y.push({s:w,edge:v})})}if(y=y.filter(x=>!(x.edge.ymax<=w)),y.sort((x,v)=>x.edge.x===v.edge.x?0:(x.edge.x-v.edge.x)/Math.abs(x.edge.x-v.edge.x)),(d!==1||g%c==0)&&y.length>1)for(let x=0;x<y.length;x+=2){const v=x+1;if(v>=y.length)break;const b=y[x].edge,_=y[v].edge;p.push([[Math.round(b.x),w],[Math.round(_.x),w]])}w+=d,y.forEach(x=>{x.edge.x=x.edge.x+d*x.edge.islope}),g++}return p}(o,s,r);if(i){for(const u of o)bd(u,a,-i);(function(u,c,d){const h=[];u.forEach(p=>h.push(...p)),bd(h,c,d)})(l,a,-i)}return l}function ba(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),XA(e,i,r,s||1)}class cm{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){const r=ba(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 mc(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))}let ZA=class extends cm{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=ba(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[u,c]of i)mc([u,c])&&o.push([[u[0]-a,u[1]+l],[...c]],[[u[0]+a,u[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,n)}}};class JA extends cm{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 eL{constructor(t){this.helper=t}fillPolygons(t,n){const r=ba(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=mc(a),u=l/i,c=Math.ceil(u)-1,d=l-c*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<c;m++){const y=p+d+m*i,w=h-o+2*Math.random()*o,g=y-o+2*Math.random()*o,x=this.helper.ellipse(w,g,s,s,n);r.push(...x.ops)}}return{type:"fillSketch",ops:r}}}class tL{constructor(t){this.helper=t}fillPolygons(t,n){const r=ba(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=mc(o),l=Math.floor(a/(r+i)),u=(a+i-l*(r+i))/2;let c=o[0],d=o[1];c[0]>d[0]&&(c=o[1],d=o[0]);const h=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let p=0;p<l;p++){const m=p*(r+i),y=m+r,w=[c[0]+m*Math.cos(h)+u*Math.cos(h),c[1]+m*Math.sin(h)+u*Math.sin(h)],g=[c[0]+y*Math.cos(h)+u*Math.cos(h),c[1]+y*Math.sin(h)+u*Math.sin(h)];s.push(...this.helper.doubleLineOps(w[0],w[1],g[0],g[1],n))}}),s}}class nL{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=ba(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=mc(s),a=Math.round(o/(2*n));let l=s[0],u=s[1];l[0]>u[0]&&(l=s[1],u=s[0]);const c=Math.atan((u[1]-l[1])/(u[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)),y=[l[0]+h*Math.cos(c),l[1]+h*Math.sin(c)],w=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],g=[y[0]+m*Math.cos(c+Math.PI/4),y[1]+m*Math.sin(c+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],g[0],g[1],r),...this.helper.doubleLineOps(g[0],g[1],w[0],w[1],r))}}),i}}const vt={};class rL{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const iL=0,kd=1,Dx=2,nl={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 Sd(e,t){return e.type===t}function dm(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:iL,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:kd,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return a[a.length]={type:Dx,text:""},a}(e);let r="BOD",i=0,s=n[i];for(;!Sd(s,Dx);){let o=0;const a=[];if(r==="BOD"){if(s.text!=="M"&&s.text!=="m")return dm("M0,0"+e);i++,o=nl[s.text],r=s.text}else Sd(s,kd)?o=nl[r]:(i++,o=nl[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 u=n[l];if(!Sd(u,kd))throw new Error("Param not a number: "+r+","+u.text);a[a.length]=+u.text}if(typeof nl[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 Ik(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((u,c)=>c%2?u+n:u+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((u,c)=>c%2?u+n:u+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((u,c)=>c%2?u+n:u+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 Dk(e){const t=[];let n="",r=0,i=0,s=0,o=0,a=0,l=0;for(const{key:u,data:c}of e){switch(u){case"M":t.push({key:"M",data:[...c]}),[r,i]=c,[s,o]=c;break;case"C":t.push({key:"C",data:[...c]}),r=c[4],i=c[5],a=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[r,i]=c;break;case"H":r=c[0],t.push({key:"L",data:[r,i]});break;case"V":i=c[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,...c]}),a=c[0],l=c[1],r=c[2],i=c[3];break}case"T":{const[d,h]=c;let p=0,m=0;n==="Q"||n==="T"?(p=r+(r-a),m=i+(i-l)):(p=r,m=i);const y=r+2*(p-r)/3,w=i+2*(m-i)/3,g=d+2*(p-d)/3,x=h+2*(m-h)/3;t.push({key:"C",data:[y,w,g,x,d,h]}),a=p,l=m,r=d,i=h;break}case"Q":{const[d,h,p,m]=c,y=r+2*(d-r)/3,w=i+2*(h-i)/3,g=p+2*(d-p)/3,x=m+2*(h-m)/3;t.push({key:"C",data:[y,w,g,x,p,m]}),a=d,l=h,r=p,i=m;break}case"A":{const d=Math.abs(c[0]),h=Math.abs(c[1]),p=c[2],m=c[3],y=c[4],w=c[5],g=c[6];d===0||h===0?(t.push({key:"C",data:[r,i,w,g,w,g]}),r=w,i=g):(r!==w||i!==g)&&(Nk(r,i,w,g,d,h,p,m,y).forEach(function(x){t.push({key:"C",data:x})}),r=w,i=g);break}case"Z":t.push({key:"Z",data:[]}),r=s,i=o}n=u}return t}function co(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Nk(e,t,n,r,i,s,o,a,l,u){const c=(d=o,Math.PI*d/180);var d;let h=[],p=0,m=0,y=0,w=0;if(u)[p,m,y,w]=u;else{[e,t]=co(e,t,-c),[n,r]=co(n,r,-c);const B=(e-n)/2,I=(t-r)/2;let O=B*B/(i*i)+I*I/(s*s);O>1&&(O=Math.sqrt(O),i*=O,s*=O);const F=i*i,H=s*s,z=F*H-F*I*I-H*B*B,D=F*I*I+H*B*B,k=(a===l?-1:1)*Math.sqrt(Math.abs(z/D));y=k*i*I/s+(e+n)/2,w=k*-s*B/i+(t+r)/2,p=Math.asin(parseFloat(((t-w)/s).toFixed(9))),m=Math.asin(parseFloat(((r-w)/s).toFixed(9))),e<y&&(p=Math.PI-p),n<y&&(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 B=m,I=n,O=r;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,h=Nk(n=y+i*Math.cos(m),r=w+s*Math.sin(m),I,O,i,s,o,0,l,[m,B,y,w])}g=m-p;const x=Math.cos(p),v=Math.sin(p),b=Math.cos(m),_=Math.sin(m),S=Math.tan(g/4),j=4/3*i*S,E=4/3*s*S,M=[e,t],P=[e+j*v,t-E*x],R=[n+j*_,r-E*b],A=[n,r];if(P[0]=2*M[0]-P[0],P[1]=2*M[1]-P[1],u)return[P,R,A].concat(h);{h=[P,R,A].concat(h);const B=[];for(let I=0;I<h.length;I+=3){const O=co(h[I][0],h[I][1],c),F=co(h[I+1][0],h[I+1][1],c),H=co(h[I+2][0],h[I+2][1],c);B.push([O[0],O[1],F[0],F[1],H[0],H[1]])}return B}}const sL={randOffset:function(e,t){return X(e,t)},randOffsetWithRange:function(e,t,n){return Mu(e,t,n)},ellipse:function(e,t,n,r,i){const s=Ok(n,r,i);return gh(e,t,i,s).opset},doubleLineOps:function(e,t,n,r,i){return Yr(e,t,n,r,i,!0)}};function zk(e,t,n,r,i){return{type:"path",ops:Yr(e,t,n,r,i)}}function zl(e,t,n){const r=(e||[]).length;if(r>2){const i=[];for(let s=0;s<r-1;s++)i.push(...Yr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],n));return t&&i.push(...Yr(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}return r===2?zk(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function oL(e,t,n,r,i){return function(s,o){return zl(s,!0,o)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Nx(e,t){if(e.length){const n=typeof e[0][0]=="number"?[e]:e,r=rl(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:rl(n[0],1.5*(1+.22*t.roughness),Bx(t));for(let s=1;s<n.length;s++){const o=n[s];if(o.length){const a=rl(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:rl(o,1.5*(1+.22*t.roughness),Bx(t));for(const u of a)u.op!=="move"&&r.push(u);for(const u of l)u.op!=="move"&&i.push(u)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function Ok(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+=X(o*l,n),a+=X(a*l,n),{increment:s,rx:o,ry:a}}function gh(e,t,n,r){const[i,s]=Fx(r.increment,e,t,r.rx,r.ry,1,r.increment*Mu(.1,Mu(.4,1,n),n),n);let o=Au(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=Fx(r.increment,e,t,r.rx,r.ry,1.5,0,n),l=Au(a,null,n);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function zx(e,t,n,r,i,s,o,a,l){const u=e,c=t;let d=Math.abs(n/2),h=Math.abs(r/2);d+=X(.01*d,l),h+=X(.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 y=2*Math.PI/l.curveStepCount,w=Math.min(y/2,(m-p)/2),g=$x(w,u,c,d,h,p,m,1,l);if(!l.disableMultiStroke){const x=$x(w,u,c,d,h,p,m,1.5,l);g.push(...x)}return o&&(a?g.push(...Yr(u,c,u+d*Math.cos(p),c+h*Math.sin(p),l),...Yr(u,c,u+d*Math.cos(m),c+h*Math.sin(m),l)):g.push({op:"lineTo",data:[u,c]},{op:"lineTo",data:[u+d*Math.cos(p),c+h*Math.sin(p)]})),{type:"path",ops:g}}function Ox(e,t){const n=Dk(Ik(dm(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(...Yr(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]];break;case"C":{const[l,u,c,d,h,p]=a;r.push(...aL(l,u,c,d,h,p,s,t)),s=[h,p];break}case"Z":r.push(...Yr(s[0],s[1],i[0],i[1],t)),s=[i[0],i[1]]}return{type:"path",ops:r}}function _d(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]+X(i,t),r[0][1]+X(i,t)]});for(let o=1;o<s;o++)n.push({op:"lineTo",data:[r[o][0]+X(i,t),r[o][1]+X(i,t)]})}}return{type:"fillPath",ops:n}}function Vi(e,t){return function(n,r){let i=n.fillStyle||"hachure";if(!vt[i])switch(i){case"zigzag":vt[i]||(vt[i]=new ZA(r));break;case"cross-hatch":vt[i]||(vt[i]=new JA(r));break;case"dots":vt[i]||(vt[i]=new eL(r));break;case"dashed":vt[i]||(vt[i]=new tL(r));break;case"zigzag-line":vt[i]||(vt[i]=new nL(r));break;default:i="hachure",vt[i]||(vt[i]=new cm(r))}return vt[i]}(t,sL).fillPolygons(e,t)}function Bx(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Bk(e){return e.randomizer||(e.randomizer=new rL(e.seed||0)),e.randomizer.next()}function Mu(e,t,n,r=1){return n.roughness*r*(Bk(n)*(t-e)+e)}function X(e,t,n=1){return Mu(-e,e,t,n)}function Yr(e,t,n,r,i,s=!1){const o=s?i.disableMultiStrokeFill:i.disableMultiStroke,a=yh(e,t,n,r,i,!0,!1);if(o)return a;const l=yh(e,t,n,r,i,!0,!0);return a.concat(l)}function yh(e,t,n,r,i,s,o){const a=Math.pow(e-n,2)+Math.pow(t-r,2),l=Math.sqrt(a);let u=1;u=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=i.maxRandomnessOffset||0;c*c*100>a&&(c=l/10);const d=c/2,h=.2+.2*Bk(i);let p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=X(p,i,u),m=X(m,i,u);const y=[],w=()=>X(d,i,u),g=()=>X(c,i,u),x=i.preserveVertices;return o?y.push({op:"move",data:[e+(x?0:w()),t+(x?0:w())]}):y.push({op:"move",data:[e+(x?0:X(c,i,u)),t+(x?0:X(c,i,u))]}),o?y.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+(x?0:w()),r+(x?0:w())]}):y.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+(x?0:g()),r+(x?0:g())]}),y}function rl(e,t,n){if(!e.length)return[];const r=[];r.push([e[0][0]+X(t,n),e[0][1]+X(t,n)]),r.push([e[0][0]+X(t,n),e[0][1]+X(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+X(t,n),e[i][1]+X(t,n)]),i===e.length-1&&r.push([e[i][0]+X(t,n),e[i][1]+X(t,n)]);return Au(r,null,n)}function Au(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(...yh(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function Fx(e,t,n,r,i,s,o,a){const l=[],u=[];if(a.roughness===0){e/=4,u.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const d=[t+r*Math.cos(c),n+i*Math.sin(c)];l.push(d),u.push(d)}u.push([t+r*Math.cos(0),n+i*Math.sin(0)]),u.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{const c=X(.5,a)-Math.PI/2;u.push([X(s,a)+t+.9*r*Math.cos(c-e),X(s,a)+n+.9*i*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let h=c;h<d;h+=e){const p=[X(s,a)+t+r*Math.cos(h),X(s,a)+n+i*Math.sin(h)];l.push(p),u.push(p)}u.push([X(s,a)+t+r*Math.cos(c+2*Math.PI+.5*o),X(s,a)+n+i*Math.sin(c+2*Math.PI+.5*o)]),u.push([X(s,a)+t+.98*r*Math.cos(c+o),X(s,a)+n+.98*i*Math.sin(c+o)]),u.push([X(s,a)+t+.9*r*Math.cos(c+.5*o),X(s,a)+n+.9*i*Math.sin(c+.5*o)])}return[u,l]}function $x(e,t,n,r,i,s,o,a,l){const u=s+X(.1,l),c=[];c.push([X(a,l)+t+.9*r*Math.cos(u-e),X(a,l)+n+.9*i*Math.sin(u-e)]);for(let d=u;d<=o;d+=e)c.push([X(a,l)+t+r*Math.cos(d),X(a,l)+n+i*Math.sin(d)]);return c.push([t+r*Math.cos(o),n+i*Math.sin(o)]),c.push([t+r*Math.cos(o),n+i*Math.sin(o)]),Au(c,null,l)}function aL(e,t,n,r,i,s,o,a){const l=[],u=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let c=[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:X(u[0],a)),o[1]+(h?0:X(u[0],a))]}),c=h?[i,s]:[i+X(u[p],a),s+X(u[p],a)],l.push({op:"bcurveTo",data:[e+X(u[p],a),t+X(u[p],a),n+X(u[p],a),r+X(u[p],a),c[0],c[1]]});return l}function fo(e){return[...e]}function Vx(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(fo(e[0]),fo(e[1]),fo(e[2]),fo(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(fo(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 Ol(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function lL(e,t,n){const r=Ol(t,n);if(r===0)return Ol(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)),Ol(e,di(t,n,i))}function di(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function xh(e,t,n,r){const i=r||[];if(function(a,l){const u=a[l+0],c=a[l+1],d=a[l+2],h=a[l+3];let p=3*c[0]-2*u[0]-h[0];p*=p;let m=3*c[1]-2*u[1]-h[1];m*=m;let y=3*d[0]-2*h[0]-u[0];y*=y;let w=3*d[1]-2*h[1]-u[1];return w*=w,p<y&&(p=y),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(Ol(s,o))>1&&i.push(a)):i.push(a),i.push(e[t+3])}else{const l=e[t+0],u=e[t+1],c=e[t+2],d=e[t+3],h=di(l,u,.5),p=di(u,c,.5),m=di(c,d,.5),y=di(h,p,.5),w=di(p,m,.5),g=di(y,w,.5);xh([l,h,y,g],0,n,i),xh([g,w,m,d],0,n,i)}var s,o;return i}function uL(e,t){return Lu(e,0,e.length,t)}function Lu(e,t,n,r,i){const s=i||[],o=e[t],a=e[n-1];let l=0,u=1;for(let c=t+1;c<n-1;++c){const d=lL(e[c],o,a);d>l&&(l=d,u=c)}return Math.sqrt(l)>r?(Lu(e,t,u+1,r,s),Lu(e,u,n,r,s)):(s.length||s.push(o),s.push(a)),s}function Cd(e,t=.15,n){const r=[],i=(e.length-1)/3;for(let s=0;s<i;s++)xh(e,3*s,t,r);return n&&n>0?Lu(r,0,r.length,n):r}const Lt="none";let Iu=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",[zk(t,n,r,i,o)],o)}rectangle(t,n,r,i,s){const o=this._o(s),a=[],l=oL(t,n,r,i,o);if(o.fill){const u=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]];o.fillStyle==="solid"?a.push(_d([u],o)):a.push(Vi([u],o))}return o.stroke!==Lt&&a.push(l),this._d("rectangle",a,o)}ellipse(t,n,r,i,s){const o=this._o(s),a=[],l=Ok(r,i,o),u=gh(t,n,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=gh(t,n,o,l).opset;c.type="fillPath",a.push(c)}else a.push(Vi([u.estimatedPoints],o));return o.stroke!==Lt&&a.push(u.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",[zl(t,!1,r)],r)}arc(t,n,r,i,s,o,a=!1,l){const u=this._o(l),c=[],d=zx(t,n,r,i,s,o,a,!0,u);if(a&&u.fill)if(u.fillStyle==="solid"){const h=Object.assign({},u);h.disableMultiStroke=!0;const p=zx(t,n,r,i,s,o,!0,!1,h);p.type="fillPath",c.push(p)}else c.push(function(h,p,m,y,w,g,x){const v=h,b=p;let _=Math.abs(m/2),S=Math.abs(y/2);_+=X(.01*_,x),S+=X(.01*S,x);let j=w,E=g;for(;j<0;)j+=2*Math.PI,E+=2*Math.PI;E-j>2*Math.PI&&(j=0,E=2*Math.PI);const M=(E-j)/x.curveStepCount,P=[];for(let R=j;R<=E;R+=M)P.push([v+_*Math.cos(R),b+S*Math.sin(R)]);return P.push([v+_*Math.cos(E),b+S*Math.sin(E)]),P.push([v,b]),Vi([P],x)}(t,n,r,i,s,o,u));return u.stroke!==Lt&&c.push(d),this._d("arc",c,u)}curve(t,n){const r=this._o(n),i=[],s=Nx(t,r);if(r.fill&&r.fill!==Lt)if(r.fillStyle==="solid"){const o=Nx(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 u of l)u.length<3?o.push(...u):u.length===3?o.push(...Cd(Vx([u[0],u[0],u[1],u[2]]),10,(1+r.roughness)/2)):o.push(...Cd(Vx(u),10,(1+r.roughness)/2))}o.length&&i.push(Vi([o],r))}return r.stroke!==Lt&&i.push(s),this._d("curve",i,r)}polygon(t,n){const r=this._o(n),i=[],s=zl(t,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(_d([t],r)):i.push(Vi([t],r))),r.stroke!==Lt&&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!==Lt,o=r.stroke!==Lt,a=!!(r.simplification&&r.simplification<1),l=function(c,d,h){const p=Dk(Ik(dm(c))),m=[];let y=[],w=[0,0],g=[];const x=()=>{g.length>=4&&y.push(...Cd(g,d)),g=[]},v=()=>{x(),y.length&&(m.push(y),y=[])};for(const{key:_,data:S}of p)switch(_){case"M":v(),w=[S[0],S[1]],y.push(w);break;case"L":x(),y.push([S[0],S[1]]);break;case"C":if(!g.length){const j=y.length?y[y.length-1]:w;g.push([j[0],j[1]])}g.push([S[0],S[1]]),g.push([S[2],S[3]]),g.push([S[4],S[5]]);break;case"Z":x(),y.push([w[0],w[1]])}if(v(),!h)return m;const b=[];for(const _ of m){const S=uL(_,h);S.length&&b.push(S)}return b}(t,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),u=Ox(t,r);if(s)if(r.fillStyle==="solid")if(l.length===1){const c=Ox(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else i.push(_d(l,r));else i.push(Vi(l,r));return o&&(a?l.forEach(c=>{i.push(zl(c,!1,r))}):i.push(u)),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:Lt};break;case"fillPath":o={d:this.opsToPath(s),stroke:Lt,strokeWidth:0,fill:r.fill||Lt};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||Lt,strokeWidth:r,fill:Lt}}_mergedShape(t){return t.filter((n,r)=>r===0||n.op!=="move")}};class cL{constructor(t,n){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Iu(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 u=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(u),u}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 il="http://www.w3.org/2000/svg";let dL=class{constructor(t,n){this.svg=t,this.gen=new Iu(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(il,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(il,"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(il,"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(il,"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 u=this.gen.arc(t,n,r,i,s,o,a,l);return this.draw(u)}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 fL={canvas:(e,t)=>new cL(e,t),svg:(e,t)=>new dL(e,t),generator:e=>new Iu(e),newSeed:()=>Iu.newSeed()};function fm(e,t){const n=C.useRef(t);n.current=t,C.useEffect(()=>{if(!e)return;const r=i=>{i.key==="Escape"&&n.current()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e])}const Bl={stackPanelWidth:480,navIslandBottom:"1.5rem",navIslandHeight:"4.5rem",contentGap:"1.5rem"},hL={4:"1rem"};function ee(...e){return YA(yA(e))}const pL={height:32,lineHeight:"32px",padding:"0 16px"},mL={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")`},gL={white:"#FDFCF8",paper:"#FAF8F0",speckle:"#FAF8F0",parchment:"#F5F1E6",canvas:"#F0EAD8",kraft:"#E5DBC4",chalkboard:"#142e22"},yL={blue:"rgba(168, 200, 216, 0.35)",brown:"rgba(164, 144, 120, 0.35)",black:"rgba(61, 53, 43, 0.15)"};function Fk(e){const t=typeof e=="string"?{texture:e}:e,n=t.texture??"paper",r=t.ruledType??"none",i=t.ruledColor??"blue",s=mL[n],o=gL[n],a=yL[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 zi(e,t="paper"){if(e!==!1)return Fk(e===!0?t:e)}function xL(e){const t=yc((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 u=0;u<r;u++){const c=u/r*Math.PI*2+(t()-.5)*.15*n,d=o+(t()-.5)*a*2;l.push({x:i+Math.cos(c)*d,y:s+Math.sin(c)*d})}return gc(l)}function vL(e,t){const n=yc(`${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,u=[];for(let c=0;c<i;c++){const d=c/i*Math.PI*2+(n()-.5)*.15*r,h=a+(n()-.5)*l*2;u.push({x:s+Math.cos(d)*h,y:o+Math.sin(d)*h})}return gc(u)}function wL(e){const t=yc((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 u=0;u<r;u++){const c=(u+.5)/r,d=l.ax+(l.bx-l.ax)*c,h=l.ay+(l.by-l.ay)*c,p=l.bx-l.ax,m=l.by-l.ay,y=Math.sqrt(p*p+m*m)||1,w=-m/y,g=p/y,x=(t()-.5)*s*2;o.push({x:d+w*x,y:h+g*x})}return gc(o)}function bL(e,t){const n=yc(`${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 u of l)for(let c=0;c<i;c++){const d=(c+.5)/i,h=u.ax+(u.bx-u.ax)*d,p=u.ay+(u.by-u.ay)*d,m=u.bx-u.ax,y=u.by-u.ay,w=Math.sqrt(m*m+y*y)||1,g=-y/w,x=m/w,v=(n()-.5)*o*2;a.push({x:h+g*v,y:p+x*v})}return gc(a)}function gc(e){const t=e.length;if(t<3)return"";let n=`M ${hr(e[0].x)} ${hr(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,u=s.y+(o.y-i.y)/6,c=o.x-(a.x-s.x)/6,d=o.y-(a.y-s.y)/6;n+=` C ${hr(l)} ${hr(u)}, ${hr(c)} ${hr(d)}, ${hr(o.x)} ${hr(o.y)}`}return n+=" Z",n}function hr(e){return e.toFixed(2)}function yc(e){let t=typeof e=="string"?kL(e):e;return()=>(t=t*16807%2147483647,(t-1)/2147483646)}function kL(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 ka(e){return C.useMemo(()=>{const t=Math.random();return{blob:xL({seed:t,wobble:e}),ring:vL(t,e)}},[e])}const SL="button-module__button___Z331g",_L="button-module__blobBg___QQFzf",CL="button-module__blobFill___XwLjV",PL="button-module__blobRing___567UW",EL="button-module__isActive___FXNSJ",jL="button-module__primary___ppbyq",TL="button-module__secondary___esy5L",RL="button-module__ghost___NisA0",ML="button-module__danger___Wnvuq",AL="button-module__chalkboard___d3Nqb",LL="button-module__small___u7y8a",IL="button-module__medium___HBIAj",DL="button-module__large___RPzNy",NL="button-module__fullWidth___H0P0F",zL="button-module__iconLeft___s60SZ",OL="button-module__iconRight___75eFu",BL="button-module__label___pXAyM",Yt={button:SL,blobBg:_L,blobFill:CL,blobRing:PL,isActive:EL,primary:jL,secondary:TL,ghost:RL,danger:ML,chalkboard:AL,small:LL,medium:IL,large:DL,fullWidth:NL,iconLeft:zL,iconRight:OL,label:BL};function re({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:u,...c}){const d=ka(o);return f.jsxs("button",{type:"button",className:ee(Yt.button,Yt[e],Yt[n],t==="chalkboard"&&Yt.chalkboard,a&&Yt.isActive,s&&Yt.fullWidth,u),...c,children:[f.jsxs("svg",{className:Yt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:d.blob,className:Yt.blobFill}),f.jsx("path",{d:d.ring,className:Yt.blobRing})]}),r&&f.jsx("span",{className:Yt.iconLeft,children:r}),f.jsx("span",{className:Yt.label,children:l}),i&&f.jsx("span",{className:Yt.iconRight,children:i})]})}function hm(e){return{blue:e.accentBlue,green:e.accentGreen,amber:e.accentAmber,rose:e.accentRose,slate:e.accentSlate}}const FL="page-module__page___-uHnG",$L="page-module__roundedTop___KQ4dD",VL="page-module__withAccent___lsv-m",UL="page-module__accentBlue___XxbMV",WL="page-module__accentGreen___Ne6Q8",HL="page-module__accentAmber___kLAwa",KL="page-module__accentRose___O9ZbZ",GL="page-module__accentSlate___xCB66",Fl={page:FL,roundedTop:$L,withAccent:VL,accentBlue:UL,accentGreen:WL,accentAmber:HL,accentRose:KL,accentSlate:GL},QL=hm(Fl);function $k({children:e,className:t,style:n,texture:r=!0,withAccent:i=!1,accentColor:s="blue",rounded:o="all"}){const a=zi(r,{texture:"white",ruledType:"lines",ruledColor:"blue"})??{backgroundColor:"var(--pui-bg-base)"};return f.jsx("div",{className:ee(Fl.page,i&&Fl.withAccent,i&&QL[s],o==="top"&&Fl.roundedTop,t),style:{...a,...n},children:e})}const YL="layout-module__layout___O1aWi",qL="layout-module__header___I-kxe",XL="layout-module__headerLeft___JChJQ",ZL="layout-module__headerTitles___aqSUG",JL="layout-module__headerTitle___wvr39",eI="layout-module__headerSubtitle___6f5BD",tI="layout-module__headerActions___adC12",nI="layout-module__mobileToggle___4WpVG",rI="layout-module__body___tywNf",iI="layout-module__mobileOverlay___tzbBC",sI="layout-module__sidebar___8VKGq",oI="layout-module__sidebarOpen___47rtr",aI="layout-module__sidebarInner___tq2X6",lI="layout-module__logoArea___RLnC0",uI="layout-module__logoText___pAmfV",cI="layout-module__nav___FxcrZ",dI="layout-module__main___9z7bu",fI="layout-module__navIslandFixed___H4TwP",hI="layout-module__content___jL-VB",pI="layout-module__contentWithPage___vVdfN",mI="layout-module__footer___LyakU",gI="layout-module__footerText___8BYxc",Ie={layout:YL,header:qL,headerLeft:XL,headerTitles:ZL,headerTitle:JL,headerSubtitle:eI,headerActions:tI,mobileToggle:nI,body:rI,mobileOverlay:iI,sidebar:sI,sidebarOpen:oI,sidebarInner:aI,logoArea:lI,logoText:uI,nav:cI,main:dI,navIslandFixed:fI,content:hI,contentWithPage:pI,footer:mI,footerText:gI};function yI(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"}:Fk(e)}function xI({children:e,showHeader:t=!0,showFooter:n=!1,showSidebar:r=!0,showPage:i=!0,background:s="paper",title:o,subtitle:a,headerActions:l,navigationItems:u=[],activeItemId:c,onNavigate:d,logo:h,footerContent:p,navigationIsland:m,style:y,bleedBottom:w=!0,routeKey:g,stackOpen:x}){const[v,b]=C.useState(!1),_=pc();fm(v,()=>b(!1));const S=yI(s),j=r&&u.length>0;return f.jsxs("div",{className:Ie.layout,style:{...S,...y},children:[t&&f.jsxs("header",{className:Ie.header,children:[f.jsxs("div",{className:Ie.headerLeft,children:[j&&f.jsx("button",{type:"button",className:Ie.mobileToggle,onClick:()=>b(!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:Ie.headerTitles,children:[o&&f.jsx("h1",{className:Ie.headerTitle,children:o}),a&&f.jsx("span",{className:Ie.headerSubtitle,children:a})]})]}),l&&f.jsx("div",{className:Ie.headerActions,children:l})]}),f.jsxs("div",{className:Ie.body,children:[v&&f.jsx("button",{type:"button",className:Ie.mobileOverlay,onClick:()=>b(!1),"aria-label":"Close navigation",tabIndex:-1}),j&&f.jsx("aside",{className:ee(Ie.sidebar,v&&Ie.sidebarOpen),children:f.jsxs("div",{className:Ie.sidebarInner,children:[f.jsx("div",{className:Ie.logoArea,children:h||f.jsx("span",{className:Ie.logoText,children:"Paper UI"})}),f.jsx("nav",{className:Ie.nav,"aria-label":"Main navigation",children:u.map(E=>{const M=E.id===c;return f.jsx(re,{variant:"ghost",size:"small",isActive:M,onClick:()=>{d==null||d(E),b(!1)},"aria-current":M?"page":void 0,icon:E.icon,style:pL,children:E.label},E.id)})})]})}),f.jsx("div",{className:Ie.main,children:f.jsx("main",{className:i?Ie.contentWithPage:Ie.content,style:w?{paddingBottom:0}:void 0,children:(()=>{const E=g!==void 0?f.jsx(fc,{mode:"wait",children:f.jsx(Ds.div,{initial:_?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:_?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},style:{height:"100%"},children:e},g)}):e;return i?f.jsx($k,{rounded:w?"top":"all",style:w&&m?{paddingBottom:`calc(${Bl.navIslandBottom} + ${Bl.navIslandHeight} + ${hL[4]})`}:void 0,children:E}):E})()})})]}),m&&f.jsx("div",{className:Ie.navIslandFixed,children:x!==void 0?f.jsx(Ds.div,{animate:{x:x?`-${Bl.stackPanelWidth/2}px`:0},transition:{duration:_?0:.3,ease:[.4,0,.2,1]},children:m}):m}),n&&f.jsx("footer",{className:Ie.footer,children:p||f.jsx("p",{className:Ie.footerText,children:"Paper UI — Natural Materials Component Library"})})]})}const vI="checkbox-module__wrapper___uLYMI",wI="checkbox-module__blobFill___mPJSR",bI="checkbox-module__input___Ptgt7",kI="checkbox-module__blobBg___bw3sn",SI="checkbox-module__labelLeft___-vAmH",_I="checkbox-module__box___yAh-r",CI="checkbox-module__checkmark___tTyBz",PI="checkbox-module__indeterminateLine___IosI-",EI="checkbox-module__boxWrapper___byjoS",jI="checkbox-module__icon___RO-yn",TI="checkbox-module__labelText___bAnLr",RI="checkbox-module__chalkboard___sv6SL",It={wrapper:vI,blobFill:wI,input:bI,blobBg:kI,labelLeft:SI,box:_I,checkmark:CI,indeterminateLine:PI,boxWrapper:EI,icon:jI,labelText:TI,chalkboard:RI};function MI({label:e,labelPosition:t="right",indeterminate:n=!1,wobble:r=.4,surface:i="paper",className:s,checked:o,onChange:a,id:l,...u}){const c=C.useId(),d=l??c,h=ka(r);return f.jsxs("label",{className:ee(It.wrapper,t==="left"&&It.labelLeft,i==="chalkboard"&&It.chalkboard,s),htmlFor:d,children:[f.jsxs("span",{className:It.boxWrapper,children:[f.jsx("input",{id:d,type:"checkbox",className:It.input,checked:o,onChange:a,...u}),f.jsx("svg",{className:It.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("path",{d:h.blob,className:It.blobFill})}),f.jsx("span",{className:It.box,"aria-hidden":"true",children:n?f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:It.icon,children:f.jsx("line",{x1:"4",y1:"10",x2:"16",y2:"10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:It.indeterminateLine})}):f.jsx("svg",{viewBox:"0 0 20 20",fill:"none",className:It.icon,children:f.jsx("path",{d:"M4 10 L8 14 L16 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:It.checkmark})})})]}),e&&f.jsx("span",{className:It.labelText,children:e})]})}const AI="icon-button-module__iconButton___avg6i",LI="icon-button-module__blobBg___466Vy",II="icon-button-module__blobFill___FTN1g",DI="icon-button-module__blobRing___hRdQb",NI="icon-button-module__isActive___XlvtM",zI="icon-button-module__icon___h204x",OI="icon-button-module__ghost___Wbxog",BI="icon-button-module__danger___p0Xz5",FI="icon-button-module__small___bPnCU",$I="icon-button-module__medium___nOxPf",VI="icon-button-module__large___UBU5z",UI="icon-button-module__chalkboard___mi0sQ",Un={iconButton:AI,blobBg:LI,blobFill:II,blobRing:DI,isActive:NI,icon:zI,default:"icon-button-module__default___9frNR",ghost:OI,danger:BI,small:FI,medium:$I,large:VI,chalkboard:UI};function Ot({icon:e,variant:t="default",surface:n="paper",size:r="medium",label:i,wobble:s=.5,isActive:o=!1,className:a,...l}){const u=ka(s);return f.jsxs("button",{type:"button",className:ee(Un.iconButton,Un[t],n==="chalkboard"&&Un.chalkboard,Un[r],o&&Un.isActive,a),"aria-label":i,title:i,...l,children:[f.jsxs("svg",{className:Un.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:u.blob,className:Un.blobFill}),f.jsx("path",{d:u.ring,className:Un.blobRing})]}),f.jsx("span",{className:Un.icon,children:e})]})}const WI="stamp-module__stamp___5qaNY",HI="stamp-module__small___BBlBg",KI="stamp-module__medium___HG2YD",GI="stamp-module__large___aUT0I",QI="stamp-module__blobBg___Mdrdd",YI="stamp-module__blobFill___QyCeB",qI="stamp-module__blobRing___EUDx7",XI="stamp-module__dot___qZyCR",ZI="stamp-module__label___T89iH",JI="stamp-module__chalkboard___syI4T",pr={stamp:WI,small:HI,medium:KI,large:GI,blobBg:QI,blobFill:YI,blobRing:qI,dot:XI,label:ZI,chalkboard:JI},Pd={neutral:{fill:"rgba(138, 155, 168, 0.14)",text:"#5E7080",ring:"rgba(94, 112, 128, 0.35)"},info:{fill:"rgba(124, 156, 192, 0.14)",text:"#51719B",ring:"rgba(81, 113, 155, 0.35)"},success:{fill:"rgba(143, 185, 150, 0.16)",text:"#5E8A66",ring:"rgba(94, 138, 102, 0.35)"},warning:{fill:"rgba(212, 163, 115, 0.16)",text:"#A67B4F",ring:"rgba(166, 123, 79, 0.4)"},error:{fill:"rgba(201, 139, 139, 0.16)",text:"#9E5E5E",ring:"rgba(158, 94, 94, 0.35)"}},Ux={fill:"rgba(200, 210, 195, 0.1)",ring:"rgba(200, 210, 195, 0.35)"};function lt({children:e,size:t="medium",variant:n,dot:r=!1,fillColor:i,textColor:s,wobble:o=.3,surface:a="paper",className:l}){const u=ka(o),c=a==="chalkboard",d=n?c?Ux.ring:Pd[n].ring:void 0,h=i??(n?c?Ux.fill:Pd[n].fill:"transparent"),p=s??(n&&!c?Pd[n].text:void 0);return f.jsxs("span",{className:ee(pr.stamp,pr[t],c&&pr.chalkboard,l),style:p?{color:p}:void 0,children:[f.jsxs("svg",{className:pr.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:u.blob,className:pr.blobFill,style:{fill:h}}),d&&f.jsx("path",{d:u.ring,className:pr.blobRing,style:{stroke:d}})]}),r&&f.jsx("span",{className:pr.dot,"aria-hidden":"true"}),f.jsx("span",{className:pr.label,children:e})]})}const eD="copy-button-module__copyButton___-hTo4",tD="copy-button-module__dark___O45N-",nD="copy-button-module__chalkboard___hW4aw",rD="copy-button-module__copied___XlHFr",sl={copyButton:eD,dark:tD,chalkboard:nD,copied:rD};function vh({text:e,variant:t="light",surface:n="paper",className:r,...i}){const[s,o]=C.useState(!1),a=C.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:ee(sl.copyButton,t==="dark"&&sl.dark,n==="chalkboard"&&sl.chalkboard,s&&sl.copied,r),...i,children:s?"Copied!":"Copy"})}const iD="code-block-module__codeBlock___dq28o",sD="code-block-module__header___42Fek",oD="code-block-module__relative___oO-zy",aD="code-block-module__copyOverlay___PjAuq",lD="code-block-module__pre___zXzLZ",uD="code-block-module__chalkboard___bdo9J",cD="code-block-module__chalkboardHeader___3RiVd",dD="code-block-module__chalkboardPre___iRBFR",mr={codeBlock:iD,header:sD,relative:oD,copyOverlay:aD,pre:lD,chalkboard:uD,chalkboardHeader:cD,chalkboardPre:dD};function fD({code:e,filename:t,surface:n="paper"}){return f.jsxs("div",{className:ee(mr.codeBlock,n==="chalkboard"&&mr.chalkboard),children:[t&&f.jsxs("div",{className:ee(mr.header,n==="chalkboard"&&mr.chalkboardHeader),children:[f.jsx("span",{children:t}),f.jsx(vh,{text:e,variant:"light",surface:n})]}),!t&&f.jsx("div",{className:mr.relative,children:f.jsx("div",{className:mr.copyOverlay,children:f.jsx(vh,{text:e,variant:"dark",surface:n})})}),f.jsx("pre",{className:ee(mr.pre,n==="chalkboard"&&mr.chalkboardPre),children:f.jsx("code",{children:e})})]})}const hD="table-module__tableWrapper___gc3Y3",pD="table-module__toolbar___zhCel",mD="table-module__search___zIBk2",gD="table-module__searchIcon___ayhK8",yD="table-module__searchInput___PqsEG",xD="table-module__toolbarActions___EX6qS",vD="table-module__tableScroll___1gvc4",wD="table-module__table___tdU5g",bD="table-module__th___GQbKk",kD="table-module__td___WktB5",SD="table-module__tr___xeZno",_D="table-module__expandTh___uxkR4",CD="table-module__expandTd___VoBRC",PD="table-module__expandIcon___8V45X",ED="table-module__expandable___R7o2l",jD="table-module__expandedRow___1TbTQ",TD="table-module__expandedCell___sKAaD",RD="table-module__boardScroll___Y1yqm",MD="table-module__board___kFAI-",AD="table-module__boardColumn___-W9bP",LD="table-module__boardColumnHeader___kY3Fj",ID="table-module__accentBlue___PEJ1V",DD="table-module__accentGreen___wJ53r",ND="table-module__accentAmber___Iezjv",zD="table-module__accentRose___W8zxc",OD="table-module__accentSlate___oUZCX",BD="table-module__boardColumnLabel___JBEed",FD="table-module__boardColumnCount___Pkpiq",$D="table-module__boardColumnBody___uAgRF",VD="table-module__boardRow___C1P60",UD="table-module__boardEmpty___IKv2W",WD="table-module__chalkboardWrapper___KjY5r",HD="table-module__chalkboard___v0m3A",ae={tableWrapper:hD,toolbar:pD,search:mD,searchIcon:gD,searchInput:yD,toolbarActions:xD,tableScroll:vD,table:wD,th:bD,td:kD,tr:SD,expandTh:_D,expandTd:CD,expandIcon:PD,expandable:ED,expandedRow:jD,expandedCell:TD,boardScroll:RD,board:MD,boardColumn:AD,boardColumnHeader:LD,accentBlue:ID,accentGreen:DD,accentAmber:ND,accentRose:zD,accentSlate:OD,boardColumnLabel:BD,boardColumnCount:FD,boardColumnBody:$D,boardRow:VD,boardEmpty:UD,chalkboardWrapper:WD,chalkboard:HD},KD=hm(ae);function Sa({data:e=[],columns:t=[],board:n,surface:r="paper",texture:i=!0,toolbar:s,expandable:o,showExpandColumn:a=!0,rowClassName:l,className:u}){const c=zi(i,r==="chalkboard"?"chalkboard":"paper"),d=!!s,[h,p]=C.useState(new Set),m=g=>{p(x=>{const v=new Set(x);return v.has(g)?v.delete(g):v.add(g),v})},y=!!(o&&a),w=y?t.length+1:t.length;return f.jsxs("div",{className:ee(ae.tableWrapper,r==="chalkboard"&&ae.chalkboardWrapper,u),style:c,children:[d&&f.jsxs("div",{className:ae.toolbar,children:[s.search&&f.jsxs("div",{className:ae.search,children:[f.jsx(GD,{className:ae.searchIcon}),f.jsx("input",{type:"text",className:ae.searchInput,placeholder:s.search.placeholder??"Search...",value:s.search.value??"",onChange:g=>{var x,v;return(v=(x=s.search)==null?void 0:x.onChange)==null?void 0:v.call(x,g.target.value)}})]}),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(g=>f.jsxs("div",{className:ae.boardColumn,children:[f.jsxs("div",{className:ee(ae.boardColumnHeader,r==="chalkboard"&&ae.chalkboard,g.accent&&KD[g.accent]),children:[f.jsx("span",{className:ae.boardColumnLabel,children:g.label}),f.jsx("span",{className:ae.boardColumnCount,children:g.items.length})]}),f.jsx("div",{className:ae.boardColumnBody,children:g.items.length===0?f.jsx("div",{className:ae.boardEmpty,children:g.emptyLabel??"empty"}):g.items.map((x,v)=>f.jsx("div",{className:ee(ae.boardRow,r==="chalkboard"&&ae.chalkboard),children:g.renderItem(x,v,r)},g.getKey?g.getKey(x,v):v))})]},g.key))})}):f.jsx("div",{className:ae.tableScroll,children:f.jsxs("table",{className:ee(ae.table,r==="chalkboard"&&ae.chalkboard),children:[f.jsxs("colgroup",{children:[y&&f.jsx("col",{style:{width:"48px"}}),t.map(g=>f.jsx("col",{style:g.width?{width:`${g.width*32}px`}:void 0},g.key))]}),f.jsx("thead",{children:f.jsxs("tr",{children:[y&&f.jsx("th",{className:ee(ae.th,ae.expandTh),"aria-label":"Expand"}),t.map(g=>f.jsx("th",{className:ae.th,children:g.header},g.key))]})}),f.jsx("tbody",{children:e.map((g,x)=>{const v=o==null?void 0:o.render(g,x,r),b=!!v,_=b&&h.has(x);return f.jsxs(C.Fragment,{children:[f.jsxs("tr",{className:ee(ae.tr,b&&ae.expandable,l==null?void 0:l(g,x)),onClick:()=>b&&m(x),children:[y&&f.jsx("td",{className:ee(ae.td,ae.expandTd),children:b&&f.jsx("button",{type:"button",className:ae.expandIcon,"aria-expanded":_,"aria-label":_?"Collapse row":"Expand row",onClick:S=>{S.stopPropagation(),m(x)},children:_?"▼":"▶"})}),t.map(S=>f.jsx("td",{className:ae.td,children:S.cell(g,x,r)},S.key))]}),_&&f.jsx("tr",{className:ae.expandedRow,children:f.jsx("td",{colSpan:w,className:ae.expandedCell,children:v})})]},x)})})]})})]})}function GD({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 QD="card-module__borderLayer___WSpJq",YD="card-module__elevated___uhWj9",qD="card-module__textureLayer___Kcofz",XD="card-module__small___HXUTr",ZD="card-module__withAccent___2t7bV",JD="card-module__accentBlue___a1KIq",eN="card-module__accentGreen___RNWoA",tN="card-module__accentAmber___uMhom",nN="card-module__accentRose___VPI3t",rN="card-module__accentSlate___-l4jE",iN="card-module__chalkboard___bQ48O",fi={borderLayer:QD,default:"card-module__default___glPy-",elevated:YD,textureLayer:qD,small:XD,withAccent:ZD,accentBlue:JD,accentGreen:eN,accentAmber:tN,accentRose:nN,accentSlate:rN,chalkboard:iN},sN=hm(fi);function Dn({children:e,variant:t="default",surface:n="paper",size:r="medium",texture:i="parchment",accent:s=!1,accentColor:o="blue",className:a}){return f.jsx("div",{className:ee(fi.borderLayer,fi[t],n==="chalkboard"&&fi.chalkboard,fi[r],s&&fi.withAccent,s&&sN[o],a),children:f.jsx("div",{className:fi.textureLayer,style:n==="chalkboard"?void 0:zi(i),children:e})})}const oN="input-module__wrapper___xaEw6",aN="input-module__label___lu7R1",lN="input-module__input___h7K-F",uN="input-module__small___SkByh",cN="input-module__medium___0QPuV",dN="input-module__large___zGwRu",fN="input-module__error___QDqga",hN="input-module__helperText___njeLH",pN="input-module__helperError___qDBpD",mN="input-module__chalkboard___Xh-5s",gr={wrapper:oN,label:aN,input:lN,small:uN,medium:cN,large:dN,error:fN,helperText:hN,helperError:pN,chalkboard:mN};function zn({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a}){const l=C.useId(),u=o??l;return f.jsxs("div",{className:ee(gr.wrapper,i==="chalkboard"&&gr.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:u,className:gr.label,children:e}),f.jsx("input",{id:u,className:ee(gr.input,gr[r],n&&gr.error),...a}),t&&f.jsx("span",{className:ee(gr.helperText,n&&gr.helperError),children:t})]})}const gN="select-module__wrapper___Hc5F3",yN="select-module__label___ay-3s",xN="select-module__nativeSelect___UA2d-",vN="select-module__trigger___xMYHi",wN="select-module__open___w3mbZ",bN="select-module__triggerLabel___ihpER",kN="select-module__placeholder___0VOFP",SN="select-module__small___iU9W9",_N="select-module__chevron___0dCTg",CN="select-module__medium___B-XBN",PN="select-module__large___iII2c",EN="select-module__chevronOpen___cFOYe",jN="select-module__error___P5RBk",TN="select-module__dropdown___Q-uK3",RN="select-module__slideDown___sT374",MN="select-module__option___vNnue",AN="select-module__optionDisabled___ex2zq",LN="select-module__optionSelected___tAFjn",IN="select-module__optionHighlighted___zYQLq",DN="select-module__helperText___r5gyn",NN="select-module__helperError___ydSPT",zN="select-module__chalkboard___sXBw8",Be={wrapper:gN,label:yN,nativeSelect:xN,trigger:vN,open:wN,triggerLabel:bN,placeholder:kN,small:SN,chevron:_N,medium:CN,large:PN,chevronOpen:EN,error:jN,dropdown:TN,slideDown:RN,option:MN,optionDisabled:AN,optionSelected:LN,optionHighlighted:IN,helperText:DN,helperError:NN,chalkboard:zN};function vs({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",options:s,placeholder:o,value:a,defaultValue:l,onChange:u,disabled:c=!1,width:d,texture:h=!1,className:p}){const m=C.useId(),[y,w]=C.useState(!1),[g,x]=C.useState(-1),[v,b]=C.useState(l??""),[_,S]=C.useState(null),j=C.useRef(null),E=C.useRef(null),M=a!==void 0,P=M?a:v,R=s.find(D=>D.value===P),A=(R==null?void 0:R.label)??o??"Select...",B=C.useCallback(()=>{if(c)return;w(!0);const D=s.findIndex(k=>k.value===P);x(D>=0?D:0)},[c,s,P]),I=C.useCallback(()=>{w(!1),x(-1)},[]),O=C.useCallback(D=>{var k;D.disabled||(M||b(D.value),u==null||u(D.value),I(),(k=j.current)==null||k.focus())},[M,u,I]),F=C.useCallback(D=>{if(!c)switch(D.key){case"Enter":case" ":D.preventDefault(),y&&g>=0?O(s[g]):B();break;case"Escape":D.preventDefault(),y&&I();break;case"ArrowDown":D.preventDefault(),y?x(k=>{let K=k+1;for(;K<s.length&&s[K].disabled;)K++;return K<s.length?K:k}):B();break;case"ArrowUp":D.preventDefault(),y?x(k=>{let K=k-1;for(;K>=0&&s[K].disabled;)K--;return K>=0?K:k}):B();break;case"Home":if(D.preventDefault(),y){let k=0;for(;k<s.length&&s[k].disabled;)k++;k<s.length&&x(k)}break;case"End":if(D.preventDefault(),y){let k=s.length-1;for(;k>=0&&s[k].disabled;)k--;k>=0&&x(k)}break}},[c,y,g,s,B,I,O]);C.useEffect(()=>{if(!y)return;const D=k=>{var K,ne;const T=k.target;(K=j.current)!=null&&K.contains(T)||(ne=E.current)!=null&&ne.contains(T)||I()};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[y,I]),C.useEffect(()=>{if(!y||g<0||!E.current)return;const D=E.current.querySelector(`[data-option-index="${g}"]`);D==null||D.scrollIntoView({block:"nearest"})},[y,g]),C.useEffect(()=>{if(!y){S(null);return}const D=()=>{j.current&&S(j.current.getBoundingClientRect())};return D(),document.addEventListener("scroll",D,{capture:!0,passive:!0}),window.addEventListener("resize",D,{passive:!0}),()=>{document.removeEventListener("scroll",D,{capture:!0}),window.removeEventListener("resize",D)}},[y]);const H=zi(h),z=H?{"--pui-texture":H.backgroundImage,"--pui-fill":H.backgroundColor}:void 0;return f.jsxs("div",{className:ee(Be.wrapper,i==="chalkboard"&&Be.chalkboard,p),style:d?{width:typeof d=="number"?`${d}px`:d}:void 0,children:[e&&f.jsx("label",{htmlFor:m,className:Be.label,children:e}),f.jsxs("select",{id:m,className:Be.nativeSelect,value:P,onChange:D=>u==null?void 0:u(D.target.value),disabled:c,"aria-hidden":"true",tabIndex:-1,children:[o&&f.jsx("option",{value:"",children:o}),s.map(D=>f.jsx("option",{value:D.value,disabled:D.disabled,children:D.label},D.value))]}),f.jsxs("button",{ref:j,type:"button",role:"combobox","aria-expanded":y,"aria-haspopup":"listbox","aria-controls":y?`${m}-listbox`:void 0,"aria-activedescendant":y&&g>=0?`${m}-option-${g}`:void 0,className:ee(Be.trigger,Be[r],n&&Be.error,y&&Be.open,c&&Be.disabled),onClick:()=>y?I():B(),onKeyDown:F,disabled:c,children:[f.jsx("span",{className:ee(Be.triggerLabel,!R&&Be.placeholder),children:A}),f.jsx(ON,{className:ee(Be.chevron,y&&Be.chevronOpen)})]}),y&&_&&Bs.createPortal(f.jsx("div",{ref:E,id:`${m}-listbox`,role:"listbox",tabIndex:-1,className:Be.dropdown,style:{...z,position:"fixed",top:_.bottom+6,left:_.left,width:_.width,zIndex:1e3},onKeyDown:D=>{var k;D.key==="Escape"&&(D.preventDefault(),I(),(k=j.current)==null||k.focus())},children:s.map((D,k)=>f.jsx("div",{id:`${m}-option-${k}`,role:"option","aria-selected":D.value===P,tabIndex:-1,"data-option-index":k,className:ee(Be.option,D.value===P&&Be.optionSelected,k===g&&Be.optionHighlighted,D.disabled&&Be.optionDisabled),onClick:K=>{K.stopPropagation(),O(D)},onMouseEnter:()=>x(k),children:D.label},D.value))}),document.body),t&&f.jsx("span",{className:ee(Be.helperText,n&&Be.helperError),children:t})]})}function ON({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 Oi({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 BN({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 pm({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 Vk({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 FN({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 Uk({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 $N="alert-module__alert___j7ZRS",VN="alert-module__iconWrapper___kLoxT",UN="alert-module__message___klR2U",WN="alert-module__dismiss___f2uoG",HN="alert-module__info___PBo1l",KN="alert-module__success___AVBKS",GN="alert-module__warning___zkMaJ",QN="alert-module__error___cxg96",YN="alert-module__chalkboard___7pgWk",Ui={alert:$N,iconWrapper:VN,message:UN,dismiss:WN,info:HN,success:KN,warning:GN,error:QN,chalkboard:YN};function qn({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:ee(Ui.alert,Ui[t],a&&Ui.chalkboard,o),style:a?void 0:zi(r),role:"alert",children:[f.jsx("span",{className:Ui.iconWrapper,children:f.jsx(Uk,{variant:t})}),f.jsx("div",{className:Ui.message,children:e}),i&&f.jsx("button",{type:"button",className:Ui.dismiss,onClick:s,"aria-label":"Dismiss alert",children:f.jsx(Oi,{size:16})})]})}const qN="modal-module__overlay___a52Ni",XN="modal-module__fadeIn___5OWd5",ZN="modal-module__backdrop___RS4yj",JN="modal-module__modal___ZioOV",e3="modal-module__slideUp___vfFrm",t3="modal-module__small___hcxwF",n3="modal-module__medium___mjbM5",r3="modal-module__large___1dzyf",i3="modal-module__header___iP09B",s3="modal-module__title___nj06m",o3="modal-module__close___gQou9",a3="modal-module__body___Y-EdA",l3="modal-module__chalkboard___qY8qo",Wn={overlay:qN,fadeIn:XN,backdrop:ZN,modal:JN,slideUp:e3,small:t3,medium:n3,large:r3,header:i3,title:s3,close:o3,body:a3,chalkboard:l3},u3='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function _a({open:e,onClose:t,title:n,children:r,size:i="medium",surface:s="paper",texture:o=!1,className:a}){const l=C.useId(),u=C.useRef(null),c=C.useRef(null);if(fm(e,t),C.useEffect(()=>{var h;if(!e)return;c.current=document.activeElement,(h=u.current)==null||h.focus();const p=y=>{var w;if(y.key!=="Tab")return;const g=(w=u.current)==null?void 0:w.querySelectorAll(u3);if(!g||g.length===0){y.preventDefault();return}const x=g[0],v=g[g.length-1];y.shiftKey&&document.activeElement===x?(y.preventDefault(),v.focus()):!y.shiftKey&&document.activeElement===v&&(y.preventDefault(),x.focus())};document.addEventListener("keydown",p);const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{var y,w;document.removeEventListener("keydown",p),document.body.style.overflow=m,(w=(y=c.current)==null?void 0:y.focus)==null||w.call(y)}},[e]),!e||typeof document>"u")return null;const d=zi(o);return Bs.createPortal(f.jsxs("div",{className:Wn.overlay,children:[f.jsx("button",{type:"button",className:Wn.backdrop,"aria-label":"Close modal",onClick:t}),f.jsxs("div",{ref:u,className:ee(Wn.modal,Wn[i],s==="chalkboard"&&Wn.chalkboard,a),style:d,role:"dialog","aria-modal":"true","aria-labelledby":n?l:void 0,tabIndex:-1,children:[f.jsxs("div",{className:Wn.header,children:[n&&f.jsx("h2",{id:l,className:Wn.title,children:n}),f.jsx("button",{type:"button",className:Wn.close,onClick:t,"aria-label":"Close modal",children:f.jsx(Oi,{size:18})})]}),f.jsx("div",{className:Wn.body,children:r})]})]}),document.body)}const c3="textarea-module__wrapper___NbiNO",d3="textarea-module__label___ejhyZ",f3="textarea-module__textarea___0y-7v",h3="textarea-module__small___yPyr8",p3="textarea-module__medium___ezQxA",m3="textarea-module__large___xfeKi",g3="textarea-module__error___EkXKJ",y3="textarea-module__helperText___l1sPh",x3="textarea-module__helperError___VfTLy",v3="textarea-module__chalkboard___zZ0X0",yr={wrapper:c3,label:d3,textarea:f3,small:h3,medium:p3,large:m3,error:g3,helperText:y3,helperError:x3,chalkboard:v3};function Hs({label:e,helperText:t,error:n=!1,size:r="medium",surface:i="paper",className:s,id:o,...a}){const l=C.useId(),u=o??l;return f.jsxs("div",{className:ee(yr.wrapper,i==="chalkboard"&&yr.chalkboard,s),children:[e&&f.jsx("label",{htmlFor:u,className:yr.label,children:e}),f.jsx("textarea",{id:u,className:ee(yr.textarea,yr[r],n&&yr.error),...a}),t&&f.jsx("span",{className:ee(yr.helperText,n&&yr.helperError),children:t})]})}const wi=fL.generator(),w3="progress-module__track___a5BMO",b3="progress-module__svg___3U0-E",Wx={track:w3,svg:b3},Ed=300,xr=1;function Wk({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=C.useMemo(()=>Math.round(Math.random()*1e6),[]),u=a?"rgba(200, 210, 195, 0.16)":"rgba(26, 25, 23, 0.12)",c=n??(a?"#d4e8cb":"#68635C"),d=C.useMemo(()=>wi.toPaths(wi.rectangle(xr,xr,Ed-xr*2,r-xr*2,{seed:l,roughness:2.2,fill:u,fillStyle:"solid",stroke:u,strokeWidth:1.5})),[l,u,r]),h=Math.max(o/100*(Ed-xr*2),0),p=C.useMemo(()=>h>0?wi.toPaths(wi.rectangle(xr,xr,h,r-xr*2,{seed:l+1,roughness:2,fill:c,fillStyle:"solid",stroke:c,strokeWidth:1})):[],[l,c,h,r]);return f.jsx("div",{className:ee(Wx.track,s),style:{height:r,borderRadius:r/2},children:f.jsxs("svg",{className:Wx.svg,viewBox:`0 0 ${Ed} ${r}`,preserveAspectRatio:"none","aria-hidden":"true",children:[d.map((m,y)=>f.jsx("path",{d:m.d,stroke:m.stroke,strokeWidth:m.strokeWidth,fill:m.fill},y)),p.map((m,y)=>f.jsx("path",{d:m.d,stroke:m.stroke,strokeWidth:m.strokeWidth,fill:m.fill},y))]})})}function k3(e){return C.useMemo(()=>{const t=Math.random();return{blob:wL({seed:t,wobble:e}),ring:bL(t,e)}},[e])}const S3="list-item-module__listItem___-tw9O",_3="list-item-module__clickable___GLJmd",C3="list-item-module__blobBg___O3Mzh",P3="list-item-module__blobFill___dXHk1",E3="list-item-module__blobRing___S9mas",j3="list-item-module__active___UsL8O",T3="list-item-module__small___9dphK",R3="list-item-module__medium___yGZCr",M3="list-item-module__icon___2b4wU",A3="list-item-module__label___SIzJ4",L3="list-item-module__action___qGh0-",I3="list-item-module__chalkboard___qpWuM",qt={listItem:S3,static:"list-item-module__static___qtEX6",clickable:_3,blobBg:C3,blobFill:P3,blobRing:E3,active:j3,small:T3,medium:R3,icon:M3,label:A3,action:L3,chalkboard:I3};function Xn({active:e=!1,icon:t,action:n,size:r="medium",wobble:i=.5,surface:s="paper",children:o,className:a,...l}){const u=k3(i),c=!!l.onClick;return f.jsxs("button",{type:"button",className:ee(qt.listItem,qt[r],c&&qt.clickable,!c&&!e&&qt.static,e&&qt.active,s==="chalkboard"&&qt.chalkboard,a),"aria-current":e?"page":void 0,...l,children:[f.jsxs("svg",{className:qt.blobBg,viewBox:"-10 -10 120 120",preserveAspectRatio:"none","aria-hidden":"true",children:[f.jsx("path",{d:u.blob,className:qt.blobFill}),f.jsx("path",{d:u.ring,className:qt.blobRing})]}),t&&f.jsx("span",{className:qt.icon,children:t}),f.jsx("span",{className:qt.label,children:o}),n&&f.jsx("span",{className:qt.action,children:n})]})}const D3="accordion-module__accordion___mqGl-",N3="accordion-module__header___mLfbd",z3="accordion-module__icon___Z90NR",O3="accordion-module__title___HusgG",B3="accordion-module__content___1K0td",F3="accordion-module__chalkboard___am8r4",oi={accordion:D3,header:N3,icon:z3,title:O3,content:B3,chalkboard:F3};function Hx({title:e,children:t,expanded:n=!1,onToggle:r,surface:i="paper",className:s}){return f.jsxs("div",{className:ee(oi.accordion,n&&oi.expanded,i==="chalkboard"&&oi.chalkboard,s),children:[f.jsxs("button",{type:"button",className:oi.header,onClick:r,"aria-expanded":n,children:[f.jsx("span",{className:oi.icon,"aria-hidden":"true",children:n?"▼":"▶"}),f.jsx("span",{className:oi.title,children:e})]}),n&&f.jsx("div",{className:oi.content,children:t})]})}const $3="icon-module__icon___2vrJz",V3="icon-module__blobBg___ENPYJ",U3="icon-module__blobFill___IPbwQ",W3="icon-module__blobRing___1awqV",H3="icon-module__content___TaZR6",K3="icon-module__small___Xp--F",G3="icon-module__medium___tCjMB",Q3="icon-module__large___vBtP7",Wi={icon:$3,blobBg:V3,blobFill:U3,blobRing:W3,content:H3,small:K3,medium:G3,large:Q3},Y3={small:20,medium:24,large:28};function Hk({icon:e,size:t="medium",wobble:n=.5,fillColor:r,className:i}){const s=ka(n),o=Y3[t];return f.jsxs("span",{className:ee(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 q3="spinner-module__spinner___FDTk2",X3="spinner-module__chalkboard___DLE1z",Z3="spinner-module__svg___JnCWN",J3="spinner-module__track___xbnbo",ez="spinner-module__head___j5dWe",ho={spinner:q3,chalkboard:X3,svg:Z3,track:J3,head:ez},tz={small:18,medium:28,large:40};function wh({size:e="medium",color:t,label:n="Loading",surface:r="paper",className:i}){const s=tz[e],o=`spinner-${C.useId().replace(/:/g,"")}`;return f.jsx("span",{className:ee(ho.spinner,r==="chalkboard"&&ho.chalkboard,i),role:"status","aria-label":n,children:f.jsxs("svg",{width:s,height:s,viewBox:"0 0 50 50",className:ho.svg,style:t?{color:t}:void 0,"aria-hidden":"true",children:[f.jsx("defs",{children:f.jsxs("linearGradient",{id:o,x1:"0",y1:"0",x2:"1",y2:"1",children:[f.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.1"}),f.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"1"})]})}),f.jsx("circle",{className:ho.track,cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"6"}),f.jsx("circle",{className:ho.head,cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"6",strokeLinecap:"round",stroke:`url(#${o})`,pathLength:"100"})]})})}const nz="skeleton-module__skeleton___HCSvg",rz="skeleton-module__pulse___6eCq1",iz="skeleton-module__svg___OzxGp",sz="skeleton-module__text___v17Nv",oz="skeleton-module__rect___wqIJy",az="skeleton-module__circle___RCmyR",jd={skeleton:nz,pulse:rz,svg:iz,text:sz,rect:oz,circle:az},Kx={text:[0,0,200,24],rect:[0,0,200,100],circle:[0,0,40,40]},Hi=2;function po({variant:e="text",width:t,height:n,surface:r="paper",className:i,style:s}){const o=r==="chalkboard",a=C.useMemo(()=>Math.round(Math.random()*1e6),[]),l=o?"rgba(200, 210, 195, 0.16)":"rgba(26, 25, 23, 0.09)",u=C.useMemo(()=>{const[,,c,d]=Kx[e],h=e==="circle"?wi.ellipse(c/2,d/2,c-Hi*2,d-Hi*2,{seed:a,roughness:1.5,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1}):wi.rectangle(Hi,Hi,c-Hi*2,d-Hi*2,{seed:a,roughness:1.4,fill:l,fillStyle:"solid",stroke:l,strokeWidth:1});return wi.toPaths(h)},[e,a,l]);return f.jsx("span",{className:ee(jd.skeleton,jd[e],i),style:{width:t,height:n,...s},"aria-hidden":"true",children:f.jsx("svg",{className:jd.svg,viewBox:Kx[e].join(" "),preserveAspectRatio:"none","aria-hidden":"true",children:u.map((c,d)=>f.jsx("path",{d:c.d,stroke:c.stroke,strokeWidth:c.strokeWidth,fill:c.fill},d))})})}const lz="divider-module__horizontal___tP3rG",uz="divider-module__line___KnBes",cz="divider-module__label___WiUwZ",dz="divider-module__vertical___wBSrT",fz="divider-module__chalkboard___gXTde",Ki={horizontal:lz,line:uz,label:cz,vertical:dz,chalkboard:fz};function ws({orientation:e="horizontal",label:t,surface:n="paper",className:r}){const i=n==="chalkboard"&&Ki.chalkboard;return e==="vertical"?f.jsx("span",{className:ee(Ki.vertical,i,r),role:"separator","aria-orientation":"vertical"}):f.jsxs("div",{className:ee(Ki.horizontal,i,r),role:"separator",children:[f.jsx("span",{className:Ki.line}),t!=null&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:Ki.label,children:t}),f.jsx("span",{className:Ki.line})]})]})}const hz="tooltip-module__wrapper___XeVNe",pz="tooltip-module__tooltip___e-rkz",mz="tooltip-module__tooltipIn___CZbRw",gz="tooltip-module__top___78WWU",yz="tooltip-module__bottom___Irl3O",xz="tooltip-module__left___C1Ec4",vz="tooltip-module__right___oUA-Z",wz="tooltip-module__chalkboard___Um6dx",ol={wrapper:hz,tooltip:pz,tooltipIn:mz,top:gz,bottom:yz,left:xz,right:vz,chalkboard:wz},al=8;function bz(e,t){switch(t){case"bottom":return{top:e.bottom+al,left:e.left+e.width/2,transform:"translate(-50%, 0)"};case"left":return{top:e.top+e.height/2,left:e.left-al,transform:"translate(-100%, -50%)"};case"right":return{top:e.top+e.height/2,left:e.right+al,transform:"translate(0, -50%)"};default:return{top:e.top-al,left:e.left+e.width/2,transform:"translate(-50%, -100%)"}}}function Vt({content:e,children:t,placement:n="top",delay:r=300,disabled:i=!1,surface:s="paper"}){const o=C.useId(),[a,l]=C.useState(!1),[u,c]=C.useState(!1),[d,h]=C.useState(!1),[p,m]=C.useState(null),y=C.useRef(null),w=C.useRef(),g=!i&&!!e&&!d&&(a||u),x=()=>{clearTimeout(w.current),w.current=setTimeout(()=>l(!0),r)},v=()=>{clearTimeout(w.current),l(!1),h(!1)},b=()=>{h(!1),c(!0)},_=()=>{c(!1),h(!1)};fm(g,()=>h(!0)),C.useEffect(()=>{if(!g){m(null);return}const j=()=>{y.current&&m(y.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)}},[g]),C.useEffect(()=>()=>clearTimeout(w.current),[]);const S=t.props;return f.jsxs("span",{ref:y,className:ol.wrapper,onMouseEnter:x,onMouseLeave:v,onFocus:b,onBlur:_,children:[C.cloneElement(t,{"aria-describedby":g?o:S["aria-describedby"]}),g&&p&&typeof document<"u"&&Bs.createPortal(f.jsx("span",{id:o,role:"tooltip",className:ee(ol.tooltip,ol[n],s==="chalkboard"&&ol.chalkboard),style:{position:"fixed",...bz(p,n)},children:e}),document.body)]})}const kz="toast-module__stack___hDi0s",Sz="toast-module__topLeft___Luw-F",_z="toast-module__topCenter___N1DwF",Cz="toast-module__topRight___Dtgau",Pz="toast-module__bottomLeft___Eb2lo",Ez="toast-module__bottomCenter___gs-Yb",jz="toast-module__bottomRight___-0e2j",Tz="toast-module__item___RFjtm",Rz="toast-module__toastIn___9m9iN",Mz="toast-module__card___ZCvJS",Az="toast-module__iconWrapper___lnjcC",Lz="toast-module__content___AlliM",Iz="toast-module__title___1Oqh8",Dz="toast-module__description___eiUSB",Nz="toast-module__dismiss___tUGx4",zz="toast-module__info___Nh8S9",Oz="toast-module__success___hlKLc",Bz="toast-module__warning___XUMJt",Fz="toast-module__error___pSFFC",$z="toast-module__chalkboard___c49gt",pn={stack:kz,topLeft:Sz,topCenter:_z,topRight:Cz,bottomLeft:Pz,bottomCenter:Ez,bottomRight:jz,item:Tz,toastIn:Rz,card:Mz,iconWrapper:Az,content:Lz,title:Iz,description:Dz,dismiss:Nz,info:zz,success:Oz,warning:Bz,error:Fz,chalkboard:$z};function Vz({record:e,surface:t="paper",onDismiss:n}){const r=C.useRef(e.duration),i=C.useRef(0),s=C.useRef(),o=C.useCallback(c=>{clearTimeout(s.current),!(c<=0)&&(i.current=Date.now(),s.current=setTimeout(()=>n(e.id),c))},[n,e.id]);C.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),u=t==="chalkboard";return f.jsx("div",{className:pn.item,onMouseEnter:a,onMouseLeave:l,children:f.jsxs("div",{className:ee(pn.card,pn[e.variant],u&&pn.chalkboard),style:u?void 0:zi("kraft"),role:"alert",children:[f.jsx("span",{className:pn.iconWrapper,children:f.jsx(Uk,{variant:e.variant})}),f.jsxs("div",{className:pn.content,children:[e.title&&f.jsx("div",{className:pn.title,children:e.title}),f.jsx("div",{className:pn.description,children:e.description})]}),f.jsx("button",{type:"button",className:pn.dismiss,onClick:()=>n(e.id),"aria-label":"Dismiss notification",children:f.jsx(Oi,{size:16})})]})})}const Kk=C.createContext(null);function Uz(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Wz({children:e,position:t="bottom-right",surface:n="paper",defaultDuration:r=5e3}){const[i,s]=C.useState([]),o=C.useRef(0),a=C.useCallback(c=>{s(d=>d.filter(h=>h.id!==c))},[]),l=C.useCallback(c=>{o.current+=1;const d=`toast-${o.current}`;return s(h=>[...h,{id:d,title:c.title,description:c.description,variant:c.variant??"info",duration:c.duration??r}]),d},[r]),u=t.startsWith("top")?[...i].reverse():i;return f.jsxs(Kk.Provider,{value:{toast:l,dismiss:a},children:[e,typeof document<"u"&&Bs.createPortal(f.jsx("div",{className:ee(pn.stack,pn[Uz(t)]),role:"region","aria-label":"Notifications",children:u.map(c=>f.jsx(Vz,{record:c,surface:n,onDismiss:a},c.id))}),document.body)]})}function Gk(){const e=C.useContext(Kk);if(!e)throw new Error("useToast must be used within a <ToastProvider>");return e}const se={serif:"'Luminari', 'Cormorant Garamond', Georgia, serif",body:"'Cormorant Garamond', Georgia, serif",handwritten:"'Caveat', cursive",mono:"'JetBrains Mono', monospace"},L={1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem"},me={"2xs":"0.75rem",xs:"0.875rem",sm:"1rem",base:"1.125rem",md:"1.25rem",lg:"1.5rem"},Et={tight:1.2,normal:1.5,relaxed:1.7},Te={textPrimary:"#1A1917",textSecondary:"#68635C",accentAmberDark:"#A67B4F",accentGreenDark:"#5E8A66",accentRoseDark:"#9E5E5E",deskBg:"#1e3a2d",deskLight:"#264a3a",deskText:"#e8e4d9",deskTextMuted:"#a8b5a0",deskBorder:"rgba(200, 210, 195, 0.15)",deskChalk:"#d4e8cb"},Qk={sidebarWidth:220,stackPanelWidth:480},Hz=["idea","planned","in-progress","review","done","dropped"],Kz=["feat","fix","chore","docs","refactor"],Yk=["claude-code","opencode"],mm={"claude-code":"Claude Code",opencode:"OpenCode"},Td={"claude-code":{model:["opus","sonnet","fable","haiku"],effort:["low","medium","high","xhigh","max"]},opencode:{model:null}},mo={phase:{agent:"opencode"},planDraft:{agent:"claude-code"},ideaExtend:{agent:"claude-code"},commitSuggest:{agent:"claude-code"}},Gz=Kz.map(e=>({value:e,label:e})),Qz=({open:e,onClose:t,onAdd:n})=>{const[r,i]=C.useState(""),[s,o]=C.useState(""),[a,l]=C.useState("feat"),[u,c]=C.useState(!1);C.useEffect(()=>{e&&(i(""),o(""),l("feat"),c(!1))},[e]);const d=async h=>{h.preventDefault(),!(!r.trim()||u)&&(c(!0),await n({title:r.trim(),content:s.trim()||void 0,kind:a}),c(!1),t())};return f.jsx(_a,{open:e,onClose:t,title:"Add to backlog",size:"small",children:f.jsxs("form",{onSubmit:d,style:{display:"flex",flexDirection:"column",gap:L[4]},children:[f.jsx(zn,{label:"Title",value:r,onChange:h=>i(h.target.value),placeholder:"Backlog item title…",disabled:u,autoFocus:!0,required:!0}),f.jsx(vs,{label:"Kind",value:a,onChange:h=>l(h),options:Gz,disabled:u}),f.jsx(Hs,{label:"Description",value:s,onChange:h=>o(h.target.value),placeholder:"Optional details…",disabled:u,rows:4}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:L[2]},children:[f.jsx(re,{type:"button",variant:"ghost",onClick:t,disabled:u,children:"Cancel"}),f.jsx(re,{type:"submit",variant:"primary",disabled:!r.trim()||u,children:"Add"})]})]})})},bh=({children:e,onClick:t})=>f.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",padding:0,color:Te.accentAmberDark,cursor:"pointer",textDecoration:"underline",font:"inherit"},children:e});function Yz(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const qz=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xz=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zz={};function Gx(e,t){return(Zz.jsx?Xz:qz).test(e)}const Jz=/[ \t\n\f\r]/g;function eO(e){return typeof e=="object"?e.type==="text"?Qx(e.value):!1:Qx(e)}function Qx(e){return e.replace(Jz,"")===""}class Ca{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ca.prototype.normal={};Ca.prototype.property={};Ca.prototype.space=void 0;function qk(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ca(n,r,t)}function kh(e){return e.toLowerCase()}class Rt{constructor(t,n){this.attribute=n,this.property=t}}Rt.prototype.attribute="";Rt.prototype.booleanish=!1;Rt.prototype.boolean=!1;Rt.prototype.commaOrSpaceSeparated=!1;Rt.prototype.commaSeparated=!1;Rt.prototype.defined=!1;Rt.prototype.mustUseProperty=!1;Rt.prototype.number=!1;Rt.prototype.overloadedBoolean=!1;Rt.prototype.property="";Rt.prototype.spaceSeparated=!1;Rt.prototype.space=void 0;let tO=0;const J=Bi(),Fe=Bi(),Sh=Bi(),W=Bi(),xe=Bi(),ji=Bi(),Dt=Bi();function Bi(){return 2**++tO}const _h=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:Fe,commaOrSpaceSeparated:Dt,commaSeparated:ji,number:W,overloadedBoolean:Sh,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Rd=Object.keys(_h);class gm extends Rt{constructor(t,n,r,i){let s=-1;if(super(t,n),Yx(this,"space",i),typeof r=="number")for(;++s<Rd.length;){const o=Rd[s];Yx(this,Rd[s],(r&_h[o])===_h[o])}}}gm.prototype.defined=!0;function Yx(e,t,n){n&&(e[t]=n)}function Ks(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new gm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[kh(r)]=r,n[kh(s.attribute)]=r}return new Ca(t,n,e.space)}const Xk=Ks({properties:{ariaActiveDescendant:null,ariaAtomic:Fe,ariaAutoComplete:null,ariaBusy:Fe,ariaChecked:Fe,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:Fe,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:Fe,ariaFlowTo:xe,ariaGrabbed:Fe,ariaHasPopup:null,ariaHidden:Fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:W,ariaLive:null,ariaModal:Fe,ariaMultiLine:Fe,ariaMultiSelectable:Fe,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:Fe,ariaReadOnly:Fe,ariaRelevant:null,ariaRequired:Fe,ariaRoleDescription:xe,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:Fe,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zk(e,t){return t in e?e[t]:t}function Jk(e,t){return Zk(e,t.toLowerCase())}const nO=Ks({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ji,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alpha:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:xe,autoFocus:J,autoPlay:J,blocking:xe,capture:null,charSet:null,checked:J,cite:null,className:xe,closedBy:null,colorSpace:null,cols:W,colSpan:W,command:null,commandFor:null,content:null,contentEditable:Fe,controls:J,controlsList:xe,coords:W|ji,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:Sh,draggable:Fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:xe,height:W,hidden:Sh,high:W,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:xe,itemRef:xe,itemScope:J,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,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:J,optimum:W,pattern:null,ping:xe,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:xe,required:J,reversed:J,rows:W,rowSpan:W,sandbox:xe,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootCustomElementRegistry:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shadowRootSerializable:J,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:Fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:Fe,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:Fe,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:J,disablePictureInPicture:J,disableRemotePlayback:J,exportParts:ji,part:xe,prefix:null,property:null,results:W,security:null,unselectable:null},space:"html",transform:Jk}),rO=Ks({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:Dt,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:xe,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:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,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:ji,g2:ji,glyphName:ji,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:Dt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,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:W,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:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dt,rev:Dt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dt,requiredFeatures:Dt,requiredFonts:Dt,requiredFormats:Dt,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:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:Dt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dt,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zk}),eS=Ks({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()}}),tS=Ks({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Jk}),nS=Ks({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),iO={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"},sO=/[A-Z]/g,qx=/-[a-z]/g,oO=/^data[-\w.:]+$/i;function aO(e,t){const n=kh(t);let r=t,i=Rt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&oO.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(qx,uO);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!qx.test(s)){let o=s.replace(sO,lO);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=gm}return new i(r,t)}function lO(e){return"-"+e.toLowerCase()}function uO(e){return e.charAt(1).toUpperCase()}const cO=qk([Xk,nO,eS,tS,nS],"html"),ym=qk([Xk,rO,eS,tS,nS],"svg");function dO(e){return e.join(" ").trim()}var xm={},Xx=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,fO=/\n/g,hO=/^\s*/,pO=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,mO=/^:\s*/,gO=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yO=/^[;\s]*/,xO=/^\s+|\s+$/g,vO=`
65
+ `,Zx="/",Jx="*",hi="",wO="comment",bO="declaration";function kO(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 y=m.match(fO);y&&(n+=y.length);var w=m.lastIndexOf(vO);r=~w?m.length-w:r+m.length}function s(){var m={line:n,column:r};return function(y){return y.position=new o(m),u(),y}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function l(m){var y=m.exec(e);if(y){var w=y[0];return i(w),e=e.slice(w.length),y}}function u(){l(hO)}function c(m){var y;for(m=m||[];y=d();)y!==!1&&m.push(y);return m}function d(){var m=s();if(!(Zx!=e.charAt(0)||Jx!=e.charAt(1))){for(var y=2;hi!=e.charAt(y)&&(Jx!=e.charAt(y)||Zx!=e.charAt(y+1));)++y;if(y+=2,hi===e.charAt(y-1))return a("End of comment missing");var w=e.slice(2,y-2);return r+=2,i(w),e=e.slice(y),r+=2,m({type:wO,comment:w})}}function h(){var m=s(),y=l(pO);if(y){if(d(),!l(mO))return a("property missing ':'");var w=l(gO),g=m({type:bO,property:e0(y[0].replace(Xx,hi)),value:w?e0(w[0].replace(Xx,hi)):hi});return l(yO),g}}function p(){var m=[];c(m);for(var y;y=h();)y!==!1&&(m.push(y),c(m));return m}return u(),p()}function e0(e){return e?e.replace(xO,hi):hi}var SO=kO,_O=Wl&&Wl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xm,"__esModule",{value:!0});xm.default=PO;const CO=_O(SO);function PO(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,CO.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 xc={};Object.defineProperty(xc,"__esModule",{value:!0});xc.camelCase=void 0;var EO=/^--[a-zA-Z0-9_-]+$/,jO=/-([a-z])/g,TO=/^[^-]+$/,RO=/^-(webkit|moz|ms|o|khtml)-/,MO=/^-(ms)-/,AO=function(e){return!e||TO.test(e)||EO.test(e)},LO=function(e,t){return t.toUpperCase()},t0=function(e,t){return"".concat(t,"-")},IO=function(e,t){return t===void 0&&(t={}),AO(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(MO,t0):e=e.replace(RO,t0),e.replace(jO,LO))};xc.camelCase=IO;var DO=Wl&&Wl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},NO=DO(xm),zO=xc;function Ch(e,t){var n={};return!e||typeof e!="string"||(0,NO.default)(e,function(r,i){r&&i&&(n[(0,zO.camelCase)(r,t)]=i)}),n}Ch.default=Ch;var OO=Ch;const BO=Fu(OO),rS=iS("end"),vm=iS("start");function iS(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 FO(e){const t=vm(e),n=rS(e);if(t&&n)return{start:t,end:n}}function zo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?n0(e.position):"start"in e||"end"in e?n0(e):"line"in e||"column"in e?Ph(e):""}function Ph(e){return r0(e&&e.line)+":"+r0(e&&e.column)}function n0(e){return Ph(e&&e.start)+"-"+Ph(e&&e.end)}function r0(e){return e&&typeof e=="number"?e:1}class dt 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=zo(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}}dt.prototype.file="";dt.prototype.name="";dt.prototype.reason="";dt.prototype.message="";dt.prototype.stack="";dt.prototype.column=void 0;dt.prototype.line=void 0;dt.prototype.ancestors=void 0;dt.prototype.cause=void 0;dt.prototype.fatal=void 0;dt.prototype.place=void 0;dt.prototype.ruleId=void 0;dt.prototype.source=void 0;const wm={}.hasOwnProperty,$O=new Map,VO=/[A-Z]/g,UO=new Set(["table","tbody","thead","tfoot","tr"]),WO=new Set(["td","th"]),sS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function HO(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=JO(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=ZO(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"?ym:cO,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=oS(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function oS(e,t,n){if(t.type==="element")return KO(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return GO(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return YO(e,t,n);if(t.type==="mdxjsEsm")return QO(e,t);if(t.type==="root")return qO(e,t,n);if(t.type==="text")return XO(e,t)}function KO(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ym,e.schema=i),e.ancestors.push(t);const s=lS(e,t.tagName,!1),o=eB(e,t);let a=km(e,t);return UO.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!eO(l):!0})),aS(e,o,s,t),bm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function GO(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)}da(e,t.position)}function QO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);da(e,t.position)}function YO(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ym,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:lS(e,t.name,!0),o=tB(e,t),a=km(e,t);return aS(e,o,s,t),bm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function qO(e,t,n){const r={};return bm(r,km(e,t)),e.create(t,e.Fragment,r,n)}function XO(e,t){return t.value}function aS(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function bm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ZO(e,t,n){return r;function r(i,s,o,a){const u=Array.isArray(o.children)?n:t;return a?u(s,o,a):u(s,o)}}function JO(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=vm(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 eB(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&wm.call(t.properties,i)){const s=nB(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&WO.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 tB(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 da(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 da(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function km(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:$O;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 u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const a=oS(e,s,o);a!==void 0&&n.push(a)}return n}function nB(e,t,n){const r=aO(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Yz(n):dO(n)),r.property==="style"){let i=typeof n=="object"?n:rB(e,String(n));return e.stylePropertyNameCase==="css"&&(i=iB(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?iO[r.property]||r.property:r.attribute,n]}}function rB(e,t){try{return BO(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new dt("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=sS+"#cannot-parse-style-attribute",i}}function lS(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=Gx(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=Gx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return wm.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);da(e)}function da(e,t){const n=new dt("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=sS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function iB(e){const t={};let n;for(n in e)wm.call(e,n)&&(t[sB(n)]=e[n]);return t}function sB(e){let t=e.replace(VO,oB);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function oB(e){return"-"+e.toLowerCase()}const Md={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"]},aB={};function lB(e,t){const n=aB,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return uS(e,r,i)}function uS(e,t,n){if(uB(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 i0(e.children,t,n)}return Array.isArray(e)?i0(e,t,n):""}function i0(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=uS(e[i],t,n);return r.join("")}function uB(e){return!!(e&&typeof e=="object")}const s0=document.createElement("i");function Sm(e){const t="&"+e+";";s0.innerHTML=t;const n=s0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function On(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 en(e,t){return e.length>0?(On(e,e.length,0,t),e):t}const o0={}.hasOwnProperty;function cB(e){const t={};let n=-1;for(;++n<e.length;)dB(t,e[n]);return t}function dB(e,t){let n;for(n in t){const i=(o0.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){o0.call(i,o)||(i[o]=[]);const a=s[o];fB(i[o],Array.isArray(a)?a:a?[a]:[])}}}function fB(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);On(e,0,0,r)}function cS(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 bs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=ei(/[A-Za-z]/),Bt=ei(/[\dA-Za-z]/),hB=ei(/[#-'*+\--9=?A-Z^-~]/);function Eh(e){return e!==null&&(e<32||e===127)}const jh=ei(/\d/),pB=ei(/[\dA-Fa-f]/),mB=ei(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function jt(e){return e!==null&&(e<0||e===32)}function fe(e){return e===-2||e===-1||e===32}const gB=ei(new RegExp("\\p{P}|\\p{S}","u")),yB=ei(/\s/);function ei(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gs(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Bt(e.charCodeAt(n+1))&&Bt(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 fe(l)?(e.enter(n),a(l)):t(l)}function a(l){return fe(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const xB={tokenize:vB};function vB(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 Z(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const wB={tokenize:bB},a0={tokenize:kB};function bB(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,u)(v)}return u(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const b=t.events.length;let _=b,S;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){S=t.events[_][1].end;break}g(r);let j=b;for(;j<t.events.length;)t.events[j][1].end={...S},j++;return On(t.events,_+1,0,t.events.slice(b)),t.events.length=j,u(v)}return a(v)}function u(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(a0,c,d)(v)}function c(v){return i&&x(),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(a0,p,m)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function m(v){if(v===null){i&&x(),g(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),y(v)}function y(v){if(v===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return Z(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),y)}function w(v,b){const _=t.sliceStream(v);if(b&&_.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(_),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 j=t.events.length;let E=j,M,P;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(M){P=t.events[E][1].end;break}M=!0}for(g(r),S=j;S<t.events.length;)t.events[S][1].end={...P},S++;On(t.events,E+1,0,t.events.slice(j)),t.events.length=S}}function g(v){let b=n.length;for(;b-- >v;){const _=n[b];t.containerState=_[1],_[0].exit.call(t,e)}n.length=v}function x(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function kB(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 l0(e){if(e===null||jt(e)||yB(e))return 1;if(gB(e))return 2}function _m(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 Th={name:"attention",resolveAll:SB,tokenize:_B};function SB(e,t){let n=-1,r,i,s,o,a,l,u,c;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};u0(d,-l),u0(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},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=en(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=en(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),u=en(u,_m(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=en(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=en(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,On(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _B(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=l0(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 u=e.exit("attentionSequence"),c=l0(l),d=!c||c===2&&i||n.includes(l),h=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?d:d&&(i||!h)),u._close=!!(s===42?h:h&&(c||!d)),t(l)}}function u0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const CB={name:"autolink",tokenize:PB};function PB(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 Mn(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||Bt(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Bt(p))&&r++<32?(e.consume(p),a):(r=0,u(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||Eh(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),c):hB(p)?(e.consume(p),u):n(p)}function c(p){return Bt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):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||Bt(p))&&r++<63){const m=p===45?h:d;return e.consume(p),m}return n(p)}}const vc={partial:!0,tokenize:EB};function EB(e,t,n){return r;function r(s){return fe(s)?ke(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Z(s)?t(s):n(s)}}const dS={continuation:{tokenize:TB},exit:RB,name:"blockQuote",tokenize:jB};function jB(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 fe(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function TB(e,t,n){const r=this;return i;function i(o){return fe(o)?ke(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(dS,t,n)(o)}}function RB(e){e.exit("blockQuote")}const fS={name:"characterEscape",tokenize:MB};function MB(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 mB(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const hS={name:"characterReference",tokenize:AB};function AB(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"),u):(e.enter("characterReferenceValue"),s=31,o=Bt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=pB,c):(e.enter("characterReferenceValue"),s=7,o=jh,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Bt&&!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),c):n(d)}}const c0={partial:!0,tokenize:IB},d0={concrete:!0,name:"codeFenced",tokenize:LB};function LB(e,t,n){const r=this,i={partial:!0,tokenize:_};let s=0,o=0,a;return l;function l(S){return u(S)}function u(S){const j=r.events[r.events.length-1];return s=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(o++,e.consume(S),c):o<3?n(S):(e.exit("codeFencedFenceSequence"),fe(S)?ke(e,d,"whitespace")(S):d(S))}function d(S){return S===null||Z(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(c0,y,b)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||Z(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):fe(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||Z(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||Z(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===a?n(S):(e.consume(S),m)}function y(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&&fe(S)?ke(e,x,"linePrefix",s+1)(S):x(S)}function x(S){return S===null||Z(S)?e.check(c0,y,b)(S):(e.enter("codeFlowValue"),v(S))}function v(S){return S===null||Z(S)?(e.exit("codeFlowValue"),x(S)):(e.consume(S),v)}function b(S){return e.exit("codeFenced"),t(S)}function _(S,j,E){let M=0;return P;function P(O){return S.enter("lineEnding"),S.consume(O),S.exit("lineEnding"),R}function R(O){return S.enter("codeFencedFence"),fe(O)?ke(S,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):A(O)}function A(O){return O===a?(S.enter("codeFencedFenceSequence"),B(O)):E(O)}function B(O){return O===a?(M++,S.consume(O),B):M>=o?(S.exit("codeFencedFenceSequence"),fe(O)?ke(S,I,"whitespace")(O):I(O)):E(O)}function I(O){return O===null||Z(O)?(S.exit("codeFencedFence"),j(O)):E(O)}}}function IB(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 Ad={name:"codeIndented",tokenize:NB},DB={partial:!0,tokenize:zB};function NB(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ke(e,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):Z(u)?e.attempt(DB,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||Z(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function zB(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Z(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):Z(o)?i(o):n(o)}}const OB={name:"codeText",previous:FB,resolve:BB,tokenize:$B};function BB(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 FB(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $B(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,c(d)):Z(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||Z(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class VB{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&&go(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),go(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),go(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);go(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);go(this.left,n.reverse())}}}function go(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 pS(e){const t={};let n=-1,r,i,s,o,a,l,u;const c=new VB(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.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,UB(c,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=c.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.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={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return On(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function UB(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=[],u={};let c,d,h=-1,p=n,m=0,y=0;const w=[y];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),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&&(y=h+1,w.push(y),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]),x=s.pop();l.push([x,x+g.length-1]),e.splice(x,2,g)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const WB={resolve:KB,tokenize:GB},HB={partial:!0,tokenize:QB};function KB(e){return pS(e),e}function GB(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):Z(a)?e.check(HB,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 QB(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||Z(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 mS(e,t,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=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||Eh(g)?n(g):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(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||Z(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 y(g){return!c&&(g===null||g===41||jt(g))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(g)):c<u&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||Eh(g)?n(g):(e.consume(g),g===92?w:y)}function w(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function gS(e,t,n,r,i,s){const o=this;let a=0,l;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),c}function c(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):Z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Z(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!fe(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function yS(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),u(h))}function u(h){return h===o?(e.exit(s),l(o)):h===null?n(h):Z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ke(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===o||h===null||Z(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===o||h===92?(e.consume(h),c):c(h)}}function Oo(e,t){let n;return r;function r(i){return Z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):fe(i)?ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const YB={name:"definition",tokenize:XB},qB={partial:!0,tokenize:ZB};function XB(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),o(p)}function o(p){return gS.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=bs(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 jt(p)?Oo(e,u)(p):u(p)}function u(p){return mS(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(qB,d,d)(p)}function d(p){return fe(p)?ke(e,h,"whitespace")(p):h(p)}function h(p){return p===null||Z(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function ZB(e,t,n){return r;function r(a){return jt(a)?Oo(e,i)(a):n(a)}function i(a){return yS(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return fe(a)?ke(e,o,"whitespace")(a):o(a)}function o(a){return a===null||Z(a)?t(a):n(a)}}const JB={name:"hardBreakEscape",tokenize:eF};function eF(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Z(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const tF={name:"headingAtx",resolve:nF,tokenize:rF};function nF(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"},On(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function rF(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||jt(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||Z(c)?(e.exit("atxHeading"),t(c)):fe(c)?ke(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||jt(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const iF=["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"],f0=["pre","script","style","textarea"],sF={concrete:!0,name:"htmlFlow",resolveTo:lF,tokenize:uF},oF={partial:!0,tokenize:dF},aF={partial:!0,tokenize:cF};function lF(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 uF(e,t,n){const r=this;let i,s,o,a,l;return u;function u(T){return c(T)}function c(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),s=!0,y):T===63?(e.consume(T),i=3,r.interrupt?t:k):Mn(T)?(e.consume(T),o=String.fromCharCode(T),w):n(T)}function h(T){return T===45?(e.consume(T),i=2,p):T===91?(e.consume(T),i=5,a=0,m):Mn(T)?(e.consume(T),i=4,r.interrupt?t:k):n(T)}function p(T){return T===45?(e.consume(T),r.interrupt?t:k):n(T)}function m(T){const he="CDATA[";return T===he.charCodeAt(a++)?(e.consume(T),a===he.length?r.interrupt?t:A:m):n(T)}function y(T){return Mn(T)?(e.consume(T),o=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||jt(T)){const he=T===47,ce=o.toLowerCase();return!he&&!s&&f0.includes(ce)?(i=1,r.interrupt?t(T):A(T)):iF.includes(o.toLowerCase())?(i=6,he?(e.consume(T),g):r.interrupt?t(T):A(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):s?x(T):v(T))}return T===45||Bt(T)?(e.consume(T),o+=String.fromCharCode(T),w):n(T)}function g(T){return T===62?(e.consume(T),r.interrupt?t:A):n(T)}function x(T){return fe(T)?(e.consume(T),x):P(T)}function v(T){return T===47?(e.consume(T),P):T===58||T===95||Mn(T)?(e.consume(T),b):fe(T)?(e.consume(T),v):P(T)}function b(T){return T===45||T===46||T===58||T===95||Bt(T)?(e.consume(T),b):_(T)}function _(T){return T===61?(e.consume(T),S):fe(T)?(e.consume(T),_):v(T)}function S(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,j):fe(T)?(e.consume(T),S):E(T)}function j(T){return T===l?(e.consume(T),l=null,M):T===null||Z(T)?n(T):(e.consume(T),j)}function E(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||jt(T)?_(T):(e.consume(T),E)}function M(T){return T===47||T===62||fe(T)?v(T):n(T)}function P(T){return T===62?(e.consume(T),R):n(T)}function R(T){return T===null||Z(T)?A(T):fe(T)?(e.consume(T),R):n(T)}function A(T){return T===45&&i===2?(e.consume(T),F):T===60&&i===1?(e.consume(T),H):T===62&&i===4?(e.consume(T),K):T===63&&i===3?(e.consume(T),k):T===93&&i===5?(e.consume(T),D):Z(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(oF,ne,B)(T)):T===null||Z(T)?(e.exit("htmlFlowData"),B(T)):(e.consume(T),A)}function B(T){return e.check(aF,I,ne)(T)}function I(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),O}function O(T){return T===null||Z(T)?B(T):(e.enter("htmlFlowData"),A(T))}function F(T){return T===45?(e.consume(T),k):A(T)}function H(T){return T===47?(e.consume(T),o="",z):A(T)}function z(T){if(T===62){const he=o.toLowerCase();return f0.includes(he)?(e.consume(T),K):A(T)}return Mn(T)&&o.length<8?(e.consume(T),o+=String.fromCharCode(T),z):A(T)}function D(T){return T===93?(e.consume(T),k):A(T)}function k(T){return T===62?(e.consume(T),K):T===45&&i===2?(e.consume(T),k):A(T)}function K(T){return T===null||Z(T)?(e.exit("htmlFlowData"),ne(T)):(e.consume(T),K)}function ne(T){return e.exit("htmlFlow"),t(T)}}function cF(e,t,n){const r=this;return i;function i(o){return Z(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 dF(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(vc,t,n)}}const fF={name:"htmlText",tokenize:hF};function hF(e,t,n){const r=this;let i,s,o;return a;function a(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),_):k===63?(e.consume(k),v):Mn(k)?(e.consume(k),E):n(k)}function u(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),s=0,m):Mn(k)?(e.consume(k),x):n(k)}function c(k){return k===45?(e.consume(k),p):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),h):Z(k)?(o=d,H(k)):(e.consume(k),d)}function h(k){return k===45?(e.consume(k),p):d(k)}function p(k){return k===62?F(k):k===45?h(k):d(k)}function m(k){const K="CDATA[";return k===K.charCodeAt(s++)?(e.consume(k),s===K.length?y:m):n(k)}function y(k){return k===null?n(k):k===93?(e.consume(k),w):Z(k)?(o=y,H(k)):(e.consume(k),y)}function w(k){return k===93?(e.consume(k),g):y(k)}function g(k){return k===62?F(k):k===93?(e.consume(k),g):y(k)}function x(k){return k===null||k===62?F(k):Z(k)?(o=x,H(k)):(e.consume(k),x)}function v(k){return k===null?n(k):k===63?(e.consume(k),b):Z(k)?(o=v,H(k)):(e.consume(k),v)}function b(k){return k===62?F(k):v(k)}function _(k){return Mn(k)?(e.consume(k),S):n(k)}function S(k){return k===45||Bt(k)?(e.consume(k),S):j(k)}function j(k){return Z(k)?(o=j,H(k)):fe(k)?(e.consume(k),j):F(k)}function E(k){return k===45||Bt(k)?(e.consume(k),E):k===47||k===62||jt(k)?M(k):n(k)}function M(k){return k===47?(e.consume(k),F):k===58||k===95||Mn(k)?(e.consume(k),P):Z(k)?(o=M,H(k)):fe(k)?(e.consume(k),M):F(k)}function P(k){return k===45||k===46||k===58||k===95||Bt(k)?(e.consume(k),P):R(k)}function R(k){return k===61?(e.consume(k),A):Z(k)?(o=R,H(k)):fe(k)?(e.consume(k),R):M(k)}function A(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,B):Z(k)?(o=A,H(k)):fe(k)?(e.consume(k),A):(e.consume(k),I)}function B(k){return k===i?(e.consume(k),i=void 0,O):k===null?n(k):Z(k)?(o=B,H(k)):(e.consume(k),B)}function I(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||jt(k)?M(k):(e.consume(k),I)}function O(k){return k===47||k===62||jt(k)?M(k):n(k)}function F(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function H(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),z}function z(k){return fe(k)?ke(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):D(k)}function D(k){return e.enter("htmlTextData"),o(k)}}const Cm={name:"labelEnd",resolveAll:yF,resolveTo:xF,tokenize:vF},pF={tokenize:wF},mF={tokenize:bF},gF={tokenize:kF};function yF(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&&On(e,0,e.length,n),e}function xF(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}},u={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=en(a,e.slice(s+1,s+r+3)),a=en(a,[["enter",c,t]]),a=en(a,_m(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=en(a,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),a=en(a,e.slice(o+1)),a=en(a,[["exit",l,t]]),On(e,s,e.length,a),e}function vF(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(bs(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(pF,c,o?c:d)(h):h===91?e.attempt(mF,c,o?u:d)(h):o?c(h):d(h)}function u(h){return e.attempt(gF,c,d)(h)}function c(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function wF(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 jt(d)?Oo(e,s)(d):s(d)}function s(d){return d===41?c(d):mS(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return jt(d)?Oo(e,l)(d):c(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?yS(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return jt(d)?Oo(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function bF(e,t,n){const r=this;return i;function i(a){return gS.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(bs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function kF(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 SF={name:"labelStartImage",resolveAll:Cm.resolveAll,tokenize:_F};function _F(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 CF={name:"labelStartLink",resolveAll:Cm.resolveAll,tokenize:PF};function PF(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 Ld={name:"lineEnding",tokenize:EF};function EF(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ke(e,t,"linePrefix")}}const $l={name:"thematicBreak",tokenize:jF};function jF(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||Z(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),fe(u)?ke(e,a,"whitespace")(u):a(u))}}const wt={continuation:{tokenize:AF},exit:IF,name:"list",tokenize:MF},TF={partial:!0,tokenize:DF},RF={partial:!0,tokenize:LF};function MF(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:jh(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($l,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return jh(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"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(vc,r.interrupt?n:c,e.attempt(TF,h,d))}function c(p){return r.containerState.initialBlankLine=!0,s++,h(p)}function d(p){return fe(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 AF(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(vc,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||!fe(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(RF,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ke(e,e.attempt(wt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function LF(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 IF(e){e.exit(this.containerState.type)}function DF(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!fe(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const h0={name:"setextUnderline",resolveTo:NF,tokenize:zF};function NF(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 zF(e,t,n){const r=this;let i;return s;function s(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),fe(u)?ke(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Z(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const OF={tokenize:BF};function BF(e){const t=this,n=e.attempt(vc,r,e.attempt(this.parser.constructs.flowInitial,i,ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(WB,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 FF={resolveAll:vS()},$F=xS("string"),VF=xS("text");function xS(e){return{resolveAll:vS(e==="text"?UF: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(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];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 vS(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 UF(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 u=i[s];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={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={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const WF={42:wt,43:wt,45:wt,48:wt,49:wt,50:wt,51:wt,52:wt,53:wt,54:wt,55:wt,56:wt,57:wt,62:dS},HF={91:YB},KF={[-2]:Ad,[-1]:Ad,32:Ad},GF={35:tF,42:$l,45:[h0,$l],60:sF,61:h0,95:$l,96:d0,126:d0},QF={38:hS,92:fS},YF={[-5]:Ld,[-4]:Ld,[-3]:Ld,33:SF,38:hS,42:Th,60:[CB,fF],91:CF,92:[JB,fS],93:Cm,95:Th,96:OB},qF={null:[Th,FF]},XF={null:[42,95]},ZF={null:[]},JF=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:XF,contentInitial:HF,disable:ZF,document:WF,flow:GF,flowInitial:KF,insideSpan:qF,string:QF,text:YF},Symbol.toStringTag,{value:"Module"}));function e4(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:j(_),check:j(S),consume:x,enter:v,exit:b,interrupt:j(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function d(R){return o=en(o,R),w(),o[o.length-1]!==null?[]:(E(t,0),u.events=_m(s,u.events,u),u.events)}function h(R,A){return n4(p(R),A)}function p(R){return t4(o,R)}function m(){const{_bufferIndex:R,_index:A,line:B,column:I,offset:O}=r;return{_bufferIndex:R,_index:A,line:B,column:I,offset:O}}function y(R){i[R.line]=R.column,P()}function w(){let R;for(;r._index<o.length;){const A=o[r._index];if(typeof A=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<A.length;)g(A.charCodeAt(r._bufferIndex));else g(A)}}function g(R){c=c(R)}function x(R){Z(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,P()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=R}function v(R,A){const B=A||{};return B.type=R,B.start=m(),u.events.push(["enter",B,u]),a.push(B),B}function b(R){const A=a.pop();return A.end=m(),u.events.push(["exit",A,u]),A}function _(R,A){E(R,A.from)}function S(R,A){A.restore()}function j(R,A){return B;function B(I,O,F){let H,z,D,k;return Array.isArray(I)?ne(I):"tokenize"in I?ne([I]):K(I);function K(de){return tt;function tt(ze){const nt=ze!==null&&de[ze],Mt=ze!==null&&de.null,Gt=[...Array.isArray(nt)?nt:nt?[nt]:[],...Array.isArray(Mt)?Mt:Mt?[Mt]:[]];return ne(Gt)(ze)}}function ne(de){return H=de,z=0,de.length===0?F:T(de[z])}function T(de){return tt;function tt(ze){return k=M(),D=de,de.partial||(u.currentConstruct=de),de.name&&u.parser.constructs.disable.null.includes(de.name)?ce():de.tokenize.call(A?Object.assign(Object.create(u),A):u,l,he,ce)(ze)}}function he(de){return R(D,k),O}function ce(de){return k.restore(),++z<H.length?T(H[z]):F}}}function E(R,A){R.resolveAll&&!s.includes(R)&&s.push(R),R.resolve&&On(u.events,A,u.events.length-A,R.resolve(u.events.slice(A),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function M(){const R=m(),A=u.previous,B=u.currentConstruct,I=u.events.length,O=Array.from(a);return{from:I,restore:F};function F(){r=R,u.previous=A,u.currentConstruct=B,u.events.length=I,a=O,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function t4(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 n4(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=`
66
+ `;break}case-3:{o=`\r
67
+ `;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 r4(e){const r={constructs:cB([JF,...(e||{}).extensions||[]]),content:i(xB),defined:[],document:i(wB),flow:i(OF),lazy:{},string:i($F),text:i(VF)};return r;function i(s){return o;function o(a){return e4(r,s,a)}}}function i4(e){for(;!pS(e););return e}const p0=/[\0\t\n\r]/g;function s4(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let u,c,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(p0.lastIndex=d,u=p0.exec(s),h=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(h),!u){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(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)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 o4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function a4(e){return e.replace(o4,l4)}function l4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return cS(n.slice(s?2:1),s?16:10)}return Sm(n)||e}const wS={}.hasOwnProperty;function u4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),c4(n)(i4(r4(n).document().write(s4()(e,t,!0))))}function c4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Qt),autolinkProtocol:M,autolinkEmail:M,atxHeading:s(or),blockQuote:s(Mt),characterEscape:M,characterReference:M,codeFenced:s(Gt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Gt,o),codeText:s(Bn,o),codeTextData:M,data:M,codeFlowValue:M,definition:s(sr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Fn),hardBreakEscape:s(Ge),hardBreakTrailing:s(Ge),htmlFlow:s(Se,o),htmlFlowData:M,htmlText:s(Se,o),htmlTextData:M,image:s(xt),label:o,link:s(Qt),listItem:s(Qs),listItemValue:h,listOrdered:s(rt,d),listUnordered:s(rt),paragraph:s(ar),reference:T,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(or),strong:s(ti),thematicBreak:s(ue)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:nt,autolinkProtocol:ze,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:de,characterReference:tt,codeFenced:l(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:P,codeIndented:l(g),codeText:l(O),codeTextData:P,data:P,definition:l(),definitionDestinationString:b,definitionLabelString:x,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(B),htmlFlowData:P,htmlText:l(I),htmlTextData:P,image:l(H),label:D,labelText:z,lineEnding:R,link:l(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:he,resourceDestinationString:k,resourceTitleString:K,resource:ne,setextHeading:l(E),setextHeadingLineSequence:j,setextHeadingText:S,strong:l(),thematicBreak:l()}};bS(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let V={type:"root",children:[]};const q={stack:[V],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:c,data:n},ie=[];let pe=-1;for(;++pe<N.length;)if(N[pe][1].type==="listOrdered"||N[pe][1].type==="listUnordered")if(N[pe][0]==="enter")ie.push(pe);else{const At=ie.pop();pe=i(N,At,pe)}for(pe=-1;++pe<N.length;){const At=t[N[pe][0]];wS.call(At,N[pe][1].type)&&At[N[pe][1].type].call(Object.assign({sliceSerialize:N[pe][2].sliceSerialize},q),N[pe][1])}if(q.tokenStack.length>0){const At=q.tokenStack[q.tokenStack.length-1];(At[1]||m0).call(q,void 0,At[0])}for(V.position={start:vr(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:vr(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)V=t.transforms[pe](V)||V;return V}function i(N,V,q){let ie=V-1,pe=-1,At=!1,$n,un,ni,ur;for(;++ie<=q;){const it=N[ie];switch(it[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{it[0]==="enter"?pe++:pe--,ur=void 0;break}case"lineEndingBlank":{it[0]==="enter"&&($n&&!ur&&!pe&&!ni&&(ni=ie),ur=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ur=void 0}if(!pe&&it[0]==="enter"&&it[1].type==="listItemPrefix"||pe===-1&&it[0]==="exit"&&(it[1].type==="listUnordered"||it[1].type==="listOrdered")){if($n){let $=ie;for(un=void 0;$--;){const ye=N[$];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;un&&(N[un][1].type="lineEndingBlank",At=!0),ye[1].type="lineEnding",un=$}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}ni&&(!un||ni<un)&&($n._spread=!0),$n.end=Object.assign({},un?N[un][1].start:it[1].end),N.splice(un||ie,0,["exit",$n,it[2]]),ie++,q++}if(it[1].type==="listItemPrefix"){const $={type:"listItem",_spread:!1,start:Object.assign({},it[1].start),end:void 0};$n=$,N.splice(ie,0,["enter",$,it[2]]),ie++,q++,ni=void 0,ur=!0}}}return N[V][1]._spread=At,q}function s(N,V){return q;function q(ie){a.call(this,N(ie),ie),V&&V.call(this,ie)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(N,V,q){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([V,q||void 0]),N.position={start:vr(V.start),end:void 0}}function l(N){return V;function V(q){N&&N.call(this,q),u.call(this,q)}}function u(N,V){const q=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==N.type&&(V?V.call(this,N,ie[0]):(ie[1]||m0).call(this,N,ie[0]));else throw new Error("Cannot close `"+N.type+"` ("+zo({start:N.start,end:N.end})+"): it’s not open");q.position.end=vr(N.end)}function c(){return lB(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(N){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function p(){const N=this.resume(),V=this.stack[this.stack.length-1];V.lang=N}function m(){const N=this.resume(),V=this.stack[this.stack.length-1];V.meta=N}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const N=this.resume(),V=this.stack[this.stack.length-1];V.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const N=this.resume(),V=this.stack[this.stack.length-1];V.value=N.replace(/(\r?\n|\r)$/g,"")}function x(N){const V=this.resume(),q=this.stack[this.stack.length-1];q.label=V,q.identifier=bs(this.sliceSerialize(N)).toLowerCase()}function v(){const N=this.resume(),V=this.stack[this.stack.length-1];V.title=N}function b(){const N=this.resume(),V=this.stack[this.stack.length-1];V.url=N}function _(N){const V=this.stack[this.stack.length-1];if(!V.depth){const q=this.sliceSerialize(N).length;V.depth=q}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function j(N){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function M(N){const q=this.stack[this.stack.length-1].children;let ie=q[q.length-1];(!ie||ie.type!=="text")&&(ie=lr(),ie.position={start:vr(N.start),end:void 0},q.push(ie)),this.stack.push(ie)}function P(N){const V=this.stack.pop();V.value+=this.sliceSerialize(N),V.position.end=vr(N.end)}function R(N){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const q=V.children[V.children.length-1];q.position.end=vr(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(M.call(this,N),P.call(this,N))}function A(){this.data.atHardBreak=!0}function B(){const N=this.resume(),V=this.stack[this.stack.length-1];V.value=N}function I(){const N=this.resume(),V=this.stack[this.stack.length-1];V.value=N}function O(){const N=this.resume(),V=this.stack[this.stack.length-1];V.value=N}function F(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=V,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 V=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=V,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function z(N){const V=this.sliceSerialize(N),q=this.stack[this.stack.length-2];q.label=a4(V),q.identifier=bs(V).toLowerCase()}function D(){const N=this.stack[this.stack.length-1],V=this.resume(),q=this.stack[this.stack.length-1];if(this.data.inReference=!0,q.type==="link"){const ie=N.children;q.children=ie}else q.alt=V}function k(){const N=this.resume(),V=this.stack[this.stack.length-1];V.url=N}function K(){const N=this.resume(),V=this.stack[this.stack.length-1];V.title=N}function ne(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function he(N){const V=this.resume(),q=this.stack[this.stack.length-1];q.label=V,q.identifier=bs(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function ce(N){this.data.characterReferenceType=N.type}function de(N){const V=this.sliceSerialize(N),q=this.data.characterReferenceType;let ie;q?(ie=cS(V,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Sm(V);const pe=this.stack[this.stack.length-1];pe.value+=ie}function tt(N){const V=this.stack.pop();V.position.end=vr(N.end)}function ze(N){P.call(this,N);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize(N)}function nt(N){P.call(this,N);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize(N)}function Mt(){return{type:"blockquote",children:[]}}function Gt(){return{type:"code",lang:null,meta:null,value:""}}function Bn(){return{type:"inlineCode",value:""}}function sr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Fn(){return{type:"emphasis",children:[]}}function or(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function Se(){return{type:"html",value:""}}function xt(){return{type:"image",title:null,url:"",alt:null}}function Qt(){return{type:"link",title:null,url:"",children:[]}}function rt(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function Qs(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function ar(){return{type:"paragraph",children:[]}}function ti(){return{type:"strong",children:[]}}function lr(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}function vr(e){return{line:e.line,column:e.column,offset:e.offset}}function bS(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?bS(e,r):d4(e,r)}}function d4(e,t){let n;for(n in t)if(wS.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 m0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+zo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+zo({start:t.start,end:t.end})+") is still open")}function f4(e){const t=this;t.parser=n;function n(r){return u4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function h4(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 p4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
68
+ `}]}function m4(e,t){const n=t.value?t.value+`
69
+ `:"",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 g4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function y4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function x4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Gs(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 u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function v4(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 w4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function kS(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 b4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kS(e,t);const i={src:Gs(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 k4(e,t){const n={src:Gs(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 S4(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 _4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kS(e,t);const i={href:Gs(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 C4(e,t){const n={href:Gs(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 P4(e,t,n){const r=e.all(t),i=n?E4(n):SS(t),s={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(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 c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
70
+ `}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
71
+ `});const u={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,u),e.applyData(t,u)}function E4(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=SS(n[r])}return t}function SS(e){const t=e.spread;return t??e.children.length>1}function j4(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 T4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function R4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function M4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A4(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=vm(t.children[1]),l=rS(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 L4(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 u=[];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)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function I4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const g0=9,y0=32;function D4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(x0(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(x0(t.slice(i),i>0,!1)),s.join("")}function x0(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===g0||s===y0;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===g0||s===y0;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function N4(e,t){const n={type:"text",value:D4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function z4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const O4={blockquote:h4,break:p4,code:m4,delete:g4,emphasis:y4,footnoteReference:x4,heading:v4,html:w4,imageReference:b4,image:k4,inlineCode:S4,linkReference:_4,link:C4,listItem:P4,list:j4,paragraph:T4,root:R4,strong:M4,table:A4,tableCell:I4,tableRow:L4,text:N4,thematicBreak:z4,toml:ll,yaml:ll,definition:ll,footnoteDefinition:ll};function ll(){}const _S=-1,wc=0,Bo=1,Du=2,Pm=3,Em=4,jm=5,Tm=6,CS=7,PS=8,B4=typeof self=="object"?self:globalThis,v0=(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 B4[e](t)},F4=(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 wc:case _S:return n(o,i);case Bo:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Du:{const a=n({},i);for(const[l,u]of o)a[r(l)]=r(u);return a}case Pm:return n(new Date(o),i);case Em:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case jm:{const a=n(new Map,i);for(const[l,u]of o)a.set(r(l),r(u));return a}case Tm:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case CS:{const{name:a,message:l}=o;return n(v0(a,l),i)}case PS: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(v0(s,o),i)};return r},w0=e=>F4(new Map,e)(0),Gi="",{toString:$4}={},{keys:V4}=Object,yo=e=>{const t=typeof e;if(t!=="object"||!e)return[wc,t];const n=$4.call(e).slice(8,-1);switch(n){case"Array":return[Bo,Gi];case"Object":return[Du,Gi];case"Date":return[Pm,Gi];case"RegExp":return[Em,Gi];case"Map":return[jm,Gi];case"Set":return[Tm,Gi];case"DataView":return[Bo,n]}return n.includes("Array")?[Bo,n]:n.includes("Error")?[CS,n]:[Du,n]},ul=([e,t])=>e===wc&&(t==="function"||t==="symbol"),U4=(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]=yo(o);switch(a){case wc:{let c=o;switch(l){case"bigint":a=PS,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([_S],o)}return i([a,c],o)}case Bo:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const c=[],d=i([a,c],o);for(const h of o)c.push(s(h));return d}case Du:{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 c=[],d=i([a,c],o);for(const h of V4(o))(e||!ul(yo(o[h])))&&c.push([s(h),s(o[h])]);return d}case Pm:return i([a,o.toISOString()],o);case Em:{const{source:c,flags:d}=o;return i([a,{source:c,flags:d}],o)}case jm:{const c=[],d=i([a,c],o);for(const[h,p]of o)(e||!(ul(yo(h))||ul(yo(p))))&&c.push([s(h),s(p)]);return d}case Tm:{const c=[],d=i([a,c],o);for(const h of o)(e||!ul(yo(h)))&&c.push(s(h));return d}}const{message:u}=o;return i([a,{name:l,message:u}],o)};return s},b0=(e,{json:t,lossy:n}={})=>{const r=[];return U4(!(t||n),!!t,new Map,r)(e),r},Nu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?w0(b0(e,t)):structuredClone(e):(e,t)=>w0(b0(e,t));function W4(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 H4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function K4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||W4,r=e.options.footnoteBackLabel||H4,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 u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),h=Gs(d.toLowerCase());let p=0;const m=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++p<=y;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(l,p);typeof x=="string"&&(x={type:"text",value:x}),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(x)?x:[x]})}const w=c[c.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else c.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Nu(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
72
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
73
+ `}]}}const ES=function(e){if(e==null)return q4;if(typeof e=="function")return bc(e);if(typeof e=="object")return Array.isArray(e)?G4(e):Q4(e);if(typeof e=="string")return Y4(e);throw new Error("Expected function, string, or object as test")};function G4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ES(e[n]);return bc(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Q4(e){const t=e;return bc(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Y4(e){return bc(t);function t(n){return n&&n.type===e}}function bc(e){return t;function t(n,r,i){return!!(X4(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function q4(){return!0}function X4(e){return e!==null&&typeof e=="object"&&"type"in e}const jS=[],Z4=!0,k0=!1,J4="skip";function e5(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ES(i),o=r?-1:1;a(e,void 0,[])();function a(l,u,c){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=jS,m,y,w;if((!t||s(l,u,c[c.length-1]||void 0))&&(p=t5(n(l,c)),p[0]===k0))return p;if("children"in l&&l.children){const g=l;if(g.children&&p[0]!==J4)for(y=(r?g.children.length:-1)+o,w=c.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=a(x,y,w)(),m[0]===k0)return m;y=typeof m[1]=="number"?m[1]:y+o}}return p}}}function t5(e){return Array.isArray(e)?e:typeof e=="number"?[Z4,e]:e==null?jS:[e]}function TS(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),e5(e,s,a,i);function a(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return o(l,d,c)}}const Rh={}.hasOwnProperty,n5={};function r5(e,t){const n=t||n5,r=new Map,i=new Map,s=new Map,o={...O4,...n.handlers},a={all:u,applyData:s5,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:i5,wrap:a5};return TS(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,h=String(c.identifier).toUpperCase();d.has(h)||d.set(h,c)}}),a;function l(c,d){const h=c.type,p=a.handlers[h];if(Rh.call(a.handlers,h)&&p)return p(a,c,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in c){const{children:y,...w}=c,g=Nu(w);return g.children=a.all(c),g}return Nu(c)}return(a.options.unknownHandler||o5)(a,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],c);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=S0(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=S0(y.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function i5(e,t){e.position&&(t.position=FO(e))}function s5(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,Nu(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function o5(e,t){const n=t.data||{},r="value"in t&&!(Rh.call(n,"hProperties")||Rh.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 a5(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
74
+ `});++r<e.length;)r&&n.push({type:"text",value:`
75
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
76
+ `}),n}function S0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _0(e,t){const n=r5(e,t),r=n.one(e,void 0),i=K4(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
77
+ `},i),s}function l5(e,t){return e&&"run"in e?async function(n,r){const i=_0(n,{file:r,...t});await e.run(i,r)}:function(n,r){return _0(n,{file:r,...e||t})}}function C0(e){if(e)throw e}var Vl=Object.prototype.hasOwnProperty,RS=Object.prototype.toString,P0=Object.defineProperty,E0=Object.getOwnPropertyDescriptor,j0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):RS.call(t)==="[object Array]"},T0=function(t){if(!t||RS.call(t)!=="[object Object]")return!1;var n=Vl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Vl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Vl.call(t,i)},R0=function(t,n){P0&&n.name==="__proto__"?P0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},M0=function(t,n){if(n==="__proto__")if(Vl.call(t,n)){if(E0)return E0(t,n).value}else return;return t[n]},u5=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=M0(a,n),i=M0(t,n),a!==i&&(c&&i&&(T0(i)||(s=j0(i)))?(s?(s=!1,o=r&&j0(r)?r:[]):o=r&&T0(r)?r:{},R0(a,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&R0(a,{name:n,newValue:i}));return a};const Id=Fu(u5);function Mh(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 c5(){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,...u){const c=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?d5(c,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function d5(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(u){const c=u;if(a&&n)throw c;return i(c)}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 En={basename:f5,dirname:h5,extname:p5,join:m5,sep:"/"};function f5(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pa(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 h5(e){if(Pa(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 p5(e){Pa(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 m5(...e){let t=-1,n;for(;++t<e.length;)Pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":g5(n)}function g5(e){Pa(e);const t=e.codePointAt(0)===47;let n=y5(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function y5(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 Pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const x5={cwd:v5};function v5(){return"/"}function Ah(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function w5(e){if(typeof e=="string")e=new URL(e);else if(!Ah(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 b5(e)}function b5(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 Dd=["history","path","basename","stem","extname","dirname"];class MS{constructor(t){let n;t?Ah(t)?n={path:t}:typeof t=="string"||k5(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":x5.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Dd.length;){const s=Dd[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)Dd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?En.basename(this.path):void 0}set basename(t){zd(t,"basename"),Nd(t,"basename"),this.path=En.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?En.dirname(this.path):void 0}set dirname(t){A0(this.basename,"dirname"),this.path=En.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?En.extname(this.path):void 0}set extname(t){if(Nd(t,"extname"),A0(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=En.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ah(t)&&(t=w5(t)),zd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?En.basename(this.path,this.extname):void 0}set stem(t){zd(t,"stem"),Nd(t,"stem"),this.path=En.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 dt(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 Nd(e,t){if(e&&e.includes(En.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+En.sep+"`")}function zd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function A0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function k5(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const S5=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},_5={}.hasOwnProperty;class Rm extends S5{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=c5()}copy(){const t=new Rm;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Id(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Fd("data",this.frozen),this.namespace[t]=n,this):_5.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Fd("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=cl(t),r=this.parser||this.Parser;return Od("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Od("process",this.parser||this.Parser),Bd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=cl(t),l=r.parse(a);r.run(l,a,function(c,d,h){if(c||!d||!h)return u(c);const p=d,m=r.stringify(p,h);E5(m)?h.value=m:h.result=m,u(c,h)});function u(c,d){c||!d?o(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Od("processSync",this.parser||this.Parser),Bd("processSync",this.compiler||this.Compiler),this.process(t,i),I0("processSync","process",n),r;function i(s,o){n=!0,C0(s),r=o}}run(t,n,r){L0(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=cl(n);i.run(t,l,u);function u(c,d,h){const p=d||t;c?a(c):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),I0("runSync","run",r),i;function s(o,a){C0(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=cl(n),i=this.compiler||this.Compiler;return Bd("stringify",i),L0(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Fd("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(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Id(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===u){h=d;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[p,...m]=c;const y=r[h][1];Mh(y)&&Mh(p)&&(p=Id(!0,y,p)),r[h]=[u,p,...m]}}}}const C5=new Rm().freeze();function Od(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Fd(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 L0(e){if(!Mh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function I0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function cl(e){return P5(e)?e:new MS(e)}function P5(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function E5(e){return typeof e=="string"||j5(e)}function j5(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const T5="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",D0=[],N0={allowDangerousHtml:!0},R5=/^(https?|ircs?|mailto|xmpp)$/i,M5=[{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 A5(e){const t=L5(e),n=I5(e);return D5(t.runSync(t.parse(n),n),e)}function L5(e){const t=e.rehypePlugins||D0,n=e.remarkPlugins||D0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...N0}:N0;return C5().use(f4).use(n).use(l5,r).use(t)}function I5(e){const t=e.children||"",n=new MS;return typeof t=="string"&&(n.value=t),n}function D5(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||N5;for(const c of M5)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+T5+c.id,void 0);return TS(e,u),HO(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(c,d,h){if(c.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let p;for(p in Md)if(Object.hasOwn(Md,p)&&Object.hasOwn(c.properties,p)){const m=c.properties[p],y=Md[p];(y===null||y.includes(c.tagName))&&(c.properties[p]=l(String(m||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):s?s.includes(c.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(c,d,h)),p&&h&&typeof d=="number")return a&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d}}}function N5(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||R5.test(e.slice(0,t))?e:""}const $d=e=>({fontFamily:se.serif,fontWeight:600,fontSize:e,margin:`${L[6]} 0 ${L[3]}`,lineHeight:1.25}),z5={p:({children:e})=>f.jsx("p",{style:{margin:`0 0 ${L[4]}`},children:e}),strong:({children:e})=>f.jsx("strong",{style:{fontWeight:700},children:e}),h1:({children:e})=>f.jsx("h1",{style:$d(me.lg),children:e}),h2:({children:e})=>f.jsx("h2",{style:$d("1.3rem"),children:e}),h3:({children:e})=>f.jsx("h3",{style:$d("1.1rem"),children:e}),a:({children:e,href:t})=>f.jsx("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:Te.accentAmberDark},children:e}),code:({children:e})=>f.jsx("code",{style:{fontFamily:se.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:se.mono,fontSize:"0.85em",background:"rgba(0,0,0,0.06)",borderRadius:6,padding:`${L[3]} ${L[4]}`,overflowX:"auto",margin:`0 0 ${L[4]}`},children:e}),ul:({children:e})=>f.jsx("ul",{style:{listStyle:"disc",margin:`0 0 ${L[4]}`,paddingLeft:"1.4rem"},children:e}),ol:({children:e})=>f.jsx("ol",{style:{listStyle:"decimal",margin:`0 0 ${L[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 ${L[4]}`,paddingLeft:L[4],borderLeft:"3px solid rgba(0,0,0,0.15)",opacity:.85},children:e})},Ea=({children:e})=>f.jsx(A5,{components:z5,children:e}),O5=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}},B5=async e=>{try{return(await fetch("/api/icon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUri:e})})).ok}catch{return!1}},F5=async()=>{try{return(await fetch("/api/package-name")).json()}catch{return null}},$5=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase()),AS=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(null),[i,s]=C.useState(!0);return C.useEffect(()=>{let o=!1;return s(!0),Promise.all([F5().then(a=>{!o&&a&&t($5(a))}),O5().then(a=>{o||r(a)})]).finally(()=>{o||s(!1)}),()=>{o=!0}},[]),{projectName:e,iconDataUri:n,loading:i}},V5=({size:e="md"})=>{const{projectName:t,iconDataUri:n,loading:r}=AS(),i=e==="sm"?20:18,s=e==="sm"?me.sm:me.md;return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3],minWidth:0},children:[n?f.jsx("img",{src:n,alt:"",style:{width:i,height:i,objectFit:"contain",flexShrink:0}}):f.jsx(Hk,{icon:f.jsx(FN,{}),size:"small"}),f.jsx("span",{style:{fontFamily:se.serif,fontWeight:600,fontSize:s,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},children:r?"Loading…":t??"Paper Camp"})]})},xn=({children:e})=>f.jsx("h1",{className:"text-4xl",style:{fontFamily:se.serif,fontWeight:600,color:Te.textPrimary,margin:`0 0 ${L[6]}`,lineHeight:1.1},children:e}),U5=({routeKey:e,children:t,mobileOpen:n,onMobileClose:r})=>{const i=pc(),s=C.useRef(null);return C.useEffect(()=>{if(!n)return;const o=a=>{a.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n,r]),C.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:Qk.sidebarWidth,flexShrink:0,height:"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:L[5],position:"relative"},children:f.jsx(fc,{mode:"wait",children:f.jsx(Ds.div,{initial:i?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:i?void 0:{opacity:0,y:-8},transition:{duration:.2,ease:"easeOut"},children:t},e)})})})]})},zu=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`},LS=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)}},W5=e=>e.phases.length===0?null:Math.round(e.phases.filter(t=>t.done).length/e.phases.length*100),H5=(e,t)=>{if(e)return e.find(n=>n.status==="in-progress"||n.status==="review")};async function ja(e,t){if(e.ok)return;const n=await e.json().catch(()=>({error:t}));throw new Error(n.error)}const K5=async()=>{const e=await fetch("/api/git/status");return await ja(e,"Failed to load git status"),e.json()},G5=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 ja(r,"Commit failed")},Q5=async()=>{const e=await fetch("/api/git/push",{method:"POST"});await ja(e,"Push failed")},Y5=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 ja(t,"Failed to suggest a commit message"),t.json()},q5=async e=>{const t=await fetch("/api/git/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})});await ja(t,"Sync failed")};function z0(e,t){return e.map(n=>{if(n.status==="done")return n;if(!n.id)return{...n,status:"planned"};const r=t.filter(s=>s.idea===n.id);if(r.length===0)return{...n,status:"planned"};const i=r.every(s=>s.status==="done"||s.status==="dropped");return{...n,status:i?"done":"planned"}})}const X5={},O0=e=>{let t;const n=new Set,r=(c,d)=>{const h=typeof c=="function"?c(t):c;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:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(X5?"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()}},u=t=e(r,i,l);return l},Z5=e=>e?O0(e):O0,IS={},{useDebugValue:J5}=ks,{useSyncExternalStoreWithSelector:e$}=KE;let B0=!1;const t$=e=>e;function n$(e,t=t$,n){(IS?"production":void 0)!=="production"&&n&&!B0&&(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"),B0=!0);const r=e$(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return J5(r),r}const F0=e=>{(IS?"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"?Z5(e):e,n=(r,i)=>n$(t,r,i);return Object.assign(n,t),n},r$=e=>e?F0(e):F0,i$=async()=>(await fetch("/api/agent/status")).json(),s$=async(e,t)=>{const n=await fetch("/api/agent/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e,phaseIndex:t})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},o$=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})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},a$=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})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},l$=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})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},u$=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})});if(!n.ok){const r=await n.json().catch(()=>({error:"Launch failed"}));throw new Error(r.error)}},c$=async()=>{const e=await fetch("/api/agent/launch-audit-all",{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({error:"Launch failed"}));throw new Error(t.error)}},d$=async e=>{const t=await fetch("/api/agent/launch-run-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:e})});if(!t.ok){const n=await t.json().catch(()=>({error:"Launch failed"}));throw new Error(n.error)}},f$=async()=>{const e=await fetch("/api/agent/stop",{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({error:"Stop failed"}));throw new Error(t.error)}},h$="modulepreload",p$=function(e){return"/"+e},$0={},m$=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=p$(l),l in $0)return;$0[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":h$,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)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)})},g$=async()=>(await fetch("/api/decisions")).json(),y$=async()=>(await fetch("/api/open-questions")).json(),x$=async()=>(await fetch("/api/progress")).json(),v$=async()=>(await fetch("/api/docs")).json(),w$=async()=>(await fetch("/api/consistency")).json(),b$=async(e,t,n)=>{const r=await fetch(`/api/open-questions/resolve?title=${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:t,rationale:n})});if(!r.ok){const o=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error??"Failed to resolve open question")}const{loadDecisions:i,loadOpenQuestions:s}=await m$(async()=>{const{loadDecisions:o,loadOpenQuestions:a}=await Promise.resolve().then(()=>R$);return{loadDecisions:o,loadOpenQuestions:a}},void 0).then(o=>o.useAppStore.getState());return await Promise.all([i(),s()]),r.json()},k$=async()=>(await fetch("/api/ideas")).json(),S$=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},_$=async()=>(await fetch("/api/plans")).json(),C$=async e=>{await fetch("/api/plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},P$=async e=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"DELETE"})},fn=async(e,t)=>{await fetch(`/api/plans?title=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},E$=async()=>(await fetch("/api/status")).json(),j$=async e=>{await fetch(`/api/status/check?name=${e}`,{method:"POST"})},T$=async()=>{await fetch("/api/status/fix",{method:"POST"})},G=r$((e,t)=>({plans:null,plansLoading:!1,plansError:null,loadPlans:async()=>{e({plansLoading:!0});try{const n=await _$(),{ideaEntries:r}=t();e({plans:n,plansError:null,plansLoading:!1,ideaEntries:z0(r,n.entries)})}catch(n){e({plansError:String(n),plansLoading:!1})}},ideaEntries:[],loadIdeas:async()=>{try{const n=await k$(),{plans:r}=t();e({ideaEntries:z0(n.entries,(r==null?void 0:r.entries)??[])})}catch{e({ideaEntries:[]})}},activePlanTitle:null,setActivePlanTitle:n=>e({activePlanTitle:n}),activeIdeaTitle:null,setActiveIdeaTitle:n=>e({activeIdeaTitle:n}),view:"list",setView:n=>e({view:n}),decisions:[],decisionsLoading:!0,loadDecisions:async()=>{e({decisionsLoading:!0});try{const n=await g$();e({decisions:n.entries,decisionsLoading:!1})}catch{e({decisions:[],decisionsLoading:!1})}},openQuestions:[],openQuestionsLoading:!0,loadOpenQuestions:async()=>{e({openQuestionsLoading:!0});try{const n=await y$();e({openQuestions:n.entries,openQuestionsLoading:!1})}catch{e({openQuestions:[],openQuestionsLoading:!1})}},progress:[],progressLoading:!0,loadProgress:async()=>{e({progressLoading:!0});try{const n=await x$();e({progress:n.entries,progressLoading:!1})}catch{e({progress:[],progressLoading:!1})}},repoDocs:[],repoDocsLoading:!0,loadRepoDocs:async()=>{e({repoDocsLoading:!0});try{const n=await v$();e({repoDocs:n.files,repoDocsLoading:!1});const{activeDocSection:r}=t();!r&&n.files.some(i=>i.name==="MAIN.md")&&e({activeDocSection:"repo-docs",activeDocTitle:"MAIN.md"})}catch{e({repoDocs:[],repoDocsLoading:!1})}},activeDocSection:null,setActiveDocSection:n=>e({activeDocSection:n}),activeDocTitle:null,setActiveDocTitle:n=>e({activeDocTitle:n}),docSearchQuery:"",setDocSearchQuery:n=>e({docSearchQuery:n}),activeSettingsSection:"general",setActiveSettingsSection:n=>e({activeSettingsSection:n}),settingsConfigFiles:[],setSettingsConfigFiles:n=>e({settingsConfigFiles:n}),status:null,loadStatus:async()=>{try{const n=await E$();e({status:n})}catch{}},runCheck:async n=>{try{await j$(n)}catch{}},fixQuality:async()=>{try{await T$()}catch{}},consistency:[],loadConsistency:async()=>{try{const n=await w$();e({consistency:n})}catch{}},gitStatus:null,gitBranch:null,gitAhead:0,gitBranchHygiene:null,loadGitStatus:async()=>{try{const{branch:n,entries:r,ahead:i,branchHygiene:s}=await K5();e({gitStatus:r,gitBranch:n,gitAhead:i,gitBranchHygiene:s})}catch{}},agentStatus:null,loadAgentStatus:async()=>{try{const n=await i$();e({agentStatus:n});const r=t().pendingReconcile;r&&(n==null?void 0:n.taskKind)==="reconcile"&&n.planId===r.planId&&(n.status==="done"?(await t().loadPlans(),e({reconcilePreview:r,pendingReconcile:null})):n.status==="error"&&e({pendingReconcile:null}))}catch{}},launchAgent:async(n,r)=>{await s$(n,r),await t().loadAgentStatus()},launchPlanAudit:async(n,r)=>{await o$(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 a$(n,r)}catch(o){throw e({pendingReconcile:null}),o}await t().loadAgentStatus()},launchPlanDraft:async(n,r)=>{await l$(n,r),await t().loadAgentStatus()},launchIdeaExtend:async(n,r)=>{await u$(n,r),await t().loadAgentStatus()},launchBatchAudit:async()=>{await c$(),await t().loadAgentStatus()},launchRunAll:async n=>{await d$(n),await t().loadAgentStatus()},stopAgent:async()=>{await f$(),await t().loadAgentStatus()},pendingReconcile:null,reconcilePreview:null,setReconcilePreview:n=>e({reconcilePreview:n})})),R$=Object.freeze(Object.defineProperty({__proto__:null,useAppStore:G},Symbol.toStringTag,{value:"Module"}));function V0(e){const t=e.match(/Found (\d+) errors?\./);return t?Number(t[1]):0}function M$(e,t){const n=V0(e)+V0(t);return n>0?`${n} lint/format issue${n===1?"":"s"} found.`:"Lint or format check failed."}function A$(e){const t=e.match(/Tests\s+(\d+) failed/);return t?`${t[1]} test${t[1]==="1"?"":"s"} failed.`:"Tests failed."}const U0="papercamp.commitTitle",W0="papercamp.commitMessage",L$=["core","cli","app","server","agent","plans","ideas","docs","settings","stack","ui","ci","config","deps","repo"];function H0(e){try{return localStorage.getItem(e)??""}catch{return""}}function K0(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const I$=({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"})]}),D$=({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"})]}),N$=({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"})]}),G0=`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")`,dl=Te.deskBg,Q0=Te.deskLight,z$=Te.deskText,Xt=Te.deskTextMuted,O$=Te.deskBorder,wr=Te.deskChalk,Vd={fontFamily:se.serif,fontSize:me.base,fontWeight:600,color:Xt,marginBottom:L[3]},B$=({open:e,onToggle:t})=>{var ur,it;const n=G($=>$.plans),r=G($=>$.loadProgress),i=G($=>$.loadPlans),s=G($=>$.status),o=G($=>$.loadStatus),a=G($=>$.runCheck),l=G($=>$.fixQuality),u=G($=>$.consistency),c=G($=>$.loadConsistency),d=G($=>$.setActiveDocSection),h=G($=>$.setActiveDocTitle),p=G($=>$.setActivePlanTitle),m=G($=>$.loadGitStatus),y=G($=>$.gitStatus),w=G($=>$.gitBranch),g=G($=>$.gitAhead),x=G($=>$.gitBranchHygiene),v=G($=>$.agentStatus),b=G($=>$.loadAgentStatus),_=G($=>$.stopAgent),[S,j]=C.useState(!1),[E,M]=C.useState(!1),[P,R]=C.useState(!1),[A,B]=C.useState(new Set),[I,O]=C.useState(()=>H0(U0)),[F,H]=C.useState(()=>H0(W0)),[z,D]=C.useState(!1),[k,K]=C.useState(!1),[ne,T]=C.useState(null),[he,ce]=C.useState(null),[de,tt]=C.useState(!1),[ze,nt]=C.useState(null),[Mt,Gt]=C.useState(!1),[Bn,sr]=C.useState(null),Fn=pc(),or=Fs(),Ge=C.useRef({loadProgress:r,loadPlans:i,loadStatus:o,loadConsistency:c,loadGitStatus:m,loadAgentStatus:b});Ge.current={loadProgress:r,loadPlans:i,loadStatus:o,loadConsistency:c,loadGitStatus:m,loadAgentStatus:b},C.useEffect(()=>{Ge.current.loadProgress(),Ge.current.loadStatus(),Ge.current.loadConsistency(),Ge.current.loadGitStatus(),Ge.current.loadAgentStatus()},[]),C.useEffect(()=>{const $=new EventSource("/api/activity/stream");return $.onmessage=()=>{Ge.current.loadProgress(),Ge.current.loadPlans(),Ge.current.loadStatus(),Ge.current.loadConsistency(),Ge.current.loadGitStatus(),Ge.current.loadAgentStatus()},()=>$.close()},[]);const Se=C.useMemo(()=>H5(n==null?void 0:n.entries),[n==null?void 0:n.entries]),xt=C.useMemo(()=>{var Ue,Sn;const $=((Ue=s==null?void 0:s.lint)==null?void 0:Ue.status)??"stale",ye=((Sn=s==null?void 0:s.format)==null?void 0:Sn.status)??"stale";return $==="running"||ye==="running"?"running":$==="fail"||ye==="fail"?"fail":$==="stale"&&ye==="stale"?"stale":"pass"},[s]),Qt=((ur=s==null?void 0:s.test)==null?void 0:ur.status)??"stale",rt=((it=s==null?void 0:s.consistency)==null?void 0:it.status)??"stale",Qs=xt==="running"||Qt==="running"||rt==="running",ar=u.length>0,ti=xt==="fail"||Qt==="fail"||rt==="fail"||ar,lr=(v==null?void 0:v.status)==="running"||(v==null?void 0:v.status)==="starting"||(v==null?void 0:v.status)==="stopping",ue=C.useMemo(()=>{var ye;return((ye=Se==null?void 0:Se.tags)==null?void 0:ye.find(Ue=>L$.includes(Ue)))??"repo"},[Se]),N=C.useMemo(()=>!!(Se!=null&&Se.phases.length)&&Se.phases.every($=>$.done),[Se]),V=C.useMemo(()=>{if(!Se)return"";const $=Se.kind??"feat";return N?`${$}(${ue}): updates`:`${$}(${ue}): ${Se.title}`},[Se,ue,N]),q=C.useMemo(()=>{if(!Se)return"";const $=Se.id?`Refs: ${Se.id}`:"";return[!N&&Se.phases.length?Se.phases.map(Ue=>`- ${Ue.text}`).join(`
78
+ `):"",$].filter(Boolean).join(`
79
+
80
+ `)},[Se,N]);C.useEffect(()=>{V&&!I&&O(V)},[V,I]),C.useEffect(()=>{q&&!F&&H(q)},[q,F]),C.useEffect(()=>{K0(U0,I)},[I]),C.useEffect(()=>{K0(W0,F)},[F]),C.useEffect(()=>{y&&B(new Set(y.map($=>$.path)))},[y]);const ie=C.useCallback($=>{B(ye=>{const Ue=new Set(ye);return Ue.has($)?Ue.delete($):Ue.add($),Ue})},[]),pe=C.useCallback(async()=>{if(I.trim()){D(!0),ce(null);try{await G5([...A],I.trim(),F.trim()||void 0),O(V),H(""),M(!1),await m()}catch($){ce($.message)}finally{D(!1)}}},[I,F,A,V,m]),At=C.useCallback(async()=>{K(!0),T(null);try{await Q5(),await m()}catch($){T($.message)}finally{K(!1)}},[m]),$n=C.useCallback(async()=>{Gt(!0),sr(null);try{const $=y&&y.length===0;await q5($?"clean":"dirty"),await m()}catch($){sr($.message)}finally{Gt(!1)}},[y,m]),un=C.useCallback(async()=>{if(A.size!==0){tt(!0),nt(null);try{const $=await Y5([...A]);O($.title),H($.message)}catch($){nt($.message)}finally{tt(!1)}}},[A]),ni=C.useCallback($=>{if($.kind==="blocked-plan-active"&&$.planId){const ye=n==null?void 0:n.entries.find(Ue=>Ue.id===$.planId);if(ye){p(ye.title),or({to:"/"});return}}d($.section==="open-questions"?"questions":"decisions"),h($.title),or({to:"/docs"})},[n==null?void 0:n.entries,or,p,d,h]);return f.jsxs(f.Fragment,{children:[f.jsx(fc,{children:!e&&f.jsx(Ds.div,{initial:Fn?void 0:{opacity:0,x:20},animate:{opacity:1,x:0},exit:Fn?void 0:{opacity:0,x:20},transition:{duration:Fn?0:.2,ease:"easeOut"},style:{position:"fixed",right:0,top:"50%",transform:"translateY(-50%)",zIndex:300,borderRadius:"6px 0 0 6px",background:dl,backgroundImage:`${G0}, linear-gradient(135deg, ${Q0} 0%, ${dl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)"},children:f.jsx(Ot,{icon:lr?f.jsx(wh,{size:"small",surface:"chalkboard",label:"Agent running"}):ti?f.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:"#d6a0a0",boxShadow:"0 0 6px rgba(214, 160, 160, 0.9)"}}):f.jsx("span",{style:{fontSize:me["2xs"]},children:"S"}),surface:"chalkboard",size:"small",label:lr?"Open stack panel — agent running":ti?"Open stack panel — checks failing":"Open stack panel",onClick:t,style:{width:28,height:64,borderRadius:"6px 0 0 6px",boxShadow:lr?"inset 0 0 0 1px rgba(214, 196, 160, 0.6)":ti?"inset 0 0 0 1px rgba(214, 160, 160, 0.6)":void 0}})})}),f.jsxs(Ds.div,{animate:{x:e?0:"100%"},transition:{duration:Fn?0:.3,ease:[.4,0,.2,1]},style:{position:"fixed",top:0,right:0,bottom:0,width:Qk.stackPanelWidth,borderLeft:"4px solid rgba(61, 53, 43, 0.12)",backgroundColor:dl,backgroundImage:`${G0}, linear-gradient(135deg, ${Q0} 0%, ${dl} 60%)`,backgroundRepeat:"repeat, no-repeat",backgroundSize:"200px 200px, auto",color:z$,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:300},children:[f.jsxs("div",{style:{height:80,padding:`0 ${L[6]}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[f.jsx("span",{style:{fontFamily:se.serif,fontSize:me.base,fontWeight:700,color:wr},children:"Stack"}),f.jsx(Ot,{icon:f.jsx("span",{style:{fontSize:me.sm,lineHeight:1},children:"×"}),surface:"chalkboard",size:"small",label:"Close stack panel",onClick:t,style:{width:28,height:28,border:`1px solid ${O$}`}})]}),f.jsx(ws,{surface:"chalkboard"}),f.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontFamily:se.body},children:[f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:L[6]},children:[f.jsx("div",{style:Vd,children:"Agent"}),f.jsx(Dn,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:v?f.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:L[2],marginBottom:L[1],flexShrink:0},children:[f.jsxs("span",{style:{fontFamily:se.serif,fontWeight:600,fontSize:me.sm,color:wr,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[v.planTitle,v.taskKind==="phase"&&v.phaseIndex!==void 0?` — phase ${v.phaseIndex+1}`:v.taskKind==="audit"?" — audit":v.taskKind==="batch-audit"?" — batch audit":v.taskKind==="draft"?" — drafting":v.taskKind==="extend"?" — extending":v.taskKind==="commit-suggest"?" — suggesting commit message":v.taskKind==="sync"?" — syncing to main":v.taskKind==="run-all"?" — run all phases":""," ","· ",mm[v.agentId]]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[(()=>{const $={starting:"#5a4a2d",running:"#5a4a2d",stopping:"#5a4a2d",done:"#2d5a3b",error:"#5a2d2d"},ye={starting:"#d6c4a0",running:"#d6c4a0",stopping:"#d6c4a0",done:"#b5d6b5",error:"#d6a0a0"};return f.jsx(lt,{surface:"chalkboard",size:"small",fillColor:$[v.status],textColor:ye[v.status],children:v.status})})(),(v.status==="running"||v.status==="starting"||v.status==="stopping")&&f.jsx(Ot,{icon:f.jsx(Oi,{}),variant:"ghost",size:"small",label:"Stop agent",onClick:_,disabled:v.status==="stopping"})]})]}),v.lines.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("span",{style:{fontFamily:se.mono,fontSize:me["2xs"],color:Xt,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:L[2],flexShrink:0},children:v.lines[v.lines.length-1]}),f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(Hx,{title:`${v.lines.length} line${v.lines.length===1?"":"s"}`,expanded:P,onToggle:()=>R(!P),children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[1],fontFamily:se.mono,fontSize:me["2xs"],color:Xt,paddingTop:L[2],maxHeight:160,overflowY:"auto"},children:v.lines.map(($,ye)=>f.jsx("span",{style:{whiteSpace:"pre-wrap"},children:$},`${ye}-${$}`))})})})]})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx("p",{style:{opacity:.5,fontSize:me.xs,margin:0},children:"No agent running."})})})]}),f.jsx(ws,{surface:"chalkboard"}),f.jsxs("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",padding:L[6]},children:[f.jsx("div",{style:Vd,children:"Status"}),f.jsx(Dn,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:(()=>{var Lm,Im,Dm;const $={pass:"#2d5a3b",fail:"#5a2d2d",running:"#5a4a2d",stale:"transparent"},ye={pass:"#b5d6b5",fail:"#d6a0a0",running:"#d6c4a0",stale:void 0},Ue=Qs,Sn=ar;`${((Lm=s==null?void 0:s.lint)==null?void 0:Lm.output)||"(none)"}${((Im=s==null?void 0:s.format)==null?void 0:Im.output)||"(none)"}`;const US=`Fix the failing tests in this repo. Output from the last test run:
81
+
82
+ ${((Dm=s==null?void 0:s.test)==null?void 0:Dm.output)||"(no output captured)"}`,kc=Re=>f.jsx(Vt,{content:Re.title,surface:"chalkboard",children:f.jsx("button",{type:"button",className:"stack-check-btn",onClick:()=>{Ue||Re.onClick()},disabled:Ue,style:{cursor:Ue?"not-allowed":"pointer",opacity:Ue&&Re.status!=="running"?.5:1,display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsxs(lt,{surface:"chalkboard",size:"small",fillColor:$[Re.status],textColor:ye[Re.status],children:[Re.label,f.jsx("span",{style:{visibility:Re.status==="running"?"visible":"hidden"},children:"…"})]})})});return f.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:L[3]},children:[f.jsxs("div",{style:{display:"flex",gap:L[2],flexWrap:"wrap",justifyContent:"center"},children:[kc({label:"Quality",status:xt,title:"Run lint and format checks",onClick:()=>{a("lint"),a("format")}}),kc({label:"Tests",status:Qt,title:"Run tests",onClick:()=>a("test")}),kc({label:"Consistency",status:rt,title:"Run codebase consistency (knip + dependency-cruiser)",onClick:()=>a("consistency")}),f.jsxs("div",{children:[f.jsx(Vt,{content:Sn?"Show plan/decision doc findings":"No plan/decision doc findings",surface:"chalkboard",children:f.jsx("button",{type:"button",className:Sn?"stack-check-btn":void 0,onClick:()=>{Sn&&j(Re=>!Re)},style:{cursor:Sn?"pointer":"default",display:"inline-flex",background:"none",border:"none",padding:0},children:f.jsx(lt,{surface:"chalkboard",size:"small",fillColor:Sn?"#5a2d2d":"#2d5a3b",textColor:Sn?"#d6a0a0":"#b5d6b5",children:"Docs"})})}),S&&Sn&&f.jsx("div",{style:{marginTop:L[2],display:"flex",flexDirection:"column",gap:L[2]},children:u.map((Re,ri)=>f.jsx("div",{style:{fontFamily:se.mono,fontSize:me["2xs"],color:Xt},children:f.jsx("button",{type:"button",onClick:()=>ni(Re),style:{background:"none",border:"none",padding:0,color:wr,textDecoration:"underline",cursor:"pointer",font:"inherit",textAlign:"left"},children:Re.message})},`${Re.kind}-${Re.title}-${ri}`))})]})]}),(()=>{var Nm,zm,Om;let Re,ri=null;return Ue?Re=f.jsx("span",{style:{color:Xt},children:"Running checks…"}):xt==="fail"?(Re=f.jsx("span",{style:{color:Xt},children:M$(((Nm=s==null?void 0:s.lint)==null?void 0:Nm.output)??"",((zm=s==null?void 0:s.format)==null?void 0:zm.output)??"")}),ri=f.jsx("button",{type:"button",onClick:l,style:{background:"none",border:"none",padding:0,color:wr,textDecoration:"underline",cursor:"pointer",font:"inherit"},children:"Suggested fix: run biome --write"})):Qt==="fail"?(Re=f.jsx("span",{style:{color:Xt},children:A$(((Om=s==null?void 0:s.test)==null?void 0:Om.output)??"")}),ri=f.jsxs("span",{style:{color:wr},children:["Suggested fix: ",f.jsx(vh,{text:US,surface:"chalkboard"})]})):rt==="fail"?(Re=f.jsx("span",{style:{color:Xt},children:"Codebase consistency failed (knip / dependency-cruiser)."}),ri=f.jsx("span",{style:{color:Xt,opacity:.8},children:"Run pnpm run consistency for details."})):ar?Re=f.jsx("span",{style:{color:Xt},children:"Plan/decision doc issues — see the Docs stamp."}):xt==="pass"&&Qt==="pass"&&rt==="pass"?Re=f.jsx("span",{style:{color:"#b5d6b5"},children:"All checks passing."}):Re=f.jsx("span",{style:{color:Xt,opacity:.6},children:"Checks haven't run yet."}),f.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:L[1],fontFamily:se.handwritten,fontSize:me.sm},children:[Re,f.jsx("span",{style:{visibility:ri?"visible":"hidden"},children:ri??" "})]})})()]})})()})]}),f.jsxs("div",{style:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column",padding:L[6]},children:[f.jsxs("div",{style:{...Vd,display:"flex",alignItems:"center",gap:L[2]},children:["Commit",w&&f.jsx(lt,{surface:"chalkboard",size:"small",children:w})]}),f.jsx(Dn,{surface:"chalkboard",size:"small",className:"stack-card-fill",children:y&&y.length>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto"},children:f.jsx(Hx,{title:`${y.length} file${y.length===1?"":"s"} changed`,expanded:E,onToggle:()=>M(!E),children:f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[2],paddingTop:L[2]},children:y.map($=>f.jsxs("label",{style:{display:"flex",alignItems:"center",gap:L[2],fontFamily:se.mono,fontSize:me["2xs"],color:wr,cursor:"pointer"},children:[f.jsx("input",{type:"checkbox",checked:A.has($.path),onChange:()=>ie($.path),style:{accentColor:wr}}),f.jsx("span",{style:{color:$.staged?wr:Xt,minWidth:24},children:$.status}),f.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:$.path})]},$.path))})})}),f.jsxs("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:L[3],marginTop:L[3]},children:[ze&&f.jsx(qn,{surface:"chalkboard",dismissible:!0,onDismiss:()=>nt(null),children:ze}),f.jsxs("div",{style:{display:"flex",gap:L[2],alignItems:"center"},children:[f.jsx("div",{style:{flex:1},children:f.jsx(zn,{surface:"chalkboard",size:"small",placeholder:"Commit title",value:I,onChange:$=>O($.currentTarget.value)})}),f.jsx(Ot,{icon:f.jsx(I$,{size:16}),surface:"chalkboard",size:"small",label:"Suggest title and message from the diff",disabled:A.size===0||de,onClick:un,wobble:de?1:0})]}),f.jsx(Hs,{surface:"chalkboard",size:"small",placeholder:"Commit message (optional)",value:F,onChange:$=>H($.currentTarget.value),rows:2}),he&&f.jsx(qn,{surface:"chalkboard",dismissible:!0,onDismiss:()=>ce(null),children:he}),f.jsx(re,{surface:"chalkboard",size:"small",fullWidth:!0,disabled:A.size===0||!I.trim()||z,onClick:pe,children:z?"Committing…":"Commit"})]})]}):f.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:L[3]},children:g>0?f.jsxs(f.Fragment,{children:[f.jsxs("p",{style:{opacity:.5,fontSize:me.xs,margin:0},children:["All changes committed — ",g," commit",g===1?"":"s"," ready to push."]}),ne&&f.jsx(qn,{surface:"chalkboard",dismissible:!0,onDismiss:()=>T(null),children:ne}),f.jsx(re,{surface:"chalkboard",size:"small",icon:f.jsx(D$,{size:14}),disabled:k,onClick:At,children:k?"Pushing…":`Push ${g} commit${g===1?"":"s"}`})]}):f.jsxs(f.Fragment,{children:[f.jsx("p",{style:{opacity:.5,fontSize:me.xs,margin:0},children:"No changed files."}),Bn&&f.jsx(qn,{surface:"chalkboard",dismissible:!0,onDismiss:()=>sr(null),children:Bn}),f.jsx(Vt,{content:x==="clean-on-main"?"Already on clean main":void 0,surface:"chalkboard",children:f.jsx(re,{surface:"chalkboard",size:"small",icon:f.jsx(N$,{size:14}),disabled:Mt||x==="clean-on-main",onClick:$n,children:Mt?"Syncing…":"Sync to main"})})]})})})]})]})]})]})},F$=()=>{const e=G(a=>a.decisions),t=G(a=>a.openQuestions),n=G(a=>a.activeDocTitle),r=G(a=>a.setActiveDocSection),i=G(a=>a.setActiveDocTitle),s=e.find(a=>a.title===n);if(!s)return null;const o=t.filter(a=>a.resolvedBy===s.title);return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${L[3]}`,lineHeight:Et.tight},children:s.title}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2],marginBottom:L[5]},children:[f.jsx("span",{className:"text-sm",style:{opacity:.5},children:s.date}),f.jsx(lt,{size:"small",fillColor:s.status==="decided"?"rgba(143, 185, 150, 0.25)":"rgba(201, 139, 139, 0.25)",textColor:s.status==="decided"?Te.accentGreenDark:"#6E3A3A",children:s.status}),s.supersededBy&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Superseded by"," ",f.jsx(bh,{onClick:()=>i(s.supersededBy),children:s.supersededBy})]}),o.length>0&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:[o.length===1?"Resolves":"Resolves all of"," ",o.map((a,l)=>f.jsxs("span",{children:[l>0&&", ",f.jsx(bh,{onClick:()=>{r("questions"),i(a.title)},children:a.title})]},a.title))]})]}),f.jsx("div",{style:{fontFamily:se.body,fontSize:me.base,lineHeight:Et.relaxed,color:"#1C1B18"},children:f.jsx(Ea,{children:s.body})})]})},ai=(e,t)=>e.toLowerCase().includes(t.toLowerCase()),fl=(e,t,n=120)=>{const r=e.toLowerCase().indexOf(t.toLowerCase());if(r===-1)return e.slice(0,n);const i=Math.max(0,r-40),s=Math.min(e.length,r+t.length+40);let o=e.slice(i,s);return i>0&&(o=`…${o}`),s<e.length&&(o=`${o}…`),o},$$=({query:e})=>{const{decisions:t,openQuestions:n,progress:r,repoDocs:i,setActiveDocSection:s,setActiveDocTitle:o,setDocSearchQuery:a}=G(),l=[];for(const d of t)(ai(d.title,e)||ai(d.body,e))&&l.push({section:"decisions",sectionLabel:"Decisions",title:d.title,snippet:fl(d.body||d.title,e)});for(const d of n)(ai(d.title,e)||ai(d.body,e))&&l.push({section:"questions",sectionLabel:"Open Questions",title:d.title,snippet:fl(d.body||d.title,e)});for(const d of r)for(const h of d.items)if(ai(h,e)){l.push({section:"progress",sectionLabel:"Progress",title:d.date,snippet:fl(h,e)});break}for(const d of i)(ai(d.name,e)||ai(d.content,e))&&l.push({section:"repo-docs",sectionLabel:"Repo Docs",title:d.name,snippet:fl(d.content,e)});const u={};for(const d of l)u[d.section]||(u[d.section]=[]),u[d.section].push(d);const c=(d,h)=>{s(d),o(h),a("")};return l.length===0?f.jsxs("p",{style:{opacity:.5},children:['No results found for "',e,'".']}):f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm",style:{opacity:.5,marginBottom:L[3]},children:[l.length," result",l.length===1?"":"s",' for "',e,'"']}),Object.entries(u).map(([d,h])=>f.jsxs("div",{style:{marginBottom:L[6]},children:[f.jsx("h3",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4,margin:`0 0 ${L[2]}`},children:h[0].sectionLabel}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[1]},children:h.map(p=>f.jsx(re,{variant:"ghost",size:"small",fullWidth:!0,onClick:()=>c(p.section,p.title),style:{justifyContent:"flex-start",padding:`${L[2]} ${L[3]}`},children:f.jsxs("span",{style:{textAlign:"left"},children:[f.jsx("span",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"0.95rem",display:"block",marginBottom:"0.2rem"},children:p.title}),f.jsx("span",{className:"text-sm",style:{opacity:.6},children:p.snippet})]})},`${p.section}-${p.title}`))})]},d))]})},V$=()=>{const e=G(g=>g.openQuestions),t=G(g=>g.activeDocTitle),n=G(g=>g.setActiveDocSection),r=G(g=>g.setActiveDocTitle),[i,s]=C.useState(!1),[o,a]=C.useState(""),[l,u]=C.useState(""),[c,d]=C.useState(!1),h=e.find(g=>g.title===t);if(!h)return null;const p=()=>{h.resolvedBy&&(n("decisions"),r(h.resolvedBy))},m=()=>{a(""),u(""),d(!1),s(!0)},y=()=>{s(!1)},w=async g=>{if(g.preventDefault(),!(!o.trim()||c)){d(!0);try{await b$(h.title,o.trim(),l.trim()||void 0),s(!1)}catch{d(!1)}}};return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${L[3]}`,lineHeight:Et.tight},children:h.title}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2],marginBottom:L[5]},children:[f.jsx("span",{className:"text-sm",style:{opacity:.5},children:h.raised}),f.jsx(lt,{size:"small",fillColor:h.status==="open"?"rgba(212, 163, 115, 0.25)":"rgba(143, 185, 150, 0.25)",textColor:h.status==="open"?Te.accentAmberDark:Te.accentGreenDark,children:h.status}),h.resolvedBy&&f.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Resolved by"," ",f.jsx(bh,{onClick:p,children:h.resolvedBy})]}),h.status==="open"&&f.jsx(re,{surface:"chalkboard",onClick:m,children:"Resolve"})]}),f.jsx("div",{style:{fontFamily:se.body,fontSize:me.base,lineHeight:Et.relaxed,color:"#1C1B18"},children:f.jsx(Ea,{children:h.body})}),f.jsx(_a,{open:i,onClose:y,title:"Resolve question",size:"small",children:f.jsxs("form",{onSubmit:w,style:{display:"flex",flexDirection:"column",gap:L[4]},children:[f.jsx(zn,{label:"Decision",value:o,onChange:g=>a(g.target.value),placeholder:"What was decided?",disabled:c,autoFocus:!0,required:!0}),f.jsx(Hs,{label:"Rationale",value:l,onChange:g=>u(g.target.value),placeholder:"Optional reasoning…",disabled:c,rows:4}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:L[2]},children:[f.jsx(re,{type:"button",variant:"ghost",onClick:y,disabled:c,children:"Cancel"}),f.jsx(re,{type:"submit",variant:"primary",disabled:!o.trim()||c,children:"Resolve"})]})]})})]})},U$=()=>{const e=G(i=>i.progress),t=G(i=>i.activeDocTitle),r=[...t?e.filter(i=>i.date===t):e].sort((i,s)=>s.date.localeCompare(i.date));return r.length===0?f.jsx("p",{style:{opacity:.5},children:"No progress entries found."}):f.jsx("div",{children:r.map(i=>f.jsxs("div",{style:{marginBottom:L[8]},children:[f.jsx("h3",{style:{fontFamily:se.serif,fontWeight:600,fontSize:me.md,margin:`0 0 ${L[3]}`,lineHeight:Et.tight,opacity:.8},children:i.date}),f.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:L[2]},children:i.items.map((s,o)=>f.jsx("li",{style:{fontFamily:se.body,fontSize:me.sm,lineHeight:1.55,color:"#1C1B18",paddingLeft:L[4],borderLeft:"2px solid rgba(0,0,0,0.08)"},children:f.jsx(Ea,{children:s})},`${i.date}-${o}`))})]},i.date))})},W$=()=>{const e=G(i=>i.repoDocs),t=G(i=>i.activeDocTitle),n=e.find(i=>i.name===t);if(!n)return null;const r=n.name.endsWith(".md");return f.jsxs("div",{children:[f.jsx("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${L[4]}`,lineHeight:Et.tight},children:n.name}),r?f.jsx("div",{style:{fontFamily:se.body,fontSize:me.base,lineHeight:Et.relaxed,color:"#1C1B18"},children:f.jsx(Ea,{children:n.content})}):f.jsx("pre",{style:{fontFamily:se.mono,fontSize:me.xs,background:"rgba(0,0,0,0.04)",borderRadius:6,padding:L[4],overflowX:"auto",lineHeight:Et.normal,whiteSpace:"pre-wrap"},children:n.content})]})},H$=()=>{const e=G(r=>r.docSearchQuery),t=G(r=>r.activeDocSection),n=G(r=>r.activeDocTitle);return e.trim()?f.jsx("div",{children:f.jsx($$,{query:e})}):t==="decisions"&&n?f.jsxs("div",{children:[f.jsx(xn,{children:"Decisions"}),f.jsx(F$,{})]}):t==="questions"&&n?f.jsxs("div",{children:[f.jsx(xn,{children:"Open Questions"}),f.jsx(V$,{})]}):t==="progress"?f.jsxs("div",{children:[f.jsx(xn,{children:"Progress"}),f.jsx(U$,{})]}):t==="repo-docs"&&n?f.jsx("div",{children:f.jsx(W$,{})}):f.jsxs("div",{children:[f.jsx(xn,{children:"Docs"}),f.jsx("p",{style:{opacity:.5},children:"Select a section from the sidebar."})]})},rn=({label:e,children:t,action:n})=>f.jsxs("div",{style:{marginBottom:L[5]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"0.35rem",padding:`0 ${L[3]}`},children:[f.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),n]}),t]}),K$=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),br=({children:e})=>f.jsx("span",{className:"text-sm",style:{display:"block",padding:`${L[1]} ${L[3]}`,opacity:.35,fontStyle:"italic"},children:e}),G$=()=>{const{decisions:e,openQuestions:t,progress:n,repoDocs:r,decisionsLoading:i,openQuestionsLoading:s,progressLoading:o,repoDocsLoading:a,loadDecisions:l,loadOpenQuestions:u,loadProgress:c,loadRepoDocs:d,activeDocSection:h,setActiveDocSection:p,activeDocTitle:m,setActiveDocTitle:y,docSearchQuery:w,setDocSearchQuery:g}=G();C.useEffect(()=>{l(),u(),c(),d()},[l,u,c,d]);const x=v=>{p("decisions"),y(v)};return f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{marginBottom:L[4]},children:f.jsx(zn,{size:"small","aria-label":"Search docs",placeholder:"Search docs…",value:w,onChange:v=>g(v.target.value)})}),f.jsx(rn,{label:"Repo Docs",children:a&&r.length===0?f.jsx(br,{children:"Loading…"}):r.length>0?r.map(v=>f.jsx(Xn,{size:"small",active:h==="repo-docs"&&m===v.name,onClick:()=>{p("repo-docs"),y(v.name)},children:K$(v.name)},v.name)):f.jsx(br,{children:"No repo docs found"})}),f.jsx(rn,{label:"Decisions",children:i&&e.length===0?f.jsx(br,{children:"Loading…"}):e.length>0?e.map(v=>f.jsx(Xn,{size:"small",active:h==="decisions"&&m===v.title,onClick:()=>x(v.title),children:v.title},v.title)):f.jsx(br,{children:"No decisions yet"})}),f.jsx(rn,{label:"Open Questions",children:s&&t.length===0?f.jsx(br,{children:"Loading…"}):t.length>0?t.map(v=>f.jsx(Xn,{size:"small",active:h==="questions"&&m===v.title,onClick:()=>{p("questions"),y(v.title)},children:v.title},v.title)):f.jsx(br,{children:"No open questions"})}),f.jsx(rn,{label:"Progress",children:o&&n.length===0?f.jsx(br,{children:"Loading…"}):n.length>0?n.map(v=>f.jsx(Xn,{size:"small",active:h==="progress"&&m===v.date,onClick:()=>{p("progress"),y(v.date)},children:v.date},v.date)):f.jsx(br,{children:"No progress entries"})})]})};function DS(){const[e,t]=C.useState("idle"),[n,r]=C.useState(null),i=C.useRef(null),s=C.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=C.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"}}const Q$=()=>{const e=G(o=>o.launchBatchAudit),t=G(o=>o.agentStatus),[n,r]=C.useState(!1),i=t!==null&&t.status!=="done"&&t.status!=="error",s=async()=>{r(!0);try{await e()}catch(o){alert(o.message)}finally{r(!1)}};return f.jsx(re,{variant:"ghost",size:"small",onClick:s,disabled:i||n,style:{color:Te.textSecondary},children:"Audit all"})},Mm={"in-progress":"#C89A5A",planned:"#6A9B72",idea:"#8A9BAA",review:"#9B7AB5",done:"#8A7A8A",dropped:"#A06060"},NS={idea:"Idea",planned:"Planned","in-progress":"In progress",review:"Review",done:"Done",dropped:"Dropped"},Ou={idea:"slate",planned:"blue","in-progress":"amber",review:"slate",done:"green",dropped:"rose"},Y0={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"}},Y$=[{status:"planned",label:"Planned"},{status:"in-progress",label:"In Progress"}],Am=({id:e})=>e?f.jsx(lt,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}):null,q$=({plan:e})=>f.jsxs("div",{children:[f.jsxs("div",{className:"text-sm",style:{fontWeight:500,lineHeight:1.3,display:"flex",alignItems:"center",gap:L[1]},children:[f.jsx(Am,{id:e.id}),e.title]}),e.tags.length>0&&f.jsx("div",{style:{display:"flex",gap:L[1],flexWrap:"wrap",marginTop:"0.4rem"},children:e.tags.map(t=>f.jsx(lt,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:t},t))})]}),X$=({plans:e})=>f.jsx(Sa,{className:"board-view-table",board:Y$.map(({status:t,label:n})=>({key:t,label:n,accent:Ou[t],items:e.filter(r=>r.status===t||t==="in-progress"&&r.status==="review"),getKey:r=>r.title,renderItem:r=>f.jsx(q$,{plan:r})}))}),zS=({pct:e,color:t,height:n=6})=>f.jsx(Wk,{value:e,color:t,height:n}),Bu=({plan:e,highlighted:t,onOpen:n,rank:r})=>{const i=LS(e);return f.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onClick:n?()=>n(e.title):void 0,onKeyDown:n?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(e.title))}:void 0,style:{cursor:n?"pointer":void 0,...t?{outline:"2px solid rgba(200,154,90,0.5)",outlineOffset:2,borderRadius:4}:void 0},children:f.jsxs(Dn,{texture:"kraft",accent:!0,accentColor:Ou[e.status],children:[f.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:L[3]},children:[f.jsxs("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.3rem",margin:0,lineHeight:1.3,display:"flex",alignItems:"center",gap:L[2]},children:[r!==void 0&&f.jsxs("span",{className:"text-sm",style:{opacity:.4,fontWeight:600},children:[r,"."]}),f.jsx(Am,{id:e.id}),e.title]}),f.jsx(lt,{size:"small",fillColor:Y0[e.status].fill,textColor:Y0[e.status].text,children:NS[e.status]})]}),f.jsxs("div",{style:{marginTop:"0.3rem",display:"flex",alignItems:"center",gap:L[2],flexWrap:"wrap"},children:[f.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${zu(e.updated)}`:`created ${zu(e.created)}`}),e.tags.map(s=>f.jsx(lt,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:s},s))]}),i!==null&&f.jsx("div",{style:{marginTop:L[3]},children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3]},children:[f.jsx("div",{style:{flex:1},children:f.jsx(zS,{pct:i.pct,color:Mm[e.status]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[i.done,"/",i.total]})]})})]})})},Z$=({plans:e,onOpen:t})=>{const[n,r]=C.useState(!1);return e.length===0?null:f.jsxs("div",{style:{marginTop:L[8]},children:[f.jsxs(re,{type:"button",variant:"ghost",size:"small",onClick:()=>r(i=>!i),style:{display:"flex",alignItems:"baseline",gap:"0.35rem"},children:[f.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.35},children:"Closed"}),f.jsx("span",{className:"text-xs",style:{opacity:.3},children:e.length}),f.jsx("span",{className:"text-xs",style:{opacity:.3},children:n?"▴":"▾"})]}),n&&f.jsx("div",{style:{marginTop:"0.65rem",display:"flex",flexDirection:"column",gap:"0.65rem"},children:e.map(i=>f.jsx(Bu,{plan:i,onOpen:t},i.title))})]})};function J$(e){const t=e.phases.map((i,s)=>`${s+1}. [${i.done?"x":" "}] ${i.text}`).join(`
83
+ `),n=e.log&&e.log.length>0?e.log.map(i=>`- ${i.date}: ${i.text}`).join(`
84
+ `):"(none)",r=e.clarifications&&e.clarifications.length>0?e.clarifications.map(i=>`- ${i.date}: ${i.text}`).join(`
85
+ `):"(none)";return`You are auditing the plan "${e.title}" (${e.id??"no id"}) for missing phases. The plan is a single file at papercamp/plans/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/plans/archive/${e.id??"<ID>"}.md. Edit only that file.
86
+
87
+ Plan body: ${e.body}
88
+
89
+ Current phases:
90
+ ${t}
91
+
92
+ Log entries (issues, bugs, and review notes recorded so far):
93
+ ${n}
94
+
95
+ Clarifications (answered scope/design questions):
96
+ ${r}
97
+
98
+ Task:
99
+ 1. Read the plan above, then inspect the relevant code in this repo.
100
+ 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.
101
+ 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.
102
+ 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.
103
+
104
+ Rules:
105
+ - Never modify, reorder, check, uncheck, or delete any existing line, even if it looks stale, wrong, or redundant.
106
+ - Never touch the YAML frontmatter.
107
+ - Append only: new unchecked phases at the end of the list, plus the single Log line.`}function eV(e){const t=e.phases.map((n,r)=>`${r+1}. [${n.done?"x":" "}] ${n.text}`).join(`
108
+ `);return`You are reconciling the plan "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/plans/${e.id??"<ID>"}.md — if it is not there, it is archived at papercamp/plans/archive/${e.id??"<ID>"}.md. Edit only that file.
109
+
110
+ Plan body: ${e.body}
111
+
112
+ Current phases:
113
+ ${t}
114
+
115
+ Task: this plan has drifted from the codebase — some phase descriptions and 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.
116
+
117
+ 1. Read the plan above, then inspect the relevant code in this repo to find what has actually changed since the prose was written.
118
+ 2. Reword only the sentences or phrases that are now stale: fix references and superseded approaches. Leave everything else byte-identical.
119
+ 3. Do not summarize, restructure, or "improve" prose that is still accurate — an unnecessary rewrite is a failure of this task, not a bonus.
120
+
121
+ Hard guardrails, never violate these:
122
+ - Never touch the YAML frontmatter (id, title, kind, status, created, idea, tags, or any other field).
123
+ - Never un-check, check, delete, or reorder any phase line, checked or unchecked.
124
+ - Never add or remove phases.
125
+ - Never touch the Log or Clarifications sections.
126
+ - If nothing is stale, make no edits at all.`}function tV(e){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.
127
+
128
+ Current idea body, in full:
129
+ ${e.body}
130
+
131
+ Task:
132
+ 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.
133
+ 2. Rewrite the idea's prose body in that file so it is concrete and actionable: 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.
134
+
135
+ Keep unchanged:
136
+ - the YAML frontmatter (id, title)
137
+ - the \`## ${e.id??"IDEA-N"}: ${e.title}\` heading line
138
+
139
+ Replace everything below that heading with the improved body.`}function nV(e){return`You are clarifying the plan "${e.title}" (${e.id??"no id"}), stored as a single file at papercamp/plans/${e.id??"<ID>"}.md (or papercamp/plans/archive/${e.id??"<ID>"}.md if archived). Edit only that file, and within it only the \`### Clarifications\` section.
140
+
141
+ Plan body: ${e.body}
142
+
143
+ Current phases:
144
+ ${e.phases.length>0?e.phases.map((t,n)=>`${n+1}. [${t.done?"x":" "}] ${t.text}`).join(`
145
+ `):"(none yet)"}
146
+
147
+ Task: surface the plan's most important unanswered questions and get them answered by the user, one at a time.
148
+
149
+ 1. Check the plan for gaps in: functional scope, data model, UX flow, non-functional requirements, edge cases, terminology, and completion criteria.
150
+ 2. Pick the gaps that would most change the implementation — at most 5. If the plan has no meaningful gaps, say so and stop; do not invent questions.
151
+ 3. Ask the user one question at a time. With each question, propose an answer marked **Recommended:** so the user can accept it with a single word. Wait for the user's reply before asking the next question.
152
+ 4. After each answered question, append one line to the plan file's \`### Clarifications\` section, creating the section between the body and \`### Phases\` if it does not exist:
153
+
154
+ \`\`\`
155
+ - YYYY-MM-DD: Q: <question> → A: <the user's answer>
156
+ \`\`\`
157
+
158
+ Rules:
159
+ - Record only answers the user actually gave (accepting your recommendation counts).
160
+ - Append only — never rewrite or delete existing Clarifications lines.
161
+ - Use today's date.`}function rV(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(`
162
+ `);return`### ${i.id??"no id"}: ${i.title} (status: ${i.status}${i.idea?`, idea: ${i.idea}`:""})
163
+ ${i.body}
164
+ ${s||" (no phases yet)"}`}).join(`
165
+
166
+ `):"(no other open plans exist yet)";return`You are drafting a new plan from an idea: ${e.id??"no id"} ("${e.title}"), stored at papercamp/ideas/${e.id??"<ID>"}.md.
167
+
168
+ Idea body, in full:
169
+ ${e.body}
170
+
171
+ ## Plan file shape (see papercamp/about.md)
172
+
173
+ Each plan is its own file at \`papercamp/plans/<KIND>-<N>.md\` (the file name is the plan's id). It has YAML frontmatter, a free-prose body, then a \`### Phases\` checklist:
174
+
175
+ \`\`\`
176
+ ---
177
+ id: <KIND>-<N>
178
+ title: <Short headline>
179
+ kind: feat | fix | chore | docs | refactor
180
+ status: idea
181
+ created: <today, YYYY-MM-DD>
182
+ idea: ${e.id??"IDEA-N"}
183
+ tags:
184
+ - app
185
+ - agent
186
+ ---
187
+
188
+ One or two paragraphs of free prose giving context — what this is and why,
189
+ in the same voice as the plans shown below.
190
+
191
+ ### Phases
192
+ - [ ] Short phase title
193
+ Optional description of the phase, indented with 6 spaces.
194
+ \`\`\`
195
+
196
+ Field rules:
197
+ - \`title\`: a short verb-led headline, 2-6 words.
198
+ - \`kind\`: the Conventional Commits type that best fits this idea (most are \`feat\`). It determines the ID prefix.
199
+ - \`id\`: read \`nextId.<kind>\` from \`papercamp/config.json\` (e.g. \`nextId.feat\`), use that number as \`<KIND>-<N>\`, and write the incremented counter back to config.json. Never derive the number by scanning existing plan files for the highest one — a deleted plan's number must never be reused.
200
+ - \`idea\`: exactly \`${e.id??"this idea's id"}\`. This backlink is how the dashboard (and this task's own success check) finds the plan you wrote — without it the draft counts as failed.
201
+ - \`status\`: exactly \`idea\`, never anything further along. Drafts land in the Backlog and a human promotes them from there (per papercamp/decisions.md, "Plan-drafting agent writes directly, same as phase execution").
202
+ - \`tags\`: 1-4 short subsystem tags that fit the idea (the example values above are placeholders).
203
+ - Phases: actionable steps a future agent or human could pick up one at a time — match the granularity of the phases in the plans shown below, not one giant phase.
204
+
205
+ ## Every other open (non-done) plan, for scope context
206
+
207
+ ${r}
208
+
209
+ ## What to do
210
+
211
+ 1. Read \`papercamp/config.json\` and take the current \`nextId.<kind>\` value for your chosen kind.
212
+ 2. Create exactly one new file, \`papercamp/plans/<KIND>-<N>.md\`, in the shape above.
213
+ 3. Write the incremented counter back to \`papercamp/config.json\`.
214
+
215
+ Use the open plans above only to avoid duplicating an in-flight plan's scope and to match phase granularity. Never create, edit, move, or rename any other plan file, and never write to the legacy monolithic file \`papercamp/plans.md\` — it is unused under per-file storage.`}const iV=({idea:e,otherPlans:t})=>{const n=G(h=>h.launchPlanDraft),r=G(h=>h.agentStatus),i=r!==null&&r.status!=="done"&&r.status!=="error",{state:s,errorMessage:o,run:a}=DS(),{toast:l}=Gk(),u=()=>{const h=e.id;h&&a(async()=>{try{await n(h,rV(e,t))}catch(p){throw l({title:"Draft failed",description:p.message,variant:"error"}),p}})},c=s==="loading"?"Drafting…":s==="success"?"Draft sent!":s==="error"?"Draft failed":"Draft plan",d=s==="error"?o??"Draft failed":e.id?void 0:"Idea needs an ID before an agent can run";return f.jsx(Vt,{content:d,children:f.jsx(re,{variant:"ghost",size:"small",onClick:u,disabled:i||s==="loading"||!e.id,style:{color:s==="error"?Te.accentRoseDark:Te.textSecondary},children:c})})},sV=[{key:"planned",label:"Planned",accent:Ou.planned,icon:f.jsx(BN,{}),iconFill:void 0,filter:e=>!e.status||e.status==="planned"},{key:"done",label:"Done",accent:Ou.done,icon:f.jsx(pm,{size:14}),iconFill:"rgba(143, 185, 150, 0.35)",filter:e=>e.status==="done"}],oV=({ideas:e,plans:t,onOpenIdea:n,onOpenPlan:r})=>{const[i,s]=C.useState(null),[o,a]=C.useState(!1),l=4;if(e.length===0)return null;const u=c=>t.filter(d=>d.idea===c);return f.jsx(Sa,{board:sV.map(({key:c,label:d,accent:h,icon:p,iconFill:m,filter:y})=>{const w=e.filter(y),g=c==="done",x=g?w.length-l:0,b=x>0&&!o?[...w.slice(0,l),{__overflow:!0,count:x}]:w;return{key:c,label:g?`${d} (${w.length})`:d,accent:h,items:b,getKey:_=>"__overflow"in _?"__overflow":_.title,renderItem:_=>{if("__overflow"in _)return f.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:`${L[2]} 0`},children:f.jsxs("button",{type:"button",onClick:()=>a(!0),style:{background:"none",border:"none",padding:0,cursor:"pointer",font:"inherit",color:"inherit",fontSize:"0.8rem",opacity:.5,textDecoration:"underline"},children:[_.count," more idea",_.count===1?"":"s"]})});const S=i===_.title,j=_.id?u(_.id):[],E=j.length>0;return f.jsxs("div",{children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[f.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(_.title),style:{flex:1,minWidth:0,background:"none",border:"none",padding:0,cursor:"pointer",display:"flex",alignItems:"center",gap:L[2],textAlign:"left",font:"inherit",color:"inherit"},children:[f.jsx(Hk,{icon:p,size:"small",fillColor:m}),f.jsx("span",{className:"text-sm",style:{fontWeight:500,lineHeight:1.3},children:_.title})]}),E&&f.jsxs("button",{type:"button","aria-label":S?"Hide linked plans":"Show linked plans",onClick:()=>s(S?null:_.title),style:{flexShrink:0,background:"none",border:"none",padding:0,opacity:.45,cursor:"pointer",fontSize:"0.7rem",font:"inherit"},children:[S?"▾":"▸"," ",j.length]}),!E&&_.id&&f.jsx("div",{style:{flexShrink:0},children:f.jsx(iV,{idea:_,otherPlans:t})})]}),S&&E&&f.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:L[1],marginTop:L[2]},children:j.map(M=>f.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(M.title),style:{background:"none",border:"none",padding:0,cursor:"pointer",font:"inherit"},children:f.jsx(lt,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:M.id})},M.title))})]})}}})})},aV=({ideaId:e})=>f.jsxs(Dn,{texture:"kraft",children:[f.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:L[3]},children:[f.jsxs("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.3rem",margin:0,lineHeight:1.3,display:"flex",alignItems:"center",gap:L[2]},children:[f.jsx(lt,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:e}),f.jsx("span",{style:{opacity:.55},children:"Creating a plan…"})]}),f.jsx(po,{variant:"rect",width:60,height:20})]}),f.jsxs("div",{style:{marginTop:"0.3rem",display:"flex",alignItems:"center",gap:L[2]},children:[f.jsx(po,{variant:"text",width:90,height:12}),f.jsx(po,{variant:"rect",width:50,height:18})]}),f.jsx("div",{style:{marginTop:L[3]},children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3]},children:[f.jsx(po,{variant:"rect",width:"100%",height:6,style:{flex:1}}),f.jsx(po,{variant:"text",width:28,height:12,style:{flexShrink:0}})]})})]}),Ud=({label:e,count:t})=>f.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"0.4rem",marginBottom:"0.65rem"},children:[f.jsx("span",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4},children:e}),f.jsx("span",{className:"text-xs",style:{opacity:.3},children:t})]}),lV=({plans:e,activePlanTitle:t,onOpenPlan:n,ideaEntries:r,onOpenIdea:i,draftingIdeaId:s})=>{const o=C.useRef({});C.useEffect(()=>{var h;t&&o.current[t]&&((h=o.current[t])==null||h.scrollIntoView({behavior:"smooth",block:"center"}))},[t]);const a=e.filter(h=>h.status==="in-progress"||h.status==="review"),l=e.filter(h=>h.status==="planned"||h.status==="idea"),u=e.filter(h=>h.status==="done"||h.status==="dropped"),c=!!s&&!e.some(h=>h.idea===s),d=h=>p=>{o.current[h]=p};return f.jsxs("div",{children:[a.length>0&&f.jsxs("section",{style:{marginBottom:L[8]},children:[f.jsx(Ud,{label:"In progress",count:a.length}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[3]},children:a.map(h=>f.jsx("div",{ref:d(h.title),children:f.jsx(Bu,{plan:h,highlighted:t===h.title,onOpen:n})},h.title))})]}),(l.length>0||c)&&f.jsxs("section",{style:{marginBottom:L[8]},children:[f.jsx(Ud,{label:"Backlog",count:l.length}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:L[3]},children:[c&&s&&f.jsx(aV,{ideaId:s}),l.map((h,p)=>f.jsx("div",{ref:d(h.title),children:f.jsx(Bu,{plan:h,highlighted:t===h.title,onOpen:n,rank:p+1})},h.title))]})]}),r&&r.length>0&&f.jsxs("section",{style:{marginBottom:L[8]},children:[f.jsx(Ud,{label:"Ideas",count:r.length}),f.jsx(oV,{ideas:r,plans:e,onOpenIdea:i,onOpenPlan:n})]}),f.jsx(Z$,{plans:u,onOpen:n})]})},uV=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}`},cV=(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=[uV(e),e.failure_scenario??e.reasoning].filter(Boolean).join(" — ");return{done:!1,text:n.trim(),description:r||void 0,source:"review"}},dV=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)=>cV(r,i))},fV=({onAdd:e,disabled:t})=>{const[n,r]=C.useState(!1),[i,s]=C.useState(""),[o,a]=C.useState(null),[l,u]=C.useState(!1),c=()=>{r(!1),s(""),a(null)},d=async()=>{let h;try{h=dV(i)}catch(p){a(p instanceof Error?p.message:"Could not parse findings");return}u(!0),a(null);try{await e(h),c()}finally{u(!1)}};return f.jsxs(f.Fragment,{children:[f.jsx(re,{variant:"ghost",size:"small",onClick:()=>r(!0),disabled:t,children:"Add as phases"}),f.jsx(_a,{open:n,onClose:c,title:"Add /code-review findings",size:"small",children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:L[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(Hs,{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(qn,{variant:"warning",children:["Could not add phases — ",o]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:L[2]},children:[f.jsx(re,{type:"button",variant:"ghost",onClick:c,disabled:l,children:"Cancel"}),f.jsx(re,{type:"button",variant:"primary",onClick:d,disabled:l||!i.trim(),children:"Add phases"})]})]})})]})},hV=({planId:e,phaseIndex:t,disabled:n})=>{const r=G(a=>a.launchAgent),[i,s]=C.useState(!1),o=async a=>{if(a.stopPropagation(),!!e){s(!0);try{await r(e,t)}catch(l){alert(l.message)}finally{s(!1)}}};return f.jsx(Ot,{icon:f.jsx("span",{style:{fontSize:12,lineHeight:1},children:"▶"}),variant:"ghost",size:"small",label:e?"Start agent on this phase":"Plan needs an ID before an agent can run",onClick:o,disabled:n||i||!e,className:"transition-opacity",style:{color:Te.textSecondary}})},pV=({plan:e,disabled:t})=>{const n=G(o=>o.launchPlanAudit),[r,i]=C.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,J$(e))}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(Vt,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(re,{variant:"ghost",size:"small",onClick:s,disabled:t||r||!e.id,style:{color:Te.textSecondary},children:"Audit phases against code"})})};async function OS(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 mV=({plan:e,disabled:t})=>{const[n,r]=C.useState("idle"),i=async()=>{const s=nV(e),o=await OS(s);r(o?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return f.jsx(Vt,{content:n==="copied"?"Copied":n==="failed"?"Copy failed — select and copy manually":"Copy clarification prompt",children:f.jsx(re,{variant:"ghost",size:"small",onClick:i,disabled:t,icon:n==="copied"?f.jsx(pm,{size:14}):n==="failed"?f.jsx(Oi,{size:14}):f.jsx(Vk,{size:14}),style:{color:n==="copied"?"#6A9B72":n==="failed"?"#A06060":Te.textSecondary},children:"Copy Clarifications Prompt"})})},gV=({planTitle:e,phaseIndex:t})=>{const[n,r]=C.useState("idle"),i=async s=>{s.stopPropagation();const o=`Start phase ${t+1} of plan "${e}" in papercamp/plans.md`,a=await OS(o);r(a?"copied":"failed"),setTimeout(()=>r("idle"),1500)};return f.jsx(Ot,{icon:n==="copied"?f.jsx(pm,{size:16}):n==="failed"?f.jsx(Oi,{size:16}):f.jsx(Vk,{size:16}),variant:"ghost",size:"small",label:n==="copied"?"Copied":n==="failed"?"Copy failed — select and copy manually":"Copy phase prompt",onClick:i,className:"transition-opacity",style:{color:n==="copied"?"#6A9B72":n==="failed"?"#A06060":Te.textSecondary}})},yV=({plan:e,disabled:t})=>{const n=G(o=>o.launchPlanReconcile),[r,i]=C.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id,eV(e),{body:e.body,phases:e.phases})}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(Vt,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(re,{variant:"ghost",size:"small",onClick:s,disabled:t||r||!e.id,style:{color:Te.textSecondary},children:"Reconcile"})})};function Wd(e,t){const n=e.split(/(\s+)/).filter(c=>c!==""),r=t.split(/(\s+)/).filter(c=>c!==""),i=n.length,s=r.length,o=Array.from({length:i+1},()=>new Array(s+1).fill(0));for(let c=i-1;c>=0;c--)for(let d=s-1;d>=0;d--)o[c][d]=n[c]===r[d]?o[c+1][d+1]+1:Math.max(o[c+1][d],o[c][d+1]);const a=[];let l=0,u=0;for(;l<i&&u<s;)n[l]===r[u]?(a.push({type:"same",text:n[l]}),l++,u++):o[l+1][u]>=o[l][u+1]?(a.push({type:"removed",text:n[l]}),l++):(a.push({type:"added",text:r[u]}),u++);for(;l<i;)a.push({type:"removed",text:n[l]}),l++;for(;u<s;)a.push({type:"added",text:r[u]}),u++;return xV(a)}function xV(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 Hd=({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?Te.accentGreenDark:Te.accentRoseDark},children:t.text},`${t.type}-${n}`)})}),q0=e=>f.jsx("h4",{style:{fontFamily:se.serif,fontSize:me.xs,fontWeight:600,margin:`0 0 ${L[2]}`,opacity:.65},children:e}),vV=({plan:e,before:t,onApprove:n,onDiscard:r})=>{const[i,s]=C.useState(!1),o=e.body!==t.body,a=e.phases.map((u,c)=>({phase:u,before:t.phases[c],index:c})).filter(({phase:u,before:c})=>c!==void 0&&(u.text!==c.text||(u.description??"")!==(c.description??""))),l=async()=>{s(!0);try{await r()}finally{s(!1)}};return f.jsx(_a,{open:!0,title:"Review reconcile changes",size:"large",onClose:l,children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:L[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.']}),!o&&a.length===0&&f.jsx("p",{className:"text-sm",style:{margin:0,opacity:.6},children:"No wording changed."}),o&&f.jsxs("div",{children:[q0("Body"),f.jsx("p",{className:"text-base",style:{margin:0,lineHeight:Et.normal},children:f.jsx(Hd,{tokens:Wd(t.body,e.body)})})]}),a.length>0&&f.jsxs("div",{children:[q0("Phases"),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[3]},children:a.map(({phase:u,before:c,index:d})=>f.jsxs("div",{className:"text-sm",style:{lineHeight:Et.normal},children:[f.jsx(Hd,{tokens:Wd(c.text,u.text)}),(u.description||c.description)&&f.jsx("div",{style:{opacity:.85,marginTop:L[1]},children:f.jsx(Hd,{tokens:Wd(c.description??"",u.description??"")})})]},d))})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:L[2]},children:[f.jsx(re,{variant:"primary",size:"small",className:"btn-orange",onClick:l,disabled:i,children:"Discard"}),f.jsx(re,{variant:"primary",size:"small",className:"btn-green",onClick:n,disabled:i,children:"Approve"})]})]})})},wV=({plan:e,disabled:t})=>{const n=G(o=>o.launchRunAll),[r,i]=C.useState(!1),s=async()=>{if(e.id){i(!0);try{await n(e.id)}catch(o){alert(o.message)}finally{i(!1)}}};return f.jsx(Vt,{content:e.id?void 0:"Plan needs an ID before an agent can run",children:f.jsx(re,{variant:"ghost",size:"small",onClick:s,disabled:t||r||!e.id,style:{color:Te.textSecondary},children:"Run all phases"})})},BS=({plan:e})=>{const t=G(P=>P.loadPlans),n=G(P=>P.agentStatus),r=G(P=>P.reconcilePreview),i=G(P=>P.setReconcilePreview),s=n!==null&&n.status!=="done"&&n.status!=="error",o=s&&n!==null&&n.planId===e.id?n.phaseIndex:null,a=s&&n!==null&&n.planId===e.id&&n.phaseIndex===void 0,[l,u]=C.useState(!1),[c,d]=C.useState(""),h=LS(e),p=e.status==="in-progress",m=e.status==="review";h!==null&&h.done===h.total&&h.total>0;const y=async()=>{u(!0),await fn(e.title,{status:"in-progress"}),await t(),u(!1)},w=async()=>{u(!0),await fn(e.title,{status:"planned"}),await t(),u(!1)},g=async P=>{const R=e.phases.map((B,I)=>I===P?{...B,done:!B.done}:B);u(!0),R.every(B=>B.done)&&e.status==="in-progress"?await fn(e.title,{phases:R,status:"review"}):await fn(e.title,{phases:R}),await t(),u(!1)},x=async()=>{u(!0),await fn(e.title,{status:"done"}),await t(),u(!1)},v=async()=>{u(!0),await fn(e.title,{status:"in-progress"}),await t(),u(!1)},b=async P=>{u(!0),await fn(e.title,{status:P}),await t(),u(!1)},_=async P=>{u(!0),await fn(e.title,{agent:P||null}),await t(),u(!1)},S=async P=>{u(!0),await fn(e.title,{phases:[...e.phases,...P]}),await t(),u(!1)},j=()=>{i(null)},E=async()=>{!r||r.planId!==e.id||(u(!0),await fn(e.title,{body:r.before.body,phases:r.before.phases}),await t(),i(null),u(!1))},M=async()=>{if(!c.trim())return;const R={date:new Date().toISOString().slice(0,10),text:c.trim().replace(/\n/g," ")},A=[...e.log??[],R];u(!0),await fn(e.title,{log:A}),await t(),d(""),u(!1)};return f.jsxs("div",{children:[r&&r.planId===e.id&&f.jsx(vV,{plan:e,before:r.before,onApprove:j,onDiscard:E}),f.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:L[4],marginBottom:L[3]},children:[f.jsxs("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:0,lineHeight:Et.tight,display:"flex",alignItems:"center",gap:L[3]},children:[f.jsx(Am,{id:e.id}),e.title]}),!m&&f.jsx(re,{variant:"primary",size:"small",className:p?"btn-orange":"btn-green",onClick:p?w:y,disabled:l,children:p?"Stop":"Start"})]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2],flexWrap:"wrap",marginBottom:L[4]},children:[f.jsx(vs,{size:"small",width:140,value:e.status,onChange:b,disabled:l,options:Hz.map(P=>({value:P,label:NS[P]}))}),f.jsx("span",{className:"text-sm",style:{opacity:.45},children:e.updated?`updated ${zu(e.updated)}`:`created ${zu(e.created)}`}),e.tags.map(P=>f.jsx(lt,{size:"small",fillColor:"rgba(0,0,0,0.06)",children:P},P))]}),f.jsx("div",{style:{marginBottom:L[1]},children:f.jsx(mV,{plan:e,disabled:s})}),e.body&&f.jsx("p",{className:"text-base",style:{margin:`0 0 ${L[4]}`,opacity:.8,lineHeight:Et.normal},children:e.body}),e.clarifications&&e.clarifications.length>0&&f.jsxs("div",{style:{marginBottom:L[5]},children:[f.jsx("h3",{style:{fontFamily:se.serif,fontSize:me.sm,fontWeight:600,margin:`0 0 ${L[3]}`,opacity:.65},children:"Clarifications"}),f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[2],marginBottom:L[3]},children:e.clarifications.map((P,R)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:L[2]},children:P.date}),P.text]},`clar-${P.date}-${R}`))})]}),h!==null&&f.jsx("div",{style:{marginBottom:L[5]},children:f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3]},children:[f.jsx("div",{style:{flex:1},children:f.jsx(zS,{pct:h.pct,color:Mm[e.status]})}),f.jsxs("span",{className:"text-sm",style:{opacity:.5,flexShrink:0},children:[h.done,"/",h.total]})]})}),f.jsx("div",{style:{marginBottom:L[5]},children:f.jsx(vs,{size:"small",width:220,value:e.agent??"",onChange:_,disabled:l,options:[{value:"",label:"Project default agent"},...Yk.map(P=>({value:P,label:mm[P]}))]})}),e.phases.length>0&&f.jsxs("div",{style:{marginBottom:L[8]},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:L[3],marginBottom:L[3]},children:[f.jsx("h3",{style:{fontFamily:se.serif,fontSize:me.sm,fontWeight:600,margin:0,opacity:.65},children:"Phases"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[a&&f.jsx(wh,{size:"small",label:"Audit running…"}),(e.status==="planned"||e.status==="in-progress")&&e.phases.some(P=>!P.done)&&f.jsx(wV,{plan:e,disabled:s}),(e.status==="review"||e.status==="done")&&f.jsx(pV,{plan:e,disabled:s}),e.status!=="done"&&f.jsx(yV,{plan:e,disabled:s}),f.jsx(fV,{onAdd:S,disabled:l})]})]}),f.jsx(Sa,{data:e.phases,columns:[{key:"checkbox",header:"Status",cell:(P,R)=>f.jsx(MI,{checked:P.done,onChange:()=>g(R),disabled:l}),width:2},{key:"title",header:"Title",cell:P=>f.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:L[2],textDecoration:P.done?"line-through":"none",opacity:P.done?.45:1},children:[P.text,P.source==="review"&&f.jsx(lt,{size:"small",fillColor:"rgba(155, 122, 181, 0.25)",textColor:"#7B5E9E",children:"review"})]})},{key:"actions",header:"Actions",cell:(P,R)=>f.jsxs("div",{style:{display:"flex",gap:L[2],alignItems:"center"},children:[f.jsx(gV,{planTitle:e.title,phaseIndex:R}),!P.done&&o===R?f.jsx(wh,{size:"small",label:`Agent ${n==null?void 0:n.status}…`}):!P.done&&f.jsx(hV,{planId:e.id,phaseIndex:R,disabled:s})]}),width:5}],expandable:{render:P=>P.description??null},showExpandColumn:!1,rowClassName:P=>P.source==="review"?"phase-row-review":void 0})]}),m&&f.jsxs("div",{style:{display:"flex",gap:L[3],marginBottom:L[6]},children:[f.jsx(re,{variant:"primary",size:"small",className:"btn-green",onClick:x,disabled:l,children:"Approve & close"}),f.jsx(re,{variant:"primary",size:"small",className:"btn-orange",onClick:v,disabled:l,children:"Needs changes"})]}),f.jsxs("div",{style:{marginBottom:L[8]},children:[f.jsx("h3",{style:{fontFamily:se.serif,fontSize:me.sm,fontWeight:600,margin:`0 0 ${L[3]}`,opacity:.65},children:"Log"}),e.log&&e.log.length>0&&f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[2],marginBottom:L[3]},children:e.log.map((P,R)=>f.jsxs("div",{className:"text-sm",style:{opacity:.75},children:[f.jsx("span",{style:{fontWeight:600,marginRight:L[2]},children:P.date}),P.text]},`${P.date}-${R}`))}),f.jsxs("div",{style:{display:"flex",gap:L[2],alignItems:"flex-end"},children:[f.jsx(Hs,{value:c,onChange:P=>d(P.target.value),placeholder:"Add a log entry…",rows:2}),f.jsx(re,{variant:"primary",size:"small",className:"btn-violet",onClick:M,disabled:l||!c.trim(),children:"Add entry"})]})]})]})},bV=({view:e,onChange:t})=>f.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[f.jsx(Vt,{content:"List view",children:f.jsx(Ot,{icon:f.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[f.jsx("title",{children:"List view icon"}),f.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),f.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),f.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),f.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),f.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),f.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),label:"List view",size:"small",variant:"ghost",isActive:e==="list",onClick:()=>t("list")})}),f.jsx(Vt,{content:"Board view",children:f.jsx(Ot,{icon:f.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[f.jsx("title",{children:"Board view icon"}),f.jsx("rect",{x:"3",y:"3",width:"5",height:"18",rx:"1"}),f.jsx("rect",{x:"10",y:"3",width:"5",height:"12",rx:"1"}),f.jsx("rect",{x:"17",y:"3",width:"5",height:"15",rx:"1"})]}),label:"Board view",size:"small",variant:"ghost",isActive:e==="board",onClick:()=>t("board")})})]}),kV=()=>{const{plans:e,plansError:t,activePlanTitle:n,setActivePlanTitle:r,activeIdeaTitle:i,setActiveIdeaTitle:s,view:o,setView:a,ideaEntries:l,agentStatus:u}=G(),c=u!=null&&u.ideaId&&(u.status==="starting"||u.status==="running")?u.ideaId:null,d=()=>{r(null),s(null)},h=w=>{r(w),s(null)},p=w=>{s(w),r(null)},m=n?e==null?void 0:e.entries.find(w=>w.title===n):null,y=i?l.find(w=>w.title===i):null;return t?f.jsxs("div",{children:[f.jsx(xn,{children:"Plans"}),f.jsxs(Dn,{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})]})]}):e?m?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:L[4]},children:f.jsx(re,{variant:"ghost",size:"small",onClick:d,children:"← All plans"})}),f.jsx(BS,{plan:m})]}):y?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:L[4]},children:f.jsx(re,{variant:"ghost",size:"small",onClick:d,children:"← All plans"})}),f.jsxs("div",{style:{fontFamily:se.body,fontSize:me.base,lineHeight:Et.relaxed,color:"#1C1B18"},children:[f.jsxs("h2",{style:{fontFamily:se.serif,fontWeight:600,fontSize:"1.75rem",margin:`0 0 ${L[4]}`,lineHeight:Et.tight,display:"flex",alignItems:"center",gap:L[3]},children:[y.id&&f.jsx(lt,{size:"small",fillColor:"rgba(0,0,0,0.08)",children:y.id}),y.title]}),f.jsx(Ea,{children:y.body.replace(/^#{1,3}\s+.+(\n|$)/,"").replace(/^-{3,}\s*$/m,"").trim()}),f.jsx("div",{style:{marginTop:L[6]},children:f.jsx(SV,{ideaId:y.id})})]})]}):f.jsxs("div",{children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:L[7]},children:[f.jsx(xn,{children:"Plans"}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[f.jsx(Q$,{}),f.jsx(bV,{view:o,onChange:a})]})]}),e.warnings.length>0&&f.jsxs(Dn,{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:L[5]},children:e.warnings.map(w=>f.jsxs("li",{children:[w.title,": ",w.message]},w.title))})]}),e.entries.length===0&&l.length===0?f.jsxs("p",{style:{opacity:.5},children:["No plans yet. Run ",f.jsx("code",{children:'paper-camp add plan "name"'}),", or add an idea from the sidebar."]}):o==="board"?f.jsx(X$,{plans:e.entries}):f.jsx(lV,{plans:e.entries,activePlanTitle:n,onOpenPlan:h,ideaEntries:l,onOpenIdea:p,draftingIdeaId:c})]}):f.jsxs("div",{children:[f.jsx(xn,{children:"Plans"}),f.jsx("p",{style:{opacity:.5},children:"Loading…"})]})},SV=({ideaId:e})=>{const t=G(c=>c.launchIdeaExtend),n=G(c=>c.agentStatus),r=n!==null&&n.status!=="done"&&n.status!=="error",{state:i,errorMessage:s,run:o}=DS(),{toast:a}=Gk(),l=()=>{e&&o(async()=>{const c=G.getState().ideaEntries.find(d=>d.id===e);if(c)try{await t(e,tV(c))}catch(d){throw a({title:"Extension failed",description:d.message,variant:"error"}),d}})},u=i==="error"?s??"Extension failed":e?void 0:"Idea needs an ID before an agent can run";return f.jsx(Vt,{content:u,children:f.jsx(re,{variant:"ghost",size:"small",onClick:l,disabled:r||i==="loading"||!e,children:i==="loading"?"Extending…":i==="success"?"Extension sent!":i==="error"?"Extension failed":"Extend with AI"})})},_V=({open:e,onClose:t,onAdd:n})=>{const[r,i]=C.useState(""),[s,o]=C.useState(""),[a,l]=C.useState(!1);C.useEffect(()=>{e&&(i(""),o(""),l(!1))},[e]);const u=async c=>{c.preventDefault(),!(!r.trim()||a)&&(l(!0),await n({title:r.trim(),content:s.trim()||void 0}),l(!1),t())};return f.jsx(_a,{open:e,onClose:t,title:"New idea",size:"small",children:f.jsxs("form",{onSubmit:u,style:{display:"flex",flexDirection:"column",gap:L[4]},children:[f.jsx(zn,{label:"Title",value:r,onChange:c=>i(c.target.value),placeholder:"Idea title…",disabled:a,autoFocus:!0,required:!0}),f.jsx(Hs,{label:"Description",value:s,onChange:c=>o(c.target.value),placeholder:"Optional details…",disabled:a,rows:4}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:L[2]},children:[f.jsx(re,{type:"button",variant:"ghost",onClick:t,disabled:a,children:"Cancel"}),f.jsx(re,{type:"submit",variant:"primary",disabled:!r.trim()||a,children:"Add"})]})]})})},CV=({pct:e,color:t})=>f.jsx("div",{style:{width:40,flexShrink:0},children:f.jsx(Wk,{value:e,color:t,height:3})}),Ul=({plan:e,active:t,onClick:n,action:r})=>{const i=W5(e),s=Mm[e.status];return f.jsx(Vt,{content:e.title,placement:"right",children:f.jsx(Xn,{active:t,onClick:n,size:"small",icon:f.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:s,flexShrink:0}}),action:f.jsxs(f.Fragment,{children:[i!==null&&f.jsx(CV,{pct:i,color:s}),r]}),children:e.title})})},PV=()=>{const e=Fs(),t=Lp({select:E=>E.location.pathname}),{plans:n,loadPlans:r,loadIdeas:i,activePlanTitle:s,setActivePlanTitle:o,activeIdeaTitle:a,setActiveIdeaTitle:l,ideaEntries:u,gitBranchHygiene:c}=G(),[d,h]=C.useState(!1),[p,m]=C.useState(!1),y=c==="stale-merged",w=(n==null?void 0:n.entries.filter(E=>E.status==="in-progress"||E.status==="review"))??[],g=(n==null?void 0:n.entries.filter(E=>E.status==="planned"))??[],x=(n==null?void 0:n.entries.filter(E=>E.status==="idea"))??[],v=async E=>{await C$(E),await r(),h(!1)},b=async E=>{await S$(E),await i(),m(!1)},_=async E=>{window.confirm(`Delete idea "${E}"?`)&&(await P$(E),await r(),s===E&&o(null))},S=E=>{e({to:"/"}),o(E.title),l(null)},j=E=>{l(E),o(null),e({to:"/"})};return f.jsxs(f.Fragment,{children:[y&&f.jsx("div",{style:{marginBottom:L[4]},children:f.jsx(qn,{variant:"warning",children:"Branch hygiene: this branch is merged — switch to main before creating new plans."})}),w.length>0&&f.jsx(rn,{label:"In progress",children:w.map(E=>f.jsx(Ul,{plan:E,active:t==="/"&&s===E.title,onClick:()=>S(E)},E.title))}),g.length>0&&f.jsx(rn,{label:"Planned",children:g.map(E=>f.jsx(Ul,{plan:E,active:t==="/"&&s===E.title,onClick:()=>S(E)},E.title))}),u.filter(E=>E.status!=="done").length>0&&f.jsx(rn,{label:"Ideas",action:f.jsx(Ot,{icon:f.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:"New idea",onClick:()=>m(!0)}),children:u.filter(E=>E.status!=="done").map(E=>f.jsx(Xn,{size:"small",active:a===E.title,onClick:()=>j(E.title),children:E.title},E.title))}),f.jsxs(rn,{label:"Backlog",action:f.jsx(Vt,{content:y?"Switch to main first":void 0,children:f.jsx(Ot,{icon:f.jsx("span",{children:"+"}),variant:"ghost",size:"small",label:y?"Switch to main first":"Add to backlog",disabled:y,onClick:()=>h(!0)})}),children:[x.map(E=>f.jsx(Ul,{plan:E,active:t==="/"&&s===E.title,onClick:()=>S(E),action:f.jsx(Ot,{icon:f.jsx("span",{children:"×"}),variant:"ghost",size:"small",label:"Delete",onClick:M=>{M.stopPropagation(),_(E.title)}})},E.title)),x.length===0&&f.jsx("span",{className:"text-sm",style:{display:"block",padding:`${L[1]} ${L[3]}`,opacity:.35,fontStyle:"italic"},children:"Nothing yet"})]}),f.jsx(Qz,{open:d,onClose:()=>h(!1),onAdd:v}),f.jsx(_V,{open:p,onClose:()=>m(!1),onAdd:b})]})},EV=()=>{const{plans:e,plansError:t,activePlanTitle:n,setActivePlanTitle:r,setActiveIdeaTitle:i}=G(),s=()=>{r(null),i(null)},o=u=>{r(u),i(null)},a=(e==null?void 0:e.entries.filter(u=>u.status==="review"))??[],l=n?e==null?void 0:e.entries.find(u=>u.title===n):null;return t?f.jsxs("div",{children:[f.jsx(xn,{children:"Review"}),f.jsxs(Dn,{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})]})]}):e?l?f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:L[4]},children:f.jsx(re,{variant:"ghost",size:"small",onClick:s,children:"← Back to review"})}),f.jsx(BS,{plan:l})]}):f.jsxs("div",{children:[f.jsx(xn,{children:"Review"}),a.length===0?f.jsx("p",{style:{opacity:.5},children:"No plans pending review."}):f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:L[3]},children:a.map(u=>f.jsx(Bu,{plan:u,onOpen:o},u.title))})]}):f.jsxs("div",{children:[f.jsx(xn,{children:"Review"}),f.jsx("p",{style:{opacity:.5},children:"Loading…"})]})},jV=()=>{const e=Fs(),t=Lp({select:l=>l.location.pathname}),{plans:n,activePlanTitle:r,setActivePlanTitle:i,setActiveIdeaTitle:s}=G(),o=(n==null?void 0:n.entries.filter(l=>l.status==="review"))??[],a=l=>{e({to:"/review"}),i(l),s(null)};return f.jsx(rn,{label:"Pending review",children:o.length===0?f.jsx("span",{className:"text-sm",style:{display:"block",padding:"0.25rem 0.75rem",opacity:.35,fontStyle:"italic"},children:"None"}):o.map(l=>f.jsx(Ul,{plan:l,active:t==="/review"&&r===l.title,onClick:()=>a(l.title)},l.title))})},TV=async()=>{try{return(await fetch("/api/config")).json()}catch{return null}},Kd=async e=>{try{return(await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok}catch{return!1}},RV=async()=>{try{return(await(await fetch("/api/configs")).json()).files}catch{return[]}},MV=async e=>{try{const t=await fetch(`/api/configs?name=${encodeURIComponent(e)}`);return t.ok?(await t.json()).content:null}catch{return null}},FS=async()=>{try{return await(await fetch("/api/env")).json()}catch{return{exists:!1,exampleExists:!1,entries:[],missingKeys:[]}}},AV=async e=>{try{return(await fetch("/api/env",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entries:e})})).ok}catch{return!1}},X0=["phase","planDraft","ideaExtend","commitSuggest"],LV={phase:"Phase run",planDraft:"Plan draft",ideaExtend:"Idea extend",commitSuggest:"Commit suggest"},IV=({taskKey:e,agentConfig:t,isLast:n,onSave:r,isSaved:i})=>{const s=Td[t.agent]??Td["claude-code"],o=s.model,a=s.effort,[l,u]=C.useState(t.model??"");C.useEffect(()=>{u(t.model??"")},[t.model]);const c=m=>{var x;const y=m,w=Td[y],g={agent:y};t.model&&(w.model===null||(x=w.model)!=null&&x.includes(t.model))&&(g.model=t.model),t.effort&&Array.isArray(w.effort)&&(g.effort=t.effort),r(e,g)},d=m=>{r(e,{...t,model:m||void 0})},h=()=>{r(e,{...t,model:l||void 0})},p=m=>{r(e,{...t,effort:m||void 0})};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3],paddingBottom:L[2],paddingTop:L[2]},children:[f.jsx("span",{style:{width:110,flexShrink:0,fontSize:me.sm,opacity:.65},children:LV[e]}),f.jsx(vs,{size:"small",value:t.agent,onChange:c,options:Yk.map(m=>({value:m,label:mm[m]}))}),Array.isArray(o)?f.jsx(vs,{size:"small",value:t.model??"",onChange:d,options:[{value:"",label:"Default"},...o.map(m=>({value:m,label:m}))]}):o===null?f.jsx(zn,{size:"small",value:l,placeholder:"Default model",onChange:m=>u(m.target.value),onBlur:h}):null,f.jsx("div",{style:{visibility:Array.isArray(a)?"visible":"hidden"},children:f.jsx(vs,{size:"small",value:t.effort??"",onChange:p,options:[{value:"",label:"Default"},...(Array.isArray(a)?a:[]).map(m=>({value:m,label:m}))]})}),i&&f.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),!n&&f.jsx(ws,{})]})},DV=()=>{const e=C.useRef(null),[t,n]=C.useState(void 0),{iconDataUri:r,loading:i}=AS(),[s,o]=C.useState(null),a=s??r,[l,u]=C.useState(!1),[c,d]=C.useState(!1),[h,p]=C.useState(""),[m,y]=C.useState(!1),[w,g]=C.useState(!1),[x,v]=C.useState(""),[b,_]=C.useState(!1),[S,j]=C.useState(!1),[E,M]=C.useState(null);C.useEffect(()=>{TV().then(I=>{n(I),(I==null?void 0:I.port)!==void 0&&p(String(I.port)),(I==null?void 0:I.projectName)!==void 0&&v(I.projectName)})},[]);const P=async(I,O)=>{const F=t==null?void 0:t.defaultAgents,H={phase:(F==null?void 0:F.phase)??mo.phase,planDraft:(F==null?void 0:F.planDraft)??mo.planDraft,ideaExtend:(F==null?void 0:F.ideaExtend)??mo.ideaExtend,commitSuggest:(F==null?void 0:F.commitSuggest)??mo.commitSuggest,[I]:O};await Kd({defaultAgents:H})&&(n(D=>D&&{...D,defaultAgents:H}),M(I),setTimeout(()=>M(null),2e3))},R=async()=>{const I=Number(h);if(!Number.isInteger(I)||I<=0)return;y(!0);const O=await Kd({port:I});y(!1),O&&(n(F=>F&&{...F,port:I}),g(!0),setTimeout(()=>g(!1),2e3))},A=async()=>{const I=x.trim();if(!I)return;_(!0);const O=await Kd({projectName:I});_(!1),O&&(n(F=>F&&{...F,projectName:I}),v(I),j(!0),setTimeout(()=>j(!1),2e3))},B=async I=>{var H;const O=(H=I.target.files)==null?void 0:H[0];if(!O)return;u(!0);const F=new FileReader;F.onloadend=async()=>{const z=F.result,D=await B5(z);u(!1),D&&(d(!0),o(z),setTimeout(()=>d(!1),2e3))},F.readAsDataURL(O)};return f.jsxs("div",{children:[f.jsx("div",{style:{marginBottom:L[6]},children:f.jsx("h2",{style:{margin:0},children:"Project Info"})}),t===void 0&&f.jsx("p",{children:"Loading…"}),t===null&&f.jsxs(qn,{variant:"warning",children:["No papercamp/config.json found — run ",f.jsx("code",{children:"paper-camp init"})," in this directory first."]}),t&&f.jsxs(Dn,{size:"small",children:[f.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:L[3],paddingBottom:L[3]},children:[f.jsx(zn,{value:x,onChange:I=>v(I.target.value),label:"Project Name"}),f.jsx(re,{variant:"secondary",size:"small",onClick:A,disabled:b||!x.trim()||x.trim()===t.projectName,children:b?"Saving…":"Save"}),f.jsxs(lt,{size:"small",fillColor:"rgba(143, 185, 150, 0.25)",textColor:Te.accentGreenDark,children:["v",t.version]}),S&&f.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),f.jsx(ws,{}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3],paddingBottom:L[3],paddingTop:L[3]},children:[a&&f.jsx("img",{src:a,alt:"Project icon",style:{width:40,height:40,objectFit:"contain",flexShrink:0,borderRadius:4}}),f.jsxs("div",{children:[f.jsx("input",{ref:e,type:"file",accept:".svg,.png,.jpg,.jpeg,.gif,.webp",onChange:B,style:{display:"none"}}),f.jsx(re,{variant:"secondary",size:"small",onClick:()=>{var I;return(I=e.current)==null?void 0:I.click()},disabled:l,children:l?"Uploading…":"Choose File"}),c&&f.jsx("span",{className:"text-sm",style:{opacity:.6,marginLeft:L[2]},children:"Saved"}),i&&f.jsx("p",{className:"text-sm",style:{opacity:.5,margin:`${L[1]} 0 0`},children:"Loading…"}),!i&&!a&&!l&&f.jsx("p",{className:"text-sm",style:{opacity:.45,margin:`${L[1]} 0 0`},children:"No icon set."})]})]}),f.jsx(ws,{}),f.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:L[3],paddingBottom:L[3],paddingTop:L[3]},children:[f.jsx(zn,{type:"number",value:h,onChange:I=>p(I.target.value),label:"Port",helperText:"Default for `paper-camp dev`. Does not affect the running server."}),f.jsx(re,{variant:"secondary",size:"small",onClick:R,disabled:m||!h,children:m?"Saving…":"Save"}),w&&f.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]}),f.jsx(ws,{}),X0.map((I,O)=>{var F;return f.jsx(IV,{taskKey:I,agentConfig:((F=t.defaultAgents)==null?void 0:F[I])??mo[I],isLast:O===X0.length-1,onSave:P,isSaved:E===I},I)})]}),f.jsxs("p",{style:{opacity:.45,fontSize:me.sm,marginTop:L[4]},children:[f.jsx("strong",{children:"Initialized:"})," ",t?new Date(t.initializedAt).toLocaleString():"—"]})]})},NV=e=>{try{const t=JSON.parse(e);return!t.scripts||typeof t.scripts!="object"?null:Object.entries(t.scripts).map(([n,r])=>({name:n,command:r}))}catch{return null}},zV=({fileName:e})=>{const[t,n]=C.useState(null),[r,i]=C.useState(!0);if(C.useEffect(()=>{i(!0),MV(e).then(o=>{n(o),i(!1)})},[e]),r)return f.jsx("p",{children:"Loading…"});if(t===null)return f.jsxs(qn,{variant:"warning",children:["Could not load file — ",e," not found."]});const s=e==="package.json"?NV(t):null;return f.jsxs("div",{children:[f.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:L[4]},children:f.jsx("h2",{style:{margin:0},children:e})}),s?f.jsx(Sa,{data:s,columns:[{key:"name",header:"Script",cell:o=>f.jsx("span",{style:{fontFamily:se.mono},children:o.name}),width:4},{key:"command",header:"Command",cell:o=>f.jsx("span",{style:{fontFamily:se.mono},children:o.command})}]}):f.jsx(fD,{code:t,filename:e})]})},Z0=e=>/key|secret|token|password/i.test(e),OV=()=>{const[e,t]=C.useState(!0),[n,r]=C.useState([]),[i,s]=C.useState([]),[o,a]=C.useState(new Set),[l,u]=C.useState(!1),[c,d]=C.useState(!1),[h,p]=C.useState(null);C.useEffect(()=>{FS().then(b=>{r(b.entries),s(b.missingKeys),t(!1)})},[]);const m=(b,_)=>{r(S=>S.map((j,E)=>E===b?{...j,..._}:j))},y=()=>r(b=>[...b,{key:"",value:""}]),w=b=>{r(_=>[..._,{key:b,value:""}]),s(_=>_.filter(S=>S!==b))},g=b=>{r(_=>_.filter((S,j)=>j!==b)),a(_=>{const S=new Set(_);return S.delete(b),S})},x=b=>a(_=>{const S=new Set(_);return S.has(b)?S.delete(b):S.add(b),S}),v=async()=>{const b=n.map(j=>({key:j.key.trim(),value:j.value})).filter(j=>j.key.length>0);if(new Set(b.map(j=>j.key)).size!==b.length){p("Duplicate keys are not allowed");return}p(null),u(!0);const S=await AV(b);u(!1),S?(r(b),d(!0),setTimeout(()=>d(!1),2e3)):p("Failed to save .env")};return e?f.jsx("p",{children:"Loading…"}):f.jsxs("div",{children:[f.jsx("h2",{style:{margin:0,marginBottom:L[4]},children:"Environment Variables"}),h&&f.jsxs(qn,{variant:"warning",children:["Could not save — ",h]}),i.length>0&&f.jsxs(Dn,{size:"small",accent:!0,accentColor:"amber",children:[f.jsx("p",{style:{margin:0,fontWeight:600},children:"Missing from .env"}),f.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:L[2],alignItems:"center"},children:[f.jsx("span",{children:"Present in .env.example but not set:"}),i.map(b=>f.jsxs(re,{variant:"secondary",size:"small",onClick:()=>w(b),children:["+ ",b]},b))]})]}),f.jsx(Sa,{data:n,columns:[{key:"key",header:"Key",cell:(b,_)=>f.jsx(zn,{value:b.key,placeholder:"KEY",style:{fontFamily:se.mono},onChange:S=>m(_,{key:S.target.value})}),width:6},{key:"value",header:"Value",cell:(b,_)=>{const S=Z0(b.key)&&!o.has(_);return f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[2]},children:[f.jsx(zn,{type:S?"password":"text",value:b.value,placeholder:"value",style:{fontFamily:se.mono,flex:1},onChange:j=>m(_,{value:j.target.value})}),Z0(b.key)&&f.jsx(re,{variant:"ghost",size:"small",onClick:()=>x(_),children:S?"Show":"Hide"})]})}},{key:"actions",header:"",width:2,cell:(b,_)=>f.jsx(Ot,{icon:f.jsx(Oi,{}),variant:"ghost",size:"small",label:"Remove variable",onClick:()=>g(_)})}]}),f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:L[3],marginTop:L[4]},children:[f.jsx(re,{variant:"secondary",size:"small",onClick:y,children:"+ Add variable"}),f.jsx(re,{variant:"primary",size:"small",onClick:v,disabled:l,children:l?"Saving…":"Save"}),c&&f.jsx("span",{className:"text-sm",style:{opacity:.6},children:"Saved"})]})]})},BV=()=>{const e=G(t=>t.activeSettingsSection);return f.jsxs("div",{children:[f.jsx(xn,{children:"Settings"}),e==="general"&&f.jsx(DV,{}),e==="env"&&f.jsx(OV,{}),e.startsWith("config:")&&f.jsx(zV,{fileName:e.slice(7)})]})},FV=()=>{const e=G(o=>o.activeSettingsSection),t=G(o=>o.setActiveSettingsSection),n=G(o=>o.settingsConfigFiles),r=G(o=>o.setSettingsConfigFiles),[i,s]=C.useState(!1);return C.useEffect(()=>{RV().then(r),FS().then(o=>s(o.exists||o.exampleExists))},[r]),f.jsxs(f.Fragment,{children:[f.jsx(rn,{label:"General",children:f.jsx(Xn,{size:"small",active:e==="general",onClick:()=>t("general"),children:"Project Info"})}),i&&f.jsx(rn,{label:"Environment",children:f.jsx(Xn,{size:"small",active:e==="env",onClick:()=>t("env"),children:"Env Vars"})}),n.length>0&&f.jsx(rn,{label:"Config Files",children:n.map(o=>f.jsx(Xn,{size:"small",active:e===`config:${o}`,onClick:()=>t(`config:${o}`),children:o},o))})]})},J0=[{id:"plans",label:"Plans",path:"/"},{id:"review",label:"Review",path:"/review"},{id:"docs",label:"Docs",path:"/docs"},{id:"settings",label:"Settings",path:"/settings"}],$S="stack-open";function $V(){try{return localStorage.getItem($S)==="true"}catch{return!1}}function VV(e){try{localStorage.setItem($S,String(e))}catch{}}const UV=()=>{var h;const e=Fs(),t=Lp({select:p=>p.location.pathname}),n=G(p=>p.loadPlans),r=G(p=>p.loadIdeas),i=G(p=>p.setActivePlanTitle),s=G(p=>p.setActiveIdeaTitle),o=(h=J0.find(p=>p.path===t))==null?void 0:h.id,[a,l]=C.useState($V),[u,c]=C.useState(!1),d=pc();return C.useEffect(()=>{n(),r()},[n,r]),C.useEffect(()=>{i(null),s(null),c(!1)},[t,i,s]),f.jsxs(Wz,{children:[f.jsx("div",{className:`h-screen box-border ${a?"min-[1440px]:pr-[480px]":""}`,children:f.jsx(xI,{background:{texture:"paper",ruledType:"grid",ruledColor:"blue"},showHeader:!0,showSidebar:!1,showPage:!1,bleedBottom:!0,headerActions:f.jsxs(f.Fragment,{children:[f.jsx(Ot,{variant:"ghost",size:"small",className:"lg:hidden",label:"Open sidebar",onClick:()=>c(!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(V5,{size:"sm"}),f.jsx("div",{className:"flex-1"}),f.jsx("nav",{"aria-label":"Main navigation",className:"flex items-center gap-1",children:J0.map(p=>f.jsx(re,{variant:"ghost",size:"small",isActive:p.id===o,onClick:()=>e({to:p.path}),"aria-current":p.id===o?"page":void 0,children:p.label},p.id))})]}),children:f.jsx("div",{className:"flex h-full min-h-0 justify-center items-stretch box-border overflow-hidden",children:f.jsxs("div",{className:"flex h-full min-h-0 w-full",style:{gap:Bl.contentGap},children:[f.jsxs(U5,{routeKey:t,mobileOpen:u,onMobileClose:()=>c(!1),children:[t==="/"&&f.jsx(PV,{}),t==="/review"&&f.jsx(jV,{}),t==="/docs"&&f.jsx(G$,{}),t==="/settings"&&f.jsx(FV,{})]}),f.jsx("div",{className:"flex flex-1 flex-col min-h-0 min-w-0",children:f.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:f.jsx($k,{texture:{texture:"parchment"},style:{height:"auto"},children:f.jsx(fc,{mode:"wait",children:f.jsx(Ds.div,{initial:d?void 0:{opacity:0,y:8},animate:{opacity:1,y:0},exit:d?void 0:{opacity:0,y:-8},transition:{duration:d?0:.2,ease:"easeOut"},children:f.jsx(Vw,{})},t)})})})})]})})})}),f.jsx(B$,{open:a,onToggle:()=>{const p=!a;VV(p),l(p)}})]})},Ta=oj({component:UV}),WV=ac({getParentRoute:()=>Ta,path:"/",component:kV}),HV=ac({getParentRoute:()=>Ta,path:"/review",component:EV}),KV=ac({getParentRoute:()=>Ta,path:"/docs",component:H$}),GV=ac({getParentRoute:()=>Ta,path:"/settings",component:BV}),QV=Ta.addChildren([WV,HV,KV,GV]),YV=yj({routeTree:QV}),VS=document.getElementById("root");if(!VS)throw new Error("#root element not found");fw(VS).render(f.jsx(C.StrictMode,{children:f.jsx(wj,{router:YV})}));
216
+ //# sourceMappingURL=main-BN5y2u1i.js.map