@we8/admin-app 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # @we8/admin-app
2
+
3
+ `@we8/admin-app` is the admin portal of a we8 site: a React and Vite
4
+ single-page application that signs in against the CMS worker's embedded Better
5
+ Auth and speaks only its standalone API. It has no server of its own and no
6
+ dependency on anything at we8.io.
7
+
8
+ It is workspace-first. The signed-in user lands on a chooser with live pulses
9
+ rather than a dashboard, and enters Engagement (overview, inbox, forms,
10
+ contacts, consent), Content (posts and their versions, authors, media), or
11
+ Website (SEO and AEO, llms.txt), with Setup as the quieter fourth door (general
12
+ settings, users, API keys, integrations). The npm name is `@we8/admin-app`
13
+ because the directory is `packages/admin`; both refer to the same portal.
14
+
15
+ ## Requirements
16
+
17
+ - Nothing at runtime: this package ships the portal prebuilt in `dist/`. React
18
+ and the rest of the toolchain are development dependencies of this package,
19
+ not of yours.
20
+ - A `@we8/cms` of the same version to serve it and to talk to: copy `dist/`
21
+ into the worker's asset directory (a scaffolded project has `npm run
22
+ admin:bundle` for exactly this).
23
+ ## Local development
24
+
25
+ The portal needs the CMS running. In `packages/cms`:
26
+
27
+ ```sh
28
+ cp .dev.vars.example .dev.vars # then set a real BETTER_AUTH_SECRET
29
+ npm run db:migrate
30
+ npm run db:seed
31
+ npm run dev # http://localhost:8787
32
+ ```
33
+
34
+ Then here:
35
+
36
+ ```sh
37
+ npm run dev # http://localhost:5174
38
+ ```
39
+
40
+ The dev server proxies `/v1` and `/api` to the CMS, so the app cannot tell the
41
+ difference between development and production. `WE8_CMS_URL` points the proxy
42
+ at a CMS on another port.
43
+
44
+ On a fresh database the portal opens on "create the owner account": the CMS
45
+ opens public sign-up exactly once, and the first account created becomes the
46
+ owner.
47
+
48
+ ## Serving it in production
49
+
50
+ The CMS worker serves this bundle from its own origin, which is what lets the
51
+ session cookie work with nothing cross-origin:
52
+
53
+ ```sh
54
+ npm run build --workspace @we8/admin-app
55
+ npm run admin:bundle --workspace @we8/cms
56
+ ```
57
+
58
+ ## Scripts
59
+
60
+ `dev`, `build`, `preview`, `typecheck`, `test`.
61
+
62
+ ## Architecture
63
+
64
+ [docs/admin.md](https://github.com/reveriext/we8-package/blob/main/docs/admin.md) is the living document: the shell and its
65
+ navigation contract, the auth flow including the first run, the role gate, the
66
+ data layer, the screens, and the serving model. The experience it implements is
67
+ [docs/admin-experience.md](https://github.com/reveriext/we8-package/blob/main/docs/admin-experience.md).
@@ -0,0 +1 @@
1
+ :root{--ink:#2f2f2d;--ink-soft:#5c5c58;--mut:#86867f;--line:#d9d6d0;--bg:#f6f5f3;--card:#fff;--soft:#efedea;--accent:#1f1f1f;--accent-ink:#fff;--danger:#9a3324;--ok:#3f6212;--radius:9px;--radius-sm:7px}*{box-sizing:border-box;margin:0}html,body,#root{height:100%}body{background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased;font:14px/1.5 ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif}a{color:inherit}button,input,select,textarea{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.app-head{border-bottom:1px solid var(--line);background:var(--card);justify-content:space-between;align-items:center;gap:16px;padding:12px 20px;display:flex}.app-head .site{font-weight:650}.app-head .crumb{color:var(--mut);font-size:12.5px;font-weight:400}.app-head .right{color:var(--mut);align-items:center;gap:12px;font-size:13px;display:flex}.ws{flex:1;min-height:0;display:flex}.shell{flex-direction:column;min-height:100%;display:flex}.rail{border-right:1px solid var(--line);background:#fbfaf9;flex-direction:column;flex-shrink:0;width:200px;padding:14px 10px;display:flex}.rail .wsname{text-transform:uppercase;letter-spacing:.08em;color:var(--mut);padding:0 8px 10px;font-size:11px}.rail a{border-radius:var(--radius-sm);color:var(--ink);align-items:center;gap:9px;padding:7px 10px;font-size:13.5px;text-decoration:none;display:flex}.rail a:hover{background:var(--soft)}.rail a.on{background:var(--soft);font-weight:600}.rail .glyph{letter-spacing:.04em;color:var(--mut);border:1px solid var(--line);text-align:center;border-radius:5px;flex-shrink:0;width:22px;padding:2px 0;font-size:9.5px;font-weight:700}.rail a.on .glyph{color:var(--ink);border-color:var(--mut)}.rail .label{flex:1}.rail .back{color:var(--mut);margin-top:auto;padding-top:14px;font-size:12.5px}.main{flex:1;min-width:0;padding:20px 24px 48px}.page-head{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px;display:flex}.page-head h2{font-size:17px;font-weight:650}.page-head .sub{color:var(--mut);max-width:70ch;margin-top:3px;font-size:12.5px}.toolbar{flex-wrap:wrap;flex-shrink:0;align-items:center;gap:8px;display:flex}.chooser{padding:48px 32px 56px}.chooser h1{text-align:center;font-size:22px;font-weight:600}.chooser .sub{text-align:center;color:var(--mut);margin:6px 0 30px}.doors{grid-template-columns:repeat(3,1fr);gap:14px;max-width:880px;margin:0 auto;display:grid}.door{border:1px solid var(--line);border-radius:var(--radius);background:var(--card);min-height:200px;color:inherit;flex-direction:column;padding:20px;text-decoration:none;display:flex}.door:hover{border-color:var(--mut)}.door .glyph{border:1.5px solid var(--line);border-radius:var(--radius-sm);width:30px;height:30px;color:var(--mut);justify-content:center;align-items:center;margin-bottom:12px;font-size:10px;font-weight:700;display:flex}.door h2{font-size:16px;font-weight:650}.door .blurb{color:var(--mut);flex:1;margin-top:3px;font-size:13px}.door .pulse{flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px;font-size:12px;display:flex}.door .pulse.quiet{color:var(--mut);margin-top:4px}.door .open{margin-top:12px;font-size:13px;font-weight:600}.setup-row{border:1px dashed var(--line);border-radius:var(--radius);max-width:880px;color:var(--mut);background:var(--soft);justify-content:space-between;align-items:center;gap:16px;margin:18px auto 0;padding:12px 18px;font-size:13px;text-decoration:none;display:flex}.setup-row:hover{border-color:var(--mut)}.setup-row b{color:var(--ink)}.badge{background:var(--accent);color:var(--accent-ink);border-radius:999px;padding:1px 7px;font-size:11px;font-weight:600}.chip{border:1px solid var(--line);color:var(--mut);white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:11px}.chip.pub{background:var(--soft);color:var(--ink)}.chip.new{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.btn{border:1px solid var(--line);background:var(--card);border-radius:var(--radius-sm);cursor:pointer;align-items:center;gap:6px;padding:6px 12px;font-size:12.5px;text-decoration:none;display:inline-flex}.btn:hover:not(:disabled){border-color:var(--mut)}.btn:disabled{opacity:.5;cursor:default}.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.btn.danger{color:var(--danger)}.btn.link{color:var(--ink-soft);background:0 0;border:0;padding:2px 0;text-decoration:underline}.stats{grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px;display:grid}.stat{border:1px solid var(--line);border-radius:var(--radius);background:var(--card);padding:12px 14px}.stat .n{font-size:20px;font-weight:650}.stat .l{color:var(--mut);font-size:12px}.panelgrid{grid-template-columns:1fr 1fr;gap:10px;display:grid}.panel{border:1px solid var(--line);border-radius:var(--radius);background:var(--card);padding:12px 14px}.panel h3{margin-bottom:8px;font-size:12.5px;font-weight:600}.panel .note{color:var(--mut);font-size:12px}.rowline{color:var(--mut);border-top:1px dashed var(--soft);justify-content:space-between;gap:12px;padding:4px 0;font-size:12.5px;display:flex}.rowline:first-of-type{border-top:0}.rowline .k{color:var(--ink);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.spark{border:1px solid var(--line);border-radius:var(--radius);background:var(--card);align-items:flex-end;gap:3px;height:54px;margin-bottom:14px;padding:6px 10px;display:flex}.spark i{background:var(--line);border-radius:2px 2px 0 0;flex:1;min-width:3px;max-width:16px;display:block}.spark.mini{background:0 0;height:34px;margin:8px 0 0;padding:4px 6px}table.wire{border-collapse:collapse;background:var(--card);width:100%;font-size:13px}table.wire th{text-align:left;text-transform:uppercase;letter-spacing:.06em;color:var(--mut);border-bottom:1px solid var(--line);padding:8px 10px;font-size:11.5px;font-weight:600}table.wire td{border-bottom:1px solid var(--soft);vertical-align:top;padding:9px 10px}table.wire tr.clickable:hover td{background:var(--soft);cursor:pointer}table.wire td.right,table.wire th.right{text-align:right}.muted{color:var(--mut)}.truncate{text-overflow:ellipsis;white-space:nowrap;max-width:42ch;display:block;overflow:hidden}.placeholder{border:1.5px dashed var(--line);border-radius:var(--radius);color:var(--mut);background:var(--card);padding:28px 22px;font-size:13px}.placeholder h3{color:var(--ink);margin-bottom:6px;font-size:13.5px;font-weight:600}.placeholder p{max-width:62ch}.notice{border:1px solid var(--line);border-radius:var(--radius);background:var(--soft);margin-bottom:12px;padding:10px 12px;font-size:12.5px}.notice.bad{color:var(--danger);border-color:var(--danger);background:var(--card)}.notice.good{color:var(--ok);border-color:var(--ok);background:var(--card)}.notice code{word-break:break-all;color:var(--ink);margin-top:6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;display:block}.field{flex-direction:column;gap:5px;margin-bottom:14px;display:flex}.field>label{font-size:12.5px;font-weight:600}.field .hint{color:var(--mut);max-width:72ch;font-size:12px}.field input[type=text],.field input[type=email],.field input[type=password],.field input[type=number],.field input[type=url],.field select,.field textarea{border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--card);width:100%;padding:7px 10px}.field textarea{resize:vertical;min-height:90px;font-family:inherit}.field textarea.tall{min-height:260px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px}.field .check{align-items:center;gap:8px;font-size:13px;font-weight:400;display:flex}.form-grid{grid-template-columns:1fr 1fr;gap:0 14px;display:grid}.form-actions{align-items:center;gap:8px;margin-top:6px;display:flex}.split{grid-template-columns:1.4fr 1fr;align-items:start;gap:12px;display:grid}.editor-split{grid-template-columns:minmax(0,2fr) minmax(240px,1fr);align-items:start;gap:16px;display:grid}.intgrid{grid-template-columns:1fr 1fr;gap:10px;display:grid}.int{border:1px solid var(--line);border-radius:var(--radius);background:var(--card);justify-content:space-between;align-items:center;gap:12px;padding:14px;display:flex}.int .name{font-size:13.5px;font-weight:600}.int .desc{color:var(--mut);margin-top:2px;font-size:12px}.on-pill{background:var(--soft);border:1px solid var(--line);white-space:nowrap;border-radius:999px;padding:2px 9px;font-size:11px}.on-pill.ok{color:var(--ink);background:#e4e2de;font-weight:600}.media-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;display:grid}.media-card{border:1px solid var(--line);border-radius:var(--radius);background:var(--card);flex-direction:column;display:flex;overflow:hidden}.media-card .thumb{background:var(--soft);height:110px;color:var(--mut);justify-content:center;align-items:center;font-size:11px;display:flex;overflow:hidden}.media-card .thumb img{object-fit:cover;width:100%;height:100%}.media-card .meta{flex-direction:column;gap:4px;padding:8px 10px;font-size:12px;display:flex}.auth-screen{justify-content:center;align-items:center;min-height:100%;padding:24px;display:flex}.auth-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);width:100%;max-width:400px;padding:24px}.auth-card h1{font-size:18px;font-weight:650}.auth-card .sub{color:var(--mut);margin:4px 0 18px;font-size:13px}.auth-card .alt{color:var(--mut);justify-content:space-between;gap:12px;margin-top:14px;font-size:12.5px;display:flex}.centered-note{text-align:center;color:var(--mut);padding:48px 24px;font-size:13px}@media (width<=900px){.doors,.stats,.panelgrid,.intgrid,.split,.editor-split,.form-grid{grid-template-columns:1fr}.ws{flex-direction:column}.rail{border-right:0;border-bottom:1px solid var(--line);flex-flow:wrap;align-items:center;width:100%}.rail .wsname{width:100%;padding-bottom:6px}.rail .back{margin-top:0;padding-top:7px}}
@@ -0,0 +1,13 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function ne(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return ne(e.type,t,e.props)}function w(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ie(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ae=/\/+/g;function oe(e,t){return typeof e==`object`&&e&&e.key!=null?ie(``+e.key):t.toString(36)}function T(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function se(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,se(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+oe(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(ae,`$&/`)+`/`),se(o,r,i,``,function(e){return e})):o!=null&&(w(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ae,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u<e.length;u++)a=e[u],s=l+oe(a,u),c+=se(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+oe(a,u++),c+=se(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return se(T(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ce(e,t,n){if(e==null)return e;var r=[],i=0;return se(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function le(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var E=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},D={map:ce,forEach:function(e,t,n){ce(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ce(e,function(){t++}),t},toArray:function(e){return ce(e,function(e){return e})||[]},only:function(e){if(!w(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=D,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!te.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ne(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)te.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ne(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=w,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:le}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(S,E)}catch(e){E(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.8`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,ee||(ee=!0,w());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}}var ee=!1,S=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<C)}function re(){if(g=!1,ee){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(S),S=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?w():ee=!1}}}var w;if(typeof y==`function`)w=function(){y(re)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=re,w=function(){ae.postMessage(null)}}else w=function(){_(re,0)};function oe(t,n){S=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,w()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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 s(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 c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),w=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.iterator;function T(e){return typeof e!=`object`||!e?null:(e=oe&&e[oe]||e[`@@iterator`],typeof e==`function`?e:null)}var se=Symbol.for(`react.client.reference`);function ce(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case ie:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case S:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?ce(e.type)||`Memo`:t;case w:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var le=Array.isArray,E=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},de=[],fe=-1;function pe(e){return{current:e}}function me(e){0>fe||(e.current=de[fe],de[fe]=null,fe--)}function O(e,t){fe++,de[fe]=e.current,e.current=t}var he=pe(null),ge=pe(null),_e=pe(null),ve=pe(null);function ye(e,t){switch(O(_e,t),O(ge,e),O(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}me(he),O(he,e)}function be(){me(he),me(ge),me(_e)}function xe(e){e.memoizedState!==null&&O(ve,e);var t=he.current,n=Hd(t,e.type);t!==n&&(O(ge,e),O(he,n))}function Se(e){ge.current===e&&(me(he),me(ge)),ve.current===e&&(me(ve),Qf._currentValue=ue)}var Ce,we;function Te(e){if(Ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||``,we=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+Ce+e+we}var Ee=!1;function De(e,t){if(!e||Ee)return``;Ee=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ee=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Te(n):``}function Oe(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te(`Lazy`);case 13:return e.child!==t&&t!==null?Te(`Suspense Fallback`):Te(`Suspense`);case 19:return Te(`SuspenseList`);case 0:case 15:return De(e.type,!1);case 11:return De(e.type.render,!1);case 1:return De(e.type,!0);case 31:return Te(`Activity`);default:return``}}function ke(e){try{var t=``,n=null;do t+=Oe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Ae=Object.prototype.hasOwnProperty,je=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,Ne=t.unstable_shouldYield,Pe=t.unstable_requestPaint,Fe=t.unstable_now,Ie=t.unstable_getCurrentPriorityLevel,Le=t.unstable_ImmediatePriority,Re=t.unstable_UserBlockingPriority,ze=t.unstable_NormalPriority,Be=t.unstable_LowPriority,Ve=t.unstable_IdlePriority,He=t.log,Ue=t.unstable_setDisableYieldValue,We=null,Ge=null;function Ke(e){if(typeof He==`function`&&Ue(e),Ge&&typeof Ge.setStrictMode==`function`)try{Ge.setStrictMode(We,e)}catch{}}var qe=Math.clz32?Math.clz32:Xe,Je=Math.log,Ye=Math.LN2;function Xe(e){return e>>>=0,e===0?32:31-(Je(e)/Ye|0)|0}var Ze=256,Qe=262144,$e=4194304;function et(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function tt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=et(n))):i=et(o):i=et(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=et(n))):i=et(o)):i=et(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function nt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function it(){var e=$e;return $e<<=1,!($e&62914560)&&($e=4194304),e}function at(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function st(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-qe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ct(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ct(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function lt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ut(e,t){var n=t&-t;return n=n&42?1:dt(n),(n&(e.suspendedLanes|t))===0?n:0}function dt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ft(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function pt(){var e=D.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function mt(e,t){var n=D.p;try{return D.p=e,t()}finally{D.p=n}}var ht=Math.random().toString(36).slice(2),gt=`__reactFiber$`+ht,_t=`__reactProps$`+ht,vt=`__reactContainer$`+ht,yt=`__reactEvents$`+ht,bt=`__reactListeners$`+ht,xt=`__reactHandles$`+ht,St=`__reactResources$`+ht,Ct=`__reactMarker$`+ht;function wt(e){delete e[gt],delete e[_t],delete e[yt],delete e[bt],delete e[xt]}function Tt(e){var t=e[gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[gt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function Et(e){if(e=e[gt]||e[vt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ot(e){var t=e[St];return t||=e[St]={hoistableStyles:new Map,hoistableScripts:new Map},t}function kt(e){e[Ct]=!0}var At=new Set,jt={};function Mt(e,t){Nt(e,t),Nt(e+`Capture`,t)}function Nt(e,t){for(jt[e]=t,e=0;e<t.length;e++)At.add(t[e])}var Pt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ft={},It={};function Lt(e){return Ae.call(It,e)?!0:Ae.call(Ft,e)?!1:Pt.test(e)?It[e]=!0:(Ft[e]=!0,!1)}function Rt(e,t,n){if(Lt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function k(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function zt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Bt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Vt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ht(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ut(e){if(!e._valueTracker){var t=Vt(e)?`checked`:`value`;e._valueTracker=Ht(e,t,``+e[t])}}function Wt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Vt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Gt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Kt=/[\n"\\]/g;function qt(e){return e.replace(Kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Jt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Bt(t)):e.value!==``+Bt(t)&&(e.value=``+Bt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Xt(e,o,Bt(n)):Xt(e,o,Bt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Bt(s):e.removeAttribute(`name`)}function Yt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ut(e);return}n=n==null?``:``+Bt(n),t=t==null?n:``+Bt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ut(e)}function Xt(e,t,n){t===`number`&&Gt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Zt(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=``+Bt(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 Qt(e,t,n){if(t!=null&&(t=``+Bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Bt(n)}function $t(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(le(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Bt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ut(e)}function en(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function nn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||tn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function rn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&nn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&nn(e,o,t[o])}function an(e){if(e.indexOf(`-`)===-1)return!1;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 on=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),sn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function cn(e){return sn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function ln(){}var un=null;function dn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fn=null,pn=null;function mn(e){var t=Et(e);if(t&&(e=t.stateNode)){var n=e[_t]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Jt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+qt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[_t]||null;if(!a)throw Error(i(90));Jt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Wt(r)}break a;case`textarea`:Qt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Zt(e,!!n.multiple,t,!1)}}}var hn=!1;function gn(e,t,n){if(hn)return e(t,n);hn=!0;try{return e(t)}finally{if(hn=!1,(fn!==null||pn!==null)&&(bu(),fn&&(t=fn,e=pn,pn=fn=null,mn(t),e)))for(t=0;t<e.length;t++)mn(e[t])}}function _n(e,t){var n=e.stateNode;if(n===null)return null;var r=n[_t]||null;if(r===null)return null;n=r[t];a: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 a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var vn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),yn=!1;if(vn)try{var bn={};Object.defineProperty(bn,"passive",{get:function(){yn=!0}}),window.addEventListener(`test`,bn,bn),window.removeEventListener(`test`,bn,bn)}catch{yn=!1}var xn=null,Sn=null,Cn=null;function wn(){if(Cn)return Cn;var e,t=Sn,n=t.length,r,i=`value`in xn?xn.value:xn.textContent,a=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[a-r];r++);return Cn=i.slice(e,1<r?1-r:void 0)}function Tn(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 En(){return!0}function Dn(){return!1}function On(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?En:Dn,this.isPropagationStopped=Dn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=En)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=En)},persist:function(){},isPersistent:En}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=On(kn),A=h({},kn,{view:0,detail:0}),jn=On(A),Mn,Nn,Pn,Fn=h({},A,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kn,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!==Pn&&(Pn&&e.type===`mousemove`?(Mn=e.screenX-Pn.screenX,Nn=e.screenY-Pn.screenY):Nn=Mn=0,Pn=e),Mn)},movementY:function(e){return`movementY`in e?e.movementY:Nn}}),In=On(Fn),Ln=On(h({},Fn,{dataTransfer:0})),Rn=On(h({},A,{relatedTarget:0})),zn=On(h({},kn,{animationName:0,elapsedTime:0,pseudoElement:0})),Bn=On(h({},kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Vn=On(h({},kn,{data:0})),Hn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Un={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`},Wn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wn[e])?!!t[e]:!1}function Kn(){return Gn}var qn=On(h({},A,{key:function(e){if(e.key){var t=Hn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Tn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Un[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kn,charCode:function(e){return e.type===`keypress`?Tn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Tn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Jn=On(h({},Fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Yn=On(h({},A,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kn})),Xn=On(h({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Zn=On(h({},Fn,{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})),Qn=On(h({},kn,{newState:0,oldState:0})),$n=[9,13,27,32],er=vn&&`CompositionEvent`in window,tr=null;vn&&`documentMode`in document&&(tr=document.documentMode);var nr=vn&&`TextEvent`in window&&!tr,rr=vn&&(!er||tr&&8<tr&&11>=tr),ir=` `,ar=!1;function or(e,t){switch(e){case`keyup`:return $n.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function sr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var cr=!1;function lr(e,t){switch(e){case`compositionend`:return sr(t);case`keypress`:return t.which===32?(ar=!0,ir):null;case`textInput`:return e=t.data,e===ir&&ar?null:e;default:return null}}function ur(e,t){if(cr)return e===`compositionend`||!er&&or(e,t)?(e=wn(),Cn=Sn=xn=null,cr=!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 rr&&t.locale!==`ko`?null:t.data;default:return null}}var dr={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 j(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!dr[e.type]:t===`textarea`}function fr(e,t,n,r){fn?pn?pn.push(r):pn=[r]:fn=r,t=Ed(t,`onChange`),0<t.length&&(n=new An(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var pr=null,M=null;function mr(e){yd(e,0)}function hr(e){if(Wt(Dt(e)))return e}function gr(e,t){if(e===`change`)return t}var _r=!1;if(vn){var vr;if(vn){var yr=`oninput`in document;if(!yr){var br=document.createElement(`div`);br.setAttribute(`oninput`,`return;`),yr=typeof br.oninput==`function`}vr=yr}else vr=!1;_r=vr&&(!document.documentMode||9<document.documentMode)}function xr(){pr&&(pr.detachEvent(`onpropertychange`,Sr),M=pr=null)}function Sr(e){if(e.propertyName===`value`&&hr(M)){var t=[];fr(t,M,e,dn(e)),gn(mr,t)}}function Cr(e,t,n){e===`focusin`?(xr(),pr=t,M=n,pr.attachEvent(`onpropertychange`,Sr)):e===`focusout`&&xr()}function wr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return hr(M)}function Tr(e,t){if(e===`click`)return hr(t)}function Er(e,t){if(e===`input`||e===`change`)return hr(t)}function Dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Or=typeof Object.is==`function`?Object.is:Dr;function kr(e,t){if(Or(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)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(!Ae.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function Ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jr(e,t){var n=Ar(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}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ar(n)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gt(e.document)}return t}function Pr(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`)}var Fr=vn&&`documentMode`in document&&11>=document.documentMode,Ir=null,Lr=null,Rr=null,zr=!1;function Br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zr||Ir==null||Ir!==Gt(r)||(r=Ir,`selectionStart`in r&&Pr(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}),Rr&&kr(Rr,r)||(Rr=r,r=Ed(Lr,`onSelect`),0<r.length&&(t=new An(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ir)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Hr={animationend:Vr(`Animation`,`AnimationEnd`),animationiteration:Vr(`Animation`,`AnimationIteration`),animationstart:Vr(`Animation`,`AnimationStart`),transitionrun:Vr(`Transition`,`TransitionRun`),transitionstart:Vr(`Transition`,`TransitionStart`),transitioncancel:Vr(`Transition`,`TransitionCancel`),transitionend:Vr(`Transition`,`TransitionEnd`)},Ur={},Wr={};vn&&(Wr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),`TransitionEvent`in window||delete Hr.transitionend.transition);function Gr(e){if(Ur[e])return Ur[e];if(!Hr[e])return e;var t=Hr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wr)return Ur[e]=t[n];return e}var Kr=Gr(`animationend`),qr=Gr(`animationiteration`),Jr=Gr(`animationstart`),Yr=Gr(`transitionrun`),Xr=Gr(`transitionstart`),Zr=Gr(`transitioncancel`),Qr=Gr(`transitionend`),$r=new Map,ei=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ei.push(`scrollEnd`);function ti(e,t){$r.set(e,t),Mt(t,[e])}var ni=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ri=[],ii=0,ai=0;function oi(){for(var e=ii,t=ai=ii=0;t<e;){var n=ri[t];ri[t++]=null;var r=ri[t];ri[t++]=null;var i=ri[t];ri[t++]=null;var a=ri[t];if(ri[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ui(n,i,a)}}function si(e,t,n,r){ri[ii++]=e,ri[ii++]=t,ri[ii++]=n,ri[ii++]=r,ai|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ci(e,t,n,r){return si(e,t,n,r),di(e)}function li(e,t){return si(e,null,null,t),di(e)}function ui(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function di(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fi={};function pi(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.refCleanup=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 mi(e,t,n,r){return new pi(e,t,n,r)}function hi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gi(e,t){var n=e.alternate;return n===null?(n=mi(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&65011712,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.refCleanup=e.refCleanup,n}function _i(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)hi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,he.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ie:return e=mi(31,n,t,a),e.elementType=ie,e.lanes=o,e;case y:return yi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=mi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case te:return e=mi(13,n,t,a),e.elementType=te,e.lanes=o,e;case ne:return e=mi(19,n,t,a),e.elementType=ne,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case ee:s=9;break a;case C:s=11;break a;case re:s=14;break a;case w:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=mi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function yi(e,t,n,r){return e=mi(7,e,r,t),e.lanes=n,e}function bi(e,t,n){return e=mi(6,e,null,t),e.lanes=n,e}function xi(e){var t=mi(18,null,null,0);return t.stateNode=e,t}function Si(e,t,n){return t=mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ci=new WeakMap;function wi(e,t){if(typeof e==`object`&&e){var n=Ci.get(e);return n===void 0?(t={value:e,source:t,stack:ke(t)},Ci.set(e,t),t):n}return{value:e,source:t,stack:ke(t)}}var Ti=[],Ei=0,Di=null,Oi=0,ki=[],Ai=0,ji=null,Mi=1,Ni=``;function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=Di,Di=e,Oi=t}function Fi(e,t,n){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,ji=e;var r=Mi;e=Ni;var i=32-qe(r)-1;r&=~(1<<i),n+=1;var a=32-qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Mi=1<<32-qe(t)+i|n<<i|r,Ni=a+e}else Mi=1<<a|n<<i|r,Ni=e}function Ii(e){e.return!==null&&(Pi(e,1),Fi(e,1,0))}function Li(e){for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null;for(;e===ji;)ji=ki[--Ai],ki[Ai]=null,Ni=ki[--Ai],ki[Ai]=null,Mi=ki[--Ai],ki[Ai]=null}function Ri(e,t){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,Mi=t.id,Ni=t.overflow,ji=e}var zi=null,N=null,P=!1,Bi=null,F=!1,Vi=Error(i(519));function Hi(e){throw Ji(wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Vi}function Ui(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[gt]=e,t[_t]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),$t(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=ln),t=!0):t=!1,t||Hi(e,!0)}function Wi(e){for(zi=e.return;zi;)switch(zi.tag){case 5:case 31:case 13:F=!1;return;case 27:case 3:F=!0;return;default:zi=zi.return}}function Gi(e){if(e!==zi)return!1;if(!P)return Wi(e),P=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Ud(e.type,e.memoizedProps)),n=!n),n&&N&&Hi(e),Wi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));N=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));N=uf(e)}else t===27?(t=N,Zd(e.type)?(e=lf,lf=null,N=e):N=t):N=zi?cf(e.stateNode.nextSibling):null;return!0}function Ki(){N=zi=null,P=!1}function qi(){var e=Bi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Bi=null),e}function Ji(e){Bi===null?Bi=[e]:Bi.push(e)}var Yi=pe(null),Xi=null,Zi=null;function Qi(e,t,n){O(Yi,t._currentValue),t._currentValue=n}function $i(e){e._currentValue=Yi.current,me(Yi)}function ea(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ta(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ea(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ea(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function na(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Or(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ve.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&ta(t,e,n,r),t.flags|=262144}function ra(e){for(e=e.firstContext;e!==null;){if(!Or(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ia(e){Xi=e,Zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return sa(Xi,e)}function oa(e,t){return Xi===null&&ia(e),sa(e,t)}function sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zi===null){if(e===null)throw Error(i(308));Zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zi=Zi.next=t;return n}var ca=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},la=t.unstable_scheduleCallback,ua=t.unstable_NormalPriority,da={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fa(){return{controller:new ca,data:new Map,refCount:0}}function pa(e){e.refCount--,e.refCount===0&&la(ua,function(){e.controller.abort()})}var ma=null,ha=0,ga=0,_a=null;function va(e,t){if(ma===null){var n=ma=[];ha=0,ga=dd(),_a={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ha++,t.then(ya,ya),t}function ya(){if(--ha===0&&ma!==null){_a!==null&&(_a.status=`fulfilled`);var e=ma;ma=null,ga=0,_a=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ba(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var xa=E.S;E.S=function(e,t){eu=Fe(),typeof t==`object`&&t&&typeof t.then==`function`&&va(e,t),xa!==null&&xa(e,t)};var Sa=pe(null);function Ca(){var e=Sa.current;return e===null?q.pooledCache:e}function wa(e,t){t===null?O(Sa,Sa.current):O(Sa,t.pool)}function Ta(){var e=Ca();return e===null?null:{parent:da._currentValue,pool:e}}var Ea=Error(i(460)),Da=Error(i(474)),Oa=Error(i(542)),ka={then:function(){}};function Aa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ja(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ln,ln),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(ln,ln);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e}throw Na=t,Ea}}function Ma(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Na=e,Ea):e}}var Na=null;function I(){if(Na===null)throw Error(i(459));var e=Na;return Na=null,e}function Pa(e){if(e===Ea||e===Oa)throw Error(i(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),ja(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=gi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=bi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===w&&Ma(i)===t.type)?(t=a(t,n.props),Ra(t,n),t.return=e,t):(t=vi(n.type,n.key,n.props,null,e.mode,r),Ra(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Si(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=yi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=vi(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case v:return t=Si(t,e.mode,n),t.return=e,t;case w:return t=Ma(t),f(e,t,n)}if(le(t)||T(t))return t=yi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===S)return f(e,oa(e,t),n);za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case w:return n=Ma(n),p(e,t,n,r)}if(le(n)||T(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===S)return p(e,t,oa(e,n),r);za(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case w:return r=Ma(r),m(e,t,n,r,i)}if(le(r)||T(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,La(r),i);if(r.$$typeof===S)return m(e,t,n,oa(t,r),i);za(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),P&&Pi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return P&&Pi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),P&&Pi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),P&&Pi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return P&&Pi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),P&&Pi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===w&&Ma(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=yi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=vi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Si(o,e.mode,c),c.return=e,e=c}return s(e);case w:return o=Ma(o),b(e,r,o,c)}if(le(o))return h(e,r,o,c);if(T(o)){if(l=T(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,La(o),c);if(o.$$typeof===S)return b(e,r,oa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=b(e,t,n,r);return Fa=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),L=Ba(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function R(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=di(e),ui(e,null,n),t}return si(e,r,t,n),di(e)}function Ka(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=_a;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===ga&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ha=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Za(n[e],t)}var $a=pe(null),eo=pe(0);function to(e,t){e=Ul,O(eo,e),O($a,t),Ul=e|t.baseLanes}function no(){O(eo,Ul),O($a,$a.current)}function ro(){Ul=eo.current,me($a),me(eo)}var io=pe(null),ao=null;function oo(e){var t=e.alternate;O(z,z.current&1),O(io,e),ao===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(ao=e)}function so(e){O(z,z.current),O(io,e),ao===null&&(ao=e)}function co(e){e.tag===22?(O(z,z.current),O(io,e),ao===null&&(ao=e)):lo(e)}function lo(){O(z,z.current),O(io,io.current)}function uo(e){me(io),ao===e&&(ao=null),me(z)}var z=pe(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){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 po=0,B=null,V=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function H(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Or(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return po=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?zs:Bs,_o=!1,a=n(r,i),_o=!1,go&&(a=To(t,n,r,i)),wo(e),a}function wo(e){E.H=Rs;var t=V!==null&&V.next!==null;if(po=0,mo=V=B=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&ra(e)&&(rc=!0))}function To(e,t,n,r){B=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=V=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}E.H=Vs,o=t(n,r)}while(go);return o}function Eo(){var e=E.H,t=e.useState()[0];return t=typeof t.then==`function`?Mo(t):t,e=e.useState()[0],(V===null?null:V.memoizedState)!==e&&(B.flags|=1024),t}function Do(){var e=vo!==0;return vo=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}po=0,mo=V=B=null,go=!1,yo=vo=0,bo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?B.memoizedState=mo=e:mo=mo.next=e,mo}function U(){if(V===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=V.next;var t=mo===null?B.memoizedState:mo.next;if(t!==null)mo=t,V=e;else{if(e===null)throw B.alternate===null?Error(i(467)):Error(i(310));V=e,e={memoizedState:V.memoizedState,baseState:V.baseState,baseQueue:V.baseQueue,queue:V.queue,next:null},mo===null?B.memoizedState=mo=e:mo=mo.next=e}return mo}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mo(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=ja(bo,e,t),t=B,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?zs:Bs),e}function No(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Mo(e);if(e.$$typeof===S)return aa(e)}throw Error(i(438,String(e)))}function Po(e){var t=null,n=B.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=B.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=jo(),B.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function Fo(e,t){return typeof t==`function`?t(e):t}function Io(e){return Lo(U(),V,e)}function Lo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(po&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ga&&(d=!0);else if((po&p)===p){u=u.next,p===ga&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,B.lanes|=p,Gl|=p;f=u.action,_o&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,B.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Or(o,e.memoizedState)&&(rc=!0,d&&(n=_a,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ro(e){var t=U(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Or(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function zo(e,t,n){var r=B,a=U(),o=P;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Or((V||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,us(Ho.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||po&127||Bo(r,t,n)}return n}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=jo(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Or(e,n)}catch{return!0}}function Wo(e){var t=li(e,2);t!==null&&hu(t,e,2)}function Go(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),_o){Ke(!0);try{n()}finally{Ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Lo(e,V,typeof r==`function`?r:Fo)}function qo(e,t,n,r,a){if(Fs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};E.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=E.T,o={};E.T=o;try{var s=n(i,r),c=E.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),E.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function es(e,t){if(P){var n=q.formState;if(n!==null){a:{var r=B;if(P){if(N){b:{for(var i=N,a=F;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){N=cf(i.nextSibling),r=i.data===`F!`;break a}}Hi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=Ms.bind(null,B,r),r.dispatch=n,r=Go(!1),a=Ps.bind(null,B,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ts(e){return ns(U(),V,e)}function ns(e,t,n){if(t=Lo(e,t,$o)[0],e=Io(Fo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Mo(t)}catch(e){throw e===Ea?Oa:e}else r=t;t=U();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,as(9,{destroy:void 0},rs.bind(null,i,n),null)),[r,a,e]}function rs(e,t){e.action=t}function is(e){var t=U(),n=V;if(n!==null)return ns(t,n,e);U(),t=t.memoizedState,n=U();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function as(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=jo(),B.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function os(){return U().memoizedState}function ss(e,t,n,r){var i=Ao();B.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,r===void 0?null:r)}function cs(e,t,n,r){var i=U();r=r===void 0?null:r;var a=i.memoizedState.inst;V!==null&&r!==null&&So(r,V.memoizedState.deps)?i.memoizedState=as(t,a,n,r):(B.flags|=e,i.memoizedState=as(1|t,a,n,r))}function ls(e,t){ss(8390656,8,e,t)}function us(e,t){cs(2048,8,e,t)}function ds(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=jo(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=U().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return cs(4,2,e,t)}function ms(e,t){return cs(4,4,e,t)}function hs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gs(e,t,n){n=n==null?null:n.concat([e]),cs(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=U();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=U();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),_o){Ke(!0);try{e()}finally{Ke(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||po&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),B.lanes|=e,Gl|=e,n)}function xs(e,t,n,r){return Or(n,t)?n:$a.current===null?!(po&42)||po&1073741824&&!(Y&261930)?(rc=!0,e.memoizedState=n):(e=mu(),B.lanes|=e,Gl|=e,t):(e=bs(e,n,r),Or(e,t)||(rc=!0),e)}function Ss(e,t,n,r,i){var a=D.p;D.p=a!==0&&8>a?a:8;var o=E.T,s={};E.T=s,Ps(e,!1,t,n);try{var c=i(),l=E.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,ba(c,r),pu(e)):Ns(e,t,r,pu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{D.p=a,o!==null&&s.types!==null&&(o.types=s.types),E.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,ue,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:ue},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},pu())}function Ds(){return aa(Qf)}function Os(){return U().memoizedState}function ks(){return U().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=R(n);var r=Ga(t,e,n);r!==null&&(hu(r,t,n),Ka(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ci(e,t,n,r),n!==null&&(hu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,pu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Or(s,o))return si(e,t,i,0),q===null&&oi(),!1}catch{}if(n=ci(e,t,i,r),n!==null)return hu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=ci(e,n,r,2),t!==null&&hu(t,e,2)}function Fs(e){var t=e.alternate;return e===B||t!==null&&t===B}function Is(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}var Rs={readContext:aa,use:No,useCallback:H,useContext:H,useEffect:H,useImperativeHandle:H,useLayoutEffect:H,useInsertionEffect:H,useMemo:H,useReducer:H,useRef:H,useState:H,useDebugValue:H,useDeferredValue:H,useTransition:H,useSyncExternalStore:H,useId:H,useHostTransitionStatus:H,useFormState:H,useActionState:H,useOptimistic:H,useMemoCache:H,useCacheRefresh:H};Rs.useEffectEvent=H;var zs={readContext:aa,use:No,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(_o){Ke(!0);try{e()}finally{Ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(_o){Ke(!0);try{n(t)}finally{Ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(Ao(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,B,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=Ao();if(P){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=q.identifierPrefix;if(P){var n=Ni,r=Mi;n=(r&~(1<<32-qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:es,useActionState:es,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return Ao().memoizedState=As.bind(null,B)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:aa,use:No,useCallback:vs,useContext:aa,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Io,useRef:os,useState:function(){return Io(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(U(),V.memoizedState,e,t)},useTransition:function(){var e=Io(Fo)[0],t=U().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){return Ko(U(),V,e,t)},useMemoCache:Po,useCacheRefresh:ks};Bs.useEffectEvent=fs;var Vs={readContext:aa,use:No,useCallback:vs,useContext:aa,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Ro,useRef:os,useState:function(){return Ro(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){var n=U();return V===null?bs(n,e,t):xs(n,V.memoizedState,e,t)},useTransition:function(){var e=Ro(Fo)[0],t=U().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:is,useActionState:is,useOptimistic:function(e,t){var n=U();return V===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,V,e,t)},useMemoCache:Po,useCacheRefresh:ks};Vs.useEffectEvent=fs;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=R(r);i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(hu(t,e,r),Ka(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=R(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(hu(t,e,r),Ka(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=R(n);r.tag=2,t!=null&&(r.callback=t),t=Ga(e,r,n),t!==null&&(hu(t,e,n),Ka(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!kr(n,r)||!kr(i,a):!0}function Gs(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&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){ni(e)}function Js(e){console.error(e)}function Ys(e){ni(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=R(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=R(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&na(t,n,a,!0),n=io.current,n!==null){switch(n.tag){case 31:case 13:return ao===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(P)return t=io.current,t===null?(r!==Vi&&(t=Error(i(423),{cause:r}),Ji(wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=wi(r,n),a=Qs(e.stateNode,r,a),qa(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Vi&&(e=Error(i(422),{cause:r}),Ji(wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=wi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),qa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),qa(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?L(t,null,n,r):Va(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ia(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(P&&s&&Ii(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!hi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=vi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?kr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=gi(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(kr(a,r)&&e.ref===t.ref){if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wa(t,a===null?null:a.cachePool),a===null?no():to(t,a),co(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&wa(t,null),no(),lo(t)):(wa(t,a.cachePool),to(t,a),lo(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=Ca();return a=a===null?null:{parent:da._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&wa(t,null),no(),co(t),e!==null&&na(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Va(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,uo(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(P){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(so(t),(e=N)?(e=rf(e,F),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,N=null)):e=null,e===null)throw Hi(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(so(t),a){if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(rc||na(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=q,r!==null&&(s=ut(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,li(e,s),hu(r,e,s),nc;Du(),t=fc(e,t,n)}else e=o.treeContext,N=cf(s.nextSibling),zi=t,P=!0,Bi=null,F=!1,e!==null&&Ri(t,e),t=dc(t,r),t.flags|=4096;return t}return e=gi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return ia(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(P&&r&&Ii(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return ia(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!rc?(Oo(e,t,a),kc(e,t,a)):(P&&r&&Ii(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(ia(t),t.stateNode===null){var a=fi,o=n.contextType;typeof o==`object`&&o&&(a=aa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?aa(o):fi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),Xa(t,r,a,i),Ya(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=fi,typeof u==`object`&&u&&(o=aa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Xa(t,r,a,i),Ya(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=Ha||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=fi,typeof l==`object`&&l&&(c=aa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Xa(t,r,a,i),Ya();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&ra(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=Ha||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ra(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return Ki(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:Ta()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(z.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(P){if(a?oo(t):lo(t),(e=N)?(e=rf(e,F),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,N=null)):e=null,e===null)throw Hi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(lo(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=yi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(oo(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(oo(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(lo(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=yi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(lo(t),t.child=e.child,t.flags|=128,t=null);else if(oo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ji({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||na(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=q,s!==null&&(r=ut(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,li(e,r),hu(s,e,r),nc;af(c)||Du(),t=Tc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,N=cf(c.nextSibling),zi=t,P=!0,Bi=null,F=!1,e!==null&&Ri(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(lo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=gi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=yi(c,a,n,null),c.flags|=2):c=gi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=Ta():(l=da._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(oo(t),n=e.child,e=n.sibling,n=gi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=mi(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Va(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ea(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=z.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,O(z,o),ic(e,t,r,n),r=P?Oi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(na(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=gi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=gi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ra(e)))}function jc(e,t,n){switch(t.tag){case 3:ye(t,t.stateNode.containerInfo),Qi(t,da,e.memoizedState.cache),Ki();break;case 27:case 5:xe(t);break;case 4:ye(t,t.stateNode.containerInfo);break;case 10:Qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,so(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(oo(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(oo(t),t.flags|=128,null);oo(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(na(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),O(z,z.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Qi(t,da,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}}else rc=!1,P&&t.flags&1048576&&Fi(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ma(t.elementType),t.type=e,typeof e==`function`)hi(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===C){t.tag=11,t=ac(null,t,e,r,n);break a}if(a===re){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=ce(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(ye(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Xa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Qi(t,da,r),r!==o.cache&&ta(t,[da],n,!0),Ya(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}if(r!==a){a=wi(Error(i(424)),t),Ji(a),t=vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(N=cf(e.firstChild),zi=t,P=!0,Bi=null,F=!0,n=L(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ki(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:P||(n=t.type,e=t.pendingProps,r=Bd(_e.current).createElement(n),r[gt]=t,r[_t]=e,Pd(r,n,e),kt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&P&&(r=t.stateNode=ff(t.type,t.pendingProps,_e.current),zi=t,F=!0,a=N,Zd(t.type)?(lf=a,N=cf(r.firstChild)):N=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&P&&((a=r=N)&&(r=tf(r,t.type,t.pendingProps,F),r===null?a=!1:(t.stateNode=r,zi=t,N=cf(r.firstChild),F=!1,a=!0)),a||Hi(t)),xe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),Qf._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&P&&((e=n=N)&&(n=nf(n,t.pendingProps,F),n===null?e=!1:(t.stateNode=n,zi=t,N=null,e=!0)),e||Hi(t)),null;case 13:return Sc(e,t,n);case 4:return ye(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Qi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ia(t),a=aa(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return ia(t),r=aa(da),e===null?(a=Ca(),a===null&&(a=q,o=fa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Qi(t,da,a)):((e.lanes&n)!==0&&(Wa(e,t),Xa(t,null,null,n),Ya()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Qi(t,da,r),r!==a.cache&&ta(t,[da],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Qi(t,da,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Na=ka,Da}}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t)){if(wu())e.flags|=8192;else throw Na=ka,Da}}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:it(),e.lanes|=t,Yl|=t)}function Lc(e,t){if(!P)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 W(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&65011712,r|=i.flags&65011712,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 Rc(e,t,n){var r=t.pendingProps;switch(Li(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(t),null;case 1:return W(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),$i(da),be(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gi(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qi())),W(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(W(t),Pc(t,a,null,r,n)):(W(t),Fc(t,o))):o?o===e.memoizedState?(W(t),t.flags&=-16777217):(Nc(t),W(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),W(t),Pc(t,a,e,r,n)),null;case 27:if(Se(t),n=_e.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return W(t),null}e=he.current,Gi(t)?Ui(t,e):(e=ff(a,r,n),t.stateNode=e,Nc(t))}return W(t),null;case 5:if(Se(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return W(t),null}if(o=he.current,Gi(t))Ui(t,o);else{var s=Bd(_e.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[gt]=t,o[_t]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return W(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=_e.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=zi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Hi(t,!0)}else e=Bd(e).createTextNode(r),e[gt]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[gt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(i(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[gt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),W(t),null);case 4:return be(),e===null&&Sd(t.stateNode.containerInfo),W(t),null;case 10:return $i(t.type),W(t),null;case 19:if(me(z),r=t.memoizedState,r===null)return W(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Lc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_i(n,e),n=n.sibling;return O(z,z.current&1|2),P&&Pi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Fe()>tu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!P)return W(t),null}else 2*Fe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(W(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Fe(),e.sibling=null,n=z.current,O(z,a?n&1|2:n&1),P&&Pi(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&me(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(da),W(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Li(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(da),be(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(z),null;case 4:return be(),null;case 10:return $i(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&me(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(da),null;case 25:return null;default:return null}}function Bc(e,t){switch(Li(t),t.tag){case 3:$i(da),be();break;case 26:case 27:case 5:Se(t);break;case 4:be();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:me(z);break;case 10:$i(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&me(Sa);break;case 24:$i(da)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){Z(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[_t]=t}catch(t){Z(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ln));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(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&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[gt]=e,t[_t]=n}catch(t){Z(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=Nr(e),Pr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Vc(5,n);break;case 1:if(bl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(bl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Qa(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:bl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Sl(e,n,!!(n.subtreeFlags&8772)):bl(e,n),el=i,tl=a}break;case 30:break;default:bl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var G=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Ge&&typeof Ge.onCommitFiberUnmount==`function`)try{Ge.onCommitFiberUnmount(We,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=G,i=cl;Zd(n.type)&&(G=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),G=r,cl=i;break;case 5:tl||Kc(n,t);case 6:if(r=G,i=cl,G=null,ll(e,t,n),G=r,cl=i,G!==null){if(cl)try{(G.nodeType===9?G.body:G.nodeName===`HTML`?G.ownerDocument.body:G).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{G.removeChild(n.stateNode)}catch(e){Z(n,t,e)}}break;case 18:G!==null&&(cl?(e=G,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(G,n.stateNode));break;case 4:r=G,i=cl,G=n.stateNode.containerInfo,cl=!0,ll(e,t,n),G=r,cl=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ll(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ll(e,t,n),tl=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){G=c.stateNode,cl=!1;break a}break;case 5:G=c.stateNode,cl=!1;break a;case 3:case 4:G=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(G===null)throw Error(i(160));ul(o,s,a),G=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gl;if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[Ct]||o[gt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[gt]=e,kt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[gt]=e,kt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode)}else e.stateNode=If(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{en(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}nl&&(nl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Fe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,hl(t,e),tl=d,el=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(en(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),xl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Kc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),Vc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Za(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Gc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&pa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Vc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Ll={getCacheForType:function(e){var t=aa(da),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return aa(da).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:E.T===null?pt():dd()}function mu(){if(Jl===0){if(!(Y&536870912)||P){var e=Qe;Qe<<=1,!(Qe&3932160)&&(Qe=262144),Jl=e}else Jl=536870912}return e=io.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),ot(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||nt(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Fe(),10<a)){if(yu(r,t,Jl,!Bl),tt(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ln},jl(t,a,d);var m=(a&62914560)===a?$l-Fe():(a&4194048)===a?eu-Fe():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Or(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ct(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Zi=Xi=null,ko(e),Fa=null,Ia=0,e=J;for(;e!==null;)Bc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=gi(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=nt(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-qe(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,oi(),n}function Cu(e,t){B=null,E.H=Rs,t===Ea||t===Oa?(t=I(),X=3):t===Da?(t=I(),X=4):X=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Xs(e,wi(t,e.current)))}function wu(){var e=io.current;return e===null?!0:(Y&4194048)===Y?ao===null:(Y&62914560)===Y||Y&536870912?e===ao:!1}function Tu(){var e=E.H;return E.H=Rs,e===null?Rs:e}function Eu(){var e=E.A;return E.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&io.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:io.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Zi=Xi=null,K=r,E.H=i,E.A=a,J===null&&(q=null,Y=0,oi()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Fe()+500,Su(e,t)):Vl=nt(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(Aa(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Aa(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Zi=Xi=null,E.H=r,E.A=a,K=n,J===null?(q=null,Y=0,oi(),Wl):0}function ju(){for(;J!==null&&!Ne();)Mu(J)}function Mu(e){var t=Mc(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:ko(t);default:Bc(n,t),t=J=_i(t,Ul),t=Mc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Zi=Xi=null,ko(t),Fa=null,Ia=0;var i=t.return;try{if(tc(e,i,t,n,Y)){Wl=1,Xs(e,wi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Xs(e,wi(n,e.current)),J=null;return}t.flags&32768?(P||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=io.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Rc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=zc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ai,st(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(ze,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=E.T,E.T=null,a=D.p,D.p=2,s=K,K|=4;try{al(e,t,n)}finally{K=s,D.p=a,E.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=E.T,E.T=null;var r=D.p;D.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=Nr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Mr(s.ownerDocument.documentElement,s)){if(c!==null&&Pr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=jr(s,h),v=jr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{K=i,D.p=r,E.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=E.T,E.T=null;var r=D.p;D.p=2;var i=K;K|=4;try{ol(e,t.alternate,t)}finally{K=i,D.p=r,E.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Pe();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ft(n),t=t.stateNode,Ge&&typeof Ge.onCommitFiberRoot==`function`)try{Ge.onCommitFiberRoot(We,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=E.T,i=D.p,D.p=2,E.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{E.T=t,D.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ft(su),r=E.T,a=D.p;try{D.p=32>n?32:n,E.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Ge&&typeof Ge.onPostCommitFiberRoot==`function`)try{Ge.onPostCommitFiberRoot(We,o)}catch{}return!0}finally{D.p=a,E.T=r,Vu(e,t)}}function Wu(e,t,n){t=wi(n,t),t=Qs(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(ot(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=wi(n,e),n=$s(2),r=Ga(t,n,2),r!==null&&(ec(n,r,t,e),ot(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;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)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Fe()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=it()),e=li(e,t),e!==null&&(ot(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return je(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=tt(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||nt(r,a)||(n=!0,ld(r,a))}r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Fe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=rt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=tt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Me(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||nt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Me(r),ft(n)){case 2:case 8:n=Re;break;case 32:n=ze;break;case 268435456:n=Ve;break;default:n=ze}return r=cd.bind(null,e),n=je(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Me(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=tt(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Fe()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?je(Le,ad):od()})}function dd(){if(nd===0){var e=ga;e===0&&(e=Ze,Ze<<=1,!(Ze&261888)&&(Ze=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:cn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[_t]||null).action),o=r.submitter;o&&(t=(t=o[_t]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new An(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);ws(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ei.length;hd++){var gd=ei[hd];ti(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ti(Kr,`onAnimationEnd`),ti(qr,`onAnimationIteration`),ti(Jr,`onAnimationStart`),ti(`dblclick`,`onDoubleClick`),ti(`focusin`,`onFocus`),ti(`focusout`,`onBlur`),ti(Yr,`onTransitionRun`),ti(Xr,`onTransitionStart`),ti(Zr,`onTransitionCancel`),ti(Qr,`onTransitionEnd`),Nt(`onMouseEnter`,[`mouseout`,`mouseover`]),Nt(`onMouseLeave`,[`mouseout`,`mouseover`]),Nt(`onPointerEnter`,[`pointerout`,`pointerover`]),Nt(`onPointerLeave`,[`pointerout`,`pointerover`]),Mt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Mt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Mt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Mt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Mt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Mt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ni(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ni(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[yt];n===void 0&&(n=t[yt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,At.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!yn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Tt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}gn(function(){var r=a,i=dn(n),s=[];a:{var c=$r.get(e);if(c!==void 0){var l=An,u=e;switch(e){case`keypress`:if(Tn(n)===0)break a;case`keydown`:case`keyup`:l=qn;break;case`focusin`:u=`focus`,l=Rn;break;case`focusout`:u=`blur`,l=Rn;break;case`beforeblur`:case`afterblur`:l=Rn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=In;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Ln;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Yn;break;case Kr:case qr:case Jr:l=zn;break;case Qr:l=Xn;break;case`scroll`:case`scrollend`:l=jn;break;case`wheel`:l=Zn;break;case`copy`:case`cut`:case`paste`:l=Bn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Jn;break;case`toggle`:case`beforetoggle`:l=Qn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=_n(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==un&&(u=n.relatedTarget||n.fromElement)&&(Tt(u)||u[vt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Tt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=In,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Jn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Dt(l),h=u==null?c:Dt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Tt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?Dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=gr;else if(j(c)){if(_r)v=Er;else{v=wr;var y=Cr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&an(r.elementType)&&(v=gr):v=Tr;if(v&&=v(e,r)){fr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Xt(c,`number`,c.value)}switch(y=r?Dt(r):window,e){case`focusin`:(j(y)||y.contentEditable===`true`)&&(Ir=y,Lr=r,Rr=null);break;case`focusout`:Rr=Lr=Ir=null;break;case`mousedown`:zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:zr=!1,Br(s,n,i);break;case`selectionchange`:if(Fr)break;case`keydown`:case`keyup`:Br(s,n,i)}var b;if(er)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else cr?or(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(rr&&n.locale!==`ko`&&(cr||x!==`onCompositionStart`?x===`onCompositionEnd`&&cr&&(b=wn()):(xn=i,Sn=`value`in xn?xn.value:xn.textContent,cr=!0)),y=Ed(r,x),0<y.length&&(x=new Vn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=sr(n),b!==null&&(x.data=b)))),(b=nr?lr(e,n):ur(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Vn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=_n(e,n),i!=null&&r.unshift(Td(e,i,a)),i=_n(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=_n(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=_n(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9
+ `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||en(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&en(e,``+r);break;case`className`:k(e,`class`,r);break;case`tabIndex`:k(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:k(e,n,r);break;case`style`:rn(e,r,o);break;case`data`:if(t!==`object`){k(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=ln);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=cn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Rt(e,`popover`,r);break;case`xlinkActuate`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Rt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=on.get(n)||n,Rt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:rn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?en(e,r):(typeof r==`number`||typeof r==`bigint`)&&en(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=ln);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!jt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[_t]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Rt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Yt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Zt(e,!!r,n,!0):Zt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}$t(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(an(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Jt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Zt(e,!!n,n?[]:``,!1):Zt(e,!!n,t,!0)):Zt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Qt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(an(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e!==Wd&&(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body)}n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),wt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ct])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(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===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=D.d;D.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=Et(e);t!==null&&t.tag===5&&t.type===`form`?Es(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+qt(n.imageSizes)+`"]`)):i+=`[href="`+qt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+qt(r)+`"][href="`+qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),kt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Ot(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);kt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Ot(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),kt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Ot(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),kt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=_e.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Ot(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Ot(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Ot(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+qt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),kt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+qt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+qt(n.href)+`"]`);if(r)return t.instance=r,kt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),kt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,kt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),kt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,kt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),kt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ct]||a[gt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,kt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),kt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:S,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=at(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=at(0),this.hiddenUpdates=at(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=mi(3,null,null,t),e.current=a,a.stateNode=e,t=fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function tp(e){return e?(e=fi,e):fi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=R(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ga(e,r,t),n!==null&&(hu(n,e,t),Ka(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=dt(t);var n=li(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=E.T;E.T=null;var a=D.p;try{D.p=2,up(e,t,n,r)}finally{D.p=a,E.T=i}}function lp(e,t,n,r){var i=E.T;E.T=null;var a=D.p;try{D.p=8,up(e,t,n,r)}finally{D.p=a,E.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=Et(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=et(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-qe(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Fe()+500,id(0,!1))}}break;case 31:case 13:s=li(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=dn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Tt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ie()){case Le:return 2;case Re:return 8;case ze:case Be:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Et(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Tt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,mt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,mt(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);un=r,n.target.dispatchEvent(r),un=null}else return t=Et(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=Et(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[_t]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[_t]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[vt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=pt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.8`)throw Error(i(527,Lp,`19.2.8`));D.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:E,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{We=zp.inject(Rp),Ge=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[vt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,v=/^[\\/]{2}/;function y(e,t){return t+e.replace(/\\/g,`/`)}var b=`popstate`;function x(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function ee(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return re(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:w(t)}return ae(t,n,null,e)}function S(e,t){if(e===!1||e==null)throw Error(t)}function C(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function te(){return Math.random().toString(36).substring(2,10)}function ne(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function re(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ie(t):t,state:n,key:t&&t.key||r||te(),mask:i}}function w({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function ie(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ae(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=x(e)?e:re(h.location,e,t);n&&n(r,e),l=u()+1;let d=ne(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=x(e)?e:re(h.location,e,t);n&&n(r,e),l=u();let i=ne(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return oe(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(b,d),c=e,()=>{i.removeEventListener(b,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function oe(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),S(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:w(t);return i=i.replace(/ $/,`%20`),!n&&v.test(i)&&(i=r+i),new URL(i,r)}var T=c(u(),1);function se(e,t,n=`/`){return ce(e,t,n,!1)}function ce(e,t,n,r,i){let a=Ee((typeof t==`string`?ie(t):t).pathname||`/`,n);if(a==null)return null;let o=i??le(e),s=null,c=Te(a);for(let e=0;s==null&&e<o.length;++e)s=xe(o[e],c,r);return s}function le(e){let t=E(e);return ue(t),t}function E(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;S(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Pe([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(S(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),E(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ye(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=we(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of D(e.path))a(e,t,!0,n)}),t}function D(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=D(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ue(e){e.sort((e,t)=>e.score===t.score?be(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var de=/^:[\w-]+$/,fe=/^:[\w-]+/,pe=3.5,me=3,O=2,he=1,ge=10,_e=-2,ve=e=>e===`*`;function ye(e,t){let n=e.split(`/`),r=n.length;return n.some(ve)&&(r+=_e),t&&(r+=O),n.filter(e=>!ve(e)).reduce((e,t)=>e+(de.test(t)?me:fe.test(t)?pe:t===``?he:ge),r)}function be(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function xe(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Ce(u,l,s.matcher,s.compiledParams):Se(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Se({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Pe([a,d.pathname]),pathnameBase:Ie(Pe([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Pe([a,d.pathnameBase]))}return o}function Se(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=we(e.path,e.caseSensitive,e.end);return Ce(e,t,n,r)}function Ce(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function we(e,t=!1,n=!0){C(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Te(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return C(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ee(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function De(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ie(e):e,a;return n?(n=Ne(n),a=n.startsWith(`/`)?Oe(n.substring(1),`/`):Oe(n,t)):a=t,{pathname:a,search:Le(r),hash:Re(i)}}function Oe(e,t){let n=Fe(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ke(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ae(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function je(e){let t=Ae(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Me(e,t,n,r=!1){let i;typeof e==`string`?i=ie(e):(i={...e},S(!i.pathname||!i.pathname.includes(`?`),ke(`?`,`pathname`,`search`,i)),S(!i.pathname||!i.pathname.includes(`#`),ke(`#`,`pathname`,`hash`,i)),S(!i.search||!i.search.includes(`#`),ke(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=De(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ne=e=>e.replace(/[\\/]{2,}/g,`/`),Pe=e=>Ne(e.join(`/`)),Fe=e=>e.replace(/\/+$/,``),Ie=e=>Fe(e).replace(/^\/*/,`/`),Le=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Re=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ze=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Be(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ve(e){return Pe(e.map(e=>e.route.path).filter(Boolean))||`/`}var He=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ue(e,t){let n=e;if(typeof n!=`string`||!_.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(He)try{let e=new URL(window.location.href),r=v.test(n)?new URL(y(n,e.protocol)):new URL(n),a=Ee(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{C(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var We=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(We);var Ge=[`GET`,...We];new Set(Ge);var Ke=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function qe(e){try{return Ke.includes(new URL(e).protocol)}catch{return!1}}var Je=T.createContext(null);Je.displayName=`DataRouter`;var Ye=T.createContext(null);Ye.displayName=`DataRouterState`;var Xe=T.createContext(!1);function Ze(){return T.useContext(Xe)}var Qe=T.createContext({isTransitioning:!1});Qe.displayName=`ViewTransition`;var $e=T.createContext(new Map);$e.displayName=`Fetchers`;var et=T.createContext(null);et.displayName=`Await`;var tt=T.createContext(null);tt.displayName=`Navigation`;var nt=T.createContext(null);nt.displayName=`Location`;var rt=T.createContext({outlet:null,matches:[],isDataRoute:!1});rt.displayName=`Route`;var it=T.createContext(null);it.displayName=`RouteError`;var at=`REACT_ROUTER_ERROR`,ot=`REDIRECT`,st=`ROUTE_ERROR_RESPONSE`;function ct(e){if(e.startsWith(`${at}:${ot}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function lt(e){if(e.startsWith(`${at}:${st}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ze(t.status,t.statusText,t.data)}catch{}}function ut(e,{relative:t}={}){S(dt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=T.useContext(tt),{hash:i,pathname:a,search:o}=_t(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Pe([n,a])),r.createHref({pathname:s,search:o,hash:i})}function dt(){return T.useContext(nt)!=null}function ft(){return S(dt(),`useLocation() may be used only in the context of a <Router> component.`),T.useContext(nt).location}var pt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function mt(){let{isDataRoute:e}=T.useContext(rt);return e?Pt():ht()}function ht(){S(dt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=T.useContext(Je),{basename:t,navigator:n}=T.useContext(tt),{matches:r}=T.useContext(rt),{pathname:i}=ft(),a=JSON.stringify(je(r)),o=T.useRef(!1);return T.useLayoutEffect(()=>{o.current=!0}),T.useCallback((r,s={})=>{if(C(o.current,pt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Me(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Pe([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}T.createContext(null);function gt(){let{matches:e}=T.useContext(rt);return e[e.length-1]?.params??{}}function _t(e,{relative:t}={}){let{matches:n}=T.useContext(rt),{pathname:r}=ft(),i=JSON.stringify(je(n));return T.useMemo(()=>Me(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function vt(e,t){return yt(e,t)}function yt(e,t,n){S(dt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=T.useContext(tt),{matches:i}=T.useContext(rt),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=ft(),l;if(t){let e=typeof t==`string`?ie(t):t;S(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):se(e,{pathname:d}),p=Et(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Pe([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Pe([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?T.createElement(nt.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function bt(){let e=Nt(),t=Be(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return T.createElement(T.Fragment,null,T.createElement(`h2`,null,`Unexpected Application Error!`),T.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?T.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var xt=T.createElement(bt,null),St=class extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Xe;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=lt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:T.createElement(rt.Provider,{value:this.props.routeContext},T.createElement(it.Provider,{value:e,children:this.props.component}));return this.context?T.createElement(wt,{error:e},t):t}},Ct=new WeakMap;function wt({children:e,error:t}){let{basename:n}=T.useContext(tt);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ct(t.digest);if(e){let r=Ct.get(t);if(r)throw r;let i=Ue(e.location,n),a=i.absoluteURL||i.to;if(qe(a))throw Error(`Invalid redirect location`);if(He&&!Ct.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Ct.set(t,n),n}}return T.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Tt({routeContext:e,match:t,children:n}){let r=T.useContext(Je);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),T.createElement(rt.Provider,{value:e},n)}function Et(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);S(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ve(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||xt,o&&(s<0&&c===0?(It(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?T.createElement(n.route.Component,null):n.route.element?n.route.element:e,T.createElement(Tt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?T.createElement(St,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Dt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ot(e){let t=T.useContext(Je);return S(t,Dt(e)),t}function kt(e){let t=T.useContext(Ye);return S(t,Dt(e)),t}function At(e){let t=T.useContext(rt);return S(t,Dt(e)),t}function jt(e){let t=At(e),n=t.matches[t.matches.length-1];return S(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Mt(){return jt(`useRouteId`)}function Nt(){let e=T.useContext(it),t=kt(`useRouteError`),n=jt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Pt(){let{router:e}=Ot(`useNavigate`),t=jt(`useNavigate`),n=T.useRef(!1);return T.useLayoutEffect(()=>{n.current=!0}),T.useCallback(async(r,i={})=>{C(n.current,pt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ft={};function It(e,t,n){!t&&!Ft[e]&&(Ft[e]=!0,C(!1,n))}T.memo(Lt);function Lt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return yt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Rt({to:e,replace:t,state:n,relative:r}){S(dt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=T.useContext(tt);C(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=T.useContext(rt),{pathname:o}=ft(),s=mt(),c=Me(e,je(a),o,r===`path`),l=JSON.stringify(c);return T.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function k(e){S(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function zt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){S(!dt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=T.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=ie(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=T.useMemo(()=>{let e=Ee(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return C(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:T.createElement(tt.Provider,{value:c},T.createElement(nt.Provider,{children:t,value:h}))}function Bt({children:e,location:t}){return vt(Vt(e),t)}T.Component;function Vt(e,t=[]){let n=[];return T.Children.forEach(e,(e,r)=>{if(!T.isValidElement(e))return;let i=[...t,r];if(e.type===T.Fragment){n.push.apply(n,Vt(e.props.children,i));return}S(e.type===k,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;S(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=Vt(a.children,i)),n.push(o)}),n}var Ht=`application/x-www-form-urlencoded`;function Ut(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Wt(e){return Ut(e)&&e.tagName.toLowerCase()===`button`}function Gt(e){return Ut(e)&&e.tagName.toLowerCase()===`form`}function Kt(e){return Ut(e)&&e.tagName.toLowerCase()===`input`}function qt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jt(e,t){return e.button===0&&(!t||t===`_self`)&&!qt(e)}function Yt(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Xt(e,t){let n=Yt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Zt=null;function Qt(){if(Zt===null)try{new FormData(document.createElement(`form`),0),Zt=!1}catch{Zt=!0}return Zt}var $t=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function en(e){return e!=null&&!$t.has(e)?(C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ht}"`),null):e}function tn(e,t){let n,r,i,a,o;if(Gt(e)){let o=e.getAttribute(`action`);r=o?Ee(o,t):null,n=e.getAttribute(`method`)||`get`,i=en(e.getAttribute(`enctype`))||Ht,a=new FormData(e)}else if(Wt(e)||Kt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ee(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=en(e.getAttribute(`formenctype`))||en(o.getAttribute(`enctype`))||Ht,a=new FormData(o,e),!Qt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Ut(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Ht,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function nn(e,t){if(e===!1||e==null)throw Error(t)}function rn(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}var an=`modulepreload`,on=function(e){return`/`+e},sn={},cn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=on(t,n),t=s(t),t in sn)return;sn[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:an,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function ln(e,t){if(e.id in t)return t[e.id];try{let n=await cn(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function un(e){return e!=null&&typeof e.page==`string`}function dn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function fn(e,t,n){return _n((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ln(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(dn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function pn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function mn(e,t,{includeHydrateFallback:n}={}){return hn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function hn(e){return[...new Set(e)]}function gn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function _n(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!un(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(gn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function vn(){let e=T.useContext(Je);return nn(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function yn(){let e=T.useContext(Ye);return nn(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var bn=T.createContext(void 0);bn.displayName=`FrameworkContext`;function xn(){let e=T.useContext(bn);return nn(e,`You must render this element inside a <HydratedRouter> element`),e}function Sn(e,t){let n=T.useContext(bn),[r,i]=T.useState(!1),[a,o]=T.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=T.useRef(null);T.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),T.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Cn(s,p),onBlur:Cn(c,m),onMouseEnter:Cn(l,p),onMouseLeave:Cn(u,m),onTouchStart:Cn(d,p)}]:[a,f,{}]:[!1,f,{}]}function Cn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function wn({page:e,...t}){let n=Ze(),{nonce:r}=xn(),{router:i}=vn(),a=T.useMemo(()=>se(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?T.createElement(En,{page:e,matches:a,...t}):T.createElement(Dn,{page:e,matches:a,...t})):null}function Tn(e){let{manifest:t,routeModules:n}=xn(),[r,i]=T.useState([]);return T.useEffect(()=>{let r=!1;return fn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function En({page:e,matches:t,...n}){let r=ft(),i=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=rn(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return T.createElement(T.Fragment,null,i.map(e=>T.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Dn({page:e,matches:t,...n}){let r=ft(),{manifest:i,routeModules:a}=xn(),{loaderData:o,matches:s}=yn(),c=T.useMemo(()=>pn(e,t,s,i,r,`data`),[e,t,s,i,r]),l=T.useMemo(()=>pn(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=rn(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=T.useMemo(()=>mn(l,i),[l,i]),f=Tn(l);return T.createElement(T.Fragment,null,u.map(e=>T.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>T.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>T.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function On(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var kn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{kn&&(window.__reactRouterVersion=`8.3.0`)}catch{}function An({basename:e,children:t,useTransitions:n,window:r}){let i=T.useRef(null);i.current??=ee({window:r,v5Compat:!0});let a=i.current,[o,s]=T.useState({action:a.action,location:a.location}),c=T.useCallback(e=>{n===!1?s(e):T.startTransition(()=>s(e))},[n]);return T.useLayoutEffect(()=>a.listen(c),[a,c]),T.createElement(zt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var A=T.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:v}=T.useContext(tt),y=typeof l==`string`&&_.test(l),b=Ue(l,h);l=b.to;let x=ut(l,{relative:r}),ee=ft(),S=null;if(o){let e=Me(o,[],ee.mask?ee.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Pe([h,e.pathname])),S=g.createHref(e)}let[C,te,ne]=Sn(n,p),re=Fn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function w(t){e&&e(t),t.defaultPrevented||re(t)}let ie=!(b.isExternal||i),ae=T.createElement(`a`,{...p,...ne,href:(ie?S:void 0)||b.absoluteURL||x,onClick:ie?w:e,ref:On(m,te),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return C&&!y?T.createElement(T.Fragment,null,ae,T.createElement(wn,{page:x})):ae});A.displayName=`Link`;var jn=T.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=_t(a,{relative:c.relative}),d=ft(),f=T.useContext(Ye),{navigator:p,basename:m}=T.useContext(tt),h=f!=null&&Vn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Ee(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),ee={isActive:b,isPending:x,isTransitioning:h},S=b?e:void 0,C;C=typeof n==`function`?n(ee):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let te=typeof i==`function`?i(ee):i;return T.createElement(A,{...c,"aria-current":S,className:C,ref:l,style:te,to:a,viewTransition:o},typeof s==`function`?s(ee):s)});jn.displayName=`NavLink`;var Mn=T.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=T.useContext(tt),g=zn(),v=Bn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&_.test(s);return T.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?T.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Mn.displayName=`Form`;function Nn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pn(e){let t=T.useContext(Je);return S(t,Nn(e)),t}function Fn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=mt(),d=ft(),f=_t(e,{relative:o});return T.useCallback(p=>{if(Jt(p,t)){p.preventDefault();let t=n===void 0?w(d)===w(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?T.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function In(e){C(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=T.useRef(Yt(e)),n=T.useRef(!1),r=ft(),i=T.useMemo(()=>Xt(r.search,n.current?null:t.current),[r.search]),a=mt();return[i,T.useCallback((e,t)=>{let r=Yt(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Ln=0,Rn=()=>`__${String(++Ln)}__`;function zn(){let{router:e}=Pn(`useSubmit`),{basename:t}=T.useContext(tt),n=Mt(),r=e.fetch,i=e.navigate;return T.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=tn(e,t);a.navigate===!1?await r(a.fetcherKey||Rn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Bn(e,{relative:t}={}){let{basename:n}=T.useContext(tt),r=T.useContext(rt);S(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={..._t(e||`.`,{relative:t})},o=ft();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Pe([n,a.pathname])),w(a)}function Vn(e,{relative:t}={}){let n=T.useContext(Qe);S(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Pn(`useViewTransitionState`),i=_t(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ee(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ee(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Se(i.pathname,o)!=null||Se(i.pathname,a)!=null}var Hn=g(),Un=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=t,this.status=n}};function Wn(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&r!==``&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}async function Gn(e,t){let n=t?.body instanceof FormData?t.headers:{"Content-Type":`application/json`,...t?.headers},r=await fetch(e,{...t,...n?{headers:n}:{}}),i=await r.json().catch(()=>({ok:!1,error:`the server sent an unreadable response`,code:`internal`}));if(!i||typeof i!=`object`||i.ok!==!0){let e=i;throw new Un(e?.error??`request failed`,e?.code??`internal`,r.status)}let{ok:a,...o}=i;return o}async function Kn(e){let t=await fetch(e);if(!t.ok)throw new Un(`request failed`,`internal`,t.status);return t.text()}var qn=e=>Gn(e),Jn=(e,t)=>Gn(e,{method:`POST`,body:t===void 0?`{}`:JSON.stringify(t)}),Yn=(e,t)=>Gn(e,{method:`PATCH`,body:JSON.stringify(t)}),Xn=(e,t)=>Gn(e,{method:`PUT`,body:JSON.stringify(t)}),Zn=e=>Gn(e,{method:`DELETE`}),Qn={get:()=>qn(`/v1/health`)},$n={list:(e={})=>qn(`/v1/admin/posts${Wn(e)}`),stats:()=>qn(`/v1/admin/posts/stats`),get:e=>qn(`/v1/admin/posts/${e}`),create:e=>Jn(`/v1/admin/posts`,e),save:(e,t)=>Xn(`/v1/admin/posts/${e}/save`,t),publish:(e,t)=>Jn(`/v1/admin/posts/${e}/publish`,t?{note:t}:{}),discardDraft:e=>Zn(`/v1/admin/posts/${e}/draft`),archive:e=>Jn(`/v1/admin/posts/${e}/archive`),unarchive:e=>Jn(`/v1/admin/posts/${e}/unarchive`),duplicate:e=>Jn(`/v1/admin/posts/${e}/duplicate`),rollback:(e,t)=>Jn(`/v1/admin/posts/${e}/rollback`,{version:t}),versions:e=>qn(`/v1/admin/posts/${e}/versions`),remove:e=>Zn(`/v1/admin/posts/${e}`)},er={list:(e={})=>qn(`/v1/admin/authors${Wn(e)}`),create:e=>Jn(`/v1/admin/authors`,e),update:(e,t)=>Xn(`/v1/admin/authors/${e}`,t),remove:e=>Zn(`/v1/admin/authors/${e}`)},tr={list:(e={})=>qn(`/v1/admin/forms${Wn(e)}`),create:e=>Jn(`/v1/admin/forms`,e),update:(e,t)=>Yn(`/v1/admin/forms/${e}`,t),archive:e=>Jn(`/v1/admin/forms/${e}/archive`),unarchive:e=>Jn(`/v1/admin/forms/${e}/unarchive`)},nr={list:(e={})=>qn(`/v1/admin/submissions${Wn(e)}`),get:e=>qn(`/v1/admin/submissions/${e}`),update:(e,t)=>Yn(`/v1/admin/submissions/${e}`,t),stats:(e=30)=>qn(`/v1/admin/submissions/stats${Wn({days:e})}`),exportCsvUrl:(e={})=>`/v1/admin/submissions/export.csv${Wn(e)}`},rr={visits:(e={})=>qn(`/v1/admin/visits${Wn(e)}`),visitStats:(e=30)=>qn(`/v1/admin/visits/stats${Wn({days:e})}`),consentStats:(e=30)=>qn(`/v1/admin/consent/stats${Wn({days:e})}`)},ir={list:(e={})=>qn(`/v1/admin/media${Wn(e)}`),upload:e=>{let t=new FormData;return t.append(`file`,e),Gn(`/v1/admin/media`,{method:`POST`,body:t})},update:(e,t)=>Yn(`/v1/admin/media/${e}`,{alt:t}),remove:e=>Zn(`/v1/admin/media/${e}`),publicUrl:e=>`/v1/media/${e}`},ar={checks:()=>qn(`/v1/admin/aeo/checks`),crawlers:(e=30)=>qn(`/v1/admin/aeo/crawlers${Wn({days:e})}`),llmsTxt:()=>Kn(`/v1/admin/aeo/llms.txt`)},or={get:()=>qn(`/v1/admin/settings`),update:e=>Yn(`/v1/admin/settings`,e)},sr={list:()=>qn(`/v1/admin/users`),create:e=>Jn(`/v1/admin/users`,e),setRole:(e,t)=>Yn(`/v1/admin/users/${e}`,{role:t}),remove:e=>Zn(`/v1/admin/users/${e}`)},cr={list:()=>qn(`/v1/admin/keys`),create:(e,t)=>Jn(`/v1/admin/keys`,t?{kind:e,label:t}:{kind:e}),revoke:e=>Zn(`/v1/admin/keys/${e}`)},lr=(0,T.createContext)(null);function ur(){let e=(0,T.useContext)(lr);if(!e)throw Error(`useAdmin must be used inside AdminProvider`);return e}function dr(){return ur().session.role}function j(e,t){let[n,r]=(0,T.useState)({data:null,loading:!0,error:null,errorCode:null}),[i,a]=(0,T.useState)(0),o=(0,T.useCallback)(()=>{r(e=>({...e,loading:!0,error:null,errorCode:null})),a(e=>e+1)},[]);return(0,T.useEffect)(()=>{let t=!1;return e().then(e=>{t||r({data:e,loading:!1,error:null,errorCode:null})}).catch(e=>{t||r(t=>({...t,loading:!1,error:e instanceof Un?e.message:`something went wrong`,errorCode:e instanceof Un?e.code:null}))}),()=>{t=!0}},[...t,i]),{...n,reload:o}}function fr(){let[e,t]=(0,T.useState)(!1),[n,r]=(0,T.useState)(null);return{pending:e,error:n,clearError:(0,T.useCallback)(()=>r(null),[]),run:(0,T.useCallback)(async e=>{t(!0),r(null);try{return await e()}catch(e){return r(e instanceof Un?e.message:`something went wrong`),null}finally{t(!1)}},[])}}var pr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),M=o(((e,t)=>{t.exports=pr()}))();function mr({session:e,children:t}){let n=j(()=>or.get(),[]),r=j(()=>Qn.get(),[]),i=(0,T.useMemo)(()=>{let t=n.data?.settings??null,i=t?.allowedOrigins.find(e=>e.startsWith(`http`))??null;return{session:e,settings:t,health:r.data,siteName:t?.publisher?.name??`Your site`,siteUrl:i,reloadSettings:n.reload}},[e,n.data,n.reload,r.data]);return(0,M.jsx)(lr.Provider,{value:i,children:t})}var hr=Object.create(null),gr=e=>({}),_r=new Proxy(hr,{get(e,t){return gr()[t]??hr[t]},has(e,t){return t in gr()||t in hr},set(e,t,n){let r=gr(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=gr(!0);return delete n[t],!0},ownKeys(){let e=gr(!0);return Object.keys(e)}});_r.NODE_ENV;function vr(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return vr(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return vr(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return vr(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return vr(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return vr(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return vr(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return vr(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function yr(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function br(e){let t=e.split(`
10
+ at `);return t.length<=1?e:(t.splice(1,1),t.join(`
11
+ at `))}function xr(e,t){class n extends e{#e;constructor(...e){if(yr()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=br(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var Sr={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};xr(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:Sr[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var Cr=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},wr=47;function Tr(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===wr;)t--;return t===e.length?e:e.slice(0,t)}function Er(e){try{return(Tr(new URL(e).pathname)||`/`)!==`/`}catch{throw new Cr(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Dr(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new Cr(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Cr?t:new Cr(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Or(e,t=`/api/auth`){if(Dr(e),Er(e))return e;let n=Tr(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function kr(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function Ar(e,t,n,r,i){if(e)return Or(e,t);if(r!==!1){let e=_r.BETTER_AUTH_URL||_r.NEXT_PUBLIC_BETTER_AUTH_URL||_r.PUBLIC_BETTER_AUTH_URL||_r.NUXT_PUBLIC_BETTER_AUTH_URL||_r.NUXT_PUBLIC_AUTH_URL||(_r.BASE_URL===`/`?void 0:_r.BASE_URL);if(e)return Or(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&kr(o,`proto`)&&kr(a,`host`))try{return Or(`${o}://${a}`,t)}catch{}if(n){let e=jr(n.url);if(!e)throw new Cr(`Could not get origin from request. Please provide a valid base URL.`);return Or(e,t)}if(typeof window<`u`&&window.location)return Or(window.location.origin,t)}function jr(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Mr={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},Nr=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Pr={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},Fr=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Ir(e){return e instanceof Date&&!isNaN(e.getTime())}function Lr(e){let t=Fr.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return Ir(f)?f:null}function Rr(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in Pr)return Pr[s];if(!Nr.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(Mr).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=Lr(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function zr(e,t={strict:!0}){return Rr(e,t)}var Br=[`javascript:`,`data:`,`vbscript:`];function Vr(e){let t;try{t=new URL(e)}catch{return!0}return!Br.includes(t.protocol)}var Hr={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&Vr(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},Ur=[],Wr=0,Gr=null,Kr=4,qr=globalThis.nanostoresGlobal||={epoch:0},Jr=()=>{let e;for(Wr=0;Wr<Ur.length;Wr+=Kr)try{Ur[Wr](Ur[Wr+1].value,Ur[Wr+2],Ur[Wr+3])}catch(t){e=t}if(Ur.length=0,e)throw e},Yr=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=Wr+Kr;t<Ur.length;)Ur[t]===e?Ur.splice(t,Kr):t+=Kr;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){qr.epoch++;let i=!Ur.length&&!0;for(let i of t)Gr?.has(i)||(Gr?.add(i),Ur.push(i,n,e,r));i&&Jr()},off(){},set(e){let t=n.value;n.eq(t,e)||(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},Xr=2,Zr=5,Qr=6,$r=10,ei=(e,t,n,r)=>(e.events=e.events||{},e.events[n+$r]||(e.events[n+$r]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+$r](),delete e.events[n+$r])}),ti=(e,t)=>ei(e,t,Xr,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),ni=1e3,ri=(e,t)=>ei(e,n=>{let r=t(n);r&&e.events[Qr].push(r)},Zr,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[Qr]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[Qr])t();e.events[Qr]=[]}},ni)},()=>{e.listen=n,e.off=r}});function ii(e,t){let n=oi(t),r=e;for(let e of n){if(r==null)return;r=r[e]}return r}var ai=/(.*)\[(\d+)\]/;function oi(e){return e.split(`.`).flatMap(e=>si(e))}function si(e){if(ai.test(e)){let[,t,n]=e.match(ai);return[...si(t),n]}return[e]}function ci(e,t,n){let r=new Set(t);return e.listen((e,i,a)=>{(a===void 0?t.some(t=>i===void 0||e[t]!==i[t]||ii(e,t)!==ii(i,t)):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(e,i,a)})}function li(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ui(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!ui(e[n],t[n]))return!1;return!0}if(li(e)&&li(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!ui(e[r],t[r]))return!1;return!0}return!1}function di(e,t){return ti(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var fi=Symbol.for(`better-auth:broadcast-channel`),pi=()=>Math.floor(Date.now()/1e3),mi=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:pi()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function hi(e=`better-auth.message`){return globalThis[fi]||(globalThis[fi]=new mi(e)),globalThis[fi]}var gi=Symbol.for(`better-auth:focus-manager`),_i=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function vi(){return globalThis[gi]||(globalThis[gi]=new _i),globalThis[gi]}var yi=Symbol.for(`better-auth:online-manager`),bi=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function xi(){return globalThis[yi]||(globalThis[yi]=new bi),globalThis[yi]}var Si=()=>Math.floor(Date.now()/1e3),Ci=5;function wi(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||xi().isOnline,u=e=>{if(l()){if(e?.event===`storage`){t();return}if(e?.event===`poll`){c.lastSessionRequest=Si(),t();return}if(e?.event===`visibilitychange`){if(Si()-c.lastSessionRequest<Ci)return;c.lastSessionRequest=Si(),t();return}t()}},d=e=>{hi().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=hi().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=vi().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=xi().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=hi().setup(),c.cleanupFocusSetup=vi().setup(),c.cleanupOnlineSetup=xi().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var Ti=()=>typeof window>`u`,Ei=ni;function Di(e,t){if(typeof window>`u`)return;let n=e.get();n.data===null&&t!==null&&e.set({...n,data:t,error:null,isPending:!1})}function Oi(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function ki(e){return!e||e.session===null&&e.user===null?null:e}function Ai(e,t){return ui(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function ji(e,t){let n=Yr(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=Yr({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});di(s,Ai);let c=async(t,n)=>{let r=s.value;if(s.set({...r,isPending:r.data===null,isRefetching:!0,error:null,refetch:o}),t.aborted)return`aborted`;try{let r=await e(`/get-session`,{method:`GET`,query:n?.query,signal:t});if(t.aborted)return`aborted`;let{data:i,error:a}=Oi(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=Oi(n))}catch{if(t.aborted)return`aborted`;c=`stale`}if(a){let e=s.value,t=a?.status===401;return s.set({data:t?null:e.data,error:a,isPending:!1,isRefetching:!1,refetch:o}),`failed`}let l=ki(i),u=s.value,d=u.data!=null&&l!=null&&ui(u.data,l)?u.data:l;return s.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:o}),c}catch(e){if(t.aborted)return`aborted`;let n=s.value;return s.set({data:n.data,error:e,isPending:!1,isRefetching:!1,refetch:o}),`failed`}},l=()=>{let e=s.value.data?.session?.expiresAt,t=e instanceof Date?e.getTime():1/0;return Math.min(Date.now()+Ei,t)},u=e=>{i=0,r?.cancel();let t=new AbortController,n={cancel:()=>t.abort(),promise:Promise.resolve().then(()=>t.signal.aborted?`aborted`:c(t.signal,e)),revision:a};r=n;let o=e=>{r===n&&(r=void 0,e===`fresh`&&n.revision===a&&(i=l()))};return n.promise.then(o,()=>o(`failed`)),n.promise.then(()=>void 0)},d=()=>r?.revision===a?r.promise.then(()=>void 0):Date.now()<i?Promise.resolve():u(),f=()=>{};return ri(s,()=>{let e;Ti()||(e=setTimeout(()=>{d()},0));let r=wi({fetchSession:u,shouldPollSession:()=>s.value.data!=null,sessionSignal:n,options:t});return r.init(),f=r.broadcastSessionUpdate,()=>{e&&clearTimeout(e),r.cleanup()}}),{session:s,$sessionSignal:n,broadcastSessionUpdate:e=>f(e)}}function Mi(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Ni(e,t,n=`.`,r){if(!Mi(t))return Ni(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:Mi(a)&&Mi(i[t])?Ni(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function Pi(e){return(...t)=>t.reduce((t,n)=>Ni(t,n,``,e),{})}var Fi=Pi(),Ii=Object.defineProperty,Li=Object.defineProperties,Ri=Object.getOwnPropertyDescriptors,zi=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,Bi=(e,t,n)=>t in e?Ii(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||={})N.call(t,n)&&Bi(e,n,t[n]);if(zi)for(var n of zi(t))P.call(t,n)&&Bi(e,n,t[n]);return e},Vi=(e,t)=>Li(e,Ri(t)),Hi=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},Ui=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},Wi=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Gi=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Ki(e){if(typeof e==`number`)return new Wi({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new Wi(e);case`exponential`:return new Gi(e);default:throw Error(`Invalid retry strategy`)}}var qi=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},Ji=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Yi(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return Ji.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function Xi(e){try{return JSON.parse(e),!0}catch{return!1}}function Zi(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function Qi(e){try{return JSON.parse(e)}catch{return e}}function $i(e){return typeof e==`function`}function ea(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&$i(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&$i(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function ta(...e){let t={};for(let n of e)if(n){if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}}return t}async function na(e){let t=new Headers(ta(e?.headers,await qi(e)));if(!t.has(`content-type`)){let n=ra(e?.body);n&&t.set(`content-type`,n)}return t}function ra(e){return Zi(e)?`application/json`:null}function ia(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function aa(e,t){let{body:n}=e;return n?!Zi(n)||typeof n==`string`?n:ia(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function oa(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return ua.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function sa(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var ca=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function la(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new ca(n.issues);return n.value}var ua=[`get`,`post`,`put`,`patch`,`delete`],da=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``)),e.startsWith(`/`)&&e.charAt(1)===`@`&&(e=e.substring(1));let i=r.schema[e];if(i){let e=n?.headers;if(i.headers&&!n?.disableValidation){let t={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((e,n)=>{t[n.toLowerCase()]=e});else if(typeof n.headers==`object`)for(let[e,r]of Object.entries(n.headers))r!=null&&(t[e.toLowerCase()]=r)}let r=await la(i.headers,t),a={};for(let[e,t]of Object.entries(r))a[e.toLowerCase()]=t;e=a}let r=Vi(F({},n),{method:i.method,output:i.output,headers:e});return n?.disableValidation||(r=Vi(F({},r),{body:i.input?await la(i.input,n?.body):n?.body,params:i.params?await la(i.params,n?.params):n?.params,query:i.query?await la(i.query,n?.query):n?.query})),{url:t,options:r}}}return{url:t,options:n}}}),fa=e=>{async function t(t,n){let r=Vi(F(F({},e),n),{headers:ta(e?.headers,n?.headers),plugins:[...e?.plugins||[],da(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await ga(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await ga(t,r)}return t},pa=e=>e===`.`||e===`..`;function ma(e,t){let n=e;for(let[e,r]of t)n=n.replace(e,r);if(pa(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function ha(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];ua.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}let l=new Map;if(r){if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];l.set(n,String(e))}}else for(let[e,t]of Object.entries(r))l.set(`:${e}`,String(t))}o=o.split(`/`).map(e=>ma(e,l)).join(`/`),o=o.replace(/^\/+/,``);let u=c.toString();return u=u.length>0?`?${u}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${u}`,a):`${a}${o}${u}`}var ga=async(e,t)=>{let{hooks:n,url:r,options:i}=await Ui(e,t),a=ea(i),o=new AbortController,s=i.signal??o.signal,c=ha(r,i),l=await na(i),u=aa(i,l),d=oa(r,i),f=Vi(F({},i),{url:c,headers:l,body:u,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&Object.assign(f,t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=sa(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(Vi(F({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=Yi(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??Qi)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await la(f.output,r.data));for(let e of n.onSuccess)e&&await e(Vi(F({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??Qi,_=await m.text(),v=Xi(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:Vi(F({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(Vi(F({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=Ki(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await ga(e,Vi(F({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new Hi(m.status,m.statusText,v?y:_);return{data:null,error:Vi(F({},y),{status:m.status,statusText:m.statusText})}},_a=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},va=(e,t)=>{let n=`credentials`in Request.prototype,r=Ar(e?.baseURL,e?.basePath,void 0,t)??_a(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=fa({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?zr(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Hr],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=ji(d,e),h=!1,g=e=>{h||e===null||(h=!0,Di(p,e))},_=e?.plugins||[],v={},y={$sessionSignal:f,session:p},b={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},x=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of _)e.getAtoms&&Object.assign(y,e.getAtoms?.(d)),e.pathMethods&&Object.assign(b,e.pathMethods),e.atomListeners&&x.push(...e.atomListeners);let ee={notify:e=>{y[e].set(!y[e].get())},listen:(e,t)=>{y[e].subscribe(t)},atoms:y};for(let t of _)t.getActions&&(v=Fi(t.getActions?.(d,ee,e)??{},v));return{get baseURL(){return r},pluginsActions:v,pluginsAtoms:y,pluginPathMethods:b,atomListeners:x,hydrateSession:g,$fetch:d,$store:ee}};function ya(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function ba(e){return e.charAt(0).toUpperCase()+e.slice(1)}var xa=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,Sa=/['\u2019]/g;function Ca(e){return e.replace(Sa,``).match(xa)??[]}function wa(e){return Ca(e).map(e=>e.toLowerCase()).join(`-`)}function Ta(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function Ea(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||ya(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(wa).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=Ta(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function Da(e,t={}){let n=(0,T.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,T.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?ci(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,T.useSyncExternalStore)(a,o,o)}function Oa(e){return`use${ba(e)}`}function ka(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,$store:o,atomListeners:s}=va(e),c={};for(let[e,t]of Object.entries(r))c[Oa(e)]=()=>Da(t);return Ea({...n,...c,hydrateSession:i,$fetch:a,$store:o},a,t,r,s)}var Aa=`1.7.1`,ja=ka({basePath:`/api/auth`,plugins:[(e=>({id:`additional-fields-client`,version:Aa,$InferServerPlugin:{}}))({user:{role:{type:`string`,required:!1}}})]});function Ma(e){return e===`owner`?`owner`:`member`}function Na({crumb:e}){let{siteName:t,siteUrl:n,session:r}=ur();async function i(){await ja.signOut(),window.location.assign(`/`)}return(0,M.jsxs)(`header`,{className:`app-head`,children:[(0,M.jsxs)(`span`,{className:`site`,children:[(0,M.jsx)(A,{to:`/`,style:{textDecoration:`none`},children:t}),e?(0,M.jsxs)(`span`,{className:`crumb`,children:[` / `,e]}):null]}),(0,M.jsxs)(`span`,{className:`right`,children:[n?(0,M.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,title:`The first origin on the site's allowed-origins list`,children:`View live site`}):null,(0,M.jsxs)(`span`,{children:[r.email,` (`,r.role,`)`]}),(0,M.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>void i(),children:`Sign out`})]})]})}function I(e){return new Intl.NumberFormat(`en`).format(e)}function Pa(e,t){return t<=0?`0%`:`${Math.round(e/t*100)}%`}function Fa(e){if(!e)return`never`;let t=new Date(e.includes(`T`)?e:`${e.replace(` `,`T`)}Z`);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(`en`,{year:`numeric`,month:`short`,day:`numeric`})}function Ia(e){if(!e)return`never`;let t=new Date(e.includes(`T`)?e:`${e.replace(` `,`T`)}Z`);if(Number.isNaN(t.getTime()))return e;let n=Math.max(0,Math.round((Date.now()-t.getTime())/1e3));if(n<60)return`just now`;let r=Math.round(n/60);if(r<60)return`${r}m ago`;let i=Math.round(r/60);if(i<24)return`${i}h ago`;let a=Math.round(i/24);return a<30?`${a}d ago`:Fa(e)}function La(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function Ra(e){return e.toLowerCase().normalize(`NFKD`).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,200)}var za={missing_description:`No description`,missing_answer_summary:`No answer summary`,missing_question_heading:`No question heading`,missing_json_ld:`No JSON-LD`,not_in_sitemap:`Not in the sitemap`},Ba={human:`People`,"ai-crawler":`Answer engines`,"search-crawler":`Search crawlers`,"social-crawler":`Social unfurlers`,"seo-crawler":`SEO auditors`,"other-bot":`Other bots`};function Va({value:e,label:t}){return(0,M.jsxs)(`div`,{className:`stat`,children:[(0,M.jsx)(`p`,{className:`n`,children:typeof e==`number`?I(e):e}),(0,M.jsx)(`p`,{className:`l`,children:t})]})}function L({title:e,action:t,children:n}){return(0,M.jsxs)(`section`,{className:`panel`,children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,M.jsx)(`h3`,{children:e}),t]}),n]})}function Ha({rows:e,empty:t}){return e.length===0?(0,M.jsx)(`p`,{className:`note`,children:t}):(0,M.jsx)(M.Fragment,{children:e.map(e=>(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:e.label}),(0,M.jsx)(`span`,{children:e.value})]},e.key))})}function Ua({values:e,mini:t=!1,label:n}){let r=Math.max(1,...e);return(0,M.jsx)(`div`,{className:t?`spark mini`:`spark`,role:`img`,"aria-label":n??`trend over the last ${e.length} days`,children:e.map((e,t)=>(0,M.jsx)(`i`,{style:{height:`${Math.max(4,Math.round(e/r*100))}%`}},t))})}function Wa({what:e}){return(0,M.jsxs)(`p`,{className:`centered-note`,children:[`Loading `,e,`...`]})}function R({message:e}){return(0,M.jsx)(`p`,{className:`notice bad`,role:`alert`,children:e})}function Ga({what:e}){return(0,M.jsxs)(`div`,{className:`placeholder`,children:[(0,M.jsx)(`h3`,{children:`Owner only`}),(0,M.jsxs)(`p`,{children:[e,` is limited to the site owner. Ask an owner to make the change, or to give your account the owner role in Setup.`]})]})}function Ka({title:e,children:t}){return(0,M.jsxs)(`div`,{className:`placeholder`,children:[(0,M.jsx)(`h3`,{children:e}),(0,M.jsx)(`p`,{children:t})]})}var qa=[{id:`engagement`,label:`Engagement`,basePath:`/engagement`,glyph:`EN`,blurb:`Who is viewing and who wrote in. Your inbox and the outcomes behind it.`,nav:[{path:`/engagement`,label:`Overview`,glyph:`OV`},{path:`/engagement/inbox`,label:`Inbox`,glyph:`IN`,badge:`unreadSubmissions`,requiresRole:`owner`},{path:`/engagement/forms`,label:`Forms`,glyph:`FO`},{path:`/engagement/contacts`,label:`Contacts`,glyph:`CO`,requiresRole:`owner`},{path:`/engagement/consent`,label:`Consent`,glyph:`CN`}]},{id:`content`,label:`Content`,basePath:`/content`,glyph:`CT`,blurb:`The stream: posts and their versions, authors, and the media library.`,nav:[{path:`/content`,label:`Posts`,glyph:`PO`},{path:`/content/authors`,label:`Authors`,glyph:`AU`},{path:`/content/media`,label:`Media`,glyph:`ME`}]},{id:`website`,label:`Website`,basePath:`/website`,glyph:`WS`,blurb:`The structure: search and answer-engine surfaces, pages, navigation.`,nav:[{path:`/website`,label:`SEO and AEO`,glyph:`AE`},{path:`/website/llms-txt`,label:`llms.txt`,glyph:`LL`},{path:`/website/pages`,label:`Pages`,glyph:`PG`},{path:`/website/navigation`,label:`Navigation`,glyph:`NV`}]},{id:`setup`,label:`Setup`,basePath:`/setup`,glyph:`ST`,blurb:`The wiring: users, API keys, integrations, and general settings.`,nav:[{path:`/setup`,label:`General`,glyph:`GE`},{path:`/setup/users`,label:`Users`,glyph:`US`,requiresRole:`owner`},{path:`/setup/keys`,label:`API keys`,glyph:`KY`,requiresRole:`owner`},{path:`/setup/integrations`,label:`Integrations`,glyph:`IT`}]}],Ja=qa.filter(e=>e.id!==`setup`),Ya=qa.find(e=>e.id===`setup`);function Xa(e,t){return e===t||e.startsWith(`${t}/`)}function Za(e){return qa.find(t=>Xa(e,t.basePath))}function Qa(e,t){return e.nav.filter(e=>!e.requiresRole||e.requiresRole===t)}async function $a(e){try{return await e}catch{return null}}function eo(e){return j(async()=>e===`owner`?(await $a(nr.list({status:`new`,pageSize:1})))?.total??null:null,[e])}function to(e){return j(async()=>{let[t,n,r,i,a]=await Promise.all([e===`owner`?$a(nr.list({status:`new`,pageSize:1})):Promise.resolve(null),$a(rr.visitStats(7)),$a($n.list({status:`draft`,pageSize:1})),$a($n.stats()),$a(ar.checks())]),o=a?.report??null;return{unreadSubmissions:t?.total??null,visitorTrend:n?.daily.map(e=>e.count)??[],visitorTotal:n?.humans??null,draftCount:r?.total??null,publishedCount:i?.publishedCount??null,aeoContentWithFindings:o?o.posts.filter(e=>e.findings.length>0).length:null,aeoContentChecked:o?o.posts.length:null}},[e])}function no(){let{session:e,settings:t}=ur(),{data:n,loading:r}=to(e.role);return(0,M.jsxs)(`div`,{className:`shell`,children:[(0,M.jsx)(Na,{}),(0,M.jsxs)(`div`,{className:`chooser`,children:[(0,M.jsx)(`h1`,{children:`Where would you like to start?`}),(0,M.jsx)(`p`,{className:`sub`,children:`Three doors, each with a pulse. Setup sits below, quieter.`}),(0,M.jsx)(`div`,{className:`doors`,children:Ja.map((e,t)=>(0,M.jsxs)(A,{to:e.basePath,className:`door`,autoFocus:t===0,children:[(0,M.jsx)(`span`,{className:`glyph`,"aria-hidden":!0,children:e.glyph}),(0,M.jsx)(`h2`,{children:e.label}),(0,M.jsx)(`p`,{className:`blurb`,children:e.blurb}),(0,M.jsx)(ro,{id:e.id,pulses:n,loading:r}),(0,M.jsx)(`p`,{className:`open`,children:`Open`})]},e.id))}),(0,M.jsxs)(A,{className:`setup-row`,to:Ya.basePath,children:[(0,M.jsxs)(`span`,{children:[(0,M.jsx)(`b`,{children:`Setup`}),` - users, API keys, integrations, general settings`]}),(0,M.jsx)(`span`,{children:t?`${t.turnstile.enabled?`Turnstile on`:`Turnstile off`}, ${I(t.webhooks.length)} webhooks, ${I(t.allowedOrigins.length)} allowed origins`:`Reading configuration...`})]})]})]})}function ro({id:e,pulses:t,loading:n}){return n||!t?(0,M.jsx)(`p`,{className:`pulse quiet`,children:`Reading the last seven days...`}):e===`engagement`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`p`,{className:`pulse`,children:t.unreadSubmissions===null?(0,M.jsx)(`span`,{className:`muted`,children:`Inbox is owner only`}):t.unreadSubmissions>0?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`span`,{className:`badge`,children:[t.unreadSubmissions,` unread`]}),(0,M.jsx)(`span`,{className:`muted`,children:`in the inbox`})]}):(0,M.jsx)(`span`,{className:`muted`,children:`Nothing unread`})}),t.visitorTrend.length>0?(0,M.jsx)(Ua,{values:t.visitorTrend,mini:!0,label:`visits over the last ${t.visitorTrend.length} days`}):(0,M.jsx)(`p`,{className:`pulse quiet`,children:`No visits recorded yet`})]}):e===`content`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`p`,{className:`pulse`,children:t.draftCount===null?`Content is unavailable`:`${I(t.draftCount)} draft${t.draftCount===1?``:`s`} in flight`}),(0,M.jsx)(`p`,{className:`pulse quiet`,children:t.publishedCount===null?``:`${I(t.publishedCount)} published`})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`p`,{className:`pulse`,children:t.aeoContentChecked===null?`Checks are unavailable`:`${I(t.aeoContentChecked)} pieces checked`}),(0,M.jsx)(`p`,{className:`pulse quiet`,children:t.aeoContentWithFindings===null?``:t.aeoContentWithFindings===0?`Nothing to fix`:`${I(t.aeoContentWithFindings)} with findings`})]})}function io(){let[e]=In(),t=e.get(`token`),[n,r]=(0,T.useState)(``),[i,a]=(0,T.useState)(null),[o,s]=(0,T.useState)(!1),[c,l]=(0,T.useState)(!1);async function u(e){if(e.preventDefault(),!t)return;a(null),s(!0);let{error:r}=await ja.resetPassword({newPassword:n,token:t});if(s(!1),r){a(r.message??`That reset link is no longer valid. Request a new one.`);return}l(!0)}return(0,M.jsx)(`div`,{className:`auth-screen`,children:(0,M.jsxs)(`div`,{className:`auth-card`,children:[(0,M.jsx)(`h1`,{children:`Choose a new password`}),t?c?(0,M.jsxs)(`p`,{className:`notice good`,role:`status`,children:[`Your password is changed. `,(0,M.jsx)(A,{to:`/`,children:`Sign in`}),`.`]}):(0,M.jsxs)(M.Fragment,{children:[i?(0,M.jsx)(`p`,{className:`notice bad`,role:`alert`,children:i}):null,(0,M.jsxs)(`form`,{onSubmit:e=>void u(e),children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`reset-password`,children:`New password`}),(0,M.jsx)(`input`,{id:`reset-password`,type:`password`,autoComplete:`new-password`,minLength:8,required:!0,value:n,onChange:e=>r(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`At least eight characters.`})]}),(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:o,children:o?`Saving...`:`Set new password`})]})]}):(0,M.jsx)(`p`,{className:`notice bad`,role:`alert`,children:`This link is missing its token. Request a new reset from the sign-in screen.`}),(0,M.jsx)(`p`,{className:`alt`,children:(0,M.jsx)(A,{to:`/`,children:`Back to sign in`})})]})})}async function ao(){try{return(await fetch(`/api/auth/sign-up/email`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`})).status!==403}catch{return!1}}function oo(){let[e,t]=(0,T.useState)(`sign-in`),[n,r]=(0,T.useState)(!0);return(0,T.useEffect)(()=>{let e=!1;return ao().then(n=>{e||(n&&t(`first-run`),r(!1))}),()=>{e=!0}},[]),n?(0,M.jsx)(`div`,{className:`auth-screen`,children:(0,M.jsx)(`p`,{className:`centered-note`,children:`Checking this site...`})}):(0,M.jsx)(`div`,{className:`auth-screen`,children:(0,M.jsx)(`div`,{className:`auth-card`,children:e===`first-run`?(0,M.jsx)(lo,{onSignIn:()=>t(`sign-in`)}):e===`forgot`?(0,M.jsx)(uo,{onBack:()=>t(`sign-in`)}):(0,M.jsx)(co,{onForgot:()=>t(`forgot`),onFirstRun:()=>t(`first-run`)})})})}function so(){window.location.assign(`/`)}function co({onForgot:e,onFirstRun:t}){let[n,r]=(0,T.useState)(``),[i,a]=(0,T.useState)(``),[o,s]=(0,T.useState)(null),[c,l]=(0,T.useState)(!1);async function u(e){e.preventDefault(),s(null),l(!0);let{error:t}=await ja.signIn.email({email:n,password:i});if(l(!1),t){s(t.message??`Sign-in failed. Check your email and password.`);return}so()}return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h1`,{children:`Sign in`}),(0,M.jsx)(`p`,{className:`sub`,children:`The admin for this we8 site.`}),o?(0,M.jsx)(`p`,{className:`notice bad`,role:`alert`,children:o}):null,(0,M.jsxs)(`form`,{onSubmit:e=>void u(e),children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`email`,children:`Email`}),(0,M.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`username`,required:!0,value:n,onChange:e=>r(e.target.value)})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`password`,children:`Password`}),(0,M.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:i,onChange:e=>a(e.target.value)})]}),(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:c,children:c?`Signing in...`:`Sign in`})]}),(0,M.jsxs)(`p`,{className:`alt`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn link`,onClick:e,children:`Forgot your password`}),(0,M.jsx)(`button`,{type:`button`,className:`btn link`,onClick:t,children:`First run on this site`})]})]})}function lo({onSignIn:e}){let[t,n]=(0,T.useState)(``),[r,i]=(0,T.useState)(``),[a,o]=(0,T.useState)(``),[s,c]=(0,T.useState)(null),[l,u]=(0,T.useState)(!1);async function d(e){e.preventDefault(),c(null),u(!0);let{error:n}=await ja.signUp.email({name:t,email:r,password:a});if(u(!1),n){c(n.message??`This site already has an account, so sign-up is closed. Sign in instead.`);return}so()}return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h1`,{children:`Create the owner account`}),(0,M.jsx)(`p`,{className:`sub`,children:`This site has no account yet. The first one created becomes the owner and holds settings, users, API keys, and the form inbox. Sign-up closes as soon as it exists.`}),s?(0,M.jsx)(`p`,{className:`notice bad`,role:`alert`,children:s}):null,(0,M.jsxs)(`form`,{onSubmit:e=>void d(e),children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`new-name`,children:`Your name`}),(0,M.jsx)(`input`,{id:`new-name`,type:`text`,required:!0,value:t,onChange:e=>n(e.target.value)})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`new-email`,children:`Email`}),(0,M.jsx)(`input`,{id:`new-email`,type:`email`,autoComplete:`username`,required:!0,value:r,onChange:e=>i(e.target.value)})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`new-password`,children:`Password`}),(0,M.jsx)(`input`,{id:`new-password`,type:`password`,autoComplete:`new-password`,minLength:8,required:!0,value:a,onChange:e=>o(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`At least eight characters.`})]}),(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:l,children:l?`Creating...`:`Create owner account`})]}),(0,M.jsx)(`p`,{className:`alt`,children:(0,M.jsx)(`button`,{type:`button`,className:`btn link`,onClick:e,children:`I already have an account`})})]})}function uo({onBack:e}){let[t,n]=(0,T.useState)(``),[r,i]=(0,T.useState)(!1),[a,o]=(0,T.useState)(null),[s,c]=(0,T.useState)(!1);async function l(e){e.preventDefault(),o(null),c(!0);let{error:n}=await ja.requestPasswordReset({email:t,redirectTo:`${window.location.origin}/reset-password`});if(c(!1),n){o(n.message??`Could not start a password reset.`);return}i(!0)}return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h1`,{children:`Reset your password`}),(0,M.jsx)(`p`,{className:`sub`,children:`We send a reset link to your address. A self-hosted site only sends mail once a sender is configured; without one the CMS drops the message rather than pretending.`}),a?(0,M.jsx)(`p`,{className:`notice bad`,role:`alert`,children:a}):null,r?(0,M.jsx)(`p`,{className:`notice good`,role:`status`,children:`If that address has an account, a reset link is on its way.`}):(0,M.jsxs)(`form`,{onSubmit:e=>void l(e),children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`forgot-email`,children:`Email`}),(0,M.jsx)(`input`,{id:`forgot-email`,type:`email`,required:!0,value:t,onChange:e=>n(e.target.value)})]}),(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:s,children:s?`Sending...`:`Send reset link`})]}),(0,M.jsx)(`p`,{className:`alt`,children:(0,M.jsx)(`button`,{type:`button`,className:`btn link`,onClick:e,children:`Back to sign in`})})]})}function z({title:e,description:t,actions:n,children:r}){let{pathname:i}=ft(),{session:a}=ur(),o=Za(i)??qa[0],{data:s}=eo(a.role),c=Qa(o,a.role);return(0,M.jsxs)(`div`,{className:`shell`,children:[(0,M.jsx)(Na,{crumb:o.label}),(0,M.jsxs)(`div`,{className:`ws`,children:[(0,M.jsxs)(`nav`,{className:`rail`,"aria-label":`${o.label} navigation`,children:[(0,M.jsx)(`p`,{className:`wsname`,children:o.label}),c.map(e=>(0,M.jsxs)(jn,{to:e.path,end:e.path===o.basePath,className:({isActive:e})=>e?`on`:void 0,children:[(0,M.jsx)(`span`,{className:`glyph`,"aria-hidden":!0,children:e.glyph}),(0,M.jsx)(`span`,{className:`label`,children:e.label}),e.badge===`unreadSubmissions`&&s?(0,M.jsx)(`span`,{className:`badge`,children:s}):null]},e.path)),(0,M.jsx)(A,{className:`back`,to:`/`,children:`Back to workspaces`})]}),(0,M.jsxs)(`main`,{className:`main`,children:[(0,M.jsxs)(`div`,{className:`page-head`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h2`,{children:e}),t?(0,M.jsx)(`p`,{className:`sub`,children:t}):null]}),n?(0,M.jsx)(`div`,{className:`toolbar`,children:n}):null]}),r]})]})]})}var fo=[7,30,90];function po(){let e=dr(),[t,n]=(0,T.useState)(30),r=j(()=>rr.visitStats(t),[t]),i=j(()=>rr.consentStats(t),[t]),a=j(()=>ar.crawlers(t),[t]),o=j(()=>e===`owner`?nr.list({pageSize:5}):Promise.resolve({items:[],page:1,pageSize:0,total:0}),[e]),s=j(()=>e===`owner`?nr.list({status:`new`,pageSize:1}):Promise.resolve({items:[],page:1,pageSize:0,total:0}),[e]),c=r.data,l=i.data?i.data.accepted+i.data.partial+i.data.declined:0;return(0,M.jsxs)(z,{title:`Overview`,description:`What happened on the site. The connections that feed these numbers live in Setup.`,actions:(0,M.jsx)(`select`,{className:`btn`,"aria-label":`Time window`,value:t,onChange:e=>n(Number(e.target.value)),children:fo.map(e=>(0,M.jsxs)(`option`,{value:e,children:[`Last `,e,` days`]},e))}),children:[r.loading&&!c?(0,M.jsx)(Wa,{what:`the last window`}):null,r.error?(0,M.jsx)(R,{message:r.error}):null,c?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`stats`,children:[(0,M.jsx)(Va,{value:c.humans,label:`Visits by people`}),(0,M.jsx)(Va,{value:e===`owner`?s.data?.total??0:`owner only`,label:`Unread submissions`}),(0,M.jsx)(Va,{value:c.bots,label:`Visits by bots`}),(0,M.jsx)(Va,{value:i.data&&l>0?Pa(i.data.accepted,l):`no data`,label:`Consent accepted`})]}),(0,M.jsx)(Ua,{values:c.daily.map(e=>e.count),label:`visits per day over the last ${t} days`}),(0,M.jsxs)(`div`,{className:`panelgrid`,children:[(0,M.jsx)(L,{title:`Top pages`,children:(0,M.jsx)(Ha,{empty:`No visits recorded in this window.`,rows:c.topPages.map(e=>({key:e.pathname,label:e.pathname,value:I(e.count)}))})}),(0,M.jsx)(L,{title:`Where visitors came from`,children:(0,M.jsx)(Ha,{empty:`No referrers recorded. Direct traffic carries none.`,rows:c.topReferrers.map(e=>({key:e.referrer,label:e.referrer,value:I(e.count)}))})}),(0,M.jsx)(L,{title:`Who is reading`,children:(0,M.jsx)(Ha,{empty:`Nothing classified yet.`,rows:c.byUserAgentClass.map(e=>({key:e.userAgentClass,label:Ba[e.userAgentClass]??e.userAgentClass,value:I(e.count)}))})}),(0,M.jsx)(L,{title:`Crawlers`,children:a.error?(0,M.jsx)(`p`,{className:`note`,children:a.error}):(0,M.jsx)(Ha,{empty:`No crawler visits in this window.`,rows:(a.data?.topCrawlers??[]).map(e=>({key:e.botName,label:`${e.botName} (${Ba[e.userAgentClass]??e.userAgentClass})`,value:I(e.count)}))})})]})]}):null,(0,M.jsxs)(`section`,{className:`panel`,style:{marginTop:10},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,M.jsx)(`h3`,{children:`Recent inbox`}),e===`owner`?(0,M.jsx)(A,{to:`/engagement/inbox`,children:`Open the inbox`}):null]}),e===`owner`?o.data&&o.data.items.length>0?(0,M.jsx)(`table`,{className:`wire`,children:(0,M.jsx)(`tbody`,{children:o.data.items.map(e=>(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`td`,{children:(0,M.jsx)(`span`,{className:e.status===`new`?`chip new`:`chip`,children:e.status})}),(0,M.jsx)(`td`,{children:e.name??e.email??`anonymous`}),(0,M.jsx)(`td`,{className:`muted`,children:e.formName??`unknown form`}),(0,M.jsx)(`td`,{className:`muted`,children:Ia(e.submittedAt)})]},e.id))})}):(0,M.jsx)(`p`,{className:`note`,children:`Nothing has come in yet.`}):(0,M.jsx)(`p`,{className:`note`,children:`The submission inbox is other people's personal data, so the CMS keeps it to the site owner.`})]})]})}var B=[`blog`,`article`,`news`,`research`,`whitepaper`,`case-study`],V=[`new`,`reviewing`,`resolved`,`spam`,`archived`],mo=[`contact`,`newsletter`,`custom`],ho=[`team`,`guest`,`advisor`,`partner`],go=[`owner`,`member`],_o=[`missing_description`,`missing_answer_summary`,`missing_question_heading`,`missing_json_ld`,`not_in_sitemap`];function vo(){let e=dr(),[t,n]=(0,T.useState)(`all`),[r,i]=(0,T.useState)(``),[a,o]=(0,T.useState)(null),s=j(()=>nr.list({pageSize:50,...t===`all`?{}:{status:t},...r?{search:r}:{}}),[t,r]);if(e!==`owner`)return(0,M.jsx)(z,{title:`Inbox`,children:(0,M.jsx)(Ga,{what:`The form submission inbox`})});let c=[...s.data?.items??[]].sort((e,t)=>{let n=e=>e===`new`?0:1;return n(e.status)-n(t.status)}),l=c.find(e=>e.id===a)??c[0]??null;return(0,M.jsxs)(z,{title:`Inbox`,description:`Form submissions, unread first. Marking one read or resolved changes only what you see here; nothing is sent to the person who wrote in.`,actions:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`input`,{type:`text`,"aria-label":`Search submissions`,placeholder:`Search`,className:`btn`,value:r,onChange:e=>i(e.target.value)}),(0,M.jsxs)(`select`,{className:`btn`,"aria-label":`Filter by status`,value:t,onChange:e=>n(e.target.value),children:[(0,M.jsx)(`option`,{value:`all`,children:`All statuses`}),V.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))]}),(0,M.jsx)(`a`,{className:`btn`,href:nr.exportCsvUrl({status:t===`all`?``:t,search:r}),children:`Export CSV`})]}),children:[s.loading&&!s.data?(0,M.jsx)(Wa,{what:`the inbox`}):null,s.error?(0,M.jsx)(R,{message:s.error}):null,s.data&&c.length===0?(0,M.jsx)(Ka,{title:`Nothing here yet`,children:`Submissions arrive from the forms embedded on the site. Every one is kept, including the ones marked spam.`}):null,c.length>0?(0,M.jsxs)(`div`,{className:`split`,children:[(0,M.jsxs)(`table`,{className:`wire`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Status`}),(0,M.jsx)(`th`,{children:`From`}),(0,M.jsx)(`th`,{children:`Form`}),(0,M.jsx)(`th`,{children:`When`})]})}),(0,M.jsx)(`tbody`,{children:c.map(e=>(0,M.jsxs)(`tr`,{className:`clickable`,onClick:()=>o(e.id),children:[(0,M.jsx)(`td`,{children:(0,M.jsx)(`span`,{className:e.status===`new`?`chip new`:`chip`,children:e.status})}),(0,M.jsx)(`td`,{children:(0,M.jsx)(`span`,{className:`k`,children:e.name??e.email??`anonymous`})}),(0,M.jsx)(`td`,{className:`muted`,children:e.formName??`unknown form`}),(0,M.jsx)(`td`,{className:`muted`,children:Ia(e.submittedAt)})]},e.id))})]}),l?(0,M.jsx)(yo,{id:l.id,onChanged:()=>{s.reload()}},l.id):null]}):null,s.data?(0,M.jsxs)(`p`,{className:`note muted`,style:{marginTop:10},children:[I(s.data.total),` submission`,s.data.total===1?``:`s`,` matched.`]}):null]})}function yo({id:e,onChanged:t}){let n=j(()=>nr.get(e),[e]),r=fr(),[i,a]=(0,T.useState)(null),o=n.data?.submission;if(n.loading&&!o)return(0,M.jsx)(L,{title:`Submission`,children:`Loading...`});if(!o)return(0,M.jsx)(L,{title:`Submission`,children:n.error??`not found`});async function s(i){await r.run(()=>nr.update(e,{status:i}))&&(n.reload(),t())}async function c(){await r.run(()=>nr.update(e,{notes:i??o?.notes??``}))&&n.reload()}return(0,M.jsxs)(L,{title:o.name??o.email??`Submission`,children:[r.error?(0,M.jsx)(R,{message:r.error}):null,(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Form`}),(0,M.jsx)(`span`,{children:o.formName??`unknown`})]}),(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Email`}),(0,M.jsx)(`span`,{children:o.email??`not given`})]}),(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Received`}),(0,M.jsx)(`span`,{children:Ia(o.submittedAt)})]}),o.sourcePage?(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Page`}),(0,M.jsx)(`span`,{children:o.sourcePage})]}):null,(0,M.jsx)(`h3`,{style:{marginTop:12},children:`What they sent`}),Object.entries(o.payload).length===0?(0,M.jsx)(`p`,{className:`note`,children:`The submission carried no extra fields.`}):Object.entries(o.payload).map(([e,t])=>(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:e}),(0,M.jsx)(`span`,{style:{maxWidth:`60%`,textAlign:`right`},children:typeof t==`string`?t:JSON.stringify(t)})]},e)),(0,M.jsxs)(`div`,{className:`field`,style:{marginTop:12},children:[(0,M.jsx)(`label`,{htmlFor:`submission-notes`,children:`Your notes`}),(0,M.jsx)(`textarea`,{id:`submission-notes`,value:i??o.notes??``,onChange:e=>a(e.target.value)})]}),(0,M.jsxs)(`div`,{className:`form-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn`,disabled:r.pending,onClick:()=>void c(),children:`Save notes`}),V.filter(e=>e!==o.status).map(e=>(0,M.jsxs)(`button`,{type:`button`,className:`btn`,disabled:r.pending,onClick:()=>void s(e),children:[`Mark `,e]},e))]})]})}function bo(){let e=j(()=>tr.list({pageSize:50,includeArchived:!0}),[]),t=fr(),[n,r]=(0,T.useState)(``),[i,a]=(0,T.useState)(`contact`);async function o(a){a.preventDefault(),await t.run(()=>tr.create({name:n,type:i}))&&(r(``),e.reload())}return(0,M.jsxs)(z,{title:`Forms`,description:`Named, typed forms the site embeds by key. Every form gets a honeypot field, a payload cap, and a short dedupe window without any configuration.`,children:[t.error?(0,M.jsx)(R,{message:t.error}):null,(0,M.jsxs)(`section`,{className:`panel`,style:{marginBottom:12},children:[(0,M.jsx)(`h3`,{children:`New form`}),(0,M.jsxs)(`form`,{onSubmit:e=>void o(e),children:[(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`form-name`,children:`Name`}),(0,M.jsx)(`input`,{id:`form-name`,type:`text`,required:!0,value:n,onChange:e=>r(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`The key is derived from the name and cannot change afterwards.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`form-type`,children:`Type`}),(0,M.jsx)(`select`,{id:`form-type`,value:i,onChange:e=>a(e.target.value),children:mo.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))}),(0,M.jsx)(`p`,{className:`hint`,children:`A label, not a schema: every form accepts whatever fields the page sends.`})]})]}),(0,M.jsx)(`div`,{className:`form-actions`,children:(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:t.pending||!n,children:t.pending?`Creating...`:`Create form`})})]})]}),e.loading&&!e.data?(0,M.jsx)(Wa,{what:`forms`}):null,e.error?(0,M.jsx)(R,{message:e.error}):null,e.data&&e.data.items.length===0?(0,M.jsx)(Ka,{title:`No forms yet`,children:`Create one above, then embed it on the site by its key. Submissions land in the inbox.`}):null,e.data?.items.map(t=>(0,M.jsx)(xo,{form:t,onChanged:e.reload},t.id))]})}function xo({form:e,onChanged:t}){let n=fr(),[r,i]=(0,T.useState)(e.settings),[a,o]=(0,T.useState)(!1);async function s(){await n.run(()=>tr.update(e.id,{settings:r}))&&t()}return(0,M.jsxs)(`section`,{className:`panel`,style:{marginBottom:10},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,M.jsxs)(`h3`,{children:[e.name,` `,(0,M.jsx)(`span`,{className:`chip`,children:e.key}),` `,e.archivedAt?(0,M.jsx)(`span`,{className:`chip`,children:`archived`}):null]}),(0,M.jsxs)(`span`,{className:`muted`,style:{fontSize:12},children:[I(e.submissionCount),` submission`,e.submissionCount===1?``:`s`,e.lastSubmissionAt?`, last ${Ia(e.lastSubmissionAt)}`:``]})]}),n.error?(0,M.jsx)(R,{message:n.error}):null,(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Embed key`}),(0,M.jsx)(`span`,{children:e.key})]}),(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Honeypot field`}),(0,M.jsx)(`span`,{children:e.settings.honeypotField})]}),(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Turnstile`}),(0,M.jsx)(`span`,{children:e.settings.turnstileEnabled?`on`:`off`})]}),(0,M.jsxs)(`div`,{className:`form-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>o(e=>!e),children:a?`Close`:`Edit settings`}),e.archivedAt?(0,M.jsx)(`button`,{type:`button`,className:`btn`,disabled:n.pending,onClick:()=>void n.run(()=>tr.unarchive(e.id)).then(t),children:`Unarchive`}):(0,M.jsx)(`button`,{type:`button`,className:`btn`,disabled:n.pending,onClick:()=>void n.run(()=>tr.archive(e.id)).then(t),children:`Archive`})]}),a?(0,M.jsxs)(`div`,{style:{marginTop:12},children:[(0,M.jsx)(`p`,{className:`hint`,style:{marginBottom:10},children:`The whole settings object is replaced on save, so an emptied field means cleared.`}),(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`honeypot-${e.id}`,children:`Honeypot field name`}),(0,M.jsx)(`input`,{id:`honeypot-${e.id}`,type:`text`,value:r.honeypotField,onChange:e=>i({...r,honeypotField:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:`A field real people never fill. Anything submitted in it is dropped.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`success-${e.id}`,children:`Success message`}),(0,M.jsx)(`input`,{id:`success-${e.id}`,type:`text`,value:r.successMessage??``,onChange:e=>i({...r,successMessage:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`notify-${e.id}`,children:`Notify addresses`}),(0,M.jsx)(`input`,{id:`notify-${e.id}`,type:`text`,value:(r.notifyEmails??[]).join(`, `),onChange:e=>i({...r,notifyEmails:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})}),(0,M.jsx)(`p`,{className:`hint`,children:`Overrides the site-wide list for this form. Up to ten addresses.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{children:`Bot protection`}),(0,M.jsxs)(`label`,{className:`check`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:r.turnstileEnabled,onChange:e=>i({...r,turnstileEnabled:e.target.checked})}),`Require Turnstile on this form`]}),(0,M.jsx)(`p`,{className:`hint`,children:`Only enforced when the deployment has a Turnstile secret. Without one, verification is skipped rather than failed.`})]})]}),(0,M.jsx)(`div`,{className:`form-actions`,children:(0,M.jsx)(`button`,{type:`button`,className:`btn primary`,disabled:n.pending,onClick:()=>void s(),children:n.pending?`Saving...`:`Save settings`})})]}):null]})}var H=5,So=50;function Co(){let e=dr(),t=j(async()=>{let e=[],t=0;for(let n=1;n<=H;n+=1){let r=await nr.list({page:n,pageSize:So});if(t=r.total,e.push(...r.items),e.length>=t)break}return{contacts:wo(e),scanned:e.length,total:t}},[e]);return e===`owner`?(0,M.jsxs)(z,{title:`Contacts`,description:`Everyone who has written in, rolled up by email address. Built from the inbox, because in 0.1 that is where the CMS genuinely knows a person from.`,children:[t.loading&&!t.data?(0,M.jsx)(Wa,{what:`the inbox`}):null,t.error?(0,M.jsx)(R,{message:t.error}):null,t.data&&t.data.contacts.length===0?(0,M.jsx)(Ka,{title:`Nobody yet`,children:`Contacts appear once forms start receiving submissions that carry an email address.`}):null,t.data&&t.data.contacts.length>0?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`table`,{className:`wire`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Email`}),(0,M.jsx)(`th`,{children:`Name`}),(0,M.jsx)(`th`,{children:`Forms`}),(0,M.jsx)(`th`,{className:`right`,children:`Submissions`}),(0,M.jsx)(`th`,{children:`First seen`}),(0,M.jsx)(`th`,{children:`Last seen`})]})}),(0,M.jsx)(`tbody`,{children:t.data.contacts.map(e=>(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`td`,{children:(0,M.jsx)(`span`,{className:`k`,children:e.email})}),(0,M.jsx)(`td`,{children:e.name??``}),(0,M.jsx)(`td`,{className:`muted`,children:e.forms.join(`, `)}),(0,M.jsx)(`td`,{className:`right`,children:I(e.submissions)}),(0,M.jsx)(`td`,{className:`muted`,children:Ia(e.firstSeen)}),(0,M.jsx)(`td`,{className:`muted`,children:Ia(e.lastSeen)})]},e.email))})]}),(0,M.jsxs)(`p`,{className:`note muted`,style:{marginTop:10},children:[I(t.data.contacts.length),` people from`,` `,I(t.data.scanned),` of `,I(t.data.total),` submissions`,t.data.scanned<t.data.total?`. The roll-up reads the most recent 250; older submissions are in the inbox and in the CSV export.`:`.`]})]}):null]}):(0,M.jsx)(z,{title:`Contacts`,children:(0,M.jsx)(Ga,{what:`Contacts, which is built from the submission inbox,`})})}function wo(e){let t=new Map;for(let n of e){let e=n.email?.trim().toLowerCase();if(!e)continue;let r=t.get(e),i=n.formName??`unknown form`;if(!r){t.set(e,{email:e,name:n.name,submissions:1,forms:[i],firstSeen:n.submittedAt,lastSeen:n.submittedAt});continue}r.submissions+=1,r.name=r.name??n.name,r.forms.includes(i)||r.forms.push(i),n.submittedAt<r.firstSeen&&(r.firstSeen=n.submittedAt),n.submittedAt>r.lastSeen&&(r.lastSeen=n.submittedAt)}return[...t.values()].sort((e,t)=>e.lastSeen<t.lastSeen?1:-1)}var To=[30,90,365];function Eo(){let[e,t]=(0,T.useState)(90),n=j(()=>rr.consentStats(e),[e]),r=n.data,i=r?r.accepted+r.partial+r.declined:0,a=new Map;for(let e of r?.daily??[])a.set(e.date,(a.get(e.date)??0)+e.count);return(0,M.jsxs)(z,{title:`Consent`,description:`What visitors chose when the site asked. Recorded per session and never tied to a person.`,actions:(0,M.jsx)(`select`,{className:`btn`,"aria-label":`Time window`,value:e,onChange:e=>t(Number(e.target.value)),children:To.map(e=>(0,M.jsxs)(`option`,{value:e,children:[`Last `,e,` days`]},e))}),children:[n.loading&&!r?(0,M.jsx)(Wa,{what:`consent records`}):null,n.error?(0,M.jsx)(R,{message:n.error}):null,r&&i===0?(0,M.jsx)(Ka,{title:`No consent recorded yet`,children:`Records appear once the site sends consent events. The template does this from its own banner; a custom frontend posts to the same endpoint.`}):null,r&&i>0?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`stats`,children:[(0,M.jsx)(Va,{value:Pa(r.accepted,i),label:`Accepted everything`}),(0,M.jsx)(Va,{value:Pa(r.partial,i),label:`Accepted some`}),(0,M.jsx)(Va,{value:Pa(r.declined,i),label:`Declined`}),(0,M.jsx)(Va,{value:i,label:`Decisions recorded`})]}),(0,M.jsx)(Ua,{values:[...a.values()],label:`consent decisions per day over the last ${e} days`}),(0,M.jsxs)(`div`,{className:`panelgrid`,children:[(0,M.jsx)(L,{title:`Decisions`,children:(0,M.jsx)(Ha,{empty:`Nothing recorded.`,rows:[{key:`accepted`,label:`Accepted`,value:I(r.accepted)},{key:`partial`,label:`Partial`,value:I(r.partial)},{key:`declined`,label:`Declined`,value:I(r.declined)}]})}),(0,M.jsx)(L,{title:`Opted in to`,children:(0,M.jsx)(Ha,{empty:`Nothing recorded.`,rows:[{key:`analytics`,label:`Analytics`,value:`${I(r.analyticsOptIn)} (${Pa(r.analyticsOptIn,i)})`},{key:`performance`,label:`Performance`,value:`${I(r.performanceOptIn)} (${Pa(r.performanceOptIn,i)})`}]})})]})]}):null]})}var Do=[`all`,`draft`,`published`,`archived`];function Oo(){let[e,t]=(0,T.useState)(`all`),[n,r]=(0,T.useState)(!1),i=j(()=>$n.list({pageSize:50,...e===`all`?{}:{status:e}}),[e]);return(0,M.jsxs)(z,{title:`Posts`,description:`Draft, publish, version, rollback. Publishing writes an immutable snapshot; editing a published post stages a draft over it until you publish again.`,actions:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`select`,{"aria-label":`Filter by status`,className:`btn`,value:e,onChange:e=>t(e.target.value),children:Do.map(e=>(0,M.jsx)(`option`,{value:e,children:e===`all`?`All statuses`:e},e))}),(0,M.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:()=>r(!0),children:`New post`})]}),children:[n?(0,M.jsx)(Ao,{onClose:()=>r(!1)}):null,i.loading?(0,M.jsx)(Wa,{what:`posts`}):null,i.error?(0,M.jsx)(R,{message:i.error}):null,i.data&&i.data.items.length===0?(0,M.jsx)(Ka,{title:`No posts yet`,children:`Create the first one. A post starts as a draft and stays invisible to the public API until you publish it.`}):null,i.data&&i.data.items.length>0?(0,M.jsxs)(`table`,{className:`wire`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Title`}),(0,M.jsx)(`th`,{children:`Status`}),(0,M.jsx)(`th`,{children:`Type`}),(0,M.jsx)(`th`,{className:`right`,children:`Views`}),(0,M.jsx)(`th`,{children:`Updated`})]})}),(0,M.jsx)(`tbody`,{children:i.data.items.map(e=>(0,M.jsxs)(ko,{id:e.id,children:[(0,M.jsxs)(`td`,{children:[(0,M.jsx)(`span`,{className:`k`,children:e.title}),(0,M.jsxs)(`span`,{className:`muted`,style:{display:`block`,fontSize:12},children:[`/`,e.slug]})]}),(0,M.jsx)(`td`,{children:(0,M.jsxs)(`span`,{className:e.status===`published`?`chip pub`:`chip`,children:[e.status,e.hasPendingDraft?` + draft`:``]})}),(0,M.jsx)(`td`,{className:`muted`,children:e.type}),(0,M.jsx)(`td`,{className:`right`,children:I(e.viewCount)}),(0,M.jsx)(`td`,{className:`muted`,children:Ia(e.updatedAt)})]},e.id))})]}):null,i.data?(0,M.jsxs)(`p`,{className:`note muted`,style:{marginTop:10},children:[I(i.data.total),` post`,i.data.total===1?``:`s`,i.data.total>i.data.items.length?`, showing the first ${I(i.data.items.length)}`:``]}):null]})}function ko({id:e,children:t}){let n=mt();return(0,M.jsx)(`tr`,{className:`clickable`,onClick:()=>void n(`/content/posts/${e}`),children:t})}function Ao({onClose:e}){let t=mt(),[n,r]=(0,T.useState)(``),[i,a]=(0,T.useState)(`blog`),{pending:o,error:s,run:c}=fr();async function l(e){e.preventDefault();let r=await c(()=>$n.create({title:n,slug:Ra(n),type:i,content:`<p>Write the post here.</p>`}));r&&await t(`/content/posts/${r.post.id}`)}return(0,M.jsxs)(`section`,{className:`panel`,style:{marginBottom:12},children:[(0,M.jsx)(`h3`,{children:`New post`}),s?(0,M.jsx)(R,{message:s}):null,(0,M.jsxs)(`form`,{onSubmit:e=>void l(e),children:[(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`new-post-title`,children:`Title`}),(0,M.jsx)(`input`,{id:`new-post-title`,type:`text`,required:!0,value:n,onChange:e=>r(e.target.value)}),(0,M.jsxs)(`p`,{className:`hint`,children:[`The slug becomes `,Ra(n)||`a-slug`,` and can be edited.`]})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`new-post-type`,children:`Type`}),(0,M.jsx)(`select`,{id:`new-post-type`,value:i,onChange:e=>a(e.target.value),children:B.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))}),(0,M.jsx)(`p`,{className:`hint`,children:`Type picks the site section and the JSON-LD type. It locks once the post is published.`})]})]}),(0,M.jsxs)(`div`,{className:`form-actions`,children:[(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:o||!n,children:o?`Creating...`:`Create and edit`}),(0,M.jsx)(`button`,{className:`btn`,type:`button`,onClick:e,children:`Cancel`})]})]})]})}function U(){let{id:e=``}=gt(),t=mt(),n=j(()=>$n.get(e),[e]),r=j(()=>er.list({pageSize:50}),[]),i=j(()=>$n.versions(e),[e]),a=fr();if(n.loading&&!n.data)return(0,M.jsx)(z,{title:`Post`,children:(0,M.jsx)(Wa,{what:`the post`})});if(n.error||!n.data)return(0,M.jsxs)(z,{title:`Post`,children:[(0,M.jsx)(R,{message:n.error??`that post could not be loaded`}),(0,M.jsx)(A,{className:`btn`,to:`/content`,children:`Back to posts`})]});let o=n.data.post;async function s(e){await a.run(e)&&(n.reload(),i.reload())}return(0,M.jsxs)(z,{title:o.title,description:`/${o.slug}`,actions:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(A,{className:`btn`,to:`/content`,children:`All posts`}),o.status===`archived`?(0,M.jsx)(`button`,{type:`button`,className:`btn`,disabled:a.pending,onClick:()=>void s(()=>$n.unarchive(e)),children:`Unarchive`}):(0,M.jsx)(`button`,{type:`button`,className:`btn`,disabled:a.pending,onClick:()=>void s(()=>$n.archive(e)),children:`Archive`}),(0,M.jsx)(`button`,{type:`button`,className:`btn primary`,disabled:a.pending,onClick:()=>void s(()=>$n.publish(e)),children:o.status===`published`?`Publish changes`:`Publish`})]}),children:[(0,M.jsx)(No,{post:o}),a.error?(0,M.jsx)(R,{message:a.error}):null,(0,M.jsxs)(`div`,{className:`editor-split`,children:[(0,M.jsx)(Mo,{post:o,authors:r.data?.items??[],onSaved:()=>n.reload(),onDeleted:()=>void t(`/content`),onLifecycle:s},jo(o)),(0,M.jsx)(`div`,{style:{display:`grid`,gap:10},children:(0,M.jsxs)(L,{title:`Versions`,children:[i.data&&i.data.versions.length>0?i.data.versions.map(t=>(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsxs)(`span`,{className:`k`,children:[`v`,t.version,t.version===o.currentVersionNumber?` (live)`:``]}),(0,M.jsxs)(`span`,{children:[Ia(t.publishedAt),t.version===o.currentVersionNumber?null:(0,M.jsxs)(M.Fragment,{children:[` `,(0,M.jsx)(`button`,{type:`button`,className:`btn link`,disabled:a.pending,onClick:()=>void s(()=>$n.rollback(e,t.version)),children:`Roll back`})]})]})]},t.id)):(0,M.jsx)(`p`,{className:`note`,children:`Never published, so there are no versions yet.`}),(0,M.jsx)(`p`,{className:`note`,style:{marginTop:8},children:`Rolling back copies an old version forward as a new one. Nothing in the history is rewritten.`})]})})]})]})}function jo(e){return[e.id,e.updatedAt,e.currentVersionNumber,e.hasPendingDraft].join(`:`)}function Mo({post:e,authors:t,onSaved:n,onDeleted:r,onLifecycle:i}){let a=fr(),[o,s]=(0,T.useState)(!1),[c,l]=(0,T.useState)(()=>({title:e.title,slug:e.slug,type:e.type,excerpt:e.excerpt??``,content:e.content,category:e.category??``,tags:e.tags,answerSummary:e.answerSummary??``,questionHeading:e.questionHeading??``,authorIds:e.authorIds??[]})),u=e=>{s(!1),l(t=>({...t,...e}))};async function d(t){t.preventDefault(),await a.run(()=>$n.save(e.id,c))&&(s(!0),n())}let f=e.currentVersionNumber!==null;return(0,M.jsxs)(`div`,{children:[a.error?(0,M.jsx)(R,{message:a.error}):null,o?(0,M.jsxs)(`p`,{className:`notice good`,role:`status`,children:[`Saved. `,e.status===`published`?`Publish to make it live.`:``]}):null,(0,M.jsxs)(`form`,{onSubmit:e=>void d(e),children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`title`,children:`Title`}),(0,M.jsx)(`input`,{id:`title`,type:`text`,value:c.title??``,onChange:e=>u({title:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`slug`,children:`Slug`}),(0,M.jsx)(`input`,{id:`slug`,type:`text`,disabled:f,value:c.slug??``,onChange:e=>u({slug:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:f?`Locked: this post has been published, and changing the slug would move a live URL.`:`Lowercase and hyphens. Locks once the post is first published.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`type`,children:`Type`}),(0,M.jsx)(`select`,{id:`type`,value:c.type??`blog`,disabled:f,onChange:e=>u({type:e.target.value}),children:B.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))}),(0,M.jsx)(`p`,{className:`hint`,children:`Drives the site section and the JSON-LD type.`})]})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`excerpt`,children:`Excerpt`}),(0,M.jsx)(`textarea`,{id:`excerpt`,value:c.excerpt??``,onChange:e=>u({excerpt:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:`The teaser meant to make a person click. Up to 500 characters.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`content`,children:`Content`}),(0,M.jsx)(`textarea`,{id:`content`,className:`tall`,value:c.content??``,onChange:e=>u({content:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:`HTML. The CMS sanitizes it on the way in.`})]}),(0,M.jsx)(`h3`,{style:{fontSize:13,margin:`18px 0 8px`},children:`Answer engine fields`}),(0,M.jsx)(`p`,{className:`hint`,style:{marginBottom:10},children:`These two are what make the post quotable. They feed the JSON-LD description and its question entity, and they are what the generated llms.txt describes each link with.`}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`questionHeading`,children:`Question heading`}),(0,M.jsx)(`input`,{id:`questionHeading`,type:`text`,maxLength:300,value:c.questionHeading??``,onChange:e=>u({questionHeading:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:`The question this post answers, phrased as a question: "How do I rotate an API key?". Answer engines match on question shape, and a noun-phrase title gives them nothing to match. Up to 300 characters; clear it to remove it.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`answerSummary`,children:`Answer summary`}),(0,M.jsx)(`textarea`,{id:`answerSummary`,maxLength:600,value:c.answerSummary??``,onChange:e=>u({answerSummary:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:`One or two plain sentences that stand on their own, written to be lifted verbatim. Different from the excerpt on purpose: the excerpt earns a click, this earns a quote. Up to 600 characters; clear it to remove it.`})]}),(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`category`,children:`Category`}),(0,M.jsx)(`input`,{id:`category`,type:`text`,value:c.category??``,onChange:e=>u({category:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`tags`,children:`Tags`}),(0,M.jsx)(`input`,{id:`tags`,type:`text`,value:(c.tags??[]).join(`, `),onChange:e=>u({tags:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})}),(0,M.jsx)(`p`,{className:`hint`,children:`Comma separated.`})]})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{children:`Authors`}),t.length===0?(0,M.jsxs)(`p`,{className:`hint`,children:[`No authors yet. Add one under `,(0,M.jsx)(A,{to:`/content/authors`,children:`Authors`}),`.`]}):t.map(e=>(0,M.jsxs)(`label`,{className:`check`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:(c.authorIds??[]).includes(e.id),onChange:t=>{let n=c.authorIds??[];u({authorIds:t.target.checked?[...n,e.id]:n.filter(t=>t!==e.id)})}}),e.name]},e.id))]}),(0,M.jsxs)(`div`,{className:`form-actions`,children:[(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:a.pending,children:a.pending?`Saving...`:`Save`}),e.hasPendingDraft?(0,M.jsx)(`button`,{type:`button`,className:`btn danger`,disabled:a.pending,onClick:()=>void i(()=>$n.discardDraft(e.id)),children:`Discard draft`}):null,(0,M.jsx)(`button`,{type:`button`,className:`btn danger`,disabled:a.pending,onClick:()=>{window.confirm(`Delete this post and all of its versions permanently?`)&&a.run(()=>$n.remove(e.id)).then(r)},children:`Delete`})]})]})]})}function No({post:e}){return e.status===`archived`?(0,M.jsx)(`p`,{className:`notice`,children:`Archived. It is out of the public API and the sitemap until you unarchive it.`}):e.status===`draft`?(0,M.jsx)(`p`,{className:`notice`,children:`Draft, never published. Saving edits it directly; publishing writes version 1 and makes it public.`}):e.hasPendingDraft?(0,M.jsxs)(`p`,{className:`notice`,children:[`Published as v`,e.currentVersionNumber,`, with unpublished changes staged over it. The public still reads v`,e.currentVersionNumber,` until you publish again.`]}):(0,M.jsxs)(`p`,{className:`notice`,children:[`Published as v`,e.currentVersionNumber,`. Saving stages a draft rather than changing what is live.`]})}function Po(){let e=j(()=>er.list({pageSize:50}),[]),t=fr(),[n,r]=(0,T.useState)(``),[i,a]=(0,T.useState)(`team`),[o,s]=(0,T.useState)(``);async function c(a){a.preventDefault(),await t.run(()=>er.create({name:n,slug:Ra(n),type:i,...o?{roleTitle:o}:{}}))&&(r(``),s(``),e.reload())}return(0,M.jsxs)(z,{title:`Authors`,description:`Who a post is credited to. An author carries a slug, a type, and an optional role and bio; posts reference them by id.`,children:[t.error?(0,M.jsx)(R,{message:t.error}):null,(0,M.jsxs)(`section`,{className:`panel`,style:{marginBottom:12},children:[(0,M.jsx)(`h3`,{children:`Add an author`}),(0,M.jsxs)(`form`,{onSubmit:e=>void c(e),children:[(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`author-name`,children:`Name`}),(0,M.jsx)(`input`,{id:`author-name`,type:`text`,required:!0,value:n,onChange:e=>r(e.target.value)}),(0,M.jsxs)(`p`,{className:`hint`,children:[`Slug: `,Ra(n)||`a-slug`]})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`author-type`,children:`Type`}),(0,M.jsx)(`select`,{id:`author-type`,value:i,onChange:e=>a(e.target.value),children:ho.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`author-role`,children:`Role`}),(0,M.jsx)(`input`,{id:`author-role`,type:`text`,value:o,onChange:e=>s(e.target.value)})]})]}),(0,M.jsx)(`div`,{className:`form-actions`,children:(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:t.pending||!n,children:t.pending?`Adding...`:`Add author`})})]})]}),e.loading?(0,M.jsx)(Wa,{what:`authors`}):null,e.error?(0,M.jsx)(R,{message:e.error}):null,e.data&&e.data.items.length===0?(0,M.jsx)(Ka,{title:`No authors yet`,children:`Add the first one above. A post can be published without a byline, but the JSON-LD is richer with one.`}):null,e.data&&e.data.items.length>0?(0,M.jsxs)(`table`,{className:`wire`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Name`}),(0,M.jsx)(`th`,{children:`Slug`}),(0,M.jsx)(`th`,{children:`Type`}),(0,M.jsx)(`th`,{children:`Role`}),(0,M.jsx)(`th`,{className:`right`,children:`Actions`})]})}),(0,M.jsx)(`tbody`,{children:e.data.items.map(n=>(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`td`,{children:n.name}),(0,M.jsx)(`td`,{className:`muted`,children:n.slug}),(0,M.jsx)(`td`,{className:`muted`,children:n.type}),(0,M.jsx)(`td`,{className:`muted`,children:n.roleTitle??``}),(0,M.jsx)(`td`,{className:`right`,children:(0,M.jsx)(`button`,{type:`button`,className:`btn link`,disabled:t.pending,onClick:()=>{window.confirm(`Remove ${n.name}?`)&&t.run(()=>er.remove(n.id)).then(e.reload)},children:`Remove`})})]},n.id))})]}):null]})}function Fo(){let e=j(()=>ir.list({pageSize:50}),[]),t=fr(),n=(0,T.useRef)(null),[r,i]=(0,T.useState)(null);async function a(r){r&&(await t.run(()=>ir.upload(r))&&e.reload(),n.current&&(n.current.value=``))}return(0,M.jsxs)(z,{title:`Media`,description:`Uploads live in the site's own R2 bucket and are served keyless, so an image inside published HTML loads for a reader who holds no API key.`,actions:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`input`,{ref:n,type:`file`,"aria-label":`Choose a file to upload`,onChange:e=>void a(e.target.files?.[0])}),t.pending?(0,M.jsx)(`span`,{className:`muted`,children:`Uploading...`}):null]}),children:[t.error?(0,M.jsx)(R,{message:t.error}):null,r?(0,M.jsxs)(`p`,{className:`notice good`,role:`status`,children:[`Copied `,r,` to the clipboard.`]}):null,e.loading?(0,M.jsx)(Wa,{what:`the library`}):null,e.error?(0,M.jsx)(R,{message:e.error}):null,e.data&&e.data.items.length===0?(0,M.jsx)(Ka,{title:`Nothing uploaded yet`,children:`Choose a file above. Images, documents, and anything else the site needs to serve.`}):null,e.data&&e.data.items.length>0?(0,M.jsx)(`div`,{className:`media-grid`,children:e.data.items.map(n=>{let r=ir.publicUrl(n.r2Key);return(0,M.jsxs)(`figure`,{className:`media-card`,children:[(0,M.jsx)(`div`,{className:`thumb`,children:n.contentType.startsWith(`image/`)?(0,M.jsx)(`img`,{src:r,alt:n.alt??n.filename,loading:`lazy`}):(0,M.jsx)(`span`,{children:n.contentType})}),(0,M.jsxs)(`figcaption`,{className:`meta`,children:[(0,M.jsx)(`span`,{className:`truncate`,title:n.filename,children:n.filename}),(0,M.jsxs)(`span`,{className:`muted`,children:[La(n.size),` - `,Fa(n.createdAt)]}),(0,M.jsxs)(`span`,{style:{display:`flex`,gap:8},children:[(0,M.jsx)(`button`,{type:`button`,className:`btn link`,onClick:()=>{navigator.clipboard?.writeText(r),i(n.filename)},children:`Copy URL`}),(0,M.jsx)(`button`,{type:`button`,className:`btn link`,disabled:t.pending,onClick:()=>{window.confirm(`Delete ${n.filename}?`)&&t.run(()=>ir.remove(n.id)).then(e.reload)},children:`Delete`})]})]})]},n.id)})}):null]})}function Io(){let{settings:e,reloadSettings:t,session:n}=ur(),r=j(()=>ar.checks(),[]),[i,a]=(0,T.useState)(`all`),o=r.data?.report,s=o?.posts??[],c=s.filter(e=>e.findings.length>0),l=i===`all`?s:i===`clean`?s.filter(e=>e.findings.length===0):s.filter(e=>e.findings.includes(i));return(0,M.jsxs)(z,{title:`SEO and AEO`,description:`What search engines and answer engines can read on this site. Every finding below is a concrete gap the CMS verified locally, never a score.`,actions:(0,M.jsxs)(`select`,{className:`btn`,"aria-label":`Filter by finding`,value:i,onChange:e=>a(e.target.value),children:[(0,M.jsx)(`option`,{value:`all`,children:`All content`}),(0,M.jsx)(`option`,{value:`clean`,children:`Passing`}),_o.map(e=>(0,M.jsx)(`option`,{value:e,children:za[e]},e))]}),children:[r.loading&&!o?(0,M.jsx)(Wa,{what:`the checks`}):null,r.error?(0,M.jsx)(R,{message:r.error}):null,o?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`stats`,children:[(0,M.jsx)(Va,{value:s.length,label:`Pieces checked`}),(0,M.jsx)(Va,{value:c.length,label:`With findings`}),(0,M.jsx)(Va,{value:s.length-c.length,label:`Passing`}),(0,M.jsx)(Va,{value:Ia(o.checkedAt),label:`Checked`})]}),(0,M.jsxs)(`div`,{className:`panelgrid`,style:{marginBottom:10},children:[(0,M.jsx)(L,{title:`Findings across the site`,children:(0,M.jsx)(Ha,{empty:`Nothing missing anywhere. That is the goal.`,rows:_o.filter(e=>(o.totals[e]??0)>0).map(e=>({key:e,label:za[e]??e,value:I(o.totals[e]??0)}))})}),(0,M.jsx)(L,{title:`Site documents`,children:(0,M.jsx)(Ha,{empty:`No site documents are checked.`,rows:o.documents.map(e=>({key:e.kind,label:e.kind,value:e.findings.length===0?`passing`:e.findings.map(e=>za[e]??e).join(`, `)}))})})]}),l.length===0?(0,M.jsx)(Ka,{title:`Nothing matches that filter`,children:`Try another finding, or switch back to all content.`}):(0,M.jsxs)(`table`,{className:`wire`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Content`}),(0,M.jsx)(`th`,{children:`Status`}),(0,M.jsx)(`th`,{children:`What is missing`})]})}),(0,M.jsx)(`tbody`,{children:l.map(e=>(0,M.jsxs)(`tr`,{children:[(0,M.jsxs)(`td`,{children:[(0,M.jsx)(A,{to:`/content/posts/${e.id}`,className:`k`,children:e.title}),(0,M.jsxs)(`span`,{className:`muted`,style:{display:`block`,fontSize:12},children:[`/`,e.slug,` - `,e.type]})]}),(0,M.jsx)(`td`,{children:(0,M.jsx)(`span`,{className:e.status===`published`?`chip pub`:`chip`,children:e.status})}),(0,M.jsx)(`td`,{children:e.findings.length===0?(0,M.jsx)(`span`,{className:`muted`,children:`passing`}):e.findings.map(e=>(0,M.jsx)(`span`,{className:`chip`,style:{marginRight:5},children:za[e]??e},e))})]},e.id))})]}),(0,M.jsxs)(`div`,{className:`panelgrid`,style:{marginTop:12},children:[(0,M.jsxs)(L,{title:`What is published for machines`,children:[(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Sitemap`}),(0,M.jsx)(`span`,{children:(0,M.jsx)(`a`,{href:`/v1/sitemap.xml`,target:`_blank`,rel:`noopener noreferrer`,children:`/v1/sitemap.xml`})})]}),(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`llms.txt`}),(0,M.jsx)(`span`,{children:e?.aeo.llmsTxtEnabled?(0,M.jsx)(A,{to:`/website/llms-txt`,children:`published`}):(0,M.jsx)(A,{to:`/website/llms-txt`,children:`turned off`})})]}),(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`JSON-LD`}),(0,M.jsx)(`span`,{children:e?.publisher?`on every published post`:`no publisher set`})]}),(0,M.jsx)(`p`,{className:`note`,style:{marginTop:8},children:`Every published post carries JSON-LD. An answer summary becomes its description, ahead of the excerpt, and a question heading alongside it declares a question entity, which is the structure an answer engine reads a question-and-answer page through. Both need a publisher configured below.`})]}),(0,M.jsx)(Lo,{settings:e,onSaved:t,canEdit:n.role===`owner`})]})]}):null]})}function Lo({settings:e,onSaved:t,canEdit:n}){let r=fr(),[i,a]=(0,T.useState)(null),[o,s]=(0,T.useState)(null),[c,l]=(0,T.useState)(!1);if(!e)return(0,M.jsx)(L,{title:`Site identity`,children:`Reading settings...`});let u=o??e.seo,d=i??e.publisher?.name??``;async function f(e){e.preventDefault(),l(!1),await r.run(()=>or.update({seo:u,...d?{publisher:{name:d}}:{}}))&&(l(!0),t())}return(0,M.jsxs)(L,{title:`Site identity`,children:[r.error?(0,M.jsx)(R,{message:r.error}):null,c?(0,M.jsx)(`p`,{className:`notice good`,role:`status`,children:`Saved.`}):null,(0,M.jsxs)(`form`,{onSubmit:e=>void f(e),children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`publisher`,children:`Publisher name`}),(0,M.jsx)(`input`,{id:`publisher`,type:`text`,disabled:!n,value:d,onChange:e=>a(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`The organization JSON-LD credits. Without it a post publishes no publisher, which the check reports as missing JSON-LD.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`default-title`,children:`Default title`}),(0,M.jsx)(`input`,{id:`default-title`,type:`text`,disabled:!n,value:u.defaultTitle??``,onChange:e=>s({...u,defaultTitle:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`title-template`,children:`Title template`}),(0,M.jsx)(`input`,{id:`title-template`,type:`text`,disabled:!n,value:u.titleTemplate??``,onChange:e=>s({...u,titleTemplate:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:`%s is the page title, as in "%s | Acme Co".`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`meta-description`,children:`Meta description`}),(0,M.jsx)(`textarea`,{id:`meta-description`,disabled:!n,value:u.metaDescription??``,onChange:e=>s({...u,metaDescription:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsxs)(`label`,{className:`check`,children:[(0,M.jsx)(`input`,{type:`checkbox`,disabled:!n,checked:u.discourageSearchEngines,onChange:e=>s({...u,discourageSearchEngines:e.target.checked})}),`Ask search engines not to index this site`]}),(0,M.jsx)(`p`,{className:`hint`,children:`Advertised to the frontend, which emits the robots directives. The CMS stores it; it cannot enforce it.`})]}),n?(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:r.pending,children:r.pending?`Saving...`:`Save site identity`}):(0,M.jsx)(`p`,{className:`note`,children:`Changing settings is limited to the site owner.`})]})]})}function Ro(){let{settings:e,reloadSettings:t,session:n}=ur(),r=j(()=>ar.llmsTxt(),[]),i=fr(),[a,o]=(0,T.useState)(null),[s,c]=(0,T.useState)(!1),l=a??e?.aeo??null,u=n.role===`owner`;async function d(e){e.preventDefault(),l&&(c(!1),await i.run(()=>or.update({aeo:l}))&&(c(!0),t(),r.reload()))}return(0,M.jsxs)(z,{title:`llms.txt`,description:`A plain-text index of this site written for answer engines, in the llmstxt.org convention: the site name, one sentence about the site, then links described by their answer summaries.`,actions:(0,M.jsx)(`a`,{className:`btn`,href:`/llms.txt`,target:`_blank`,rel:`noopener noreferrer`,children:`Open the live file`}),children:[i.error?(0,M.jsx)(R,{message:i.error}):null,s?(0,M.jsx)(`p`,{className:`notice good`,role:`status`,children:`Saved.`}):null,(0,M.jsxs)(`div`,{className:`split`,children:[(0,M.jsxs)(L,{title:`Preview`,children:[r.loading&&!r.data?(0,M.jsx)(Wa,{what:`the document`}):null,r.error?(0,M.jsx)(R,{message:r.error}):null,r.data?(0,M.jsx)(`pre`,{style:{whiteSpace:`pre-wrap`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,fontSize:12.5,margin:0,maxHeight:460,overflow:`auto`},children:r.data}):null,(0,M.jsx)(`p`,{className:`note`,style:{marginTop:10},children:`This is generation's output. A hand-authored llms-txt site document wins over it outright at the live URL: a site owner who wrote the file by hand meant it.`})]}),(0,M.jsx)(L,{title:`Settings`,children:l?(0,M.jsxs)(`form`,{onSubmit:e=>void d(e),children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`site-summary`,children:`Site summary`}),(0,M.jsx)(`textarea`,{id:`site-summary`,maxLength:1e3,disabled:!u,value:l.siteSummary??``,onChange:e=>o({...l,siteSummary:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:`The one sentence an answer engine should be able to lift about the site as a whole. It heads the document, and it is the site-level counterpart of a post's answer summary.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsxs)(`label`,{className:`check`,children:[(0,M.jsx)(`input`,{type:`checkbox`,disabled:!u,checked:l.llmsTxtEnabled,onChange:e=>o({...l,llmsTxtEnabled:e.target.checked})}),`Publish llms.txt at the site root`]}),(0,M.jsx)(`p`,{className:`hint`,children:`Turned off, the live URL returns a 404 rather than an empty file, because an empty file would claim the site has nothing to say.`})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`max-posts`,children:`Maximum posts listed`}),(0,M.jsx)(`input`,{id:`max-posts`,type:`number`,min:1,max:500,disabled:!u,value:l.llmsTxtMaxPosts,onChange:e=>o({...l,llmsTxtMaxPosts:Number(e.target.value)})}),(0,M.jsx)(`p`,{className:`hint`,children:`Newest first, so a large site publishes an index rather than a dump. Up to 500.`})]}),u?(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:i.pending,children:i.pending?`Saving...`:`Save`}):(0,M.jsx)(`p`,{className:`note`,children:`Changing settings is limited to the site owner.`})]}):(0,M.jsx)(`p`,{className:`note`,children:`Reading settings...`})})]})]})}function zo(){return(0,M.jsx)(z,{title:`Pages`,description:`Pages arrive with the data-driven page model in 0.2.`,children:(0,M.jsxs)(`div`,{className:`placeholder`,children:[(0,M.jsx)(`h3`,{children:`Not in this release`}),(0,M.jsx)(`p`,{children:`The 0.1 CMS stores posts, authors, forms, media, and the site's standing documents. It has no page model, so there is nothing here to list. Building a page editor over an endpoint that does not exist would only produce a screen that saves nowhere.`}),(0,M.jsx)(`p`,{style:{marginTop:10},children:`Until then, a page is a file in the frontend template. The template renders its own routes and pulls content from this CMS through the API client, so a new page is a new file in the site repository rather than a row here.`}),(0,M.jsxs)(`p`,{style:{marginTop:10},children:[`What the CMS does own about the site's structure today is its metadata and its machine-readable surfaces, on`,` `,(0,M.jsx)(A,{to:`/website`,children:`SEO and AEO`}),` and `,(0,M.jsx)(A,{to:`/website/llms-txt`,children:`llms.txt`}),`.`]})]})})}function Bo(){return(0,M.jsx)(z,{title:`Navigation`,description:`Menus and the footer arrive alongside pages in 0.2.`,children:(0,M.jsxs)(`div`,{className:`placeholder`,children:[(0,M.jsx)(`h3`,{children:`Not in this release`}),(0,M.jsx)(`p`,{children:`Navigation is a list of links into pages, and the 0.1 CMS has no pages to link to. It lands with the page model, so that a menu entry can point at something the CMS knows about rather than at a string somebody typed.`}),(0,M.jsx)(`p`,{style:{marginTop:10},children:`Today the site's menus live in the frontend template, beside the pages they lead to. The one piece of routing the CMS does own is where each content type is served from, which the template reads from the site configuration.`}),(0,M.jsxs)(`p`,{style:{marginTop:10},children:[`The content those links lead to is under `,(0,M.jsx)(A,{to:`/content`,children:`Content`}),`.`]})]})})}var Vo={content:`Posts and authors, and the whole editorial API.`,forms:`Forms, the public submission route, and the inbox.`,analytics:`The visit and consent beacons, and everything Engagement reads.`,media:`Uploads and the public media route.`,seo:`The sitemap and the JSON-LD carried on public post reads.`};function Ho(){let{settings:e,reloadSettings:t,health:n,session:r}=ur(),i=fr(),a=r.role===`owner`,[o,s]=(0,T.useState)(null),[c,l]=(0,T.useState)(null),[u,d]=(0,T.useState)(null),[f,p]=(0,T.useState)(!1);if(!e)return(0,M.jsx)(z,{title:`General`,children:(0,M.jsx)(`p`,{className:`centered-note`,children:`Reading settings...`})});let m=o??e.modules,h=c??e.postsPathPrefix,g=u??e.retentionDays;async function _(e){e.preventDefault(),p(!1),await i.run(()=>or.update({modules:m,postsPathPrefix:h,retentionDays:g}))&&(p(!0),t())}return(0,M.jsxs)(z,{title:`General`,description:`How this site is put together. Changing settings is limited to the site owner.`,children:[i.error?(0,M.jsx)(R,{message:i.error}):null,f?(0,M.jsx)(`p`,{className:`notice good`,role:`status`,children:`Saved.`}):null,a?null:(0,M.jsx)(`p`,{className:`notice`,children:`You are signed in as a member, so these values are shown but not editable. A member holds the whole editorial API; the configuration belongs to the owner.`}),(0,M.jsxs)(`form`,{onSubmit:e=>void _(e),children:[(0,M.jsxs)(`div`,{className:`panelgrid`,children:[(0,M.jsxs)(L,{title:`Modules`,children:[(0,M.jsx)(`p`,{className:`note`,style:{marginBottom:8},children:`A module turned off returns 404 on its routes, exactly as if they had never existed.`}),Object.keys(Vo).map(e=>(0,M.jsxs)(`div`,{className:`field`,style:{marginBottom:8},children:[(0,M.jsxs)(`label`,{className:`check`,children:[(0,M.jsx)(`input`,{type:`checkbox`,disabled:!a,checked:m[e],onChange:t=>s({...m,[e]:t.target.checked})}),e]}),(0,M.jsx)(`p`,{className:`hint`,children:Vo[e]})]},e))]}),(0,M.jsxs)(`div`,{style:{display:`grid`,gap:10},children:[(0,M.jsxs)(L,{title:`Where content is served`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`posts-prefix`,children:`Posts path prefix`}),(0,M.jsx)(`input`,{id:`posts-prefix`,type:`text`,disabled:!a,value:h,onChange:e=>l(e.target.value)}),(0,M.jsxs)(`p`,{className:`hint`,children:[`Where the frontend serves a post, as in `,h,`/a-post-slug. The sitemap and the JSON-LD build their absolute URLs from it.`]})]}),(0,M.jsxs)(`p`,{className:`note`,children:[`Per-type sections (`,B.join(`, `),`) can each override this prefix. The overrides are stored but have no screen in 0.1; a type without one falls back to the value above.`]})]}),(0,M.jsxs)(L,{title:`How long records are kept`,children:[(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`retention-visits`,children:`Visits, in days`}),(0,M.jsx)(`input`,{id:`retention-visits`,type:`number`,min:1,max:3650,disabled:!a,value:g.visits,onChange:e=>d({...g,visits:Number(e.target.value)})})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`retention-consent`,children:`Consent, in days`}),(0,M.jsx)(`input`,{id:`retention-consent`,type:`number`,min:1,max:3650,disabled:!a,value:g.consent,onChange:e=>d({...g,consent:Number(e.target.value)})})]})]}),(0,M.jsx)(`p`,{className:`note`,children:`A daily sweep deletes anything older. Form submissions are never swept: they are the record of a person who wrote in.`})]}),(0,M.jsxs)(L,{title:`This install`,children:[(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`CMS version`}),(0,M.jsx)(`span`,{children:n?.cmsVersion??`unknown`})]}),(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsx)(`span`,{className:`k`,children:`Signed in as`}),(0,M.jsxs)(`span`,{children:[r.email,` (`,r.role,`)`]})]})]})]})]}),a?(0,M.jsx)(`div`,{className:`form-actions`,children:(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:i.pending,children:i.pending?`Saving...`:`Save general settings`})}):null]})]})}function Uo(){let{session:e}=ur(),t=j(()=>sr.list(),[]),n=fr(),[r,i]=(0,T.useState)(``),[a,o]=(0,T.useState)(``),[s,c]=(0,T.useState)(``);if(e.role!==`owner`)return(0,M.jsx)(z,{title:`Users`,children:(0,M.jsx)(Ga,{what:`User management`})});let l=(t.data?.items??[]).filter(e=>e.role===`owner`).length;async function u(e){e.preventDefault(),await n.run(()=>sr.create({name:r,email:a,password:s}))&&(i(``),o(``),c(``),t.reload())}return(0,M.jsxs)(z,{title:`Users`,description:`An owner holds settings, the form inbox, API keys, and this screen. A member holds everything else, which is the entire editorial API.`,children:[n.error?(0,M.jsx)(R,{message:n.error}):null,(0,M.jsxs)(`section`,{className:`panel`,style:{marginBottom:12},children:[(0,M.jsx)(`h3`,{children:`Add a user`}),(0,M.jsx)(`p`,{className:`note`,style:{marginBottom:8},children:`New accounts are created as members. Promote one here afterwards if they need the owner surfaces. You set their first password and pass it on yourself; the CMS only sends mail once a sender is configured.`}),(0,M.jsxs)(`form`,{onSubmit:e=>void u(e),children:[(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`user-name`,children:`Name`}),(0,M.jsx)(`input`,{id:`user-name`,type:`text`,required:!0,value:r,onChange:e=>i(e.target.value)})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`user-email`,children:`Email`}),(0,M.jsx)(`input`,{id:`user-email`,type:`email`,required:!0,value:a,onChange:e=>o(e.target.value)})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`user-password`,children:`First password`}),(0,M.jsx)(`input`,{id:`user-password`,type:`password`,minLength:8,required:!0,autoComplete:`new-password`,value:s,onChange:e=>c(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`At least eight characters. They can change it after signing in.`})]})]}),(0,M.jsx)(`div`,{className:`form-actions`,children:(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:n.pending||!r||!a||!s,children:n.pending?`Creating...`:`Add user`})})]})]}),t.loading&&!t.data?(0,M.jsx)(Wa,{what:`users`}):null,t.error?(0,M.jsx)(R,{message:t.error}):null,t.data?(0,M.jsxs)(`table`,{className:`wire`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Email`}),(0,M.jsx)(`th`,{children:`Name`}),(0,M.jsx)(`th`,{children:`Role`}),(0,M.jsx)(`th`,{children:`Added`}),(0,M.jsx)(`th`,{className:`right`,children:`Actions`})]})}),(0,M.jsx)(`tbody`,{children:t.data.items.map(r=>{let i=r.id===e.userId,a=r.role===`owner`&&l<=1;return(0,M.jsxs)(`tr`,{children:[(0,M.jsxs)(`td`,{children:[(0,M.jsx)(`span`,{className:`k`,children:r.email}),i?(0,M.jsx)(`span`,{className:`chip`,children:`you`}):null]}),(0,M.jsx)(`td`,{children:r.name}),(0,M.jsx)(`td`,{children:(0,M.jsx)(`select`,{"aria-label":`Role for ${r.email}`,className:`btn`,value:r.role,disabled:n.pending||i||a,onChange:e=>{n.run(()=>sr.setRole(r.id,e.target.value)).then(t.reload)},children:go.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))})}),(0,M.jsx)(`td`,{className:`muted`,children:Fa(r.createdAt)}),(0,M.jsx)(`td`,{className:`right`,children:i?(0,M.jsx)(`span`,{className:`muted`,children:`Your own account`}):a?(0,M.jsx)(`span`,{className:`muted`,children:`The last owner`}):(0,M.jsx)(`button`,{type:`button`,className:`btn link`,disabled:n.pending,onClick:()=>{window.confirm(`Remove ${r.email} from this site?`)&&n.run(()=>sr.remove(r.id)).then(t.reload)},children:`Remove`})})]},r.id)})})]}):null,(0,M.jsx)(`p`,{className:`note muted`,style:{marginTop:10},children:`You cannot change or remove your own account here. Use the sign-in screen's password reset for your own password.`})]})}function Wo(){let{session:e}=ur(),t=j(()=>cr.list(),[]),n=fr(),[r,i]=(0,T.useState)(``),[a,o]=(0,T.useState)(null);if(e.role!==`owner`)return(0,M.jsx)(z,{title:`API keys`,children:(0,M.jsx)(Ga,{what:`API key management`})});async function s(e){let a=await n.run(()=>cr.create(e,r||void 0));a&&(o(a.key),i(``),t.reload())}let c=(t.data?.items??[]).filter(e=>!e.revokedAt),l=(t.data?.items??[]).filter(e=>e.revokedAt);return(0,M.jsxs)(z,{title:`API keys`,description:`Publishable keys for browser code, secret keys for servers. Revoking one takes effect on the very next request; there is no cache in front of the lookup.`,children:[n.error?(0,M.jsx)(R,{message:n.error}):null,a?(0,M.jsxs)(`div`,{className:`notice good`,role:`status`,children:[(0,M.jsx)(`strong`,{children:`This is the only time this key is shown.`}),` Copy it now. The CMS keeps only its hash, so it cannot be shown again and a lost key has to be replaced.`,(0,M.jsx)(`code`,{children:a.secret}),(0,M.jsx)(`button`,{type:`button`,className:`btn`,style:{marginTop:8},onClick:()=>o(null),children:`I have copied it`})]}):null,(0,M.jsxs)(`section`,{className:`panel`,style:{marginBottom:12},children:[(0,M.jsx)(`h3`,{children:`Create a key`}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`key-label`,children:`Label`}),(0,M.jsx)(`input`,{id:`key-label`,type:`text`,placeholder:`astro site, build pipeline`,value:r,onChange:e=>i(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`A human name so the list stays readable. Optional, but a list of prefixes with no labels tells nobody which key to revoke.`})]}),(0,M.jsxs)(`div`,{className:`form-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn primary`,disabled:n.pending,onClick:()=>void s(`pk`),children:`Create publishable key`}),(0,M.jsx)(`button`,{type:`button`,className:`btn`,disabled:n.pending,onClick:()=>void s(`sk`),children:`Create secret key`})]})]}),t.loading&&!t.data?(0,M.jsx)(Wa,{what:`keys`}):null,t.error?(0,M.jsx)(R,{message:t.error}):null,t.data&&t.data.items.length===0?(0,M.jsx)(Ka,{title:`No keys yet`,children:`A frontend needs a publishable key to read this site's public API. Create one above.`}):null,c.length>0?(0,M.jsxs)(`table`,{className:`wire`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Prefix`}),(0,M.jsx)(`th`,{children:`Kind`}),(0,M.jsx)(`th`,{children:`Label`}),(0,M.jsx)(`th`,{children:`Created`}),(0,M.jsx)(`th`,{children:`Last used`}),(0,M.jsx)(`th`,{className:`right`,children:`Actions`})]})}),(0,M.jsx)(`tbody`,{children:c.map(e=>(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`td`,{children:(0,M.jsxs)(`span`,{className:`k`,children:[e.prefix,`...`]})}),(0,M.jsx)(`td`,{children:(0,M.jsx)(`span`,{className:`chip`,children:e.kind===`pk`?`publishable`:`secret`})}),(0,M.jsx)(`td`,{children:e.label??``}),(0,M.jsx)(`td`,{className:`muted`,children:Fa(e.createdAt)}),(0,M.jsx)(`td`,{className:`muted`,children:e.lastUsedAt?Fa(e.lastUsedAt):`never`}),(0,M.jsx)(`td`,{className:`right`,children:(0,M.jsx)(`button`,{type:`button`,className:`btn link`,disabled:n.pending,onClick:()=>{window.confirm(`Revoke ${e.prefix}? Anything using it stops working.`)&&n.run(()=>cr.revoke(e.id)).then(t.reload)},children:`Revoke`})})]},e.id))})]}):null,l.length>0?(0,M.jsxs)(`section`,{className:`panel`,style:{marginTop:12},children:[(0,M.jsx)(`h3`,{children:`Revoked`}),l.map(e=>(0,M.jsxs)(`p`,{className:`rowline`,children:[(0,M.jsxs)(`span`,{className:`k`,children:[e.prefix,`... `,e.label??``]}),(0,M.jsxs)(`span`,{children:[`revoked `,Fa(e.revokedAt)]})]},e.id))]}):null]})}var Go=[`post.published`,`post.unpublished`,`form.submission.created`];function Ko(){let{settings:e,reloadSettings:t,session:n}=ur(),r=fr(),i=n.role===`owner`,[a,o]=(0,T.useState)(null),[s,c]=(0,T.useState)(null),[l,u]=(0,T.useState)(null),[d,f]=(0,T.useState)(null),[p,m]=(0,T.useState)(null),[h,g]=(0,T.useState)(!1);if(!e)return(0,M.jsx)(z,{title:`Integrations`,children:(0,M.jsx)(`p`,{className:`centered-note`,children:`Reading settings...`})});let _=a??e.allowedOrigins.join(`
12
+ `),v=s??e.notifyEmails.join(`, `),y=l??e.turnstile,b=d??e.gaMeasurementId??``,x=p??e.webhooks;async function ee(e){e.preventDefault(),g(!1),await r.run(()=>or.update({allowedOrigins:_.split(`
13
+ `).map(e=>e.trim()).filter(Boolean),notifyEmails:v.split(`,`).map(e=>e.trim()).filter(Boolean),turnstile:y,gaMeasurementId:b,webhooks:x}))&&(g(!0),t())}return(0,M.jsxs)(z,{title:`Integrations`,description:`What this site is connected to. Secrets live in the deployment, never here: this screen holds the configuration around them.`,children:[r.error?(0,M.jsx)(R,{message:r.error}):null,h?(0,M.jsx)(`p`,{className:`notice good`,role:`status`,children:`Saved.`}):null,i?null:(0,M.jsx)(`p`,{className:`notice`,children:`Shown but not editable: changing settings is limited to the site owner.`}),(0,M.jsxs)(`form`,{onSubmit:e=>void ee(e),children:[(0,M.jsxs)(`div`,{className:`intgrid`,style:{marginBottom:12},children:[(0,M.jsxs)(`div`,{className:`int`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`name`,children:`Turnstile`}),(0,M.jsx)(`p`,{className:`desc`,children:`Bot protection on the forms that ask for it`})]}),(0,M.jsx)(`span`,{className:y.enabled?`on-pill ok`:`on-pill`,children:y.enabled?`On`:`Off`})]}),(0,M.jsxs)(`div`,{className:`int`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`name`,children:`Google Analytics`}),(0,M.jsx)(`p`,{className:`desc`,children:`A measurement id the site config passes to the frontend`})]}),(0,M.jsx)(`span`,{className:b?`on-pill ok`:`on-pill`,children:b?`Configured`:`Off`})]}),(0,M.jsxs)(`div`,{className:`int`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`name`,children:`Webhooks`}),(0,M.jsx)(`p`,{className:`desc`,children:`On publish, on unpublish, on submission`})]}),(0,M.jsxs)(`span`,{className:x.length>0?`on-pill ok`:`on-pill`,children:[x.length,` configured`]})]}),(0,M.jsxs)(`div`,{className:`int`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`name`,children:`Email`}),(0,M.jsx)(`p`,{className:`desc`,children:`Submission notifications and password resets`})]}),(0,M.jsxs)(`span`,{className:e.notifyEmails.length>0?`on-pill ok`:`on-pill`,children:[e.notifyEmails.length,` recipients`]})]})]}),(0,M.jsxs)(`div`,{className:`panelgrid`,children:[(0,M.jsx)(L,{title:`Allowed origins`,children:(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`origins`,children:`One origin per line`}),(0,M.jsx)(`textarea`,{id:`origins`,disabled:!i,value:_,onChange:e=>o(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`Which browser origins may call this CMS. It bounds both the public API and this admin, so removing the origin the admin is served from would lock this screen out of its own worker.`})]})}),(0,M.jsxs)(L,{title:`Email notifications`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`notify`,children:`Notify addresses`}),(0,M.jsx)(`input`,{id:`notify`,type:`text`,disabled:!i,value:v,onChange:e=>c(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`Comma separated, up to ten. A form can override this list with its own.`})]}),(0,M.jsx)(`p`,{className:`note`,children:`Sending is best-effort by construction: a submission that was stored returns success to the visitor whether or not the notification went anywhere, so a mail failure can never turn a captured lead into an error. A deployment with no sender configured drops the message rather than pretending.`})]}),(0,M.jsxs)(L,{title:`Turnstile`,children:[(0,M.jsx)(`div`,{className:`field`,children:(0,M.jsxs)(`label`,{className:`check`,children:[(0,M.jsx)(`input`,{type:`checkbox`,disabled:!i,checked:y.enabled,onChange:e=>u({...y,enabled:e.target.checked})}),`Turnstile is available on this site`]})}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`turnstile-sitekey`,children:`Site key`}),(0,M.jsx)(`input`,{id:`turnstile-sitekey`,type:`text`,disabled:!i,value:y.sitekey??``,onChange:e=>u({...y,sitekey:e.target.value})}),(0,M.jsx)(`p`,{className:`hint`,children:`The public half, which the frontend renders the widget with. The secret half is a deployment secret the CMS reads from its environment, never from this screen. Without it, verification is skipped rather than failed.`})]})]}),(0,M.jsx)(L,{title:`Google Analytics`,children:(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`ga`,children:`Measurement id`}),(0,M.jsx)(`input`,{id:`ga`,type:`text`,placeholder:`G-XXXXXXX`,disabled:!i,value:b,onChange:e=>f(e.target.value)}),(0,M.jsx)(`p`,{className:`hint`,children:`Stored and advertised in the public site config. The CMS never talks to Google itself; the frontend decides whether to load the tag, and the template only does so after consent.`})]})})]}),(0,M.jsxs)(L,{title:`Webhooks`,children:[(0,M.jsx)(`p`,{className:`note`,style:{marginBottom:10},children:`Each delivery carries a signed envelope naming this site by its URL. Deliveries are logged and swept with the other short-lived records.`}),x.map((e,t)=>(0,M.jsxs)(`div`,{className:`form-grid`,children:[(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{htmlFor:`hook-url-${t}`,children:`Endpoint`}),(0,M.jsx)(`input`,{id:`hook-url-${t}`,type:`url`,disabled:!i,value:e.url,onChange:e=>m(x.map((n,r)=>r===t?{...n,url:e.target.value}:n))})]}),(0,M.jsxs)(`div`,{className:`field`,children:[(0,M.jsx)(`label`,{children:`Events`}),Go.map(n=>(0,M.jsxs)(`label`,{className:`check`,children:[(0,M.jsx)(`input`,{type:`checkbox`,disabled:!i,checked:e.events.includes(n),onChange:e=>m(x.map((r,i)=>i===t?{...r,events:e.target.checked?[...r.events,n]:r.events.filter(e=>e!==n)}:r))}),n]},n)),i?(0,M.jsx)(`button`,{type:`button`,className:`btn link`,onClick:()=>m(x.filter((e,n)=>n!==t)),children:`Remove this webhook`}):null]})]},t)),i?(0,M.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>m([...x,{url:``,events:[`post.published`]}]),children:`Add a webhook`}):null]}),i?(0,M.jsx)(`div`,{className:`form-actions`,children:(0,M.jsx)(`button`,{className:`btn primary`,type:`submit`,disabled:r.pending,children:r.pending?`Saving...`:`Save integrations`})}):null]})]})}function qo(){return(0,M.jsx)(An,{children:(0,M.jsxs)(Bt,{children:[(0,M.jsx)(k,{path:`/reset-password`,element:(0,M.jsx)(io,{})}),(0,M.jsx)(k,{path:`/*`,element:(0,M.jsx)(Jo,{})})]})})}function Jo(){let{data:e,isPending:t}=ja.useSession();if(t)return(0,M.jsx)(`p`,{className:`centered-note`,children:`Loading...`});if(!e)return(0,M.jsx)(oo,{});let n={userId:e.user.id,email:e.user.email,name:e.user.name,role:Ma(e.user.role)};return(0,M.jsx)(mr,{session:n,children:(0,M.jsxs)(Bt,{children:[(0,M.jsx)(k,{path:`/`,element:(0,M.jsx)(no,{})}),(0,M.jsx)(k,{path:`/engagement`,element:(0,M.jsx)(po,{})}),(0,M.jsx)(k,{path:`/engagement/inbox`,element:(0,M.jsx)(vo,{})}),(0,M.jsx)(k,{path:`/engagement/inbox/:id`,element:(0,M.jsx)(vo,{})}),(0,M.jsx)(k,{path:`/engagement/forms`,element:(0,M.jsx)(bo,{})}),(0,M.jsx)(k,{path:`/engagement/contacts`,element:(0,M.jsx)(Co,{})}),(0,M.jsx)(k,{path:`/engagement/consent`,element:(0,M.jsx)(Eo,{})}),(0,M.jsx)(k,{path:`/content`,element:(0,M.jsx)(Oo,{})}),(0,M.jsx)(k,{path:`/content/posts/:id`,element:(0,M.jsx)(U,{})}),(0,M.jsx)(k,{path:`/content/authors`,element:(0,M.jsx)(Po,{})}),(0,M.jsx)(k,{path:`/content/media`,element:(0,M.jsx)(Fo,{})}),(0,M.jsx)(k,{path:`/website`,element:(0,M.jsx)(Io,{})}),(0,M.jsx)(k,{path:`/website/llms-txt`,element:(0,M.jsx)(Ro,{})}),(0,M.jsx)(k,{path:`/website/pages`,element:(0,M.jsx)(zo,{})}),(0,M.jsx)(k,{path:`/website/navigation`,element:(0,M.jsx)(Bo,{})}),(0,M.jsx)(k,{path:`/setup`,element:(0,M.jsx)(Ho,{})}),(0,M.jsx)(k,{path:`/setup/users`,element:(0,M.jsx)(Uo,{})}),(0,M.jsx)(k,{path:`/setup/keys`,element:(0,M.jsx)(Wo,{})}),(0,M.jsx)(k,{path:`/setup/integrations`,element:(0,M.jsx)(Ko,{})}),(0,M.jsx)(k,{path:`*`,element:(0,M.jsx)(Rt,{to:`/`,replace:!0})})]})})}var Yo=document.getElementById(`root`);if(!Yo)throw Error(`#root is missing from index.html`);(0,Hn.createRoot)(Yo).render((0,M.jsx)(T.StrictMode,{children:(0,M.jsx)(qo,{})}));
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="robots" content="noindex, nofollow" />
7
+ <title>we8 admin</title>
8
+ <script type="module" crossorigin src="/assets/index-pclPoFMV.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DfucQ1cu.css">
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ </body>
14
+ </html>
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@we8/admin-app",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/reveriext/we8-package.git",
8
+ "directory": "packages/admin"
9
+ },
10
+ "homepage": "https://github.com/reveriext/we8-package/tree/main/packages/admin#readme",
11
+ "bugs": "https://github.com/reveriext/we8-package/issues",
12
+ "type": "module",
13
+ "description": "The we8 admin portal SPA: a workspace-first React and Vite app for Engagement, Content, Website, and Setup.",
14
+ "keywords": [
15
+ "we8",
16
+ "cms",
17
+ "admin",
18
+ "portal",
19
+ "react"
20
+ ],
21
+ "files": [
22
+ "dist",
23
+ "README.md"
24
+ ],
25
+ "scripts": {
26
+ "dev": "vite",
27
+ "build": "vite build",
28
+ "preview": "vite preview",
29
+ "typecheck": "tsc -p tsconfig.json",
30
+ "test": "vitest run",
31
+ "prepack": "npm run build"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "devDependencies": {
37
+ "@testing-library/dom": "^10.4.1",
38
+ "@testing-library/react": "^16.3.0",
39
+ "@types/react": "^19.2.0",
40
+ "@types/react-dom": "^19.2.0",
41
+ "@vitejs/plugin-react": "^6.0.0",
42
+ "better-auth": "^1.7.1",
43
+ "jsdom": "^27.0.0",
44
+ "react": "^19.2.0",
45
+ "react-dom": "^19.2.0",
46
+ "react-router": "^8.1.0",
47
+ "vite": "^8.0.0",
48
+ "vitest": "^4.1.9"
49
+ },
50
+ "engines": {
51
+ "node": ">=20"
52
+ }
53
+ }