spriteforge 0.1.1__py3-none-any.whl
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.
- spriteforge/__init__.py +1 -0
- spriteforge/__main__.py +3 -0
- spriteforge/agents/__init__.py +0 -0
- spriteforge/agents/assets.py +109 -0
- spriteforge/agents/cancellation.py +12 -0
- spriteforge/agents/director.py +50 -0
- spriteforge/agents/models.py +63 -0
- spriteforge/agents/roles/art-director.md +15 -0
- spriteforge/agents/roles/art-reviewer.md +14 -0
- spriteforge/agents/roles/director.md +14 -0
- spriteforge/agents/roles/game-designer.md +15 -0
- spriteforge/agents/roles/level-tile-designer.md +16 -0
- spriteforge/agents/roles/librarian.md +13 -0
- spriteforge/agents/roles/menu-designer.md +15 -0
- spriteforge/agents/roles/pixel-artist.md +14 -0
- spriteforge/agents/roles/programmer.md +14 -0
- spriteforge/agents/roles/qa-playtester.md +13 -0
- spriteforge/agents/roles/sound-director.md +14 -0
- spriteforge/agents/roles.py +39 -0
- spriteforge/agents/router.py +233 -0
- spriteforge/agents/router_eval.py +145 -0
- spriteforge/agents/routing_state.py +133 -0
- spriteforge/agents/runtime.py +430 -0
- spriteforge/agents/workflow.py +389 -0
- spriteforge/app/__init__.py +0 -0
- spriteforge/app/agents_view.py +248 -0
- spriteforge/app/chat.py +114 -0
- spriteforge/app/extensions.py +115 -0
- spriteforge/app/index.html +279 -0
- spriteforge/app/local_only.py +49 -0
- spriteforge/app/server.py +358 -0
- spriteforge/app/static/assets/index-L2s1wlcp.css +1 -0
- spriteforge/app/static/assets/index-aBfzgLQl.js +71 -0
- spriteforge/app/static/assets/press-start-2p-latin-400-normal-BKfmdmKK.woff +0 -0
- spriteforge/app/static/assets/press-start-2p-latin-400-normal-xj9lRvVs.woff2 +0 -0
- spriteforge/app/static/index.html +13 -0
- spriteforge/app/static/press-start-2p-LICENSE.txt +93 -0
- spriteforge/app/studio.py +278 -0
- spriteforge/app/workers.py +73 -0
- spriteforge/cli.py +241 -0
- spriteforge/config.py +193 -0
- spriteforge/config.yaml +157 -0
- spriteforge/core/__init__.py +0 -0
- spriteforge/core/acting.py +16 -0
- spriteforge/core/cost.py +236 -0
- spriteforge/core/credentials.py +24 -0
- spriteforge/core/demo.py +79 -0
- spriteforge/core/forms.py +20 -0
- spriteforge/core/gates.py +175 -0
- spriteforge/core/security.py +42 -0
- spriteforge/core/state.py +222 -0
- spriteforge/core/team.py +15 -0
- spriteforge/core/usage.py +68 -0
- spriteforge/game/__init__.py +0 -0
- spriteforge/game/actors.py +377 -0
- spriteforge/game/agent_tools.py +178 -0
- spriteforge/game/art.py +2097 -0
- spriteforge/game/art_checks.py +190 -0
- spriteforge/game/art_review.py +518 -0
- spriteforge/game/build.py +134 -0
- spriteforge/game/bundle.py +1178 -0
- spriteforge/game/cli.py +119 -0
- spriteforge/game/codegen.py +433 -0
- spriteforge/game/codeinfo.py +154 -0
- spriteforge/game/dbsource.py +137 -0
- spriteforge/game/design.py +342 -0
- spriteforge/game/export.py +62 -0
- spriteforge/game/gamedb.py +191 -0
- spriteforge/game/image_cache.py +61 -0
- spriteforge/game/lessons.py +259 -0
- spriteforge/game/level_gen.py +118 -0
- spriteforge/game/level_preview.py +97 -0
- spriteforge/game/levels.py +934 -0
- spriteforge/game/loops.py +38 -0
- spriteforge/game/menus.py +712 -0
- spriteforge/game/mock_game.js +109 -0
- spriteforge/game/mock_platformer.js +58 -0
- spriteforge/game/motion.py +881 -0
- spriteforge/game/pipeline.py +1768 -0
- spriteforge/game/plan.py +502 -0
- spriteforge/game/playtest.py +318 -0
- spriteforge/game/qa.py +664 -0
- spriteforge/game/qa_checks.py +223 -0
- spriteforge/game/qa_runtime.py +565 -0
- spriteforge/game/reach.py +807 -0
- spriteforge/game/record.py +138 -0
- spriteforge/game/research.py +262 -0
- spriteforge/game/revision.py +225 -0
- spriteforge/game/sdk/API.md +104 -0
- spriteforge/game/sdk/FLOW.md +19 -0
- spriteforge/game/sdk/LEVELS.md +65 -0
- spriteforge/game/sdk/sf.js +418 -0
- spriteforge/game/sdk/sfflow.js +442 -0
- spriteforge/game/sdk/sflevel.js +683 -0
- spriteforge/game/sdk/sfsound-editor.js +225 -0
- spriteforge/game/sdk/sfsound.js +260 -0
- spriteforge/game/sdk/sounds.html +67 -0
- spriteforge/game/sounds.py +793 -0
- spriteforge/game/story.py +188 -0
- spriteforge/game/structure.py +98 -0
- spriteforge/game/team_reports.py +394 -0
- spriteforge/game/tilesets.py +70 -0
- spriteforge/game/title_art.py +186 -0
- spriteforge/genres/__init__.py +0 -0
- spriteforge/library/__init__.py +15 -0
- spriteforge/library/cli.py +126 -0
- spriteforge/library/describe.py +242 -0
- spriteforge/library/looks.py +154 -0
- spriteforge/library/models.py +79 -0
- spriteforge/library/store.py +422 -0
- spriteforge/library/tilesets/README.md +32 -0
- spriteforge/library/tilesets/gandalf-seasons.json +111 -0
- spriteforge/library/tilesets/pixel-crawler-dungeon.json +66 -0
- spriteforge/mcp/__init__.py +0 -0
- spriteforge/mcp/cli.py +58 -0
- spriteforge/mcp/client.py +57 -0
- spriteforge/mcp/filesystem_read.py +32 -0
- spriteforge/mcp/gamedb.py +56 -0
- spriteforge/mcp/library.py +179 -0
- spriteforge/mcp/memory.py +37 -0
- spriteforge/mcp/pixel_tools.py +145 -0
- spriteforge/mcp/registry.py +145 -0
- spriteforge/mcp/service.py +224 -0
- spriteforge/mcp/templates/context7.json +6 -0
- spriteforge/mcp/templates/fetch.json +6 -0
- spriteforge/mcp/templates/filesystem-read.json +6 -0
- spriteforge/mcp/templates/pixel-tools.json +6 -0
- spriteforge/memory/README.md +10 -0
- spriteforge/memory/__init__.py +0 -0
- spriteforge/memory/cli.py +131 -0
- spriteforge/memory/okf/__init__.py +1 -0
- spriteforge/memory/okf/catalog.py +331 -0
- spriteforge/memory/okf/codec.py +63 -0
- spriteforge/memory/okf/git.py +104 -0
- spriteforge/memory/okf/indexes.py +50 -0
- spriteforge/memory/okf/models.py +114 -0
- spriteforge/memory/okf/search.py +53 -0
- spriteforge/memory/okf/seed.py +81 -0
- spriteforge/memory/okf/seeds/genres.yaml +121 -0
- spriteforge/memory/okf/seeds/other.yaml +150 -0
- spriteforge/memory/okf/store.py +402 -0
- spriteforge/memory/okf/validate.py +115 -0
- spriteforge/pixel/__init__.py +17 -0
- spriteforge/pixel/atlas.py +110 -0
- spriteforge/pixel/grid.py +174 -0
- spriteforge/pixel/palette.py +156 -0
- spriteforge/pixel/palettes/dungeon.json +9 -0
- spriteforge/pixel/postprocess.py +170 -0
- spriteforge/pixel/preview.py +40 -0
- spriteforge/pixel/schemas.py +139 -0
- spriteforge/pixel/source.py +237 -0
- spriteforge/pixel/terrain.py +48 -0
- spriteforge/pixel/validate.py +138 -0
- spriteforge/prompts/anim_frame.txt +1 -0
- spriteforge/prompts/character.txt +1 -0
- spriteforge/prompts/item.txt +1 -0
- spriteforge/prompts/tile.txt +1 -0
- spriteforge/prompts/ui.txt +1 -0
- spriteforge/providers/__init__.py +0 -0
- spriteforge/providers/base.py +97 -0
- spriteforge/providers/http.py +38 -0
- spriteforge/providers/mock.py +111 -0
- spriteforge/providers/muse_image.py +60 -0
- spriteforge/providers/muse_search.py +91 -0
- spriteforge/providers/muse_spark.py +66 -0
- spriteforge/skills/__init__.py +0 -0
- spriteforge/skills/builtin/LICENSE-awesome-gamedev-agent-skills.txt +201 -0
- spriteforge/skills/builtin/NOTICE-awesome-gamedev-agent-skills.txt +15 -0
- spriteforge/skills/builtin/THIRD_PARTY.md +21 -0
- spriteforge/skills/builtin/audio-design/SKILL.md +190 -0
- spriteforge/skills/builtin/game-feel/SKILL.md +174 -0
- spriteforge/skills/builtin/game-ui-ux/SKILL.md +167 -0
- spriteforge/skills/builtin/level-design/SKILL.md +169 -0
- spriteforge/skills/builtin/phaser-arcade-physics/SKILL.md +17 -0
- spriteforge/skills/builtin/physics-tuning/SKILL.md +164 -0
- spriteforge/skills/builtin/pixel-art-prompting/SKILL.md +12 -0
- spriteforge/skills/builtin/platformer/SKILL.md +153 -0
- spriteforge/skills/builtin/puzzle/SKILL.md +143 -0
- spriteforge/skills/builtin/sprite-animation-frames/SKILL.md +11 -0
- spriteforge/skills/builtin/tileset-design/SKILL.md +10 -0
- spriteforge/skills/catalog.py +200 -0
- spriteforge/skills/cli.py +41 -0
- spriteforge/stages/__init__.py +0 -0
- spriteforge/stages/asset_context.py +301 -0
- spriteforge/stages/asset_models.py +192 -0
- spriteforge/stages/asset_render.py +366 -0
- spriteforge/stages/asset_review.py +140 -0
- spriteforge/stages/asset_store.py +94 -0
- spriteforge/stages/chat_changes.py +236 -0
- spriteforge/stages/concept.py +42 -0
- spriteforge/stages/game.py +1699 -0
- spriteforge/stages/game_confirm.py +112 -0
- spriteforge/stages/game_final.py +220 -0
- spriteforge/stages/game_record.py +246 -0
- spriteforge/stages/gameplay.py +218 -0
- spriteforge/stages/intake.py +372 -0
- spriteforge/stages/preview_assets.py +212 -0
- spriteforge/stages/preview_models.py +167 -0
- spriteforge/stages/preview_render.py +169 -0
- spriteforge/stages/preview_repair.py +61 -0
- spriteforge/stages/preview_review.py +169 -0
- spriteforge/stages/production.py +170 -0
- spriteforge/stages/references.py +105 -0
- spriteforge/stages/rewind.py +128 -0
- spriteforge/stages/workflow.py +440 -0
- spriteforge/templates/phaser/audit.js +45 -0
- spriteforge/templates/phaser/font.png +0 -0
- spriteforge/templates/phaser/font.xml +1 -0
- spriteforge/templates/phaser/preview.html +9 -0
- spriteforge/templates/phaser/room.js +49 -0
- spriteforge/templates/phaser/vendor/LICENSE.md +20 -0
- spriteforge/templates/phaser/vendor/phaser.min.js +1 -0
- spriteforge-0.1.1.dist-info/METADATA +364 -0
- spriteforge-0.1.1.dist-info/RECORD +218 -0
- spriteforge-0.1.1.dist-info/WHEEL +5 -0
- spriteforge-0.1.1.dist-info/entry_points.txt +2 -0
- spriteforge-0.1.1.dist-info/licenses/LICENSE +27 -0
- spriteforge-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var lf=e=>{throw TypeError(e)};var xs=(e,t,n)=>t.has(e)||lf("Cannot "+n);var w=(e,t,n)=>(xs(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?lf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),R=(e,t,n,r)=>(xs(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),q=(e,t,n)=>(xs(e,t,"access private method"),n);var jl=(e,t,n,r)=>({set _(i){R(e,t,i,n)},get _(){return w(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function _y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nd={exports:{}},Yo={},zd={exports:{}},G={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var xl=Symbol.for("react.element"),jy=Symbol.for("react.portal"),Iy=Symbol.for("react.fragment"),Ny=Symbol.for("react.strict_mode"),zy=Symbol.for("react.profiler"),Ly=Symbol.for("react.provider"),Ay=Symbol.for("react.context"),Fy=Symbol.for("react.forward_ref"),Ry=Symbol.for("react.suspense"),Dy=Symbol.for("react.memo"),Oy=Symbol.for("react.lazy"),of=Symbol.iterator;function My(e){return e===null||typeof e!="object"?null:(e=of&&e[of]||e["@@iterator"],typeof e=="function"?e:null)}var Ld={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ad=Object.assign,Fd={};function hi(e,t,n){this.props=e,this.context=t,this.refs=Fd,this.updater=n||Ld}hi.prototype.isReactComponent={};hi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rd(){}Rd.prototype=hi.prototype;function Ia(e,t,n){this.props=e,this.context=t,this.refs=Fd,this.updater=n||Ld}var Na=Ia.prototype=new Rd;Na.constructor=Ia;Ad(Na,hi.prototype);Na.isPureReactComponent=!0;var sf=Array.isArray,Dd=Object.prototype.hasOwnProperty,za={current:null},Od={key:!0,ref:!0,__self:!0,__source:!0};function Md(e,t,n){var r,i={},l=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(l=""+t.key),t)Dd.call(t,r)&&!Od.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var u=Array(s),a=0;a<s;a++)u[a]=arguments[a+2];i.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:xl,type:e,key:l,ref:o,props:i,_owner:za.current}}function By(e,t){return{$$typeof:xl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function La(e){return typeof e=="object"&&e!==null&&e.$$typeof===xl}function Uy(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var uf=/\/+/g;function ws(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Uy(""+e.key):t.toString(36)}function eo(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(l){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case xl:case jy:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+ws(o,0):r,sf(i)?(n="",e!=null&&(n=e.replace(uf,"$&/")+"/"),eo(i,t,n,"",function(a){return a})):i!=null&&(La(i)&&(i=By(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(uf,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",sf(e))for(var s=0;s<e.length;s++){l=e[s];var u=r+ws(l,s);o+=eo(l,t,n,u,i)}else if(u=My(e),typeof u=="function")for(e=u.call(e),s=0;!(l=e.next()).done;)l=l.value,u=r+ws(l,s++),o+=eo(l,t,n,u,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Il(e,t,n){if(e==null)return e;var r=[],i=0;return eo(e,r,"","",function(l){return t.call(n,l,i++)}),r}function $y(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ve={current:null},to={transition:null},Hy={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:to,ReactCurrentOwner:za};function Bd(){throw Error("act(...) is not supported in production builds of React.")}G.Children={map:Il,forEach:function(e,t,n){Il(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Il(e,function(){t++}),t},toArray:function(e){return Il(e,function(t){return t})||[]},only:function(e){if(!La(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};G.Component=hi;G.Fragment=Iy;G.Profiler=zy;G.PureComponent=Ia;G.StrictMode=Ny;G.Suspense=Ry;G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hy;G.act=Bd;G.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ad({},e.props),i=e.key,l=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,o=za.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)Dd.call(t,u)&&!Od.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&s!==void 0?s[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){s=Array(u);for(var a=0;a<u;a++)s[a]=arguments[a+2];r.children=s}return{$$typeof:xl,type:e.type,key:i,ref:l,props:r,_owner:o}};G.createContext=function(e){return e={$$typeof:Ay,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ly,_context:e},e.Consumer=e};G.createElement=Md;G.createFactory=function(e){var t=Md.bind(null,e);return t.type=e,t};G.createRef=function(){return{current:null}};G.forwardRef=function(e){return{$$typeof:Fy,render:e}};G.isValidElement=La;G.lazy=function(e){return{$$typeof:Oy,_payload:{_status:-1,_result:e},_init:$y}};G.memo=function(e,t){return{$$typeof:Dy,type:e,compare:t===void 0?null:t}};G.startTransition=function(e){var t=to.transition;to.transition={};try{e()}finally{to.transition=t}};G.unstable_act=Bd;G.useCallback=function(e,t){return Ve.current.useCallback(e,t)};G.useContext=function(e){return Ve.current.useContext(e)};G.useDebugValue=function(){};G.useDeferredValue=function(e){return Ve.current.useDeferredValue(e)};G.useEffect=function(e,t){return Ve.current.useEffect(e,t)};G.useId=function(){return Ve.current.useId()};G.useImperativeHandle=function(e,t,n){return Ve.current.useImperativeHandle(e,t,n)};G.useInsertionEffect=function(e,t){return Ve.current.useInsertionEffect(e,t)};G.useLayoutEffect=function(e,t){return Ve.current.useLayoutEffect(e,t)};G.useMemo=function(e,t){return Ve.current.useMemo(e,t)};G.useReducer=function(e,t,n){return Ve.current.useReducer(e,t,n)};G.useRef=function(e){return Ve.current.useRef(e)};G.useState=function(e){return Ve.current.useState(e)};G.useSyncExternalStore=function(e,t,n){return Ve.current.useSyncExternalStore(e,t,n)};G.useTransition=function(){return Ve.current.useTransition()};G.version="18.3.1";zd.exports=G;var K=zd.exports;/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Qy=K,Vy=Symbol.for("react.element"),qy=Symbol.for("react.fragment"),Wy=Object.prototype.hasOwnProperty,Ky=Qy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Gy={key:!0,ref:!0,__self:!0,__source:!0};function Ud(e,t,n){var r,i={},l=null,o=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Wy.call(t,r)&&!Gy.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Vy,type:e,key:l,ref:o,props:i,_owner:Ky.current}}Yo.Fragment=qy;Yo.jsx=Ud;Yo.jsxs=Ud;Nd.exports=Yo;var x=Nd.exports,di=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ar=typeof window>"u"||"Deno"in globalThis;function pt(){}function Yy(e,t){return typeof e=="function"?e(t):e}function au(e){return typeof e=="number"&&e>=0&&e!==1/0}function $d(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Or(e,t){return typeof e=="function"?e(t):e}function bt(e,t){return typeof e=="function"?e(t):e}function af(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:l,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Aa(o,t.options))return!1}else if(!Yi(t.queryKey,o))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||l&&!l(t))}function cf(e,t){const{exact:n,status:r,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(cr(t.options.mutationKey)!==cr(l))return!1}else if(!Yi(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Aa(e,t){return((t==null?void 0:t.queryKeyHashFn)||cr)(e)}function cr(e){return JSON.stringify(e,(t,n)=>cu(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Yi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Yi(e[n],t[n])):!1}function Hd(e,t){if(e===t)return e;const n=ff(e)&&ff(t);if(n||cu(e)&&cu(t)){const r=n?e:Object.keys(e),i=r.length,l=n?t:Object.keys(t),o=l.length,s=n?[]:{};let u=0;for(let a=0;a<o;a++){const f=n?a:l[a];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(s[f]=void 0,u++):(s[f]=Hd(e[f],t[f]),s[f]===e[f]&&e[f]!==void 0&&u++)}return i===o&&u===i?e:s}return t}function vo(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ff(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function cu(e){if(!hf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!hf(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xy(e){return new Promise(t=>{setTimeout(t,e)})}function fu(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Hd(e,t):t}function Jy(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Zy(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Qd=Symbol();function Vd(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Qd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Zn,kn,qr,wd,ev=(wd=class extends di{constructor(){super();U(this,Zn);U(this,kn);U(this,qr);R(this,qr,t=>{if(!ar&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){w(this,kn)||this.setEventListener(w(this,qr))}onUnsubscribe(){var t;this.hasListeners()||((t=w(this,kn))==null||t.call(this),R(this,kn,void 0))}setEventListener(t){var n;R(this,qr,t),(n=w(this,kn))==null||n.call(this),R(this,kn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){w(this,Zn)!==t&&(R(this,Zn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof w(this,Zn)=="boolean"?w(this,Zn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zn=new WeakMap,kn=new WeakMap,qr=new WeakMap,wd),Fa=new ev,Wr,xn,Kr,Sd,tv=(Sd=class extends di{constructor(){super();U(this,Wr,!0);U(this,xn);U(this,Kr);R(this,Kr,t=>{if(!ar&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){w(this,xn)||this.setEventListener(w(this,Kr))}onUnsubscribe(){var t;this.hasListeners()||((t=w(this,xn))==null||t.call(this),R(this,xn,void 0))}setEventListener(t){var n;R(this,Kr,t),(n=w(this,xn))==null||n.call(this),R(this,xn,t(this.setOnline.bind(this)))}setOnline(t){w(this,Wr)!==t&&(R(this,Wr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return w(this,Wr)}},Wr=new WeakMap,xn=new WeakMap,Kr=new WeakMap,Sd),ko=new tv;function hu(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function nv(e){return Math.min(1e3*2**e,3e4)}function qd(e){return(e??"online")==="online"?ko.isOnline():!0}var Wd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ss(e){return e instanceof Wd}function Kd(e){let t=!1,n=0,r=!1,i;const l=hu(),o=v=>{var C;r||(d(new Wd(v)),(C=e.abort)==null||C.call(e))},s=()=>{t=!0},u=()=>{t=!1},a=()=>Fa.isFocused()&&(e.networkMode==="always"||ko.isOnline())&&e.canRun(),f=()=>qd(e.networkMode)&&e.canRun(),c=v=>{var C;r||(r=!0,(C=e.onSuccess)==null||C.call(e,v),i==null||i(),l.resolve(v))},d=v=>{var C;r||(r=!0,(C=e.onError)==null||C.call(e,v),i==null||i(),l.reject(v))},h=()=>new Promise(v=>{var C;i=p=>{(r||a())&&v(p)},(C=e.onPause)==null||C.call(e)}).then(()=>{var v;i=void 0,r||(v=e.onContinue)==null||v.call(e)}),g=()=>{if(r)return;let v;const C=n===0?e.initialPromise:void 0;try{v=C??e.fn()}catch(p){v=Promise.reject(p)}Promise.resolve(v).then(c).catch(p=>{var E;if(r)return;const m=e.retry??(ar?0:3),y=e.retryDelay??nv,P=typeof y=="function"?y(n,p):y,T=m===!0||typeof m=="number"&&n<m||typeof m=="function"&&m(n,p);if(t||!T){d(p);return}n++,(E=e.onFail)==null||E.call(e,n,p),Xy(P).then(()=>a()?void 0:h()).then(()=>{t?d(p):g()})})};return{promise:l,cancel:o,continue:()=>(i==null||i(),l),cancelRetry:s,continueRetry:u,canStart:f,start:()=>(f()?g():h().then(g),l)}}function rv(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const l=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(u=>{n(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||o()}return u},batchCalls:s=>(...u)=>{l(()=>{s(...u)})},schedule:l,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var be=rv(),er,Cd,Gd=(Cd=class{constructor(){U(this,er)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),au(this.gcTime)&&R(this,er,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ar?1/0:5*60*1e3))}clearGcTimeout(){w(this,er)&&(clearTimeout(w(this,er)),R(this,er,void 0))}},er=new WeakMap,Cd),Gr,Yr,dt,De,gl,tr,Et,Gt,Ed,iv=(Ed=class extends Gd{constructor(t){super();U(this,Et);U(this,Gr);U(this,Yr);U(this,dt);U(this,De);U(this,gl);U(this,tr);R(this,tr,!1),R(this,gl,t.defaultOptions),this.setOptions(t.options),this.observers=[],R(this,dt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,R(this,Gr,lv(this.options)),this.state=t.state??w(this,Gr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=w(this,De))==null?void 0:t.promise}setOptions(t){this.options={...w(this,gl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&w(this,dt).remove(this)}setData(t,n){const r=fu(this.state.data,t,this.options);return q(this,Et,Gt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){q(this,Et,Gt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=w(this,De))==null?void 0:r.promise;return(i=w(this,De))==null||i.cancel(t),n?n.then(pt).catch(pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(w(this,Gr))}isActive(){return this.observers.some(t=>bt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!$d(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=w(this,De))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=w(this,De))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),w(this,dt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(w(this,De)&&(w(this,tr)?w(this,De).cancel({revert:!0}):w(this,De).cancelRetry()),this.scheduleGc()),w(this,dt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||q(this,Et,Gt).call(this,{type:"invalidate"})}fetch(t,n){var u,a,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(w(this,De))return w(this,De).continueRetry(),w(this,De).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(R(this,tr,!0),r.signal)})},l=()=>{const c=Vd(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),R(this,tr,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};i(o),(u=this.options.behavior)==null||u.onFetch(o,this),R(this,Yr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&q(this,Et,Gt).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const s=c=>{var d,h,g,v;Ss(c)&&c.silent||q(this,Et,Gt).call(this,{type:"error",error:c}),Ss(c)||((h=(d=w(this,dt).config).onError)==null||h.call(d,c,this),(v=(g=w(this,dt).config).onSettled)==null||v.call(g,this.state.data,c,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return R(this,De,Kd({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,h,g,v;if(c===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(C){s(C);return}(h=(d=w(this,dt).config).onSuccess)==null||h.call(d,c,this),(v=(g=w(this,dt).config).onSettled)==null||v.call(g,c,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:s,onFail:(c,d)=>{q(this,Et,Gt).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{q(this,Et,Gt).call(this,{type:"pause"})},onContinue:()=>{q(this,Et,Gt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),w(this,De).start()}},Gr=new WeakMap,Yr=new WeakMap,dt=new WeakMap,De=new WeakMap,gl=new WeakMap,tr=new WeakMap,Et=new WeakSet,Gt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Yd(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Ss(i)&&i.revert&&w(this,Yr)?{...w(this,Yr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),be.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),w(this,dt).notify({query:this,type:"updated",action:t})})},Ed);function Yd(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qd(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Mt,Pd,ov=(Pd=class extends di{constructor(t={}){super();U(this,Mt);this.config=t,R(this,Mt,new Map)}build(t,n,r){const i=n.queryKey,l=n.queryHash??Aa(i,n);let o=this.get(l);return o||(o=new iv({cache:this,queryKey:i,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){w(this,Mt).has(t.queryHash)||(w(this,Mt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=w(this,Mt).get(t.queryHash);n&&(t.destroy(),n===t&&w(this,Mt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return w(this,Mt).get(t)}getAll(){return[...w(this,Mt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>af(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>af(t,r)):n}notify(t){be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mt=new WeakMap,Pd),Bt,Ue,nr,Ut,pn,bd,sv=(bd=class extends Gd{constructor(t){super();U(this,Ut);U(this,Bt);U(this,Ue);U(this,nr);this.mutationId=t.mutationId,R(this,Ue,t.mutationCache),R(this,Bt,[]),this.state=t.state||Xd(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){w(this,Bt).includes(t)||(w(this,Bt).push(t),this.clearGcTimeout(),w(this,Ue).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){R(this,Bt,w(this,Bt).filter(n=>n!==t)),this.scheduleGc(),w(this,Ue).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){w(this,Bt).length||(this.state.status==="pending"?this.scheduleGc():w(this,Ue).remove(this))}continue(){var t;return((t=w(this,nr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,l,o,s,u,a,f,c,d,h,g,v,C,p,m,y,P,T,E,I;R(this,nr,Kd({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,M)=>{q(this,Ut,pn).call(this,{type:"failed",failureCount:j,error:M})},onPause:()=>{q(this,Ut,pn).call(this,{type:"pause"})},onContinue:()=>{q(this,Ut,pn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>w(this,Ue).canRun(this)}));const n=this.state.status==="pending",r=!w(this,nr).canStart();try{if(!n){q(this,Ut,pn).call(this,{type:"pending",variables:t,isPaused:r}),await((l=(i=w(this,Ue).config).onMutate)==null?void 0:l.call(i,t,this));const M=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t));M!==this.state.context&&q(this,Ut,pn).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const j=await w(this,nr).start();return await((a=(u=w(this,Ue).config).onSuccess)==null?void 0:a.call(u,j,t,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,j,t,this.state.context)),await((h=(d=w(this,Ue).config).onSettled)==null?void 0:h.call(d,j,null,this.state.variables,this.state.context,this)),await((v=(g=this.options).onSettled)==null?void 0:v.call(g,j,null,t,this.state.context)),q(this,Ut,pn).call(this,{type:"success",data:j}),j}catch(j){try{throw await((p=(C=w(this,Ue).config).onError)==null?void 0:p.call(C,j,t,this.state.context,this)),await((y=(m=this.options).onError)==null?void 0:y.call(m,j,t,this.state.context)),await((T=(P=w(this,Ue).config).onSettled)==null?void 0:T.call(P,void 0,j,this.state.variables,this.state.context,this)),await((I=(E=this.options).onSettled)==null?void 0:I.call(E,void 0,j,t,this.state.context)),j}finally{q(this,Ut,pn).call(this,{type:"error",error:j})}}finally{w(this,Ue).runNext(this)}}},Bt=new WeakMap,Ue=new WeakMap,nr=new WeakMap,Ut=new WeakSet,pn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),be.batch(()=>{w(this,Bt).forEach(r=>{r.onMutationUpdate(t)}),w(this,Ue).notify({mutation:this,type:"updated",action:t})})},bd);function Xd(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ot,yl,Td,uv=(Td=class extends di{constructor(t={}){super();U(this,ot);U(this,yl);this.config=t,R(this,ot,new Map),R(this,yl,Date.now())}build(t,n,r){const i=new sv({mutationCache:this,mutationId:++jl(this,yl)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Nl(t),r=w(this,ot).get(n)??[];r.push(t),w(this,ot).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Nl(t);if(w(this,ot).has(n)){const i=(r=w(this,ot).get(n))==null?void 0:r.filter(l=>l!==t);i&&(i.length===0?w(this,ot).delete(n):w(this,ot).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=w(this,ot).get(Nl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=w(this,ot).get(Nl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...w(this,ot).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>cf(n,r))}findAll(t={}){return this.getAll().filter(n=>cf(t,n))}notify(t){be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return be.batch(()=>Promise.all(t.map(n=>n.continue().catch(pt))))}},ot=new WeakMap,yl=new WeakMap,Td);function Nl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function df(e){return{onFetch:(t,n)=>{var f,c,d,h,g;const r=t.options,i=(d=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,l=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},u=0;const a=async()=>{let v=!1;const C=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},p=Vd(t.options,t.fetchOptions),m=async(y,P,T)=>{if(v)return Promise.reject();if(P==null&&y.pages.length)return Promise.resolve(y);const E={queryKey:t.queryKey,pageParam:P,direction:T?"backward":"forward",meta:t.options.meta};C(E);const I=await p(E),{maxPages:j}=t.options,M=T?Zy:Jy;return{pages:M(y.pages,I,j),pageParams:M(y.pageParams,P,j)}};if(i&&l.length){const y=i==="backward",P=y?av:pf,T={pages:l,pageParams:o},E=P(r,T);s=await m(T,E,y)}else{const y=e??l.length;do{const P=u===0?o[0]??r.initialPageParam:pf(r,s);if(u>0&&P==null)break;s=await m(s,P),u++}while(u<y)}return s};t.options.persister?t.fetchFn=()=>{var v,C;return(C=(v=t.options).persister)==null?void 0:C.call(v,a,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=a}}}function pf(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function av(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ye,wn,Sn,Xr,Jr,Cn,Zr,ei,_d,cv=(_d=class{constructor(e={}){U(this,ye);U(this,wn);U(this,Sn);U(this,Xr);U(this,Jr);U(this,Cn);U(this,Zr);U(this,ei);R(this,ye,e.queryCache||new ov),R(this,wn,e.mutationCache||new uv),R(this,Sn,e.defaultOptions||{}),R(this,Xr,new Map),R(this,Jr,new Map),R(this,Cn,0)}mount(){jl(this,Cn)._++,w(this,Cn)===1&&(R(this,Zr,Fa.subscribe(async e=>{e&&(await this.resumePausedMutations(),w(this,ye).onFocus())})),R(this,ei,ko.subscribe(async e=>{e&&(await this.resumePausedMutations(),w(this,ye).onOnline())})))}unmount(){var e,t;jl(this,Cn)._--,w(this,Cn)===0&&((e=w(this,Zr))==null||e.call(this),R(this,Zr,void 0),(t=w(this,ei))==null||t.call(this),R(this,ei,void 0))}isFetching(e){return w(this,ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return w(this,wn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=w(this,ye).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=w(this,ye).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Or(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return w(this,ye).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=w(this,ye).get(r.queryHash),l=i==null?void 0:i.state.data,o=Yy(t,l);if(o!==void 0)return w(this,ye).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return be.batch(()=>w(this,ye).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=w(this,ye).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=w(this,ye);be.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=w(this,ye),r={type:"active",...e};return be.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=be.batch(()=>w(this,ye).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(pt).catch(pt)}invalidateQueries(e={},t={}){return be.batch(()=>{if(w(this,ye).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=be.batch(()=>w(this,ye).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(pt)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(pt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=w(this,ye).build(this,t);return n.isStaleByTime(Or(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(pt).catch(pt)}fetchInfiniteQuery(e){return e.behavior=df(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(pt).catch(pt)}ensureInfiniteQueryData(e){return e.behavior=df(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ko.isOnline()?w(this,wn).resumePausedMutations():Promise.resolve()}getQueryCache(){return w(this,ye)}getMutationCache(){return w(this,wn)}getDefaultOptions(){return w(this,Sn)}setDefaultOptions(e){R(this,Sn,e)}setQueryDefaults(e,t){w(this,Xr).set(cr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...w(this,Xr).values()];let n={};return t.forEach(r=>{Yi(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){w(this,Jr).set(cr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...w(this,Jr).values()];let n={};return t.forEach(r=>{Yi(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...w(this,Sn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Aa(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===Qd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...w(this,Sn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){w(this,ye).clear(),w(this,wn).clear()}},ye=new WeakMap,wn=new WeakMap,Sn=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,Cn=new WeakMap,Zr=new WeakMap,ei=new WeakMap,_d),Ye,X,vl,$e,rr,ti,En,$t,kl,ni,ri,ir,lr,Pn,ii,ne,Li,du,pu,mu,gu,yu,vu,ku,Jd,jd,fv=(jd=class extends di{constructor(t,n){super();U(this,ne);U(this,Ye);U(this,X);U(this,vl);U(this,$e);U(this,rr);U(this,ti);U(this,En);U(this,$t);U(this,kl);U(this,ni);U(this,ri);U(this,ir);U(this,lr);U(this,Pn);U(this,ii,new Set);this.options=n,R(this,Ye,t),R(this,$t,null),R(this,En,hu()),this.options.experimental_prefetchInRender||w(this,En).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(w(this,X).addObserver(this),mf(w(this,X),this.options)?q(this,ne,Li).call(this):this.updateResult(),q(this,ne,gu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xu(w(this,X),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xu(w(this,X),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,q(this,ne,yu).call(this),q(this,ne,vu).call(this),w(this,X).removeObserver(this)}setOptions(t,n){const r=this.options,i=w(this,X);if(this.options=w(this,Ye).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bt(this.options.enabled,w(this,X))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");q(this,ne,ku).call(this),w(this,X).setOptions(this.options),r._defaulted&&!vo(this.options,r)&&w(this,Ye).getQueryCache().notify({type:"observerOptionsUpdated",query:w(this,X),observer:this});const l=this.hasListeners();l&&gf(w(this,X),i,this.options,r)&&q(this,ne,Li).call(this),this.updateResult(n),l&&(w(this,X)!==i||bt(this.options.enabled,w(this,X))!==bt(r.enabled,w(this,X))||Or(this.options.staleTime,w(this,X))!==Or(r.staleTime,w(this,X)))&&q(this,ne,du).call(this);const o=q(this,ne,pu).call(this);l&&(w(this,X)!==i||bt(this.options.enabled,w(this,X))!==bt(r.enabled,w(this,X))||o!==w(this,Pn))&&q(this,ne,mu).call(this,o)}getOptimisticResult(t){const n=w(this,Ye).getQueryCache().build(w(this,Ye),t),r=this.createResult(n,t);return dv(this,r)&&(R(this,$e,r),R(this,ti,this.options),R(this,rr,w(this,X).state)),r}getCurrentResult(){return w(this,$e)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){w(this,ii).add(t)}getCurrentQuery(){return w(this,X)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=w(this,Ye).defaultQueryOptions(t),r=w(this,Ye).getQueryCache().build(w(this,Ye),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return q(this,ne,Li).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),w(this,$e)))}createResult(t,n){var I;const r=w(this,X),i=this.options,l=w(this,$e),o=w(this,rr),s=w(this,ti),a=t!==r?t.state:w(this,vl),{state:f}=t;let c={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),M=!j&&mf(t,n),b=j&&gf(t,r,n,i);(M||b)&&(c={...c,...Yd(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:C}=c;if(n.select&&c.data!==void 0)if(l&&c.data===(o==null?void 0:o.data)&&n.select===w(this,kl))h=w(this,ni);else try{R(this,kl,n.select),h=n.select(c.data),h=fu(l==null?void 0:l.data,h,n),R(this,ni,h),R(this,$t,null)}catch(j){R(this,$t,j)}else h=c.data;if(n.placeholderData!==void 0&&h===void 0&&C==="pending"){let j;if(l!=null&&l.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))j=l.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((I=w(this,ri))==null?void 0:I.state.data,w(this,ri)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),R(this,$t,null)}catch(M){R(this,$t,M)}j!==void 0&&(C="success",h=fu(l==null?void 0:l.data,j,n),d=!0)}w(this,$t)&&(g=w(this,$t),h=w(this,ni),v=Date.now(),C="error");const p=c.fetchStatus==="fetching",m=C==="pending",y=C==="error",P=m&&p,T=h!==void 0;return{status:C,fetchStatus:c.fetchStatus,isPending:m,isSuccess:C==="success",isError:y,isInitialLoading:P,isLoading:P,data:h,dataUpdatedAt:c.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:p,isRefetching:p&&!m,isLoadingError:y&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:y&&T,isStale:Ra(t,n),refetch:this.refetch,promise:w(this,En)}}updateResult(t){const n=w(this,$e),r=this.createResult(w(this,X),this.options);if(R(this,rr,w(this,X).state),R(this,ti,this.options),w(this,rr).data!==void 0&&R(this,ri,w(this,X)),vo(r,n))return;if(this.options.experimental_prefetchInRender){const o=a=>{r.status==="error"?a.reject(r.error):r.data!==void 0&&a.resolve(r.data)},s=()=>{const a=R(this,En,r.promise=hu());o(a)},u=w(this,En);switch(u.status){case"pending":o(u);break;case"fulfilled":(r.status==="error"||r.data!==u.value)&&s();break;case"rejected":(r.status!=="error"||r.error!==u.reason)&&s();break}}R(this,$e,r);const i={},l=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!w(this,ii).size)return!0;const u=new Set(s??w(this,ii));return this.options.throwOnError&&u.add("error"),Object.keys(w(this,$e)).some(a=>{const f=a;return w(this,$e)[f]!==n[f]&&u.has(f)})};(t==null?void 0:t.listeners)!==!1&&l()&&(i.listeners=!0),q(this,ne,Jd).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&q(this,ne,gu).call(this)}},Ye=new WeakMap,X=new WeakMap,vl=new WeakMap,$e=new WeakMap,rr=new WeakMap,ti=new WeakMap,En=new WeakMap,$t=new WeakMap,kl=new WeakMap,ni=new WeakMap,ri=new WeakMap,ir=new WeakMap,lr=new WeakMap,Pn=new WeakMap,ii=new WeakMap,ne=new WeakSet,Li=function(t){q(this,ne,ku).call(this);let n=w(this,X).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(pt)),n},du=function(){q(this,ne,yu).call(this);const t=Or(this.options.staleTime,w(this,X));if(ar||w(this,$e).isStale||!au(t))return;const r=$d(w(this,$e).dataUpdatedAt,t)+1;R(this,ir,setTimeout(()=>{w(this,$e).isStale||this.updateResult()},r))},pu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(w(this,X)):this.options.refetchInterval)??!1},mu=function(t){q(this,ne,vu).call(this),R(this,Pn,t),!(ar||bt(this.options.enabled,w(this,X))===!1||!au(w(this,Pn))||w(this,Pn)===0)&&R(this,lr,setInterval(()=>{(this.options.refetchIntervalInBackground||Fa.isFocused())&&q(this,ne,Li).call(this)},w(this,Pn)))},gu=function(){q(this,ne,du).call(this),q(this,ne,mu).call(this,q(this,ne,pu).call(this))},yu=function(){w(this,ir)&&(clearTimeout(w(this,ir)),R(this,ir,void 0))},vu=function(){w(this,lr)&&(clearInterval(w(this,lr)),R(this,lr,void 0))},ku=function(){const t=w(this,Ye).getQueryCache().build(w(this,Ye),this.options);if(t===w(this,X))return;const n=w(this,X);R(this,X,t),R(this,vl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Jd=function(t){be.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(w(this,$e))}),w(this,Ye).getQueryCache().notify({query:w(this,X),type:"observerResultsUpdated"})})},jd);function hv(e,t){return bt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mf(e,t){return hv(e,t)||e.state.data!==void 0&&xu(e,t,t.refetchOnMount)}function xu(e,t,n){if(bt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ra(e,t)}return!1}function gf(e,t,n,r){return(e!==t||bt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ra(e,n)}function Ra(e,t){return bt(t.enabled,e)!==!1&&e.isStaleByTime(Or(t.staleTime,e))}function dv(e,t){return!vo(e.getCurrentResult(),t)}var bn,Tn,Xe,Jt,nn,no,wu,Id,pv=(Id=class extends di{constructor(n,r){super();U(this,nn);U(this,bn);U(this,Tn);U(this,Xe);U(this,Jt);R(this,bn,n),this.setOptions(r),this.bindMethods(),q(this,nn,no).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=w(this,bn).defaultMutationOptions(n),vo(this.options,r)||w(this,bn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:w(this,Xe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&cr(r.mutationKey)!==cr(this.options.mutationKey)?this.reset():((i=w(this,Xe))==null?void 0:i.state.status)==="pending"&&w(this,Xe).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=w(this,Xe))==null||n.removeObserver(this)}onMutationUpdate(n){q(this,nn,no).call(this),q(this,nn,wu).call(this,n)}getCurrentResult(){return w(this,Tn)}reset(){var n;(n=w(this,Xe))==null||n.removeObserver(this),R(this,Xe,void 0),q(this,nn,no).call(this),q(this,nn,wu).call(this)}mutate(n,r){var i;return R(this,Jt,r),(i=w(this,Xe))==null||i.removeObserver(this),R(this,Xe,w(this,bn).getMutationCache().build(w(this,bn),this.options)),w(this,Xe).addObserver(this),w(this,Xe).execute(n)}},bn=new WeakMap,Tn=new WeakMap,Xe=new WeakMap,Jt=new WeakMap,nn=new WeakSet,no=function(){var r;const n=((r=w(this,Xe))==null?void 0:r.state)??Xd();R(this,Tn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},wu=function(n){be.batch(()=>{var r,i,l,o,s,u,a,f;if(w(this,Jt)&&this.hasListeners()){const c=w(this,Tn).variables,d=w(this,Tn).context;(n==null?void 0:n.type)==="success"?((i=(r=w(this,Jt)).onSuccess)==null||i.call(r,n.data,c,d),(o=(l=w(this,Jt)).onSettled)==null||o.call(l,n.data,null,c,d)):(n==null?void 0:n.type)==="error"&&((u=(s=w(this,Jt)).onError)==null||u.call(s,n.error,c,d),(f=(a=w(this,Jt)).onSettled)==null||f.call(a,void 0,n.error,c,d))}this.listeners.forEach(c=>{c(w(this,Tn))})})},Id),Zd=K.createContext(void 0),un=e=>{const t=K.useContext(Zd);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mv=({client:e,children:t})=>(K.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(Zd.Provider,{value:e,children:t})),ep=K.createContext(!1),gv=()=>K.useContext(ep);ep.Provider;function yv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vv=K.createContext(yv()),kv=()=>K.useContext(vv);function tp(e,t){return typeof e=="function"?e(...t):!!e}function np(){}var xv=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},wv=e=>{K.useEffect(()=>{e.clearReset()},[e])},Sv=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&tp(n,[e.error,r]),Cv=e=>{e.suspense&&(typeof e.staleTime!="number"&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Ev=(e,t)=>e.isLoading&&e.isFetching&&!t,Pv=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,yf=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function bv(e,t,n){var f,c,d,h,g;const r=un(),i=gv(),l=kv(),o=r.defaultQueryOptions(e);(c=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||c.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",Cv(o),xv(o,l),wv(l);const s=!r.getQueryState(e.queryKey),[u]=K.useState(()=>new t(r,o)),a=u.getOptimisticResult(o);if(K.useSyncExternalStore(K.useCallback(v=>{const C=i?()=>{}:u.subscribe(be.batchCalls(v));return u.updateResult(),C},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),K.useEffect(()=>{u.setOptions(o,{listeners:!1})},[o,u]),Pv(o,a))throw yf(o,u,l);if(Sv({result:a,errorResetBoundary:l,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw a.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,a),o.experimental_prefetchInRender&&!ar&&Ev(a,i)){const v=s?yf(o,u,l):(g=r.getQueryCache().get(o.queryHash))==null?void 0:g.promise;v==null||v.catch(np).finally(()=>{u.hasListeners()||u.updateResult()})}return o.notifyOnChangeProps?a:u.trackResult(a)}function On(e,t){return bv(e,fv)}function pi(e,t){const n=un(),[r]=K.useState(()=>new pv(n,e));K.useEffect(()=>{r.setOptions(e)},[r,e]);const i=K.useSyncExternalStore(K.useCallback(o=>r.subscribe(be.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=K.useCallback((o,s)=>{r.mutate(o,s).catch(np)},[r]);if(i.error&&tp(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:l,mutateAsync:i.mutate}}var rp={exports:{}},ft={},ip={exports:{}},lp={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(F,B){var k=F.length;F.push(B);e:for(;0<k;){var Z=k-1>>>1,ie=F[Z];if(0<i(ie,B))F[Z]=B,F[k]=ie,k=Z;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var B=F[0],k=F.pop();if(k!==B){F[0]=k;e:for(var Z=0,ie=F.length,S=ie>>>1;Z<S;){var Ee=2*(Z+1)-1,Lt=F[Ee],ue=Ee+1,At=F[ue];if(0>i(Lt,k))ue<ie&&0>i(At,Lt)?(F[Z]=At,F[ue]=k,Z=ue):(F[Z]=Lt,F[Ee]=k,Z=Ee);else if(ue<ie&&0>i(At,k))F[Z]=At,F[ue]=k,Z=ue;else break e}}return B}function i(F,B){var k=F.sortIndex-B.sortIndex;return k!==0?k:F.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var u=[],a=[],f=1,c=null,d=3,h=!1,g=!1,v=!1,C=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(F){for(var B=n(a);B!==null;){if(B.callback===null)r(a);else if(B.startTime<=F)r(a),B.sortIndex=B.expirationTime,t(u,B);else break;B=n(a)}}function P(F){if(v=!1,y(F),!g)if(n(u)!==null)g=!0,we(T);else{var B=n(a);B!==null&&ke(P,B.startTime-F)}}function T(F,B){g=!1,v&&(v=!1,p(j),j=-1),h=!0;var k=d;try{for(y(B),c=n(u);c!==null&&(!(c.expirationTime>B)||F&&!A());){var Z=c.callback;if(typeof Z=="function"){c.callback=null,d=c.priorityLevel;var ie=Z(c.expirationTime<=B);B=e.unstable_now(),typeof ie=="function"?c.callback=ie:c===n(u)&&r(u),y(B)}else r(u);c=n(u)}if(c!==null)var S=!0;else{var Ee=n(a);Ee!==null&&ke(P,Ee.startTime-B),S=!1}return S}finally{c=null,d=k,h=!1}}var E=!1,I=null,j=-1,M=5,b=-1;function A(){return!(e.unstable_now()-b<M)}function O(){if(I!==null){var F=e.unstable_now();b=F;var B=!0;try{B=I(!0,F)}finally{B?J():(E=!1,I=null)}}else E=!1}var J;if(typeof m=="function")J=function(){m(O)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,Y=se.port2;se.port1.onmessage=O,J=function(){Y.postMessage(null)}}else J=function(){C(O,0)};function we(F){I=F,E||(E=!0,J())}function ke(F,B){j=C(function(){F(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,we(T))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(F){switch(d){case 1:case 2:case 3:var B=3;break;default:B=d}var k=d;d=B;try{return F()}finally{d=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,B){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var k=d;d=F;try{return B()}finally{d=k}},e.unstable_scheduleCallback=function(F,B,k){var Z=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?Z+k:Z):k=Z,F){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=k+ie,F={id:f++,callback:B,priorityLevel:F,startTime:k,expirationTime:ie,sortIndex:-1},k>Z?(F.sortIndex=k,t(a,F),n(u)===null&&F===n(a)&&(v?(p(j),j=-1):v=!0,ke(P,k-Z))):(F.sortIndex=ie,t(u,F),g||h||(g=!0,we(T))),F},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(F){var B=d;return function(){var k=d;d=B;try{return F.apply(this,arguments)}finally{d=k}}}})(lp);ip.exports=lp;var Tv=ip.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var _v=K,ct=Tv;function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var op=new Set,Xi={};function vr(e,t){li(e,t),li(e+"Capture",t)}function li(e,t){for(Xi[e]=t,e=0;e<t.length;e++)op.add(t[e])}var rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Su=Object.prototype.hasOwnProperty,jv=/^[: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]*$/,vf={},kf={};function Iv(e){return Su.call(kf,e)?!0:Su.call(vf,e)?!1:jv.test(e)?kf[e]=!0:(vf[e]=!0,!1)}function Nv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zv(e,t,n,r){if(t===null||typeof t>"u"||Nv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function qe(e,t,n,r,i,l,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var Ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ae[e]=new qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ae[t]=new qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ae[e]=new qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ae[e]=new qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ae[e]=new qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ae[e]=new qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ae[e]=new qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ae[e]=new qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ae[e]=new qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Da=/[\-:]([a-z])/g;function Oa(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Da,Oa);Ae[t]=new qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Da,Oa);Ae[t]=new qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Da,Oa);Ae[t]=new qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ae[e]=new qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ae.xlinkHref=new qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ae[e]=new qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ma(e,t,n,r){var i=Ae.hasOwnProperty(t)?Ae[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(zv(t,n,i,r)&&(n=null),r||i===null?Iv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var an=_v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,zl=Symbol.for("react.element"),br=Symbol.for("react.portal"),Tr=Symbol.for("react.fragment"),Ba=Symbol.for("react.strict_mode"),Cu=Symbol.for("react.profiler"),sp=Symbol.for("react.provider"),up=Symbol.for("react.context"),Ua=Symbol.for("react.forward_ref"),Eu=Symbol.for("react.suspense"),Pu=Symbol.for("react.suspense_list"),$a=Symbol.for("react.memo"),mn=Symbol.for("react.lazy"),ap=Symbol.for("react.offscreen"),xf=Symbol.iterator;function Si(e){return e===null||typeof e!="object"?null:(e=xf&&e[xf]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Object.assign,Cs;function Ai(e){if(Cs===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Cs=t&&t[1]||""}return`
|
|
34
|
+
`+Cs+e}var Es=!1;function Ps(e,t){if(!e||Es)return"";Es=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(a){var r=a}Reflect.construct(e,[],t)}else{try{t.call()}catch(a){r=a}e.call(t.prototype)}else{try{throw Error()}catch(a){r=a}e()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var i=a.stack.split(`
|
|
35
|
+
`),l=r.stack.split(`
|
|
36
|
+
`),o=i.length-1,s=l.length-1;1<=o&&0<=s&&i[o]!==l[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==l[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==l[s]){var u=`
|
|
37
|
+
`+i[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=s);break}}}finally{Es=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ai(e):""}function Lv(e){switch(e.tag){case 5:return Ai(e.type);case 16:return Ai("Lazy");case 13:return Ai("Suspense");case 19:return Ai("SuspenseList");case 0:case 2:case 15:return e=Ps(e.type,!1),e;case 11:return e=Ps(e.type.render,!1),e;case 1:return e=Ps(e.type,!0),e;default:return""}}function bu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Tr:return"Fragment";case br:return"Portal";case Cu:return"Profiler";case Ba:return"StrictMode";case Eu:return"Suspense";case Pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case up:return(e.displayName||"Context")+".Consumer";case sp:return(e._context.displayName||"Context")+".Provider";case Ua:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $a:return t=e.displayName||null,t!==null?t:bu(e.type)||"Memo";case mn:t=e._payload,e=e._init;try{return bu(e(t))}catch{}}return null}function Av(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return bu(t);case 8:return t===Ba?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fv(e){var t=cp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ll(e){e._valueTracker||(e._valueTracker=Fv(e))}function fp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=cp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function xo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Tu(e,t){var n=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function hp(e,t){t=t.checked,t!=null&&Ma(e,"checked",t,!1)}function _u(e,t){hp(e,t);var n=Mn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ju(e,t.type,n):t.hasOwnProperty("defaultValue")&&ju(e,t.type,Mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ju(e,t,n){(t!=="number"||xo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fi=Array.isArray;function Mr(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=""+Mn(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 Iu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(N(92));if(Fi(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Mn(n)}}function dp(e,t){var n=Mn(t.value),r=Mn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ef(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function pp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?pp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Al,mp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Al=Al||document.createElement("div"),Al.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Al.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ji(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rv=["Webkit","ms","Moz","O"];Object.keys(Oi).forEach(function(e){Rv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Oi[t]=Oi[e]})});function gp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Oi.hasOwnProperty(e)&&Oi[e]?(""+t).trim():t+"px"}function yp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=gp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Dv=ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zu(e,t){if(t){if(Dv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Lu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Au=null;function Ha(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fu=null,Br=null,Ur=null;function Pf(e){if(e=Cl(e)){if(typeof Fu!="function")throw Error(N(280));var t=e.stateNode;t&&(t=ts(t),Fu(e.stateNode,e.type,t))}}function vp(e){Br?Ur?Ur.push(e):Ur=[e]:Br=e}function kp(){if(Br){var e=Br,t=Ur;if(Ur=Br=null,Pf(e),t)for(e=0;e<t.length;e++)Pf(t[e])}}function xp(e,t){return e(t)}function wp(){}var bs=!1;function Sp(e,t,n){if(bs)return e(t,n);bs=!0;try{return xp(e,t,n)}finally{bs=!1,(Br!==null||Ur!==null)&&(wp(),kp())}}function Zi(e,t){var n=e.stateNode;if(n===null)return null;var r=ts(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(N(231,t,typeof n));return n}var Ru=!1;if(rn)try{var Ci={};Object.defineProperty(Ci,"passive",{get:function(){Ru=!0}}),window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{Ru=!1}function Ov(e,t,n,r,i,l,o,s,u){var a=Array.prototype.slice.call(arguments,3);try{t.apply(n,a)}catch(f){this.onError(f)}}var Mi=!1,wo=null,So=!1,Du=null,Mv={onError:function(e){Mi=!0,wo=e}};function Bv(e,t,n,r,i,l,o,s,u){Mi=!1,wo=null,Ov.apply(Mv,arguments)}function Uv(e,t,n,r,i,l,o,s,u){if(Bv.apply(this,arguments),Mi){if(Mi){var a=wo;Mi=!1,wo=null}else throw Error(N(198));So||(So=!0,Du=a)}}function kr(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 Cp(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 bf(e){if(kr(e)!==e)throw Error(N(188))}function $v(e){var t=e.alternate;if(!t){if(t=kr(e),t===null)throw Error(N(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return bf(i),e;if(l===r)return bf(i),t;l=l.sibling}throw Error(N(188))}if(n.return!==r.return)n=i,r=l;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=l;break}if(s===r){o=!0,r=i,n=l;break}s=s.sibling}if(!o){for(s=l.child;s;){if(s===n){o=!0,n=l,r=i;break}if(s===r){o=!0,r=l,n=i;break}s=s.sibling}if(!o)throw Error(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function Ep(e){return e=$v(e),e!==null?Pp(e):null}function Pp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Pp(e);if(t!==null)return t;e=e.sibling}return null}var bp=ct.unstable_scheduleCallback,Tf=ct.unstable_cancelCallback,Hv=ct.unstable_shouldYield,Qv=ct.unstable_requestPaint,xe=ct.unstable_now,Vv=ct.unstable_getCurrentPriorityLevel,Qa=ct.unstable_ImmediatePriority,Tp=ct.unstable_UserBlockingPriority,Co=ct.unstable_NormalPriority,qv=ct.unstable_LowPriority,_p=ct.unstable_IdlePriority,Xo=null,Qt=null;function Wv(e){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Xo,e,void 0,(e.current.flags&128)===128)}catch{}}var _t=Math.clz32?Math.clz32:Yv,Kv=Math.log,Gv=Math.LN2;function Yv(e){return e>>>=0,e===0?32:31-(Kv(e)/Gv|0)|0}var Fl=64,Rl=4194304;function Ri(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Eo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=Ri(s):(l&=o,l!==0&&(r=Ri(l)))}else o=n&~i,o!==0?r=Ri(o):l!==0&&(r=Ri(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-_t(t),i=1<<n,r|=e[n],t&=~i;return r}function Xv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Jv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var o=31-_t(l),s=1<<o,u=i[o];u===-1?(!(s&n)||s&r)&&(i[o]=Xv(s,t)):u<=t&&(e.expiredLanes|=s),l&=~s}}function Ou(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jp(){var e=Fl;return Fl<<=1,!(Fl&4194240)&&(Fl=64),e}function Ts(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_t(t),e[t]=n}function Zv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-_t(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function Va(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_t(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var re=0;function Ip(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Np,qa,zp,Lp,Ap,Mu=!1,Dl=[],In=null,Nn=null,zn=null,el=new Map,tl=new Map,yn=[],e1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function _f(e,t){switch(e){case"focusin":case"focusout":In=null;break;case"dragenter":case"dragleave":Nn=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":el.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":tl.delete(t.pointerId)}}function Ei(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=Cl(t),t!==null&&qa(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function t1(e,t,n,r,i){switch(t){case"focusin":return In=Ei(In,e,t,n,r,i),!0;case"dragenter":return Nn=Ei(Nn,e,t,n,r,i),!0;case"mouseover":return zn=Ei(zn,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return el.set(l,Ei(el.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,tl.set(l,Ei(tl.get(l)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=Yn(e.target);if(t!==null){var n=kr(t);if(n!==null){if(t=n.tag,t===13){if(t=Cp(n),t!==null){e.blockedOn=t,Ap(e.priority,function(){zp(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 ro(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Au=r,n.target.dispatchEvent(r),Au=null}else return t=Cl(n),t!==null&&qa(t),e.blockedOn=n,!1;t.shift()}return!0}function jf(e,t,n){ro(e)&&n.delete(t)}function n1(){Mu=!1,In!==null&&ro(In)&&(In=null),Nn!==null&&ro(Nn)&&(Nn=null),zn!==null&&ro(zn)&&(zn=null),el.forEach(jf),tl.forEach(jf)}function Pi(e,t){e.blockedOn===t&&(e.blockedOn=null,Mu||(Mu=!0,ct.unstable_scheduleCallback(ct.unstable_NormalPriority,n1)))}function nl(e){function t(i){return Pi(i,e)}if(0<Dl.length){Pi(Dl[0],e);for(var n=1;n<Dl.length;n++){var r=Dl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(In!==null&&Pi(In,e),Nn!==null&&Pi(Nn,e),zn!==null&&Pi(zn,e),el.forEach(t),tl.forEach(t),n=0;n<yn.length;n++)r=yn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<yn.length&&(n=yn[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&yn.shift()}var $r=an.ReactCurrentBatchConfig,Po=!0;function r1(e,t,n,r){var i=re,l=$r.transition;$r.transition=null;try{re=1,Wa(e,t,n,r)}finally{re=i,$r.transition=l}}function i1(e,t,n,r){var i=re,l=$r.transition;$r.transition=null;try{re=4,Wa(e,t,n,r)}finally{re=i,$r.transition=l}}function Wa(e,t,n,r){if(Po){var i=Bu(e,t,n,r);if(i===null)Ds(e,t,r,bo,n),_f(e,r);else if(t1(i,e,t,n,r))r.stopPropagation();else if(_f(e,r),t&4&&-1<e1.indexOf(e)){for(;i!==null;){var l=Cl(i);if(l!==null&&Np(l),l=Bu(e,t,n,r),l===null&&Ds(e,t,r,bo,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else Ds(e,t,r,null,n)}}var bo=null;function Bu(e,t,n,r){if(bo=null,e=Ha(r),e=Yn(e),e!==null)if(t=kr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Cp(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 bo=e,null}function Rp(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Vv()){case Qa:return 1;case Tp:return 4;case Co:case qv:return 16;case _p:return 536870912;default:return 16}default:return 16}}var _n=null,Ka=null,io=null;function Dp(){if(io)return io;var e,t=Ka,n=t.length,r,i="value"in _n?_n.value:_n.textContent,l=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[l-r];r++);return io=i.slice(e,1<r?1-r:void 0)}function lo(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 Ol(){return!0}function If(){return!1}function ht(e){function t(n,r,i,l,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(l):l[s]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Ol:If,this.isPropagationStopped=If,this}return ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ol)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ol)},persist:function(){},isPersistent:Ol}),t}var mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ga=ht(mi),Sl=ge({},mi,{view:0,detail:0}),l1=ht(Sl),_s,js,bi,Jo=ge({},Sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ya,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!==bi&&(bi&&e.type==="mousemove"?(_s=e.screenX-bi.screenX,js=e.screenY-bi.screenY):js=_s=0,bi=e),_s)},movementY:function(e){return"movementY"in e?e.movementY:js}}),Nf=ht(Jo),o1=ge({},Jo,{dataTransfer:0}),s1=ht(o1),u1=ge({},Sl,{relatedTarget:0}),Is=ht(u1),a1=ge({},mi,{animationName:0,elapsedTime:0,pseudoElement:0}),c1=ht(a1),f1=ge({},mi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),h1=ht(f1),d1=ge({},mi,{data:0}),zf=ht(d1),p1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},m1={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"},g1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function y1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=g1[e])?!!t[e]:!1}function Ya(){return y1}var v1=ge({},Sl,{key:function(e){if(e.key){var t=p1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=lo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?m1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ya,charCode:function(e){return e.type==="keypress"?lo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?lo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k1=ht(v1),x1=ge({},Jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lf=ht(x1),w1=ge({},Sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ya}),S1=ht(w1),C1=ge({},mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),E1=ht(C1),P1=ge({},Jo,{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}),b1=ht(P1),T1=[9,13,27,32],Xa=rn&&"CompositionEvent"in window,Bi=null;rn&&"documentMode"in document&&(Bi=document.documentMode);var _1=rn&&"TextEvent"in window&&!Bi,Op=rn&&(!Xa||Bi&&8<Bi&&11>=Bi),Af=" ",Ff=!1;function Mp(e,t){switch(e){case"keyup":return T1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _r=!1;function j1(e,t){switch(e){case"compositionend":return Bp(t);case"keypress":return t.which!==32?null:(Ff=!0,Af);case"textInput":return e=t.data,e===Af&&Ff?null:e;default:return null}}function I1(e,t){if(_r)return e==="compositionend"||!Xa&&Mp(e,t)?(e=Dp(),io=Ka=_n=null,_r=!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 Op&&t.locale!=="ko"?null:t.data;default:return null}}var N1={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 Rf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!N1[e.type]:t==="textarea"}function Up(e,t,n,r){vp(r),t=To(t,"onChange"),0<t.length&&(n=new Ga("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ui=null,rl=null;function z1(e){Jp(e,0)}function Zo(e){var t=Nr(e);if(fp(t))return e}function L1(e,t){if(e==="change")return t}var $p=!1;if(rn){var Ns;if(rn){var zs="oninput"in document;if(!zs){var Df=document.createElement("div");Df.setAttribute("oninput","return;"),zs=typeof Df.oninput=="function"}Ns=zs}else Ns=!1;$p=Ns&&(!document.documentMode||9<document.documentMode)}function Of(){Ui&&(Ui.detachEvent("onpropertychange",Hp),rl=Ui=null)}function Hp(e){if(e.propertyName==="value"&&Zo(rl)){var t=[];Up(t,rl,e,Ha(e)),Sp(z1,t)}}function A1(e,t,n){e==="focusin"?(Of(),Ui=t,rl=n,Ui.attachEvent("onpropertychange",Hp)):e==="focusout"&&Of()}function F1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zo(rl)}function R1(e,t){if(e==="click")return Zo(t)}function D1(e,t){if(e==="input"||e==="change")return Zo(t)}function O1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zt=typeof Object.is=="function"?Object.is:O1;function il(e,t){if(zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Su.call(t,i)||!zt(e[i],t[i]))return!1}return!0}function Mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bf(e,t){var n=Mf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Mf(n)}}function Qp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vp(){for(var e=window,t=xo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xo(e.document)}return t}function Ja(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function M1(e){var t=Vp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Qp(n.ownerDocument.documentElement,n)){if(r!==null&&Ja(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=Bf(n,l);var o=Bf(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var B1=rn&&"documentMode"in document&&11>=document.documentMode,jr=null,Uu=null,$i=null,$u=!1;function Uf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$u||jr==null||jr!==xo(r)||(r=jr,"selectionStart"in r&&Ja(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}),$i&&il($i,r)||($i=r,r=To(Uu,"onSelect"),0<r.length&&(t=new Ga("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ml(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ir={animationend:Ml("Animation","AnimationEnd"),animationiteration:Ml("Animation","AnimationIteration"),animationstart:Ml("Animation","AnimationStart"),transitionend:Ml("Transition","TransitionEnd")},Ls={},qp={};rn&&(qp=document.createElement("div").style,"AnimationEvent"in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),"TransitionEvent"in window||delete Ir.transitionend.transition);function es(e){if(Ls[e])return Ls[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qp)return Ls[e]=t[n];return e}var Wp=es("animationend"),Kp=es("animationiteration"),Gp=es("animationstart"),Yp=es("transitionend"),Xp=new Map,$f="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $n(e,t){Xp.set(e,t),vr(t,[e])}for(var As=0;As<$f.length;As++){var Fs=$f[As],U1=Fs.toLowerCase(),$1=Fs[0].toUpperCase()+Fs.slice(1);$n(U1,"on"+$1)}$n(Wp,"onAnimationEnd");$n(Kp,"onAnimationIteration");$n(Gp,"onAnimationStart");$n("dblclick","onDoubleClick");$n("focusin","onFocus");$n("focusout","onBlur");$n(Yp,"onTransitionEnd");li("onMouseEnter",["mouseout","mouseover"]);li("onMouseLeave",["mouseout","mouseover"]);li("onPointerEnter",["pointerout","pointerover"]);li("onPointerLeave",["pointerout","pointerover"]);vr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vr("onBeforeInput",["compositionend","keypress","textInput","paste"]);vr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Di="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(" "),H1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Di));function Hf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Uv(r,t,void 0,e),e.currentTarget=null}function Jp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],u=s.instance,a=s.currentTarget;if(s=s.listener,u!==l&&i.isPropagationStopped())break e;Hf(i,s,a),l=u}else for(o=0;o<r.length;o++){if(s=r[o],u=s.instance,a=s.currentTarget,s=s.listener,u!==l&&i.isPropagationStopped())break e;Hf(i,s,a),l=u}}}if(So)throw e=Du,So=!1,Du=null,e}function fe(e,t){var n=t[Wu];n===void 0&&(n=t[Wu]=new Set);var r=e+"__bubble";n.has(r)||(Zp(t,e,2,!1),n.add(r))}function Rs(e,t,n){var r=0;t&&(r|=4),Zp(n,e,r,t)}var Bl="_reactListening"+Math.random().toString(36).slice(2);function ll(e){if(!e[Bl]){e[Bl]=!0,op.forEach(function(n){n!=="selectionchange"&&(H1.has(n)||Rs(n,!1,e),Rs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bl]||(t[Bl]=!0,Rs("selectionchange",!1,t))}}function Zp(e,t,n,r){switch(Rp(t)){case 1:var i=r1;break;case 4:i=i1;break;default:i=Wa}n=i.bind(null,t,n,e),i=void 0,!Ru||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ds(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Yn(s),o===null)return;if(u=o.tag,u===5||u===6){r=l=o;continue e}s=s.parentNode}}r=r.return}Sp(function(){var a=l,f=Ha(n),c=[];e:{var d=Xp.get(e);if(d!==void 0){var h=Ga,g=e;switch(e){case"keypress":if(lo(n)===0)break e;case"keydown":case"keyup":h=k1;break;case"focusin":g="focus",h=Is;break;case"focusout":g="blur",h=Is;break;case"beforeblur":case"afterblur":h=Is;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=s1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=S1;break;case Wp:case Kp:case Gp:h=c1;break;case Yp:h=E1;break;case"scroll":h=l1;break;case"wheel":h=b1;break;case"copy":case"cut":case"paste":h=h1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Lf}var v=(t&4)!==0,C=!v&&e==="scroll",p=v?d!==null?d+"Capture":null:d;v=[];for(var m=a,y;m!==null;){y=m;var P=y.stateNode;if(y.tag===5&&P!==null&&(y=P,p!==null&&(P=Zi(m,p),P!=null&&v.push(ol(m,P,y)))),C)break;m=m.return}0<v.length&&(d=new h(d,g,null,n,f),c.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Au&&(g=n.relatedTarget||n.fromElement)&&(Yn(g)||g[ln]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=a,g=g?Yn(g):null,g!==null&&(C=kr(g),g!==C||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=a),h!==g)){if(v=Nf,P="onMouseLeave",p="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=Lf,P="onPointerLeave",p="onPointerEnter",m="pointer"),C=h==null?d:Nr(h),y=g==null?d:Nr(g),d=new v(P,m+"leave",h,n,f),d.target=C,d.relatedTarget=y,P=null,Yn(f)===a&&(v=new v(p,m+"enter",g,n,f),v.target=y,v.relatedTarget=C,P=v),C=P,h&&g)t:{for(v=h,p=g,m=0,y=v;y;y=Er(y))m++;for(y=0,P=p;P;P=Er(P))y++;for(;0<m-y;)v=Er(v),m--;for(;0<y-m;)p=Er(p),y--;for(;m--;){if(v===p||p!==null&&v===p.alternate)break t;v=Er(v),p=Er(p)}v=null}else v=null;h!==null&&Qf(c,d,h,v,!1),g!==null&&C!==null&&Qf(c,C,g,v,!0)}}e:{if(d=a?Nr(a):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var T=L1;else if(Rf(d))if($p)T=D1;else{T=F1;var E=A1}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=R1);if(T&&(T=T(e,a))){Up(c,T,n,f);break e}E&&E(e,d,a),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&ju(d,"number",d.value)}switch(E=a?Nr(a):window,e){case"focusin":(Rf(E)||E.contentEditable==="true")&&(jr=E,Uu=a,$i=null);break;case"focusout":$i=Uu=jr=null;break;case"mousedown":$u=!0;break;case"contextmenu":case"mouseup":case"dragend":$u=!1,Uf(c,n,f);break;case"selectionchange":if(B1)break;case"keydown":case"keyup":Uf(c,n,f)}var I;if(Xa)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else _r?Mp(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Op&&n.locale!=="ko"&&(_r||j!=="onCompositionStart"?j==="onCompositionEnd"&&_r&&(I=Dp()):(_n=f,Ka="value"in _n?_n.value:_n.textContent,_r=!0)),E=To(a,j),0<E.length&&(j=new zf(j,e,null,n,f),c.push({event:j,listeners:E}),I?j.data=I:(I=Bp(n),I!==null&&(j.data=I)))),(I=_1?j1(e,n):I1(e,n))&&(a=To(a,"onBeforeInput"),0<a.length&&(f=new zf("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:a}),f.data=I))}Jp(c,t)})}function ol(e,t,n){return{instance:e,listener:t,currentTarget:n}}function To(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=Zi(e,n),l!=null&&r.unshift(ol(e,l,i)),l=Zi(e,t),l!=null&&r.push(ol(e,l,i))),e=e.return}return r}function Er(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qf(e,t,n,r,i){for(var l=t._reactName,o=[];n!==null&&n!==r;){var s=n,u=s.alternate,a=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&a!==null&&(s=a,i?(u=Zi(n,l),u!=null&&o.unshift(ol(n,u,s))):i||(u=Zi(n,l),u!=null&&o.push(ol(n,u,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Q1=/\r\n?/g,V1=/\u0000|\uFFFD/g;function Vf(e){return(typeof e=="string"?e:""+e).replace(Q1,`
|
|
38
|
+
`).replace(V1,"")}function Ul(e,t,n){if(t=Vf(t),Vf(e)!==t&&n)throw Error(N(425))}function _o(){}var Hu=null,Qu=null;function Vu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qu=typeof setTimeout=="function"?setTimeout:void 0,q1=typeof clearTimeout=="function"?clearTimeout:void 0,qf=typeof Promise=="function"?Promise:void 0,W1=typeof queueMicrotask=="function"?queueMicrotask:typeof qf<"u"?function(e){return qf.resolve(null).then(e).catch(K1)}:qu;function K1(e){setTimeout(function(){throw e})}function Os(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),nl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);nl(t)}function Ln(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Wf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var gi=Math.random().toString(36).slice(2),Ht="__reactFiber$"+gi,sl="__reactProps$"+gi,ln="__reactContainer$"+gi,Wu="__reactEvents$"+gi,G1="__reactListeners$"+gi,Y1="__reactHandles$"+gi;function Yn(e){var t=e[Ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ln]||n[Ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Wf(e);e!==null;){if(n=e[Ht])return n;e=Wf(e)}return t}e=n,n=e.parentNode}return null}function Cl(e){return e=e[Ht]||e[ln],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Nr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function ts(e){return e[sl]||null}var Ku=[],zr=-1;function Hn(e){return{current:e}}function he(e){0>zr||(e.current=Ku[zr],Ku[zr]=null,zr--)}function ae(e,t){zr++,Ku[zr]=e.current,e.current=t}var Bn={},Me=Hn(Bn),et=Hn(!1),fr=Bn;function oi(e,t){var n=e.type.contextTypes;if(!n)return Bn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function tt(e){return e=e.childContextTypes,e!=null}function jo(){he(et),he(Me)}function Kf(e,t,n){if(Me.current!==Bn)throw Error(N(168));ae(Me,t),ae(et,n)}function em(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(N(108,Av(e)||"Unknown",i));return ge({},n,r)}function Io(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bn,fr=Me.current,ae(Me,e),ae(et,et.current),!0}function Gf(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=em(e,t,fr),r.__reactInternalMemoizedMergedChildContext=e,he(et),he(Me),ae(Me,e)):he(et),ae(et,n)}var Xt=null,ns=!1,Ms=!1;function tm(e){Xt===null?Xt=[e]:Xt.push(e)}function X1(e){ns=!0,tm(e)}function Qn(){if(!Ms&&Xt!==null){Ms=!0;var e=0,t=re;try{var n=Xt;for(re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Xt=null,ns=!1}catch(i){throw Xt!==null&&(Xt=Xt.slice(e+1)),bp(Qa,Qn),i}finally{re=t,Ms=!1}}return null}var Lr=[],Ar=0,No=null,zo=0,mt=[],gt=0,hr=null,Zt=1,en="";function Wn(e,t){Lr[Ar++]=zo,Lr[Ar++]=No,No=e,zo=t}function nm(e,t,n){mt[gt++]=Zt,mt[gt++]=en,mt[gt++]=hr,hr=e;var r=Zt;e=en;var i=32-_t(r)-1;r&=~(1<<i),n+=1;var l=32-_t(t)+i;if(30<l){var o=i-i%5;l=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zt=1<<32-_t(t)+i|n<<i|r,en=l+e}else Zt=1<<l|n<<i|r,en=e}function Za(e){e.return!==null&&(Wn(e,1),nm(e,1,0))}function ec(e){for(;e===No;)No=Lr[--Ar],Lr[Ar]=null,zo=Lr[--Ar],Lr[Ar]=null;for(;e===hr;)hr=mt[--gt],mt[gt]=null,en=mt[--gt],mt[gt]=null,Zt=mt[--gt],mt[gt]=null}var at=null,ut=null,de=!1,Tt=null;function rm(e,t){var n=vt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Yf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,at=e,ut=Ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,at=e,ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=hr!==null?{id:Zt,overflow:en}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,at=e,ut=null,!0):!1;default:return!1}}function Gu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yu(e){if(de){var t=ut;if(t){var n=t;if(!Yf(e,t)){if(Gu(e))throw Error(N(418));t=Ln(n.nextSibling);var r=at;t&&Yf(e,t)?rm(r,n):(e.flags=e.flags&-4097|2,de=!1,at=e)}}else{if(Gu(e))throw Error(N(418));e.flags=e.flags&-4097|2,de=!1,at=e}}}function Xf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;at=e}function $l(e){if(e!==at)return!1;if(!de)return Xf(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vu(e.type,e.memoizedProps)),t&&(t=ut)){if(Gu(e))throw im(),Error(N(418));for(;t;)rm(e,t),t=Ln(t.nextSibling)}if(Xf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ut=Ln(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ut=null}}else ut=at?Ln(e.stateNode.nextSibling):null;return!0}function im(){for(var e=ut;e;)e=Ln(e.nextSibling)}function si(){ut=at=null,de=!1}function tc(e){Tt===null?Tt=[e]:Tt.push(e)}var J1=an.ReactCurrentBatchConfig;function Ti(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(N(309));var r=n.stateNode}if(!r)throw Error(N(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(o){var s=i.refs;o===null?delete s[l]:s[l]=o},t._stringRef=l,t)}if(typeof e!="string")throw Error(N(284));if(!n._owner)throw Error(N(290,e))}return e}function Hl(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Jf(e){var t=e._init;return t(e._payload)}function lm(e){function t(p,m){if(e){var y=p.deletions;y===null?(p.deletions=[m],p.flags|=16):y.push(m)}}function n(p,m){if(!e)return null;for(;m!==null;)t(p,m),m=m.sibling;return null}function r(p,m){for(p=new Map;m!==null;)m.key!==null?p.set(m.key,m):p.set(m.index,m),m=m.sibling;return p}function i(p,m){return p=Dn(p,m),p.index=0,p.sibling=null,p}function l(p,m,y){return p.index=y,e?(y=p.alternate,y!==null?(y=y.index,y<m?(p.flags|=2,m):y):(p.flags|=2,m)):(p.flags|=1048576,m)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function s(p,m,y,P){return m===null||m.tag!==6?(m=qs(y,p.mode,P),m.return=p,m):(m=i(m,y),m.return=p,m)}function u(p,m,y,P){var T=y.type;return T===Tr?f(p,m,y.props.children,P,y.key):m!==null&&(m.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===mn&&Jf(T)===m.type)?(P=i(m,y.props),P.ref=Ti(p,m,y),P.return=p,P):(P=ho(y.type,y.key,y.props,null,p.mode,P),P.ref=Ti(p,m,y),P.return=p,P)}function a(p,m,y,P){return m===null||m.tag!==4||m.stateNode.containerInfo!==y.containerInfo||m.stateNode.implementation!==y.implementation?(m=Ws(y,p.mode,P),m.return=p,m):(m=i(m,y.children||[]),m.return=p,m)}function f(p,m,y,P,T){return m===null||m.tag!==7?(m=sr(y,p.mode,P,T),m.return=p,m):(m=i(m,y),m.return=p,m)}function c(p,m,y){if(typeof m=="string"&&m!==""||typeof m=="number")return m=qs(""+m,p.mode,y),m.return=p,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case zl:return y=ho(m.type,m.key,m.props,null,p.mode,y),y.ref=Ti(p,null,m),y.return=p,y;case br:return m=Ws(m,p.mode,y),m.return=p,m;case mn:var P=m._init;return c(p,P(m._payload),y)}if(Fi(m)||Si(m))return m=sr(m,p.mode,y,null),m.return=p,m;Hl(p,m)}return null}function d(p,m,y,P){var T=m!==null?m.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return T!==null?null:s(p,m,""+y,P);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case zl:return y.key===T?u(p,m,y,P):null;case br:return y.key===T?a(p,m,y,P):null;case mn:return T=y._init,d(p,m,T(y._payload),P)}if(Fi(y)||Si(y))return T!==null?null:f(p,m,y,P,null);Hl(p,y)}return null}function h(p,m,y,P,T){if(typeof P=="string"&&P!==""||typeof P=="number")return p=p.get(y)||null,s(m,p,""+P,T);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case zl:return p=p.get(P.key===null?y:P.key)||null,u(m,p,P,T);case br:return p=p.get(P.key===null?y:P.key)||null,a(m,p,P,T);case mn:var E=P._init;return h(p,m,y,E(P._payload),T)}if(Fi(P)||Si(P))return p=p.get(y)||null,f(m,p,P,T,null);Hl(m,P)}return null}function g(p,m,y,P){for(var T=null,E=null,I=m,j=m=0,M=null;I!==null&&j<y.length;j++){I.index>j?(M=I,I=null):M=I.sibling;var b=d(p,I,y[j],P);if(b===null){I===null&&(I=M);break}e&&I&&b.alternate===null&&t(p,I),m=l(b,m,j),E===null?T=b:E.sibling=b,E=b,I=M}if(j===y.length)return n(p,I),de&&Wn(p,j),T;if(I===null){for(;j<y.length;j++)I=c(p,y[j],P),I!==null&&(m=l(I,m,j),E===null?T=I:E.sibling=I,E=I);return de&&Wn(p,j),T}for(I=r(p,I);j<y.length;j++)M=h(I,p,j,y[j],P),M!==null&&(e&&M.alternate!==null&&I.delete(M.key===null?j:M.key),m=l(M,m,j),E===null?T=M:E.sibling=M,E=M);return e&&I.forEach(function(A){return t(p,A)}),de&&Wn(p,j),T}function v(p,m,y,P){var T=Si(y);if(typeof T!="function")throw Error(N(150));if(y=T.call(y),y==null)throw Error(N(151));for(var E=T=null,I=m,j=m=0,M=null,b=y.next();I!==null&&!b.done;j++,b=y.next()){I.index>j?(M=I,I=null):M=I.sibling;var A=d(p,I,b.value,P);if(A===null){I===null&&(I=M);break}e&&I&&A.alternate===null&&t(p,I),m=l(A,m,j),E===null?T=A:E.sibling=A,E=A,I=M}if(b.done)return n(p,I),de&&Wn(p,j),T;if(I===null){for(;!b.done;j++,b=y.next())b=c(p,b.value,P),b!==null&&(m=l(b,m,j),E===null?T=b:E.sibling=b,E=b);return de&&Wn(p,j),T}for(I=r(p,I);!b.done;j++,b=y.next())b=h(I,p,j,b.value,P),b!==null&&(e&&b.alternate!==null&&I.delete(b.key===null?j:b.key),m=l(b,m,j),E===null?T=b:E.sibling=b,E=b);return e&&I.forEach(function(O){return t(p,O)}),de&&Wn(p,j),T}function C(p,m,y,P){if(typeof y=="object"&&y!==null&&y.type===Tr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case zl:e:{for(var T=y.key,E=m;E!==null;){if(E.key===T){if(T=y.type,T===Tr){if(E.tag===7){n(p,E.sibling),m=i(E,y.props.children),m.return=p,p=m;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===mn&&Jf(T)===E.type){n(p,E.sibling),m=i(E,y.props),m.ref=Ti(p,E,y),m.return=p,p=m;break e}n(p,E);break}else t(p,E);E=E.sibling}y.type===Tr?(m=sr(y.props.children,p.mode,P,y.key),m.return=p,p=m):(P=ho(y.type,y.key,y.props,null,p.mode,P),P.ref=Ti(p,m,y),P.return=p,p=P)}return o(p);case br:e:{for(E=y.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(p,m.sibling),m=i(m,y.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=Ws(y,p.mode,P),m.return=p,p=m}return o(p);case mn:return E=y._init,C(p,m,E(y._payload),P)}if(Fi(y))return g(p,m,y,P);if(Si(y))return v(p,m,y,P);Hl(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(p,m.sibling),m=i(m,y),m.return=p,p=m):(n(p,m),m=qs(y,p.mode,P),m.return=p,p=m),o(p)):n(p,m)}return C}var ui=lm(!0),om=lm(!1),Lo=Hn(null),Ao=null,Fr=null,nc=null;function rc(){nc=Fr=Ao=null}function ic(e){var t=Lo.current;he(Lo),e._currentValue=t}function Xu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hr(e,t){Ao=e,nc=Fr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ze=!0),e.firstContext=null)}function xt(e){var t=e._currentValue;if(nc!==e)if(e={context:e,memoizedValue:t,next:null},Fr===null){if(Ao===null)throw Error(N(308));Fr=e,Ao.dependencies={lanes:0,firstContext:e}}else Fr=Fr.next=e;return t}var Xn=null;function lc(e){Xn===null?Xn=[e]:Xn.push(e)}function sm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,lc(t)):(n.next=i.next,i.next=n),t.interleaved=n,on(e,r)}function on(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var gn=!1;function oc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function um(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function An(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ee&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,on(e,n)}return i=r.interleaved,i===null?(t.next=t,lc(r)):(t.next=i.next,i.next=t),r.interleaved=t,on(e,n)}function oo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Va(e,n)}}function Zf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=o:l=l.next=o,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fo(e,t,n,r){var i=e.updateQueue;gn=!1;var l=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,a=u.next;u.next=null,o===null?l=a:o.next=a,o=u;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==o&&(s===null?f.firstBaseUpdate=a:s.next=a,f.lastBaseUpdate=u))}if(l!==null){var c=i.baseState;o=0,f=a=u=null,s=l;do{var d=s.lane,h=s.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,v=s;switch(d=t,h=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){c=g.call(h,c,d);break e}c=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,d=typeof g=="function"?g.call(h,c,d):g,d==null)break e;c=ge({},c,d);break e;case 2:gn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(a=f=h,u=c):f=f.next=h,o|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(u=c),i.baseState=u,i.firstBaseUpdate=a,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);pr|=o,e.lanes=o,e.memoizedState=c}}function eh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(N(191,i));i.call(r)}}}var El={},Vt=Hn(El),ul=Hn(El),al=Hn(El);function Jn(e){if(e===El)throw Error(N(174));return e}function sc(e,t){switch(ae(al,t),ae(ul,e),ae(Vt,El),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Nu(t,e)}he(Vt),ae(Vt,t)}function ai(){he(Vt),he(ul),he(al)}function am(e){Jn(al.current);var t=Jn(Vt.current),n=Nu(t,e.type);t!==n&&(ae(ul,e),ae(Vt,n))}function uc(e){ul.current===e&&(he(Vt),he(ul))}var pe=Hn(0);function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bs=[];function ac(){for(var e=0;e<Bs.length;e++)Bs[e]._workInProgressVersionPrimary=null;Bs.length=0}var so=an.ReactCurrentDispatcher,Us=an.ReactCurrentBatchConfig,dr=0,me=null,Pe=null,_e=null,Do=!1,Hi=!1,cl=0,Z1=0;function Fe(){throw Error(N(321))}function cc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zt(e[n],t[n]))return!1;return!0}function fc(e,t,n,r,i,l){if(dr=l,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,so.current=e===null||e.memoizedState===null?rk:ik,e=n(r,i),Hi){l=0;do{if(Hi=!1,cl=0,25<=l)throw Error(N(301));l+=1,_e=Pe=null,t.updateQueue=null,so.current=lk,e=n(r,i)}while(Hi)}if(so.current=Oo,t=Pe!==null&&Pe.next!==null,dr=0,_e=Pe=me=null,Do=!1,t)throw Error(N(300));return e}function hc(){var e=cl!==0;return cl=0,e}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?me.memoizedState=_e=e:_e=_e.next=e,_e}function wt(){if(Pe===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=_e===null?me.memoizedState:_e.next;if(t!==null)_e=t,Pe=e;else{if(e===null)throw Error(N(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},_e===null?me.memoizedState=_e=e:_e=_e.next=e}return _e}function fl(e,t){return typeof t=="function"?t(e):t}function $s(e){var t=wt(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=Pe,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var o=i.next;i.next=l.next,l.next=o}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var s=o=null,u=null,a=l;do{var f=a.lane;if((dr&f)===f)u!==null&&(u=u.next={lane:0,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null}),r=a.hasEagerState?a.eagerState:e(r,a.action);else{var c={lane:f,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};u===null?(s=u=c,o=r):u=u.next=c,me.lanes|=f,pr|=f}a=a.next}while(a!==null&&a!==l);u===null?o=r:u.next=s,zt(r,t.memoizedState)||(Ze=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,me.lanes|=l,pr|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Hs(e){var t=wt(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do l=e(l,o.action),o=o.next;while(o!==i);zt(l,t.memoizedState)||(Ze=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function cm(){}function fm(e,t){var n=me,r=wt(),i=t(),l=!zt(r.memoizedState,i);if(l&&(r.memoizedState=i,Ze=!0),r=r.queue,dc(pm.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||_e!==null&&_e.memoizedState.tag&1){if(n.flags|=2048,hl(9,dm.bind(null,n,r,i,t),void 0,null),je===null)throw Error(N(349));dr&30||hm(n,t,i)}return i}function hm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function dm(e,t,n,r){t.value=n,t.getSnapshot=r,mm(t)&&gm(e)}function pm(e,t,n){return n(function(){mm(t)&&gm(e)})}function mm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zt(e,n)}catch{return!0}}function gm(e){var t=on(e,1);t!==null&&jt(t,e,1,-1)}function th(e){var t=Dt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:e},t.queue=e,e=e.dispatch=nk.bind(null,me,e),[t.memoizedState,e]}function hl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ym(){return wt().memoizedState}function uo(e,t,n,r){var i=Dt();me.flags|=e,i.memoizedState=hl(1|t,n,void 0,r===void 0?null:r)}function rs(e,t,n,r){var i=wt();r=r===void 0?null:r;var l=void 0;if(Pe!==null){var o=Pe.memoizedState;if(l=o.destroy,r!==null&&cc(r,o.deps)){i.memoizedState=hl(t,n,l,r);return}}me.flags|=e,i.memoizedState=hl(1|t,n,l,r)}function nh(e,t){return uo(8390656,8,e,t)}function dc(e,t){return rs(2048,8,e,t)}function vm(e,t){return rs(4,2,e,t)}function km(e,t){return rs(4,4,e,t)}function xm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function wm(e,t,n){return n=n!=null?n.concat([e]):null,rs(4,4,xm.bind(null,t,e),n)}function pc(){}function Sm(e,t){var n=wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&cc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cm(e,t){var n=wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&cc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Em(e,t,n){return dr&21?(zt(n,t)||(n=jp(),me.lanes|=n,pr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ze=!0),e.memoizedState=n)}function ek(e,t){var n=re;re=n!==0&&4>n?n:4,e(!0);var r=Us.transition;Us.transition={};try{e(!1),t()}finally{re=n,Us.transition=r}}function Pm(){return wt().memoizedState}function tk(e,t,n){var r=Rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bm(e))Tm(t,n);else if(n=sm(e,t,n,r),n!==null){var i=Qe();jt(n,e,r,i),_m(n,t,r)}}function nk(e,t,n){var r=Rn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bm(e))Tm(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var o=t.lastRenderedState,s=l(o,n);if(i.hasEagerState=!0,i.eagerState=s,zt(s,o)){var u=t.interleaved;u===null?(i.next=i,lc(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=sm(e,t,i,r),n!==null&&(i=Qe(),jt(n,e,r,i),_m(n,t,r))}}function bm(e){var t=e.alternate;return e===me||t!==null&&t===me}function Tm(e,t){Hi=Do=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _m(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Va(e,n)}}var Oo={readContext:xt,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},rk={readContext:xt,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:nh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,uo(4194308,4,xm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return uo(4194308,4,e,t)},useInsertionEffect:function(e,t){return uo(4,2,e,t)},useMemo:function(e,t){var n=Dt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tk.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:th,useDebugValue:pc,useDeferredValue:function(e){return Dt().memoizedState=e},useTransition:function(){var e=th(!1),t=e[0];return e=ek.bind(null,e[1]),Dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=me,i=Dt();if(de){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),je===null)throw Error(N(349));dr&30||hm(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,nh(pm.bind(null,r,l,e),[e]),r.flags|=2048,hl(9,dm.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Dt(),t=je.identifierPrefix;if(de){var n=en,r=Zt;n=(r&~(1<<32-_t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Z1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ik={readContext:xt,useCallback:Sm,useContext:xt,useEffect:dc,useImperativeHandle:wm,useInsertionEffect:vm,useLayoutEffect:km,useMemo:Cm,useReducer:$s,useRef:ym,useState:function(){return $s(fl)},useDebugValue:pc,useDeferredValue:function(e){var t=wt();return Em(t,Pe.memoizedState,e)},useTransition:function(){var e=$s(fl)[0],t=wt().memoizedState;return[e,t]},useMutableSource:cm,useSyncExternalStore:fm,useId:Pm,unstable_isNewReconciler:!1},lk={readContext:xt,useCallback:Sm,useContext:xt,useEffect:dc,useImperativeHandle:wm,useInsertionEffect:vm,useLayoutEffect:km,useMemo:Cm,useReducer:Hs,useRef:ym,useState:function(){return Hs(fl)},useDebugValue:pc,useDeferredValue:function(e){var t=wt();return Pe===null?t.memoizedState=e:Em(t,Pe.memoizedState,e)},useTransition:function(){var e=Hs(fl)[0],t=wt().memoizedState;return[e,t]},useMutableSource:cm,useSyncExternalStore:fm,useId:Pm,unstable_isNewReconciler:!1};function Ct(e,t){if(e&&e.defaultProps){t=ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ju(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return(e=e._reactInternals)?kr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qe(),i=Rn(e),l=tn(r,i);l.payload=t,n!=null&&(l.callback=n),t=An(e,l,i),t!==null&&(jt(t,e,i,r),oo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qe(),i=Rn(e),l=tn(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=An(e,l,i),t!==null&&(jt(t,e,i,r),oo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qe(),r=Rn(e),i=tn(n,r);i.tag=2,t!=null&&(i.callback=t),t=An(e,i,r),t!==null&&(jt(t,e,r,n),oo(t,e,r))}};function rh(e,t,n,r,i,l,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,o):t.prototype&&t.prototype.isPureReactComponent?!il(n,r)||!il(i,l):!0}function jm(e,t,n){var r=!1,i=Bn,l=t.contextType;return typeof l=="object"&&l!==null?l=xt(l):(i=tt(t)?fr:Me.current,r=t.contextTypes,l=(r=r!=null)?oi(e,i):Bn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function ih(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&&is.enqueueReplaceState(t,t.state,null)}function Zu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},oc(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=xt(l):(l=tt(t)?fr:Me.current,i.context=oi(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Ju(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Fo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ci(e,t){try{var n="",r=t;do n+=Lv(r),r=r.return;while(r);var i=n}catch(l){i=`
|
|
39
|
+
Error generating stack: `+l.message+`
|
|
40
|
+
`+l.stack}return{value:e,source:t,stack:i,digest:null}}function Qs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ea(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ok=typeof WeakMap=="function"?WeakMap:Map;function Im(e,t,n){n=tn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Bo||(Bo=!0,ca=r),ea(e,t)},n}function Nm(e,t,n){n=tn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ea(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){ea(e,t),typeof r!="function"&&(Fn===null?Fn=new Set([this]):Fn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function lh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ok;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=xk.bind(null,e,t,n),t.then(e,e))}function oh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function sh(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=tn(-1,1),t.tag=2,An(n,t,1))),n.lanes|=1),e)}var sk=an.ReactCurrentOwner,Ze=!1;function He(e,t,n,r){t.child=e===null?om(t,null,n,r):ui(t,e.child,n,r)}function uh(e,t,n,r,i){n=n.render;var l=t.ref;return Hr(t,i),r=fc(e,t,n,r,l,i),n=hc(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,sn(e,t,i)):(de&&n&&Za(t),t.flags|=1,He(e,t,r,i),t.child)}function ah(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!Sc(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,zm(e,t,l,r,i)):(e=ho(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var o=l.memoizedProps;if(n=n.compare,n=n!==null?n:il,n(o,r)&&e.ref===t.ref)return sn(e,t,i)}return t.flags|=1,e=Dn(l,r),e.ref=t.ref,e.return=t,t.child=e}function zm(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(il(l,r)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(Ze=!0);else return t.lanes=e.lanes,sn(e,t,i)}return ta(e,t,n,r,i)}function Lm(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ae(Dr,st),st|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ae(Dr,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,ae(Dr,st),st|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,ae(Dr,st),st|=r;return He(e,t,i,n),t.child}function Am(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ta(e,t,n,r,i){var l=tt(n)?fr:Me.current;return l=oi(t,l),Hr(t,i),n=fc(e,t,n,r,l,i),r=hc(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,sn(e,t,i)):(de&&r&&Za(t),t.flags|=1,He(e,t,n,i),t.child)}function ch(e,t,n,r,i){if(tt(n)){var l=!0;Io(t)}else l=!1;if(Hr(t,i),t.stateNode===null)ao(e,t),jm(t,n,r),Zu(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,a=n.contextType;typeof a=="object"&&a!==null?a=xt(a):(a=tt(n)?fr:Me.current,a=oi(t,a));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||u!==a)&&ih(t,o,r,a),gn=!1;var d=t.memoizedState;o.state=d,Fo(t,r,o,i),u=t.memoizedState,s!==r||d!==u||et.current||gn?(typeof f=="function"&&(Ju(t,n,f,r),u=t.memoizedState),(s=gn||rh(t,n,s,r,d,u,a))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=a,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,um(e,t),s=t.memoizedProps,a=t.type===t.elementType?s:Ct(t.type,s),o.props=a,c=t.pendingProps,d=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=xt(u):(u=tt(n)?fr:Me.current,u=oi(t,u));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==c||d!==u)&&ih(t,o,r,u),gn=!1,d=t.memoizedState,o.state=d,Fo(t,r,o,i);var g=t.memoizedState;s!==c||d!==g||et.current||gn?(typeof h=="function"&&(Ju(t,n,h,r),g=t.memoizedState),(a=gn||rh(t,n,a,r,d,g,u)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),o.props=r,o.state=g,o.context=u,r=a):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return na(e,t,n,r,l,i)}function na(e,t,n,r,i,l){Am(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Gf(t,n,!1),sn(e,t,l);r=t.stateNode,sk.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=ui(t,e.child,null,l),t.child=ui(t,null,s,l)):He(e,t,s,l),t.memoizedState=r.state,i&&Gf(t,n,!0),t.child}function Fm(e){var t=e.stateNode;t.pendingContext?Kf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Kf(e,t.context,!1),sc(e,t.containerInfo)}function fh(e,t,n,r,i){return si(),tc(i),t.flags|=256,He(e,t,n,r),t.child}var ra={dehydrated:null,treeContext:null,retryLane:0};function ia(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rm(e,t,n){var r=t.pendingProps,i=pe.current,l=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ae(pe,i&1),e===null)return Yu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,l?(r=t.mode,l=t.child,o={mode:"hidden",children:o},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=o):l=ss(o,r,0,null),e=sr(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=ia(n),t.memoizedState=ra,e):mc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return uk(e,t,o,r,s,i,n);if(l){l=r.fallback,o=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Dn(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?l=Dn(s,l):(l=sr(l,o,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,o=e.child.memoizedState,o=o===null?ia(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},l.memoizedState=o,l.childLanes=e.childLanes&~n,t.memoizedState=ra,r}return l=e.child,e=l.sibling,r=Dn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function mc(e,t){return t=ss({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ql(e,t,n,r){return r!==null&&tc(r),ui(t,e.child,null,n),e=mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uk(e,t,n,r,i,l,o){if(n)return t.flags&256?(t.flags&=-257,r=Qs(Error(N(422))),Ql(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=ss({mode:"visible",children:r.children},i,0,null),l=sr(l,i,o,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&ui(t,e.child,null,o),t.child.memoizedState=ia(o),t.memoizedState=ra,l);if(!(t.mode&1))return Ql(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,l=Error(N(419)),r=Qs(l,r,void 0),Ql(e,t,o,r)}if(s=(o&e.childLanes)!==0,Ze||s){if(r=je,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,on(e,i),jt(r,e,i,-1))}return wc(),r=Qs(Error(N(421))),Ql(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=wk.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,ut=Ln(i.nextSibling),at=t,de=!0,Tt=null,e!==null&&(mt[gt++]=Zt,mt[gt++]=en,mt[gt++]=hr,Zt=e.id,en=e.overflow,hr=t),t=mc(t,r.children),t.flags|=4096,t)}function hh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xu(e.return,t,n)}function Vs(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function Dm(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(He(e,t,r.children,n),r=pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hh(e,n,t);else if(e.tag===19)hh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ae(pe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Vs(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Vs(t,!0,n,null,l);break;case"together":Vs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ao(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function sn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=Dn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ak(e,t,n){switch(t.tag){case 3:Fm(t),si();break;case 5:am(t);break;case 1:tt(t.type)&&Io(t);break;case 4:sc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ae(Lo,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ae(pe,pe.current&1),t.flags|=128,null):n&t.child.childLanes?Rm(e,t,n):(ae(pe,pe.current&1),e=sn(e,t,n),e!==null?e.sibling:null);ae(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dm(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ae(pe,pe.current),r)break;return null;case 22:case 23:return t.lanes=0,Lm(e,t,n)}return sn(e,t,n)}var Om,la,Mm,Bm;Om=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};la=function(){};Mm=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Jn(Vt.current);var l=null;switch(n){case"input":i=Tu(e,i),r=Tu(e,r),l=[];break;case"select":i=ge({},i,{value:void 0}),r=ge({},r,{value:void 0}),l=[];break;case"textarea":i=Iu(e,i),r=Iu(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=_o)}zu(n,r);var o;n=null;for(a in i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&i[a]!=null)if(a==="style"){var s=i[a];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Xi.hasOwnProperty(a)?l||(l=[]):(l=l||[]).push(a,null));for(a in r){var u=r[a];if(s=i!=null?i[a]:void 0,r.hasOwnProperty(a)&&u!==s&&(u!=null||s!=null))if(a==="style")if(s){for(o in s)!s.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&s[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(l||(l=[]),l.push(a,n)),n=u;else a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(l=l||[]).push(a,u)):a==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(a,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(Xi.hasOwnProperty(a)?(u!=null&&a==="onScroll"&&fe("scroll",e),l||s===u||(l=[])):(l=l||[]).push(a,u))}n&&(l=l||[]).push("style",n);var a=l;(t.updateQueue=a)&&(t.flags|=4)}};Bm=function(e,t,n,r){n!==r&&(t.flags|=4)};function _i(e,t){if(!de)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 Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ck(e,t,n){var r=t.pendingProps;switch(ec(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return tt(t.type)&&jo(),Re(t),null;case 3:return r=t.stateNode,ai(),he(et),he(Me),ac(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($l(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tt!==null&&(da(Tt),Tt=null))),la(e,t),Re(t),null;case 5:uc(t);var i=Jn(al.current);if(n=t.type,e!==null&&t.stateNode!=null)Mm(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return Re(t),null}if(e=Jn(Vt.current),$l(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Ht]=t,r[sl]=l,e=(t.mode&1)!==0,n){case"dialog":fe("cancel",r),fe("close",r);break;case"iframe":case"object":case"embed":fe("load",r);break;case"video":case"audio":for(i=0;i<Di.length;i++)fe(Di[i],r);break;case"source":fe("error",r);break;case"img":case"image":case"link":fe("error",r),fe("load",r);break;case"details":fe("toggle",r);break;case"input":wf(r,l),fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},fe("invalid",r);break;case"textarea":Cf(r,l),fe("invalid",r)}zu(n,l),i=null;for(var o in l)if(l.hasOwnProperty(o)){var s=l[o];o==="children"?typeof s=="string"?r.textContent!==s&&(l.suppressHydrationWarning!==!0&&Ul(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(l.suppressHydrationWarning!==!0&&Ul(r.textContent,s,e),i=["children",""+s]):Xi.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&fe("scroll",r)}switch(n){case"input":Ll(r),Sf(r,l,!0);break;case"textarea":Ll(r),Ef(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=_o)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=pp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ht]=t,e[sl]=r,Om(e,t,!1,!1),t.stateNode=e;e:{switch(o=Lu(n,r),n){case"dialog":fe("cancel",e),fe("close",e),i=r;break;case"iframe":case"object":case"embed":fe("load",e),i=r;break;case"video":case"audio":for(i=0;i<Di.length;i++)fe(Di[i],e);i=r;break;case"source":fe("error",e),i=r;break;case"img":case"image":case"link":fe("error",e),fe("load",e),i=r;break;case"details":fe("toggle",e),i=r;break;case"input":wf(e,r),i=Tu(e,r),fe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ge({},r,{value:void 0}),fe("invalid",e);break;case"textarea":Cf(e,r),i=Iu(e,r),fe("invalid",e);break;default:i=r}zu(n,i),s=i;for(l in s)if(s.hasOwnProperty(l)){var u=s[l];l==="style"?yp(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&mp(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Ji(e,u):typeof u=="number"&&Ji(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Xi.hasOwnProperty(l)?u!=null&&l==="onScroll"&&fe("scroll",e):u!=null&&Ma(e,l,u,o))}switch(n){case"input":Ll(e),Sf(e,r,!1);break;case"textarea":Ll(e),Ef(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Mn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Mr(e,!!r.multiple,l,!1):r.defaultValue!=null&&Mr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=_o)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Re(t),null;case 6:if(e&&t.stateNode!=null)Bm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=Jn(al.current),Jn(Vt.current),$l(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ht]=t,(l=r.nodeValue!==n)&&(e=at,e!==null))switch(e.tag){case 3:Ul(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ul(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ht]=t,t.stateNode=r}return Re(t),null;case 13:if(he(pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&ut!==null&&t.mode&1&&!(t.flags&128))im(),si(),t.flags|=98560,l=!1;else if(l=$l(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(N(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(N(317));l[Ht]=t}else si(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),l=!1}else Tt!==null&&(da(Tt),Tt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||pe.current&1?Te===0&&(Te=3):wc())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return ai(),la(e,t),e===null&&ll(t.stateNode.containerInfo),Re(t),null;case 10:return ic(t.type._context),Re(t),null;case 17:return tt(t.type)&&jo(),Re(t),null;case 19:if(he(pe),l=t.memoizedState,l===null)return Re(t),null;if(r=(t.flags&128)!==0,o=l.rendering,o===null)if(r)_i(l,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ro(e),o!==null){for(t.flags|=128,_i(l,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,o=l.alternate,o===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,l.type=o.type,e=o.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ae(pe,pe.current&1|2),t.child}e=e.sibling}l.tail!==null&&xe()>fi&&(t.flags|=128,r=!0,_i(l,!1),t.lanes=4194304)}else{if(!r)if(e=Ro(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_i(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!de)return Re(t),null}else 2*xe()-l.renderingStartTime>fi&&n!==1073741824&&(t.flags|=128,r=!0,_i(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(n=l.last,n!==null?n.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=xe(),t.sibling=null,n=pe.current,ae(pe,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return xc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?st&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function fk(e,t){switch(ec(t),t.tag){case 1:return tt(t.type)&&jo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ai(),he(et),he(Me),ac(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uc(t),null;case 13:if(he(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));si()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(pe),null;case 4:return ai(),null;case 10:return ic(t.type._context),null;case 22:case 23:return xc(),null;case 24:return null;default:return null}}var Vl=!1,Oe=!1,hk=typeof WeakSet=="function"?WeakSet:Set,D=null;function Rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function oa(e,t,n){try{n()}catch(r){ve(e,t,r)}}var dh=!1;function dk(e,t){if(Hu=Po,e=Vp(),Ja(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,a=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(s=o+i),c!==l||r!==0&&c.nodeType!==3||(u=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++a===i&&(s=o),d===l&&++f===r&&(u=o),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qu={focusedElem:e,selectionRange:n},Po=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,C=g.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ct(t.type,v),C);p.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(P){ve(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return g=dh,dh=!1,g}function Qi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&oa(t,n,l)}i=i.next}while(i!==r)}}function ls(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Um(e){var t=e.alternate;t!==null&&(e.alternate=null,Um(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ht],delete t[sl],delete t[Wu],delete t[G1],delete t[Y1])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $m(e){return e.tag===5||e.tag===3||e.tag===4}function ph(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$m(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ua(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_o));else if(r!==4&&(e=e.child,e!==null))for(ua(e,t,n),e=e.sibling;e!==null;)ua(e,t,n),e=e.sibling}function aa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(aa(e,t,n),e=e.sibling;e!==null;)aa(e,t,n),e=e.sibling}var Ie=null,Pt=!1;function hn(e,t,n){for(n=n.child;n!==null;)Hm(e,t,n),n=n.sibling}function Hm(e,t,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Xo,n)}catch{}switch(n.tag){case 5:Oe||Rr(n,t);case 6:var r=Ie,i=Pt;Ie=null,hn(e,t,n),Ie=r,Pt=i,Ie!==null&&(Pt?(e=Ie,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ie.removeChild(n.stateNode));break;case 18:Ie!==null&&(Pt?(e=Ie,n=n.stateNode,e.nodeType===8?Os(e.parentNode,n):e.nodeType===1&&Os(e,n),nl(e)):Os(Ie,n.stateNode));break;case 4:r=Ie,i=Pt,Ie=n.stateNode.containerInfo,Pt=!0,hn(e,t,n),Ie=r,Pt=i;break;case 0:case 11:case 14:case 15:if(!Oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&oa(n,t,o),i=i.next}while(i!==r)}hn(e,t,n);break;case 1:if(!Oe&&(Rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ve(n,t,s)}hn(e,t,n);break;case 21:hn(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,hn(e,t,n),Oe=r):hn(e,t,n);break;default:hn(e,t,n)}}function mh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new hk),t.forEach(function(r){var i=Sk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:Ie=s.stateNode,Pt=!1;break e;case 3:Ie=s.stateNode.containerInfo,Pt=!0;break e;case 4:Ie=s.stateNode.containerInfo,Pt=!0;break e}s=s.return}if(Ie===null)throw Error(N(160));Hm(l,o,i),Ie=null,Pt=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(a){ve(i,t,a)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Qm(t,e),t=t.sibling}function Qm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(St(t,e),Rt(e),r&4){try{Qi(3,e,e.return),ls(3,e)}catch(v){ve(e,e.return,v)}try{Qi(5,e,e.return)}catch(v){ve(e,e.return,v)}}break;case 1:St(t,e),Rt(e),r&512&&n!==null&&Rr(n,n.return);break;case 5:if(St(t,e),Rt(e),r&512&&n!==null&&Rr(n,n.return),e.flags&32){var i=e.stateNode;try{Ji(i,"")}catch(v){ve(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,o=n!==null?n.memoizedProps:l,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&l.type==="radio"&&l.name!=null&&hp(i,l),Lu(s,o);var a=Lu(s,l);for(o=0;o<u.length;o+=2){var f=u[o],c=u[o+1];f==="style"?yp(i,c):f==="dangerouslySetInnerHTML"?mp(i,c):f==="children"?Ji(i,c):Ma(i,f,c,a)}switch(s){case"input":_u(i,l);break;case"textarea":dp(i,l);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var h=l.value;h!=null?Mr(i,!!l.multiple,h,!1):d!==!!l.multiple&&(l.defaultValue!=null?Mr(i,!!l.multiple,l.defaultValue,!0):Mr(i,!!l.multiple,l.multiple?[]:"",!1))}i[sl]=l}catch(v){ve(e,e.return,v)}}break;case 6:if(St(t,e),Rt(e),r&4){if(e.stateNode===null)throw Error(N(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(v){ve(e,e.return,v)}}break;case 3:if(St(t,e),Rt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{nl(t.containerInfo)}catch(v){ve(e,e.return,v)}break;case 4:St(t,e),Rt(e);break;case 13:St(t,e),Rt(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(vc=xe())),r&4&&mh(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Oe=(a=Oe)||f,St(t,e),Oe=a):St(t,e),Rt(e),r&8192){if(a=e.memoizedState!==null,(e.stateNode.isHidden=a)&&!f&&e.mode&1)for(D=e,f=e.child;f!==null;){for(c=D=f;D!==null;){switch(d=D,h=d.child,d.tag){case 0:case 11:case 14:case 15:Qi(4,d,d.return);break;case 1:Rr(d,d.return);var g=d.stateNode;if(typeof g.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){ve(r,n,v)}}break;case 5:Rr(d,d.return);break;case 22:if(d.memoizedState!==null){yh(c);continue}}h!==null?(h.return=d,D=h):yh(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,a?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(s=c.stateNode,u=c.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=gp("display",o))}catch(v){ve(e,e.return,v)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(v){ve(e,e.return,v)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:St(t,e),Rt(e),r&4&&mh(e);break;case 21:break;default:St(t,e),Rt(e)}}function Rt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($m(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ji(i,""),r.flags&=-33);var l=ph(e);aa(e,l,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=ph(e);ua(e,s,o);break;default:throw Error(N(161))}}catch(u){ve(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pk(e,t,n){D=e,Vm(e)}function Vm(e,t,n){for(var r=(e.mode&1)!==0;D!==null;){var i=D,l=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Vl;if(!o){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Oe;s=Vl;var a=Oe;if(Vl=o,(Oe=u)&&!a)for(D=i;D!==null;)o=D,u=o.child,o.tag===22&&o.memoizedState!==null?vh(i):u!==null?(u.return=o,D=u):vh(i);for(;l!==null;)D=l,Vm(l),l=l.sibling;D=i,Vl=s,Oe=a}gh(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,D=l):gh(e)}}function gh(e){for(;D!==null;){var t=D;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||ls(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Oe)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ct(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&eh(t,l,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}eh(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var a=t.alternate;if(a!==null){var f=a.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&nl(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}Oe||t.flags&512&&sa(t)}catch(d){ve(t,t.return,d)}}if(t===e){D=null;break}if(n=t.sibling,n!==null){n.return=t.return,D=n;break}D=t.return}}function yh(e){for(;D!==null;){var t=D;if(t===e){D=null;break}var n=t.sibling;if(n!==null){n.return=t.return,D=n;break}D=t.return}}function vh(e){for(;D!==null;){var t=D;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ls(4,t)}catch(u){ve(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){ve(t,i,u)}}var l=t.return;try{sa(t)}catch(u){ve(t,l,u)}break;case 5:var o=t.return;try{sa(t)}catch(u){ve(t,o,u)}}}catch(u){ve(t,t.return,u)}if(t===e){D=null;break}var s=t.sibling;if(s!==null){s.return=t.return,D=s;break}D=t.return}}var mk=Math.ceil,Mo=an.ReactCurrentDispatcher,gc=an.ReactCurrentOwner,kt=an.ReactCurrentBatchConfig,ee=0,je=null,Ce=null,Le=0,st=0,Dr=Hn(0),Te=0,dl=null,pr=0,os=0,yc=0,Vi=null,Je=null,vc=0,fi=1/0,Yt=null,Bo=!1,ca=null,Fn=null,ql=!1,jn=null,Uo=0,qi=0,fa=null,co=-1,fo=0;function Qe(){return ee&6?xe():co!==-1?co:co=xe()}function Rn(e){return e.mode&1?ee&2&&Le!==0?Le&-Le:J1.transition!==null?(fo===0&&(fo=jp()),fo):(e=re,e!==0||(e=window.event,e=e===void 0?16:Rp(e.type)),e):1}function jt(e,t,n,r){if(50<qi)throw qi=0,fa=null,Error(N(185));wl(e,n,r),(!(ee&2)||e!==je)&&(e===je&&(!(ee&2)&&(os|=n),Te===4&&vn(e,Le)),nt(e,r),n===1&&ee===0&&!(t.mode&1)&&(fi=xe()+500,ns&&Qn()))}function nt(e,t){var n=e.callbackNode;Jv(e,t);var r=Eo(e,e===je?Le:0);if(r===0)n!==null&&Tf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tf(n),t===1)e.tag===0?X1(kh.bind(null,e)):tm(kh.bind(null,e)),W1(function(){!(ee&6)&&Qn()}),n=null;else{switch(Ip(r)){case 1:n=Qa;break;case 4:n=Tp;break;case 16:n=Co;break;case 536870912:n=_p;break;default:n=Co}n=Zm(n,qm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qm(e,t){if(co=-1,fo=0,ee&6)throw Error(N(327));var n=e.callbackNode;if(Qr()&&e.callbackNode!==n)return null;var r=Eo(e,e===je?Le:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=$o(e,r);else{t=r;var i=ee;ee|=2;var l=Km();(je!==e||Le!==t)&&(Yt=null,fi=xe()+500,or(e,t));do try{vk();break}catch(s){Wm(e,s)}while(!0);rc(),Mo.current=l,ee=i,Ce!==null?t=0:(je=null,Le=0,t=Te)}if(t!==0){if(t===2&&(i=Ou(e),i!==0&&(r=i,t=ha(e,i))),t===1)throw n=dl,or(e,0),vn(e,r),nt(e,xe()),n;if(t===6)vn(e,r);else{if(i=e.current.alternate,!(r&30)&&!gk(i)&&(t=$o(e,r),t===2&&(l=Ou(e),l!==0&&(r=l,t=ha(e,l))),t===1))throw n=dl,or(e,0),vn(e,r),nt(e,xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:Kn(e,Je,Yt);break;case 3:if(vn(e,r),(r&130023424)===r&&(t=vc+500-xe(),10<t)){if(Eo(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Qe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=qu(Kn.bind(null,e,Je,Yt),t);break}Kn(e,Je,Yt);break;case 4:if(vn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-_t(r);l=1<<o,o=t[o],o>i&&(i=o),r&=~l}if(r=i,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*mk(r/1960))-r,10<r){e.timeoutHandle=qu(Kn.bind(null,e,Je,Yt),r);break}Kn(e,Je,Yt);break;case 5:Kn(e,Je,Yt);break;default:throw Error(N(329))}}}return nt(e,xe()),e.callbackNode===n?qm.bind(null,e):null}function ha(e,t){var n=Vi;return e.current.memoizedState.isDehydrated&&(or(e,t).flags|=256),e=$o(e,t),e!==2&&(t=Je,Je=n,t!==null&&da(t)),e}function da(e){Je===null?Je=e:Je.push.apply(Je,e)}function gk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!zt(l(),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 vn(e,t){for(t&=~yc,t&=~os,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_t(t),r=1<<n;e[n]=-1,t&=~r}}function kh(e){if(ee&6)throw Error(N(327));Qr();var t=Eo(e,0);if(!(t&1))return nt(e,xe()),null;var n=$o(e,t);if(e.tag!==0&&n===2){var r=Ou(e);r!==0&&(t=r,n=ha(e,r))}if(n===1)throw n=dl,or(e,0),vn(e,t),nt(e,xe()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Kn(e,Je,Yt),nt(e,xe()),null}function kc(e,t){var n=ee;ee|=1;try{return e(t)}finally{ee=n,ee===0&&(fi=xe()+500,ns&&Qn())}}function mr(e){jn!==null&&jn.tag===0&&!(ee&6)&&Qr();var t=ee;ee|=1;var n=kt.transition,r=re;try{if(kt.transition=null,re=1,e)return e()}finally{re=r,kt.transition=n,ee=t,!(ee&6)&&Qn()}}function xc(){st=Dr.current,he(Dr)}function or(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,q1(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(ec(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&jo();break;case 3:ai(),he(et),he(Me),ac();break;case 5:uc(r);break;case 4:ai();break;case 13:he(pe);break;case 19:he(pe);break;case 10:ic(r.type._context);break;case 22:case 23:xc()}n=n.return}if(je=e,Ce=e=Dn(e.current,null),Le=st=t,Te=0,dl=null,yc=os=pr=0,Je=Vi=null,Xn!==null){for(t=0;t<Xn.length;t++)if(n=Xn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var o=l.next;l.next=i,r.next=o}n.pending=r}Xn=null}return e}function Wm(e,t){do{var n=Ce;try{if(rc(),so.current=Oo,Do){for(var r=me.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Do=!1}if(dr=0,_e=Pe=me=null,Hi=!1,cl=0,gc.current=null,n===null||n.return===null){Te=1,dl=t,Ce=null;break}e:{var l=e,o=n.return,s=n,u=t;if(t=Le,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var a=u,f=s,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=oh(o);if(h!==null){h.flags&=-257,sh(h,o,s,l,t),h.mode&1&&lh(l,a,t),t=h,u=a;var g=t.updateQueue;if(g===null){var v=new Set;v.add(u),t.updateQueue=v}else g.add(u);break e}else{if(!(t&1)){lh(l,a,t),wc();break e}u=Error(N(426))}}else if(de&&s.mode&1){var C=oh(o);if(C!==null){!(C.flags&65536)&&(C.flags|=256),sh(C,o,s,l,t),tc(ci(u,s));break e}}l=u=ci(u,s),Te!==4&&(Te=2),Vi===null?Vi=[l]:Vi.push(l),l=o;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var p=Im(l,u,t);Zf(l,p);break e;case 1:s=u;var m=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof m.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Fn===null||!Fn.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var P=Nm(l,s,t);Zf(l,P);break e}}l=l.return}while(l!==null)}Ym(n)}catch(T){t=T,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function Km(){var e=Mo.current;return Mo.current=Oo,e===null?Oo:e}function wc(){(Te===0||Te===3||Te===2)&&(Te=4),je===null||!(pr&268435455)&&!(os&268435455)||vn(je,Le)}function $o(e,t){var n=ee;ee|=2;var r=Km();(je!==e||Le!==t)&&(Yt=null,or(e,t));do try{yk();break}catch(i){Wm(e,i)}while(!0);if(rc(),ee=n,Mo.current=r,Ce!==null)throw Error(N(261));return je=null,Le=0,Te}function yk(){for(;Ce!==null;)Gm(Ce)}function vk(){for(;Ce!==null&&!Hv();)Gm(Ce)}function Gm(e){var t=Jm(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?Ym(e):Ce=t,gc.current=null}function Ym(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=fk(n,t),n!==null){n.flags&=32767,Ce=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,Ce=null;return}}else if(n=ck(n,t,st),n!==null){Ce=n;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Te===0&&(Te=5)}function Kn(e,t,n){var r=re,i=kt.transition;try{kt.transition=null,re=1,kk(e,t,n,r)}finally{kt.transition=i,re=r}return null}function kk(e,t,n,r){do Qr();while(jn!==null);if(ee&6)throw Error(N(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(N(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Zv(e,l),e===je&&(Ce=je=null,Le=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ql||(ql=!0,Zm(Co,function(){return Qr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=kt.transition,kt.transition=null;var o=re;re=1;var s=ee;ee|=4,gc.current=null,dk(e,n),Qm(n,e),M1(Qu),Po=!!Hu,Qu=Hu=null,e.current=n,pk(n),Qv(),ee=s,re=o,kt.transition=l}else e.current=n;if(ql&&(ql=!1,jn=e,Uo=i),l=e.pendingLanes,l===0&&(Fn=null),Wv(n.stateNode),nt(e,xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Bo)throw Bo=!1,e=ca,ca=null,e;return Uo&1&&e.tag!==0&&Qr(),l=e.pendingLanes,l&1?e===fa?qi++:(qi=0,fa=e):qi=0,Qn(),null}function Qr(){if(jn!==null){var e=Ip(Uo),t=kt.transition,n=re;try{if(kt.transition=null,re=16>e?16:e,jn===null)var r=!1;else{if(e=jn,jn=null,Uo=0,ee&6)throw Error(N(331));var i=ee;for(ee|=4,D=e.current;D!==null;){var l=D,o=l.child;if(D.flags&16){var s=l.deletions;if(s!==null){for(var u=0;u<s.length;u++){var a=s[u];for(D=a;D!==null;){var f=D;switch(f.tag){case 0:case 11:case 15:Qi(8,f,l)}var c=f.child;if(c!==null)c.return=f,D=c;else for(;D!==null;){f=D;var d=f.sibling,h=f.return;if(Um(f),f===a){D=null;break}if(d!==null){d.return=h,D=d;break}D=h}}}var g=l.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var C=v.sibling;v.sibling=null,v=C}while(v!==null)}}D=l}}if(l.subtreeFlags&2064&&o!==null)o.return=l,D=o;else e:for(;D!==null;){if(l=D,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Qi(9,l,l.return)}var p=l.sibling;if(p!==null){p.return=l.return,D=p;break e}D=l.return}}var m=e.current;for(D=m;D!==null;){o=D;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,D=y;else e:for(o=m;D!==null;){if(s=D,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:ls(9,s)}}catch(T){ve(s,s.return,T)}if(s===o){D=null;break e}var P=s.sibling;if(P!==null){P.return=s.return,D=P;break e}D=s.return}}if(ee=i,Qn(),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Xo,e)}catch{}r=!0}return r}finally{re=n,kt.transition=t}}return!1}function xh(e,t,n){t=ci(n,t),t=Im(e,t,1),e=An(e,t,1),t=Qe(),e!==null&&(wl(e,1,t),nt(e,t))}function ve(e,t,n){if(e.tag===3)xh(e,e,n);else for(;t!==null;){if(t.tag===3){xh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Fn===null||!Fn.has(r))){e=ci(n,e),e=Nm(t,e,1),t=An(t,e,1),e=Qe(),t!==null&&(wl(t,1,e),nt(t,e));break}}t=t.return}}function xk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Qe(),e.pingedLanes|=e.suspendedLanes&n,je===e&&(Le&n)===n&&(Te===4||Te===3&&(Le&130023424)===Le&&500>xe()-vc?or(e,0):yc|=n),nt(e,t)}function Xm(e,t){t===0&&(e.mode&1?(t=Rl,Rl<<=1,!(Rl&130023424)&&(Rl=4194304)):t=1);var n=Qe();e=on(e,t),e!==null&&(wl(e,t,n),nt(e,n))}function wk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xm(e,n)}function Sk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Xm(e,n)}var Jm;Jm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)Ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ze=!1,ak(e,t,n);Ze=!!(e.flags&131072)}else Ze=!1,de&&t.flags&1048576&&nm(t,zo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ao(e,t),e=t.pendingProps;var i=oi(t,Me.current);Hr(t,n),i=fc(null,t,r,e,i,n);var l=hc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tt(r)?(l=!0,Io(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,oc(t),i.updater=is,t.stateNode=i,i._reactInternals=t,Zu(t,r,e,n),t=na(null,t,r,!0,l,n)):(t.tag=0,de&&l&&Za(t),He(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ao(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ek(r),e=Ct(r,e),i){case 0:t=ta(null,t,r,e,n);break e;case 1:t=ch(null,t,r,e,n);break e;case 11:t=uh(null,t,r,e,n);break e;case 14:t=ah(null,t,r,Ct(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),ta(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),ch(e,t,r,i,n);case 3:e:{if(Fm(t),e===null)throw Error(N(387));r=t.pendingProps,l=t.memoizedState,i=l.element,um(e,t),Fo(t,r,null,n);var o=t.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=ci(Error(N(423)),t),t=fh(e,t,r,n,i);break e}else if(r!==i){i=ci(Error(N(424)),t),t=fh(e,t,r,n,i);break e}else for(ut=Ln(t.stateNode.containerInfo.firstChild),at=t,de=!0,Tt=null,n=om(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(si(),r===i){t=sn(e,t,n);break e}He(e,t,r,n)}t=t.child}return t;case 5:return am(t),e===null&&Yu(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,Vu(r,i)?o=null:l!==null&&Vu(r,l)&&(t.flags|=32),Am(e,t),He(e,t,o,n),t.child;case 6:return e===null&&Yu(t),null;case 13:return Rm(e,t,n);case 4:return sc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ui(t,null,r,n):He(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),uh(e,t,r,i,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,o=i.value,ae(Lo,r._currentValue),r._currentValue=o,l!==null)if(zt(l.value,o)){if(l.children===i.children&&!et.current){t=sn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var s=l.dependencies;if(s!==null){o=l.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=tn(-1,n&-n),u.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var f=a.pending;f===null?u.next=u:(u.next=f.next,f.next=u),a.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Xu(l.return,n,t),s.lanes|=n;break}u=u.next}}else if(l.tag===10)o=l.type===t.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(N(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Xu(o,n,t),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===t){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}He(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Hr(t,n),i=xt(i),r=r(i),t.flags|=1,He(e,t,r,n),t.child;case 14:return r=t.type,i=Ct(r,t.pendingProps),i=Ct(r.type,i),ah(e,t,r,i,n);case 15:return zm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),ao(e,t),t.tag=1,tt(r)?(e=!0,Io(t)):e=!1,Hr(t,n),jm(t,r,i),Zu(t,r,i,n),na(null,t,r,!0,e,n);case 19:return Dm(e,t,n);case 22:return Lm(e,t,n)}throw Error(N(156,t.tag))};function Zm(e,t){return bp(e,t)}function Ck(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(e,t,n,r){return new Ck(e,t,n,r)}function Sc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ek(e){if(typeof e=="function")return Sc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ua)return 11;if(e===$a)return 14}return 2}function Dn(e,t){var n=e.alternate;return n===null?(n=vt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ho(e,t,n,r,i,l){var o=2;if(r=e,typeof e=="function")Sc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Tr:return sr(n.children,i,l,t);case Ba:o=8,i|=8;break;case Cu:return e=vt(12,n,t,i|2),e.elementType=Cu,e.lanes=l,e;case Eu:return e=vt(13,n,t,i),e.elementType=Eu,e.lanes=l,e;case Pu:return e=vt(19,n,t,i),e.elementType=Pu,e.lanes=l,e;case ap:return ss(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sp:o=10;break e;case up:o=9;break e;case Ua:o=11;break e;case $a:o=14;break e;case mn:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=vt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function sr(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function ss(e,t,n,r){return e=vt(22,e,r,t),e.elementType=ap,e.lanes=n,e.stateNode={isHidden:!1},e}function qs(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function Ws(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pk(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ts(0),this.expirationTimes=Ts(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ts(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Cc(e,t,n,r,i,l,o,s,u){return e=new Pk(e,t,n,s,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=vt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},oc(l),e}function bk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:br,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function eg(e){if(!e)return Bn;e=e._reactInternals;e:{if(kr(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var n=e.type;if(tt(n))return em(e,n,t)}return t}function tg(e,t,n,r,i,l,o,s,u){return e=Cc(n,r,!0,e,i,l,o,s,u),e.context=eg(null),n=e.current,r=Qe(),i=Rn(n),l=tn(r,i),l.callback=t??null,An(n,l,i),e.current.lanes=i,wl(e,i,r),nt(e,r),e}function us(e,t,n,r){var i=t.current,l=Qe(),o=Rn(i);return n=eg(n),t.context===null?t.context=n:t.pendingContext=n,t=tn(l,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=An(i,t,o),e!==null&&(jt(e,i,o,l),oo(e,i,o)),o}function Ho(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function wh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ec(e,t){wh(e,t),(e=e.alternate)&&wh(e,t)}function Tk(){return null}var ng=typeof reportError=="function"?reportError:function(e){console.error(e)};function Pc(e){this._internalRoot=e}as.prototype.render=Pc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));us(e,t,null,null)};as.prototype.unmount=Pc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mr(function(){us(null,e,null,null)}),t[ln]=null}};function as(e){this._internalRoot=e}as.prototype.unstable_scheduleHydration=function(e){if(e){var t=Lp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<yn.length&&t!==0&&t<yn[n].priority;n++);yn.splice(n,0,e),n===0&&Fp(e)}};function bc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Sh(){}function _k(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var a=Ho(o);l.call(a)}}var o=tg(t,r,e,0,null,!1,!1,"",Sh);return e._reactRootContainer=o,e[ln]=o.current,ll(e.nodeType===8?e.parentNode:e),mr(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var a=Ho(u);s.call(a)}}var u=Cc(e,0,!1,null,null,!1,!1,"",Sh);return e._reactRootContainer=u,e[ln]=u.current,ll(e.nodeType===8?e.parentNode:e),mr(function(){us(t,u,n,r)}),u}function fs(e,t,n,r,i){var l=n._reactRootContainer;if(l){var o=l;if(typeof i=="function"){var s=i;i=function(){var u=Ho(o);s.call(u)}}us(t,o,e,i)}else o=_k(n,t,e,i,r);return Ho(o)}Np=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ri(t.pendingLanes);n!==0&&(Va(t,n|1),nt(t,xe()),!(ee&6)&&(fi=xe()+500,Qn()))}break;case 13:mr(function(){var r=on(e,1);if(r!==null){var i=Qe();jt(r,e,1,i)}}),Ec(e,1)}};qa=function(e){if(e.tag===13){var t=on(e,134217728);if(t!==null){var n=Qe();jt(t,e,134217728,n)}Ec(e,134217728)}};zp=function(e){if(e.tag===13){var t=Rn(e),n=on(e,t);if(n!==null){var r=Qe();jt(n,e,t,r)}Ec(e,t)}};Lp=function(){return re};Ap=function(e,t){var n=re;try{return re=e,t()}finally{re=n}};Fu=function(e,t,n){switch(t){case"input":if(_u(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ts(r);if(!i)throw Error(N(90));fp(r),_u(r,i)}}}break;case"textarea":dp(e,n);break;case"select":t=n.value,t!=null&&Mr(e,!!n.multiple,t,!1)}};xp=kc;wp=mr;var jk={usingClientEntryPoint:!1,Events:[Cl,Nr,ts,vp,kp,kc]},ji={findFiberByHostInstance:Yn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ik={bundleType:ji.bundleType,version:ji.version,rendererPackageName:ji.rendererPackageName,rendererConfig:ji.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:an.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ep(e),e===null?null:e.stateNode},findFiberByHostInstance:ji.findFiberByHostInstance||Tk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wl.isDisabled&&Wl.supportsFiber)try{Xo=Wl.inject(Ik),Qt=Wl}catch{}}ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jk;ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bc(t))throw Error(N(200));return bk(e,t,null,n)};ft.createRoot=function(e,t){if(!bc(e))throw Error(N(299));var n=!1,r="",i=ng;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Cc(e,1,!1,null,null,n,!1,r,i),e[ln]=t.current,ll(e.nodeType===8?e.parentNode:e),new Pc(t)};ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=Ep(t),e=e===null?null:e.stateNode,e};ft.flushSync=function(e){return mr(e)};ft.hydrate=function(e,t,n){if(!cs(t))throw Error(N(200));return fs(null,e,t,!0,n)};ft.hydrateRoot=function(e,t,n){if(!bc(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",o=ng;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=tg(t,null,e,1,n??null,i,!1,l,o),e[ln]=t.current,ll(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new as(t)};ft.render=function(e,t,n){if(!cs(t))throw Error(N(200));return fs(null,e,t,!1,n)};ft.unmountComponentAtNode=function(e){if(!cs(e))throw Error(N(40));return e._reactRootContainer?(mr(function(){fs(null,null,e,!1,function(){e._reactRootContainer=null,e[ln]=null})}),!0):!1};ft.unstable_batchedUpdates=kc;ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cs(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return fs(e,t,n,!1,r)};ft.version="18.3.1-next-f1338f8080-20240426";function rg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rg)}catch(e){console.error(e)}}rg(),rp.exports=ft;var Nk=rp.exports,ig,Ch=Nk;ig=Ch.createRoot,Ch.hydrateRoot;async function Tc(e){const t=await e.json().catch(()=>({}));if(!e.ok)throw new Error(typeof t.detail=="string"?t.detail:e.statusText);return t}async function gr(e){return Tc(await fetch(e))}async function zk(e,t){return Tc(await fetch(e,{method:"POST",body:t}))}async function Pl(e,t){return Tc(await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}))}const qt=e=>`/api/artifacts/${e}`,Eh=(e,t)=>`/api/runs/${e}/agents/${encodeURIComponent(t)}`;function Ph(){const e=new URLSearchParams(window.location.search);return{project:e.get("project"),agent:e.get("agent")||"Director"}}function pl(e){const t=new URLSearchParams;e.project&&t.set("project",e.project),e.project&&e.agent&&e.agent!=="Director"&&t.set("agent",e.agent);const n=t.toString();return n?`/?${n}`:"/"}function lg(e){window.history.pushState(null,"",pl(e)),window.dispatchEvent(new PopStateEvent("popstate"))}function Lk(){const[e,t]=K.useState(Ph);return K.useEffect(()=>{const n=()=>t(Ph());return window.addEventListener("popstate",n),()=>window.removeEventListener("popstate",n)},[]),e}function Qo(e){return t=>{t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),lg(e))}}function Ak({setup:e}){const t=[];return e.meta_api_key||t.push("No META_API_KEY is set, so Muse can't be called. Put your key in a .env file in the repo folder and restart, or try the whole flow offline with stand-in models."),e.chromium||t.push("Chromium for Playwright is missing, so builds can't be played or checked. Run: python -m playwright install chromium"),t.length?x.jsx("div",{className:"notice",role:"status",children:t.map(n=>x.jsx("p",{children:n},n))}):null}function Fk({setup:e}){const[t,n]=K.useState(""),r=un(),i=pi({mutationFn:s=>Pl("/api/projects",{text:t.trim(),mock:s}),onSuccess:s=>{n(""),r.invalidateQueries({queryKey:["projects"]}),lg({project:s.id})}}),l=(e==null?void 0:e.meta_api_key)??!1,o=e!==void 0&&t.trim().length>0&&!i.isPending;return x.jsxs("form",{className:"new-project",onSubmit:s=>{s.preventDefault(),o&&i.mutate(!l)},children:[x.jsx("textarea",{"aria-label":"Describe your game",placeholder:"Describe your game...",value:t,rows:4,onChange:s=>n(s.target.value),onKeyDown:s=>{s.key==="Enter"&&!s.shiftKey&&!s.nativeEvent.isComposing&&(s.preventDefault(),o&&i.mutate(!l))}}),x.jsxs("div",{className:"actions",children:[l&&x.jsx("button",{type:"submit",disabled:!o,children:"Start with Muse"}),e!==void 0&&x.jsx("button",{type:l?"button":"submit",className:l?"secondary":void 0,disabled:!o,onClick:l?()=>o&&i.mutate(!0):void 0,children:"Try offline (mock)"})]}),e===void 0&&x.jsx("p",{className:"muted",children:"Checking for your Muse key…"}),i.isPending&&x.jsx("p",{className:"muted",children:"Starting…"}),i.error&&x.jsx("p",{className:"error",children:i.error.message})]})}function Rk(e){return e.gate?`Needs you: ${e.gate.title.split(":")[0]}`:e.busy?"Working…":e.status.replace("_"," ")}function Dk(){const{data:e,error:t,isPending:n}=On({queryKey:["projects"],queryFn:()=>gr("/api/projects"),refetchInterval:r=>{var i;return(i=r.state.data)!=null&&i.projects.some(l=>l.busy)?1500:!1}});return n?x.jsx("p",{className:"muted",children:"Loading projects…"}):t?x.jsx("p",{className:"error",children:t.message}):e.projects.length?x.jsx("ul",{className:"projects","aria-label":"Projects",children:e.projects.map(r=>x.jsx("li",{children:x.jsxs("a",{href:pl({project:r.id}),onClick:Qo({project:r.id}),children:[x.jsx("span",{className:"thumb",children:r.thumbnail&&x.jsx("img",{src:qt(r.thumbnail),alt:""})}),x.jsxs("span",{className:"project-text",children:[x.jsx("span",{className:"project-title",children:r.title}),x.jsx("span",{className:`status status-${r.gate?"gate":r.status}`,children:Rk(r)})]}),x.jsx("span",{className:"cost",title:"Estimated cost of the model calls",children:r.mock?"offline":`$${r.cost.toFixed(2)}`})]})},r.id))}):x.jsx("p",{className:"muted",children:"No projects yet."})}function Ok(){const e=On({queryKey:["setup"],queryFn:()=>gr("/api/setup")});return x.jsxs("main",{className:"home",children:[x.jsxs("header",{children:[x.jsx("h1",{children:"SpriteForge Studio"}),x.jsxs("p",{className:"muted",children:["Describe a game; the agents build it with you. ",x.jsx("a",{href:"/classic",children:"Classic view"})]})]}),e.data&&x.jsx(Ak,{setup:e.data}),x.jsx(Fk,{setup:e.data}),x.jsxs("section",{children:[x.jsx("h2",{children:"Projects"}),x.jsx(Dk,{})]})]})}const Mk={waiting:"○",working:"●",needs_you:"!",done:"✓"},Bk={waiting:"waiting",working:"working",needs_you:"needs you",done:"done"};function Uk({runId:e,agents:t,selected:n}){return x.jsxs("nav",{className:"agents","aria-label":"Agents",children:[x.jsx("h2",{children:"Agents"}),x.jsx("ul",{children:t.map(r=>x.jsx("li",{children:x.jsxs("a",{href:pl({project:e,agent:r.name}),onClick:Qo({project:e,agent:r.name}),className:`agent agent-${r.status} ${r.name===n?"selected":""}`,"aria-current":r.name===n?"page":void 0,title:r.last??void 0,children:[x.jsx("span",{className:"icon","aria-hidden":"true",title:Bk[r.status],children:Mk[r.status]}),x.jsx("span",{className:"name",children:r.name}),r.needs_you>0&&x.jsx("span",{className:"badge",children:r.needs_you}),r.cost>0&&x.jsxs("span",{className:"agent-cost",children:["$",r.cost.toFixed(2)]})]})},r.name))})]})}const $k={going_back:"Stopping: the next model call is refused, then the round starts again.",went_back:"Went back: the round started again with your change.",queued:"Queued for later: it is applied at the next review.",expired:"That work already reached its review: your change waits there."};function Hk({runId:e,card:t}){const n=un(),r=pi({mutationFn:i=>Pl(`/api/runs/${e}/stop`,{change:t.change,later:i}),onSettled:()=>n.invalidateQueries({queryKey:["run",e]})});return t.state!=="open"?x.jsx("p",{className:`go-back-state ${t.state}`,children:$k[t.state]}):x.jsxs("div",{className:"go-back",role:"group","aria-label":"Go back",children:[x.jsx("button",{type:"button",autoFocus:!0,disabled:r.isPending,onClick:()=>r.mutate(!1),children:"Go back"}),x.jsx("button",{type:"button",className:"secondary",disabled:r.isPending,onClick:()=>r.mutate(!0),children:"Queue for later"}),r.error&&x.jsx("p",{className:"error",children:r.error.message})]})}const Qk=new Set(["Pixel Artist","Art Director"]);function og(e){return e==="Director"?"Every agent sees it; the art agents draw new art in its style.":Qk.has(e)?`The ${e} sees it and draws new or redrawn art in its style.`:`The ${e} sees it with its work.`}function sg({runId:e,agent:t,file:n,onDone:r}){const i=un(),[l,o]=K.useState(!1),[s,u]=K.useState();K.useEffect(()=>{const f=URL.createObjectURL(n);return u(f),()=>URL.revokeObjectURL(f)},[n]);const a=pi({mutationFn:()=>{const f=new FormData;return f.append("file",n),f.append("agent",t),f.append("rights",String(l)),zk(`/api/runs/${e}/references`,f)},onSuccess:()=>{i.invalidateQueries({queryKey:["run",e]}),r()}});return x.jsxs("div",{className:"reference-upload",role:"group","aria-label":"Add a reference",children:[s&&x.jsx("img",{src:s,alt:n.name}),x.jsxs("div",{children:[x.jsxs("p",{children:[x.jsx("strong",{children:n.name})," as a reference ",t==="Director"?"for every agent":`for the ${t}`,"."]}),x.jsx("p",{className:"hint",children:og(t)}),x.jsxs("label",{className:"rights",children:[x.jsx("input",{type:"checkbox",checked:l,onChange:f=>o(f.target.checked)}),"I have the right to use this image"]}),x.jsxs("div",{className:"actions",children:[x.jsx("button",{type:"button",disabled:!l||a.isPending,onClick:()=>a.mutate(),children:"Add reference"}),x.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Cancel"})]}),a.error&&x.jsx("p",{className:"error",children:a.error.message})]})]})}function Vk({runId:e,agent:t}){var u;const n=On({queryKey:["run",e,"references"],queryFn:()=>gr(`/api/runs/${e}/references`)}),[r,i]=K.useState(null),[l,o]=K.useState(!1),s=(((u=n.data)==null?void 0:u.references)??[]).filter(a=>a.agent===t||a.everyone).reverse();return x.jsxs("section",{className:"panel","aria-label":"References",children:[x.jsx("h2",{children:"References"}),s.length>0?x.jsx("ul",{className:"references",children:s.map(a=>x.jsxs("li",{children:[x.jsx("a",{href:qt(a.id),target:"_blank",rel:"noopener",children:x.jsx("img",{src:qt(a.id),alt:a.file})}),x.jsxs("span",{children:[a.file,x.jsx("small",{children:a.everyone?"every agent":a.agent})]})]},a.id))}):x.jsxs("p",{className:"muted",children:["No references for the ",t," yet."]}),r?x.jsx(sg,{runId:e,agent:t,file:r,onDone:()=>i(null)}):x.jsxs("label",{className:`drop ${l?"over":""}`,onDragOver:a=>{a.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:a=>{a.preventDefault(),o(!1);const f=a.dataTransfer.files[0];f&&i(f)},children:["Drop an image here, or choose one",x.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp,image/gif","aria-label":`Reference image for the ${t}`,onChange:a=>{var c;const f=(c=a.target.files)==null?void 0:c[0];f&&i(f),a.target.value=""}})]})]})}function qk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Wk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gk={};function bh(e,t){return(Gk.jsx?Kk:Wk).test(e)}const Yk=/[ \t\n\f\r]/g;function Xk(e){return typeof e=="object"?e.type==="text"?Th(e.value):!1:Th(e)}function Th(e){return e.replace(Yk,"")===""}class bl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}bl.prototype.normal={};bl.prototype.property={};bl.prototype.space=void 0;function ug(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new bl(n,r,t)}function pa(e){return e.toLowerCase()}class rt{constructor(t,n){this.attribute=n,this.property=t}}rt.prototype.attribute="";rt.prototype.booleanish=!1;rt.prototype.boolean=!1;rt.prototype.commaOrSpaceSeparated=!1;rt.prototype.commaSeparated=!1;rt.prototype.defined=!1;rt.prototype.mustUseProperty=!1;rt.prototype.number=!1;rt.prototype.overloadedBoolean=!1;rt.prototype.property="";rt.prototype.spaceSeparated=!1;rt.prototype.space=void 0;let Jk=0;const H=xr(),Se=xr(),ma=xr(),z=xr(),le=xr(),ur=xr(),lt=xr();function xr(){return 2**++Jk}const ga=Object.freeze(Object.defineProperty({__proto__:null,boolean:H,booleanish:Se,commaOrSpaceSeparated:lt,commaSeparated:ur,number:z,overloadedBoolean:ma,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Ks=Object.keys(ga);class _c extends rt{constructor(t,n,r,i){let l=-1;if(super(t,n),_h(this,"space",i),typeof r=="number")for(;++l<Ks.length;){const o=Ks[l];_h(this,Ks[l],(r&ga[o])===ga[o])}}}_c.prototype.defined=!0;function _h(e,t,n){n&&(e[t]=n)}function yi(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new _c(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[pa(r)]=r,n[pa(l.attribute)]=r}return new bl(t,n,e.space)}const ag=yi({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:le,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:z,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:le,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:Se,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function cg(e,t){return t in e?e[t]:t}function fg(e,t){return cg(e,t.toLowerCase())}const Zk=yi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ur,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alpha:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:le,autoFocus:H,autoPlay:H,blocking:le,capture:null,charSet:null,checked:H,cite:null,className:le,closedBy:null,colorSpace:null,cols:z,colSpan:z,command:null,commandFor:null,content:null,contentEditable:Se,controls:H,controlsList:le,coords:z|ur,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:ma,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:le,height:z,hidden:ma,high:z,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:le,itemRef:le,itemScope:H,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:H,optimum:z,pattern:null,ping:le,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:le,required:H,reversed:H,rows:z,rowSpan:z,sandbox:le,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootCustomElementRegistry:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shadowRootSerializable:H,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:H,useMap:null,value:Se,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:H,disablePictureInPicture:H,disableRemotePlayback:H,exportParts:ur,part:le,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:fg}),ex=yi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:lt,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:H,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ur,g2:ur,glyphName:ur,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:lt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lt,rev:lt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lt,requiredFeatures:lt,requiredFonts:lt,requiredFormats:lt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:lt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lt,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cg}),hg=yi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),dg=yi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fg}),pg=yi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),tx={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},nx=/[A-Z]/g,jh=/-[a-z]/g,rx=/^data[-\w.:]+$/i;function ix(e,t){const n=pa(t);let r=t,i=rt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&rx.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(jh,ox);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!jh.test(l)){let o=l.replace(nx,lx);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=_c}return new i(r,t)}function lx(e){return"-"+e.toLowerCase()}function ox(e){return e.charAt(1).toUpperCase()}const sx=ug([ag,Zk,hg,dg,pg],"html"),jc=ug([ag,ex,hg,dg,pg],"svg");function ux(e){return e.join(" ").trim()}var Ih=/\/\*(?:[^*]|\*(?!\/))*\*\//g,ax=/\n/g,cx=/^\s*/,fx=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,hx=/^:\s*/,dx=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,px=/^[;\s]*/,mx=`
|
|
41
|
+
`,Nh="/",zh="*",Ii="",gx="comment",yx="declaration";function vx(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var v=g.match(ax);v&&(n+=v.length);var C=g.lastIndexOf(mx);r=~C?g.length-C:r+g.length}function l(){var g={line:n,column:r};return function(v){return v.position=new o(g),a(),v}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(g){var v=new Error(t.source+":"+n+":"+r+": "+g);if(v.reason=g,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function u(g){var v=g.exec(e);if(v){var C=v[0];return i(C),e=e.slice(C.length),v}}function a(){u(cx)}function f(g){for(var v;v=c();)g.push(v);return g}function c(){var g=l();if(!(Nh!=e.charAt(0)||zh!=e.charAt(1))){for(var v=2;Ii!=e.charAt(v)&&(zh!=e.charAt(v)||Nh!=e.charAt(v+1));)++v;if(v+=2,Ii===e.charAt(v-1))return s("End of comment missing");var C=e.slice(2,v-2);return r+=2,i(C),e=e.slice(v),r+=2,g({type:gx,comment:C})}}function d(){var g=l(),v=u(fx);if(v){if(c(),!u(hx))return s("property missing ':'");var C=u(dx),p=g({type:yx,property:v[0].replace(Ih,Ii).trim(),value:C?C[0].replace(Ih,Ii).trim():Ii});return u(px),p}}function h(){var g=[];f(g);for(var v;v=d();)g.push(v),f(g);return g}return a(),h()}function kx(e,t){let n=null;if(!e||typeof e!="string")return n;const r=vx(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:o,value:s}=l;i?t(o,s,l):s&&(n=n??{},n[o]=s)}),n}const mg=gg("end"),Ic=gg("start");function gg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function xx(e){const t=Ic(e),n=mg(e);if(t&&n)return{start:t,end:n}}function Wi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Lh(e.position):"start"in e||"end"in e?Lh(e):"line"in e||"column"in e?ya(e):""}function ya(e){return Ah(e&&e.line)+":"+Ah(e&&e.column)}function Lh(e){return ya(e&&e.start)+"-"+ya(e&&e.end)}function Ah(e){return e&&typeof e=="number"?e:1}class Be extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Wi(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Be.prototype.file="";Be.prototype.name="";Be.prototype.reason="";Be.prototype.message="";Be.prototype.stack="";Be.prototype.column=void 0;Be.prototype.line=void 0;Be.prototype.ancestors=void 0;Be.prototype.cause=void 0;Be.prototype.fatal=void 0;Be.prototype.place=void 0;Be.prototype.ruleId=void 0;Be.prototype.source=void 0;const Nc={}.hasOwnProperty,wx=new Map,Sx=/[A-Z]/g,Cx=/-([a-z])/g,Ex=new Set(["table","tbody","thead","tfoot","tr"]),Px=new Set(["td","th"]),yg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ax(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Lx(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?jc:sx,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=vg(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function vg(e,t,n){if(t.type==="element")return Tx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _x(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ix(e,t,n);if(t.type==="mdxjsEsm")return jx(e,t);if(t.type==="root")return Nx(e,t,n);if(t.type==="text")return zx(e,t)}function Tx(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=jc,e.schema=i),e.ancestors.push(t);const l=xg(e,t.tagName,!1),o=Fx(e,t);let s=Lc(e,t);return Ex.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!Xk(u):!0})),kg(e,o,l,t),zc(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function _x(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ml(e,t.position)}function jx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ml(e,t.position)}function Ix(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=jc,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:xg(e,t.name,!0),o=Rx(e,t),s=Lc(e,t);return kg(e,o,l,t),zc(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Nx(e,t,n){const r={};return zc(r,Lc(e,t)),e.create(t,e.Fragment,r,n)}function zx(e,t){return t.value}function kg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Lx(e,t,n){return r;function r(i,l,o,s){const a=Array.isArray(o.children)?n:t;return s?a(l,o,s):a(l,o)}}function Ax(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),u=Ic(r);return t(i,l,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Fx(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Nc.call(t.properties,i)){const l=Dx(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Px.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Rx(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ml(e,t.position);else{const{name:i}=r;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else ml(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Lc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:wx;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const a=i.get(u)||0;o=u+"-"+a,i.set(u,a+1)}}const s=vg(e,l,o);s!==void 0&&n.push(s)}return n}function Dx(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=ix(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?qk(n):ux(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:Mx(n):Ox(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?tx[r.property]||r.property:r.attribute,n]}function Ox(e,t){const n={};try{kx(t,function(r,i){if(r&&i){let l=r;l.slice(0,2)!=="--"&&(l=l.toLowerCase(),e.stylePropertyNameCase==="dom"&&(l.slice(0,4)==="-ms-"&&(l=l.slice(1)),l=l.replace(Cx,$x))),n[l]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new Be("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=yg+"#cannot-parse-style-attribute",l}return n}function xg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=bh(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=bh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Nc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ml(e)}function ml(e,t){const n=new Be("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=yg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Mx(e){const t={};let n;for(n in e)Nc.call(e,n)&&(t[Bx(n)]=e[n]);return t}function Bx(e){if(e.slice(0,2)==="--")return e;let t=e.replace(Sx,Ux);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ux(e){return"-"+e.toLowerCase()}function $x(e,t){return t.toUpperCase()}const Gs={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Hx={};function Ac(e,t){const n=Hx,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wg(e,r,i)}function wg(e,t,n){if(Qx(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Fh(e.children,t,n)}return Array.isArray(e)?Fh(e,t,n):""}function Fh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=wg(e[i],t,n);return r.join("")}function Qx(e){return!!(e&&typeof e=="object")}const Rh=document.createElement("i");function Fc(e){const t="&"+e+";";Rh.innerHTML=t;const n=Rh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function It(e,t,n,r){const i=e.length;let l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function yt(e,t){return e.length>0?(It(e,e.length,0,t),e):t}const Dh={}.hasOwnProperty;function Sg(e){const t={};let n=-1;for(;++n<e.length;)Vx(t,e[n]);return t}function Vx(e,t){let n;for(n in t){const i=(Dh.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){Dh.call(i,o)||(i[o]=[]);const s=l[o];qx(i[o],Array.isArray(s)?s:s?[s]:[])}}}function qx(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);It(e,0,0,r)}function Cg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Nt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ne=Vn(/[A-Za-z]/),ze=Vn(/[\dA-Za-z]/),Wx=Vn(/[#-'*+\--9=?A-Z^-~]/);function Vo(e){return e!==null&&(e<32||e===127)}const va=Vn(/\d/),Kx=Vn(/[\dA-Fa-f]/),Eg=Vn(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function W(e){return e===-2||e===-1||e===32}const hs=Vn(new RegExp("\\p{P}|\\p{S}","u")),yr=Vn(/\s/);function Vn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function vi(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&ze(e.charCodeAt(n+1))&&ze(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function te(e,t,n,r){const i=r?r-1:1/0;let l=0;return o;function o(u){return W(u)?(e.enter(n),s(u)):t(u)}function s(u){return W(u)&&l++<i?(e.consume(u),s):(e.exit(n),t(u))}}function Pg(e,t,n,r,i,l){let o=0;return s;function s(f){return W(f)?(e.enter(r),u(f)):a(f)}function u(f){return W(f)&&o<l?(e.consume(f),o++,u):(e.exit(r),a(f))}function a(f){return o>=i?t(f):n(f)}}const Gx={tokenize:Yx};function Yx(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),te(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return $(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}let qo=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Oh(this,t,n,r,!1)}addBefore(t,n,r){Oh(this,t,n,r,!0)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0,this.index.clear()}};function Oh(e,t,n,r,i){if(n===0&&r.length===0)return;const l=e.index.get(t);if(l){l[1]+=n,i?(r.push(...l[2]),l[2]=r):l[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}const Xx={tokenize:Jx},Mh={tokenize:Zx};function Jx(e){const t=this,n=[];let r=0,i,l,o;return s;function s(y){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,u,a)(y)}return a(y)}function u(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const P=t.events.length;let T=P,E;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){E=t.events[T][1].end;break}p(r);let I=P;for(;I<t.events.length;)t.events[I][1].end={...E},I++;const j=new qo;return j.add(T+1,0,t.events.slice(P)),j.add(P,I-P,[]),j.consume(t.events),a(y)}return s(y)}function a(y){if(r===n.length){if(!i)return d(y);if(i.currentConstruct&&i.currentConstruct.concrete)return g(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mh,f,c)(y)}function f(y){return i&&m(),p(r),d(y)}function c(y){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(y)}function d(y){return t.containerState={},e.attempt(Mh,h,g)(y)}function h(y){return r++,n.push([t.currentConstruct,t.containerState]),d(y)}function g(y){if(y===null){i&&m(),p(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),v(y)}function v(y){if(y===null){C(e.exit("chunkFlow"),!0),p(0),e.consume(y);return}return $(y)?(e.consume(y),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(y),v)}function C(y,P){const T=t.sliceStream(y);if(P&&T.push(null),y.previous=l,l&&(l.next=y),l=y,i.defineSkip(y.start),i.write(T),t.parser.lazy[y.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<o&&(!i.events[E][1].end||i.events[E][1].end.offset>o))return;const I=t.events.length;let j=I,M,b;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(M){b=t.events[j][1].end;break}M=!0}for(p(r),E=I;E<t.events.length;)t.events[E][1].end={...b},E++;const A=new qo;A.add(j+1,0,t.events.slice(I)),A.add(I,E-I,[]),A.consume(t.events)}}function p(y){let P=n.length;for(;P-- >y;){const T=n[P];t.containerState=T[1],T[0].exit.call(t,e)}n.length=y}function m(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Zx(e,t,n){return te(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Un(e){if(e===null||oe(e)||yr(e))return 1;if(hs(e))return 2}function ds(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const ka={name:"attention",resolveAll:ew,tokenize:tw};function ew(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const l=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Bh(o,-l),Bh(s,l);const u={type:l>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:s},f={type:l>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},c={type:l>1?"strong":"emphasis",start:{...u.start},end:{...a.end}};e[i][1].end={...u.start},e[n][1].start={...a.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=yt(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=yt(r,[["enter",c,t],["enter",u,t],["exit",u,t],["enter",f,t]]),r=yt(r,ds(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=yt(r,[["exit",f,t],["enter",a,t],["exit",a,t],["exit",c,t]]);let d=0;e[n][1].end.offset-e[n][1].start.offset&&(d=2,r=yt(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),It(e,i-1,n-i+3,r),n=i+r.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function tw(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Un(r);let l;return o;function o(u){return l=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===l)return e.consume(u),s;const a=e.exit("attentionSequence"),f=Un(u),c=!f||f===2&&i||n.includes(u)&&u!==42&&u!==95,d=!i||i===2&&f||n.includes(r)&&r!==42&&r!==95;return a._open=!!(l===42?c:c&&(i||!d)),a._close=!!(l===42?d:d&&(f||!c)),t(u)}}function Bh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nw={name:"autolink",tokenize:rw};function rw(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return Ne(h)?(e.consume(h),o):h===64?n(h):a(h)}function o(h){return h===43||h===45||h===46||ze(h)?(r=1,s(h)):a(h)}function s(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||ze(h))&&r++<32?(e.consume(h),s):(r=0,a(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Vo(h)?n(h):(e.consume(h),u)}function a(h){return h===64?(e.consume(h),f):Wx(h)?(e.consume(h),a):n(h)}function f(h){return ze(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):d(h)}function d(h){if((h===45||ze(h))&&r++<63){const g=h===45?d:c;return e.consume(h),g}return n(h)}}const Tl={partial:!0,tokenize:iw};function iw(e,t,n){return r;function r(l){return W(l)?te(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||$(l)?t(l):n(l)}}const bg={continuation:{tokenize:ow},exit:sw,name:"blockQuote",tokenize:lw};function lw(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return W(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function ow(e,t,n){const r=this;return i;function i(o){return W(o)?te(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(bg,t,n)(o)}}function sw(e){e.exit("blockQuote")}const Tg={name:"characterEscape",tokenize:uw};function uw(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Eg(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const _g={name:"characterReference",tokenize:aw};function aw(e,t,n){const r=this;let i=0,l,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),l=31,o=ze,f(c))}function a(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Kx,f):(e.enter("characterReferenceValue"),l=7,o=va,f(c))}function f(c){if(c===59&&i){const d=e.exit("characterReferenceValue");return o===ze&&!Fc(r.sliceSerialize(d))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),f):n(c)}}const xa={partial:!0,tokenize:cw};function cw(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Uh={concrete:!0,name:"codeFenced",tokenize:fw};function fw(e,t,n){const r=this,i={partial:!0,tokenize:T};let l=0,o=0,s;return u;function u(E){return a(E)}function a(E){const I=r.events[r.events.length-1];return l=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(E)}function f(E){return E===s?(o++,e.consume(E),f):o<3?n(E):(e.exit("codeFencedFenceSequence"),W(E)?te(e,c,"whitespace")(E):c(E))}function c(E){return E===null||$(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(xa,v,P)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||$(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(E)):W(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),te(e,h,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),d)}function h(E){return E===null||$(E)?c(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===null||$(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(E)):E===96&&E===s?n(E):(e.consume(E),g)}function v(E){return e.attempt(i,P,C)(E)}function C(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p}function p(E){return l>0&&W(E)?te(e,m,"linePrefix",l+1)(E):m(E)}function m(E){return E===null||$(E)?e.check(xa,v,P)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||$(E)?(e.exit("codeFlowValue"),m(E)):(e.consume(E),y)}function P(E){return e.exit("codeFenced"),t(E)}function T(E,I,j){let M=0;return b;function b(Y){return E.enter("lineEnding"),E.consume(Y),E.exit("lineEnding"),A}function A(Y){return E.enter("codeFencedFence"),W(Y)?te(E,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):O(Y)}function O(Y){return Y===s?(E.enter("codeFencedFenceSequence"),J(Y)):j(Y)}function J(Y){return Y===s?(M++,E.consume(Y),J):M>=o?(E.exit("codeFencedFenceSequence"),W(Y)?te(E,se,"whitespace")(Y):se(Y)):j(Y)}function se(Y){return Y===null||$(Y)?(E.exit("codeFencedFence"),I(Y)):j(Y)}}}const Ys={name:"codeIndented",tokenize:dw},hw={partial:!0,tokenize:pw};function dw(e,t,n){return r;function r(s){return e.enter("codeIndented"),Pg(e,i,n,"linePrefix",4,4)(s)}function i(s){return s===null?o(s):$(s)?e.attempt(hw,i,o)(s):(e.enter("codeFlowValue"),l(s))}function l(s){return s===null||$(s)?(e.exit("codeFlowValue"),i(s)):(e.consume(s),l)}function o(s){return e.exit("codeIndented"),t(s)}}function pw(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):$(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Pg(e,t,l,"linePrefix",4,4)(o)}function l(o){return $(o)?i(o):n(o)}}const mw={name:"codeText",previous:yw,resolve:gw,tokenize:vw};function gw(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function yw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vw(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):$(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),a(c))}function a(c){return c===null||c===32||c===96||$(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),a)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(l.type="codeTextData",a(c))}}class kw{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ni(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ni(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ni(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ni(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ni(this.left,n.reverse())}}}function Ni(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function jg(e){const t={};let n=-1,r,i,l,o,s,u,a;const f=new kw(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,xw(f,n)),n=t[n],a=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return It(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!a}function xw(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,u=[],a={};let f,c,d=-1,h=n,g=0,v=0;const C=[v];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(v=d+1,C.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),d=C.length;d--;){const p=s.slice(C[d],C[d+1]),m=l.pop();u.push([m,m+p.length-1]),e.splice(m,2,p)}for(u.reverse(),d=-1;++d<u.length;)a[g+u[d][0]]=g+u[d][1],g+=u[d][1]-u[d][0]-1;return a}const ww={resolve:Cw,tokenize:Ew},Sw={partial:!0,tokenize:Pw};function Cw(e){return jg(e),e}function Ew(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):$(s)?e.check(Sw,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Pw(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),te(e,l,"linePrefix")}function l(o){if(o===null||$(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Ig(e,t,n,r,i,l,o,s,u){const a=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(p){return p===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(p),e.exit(l),d):p===null||p===32||p===41||Vo(p)?n(p):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(p))}function d(p){return p===62?(e.enter(l),e.consume(p),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===62?(e.exit("chunkString"),e.exit(s),d(p)):p===null||p===60||$(p)?n(p):(e.consume(p),p===92?g:h)}function g(p){return p===60||p===62||p===92?(e.consume(p),h):h(p)}function v(p){return!f&&(p===null||p===41||oe(p))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(p)):f<a&&p===40?(e.consume(p),f++,v):p===41?(e.consume(p),f--,v):p===null||p===32||p===40||Vo(p)?n(p):(e.consume(p),p===92?C:v)}function C(p){return p===40||p===41||p===92?(e.consume(p),v):v(p)}}function Ng(e,t,n,r,i,l){const o=this;let s=0,u;return a;function a(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(l),f}function f(h){return s>999||h===null||h===91||h===93&&!u||h===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):$(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||$(h)||s++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!W(h)),h===92?d:c)}function d(h){return h===91||h===92||h===93?(e.consume(h),s++,c):c(h)}}function zg(e,t,n,r,i,l){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):n(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(l),a(d))}function a(d){return d===o?(e.exit(l),u(o)):d===null?n(d):$(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),te(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===o||d===null||$(d)?(e.exit("chunkString"),a(d)):(e.consume(d),d===92?c:f)}function c(d){return d===o||d===92?(e.consume(d),f):f(d)}}function Ki(e,t){let n;return r;function r(i){return $(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):W(i)?te(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const bw={name:"definition",tokenize:_w},Tw={partial:!0,tokenize:jw};function _w(e,t,n){const r=this;let i;return l;function l(h){return e.enter("definition"),o(h)}function o(h){return Ng.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return oe(h)?Ki(e,a)(h):a(h)}function a(h){return Ig(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Tw,c,c)(h)}function c(h){return W(h)?te(e,d,"whitespace")(h):d(h)}function d(h){return h===null||$(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function jw(e,t,n){return r;function r(s){return oe(s)?Ki(e,i)(s):n(s)}function i(s){return zg(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return W(s)?te(e,o,"whitespace")(s):o(s)}function o(s){return s===null||$(s)?t(s):n(s)}}const Iw={name:"hardBreakEscape",tokenize:Nw};function Nw(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return $(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const zw={name:"headingAtx",resolve:Lw,tokenize:Aw};function Lw(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};It(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])}return e}function Aw(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||oe(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||$(f)?(e.exit("atxHeading"),t(f)):W(f)?te(e,s,"whitespace")(f):(e.enter("atxHeadingText"),a(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),s(f))}function a(f){return f===null||f===35||oe(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),a)}}const Lg=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wa=["pre","script","style","textarea"],Fw={concrete:!0,name:"htmlFlow",resolveTo:Dw,tokenize:Ow},Rw={partial:!0,tokenize:Mw};function Dw(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ow(e,t,n){const r=this;let i,l,o,s,u;return a;function a(S){return f(S)}function f(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),c}function c(S){return S===33?(e.consume(S),d):S===47?(e.consume(S),l=!0,v):S===63?(e.consume(S),i=3,r.interrupt?t:k):Ne(S)?(e.consume(S),o=String.fromCharCode(S),C):n(S)}function d(S){return S===45?(e.consume(S),i=2,h):S===91?(e.consume(S),i=5,s=0,g):Ne(S)?(e.consume(S),i=4,r.interrupt?t:k):n(S)}function h(S){return S===45?(e.consume(S),r.interrupt?t:k):n(S)}function g(S){const Ee="CDATA[";return S===Ee.charCodeAt(s++)?(e.consume(S),s===Ee.length?r.interrupt?t:O:g):n(S)}function v(S){return Ne(S)?(e.consume(S),o=String.fromCharCode(S),C):n(S)}function C(S){if(S===null||S===47||S===62||oe(S)){const Ee=S===47,Lt=o.toLowerCase();return!Ee&&!l&&wa.includes(Lt)?(i=1,r.interrupt?t(S):O(S)):Lg.includes(o.toLowerCase())?(i=6,Ee?(e.consume(S),p):r.interrupt?t(S):O(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):l?m(S):y(S))}return S===45||ze(S)?(e.consume(S),o+=String.fromCharCode(S),C):n(S)}function p(S){return S===62?(e.consume(S),r.interrupt?t:O):n(S)}function m(S){return W(S)?(e.consume(S),m):b(S)}function y(S){return S===47?(e.consume(S),b):S===58||S===95||Ne(S)?(e.consume(S),P):W(S)?(e.consume(S),y):b(S)}function P(S){return S===45||S===46||S===58||S===95||ze(S)?(e.consume(S),P):T(S)}function T(S){return S===61?(e.consume(S),E):W(S)?(e.consume(S),T):y(S)}function E(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),u=S,I):W(S)?(e.consume(S),E):j(S)}function I(S){return S===u?(e.consume(S),u=null,M):S===null||$(S)?n(S):(e.consume(S),I)}function j(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||oe(S)?T(S):(e.consume(S),j)}function M(S){return S===47||S===62||W(S)?y(S):n(S)}function b(S){return S===62?(e.consume(S),A):n(S)}function A(S){return S===null||$(S)?O(S):W(S)?(e.consume(S),A):n(S)}function O(S){return S===45&&i===2?(e.consume(S),we):S===60&&i===1?(e.consume(S),ke):S===62&&i===4?(e.consume(S),Z):S===63&&i===3?(e.consume(S),k):S===93&&i===5?(e.consume(S),B):$(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Rw,ie,J)(S)):S===null||$(S)?(e.exit("htmlFlowData"),J(S)):(e.consume(S),O)}function J(S){return e.check(xa,se,ie)(S)}function se(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),Y}function Y(S){return S===null||$(S)?J(S):(e.enter("htmlFlowData"),O(S))}function we(S){return S===45?(e.consume(S),k):O(S)}function ke(S){return S===47?(e.consume(S),o="",F):O(S)}function F(S){if(S===62){const Ee=o.toLowerCase();return wa.includes(Ee)?(e.consume(S),Z):O(S)}return Ne(S)&&o.length<8?(e.consume(S),o+=String.fromCharCode(S),F):O(S)}function B(S){return S===93?(e.consume(S),k):O(S)}function k(S){return S===62?(e.consume(S),Z):S===45&&i===2?(e.consume(S),k):O(S)}function Z(S){return S===null||$(S)?(e.exit("htmlFlowData"),ie(S)):(e.consume(S),Z)}function ie(S){return e.exit("htmlFlow"),t(S)}}function Mw(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Tl,t,n)}}const Bw={name:"htmlText",tokenize:Uw};function Uw(e,t,n){const r=this;let i,l,o;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),u}function u(k){return k===33?(e.consume(k),a):k===47?(e.consume(k),T):k===63?(e.consume(k),y):Ne(k)?(e.consume(k),j):n(k)}function a(k){return k===45?(e.consume(k),f):k===91?(e.consume(k),l=0,g):Ne(k)?(e.consume(k),m):n(k)}function f(k){return k===45?(e.consume(k),h):n(k)}function c(k){return k===null?n(k):k===45?(e.consume(k),d):$(k)?(o=c,ke(k)):(e.consume(k),c)}function d(k){return k===45?(e.consume(k),h):c(k)}function h(k){return k===62?we(k):k===45?d(k):c(k)}function g(k){const Z="CDATA[";return k===Z.charCodeAt(l++)?(e.consume(k),l===Z.length?v:g):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),C):$(k)?(o=v,ke(k)):(e.consume(k),v)}function C(k){return k===93?(e.consume(k),p):v(k)}function p(k){return k===62?we(k):k===93?(e.consume(k),p):v(k)}function m(k){return k===null||k===62?we(k):$(k)?(o=m,ke(k)):(e.consume(k),m)}function y(k){return k===null?n(k):k===63?(e.consume(k),P):$(k)?(o=y,ke(k)):(e.consume(k),y)}function P(k){return k===62?we(k):y(k)}function T(k){return Ne(k)?(e.consume(k),E):n(k)}function E(k){return k===45||ze(k)?(e.consume(k),E):I(k)}function I(k){return $(k)?(o=I,ke(k)):W(k)?(e.consume(k),I):we(k)}function j(k){return k===45||ze(k)?(e.consume(k),j):k===47||k===62||oe(k)?M(k):n(k)}function M(k){return k===47?(e.consume(k),we):k===58||k===95||Ne(k)?(e.consume(k),b):$(k)?(o=M,ke(k)):W(k)?(e.consume(k),M):we(k)}function b(k){return k===45||k===46||k===58||k===95||ze(k)?(e.consume(k),b):A(k)}function A(k){return k===61?(e.consume(k),O):$(k)?(o=A,ke(k)):W(k)?(e.consume(k),A):M(k)}function O(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,J):$(k)?(o=O,ke(k)):W(k)?(e.consume(k),O):(e.consume(k),se)}function J(k){return k===i?(e.consume(k),i=void 0,Y):k===null?n(k):$(k)?(o=J,ke(k)):(e.consume(k),J)}function se(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||oe(k)?M(k):(e.consume(k),se)}function Y(k){return k===47||k===62||oe(k)?M(k):n(k)}function we(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function ke(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),F}function F(k){return W(k)?te(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):B(k)}function B(k){return e.enter("htmlTextData"),o(k)}}const Rc={name:"labelEnd",resolveAll:Vw,resolveTo:qw,tokenize:Ww},$w={tokenize:Kw},Hw={tokenize:Gw},Qw={tokenize:Yw};function Vw(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&It(e,0,e.length,n),e}function qw(e,t){let n=e.length,r=0,i,l,o;for(;n--;){const f=e[n][1];if(i){if(f.type==="link"||f.type==="labelLink"&&f._inactive)break;e[n][0]==="enter"&&f.type==="labelLink"&&(f._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(f.type==="labelImage"||f.type==="labelLink")&&!f._balanced&&(i=n,f.type!=="labelLink")){r=2;break}}else f.type==="labelEnd"&&(l=n)}const s={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[l][1].end}},a={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[l-2][1].start}};return o=[["enter",s,t],["enter",u,t]],o=yt(o,e.slice(i+1,i+r+3)),o=yt(o,[["enter",a,t]]),o=yt(o,ds(t.parser.constructs.insideSpan.null,e.slice(i+r+4,l-3),t)),o=yt(o,[["exit",a,t],e[l-2],e[l-1],["exit",u,t]]),o=yt(o,e.slice(l+1)),o=yt(o,[["exit",s,t]]),It(e,i,e.length,o),e}function Ww(e,t,n){const r=this,i=r._labelStarts;let l,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();l=i[i.length-1]}return s;function s(d){return l?l._inactive?c(d):(o=r.parser.defined.includes(Nt(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),u):n(d)}function u(d){return d===40?e.attempt($w,f,o?f:c)(d):d===91?e.attempt(Hw,f,o?a:c)(d):o?f(d):c(d)}function a(d){return e.attempt(Qw,f,c)(d)}function f(d){return i.pop(),t(d)}function c(d){return l._balanced=!0,n(d)}}function Kw(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return oe(c)?Ki(e,l)(c):l(c)}function l(c){return c===41?f(c):Ig(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return oe(c)?Ki(e,u)(c):f(c)}function s(c){return n(c)}function u(c){return c===34||c===39||c===40?zg(e,a,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function a(c){return oe(c)?Ki(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Gw(e,t,n){const r=this;return i;function i(s){return Ng.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(Nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function Yw(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Xw={name:"labelStartImage",resolveAll:Rc.resolveAll,tokenize:Jw};function Jw(e,t,n){const r=this;let i;return l;function l(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),i=e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(u))}}const Zw={name:"labelStartLink",resolveAll:Rc.resolveAll,tokenize:e0};function e0(e,t,n){const r=this;let i;return l;function l(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),i=e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(s))}}const Xs={name:"lineEnding",tokenize:t0};function t0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),te(e,t,"linePrefix")}}const po={name:"thematicBreak",tokenize:n0};function n0(e,t,n){let r=0,i;return l;function l(a){return e.enter("thematicBreak"),o(a)}function o(a){return i=a,s(a)}function s(a){return a===i?(e.enter("thematicBreakSequence"),u(a)):r>=3&&(a===null||$(a))?(e.exit("thematicBreak"),t(a)):n(a)}function u(a){return a===i?(e.consume(a),r++,u):(e.exit("thematicBreakSequence"),W(a)?te(e,s,"whitespace")(a):s(a))}}const Ge={continuation:{tokenize:o0},exit:u0,name:"list",tokenize:l0},r0={partial:!0,tokenize:a0},i0={partial:!0,tokenize:s0};function l0(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:va(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(po,n,a)(h):a(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return va(h)&&++o<10?(e.consume(h),u):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),a(h)):n(h)}function a(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Tl,r.interrupt?n:f,e.attempt(r0,d,c))}function f(h){return r.containerState.initialBlankLine=!0,l++,d(h)}function c(h){return W(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function o0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Tl,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,te(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!W(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(i0,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,te(e,e.attempt(Ge,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function s0(e,t,n){const r=this;return te(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function u0(e){e.exit(this.containerState.type)}function a0(e,t,n){const r=this;return te(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!W(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const $h={name:"setextUnderline",resolveTo:c0,tokenize:f0};function c0(e,t){const n=new qo;let r=e.length,i,l,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!o&&e[r][1].type==="definition"&&(o=r);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(n.add(l,0,[["enter",s,t]]),n.add(o+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[["exit",s,t]]),n.consume(e),e}function f0(e,t,n){const r=this;let i;return l;function l(a){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=a,o(a)):n(a)}function o(a){return e.enter("setextHeadingLineSequence"),s(a)}function s(a){return a===i?(e.consume(a),s):(e.exit("setextHeadingLineSequence"),W(a)?te(e,u,"lineSuffix")(a):u(a))}function u(a){return a===null||$(a)?(e.exit("setextHeadingLine"),t(a)):n(a)}}const h0={tokenize:d0};function d0(e){const t=this,n=e.attempt(Tl,r,e.attempt(this.parser.constructs.flowInitial,i,te(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ww,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const p0={resolveAll:Fg()},m0=Ag("string"),g0=Ag("text");function Ag(e){return{resolveAll:Fg(e==="text"?y0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(f){return a(f)?l(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return a(f)?(n.exit("data"),l(f)):(n.consume(f),u)}function a(f){if(f===null)return!0;const c=i[f];let d=-1;if(c)for(;++d<c.length;){const h=c[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Fg(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function y0(e,t){const n=new qo;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=t.sliceStream(i);let o=l.length,s=-1,u=0,a;for(;o--;){const f=l[o];if(typeof f=="string"){for(s=f.length;f.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(f===-2)a=!0,u++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(u=0),u){const f={type:r===e.length||a||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):n.add(r,0,[["enter",f,t],["exit",f,t]])}r++}return n.consume(e),e}const v0={42:Ge,43:Ge,45:Ge,48:Ge,49:Ge,50:Ge,51:Ge,52:Ge,53:Ge,54:Ge,55:Ge,56:Ge,57:Ge,62:bg},k0={91:bw},x0={[-2]:Ys,[-1]:Ys,32:Ys},w0={35:zw,42:po,45:[$h,po],60:Fw,61:$h,95:po,96:Uh,126:Uh},S0={38:_g,92:Tg},C0={[-5]:Xs,[-4]:Xs,[-3]:Xs,33:Xw,38:_g,42:ka,60:[nw,Bw],91:Zw,92:[Iw,Tg],93:Rc,95:ka,96:mw},E0={null:[ka,p0]},P0={null:[42,95]},b0={null:[]},T0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:P0,contentInitial:k0,disable:b0,document:v0,flow:w0,flowInitial:x0,insideSpan:E0,string:S0,text:C0},Symbol.toStringTag,{value:"Module"}));function _0(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let o=[],s=[];const u={attempt:I(T),check:I(E),consume:m,enter:y,exit:P,interrupt:I(E,{interrupt:!0})},a={code:null,containerState:{},defineSkip:v,events:[],now:g,parser:e,previous:null,sliceSerialize:d,sliceStream:h,write:c};let f=t.tokenize.call(a,u);return t.resolveAll&&l.push(t),a;function c(A){return o=yt(o,A),C(),o[o.length-1]!==null?[]:(j(t,0),a.events=ds(l,a.events,a),a.events)}function d(A,O){return I0(h(A),O)}function h(A){return j0(o,A)}function g(){const{_bufferIndex:A,_index:O,line:J,column:se,offset:Y}=r;return{_bufferIndex:A,_index:O,line:J,column:se,offset:Y}}function v(A){i[A.line]=A.column,b()}function C(){for(;r._index<o.length;){const A=o[r._index];if(typeof A=="string"){const O=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<A.length;)p(A.charCodeAt(r._bufferIndex))}else p(A)}}function p(A){f=f(A)}function m(A){$(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,b()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),a.previous=A}function y(A,O){const J=O||{};return J.type=A,J.start=g(),a.events.push(["enter",J,a]),s.push(J),J}function P(A){const O=s.pop();return O.end=g(),a.events.push(["exit",O,a]),O}function T(A,O){j(A,O.from)}function E(A,O){O.restore()}function I(A,O){return J;function J(se,Y,we){let ke,F,B,k;return Array.isArray(se)?ie(se):"tokenize"in se?ie([se]):Z(se);function Z(ue){return At;function At(fn){const wr=fn!==null&&ue[fn],Sr=fn!==null&&ue.null,vs=[...Array.isArray(wr)?wr:wr?[wr]:[],...Array.isArray(Sr)?Sr:Sr?[Sr]:[]];return ie(vs)(fn)}}function ie(ue){return ke=ue,F=0,ue.length===0?we:S(ue[F])}function S(ue){return At;function At(fn){return k=M(),B=ue,ue.partial||(a.currentConstruct=ue),ue.name&&a.parser.constructs.disable.null.includes(ue.name)?Lt():ue.tokenize.call(O?Object.assign(Object.create(a),O):a,u,Ee,Lt)(fn)}}function Ee(ue){return A(B,k),Y}function Lt(ue){return k.restore(),++F<ke.length?S(ke[F]):we}}}function j(A,O){A.resolveAll&&!l.includes(A)&&l.push(A),A.resolve&&It(a.events,O,a.events.length-O,A.resolve(a.events.slice(O),a)),A.resolveTo&&(a.events=A.resolveTo(a.events,a))}function M(){const A=g(),O=a.previous,J=a.currentConstruct,se=a.events.length,Y=Array.from(s);return{from:se,restore:we};function we(){r=A,a.previous=O,a.currentConstruct=J,a.events.length=se,s=Y,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function j0(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function I0(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
42
|
+
`;break}case-3:{o=`\r
|
|
43
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function N0(e){const r={constructs:Sg([T0,...(e||{}).extensions||[]]),content:i(Gx),defined:[],document:i(Xx),flow:i(h0),lazy:{},string:i(m0),text:i(g0)};return r;function i(l){return o;function o(s){return _0(r,l,s)}}}function z0(e){for(;!jg(e););return e}const Hh=/[\0\t\n\r]/g;function L0(){let e=1,t="",n=!0,r;return i;function i(l,o,s){l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l));const u=[];let a=0;for(t="",n&&(l.charCodeAt(0)===65279&&a++,n=void 0);a<l.length;){Hh.lastIndex=a;const f=Hh.exec(l),c=f&&f.index!==void 0?f.index:l.length,d=l.charCodeAt(c);if(!f){t=l.slice(a);break}if(d===10&&a===c&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),a<c&&(u.push(l.slice(a,c)),e+=c-a),d){case 0:{u.push(65533),e++;break}case 9:{const h=Math.ceil(e/4)*4;for(u.push(-2);e++<h;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}a=c+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const A0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function F0(e){return e.replace(A0,R0)}function R0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Cg(n.slice(l?2:1),l?16:10)}return Fc(n)||e}const Rg={}.hasOwnProperty;function D0(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),O0(n)(z0(N0(n).document().write(L0()(e,t,!0))))}function O0(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(tf),autolinkProtocol:b,autolinkEmail:b,atxHeading:o(Jc),blockQuote:o(vs),characterEscape:b,characterReference:b,codeFenced:o(Xc),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Xc,s),codeText:o(ky,s),codeTextData:b,data:b,codeFlowValue:b,definition:o(xy),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(wy),hardBreakEscape:o(Zc),hardBreakTrailing:o(Zc),htmlFlow:o(ef,s),htmlFlowData:b,htmlText:o(ef,s),htmlTextData:b,image:o(Sy),label:s,link:o(tf),listItem:o(Cy),listItemValue:h,listOrdered:o(nf,d),listUnordered:o(nf),paragraph:o(Ey),reference:Ee,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Jc),strong:o(Py),thematicBreak:o(Ty)},exit:{atxHeading:a(),atxHeadingSequence:E,autolink:a(),autolinkEmail:Sr,autolinkProtocol:wr,blockQuote:a(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:At,characterReference:fn,codeFenced:a(p),codeFencedFence:C,codeFencedFenceInfo:g,codeFencedFenceMeta:v,codeFlowValue:A,codeIndented:a(m),codeText:a(we),codeTextData:A,data:A,definition:a(),definitionDestinationString:T,definitionLabelString:y,definitionTitleString:P,emphasis:a(),hardBreakEscape:a(J),hardBreakTrailing:a(J),htmlFlow:a(se),htmlFlowData:A,htmlText:a(Y),htmlTextData:A,image:a(F),label:k,labelText:B,lineEnding:O,link:a(ke),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:Lt,resourceDestinationString:Z,resourceTitleString:ie,resource:S,setextHeading:a(M),setextHeadingLineSequence:j,setextHeadingText:I,strong:a(),thematicBreak:a()}};Dg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(_){let L={type:"root",children:[],position:void 0};const Q={stack:[L],tokenStack:[],config:t,enter:u,exit:f,buffer:s,resume:c,data:n},V=[],We=[];let ce=-1;for(;++ce<_.length;)if(We.push(_[ce]),_[ce][1].type==="listOrdered"||_[ce][1].type==="listUnordered")if(_[ce][0]==="enter")V.push(We.length-1);else{const Ke=V.pop();l(We,Ke)}for(_=We,ce=-1;++ce<_.length;){const Ke=t[_[ce][0]];_[ce][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...Q,sliceSerialize:_[ce][2].sliceSerialize},_[ce][1]),Rg.call(Ke,_[ce][1].type)&&Ke[_[ce][1].type].call({...Q,sliceSerialize:_[ce][2].sliceSerialize},_[ce][1]),_[ce][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...Q,sliceSerialize:_[ce][2].sliceSerialize},_[ce][1])}if(Q.tokenStack.length>0){const Ke=Q.tokenStack[Q.tokenStack.length-1];(Ke[1]||Qh).call(Q,void 0,Ke[0])}for(L.position={start:dn(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:dn(_.length>0?_[_.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)L=t.transforms[ce](L)||L;return L}function i(_,L,Q){let V=-1;for(;++V<_.length;)_[V].call(L,Q)}function l(_,L){const Q=_.length-1;let V=L-1,We=-1,ce=!1,Ke,Ft,ki,xi;const wi=[];for(;++V<=Q;){const it=_[V];switch(it[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{it[0]==="enter"?We++:We--,xi=void 0;break}case"lineEndingBlank":{it[0]==="enter"&&(Ke&&!xi&&!We&&!ki&&(ki=V),xi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:xi=void 0}if(!We&&it[0]==="enter"&&it[1].type==="listItemPrefix"||We===-1&&it[0]==="exit"&&(it[1].type==="listUnordered"||it[1].type==="listOrdered")){if(Ke){let Cr=V;for(Ft=void 0;Cr--;){const Kt=_[Cr];if(Kt[1].type==="lineEnding"||Kt[1].type==="lineEndingBlank"){if(Kt[0]==="exit")continue;Ft&&(_[Ft][1].type="lineEndingBlank",ce=!0),Kt[1].type="lineEnding",Ft=Cr}else if(!(Kt[1].type==="linePrefix"||Kt[1].type==="blockQuotePrefix"||Kt[1].type==="blockQuotePrefixWhitespace"||Kt[1].type==="blockQuoteMarker"||Kt[1].type==="listItemIndent"))break}ki&&(!Ft||ki<Ft)&&(Ke._spread=!0),Ke.end=Object.assign({},Ft?_[Ft][1].start:it[1].end),wi.push({at:Ft||V,event:["exit",Ke,it[2]]})}if(it[1].type==="listItemPrefix"){const Cr={type:"listItem",_spread:!1,start:Object.assign({},it[1].start),end:void 0};Ke=Cr,wi.push({at:V,event:["enter",Cr,it[2]]}),ki=void 0,xi=!0}}}const rf=_.splice(L);let ks=0;for(V=-1;++V<rf.length;){for(;ks<wi.length&&wi[ks].at===L+V;)_.push(wi[ks++].event);_.push(rf[V])}_[L][1]._spread=ce}function o(_,L){return Q;function Q(V){u.call(this,_(V),V),L&&L.call(this,V)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(_,L,Q){this.stack[this.stack.length-1].children.push(_),this.stack.push(_),this.tokenStack.push([L,Q||void 0]),_.position={start:dn(L.start),end:void 0}}function a(_){return L;function L(Q){_&&_.call(this,Q),f.call(this,Q)}}function f(_,L){const Q=this.stack.pop(),V=this.tokenStack.pop();if(!V)throw new Error("Cannot close `"+_.type+"` ("+Wi({start:_.start,end:_.end})+"): it’s not open");V[0].type!==_.type&&(L?L.call(this,_,V[0]):(V[1]||Qh).call(this,_,V[0])),Q.position.end=dn(_.end)}function c(){return Ac(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(_){if(this.data.expectingFirstListItemValue){const L=this.stack[this.stack.length-2];L.start=Number.parseInt(this.sliceSerialize(_),10),this.data.expectingFirstListItemValue=void 0}}function g(){const _=this.resume(),L=this.stack[this.stack.length-1];L.lang=_}function v(){const _=this.resume(),L=this.stack[this.stack.length-1];L.meta=_}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function p(){const _=this.resume(),L=this.stack[this.stack.length-1];L.value=_.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const _=this.resume(),L=this.stack[this.stack.length-1];L.value=_.replace(/(\r?\n|\r)$/g,"")}function y(_){const L=this.resume(),Q=this.stack[this.stack.length-1];Q.label=L,Q.identifier=Nt(this.sliceSerialize(_)).toLowerCase()}function P(){const _=this.resume(),L=this.stack[this.stack.length-1];L.title=_}function T(){const _=this.resume(),L=this.stack[this.stack.length-1];L.url=_}function E(_){const L=this.stack[this.stack.length-1];if(!L.depth){const Q=this.sliceSerialize(_).length;L.depth=Q}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function j(_){const L=this.stack[this.stack.length-1];L.depth=this.sliceSerialize(_).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function b(_){const Q=this.stack[this.stack.length-1].children;let V=Q[Q.length-1];(!V||V.type!=="text")&&(V=by(),V.position={start:dn(_.start),end:void 0},Q.push(V)),this.stack.push(V)}function A(_){const L=this.stack.pop();L.value+=this.sliceSerialize(_),L.position.end=dn(_.end)}function O(_){const L=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=L.children[L.children.length-1];Q.position.end=dn(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(L.type)&&(b.call(this,_),A.call(this,_))}function J(){this.data.atHardBreak=!0}function se(){const _=this.resume(),L=this.stack[this.stack.length-1];L.value=_}function Y(){const _=this.resume(),L=this.stack[this.stack.length-1];L.value=_}function we(){const _=this.resume(),L=this.stack[this.stack.length-1];L.value=_}function ke(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const L=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=L,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function F(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const L=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=L,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function B(_){const L=this.sliceSerialize(_),Q=this.stack[this.stack.length-2];Q.label=F0(L),Q.identifier=Nt(L).toLowerCase()}function k(){const _=this.stack[this.stack.length-1],L=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const V=_.children;Q.children=V}else Q.alt=L}function Z(){const _=this.resume(),L=this.stack[this.stack.length-1];L.url=_}function ie(){const _=this.resume(),L=this.stack[this.stack.length-1];L.title=_}function S(){this.data.inReference=void 0}function Ee(){this.data.referenceType="collapsed"}function Lt(_){const L=this.resume(),Q=this.stack[this.stack.length-1];Q.label=L,Q.identifier=Nt(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function ue(_){this.data.characterReferenceType=_.type}function At(_){const L=this.sliceSerialize(_),Q=this.data.characterReferenceType;let V;Q?(V=Cg(L,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):V=Fc(L);const We=this.stack[this.stack.length-1];We.value+=V}function fn(_){const L=this.stack.pop();L.position.end=dn(_.end)}function wr(_){A.call(this,_);const L=this.stack[this.stack.length-1];L.url=this.sliceSerialize(_)}function Sr(_){A.call(this,_);const L=this.stack[this.stack.length-1];L.url="mailto:"+this.sliceSerialize(_)}function vs(){return{type:"blockquote",children:[],position:void 0}}function Xc(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function ky(){return{type:"inlineCode",value:"",position:void 0}}function xy(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function wy(){return{type:"emphasis",children:[],position:void 0}}function Jc(){return{type:"heading",depth:0,children:[],position:void 0}}function Zc(){return{type:"break",position:void 0}}function ef(){return{type:"html",value:"",position:void 0}}function Sy(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function tf(){return{type:"link",title:null,url:"",children:[],position:void 0}}function nf(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[],position:void 0}}function Cy(_){return{type:"listItem",spread:_._spread,checked:null,children:[],position:void 0}}function Ey(){return{type:"paragraph",children:[],position:void 0}}function Py(){return{type:"strong",children:[],position:void 0}}function by(){return{type:"text",value:"",position:void 0}}function Ty(){return{type:"thematicBreak",position:void 0}}}function dn(e){return{line:e.line,column:e.column,offset:e.offset}}function Dg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Dg(e,r):M0(e,r)}}function M0(e,t){let n;for(n in t)if(Rg.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Qh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Wi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Wi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Wi({start:t.start,end:t.end})+") is still open")}function B0(e){const t=this;t.parser=n;function n(r){return D0(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function U0(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function $0(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
44
|
+
`}]}function H0(e,t){const n=t.value?t.value+`
|
|
45
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Q0(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function V0(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q0(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=vi(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,s+=1,e.footnoteCounts.set(r,s);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const a={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,a),e.applyData(t,a)}function W0(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function K0(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Og(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function G0(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Og(e,t);const i={src:vi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function Y0(e,t){const n={src:vi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function X0(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function J0(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Og(e,t);const i={href:vi(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Z0(e,t){const n={href:vi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eS(e,t,n){const r=e.all(t),i=n?tS(n):Mg(t),l={},o=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
|
|
46
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
47
|
+
`});const a={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,a),e.applyData(t,a)}function tS(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Mg(n[r])}return t}function Mg(e){const t=e.spread;return t??e.children.length>1}function nS(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function rS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function lS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oS(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Ic(t.children[1]),u=mg(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function sS(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let u=-1;const a=[];for(;++u<s;){const c=t.children[u],d={},h=o?o[u]:void 0;h&&(d.align=h);let g={type:"element",tagName:l,properties:d,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),a.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(t,f),e.applyData(t,f)}function uS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Vh=9,qh=32;function aS(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(Wh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(Wh(t.slice(i),i>0,!1)),l.join("")}function Wh(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===Vh||l===qh;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===Vh||l===qh;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function cS(e,t){const n={type:"text",value:aS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hS={blockquote:U0,break:$0,code:H0,delete:Q0,emphasis:V0,footnoteReference:q0,heading:W0,html:K0,imageReference:G0,image:Y0,inlineCode:X0,linkReference:J0,link:Z0,listItem:eS,list:nS,paragraph:rS,root:iS,strong:lS,table:oS,tableCell:uS,tableRow:sS,text:cS,thematicBreak:fS,toml:Kl,yaml:Kl,definition:Kl,footnoteDefinition:Kl};function Kl(){}const Bg=-1,ps=0,Gi=1,Wo=2,Dc=3,Oc=4,Mc=5,Bc=6,Ug=7,$g=8,{defineProperty:dS}=Object,Hg=typeof self=="object"?self:globalThis,Kh=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Hg[e](t)},pS=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case ps:case Bg:return n(o,i);case Gi:{const s=n([],i);for(const u of o)s.push(r(u));return s}case Wo:{const s=n({},i);for(const[u,a]of o){const f=r(u),c=r(a);f==="__proto__"?dS(s,f,{value:c,configurable:!0,enumerable:!0,writable:!0}):s[f]=c}return s}case Dc:return n(new Date(o),i);case Oc:{const{source:s,flags:u}=o;return n(new RegExp(s,u),i)}case Mc:{const s=n(new Map,i);for(const[u,a]of o)s.set(r(u),r(a));return s}case Bc:{const s=n(new Set,i);for(const u of o)s.add(r(u));return s}case Ug:{const{name:s,message:u}=o;return n(typeof Hg[s]=="function"?Kh(s,u):new Error(u),i)}case $g:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}case"-0":return-0}return n(Kh(l,o),i)};return r},Gh=e=>pS(new Map,e)(0),Gn="",{toString:mS}={},{keys:gS,is:yS}=Object,zi=e=>{const t=typeof e;if(t!=="object"||!e)return[ps,t];const n=mS.call(e).slice(8,-1);switch(n){case"Array":return[Gi,Gn];case"Object":return[Wo,Gn];case"Date":return[Dc,Gn];case"RegExp":return[Oc,Gn];case"Map":return[Mc,Gn];case"Set":return[Bc,Gn];case"DataView":return[Gi,n]}return n.includes("Array")?[Gi,n]:e instanceof Error?[Ug,e.name||"Error"]:[Wo,n]},Gl=([e,t])=>e===ps&&(t==="function"||t==="symbol"),vS=(e,t,n,r)=>{const i=(o,s)=>{const u=r.push(o)-1;return n.set(s,u),u},l=o=>{if(n.has(o))return n.get(o);let[s,u]=zi(o);switch(s){case ps:{let f=o;switch(u){case"bigint":s=$g,f=o.toString();break;case"number":if(!o&&yS(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Bg],o)}return i([s,f],o)}case Gi:{if(u){let d=o;return u==="DataView"?d=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(d=new Uint8Array(o)),i([u,[...d]],o)}const f=[],c=i([s,f],o);for(const d of o)f.push(l(d));return c}case Wo:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const f=[],c=i([s,f],o);for(const d of gS(o))(e||!Gl(zi(o[d])))&&f.push([l(d),l(o[d])]);return c}case Dc:return i([s,isNaN(o.getTime())?Gn:o.toISOString()],o);case Oc:{const{source:f,flags:c}=o;return i([s,{source:f,flags:c}],o)}case Mc:{const f=[],c=i([s,f],o);for(const[d,h]of o)(e||!(Gl(zi(d))||Gl(zi(h))))&&f.push([l(d),l(h)]);return c}case Bc:{const f=[],c=i([s,f],o);for(const d of o)(e||!Gl(zi(d)))&&f.push(l(d));return c}}const{message:a}=o;return i([s,{name:u,message:a}],o)};return l},Yh=(e,{json:t,lossy:n}={})=>{const r=[];return vS(!(t||n),!!t,new Map,r)(e),r},Ko=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Gh(Yh(e,t)):structuredClone(e):(e,t)=>Gh(Yh(e,t));function kS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function xS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function wS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||kS,r=e.options.footnoteBackLabel||xS,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[u]);if(!a)continue;const f=e.all(a),c=String(a.identifier).toUpperCase(),d=vi(c.toLowerCase());let h=0;const g=[],v=e.footnoteCounts.get(c);for(;v!==void 0&&++h<=v;){g.length>0&&g.push({type:"text",value:" "});let m=typeof n=="string"?n:n(u,h);typeof m=="string"&&(m={type:"text",value:m}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const m=C.children[C.children.length-1];m&&m.type==="text"?m.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else f.push(...g);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(f,!0)};e.patch(a,p),s.push(p)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ko(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
48
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
49
|
+
`}]}}const ms=function(e){if(e==null)return PS;if(typeof e=="function")return gs(e);if(typeof e=="object")return Array.isArray(e)?SS(e):CS(e);if(typeof e=="string")return ES(e);throw new Error("Expected function, string, or object as test")};function SS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ms(e[n]);return gs(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function CS(e){const t=e;return gs(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function ES(e){return gs(t);function t(n){return n&&n.type===e}}function gs(e){return t;function t(n,r,i){return!!(bS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function PS(){return!0}function bS(e){return e!==null&&typeof e=="object"&&"type"in e}const Qg=[],TS=!0,mo=!1,Sa="skip";function Ca(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,l,o,s,u;if(typeof n=="function"||n&&typeof n=="object"?(l=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o=="function")s=o;else if(o&&typeof o=="object"){if(!(o.enter===null||o.enter===void 0))if(typeof o.enter=="function")s=o.enter;else throw new Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor");if(typeof o.exit=="function")u=o.exit;else throw new Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");const a=ms(l),f=i?1:-1;c(e,void 0,[])();function c(d,h,g){const v=d&&typeof d=="object"?d:{};if(typeof v.type=="string"){const p=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(C,"name",{value:"node ("+(d.type+(p?"<"+p+">":""))+")"})}return C;function C(){const p=!l||a(d,h,g[g.length-1]||void 0);let m=Qg;if(s&&p&&(m=Xh(s(d,g,h)),m[0]===mo))return m;if("children"in d&&d.children){const y=d;if(y.children&&m[0]!==Sa){let P=(i?-1:y.children.length)+f;const T=[...g,y];for(;P>-1&&P<y.children.length;){const E=y.children[P],I=c(E,P,T)();if(I[0]===mo)return I;P=typeof I[1]=="number"?I[1]:P+f}}}if(u&&p){const y=Xh(u(d,g,h));if(y[0]===Sa)throw new Error("Unexpected value `"+y[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(y[0]===mo||typeof y[1]=="number")return y}return m}}}function Xh(e){return Array.isArray(e)?e:typeof e=="number"?[TS,e]:e==null?Qg:[e]}function Uc(e,t,n,r){let i,l,o;l=t,o=n,typeof l=="function"?Ca(e,i,Ea(l),o):Ca(e,i,_S(l),o)}function _S(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?Ea(e.enter):e.enter,exit:typeof e.exit=="function"?Ea(e.exit):e.exit}}function Ea(e){return t;function t(n,r,i){return e(n,i,r[r.length-1])}}const Pa={}.hasOwnProperty,jS={};function IS(e,t){const n=t||jS,r=new Map,i=new Map,l=new Map,o={...hS,...n.handlers},s={all:a,applyData:zS,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:u,options:n,patch:NS,wrap:AS};return Uc(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();c.has(d)||c.set(d,f)}}),s;function u(f,c){const d=f.type,h=s.handlers[d];if(Pa.call(s.handlers,d)&&h)return h(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in f){const{children:v,...C}=f,p=Ko(C);return p.children=s.all(f),p}return Ko(f)}return(s.options.unknownHandler||LS)(s,f,c)}function a(f){const c=[];if("children"in f){const d=f.children;let h=-1;for(;++h<d.length;){const g=s.one(d[h],f);if(g){if(h&&d[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Jh(g.value)),!Array.isArray(g)&&g.type==="element")){const v=g.children[0];v&&v.type==="text"&&(v.value=Jh(v.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function NS(e,t){e.position&&(t.position=xx(e))}function zS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,Ko(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function LS(e,t){const n=t.data||{},r="value"in t&&!(Pa.call(n,"hProperties")||Pa.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function AS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
50
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
51
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
52
|
+
`}),n}function Jh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zh(e,t){const n=IS(e,t),r=n.one(e,void 0),i=wS(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
53
|
+
`},i),l}function FS(e,t){return e&&"run"in e?async function(n,r){const i=Zh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Zh(n,{file:r,...e||t})}}function ed(e){if(e)throw e}var go=Object.prototype.hasOwnProperty,Vg=Object.prototype.toString,td=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,rd=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Vg.call(t)==="[object Array]"},id=function(t){if(!t||Vg.call(t)!=="[object Object]")return!1;var n=go.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&go.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||go.call(t,i)},ld=function(t,n){td&&n.name==="__proto__"?td(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},od=function(t,n){if(n==="__proto__")if(go.call(t,n)){if(nd)return nd(t,n).value}else return;return t[n]},RS=function e(){var t,n,r,i,l,o,s=arguments[0],u=1,a=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<a;++u)if(t=arguments[u],t!=null)for(n in t)r=od(s,n),i=od(t,n),s!==i&&(f&&i&&(id(i)||(l=rd(i)))?(l?(l=!1,o=r&&rd(r)?r:[]):o=r&&id(r)?r:{},ld(s,{name:n,newValue:e(f,o,i)})):typeof i<"u"&&ld(s,{name:n,newValue:i}));return s};const Js=_y(RS);function ba(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function DS(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(u,...a){const f=e[++l];let c=-1;if(u){o(u);return}for(;++c<i.length;)(a[c]===null||a[c]===void 0)&&(a[c]=i[c]);i=a,f?OS(f,s)(...a):o(null,...a)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function OS(e,t){let n;return r;function r(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(a){const f=a;if(s&&n)throw f;return i(f)}s||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const Ot={basename:MS,dirname:BS,extname:US,join:$S,sep:"/"};function MS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_l(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function BS(e){if(_l(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function US(e){_l(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function $S(...e){let t=-1,n;for(;++t<e.length;)_l(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":HS(n)}function HS(e){_l(e);const t=e.codePointAt(0)===47;let n=QS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function QS(e,t){let n="",r=0,i=-1,l=0,o=-1,s,u;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function _l(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const VS={cwd:qS};function qS(){return"/"}function Ta(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function WS(e){if(typeof e=="string")e=new URL(e);else if(!Ta(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return KS(e)}function KS(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Zs=["history","path","basename","stem","extname","dirname"];class qg{constructor(t){let n;t?Ta(t)?n={path:t}:typeof t=="string"||GS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":VS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Zs.length;){const l=Zs[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Zs.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ot.basename(this.path):void 0}set basename(t){tu(t,"basename"),eu(t,"basename"),this.path=Ot.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ot.dirname(this.path):void 0}set dirname(t){sd(this.basename,"dirname"),this.path=Ot.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ot.extname(this.path):void 0}set extname(t){if(eu(t,"extname"),sd(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ot.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ta(t)&&(t=WS(t)),tu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ot.basename(this.path,this.extname):void 0}set stem(t){tu(t,"stem"),eu(t,"stem"),this.path=Ot.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Be(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function eu(e,t){if(e&&e.includes(Ot.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ot.sep+"`")}function tu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sd(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YS=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},XS={}.hasOwnProperty;class $c extends YS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=DS()}copy(){const t=new $c;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Js(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(iu("data",this.frozen),this.namespace[t]=n,this):XS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(iu("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Yl(t),r=this.parser||this.Parser;return nu("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),nu("process",this.parser||this.Parser),ru("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=Yl(t),u=r.parse(s);r.run(u,s,function(f,c,d){if(f||!c||!d)return a(f);const h=c,g=r.stringify(h,d);eC(g)?d.value=g:d.result=g,a(f,d)});function a(f,c){f||!c?o(f):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),nu("processSync",this.parser||this.Parser),ru("processSync",this.compiler||this.Compiler),this.process(t,i),ad("processSync","process",n),r;function i(l,o){n=!0,ed(l),r=o}}run(t,n,r){ud(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const u=Yl(n);i.run(t,u,a);function a(f,c,d){const h=c||t;f?s(f):o?o(h):r(void 0,h,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),ad("runSync","run",r),i;function l(o,s){ed(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=Yl(n),i=this.compiler||this.Compiler;return ru("stringify",i),ud(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(iu("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(a){if(typeof a=="function")u(a,[]);else if(typeof a=="object")if(Array.isArray(a)){const[f,...c]=a;u(f,c)}else o(a);else throw new TypeError("Expected usable value, not `"+a+"`")}function o(a){if(!("plugins"in a)&&!("settings"in a))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(a.plugins),a.settings&&(i.settings=Js(!0,i.settings,a.settings))}function s(a){let f=-1;if(a!=null)if(Array.isArray(a))for(;++f<a.length;){const c=a[f];l(c)}else throw new TypeError("Expected a list of plugins, not `"+a+"`")}function u(a,f){let c=-1,d=-1;for(;++c<r.length;)if(r[c][0]===a){d=c;break}if(d===-1)r.push([a,...f]);else if(f.length>0){let[h,...g]=f;const v=r[d][1];ba(v)&&ba(h)&&(h=Js(!0,v,h)),r[d]=[a,h,...g]}}}}const JS=new $c().freeze();function nu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ru(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function iu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ud(e){if(!ba(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ad(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Yl(e){return ZS(e)?e:new qg(e)}function ZS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eC(e){return typeof e=="string"||tC(e)}function tC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",cd=[],fd={allowDangerousHtml:!0},rC=/^(https?|ircs?|mailto|xmpp)$/i,iC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function lC(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,l=e.components,o=e.disallowedElements,s=e.rehypePlugins||cd,u=e.remarkPlugins||cd,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...fd}:fd,f=e.skipHtml,c=e.unwrapDisallowed,d=e.urlTransform||oC,h=JS().use(B0).use(u).use(FS,a).use(s),g=new qg;typeof r=="string"&&(g.value=r);for(const m of iC)Object.hasOwn(e,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+nC+m.id,void 0);const v=h.parse(g);let C=h.runSync(v,g);return i&&(C={type:"element",tagName:"div",properties:{className:i},children:C.type==="root"?C.children:[C]}),Uc(C,p),bx(C,{Fragment:x.Fragment,components:l,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function p(m,y,P){if(m.type==="raw"&&P&&typeof y=="number")return f?P.children.splice(y,1):P.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let T;for(T in Gs)if(Object.hasOwn(Gs,T)&&Object.hasOwn(m.properties,T)){const E=m.properties[T],I=Gs[T];(I===null||I.includes(m.tagName))&&(m.properties[T]=d(String(E||""),T,m))}}if(m.type==="element"){let T=t?!t.includes(m.tagName):o?o.includes(m.tagName):!1;if(!T&&n&&typeof y=="number"&&(T=!n(m,y,P)),T&&P&&typeof y=="number")return c&&m.children?P.children.splice(y,1,...m.children):P.children.splice(y,1),y}}}function oC(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||rC.test(e.slice(0,t))?e:""}function hd(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function sC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function uC(e,t,n){const i=ms((n||{}).ignore||[]),l=aC(t);let o=-1;for(;++o<l.length;)Ca(e,s);function s(a,f,c){if(a.type==="text"&&typeof c=="number")return u(a,f,c);if(i(a,c,f[f.length-1]))return Sa}function u(a,f,c){const d=f[f.length-1],h=l[o][0],g=l[o][1];let v=0,C=!1,p=[];h.lastIndex=0;let m=h.exec(a.value);for(;m;){const P=m.index,T={index:m.index,input:m.input,stack:[...f,a]};let E=g(...m,T);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1)h.lastIndex=P+1;else{if(v!==P&&y({type:"text",value:a.value.slice(v,P)}),Array.isArray(E))for(const I of E)y(I);else E&&y(E);v=P+m[0].length,C=!0}if(!h.global)break;m=h.exec(a.value)}return C?(v<a.value.length&&y({type:"text",value:a.value.slice(v)}),d.children.splice(c,1,...p)):p=[a],c+p.length;function y(P){const T=p[p.length-1];T&&T.type==="text"&&P.type==="text"?T.value+=P.value:p.push(P)}}}function aC(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([cC(i[0]),fC(i[1])])}return t}function cC(e){return typeof e=="string"?new RegExp(sC(e),"g"):e}function fC(e){return typeof e=="function"?e:function(){return e}}const lu="phrasing",ou=["autolink","link","image","label"];function hC(){return{transforms:[kC],enter:{literalAutolink:pC,literalAutolinkEmail:su,literalAutolinkHttp:su,literalAutolinkWww:su},exit:{literalAutolink:vC,literalAutolinkEmail:yC,literalAutolinkHttp:mC,literalAutolinkWww:gC}}}function dC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lu,notInConstruct:ou},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lu,notInConstruct:ou},{character:":",before:"[ps]",after:"\\/",inConstruct:lu,notInConstruct:ou}]}}function pC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function su(e){this.config.enter.autolinkProtocol.call(this,e)}function mC(e){this.config.exit.autolinkProtocol.call(this,e)}function gC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function yC(e){this.config.exit.autolinkEmail.call(this,e)}function vC(e){this.exit(e)}function kC(e){uC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),wC]],{ignore:["link","linkReference"]})}function xC(e,t,n,r,i){let l="";if(!Wg(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!SC(n)))return!1;const o=CC(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function wC(e,t,n,r){return!Wg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function SC(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function CC(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=hd(e,"(");let l=hd(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Wg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||yr(n)||hs(n))&&(!t||n!==47)}Kg.peek=zC;function EC(){this.buffer()}function PC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function bC(){this.buffer()}function TC(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _C(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Nt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jC(e){this.exit(e)}function IC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Nt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function NC(e){this.exit(e)}function zC(){return"["}function Kg(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function LC(){return{enter:{gfmFootnoteCallString:EC,gfmFootnoteCall:PC,gfmFootnoteDefinitionLabelString:bC,gfmFootnoteDefinition:TC},exit:{gfmFootnoteCallString:_C,gfmFootnoteCall:jC,gfmFootnoteDefinitionLabelString:IC,gfmFootnoteDefinition:NC}}}function AC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Kg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let u=s.move("[^");const a=l.enter("footnoteDefinition"),f=l.enter("label");return u+=s.move(l.safe(l.associationId(r),{before:u,after:"]"})),f(),u+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),u+=s.move((t?`
|
|
54
|
+
`:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Gg:FC))),a(),u}}function FC(e,t,n){return t===0?e:Gg(e,t,n)}function Gg(e,t,n){return(n?"":" ")+e}const RC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Hc.attention=UC;Hc.peek=$C;function DC(){return{canContainEols:["delete"],enter:{strikethrough:MC},exit:{strikethrough:BC}}}function OC(){return{handlers:{delete:Hc},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:RC}]}}function MC(e){this.enter({type:"delete",children:[],position:void 0},e)}function BC(e){this.exit(e)}function Hc(e,t,n,r){const i=n.createTracker(r),l=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let s=i.move(l);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move(l),o(),s}function UC(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function $C(){return"~"}function HC(e){return e.length}function QC(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||HC,l=[],o=[],s=[],u=[];let a=0,f=-1;for(;++f<e.length;){const v=[],C=[];let p=-1;for(e[f].length>a&&(a=e[f].length);++p<e[f].length;){const m=VC(e[f][p]);if(n.alignDelimiters!==!1){const y=i(m);C[p]=y,(u[p]===void 0||y>u[p])&&(u[p]=y)}v.push(m)}o[f]=v,s[f]=C}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<a;)l[c]=dd(r[c]);else{const v=dd(r);for(;++c<a;)l[c]=v}c=-1;const d=[],h=[];for(;++c<a;){const v=l[c];let C="",p="";v===99?(C=":",p=":"):v===108?C=":":v===114&&(p=":");let m=n.alignDelimiters===!1?1:Math.max(1,u[c]-C.length-p.length);const y=C+"-".repeat(m)+p;n.alignDelimiters!==!1&&(m=C.length+m+p.length,m>u[c]&&(u[c]=m),h[c]=m),d[c]=y}o.splice(1,0,d),s.splice(1,0,h),f=-1;const g=[];for(;++f<o.length;){const v=o[f],C=s[f];c=-1;const p=[];for(;++c<a;){const m=v[c]||"";let y="",P="";if(n.alignDelimiters!==!1){const T=u[c]-(C[c]||0),E=l[c];E===114?y=" ".repeat(T):E===99?T%2?(y=" ".repeat(T/2+.5),P=" ".repeat(T/2-.5)):(y=" ".repeat(T/2),P=y):P=" ".repeat(T)}n.delimiterStart!==!1&&!c&&p.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&m==="")&&(n.delimiterStart!==!1||c)&&p.push(" "),n.alignDelimiters!==!1&&p.push(y),p.push(m),n.alignDelimiters!==!1&&p.push(P),n.padding!==!1&&p.push(" "),(n.delimiterEnd!==!1||c!==a-1)&&p.push("|")}g.push(n.delimiterEnd===!1?p.join("").replace(/ +$/,""):p.join(""))}return g.join(`
|
|
55
|
+
`)}function VC(e){return e==null?"":String(e)}function dd(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const qC=ms(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function WC(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),KC);return i(),o}function KC(e,t,n){return">"+(n?"":" ")+e}function GC(e,t){return pd(e,t.inConstruct,!0)&&!pd(e,t.notInConstruct,!1)}function pd(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function md(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const l=n.unsafe[i];if(l.character===`
|
|
56
|
+
`&&!l.before&&!l.after&&GC(n.stack,l))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
57
|
+
`}function YC(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>o&&(o=l):l=1,i=r+t.length,r=n.indexOf(t,i);return o}function XC(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function JC(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ZC(e,t,n,r){const i=JC(n),l=e.value||"";if(XC(e,n)){const c=n.enter("codeIndented"),d=n.indentLines(l,eE);return c(),d}const o=n.createTracker(r),s=i.repeat(Math.max(YC(l,i)+1,3)),u=n.enter("codeFenced"),a=i==="`"?"GraveAccent":"Tilde";let f=o.move(s);if(e.lang){const c=n.enter(`codeFencedLang${a}`);f+=o.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${a}`);f+=o.move(" "),f+=o.move(n.safe(e.meta,{before:f,after:`
|
|
58
|
+
`,encode:["`"],...o.current()})),c()}return f+=o.move(`
|
|
59
|
+
`),l&&(f+=o.move(l+`
|
|
60
|
+
`)),f+=o.move(s),u(),f}function eE(e,t,n){return(n?"":" ")+e}function Qc(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function tE(e,t,n,r){const i=Qc(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const u=n.createTracker(r);let a=u.move("[");return a+=u.move(n.safe(n.associationId(e),{before:a,after:"]",...u.current()})),a+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),a+=u.move("<"),a+=u.move(n.safe(e.url,{before:a,after:">",...u.current()})),a+=u.move(">")):(s=n.enter("destinationRaw"),a+=u.move(n.safe(e.url,{before:a,after:e.title?" ":`
|
|
61
|
+
`,...u.current()}))),s(),e.title&&(s=n.enter(`title${l}`),a+=u.move(" "+i),a+=u.move(n.safe(e.title,{before:a,after:i,...u.current()})),a+=u.move(i),s()),o(),a}function nE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Go(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function Vr(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function Yg(e){return"&#x"+e.toString(16).toUpperCase()+";"}function gd(e,t,n){const r=Un(e),i=Un(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function rE(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const s=e.charCodeAt(2);return s===45?2:s===91?5:Ne(s)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,l=e.charCodeAt(i);if(!Ne(l))return;for(;l===45||ze(l);)l=e.charCodeAt(++i);const o=e.slice(r,i).toLowerCase();return!n&&l!==47&&wa.includes(o)?1:Lg.includes(o)?6:7}const iE=new Map([["*",!1],["_",!0]]);function lE(e,t,n){const r=new Set;for(const l of e){const o=n.get(l);if(o&&l.attention&&t.some(s=>s.attention===l.attention))for(const s of o.tokens)r.add(s.attention)}const i=[];for(const l of e)l.attention&&r.delete(l.attention)&&i.push(l.attention);return i.reverse(),i}function Xg(e,t,n){const r=[],i=new Map,l=new Map;let o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}const s=e[o].value.charAt(0),u=iE.get(s);let a=o+1;for(;a<e.length&&e[a].attention&&e[a].value.charAt(0)===s;)a++;const f=o?e[o-1].value:t,c=Un(f.charCodeAt(f.length-1)),d=Un((a<e.length?e[a].value:n).charCodeAt(0)),h=!d||d===2&&!!c,g=!c||c===2&&!!d,v={tokens:e.slice(o,a),markers:[],start:0,end:0,open:u?h&&(!!c||!g):h,close:u?g&&(!!d||!h):g,split:u!==void 0};for(const C of v.tokens){i.set(C,[...v.tokens]),l.set(C,v);let p=C.value.length;for(;p--;)v.markers.push(C)}v.end=v.markers.length,r.push(v),o=a}for(sE(r,i),o=-1;++o<e.length;){const s=i.get(e[o]);if(s)return{attention:lE(e,s,l),index:o}}}function Xl(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?Go(n.value):Vr(n.value),i=Yg(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let l=n.value.slice(0,n.value.length-r.length),o=0;for(;l.charCodeAt(l.length-1-o)===92;)o++;o%2&&(l+="\\"),n.value=l+i}}function oE(e,t,n,r,i){for(const l of n.attention){const o=t.get(l)||l.sequences[0];for(const s of l.sequences){if(s===o)continue;const u=new Map(t);u.set(l,s);const a=qc(e,u,r,i),f=Xg(a,r,i);if(!f||f.index>n.index)return{chosen:u,mistake:f,tokens:a}}}}function sE(e,t){const n=new Map;for(const r of e){const i=r.tokens[0].value.charAt(0);let l=n.get(i);l||(l=[],n.set(i,l));let o=r.close?l.length:0;for(;o--&&r.start<r.end;){const s=l[o],u=s.end-s.start,a=r.end-r.start;if(r.split?(s.close||r.open)&&a%3&&!((u+a)%3):u!==s.markers.length||u!==a)continue;const f=r.split?u>1&&a>1?2:1:a,c=s.markers.slice(s.end-f,s.end),d=r.markers.slice(r.start,r.start+f),h=c[0],g=d[0];if(h===c[f-1]&&h.value.length===f&&g===d[f-1]&&g.value.length===f&&h.attention===g.attention)t.delete(h),t.delete(g);else{const v=[...new Set([...c,...d])];for(const C of v){const p=t.get(C);p&&p.push(...v)}}s.end-=f,r.start+=f,s.start===s.end&&l.splice(o,1),o=l.length}r.open&&r.start<r.end&&l.push(r)}}function uE(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Eg(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const l of n)r.push(i.repeat(l))}return r}function aE(e,t,n){const r=t.indexStack,i=e.children||[],l=[];let o=-1,s=n.before;r.push(-1);let u=t.createTracker(n);for(;++o<i.length;){const a=i[o];let f;if(r[r.length-1]=o,o+1<i.length){let h=t.handle.handlers[i[o+1].type];h&&h.peek&&(h=h.peek),f=h?Go(h(i[o+1],e,t,{before:"",after:"",...u.current()})):""}else f=n.after;const c=l[l.length-1];typeof c=="string"&&(s==="\r"||s===`
|
|
62
|
+
`)&&a.type==="html"&&rE(a.value)!==7&&(l[l.length-1]=c.replace(/(\r?\n|\r)$/," "),s=" ",u=t.createTracker(n),u.move(ys(l,n.before,n.after)));const d=t.handle.handlers[a.type];if(d&&d.attention){const h=Vc(a,d.attention,t,u);l.push(h),s=Vr(h.sequences[0])}else{const h=t.handle(a,e,t,{...u.current(),after:f,before:s});if(!h)continue;u.move(h),l.push(h),s=Vr(h)}}return r.pop(),l}function Vc(e,t,n,r){const{construct:i,markers:l,sizes:o}=t(e,n),s=uE(e.type,l,o),u=s[0],a=n.enter(i);r.move(u);const f=aE(e,n,{...r.current(),before:u,after:u});return r.move(ys(f,u,u)),r.move(u),a(),{children:f,sequences:s}}function qc(e,t,n,r){const i=[];let l,o=Vr(n),s=-1;for(;++s<e.length;){const u=e[s];if(typeof u=="string"){const y={value:u,attention:void 0};l&&l===Go(u)&&Xl([y],!0),l=void 0,i.push(y),y.value&&(o=Vr(y.value));continue}const a=t.get(u)||u.sequences[0],f=a.charAt(0),c=e[s+1],d=o,h=Go(c===void 0?r:typeof c=="string"?c:t.get(c)||c.sequences[0]),g=qc(u.children,t,a,a),v=g.length>0?g[0].value:"",C=gd(d.charCodeAt(d.length-1),v.charCodeAt(0),f);C.inside&&Xl(g,!0);const p=g.length>0?Vr(g[g.length-1].value):"",m=gd(h.charCodeAt(0),p.charCodeAt(p.length-1),f);m.inside&&Xl(g,!1),C.outside&&d!==`
|
|
63
|
+
`&&d!=="\r"&&Xl(i,!1),m.outside&&(l=h),i.push({value:a,attention:u},...g,{value:a,attention:u}),o=a.charAt(a.length-1)}return i}function ys(e,t,n){let r=new Map;const i=qc(e,r,t,n);let l=i,o=Xg(l,t,n);for(;o;){const u=oE(e,r,o,t,n);if(!u){l=i;break}r=u.chosen,l=u.tokens,o=u.mistake}let s="";for(const u of l)s+=u.value;return s}Wc.attention=Jg;Wc.peek=cE;function Wc(e,t,n,r){const i=n.enter("phrasing"),l=Vc(e,Jg,n,n.createTracker(r)),o=ys([l],r.before,r.after);return i(),o}function Jg(e,t){return{construct:"emphasis",markers:nE(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function cE(e,t,n){return n.options.emphasis||"*"}function fE(e,t){let n=!1;return Uc(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,mo}),!!((!e.depth||e.depth<3)&&Ac(e)&&(t.options.setext||n))}function hE(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(fE(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...l.current(),before:`
|
|
64
|
+
`,after:`
|
|
65
|
+
`});return d(),c(),h+`
|
|
66
|
+
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
67
|
+
`))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),u=n.enter("phrasing");l.move(o+" ");let a=n.containerPhrasing(e,{before:"# ",after:`
|
|
68
|
+
`,...l.current()});const f=a.charCodeAt(0);return(f===9||f===32)&&(a=Yg(f)+a.slice(1)),a=a?o+" "+a:o,n.options.closeAtx&&(a+=" "+o),u(),s(),a}Zg.peek=dE;function Zg(e){return e.value||""}function dE(){return"<"}ey.peek=pE;function ey(e,t,n,r){const i=Qc(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const u=n.createTracker(r);let a=u.move("![");return a+=u.move(n.safe(e.alt,{before:a,after:"]",...u.current()})),a+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),a+=u.move("<"),a+=u.move(n.safe(e.url,{before:a,after:">",...u.current()})),a+=u.move(">")):(s=n.enter("destinationRaw"),a+=u.move(n.safe(e.url,{before:a,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${l}`),a+=u.move(" "+i),a+=u.move(n.safe(e.title,{before:a,after:i,...u.current()})),a+=u.move(i),s()),a+=u.move(")"),o(),a}function pE(){return"!"}ty.peek=mE;function ty(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("![");const a=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(a+"]["),o();const f=n.stack;n.stack=f.filter(function(d){return d!=="phrasing"}),o=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!a||a!==c?u+=s.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function mE(){return"!"}ny.peek=gE;function ny(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const o=n.unsafe[l],s=n.compilePattern(o);if(!o.atBreak)continue;let u;for(;u=s.exec(r);){let a=u.index;r.charCodeAt(a)===10&&r.charCodeAt(a-1)===13&&a--,r=r.slice(0,a)+" "+r.slice(u.index+1)}}return i+r+i}function gE(){return"`"}function ry(e,t){const n=Ac(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}iy.peek=yE;function iy(e,t,n,r){const i=Qc(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);if(ry(e,n)){const g=n.stack;n.stack=g.filter(function(p){return p!=="phrasing"});const v=n.enter("autolink");let C=o.move("<");return C+=o.move(n.containerPhrasing(e,{before:C,after:">",...o.current()})),C+=o.move(">"),v(),n.stack=g,C}const s=n.enter("link");let u=n.enter("label"),a=o.move("[");const f=n.containerPhrasing(e,{before:a,after:"](",...o.current()});a+=o.move(f),u(),a+=o.move("](");const c=/[\0- \u007F]/.test(e.url),d=r.before.charAt(r.before.length-1);let h=e.title||void 0;if(!h&&!c&&(d===`
|
|
69
|
+
`||d==="\r")){let g=0;for(;g<f.length&&f.charCodeAt(g)!==93;)g+=f.charCodeAt(g)===92?2:1;f.charCodeAt(g+1)===58&&(h="")}return!e.url&&typeof h=="string"||c?(u=n.enter("destinationLiteral"),a+=o.move("<"),a+=o.move(n.safe(e.url,{before:a,after:">",...o.current()})),a+=o.move(">")):(u=n.enter("destinationRaw"),a+=o.move(n.safe(e.url,{before:a,after:typeof h=="string"?" ":")",...o.current()}))),u(),typeof h=="string"&&(u=n.enter(`title${l}`),a+=o.move(" "+i),a+=o.move(n.safe(h,{before:a,after:i,...o.current()})),a+=o.move(i),u()),a+=o.move(")"),s(),a}function yE(e,t,n){return ry(e,n)?"<":"["}ly.peek=vE;function ly(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("[");const a=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(a+"]["),o();const f=n.stack;n.stack=f.filter(function(d){return d!=="phrasing"}),o=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!a||a!==c?u+=s.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function vE(){return"["}function Kc(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function kE(e){const t=Kc(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function xE(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function oy(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function wE(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?xE(n):Kc(n);const s=e.ordered?o==="."?")":".":kE(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),oy(n)===o&&f){let c=-1;for(;++c<e.children.length;){const d=e.children[c];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),n.bulletCurrent=o;const a=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),a}function SE(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function CE(e,t,n,r){const i=SE(n);let l=n.bulletCurrent||Kc(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(o-l.length)),s.shift(o);const u=n.enter("listItem"),a=n.indentLines(n.containerFlow(e,s.current()),f);return u(),a;function f(c,d,h){return d?(h?"":" ".repeat(o))+c:(h?l:l+" ".repeat(o-l.length))+c}}function EE(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}function PE(e,t,n,r){if(!e.children.some(function(s){return qC(s)}))return n.containerFlow(e,r);const l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),o}function bE(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gc.attention=sy;Gc.peek=TE;function Gc(e,t,n,r){const i=n.enter("phrasing"),l=Vc(e,sy,n,n.createTracker(r)),o=ys([l],r.before,r.after);return i(),o}function sy(e,t){return{construct:"strong",markers:bE(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function TE(e,t,n){return n.options.strong||"*"}function _E(e,t,n,r){const i=t?t.children:[],l=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[l+1],beforeNode:i[l-1]})}function jE(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function IE(e,t,n){const r=(oy(n)+(n.options.ruleSpaces?" ":"")).repeat(jE(n));return n.options.ruleSpaces?r.slice(0,-1):r}const uy={blockquote:WC,break:md,code:ZC,definition:tE,emphasis:Wc,hardBreak:md,heading:hE,html:Zg,image:ey,imageReference:ty,inlineCode:ny,link:iy,linkReference:ly,list:wE,listItem:CE,paragraph:EE,root:PE,strong:Gc,text:_E,thematicBreak:IE};function NE(){return{enter:{table:zE,tableData:yd,tableHeader:yd,tableRow:AE},exit:{codeText:FE,table:LE,tableData:uu,tableHeader:uu,tableRow:uu}}}function zE(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function LE(e){this.exit(e),this.data.inTable=void 0}function AE(e){this.enter({type:"tableRow",children:[]},e)}function uu(e){this.exit(e)}function yd(e){this.enter({type:"tableCell",children:[]},e)}function FE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,RE));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function RE(e,t){return t==="|"?t:e}function DE(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
70
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:u,tableRow:s}};function o(h,g,v,C){return a(f(h,v,C),h.align)}function s(h,g,v,C){const p=c(h,v,C),m=a([p]);return m.slice(0,m.indexOf(`
|
|
71
|
+
`))}function u(h,g,v,C){const p=v.enter("tableCell"),m=v.enter("phrasing"),y=v.containerPhrasing(h,{...C,before:l,after:l});return m(),p(),y}function a(h,g){return QC(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,v){const C=h.children;let p=-1;const m=[],y=g.enter("table");for(;++p<C.length;)m[p]=c(C[p],g,v);return y(),m}function c(h,g,v){const C=h.children;let p=-1;const m=[],y=g.enter("tableRow");for(;++p<C.length;)m[p]=u(C[p],h,g,v);return y(),m}function d(h,g,v){let C=uy.inlineCode(h,g,v);return v.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function OE(){return{exit:{taskListCheckValueChecked:vd,taskListCheckValueUnchecked:vd,paragraph:BE}}}function ME(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UE}}}function vd(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function BE(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function UE(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let u=uy.listItem(e,t,n,{...r,...s.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,a)),u;function a(f){return f+o}}function $E(){return[hC(),LC(),DC(),NE(),OE()]}function HE(e){return{extensions:[dC(),AC(e),OC(),DE(e),ME()]}}const QE={tokenize:YE,partial:!0},ay={tokenize:XE,partial:!0},cy={tokenize:JE,partial:!0},fy={tokenize:ZE,partial:!0},VE={tokenize:eP,partial:!0},hy={name:"wwwAutolink",tokenize:KE,previous:py},dy={name:"protocolAutolink",tokenize:GE,previous:my},cn={name:"emailAutolink",tokenize:WE,previous:gy},Wt={};function qE(){return{text:Wt}}let qn=48;for(;qn<123;)Wt[qn]=cn,qn++,qn===58?qn=65:qn===91&&(qn=97);Wt[43]=cn;Wt[45]=cn;Wt[46]=cn;Wt[95]=cn;Wt[72]=[cn,dy];Wt[104]=[cn,dy];Wt[87]=[cn,hy];Wt[119]=[cn,hy];function WE(e,t,n){const r=this;let i,l;return o;function o(c){return!_a(c)||!gy.call(r,r.previous)||Yc(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return _a(c)?(e.consume(c),s):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(VE,f,a)(c):c===45||c===95||ze(c)?(l=!0,e.consume(c),u):f(c)}function a(c){return e.consume(c),i=!0,u}function f(c){return l&&i&&Ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function KE(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!py.call(r,r.previous)||Yc(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(QE,e.attempt(ay,e.attempt(cy,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function GE(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&my.call(r,r.previous)&&!Yc(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Ne(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),l?a:(l=!0,u)):n(c)}function a(c){return c===null||Vo(c)||oe(c)||yr(c)||hs(c)?n(c):e.attempt(ay,e.attempt(cy,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function YE(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function XE(e,t,n){let r,i,l;return o;function o(a){return a===46||a===95?e.check(fy,u,s)(a):a===null||oe(a)||yr(a)||a!==45&&hs(a)?u(a):(l=!0,e.consume(a),o)}function s(a){return a===95?r=!0:(i=r,r=void 0),e.consume(a),o}function u(a){return i||r||!l?n(a):t(a)}}function JE(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(fy,t,l)(o):o===null||oe(o)||yr(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function ZE(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||oe(s)||yr(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||oe(s)||yr(s)?t(s):r(s)}function l(s){return Ne(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Ne(s)?(e.consume(s),o):n(s)}}function eP(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return ze(l)?n(l):t(l)}}function py(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function my(e){return!Ne(e)}function gy(e){return!(e===47||_a(e))}function _a(e){return e===43||e===45||e===46||e===95||ze(e)}function Yc(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const tP={tokenize:aP,partial:!0};function nP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oP,continuation:{tokenize:sP},exit:uP}},text:{91:{name:"gfmFootnoteCall",tokenize:lP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rP,resolveTo:iP}}}}function rP(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return n(u);const a=Nt(r.sliceSerialize({start:o.end,end:r.now()}));return a.codePointAt(0)!==94||!l.includes(a.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function iP(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function lP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",a)}function a(c){if(l>999||c===93&&!o||c===null||c===91||oe(c))return n(c);if(c===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Nt(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return oe(c)||(o=!0),l++,e.consume(c),c===92?f:a}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,a):a(c)}}function oP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),a}function a(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(o>999||g===93&&!s||g===null||g===91||oe(g))return n(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return l=Nt(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return oe(g)||(s=!0),o++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),o++,f):f(g)}function d(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(l)||i.push(l),te(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function sP(e,t,n){return e.check(Tl,t,e.attempt(tP,t,n))}function uP(e){e.exit("gfmFootnoteDefinition")}function aP(e,t,n){const r=this;return te(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function cP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let a=u;for(;a--;)if(o[a][0]==="exit"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[a][1].end.offset-o[a][1].start.offset){o[u][1].type="strikethroughSequence",o[a][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[a][1].start),end:Object.assign({},o[u][1].end)},c={type:"strikethroughText",start:Object.assign({},o[a][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",f,s],["enter",o[a][1],s],["exit",o[a][1],s],["enter",c,s]],h=s.parser.constructs.insideSpan.null;h&&It(d,d.length,0,ds(h,o.slice(a+1,u),s)),It(d,d.length,0,[["exit",c,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",f,s]]),It(o,a-1,u-a+3,d),u=a+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function l(o,s,u){const a=this.previous,f=this.events;let c=0;return d;function d(g){return a===126&&f[f.length-1][1].type!=="characterEscape"?u(g):(o.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const v=Un(a);if(g===126)return c>1?u(g):(o.consume(g),c++,h);if(c<2&&!n)return u(g);const C=o.exit("strikethroughSequenceTemporary"),p=Un(g);return C._open=!p||p===2&&!!v,C._close=!v||v===2&&!!p,s(g)}}}class fP{constructor(){this.map=[],this.index=new Map}add(t,n,r){hP(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0,this.index.clear()}}function hP(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const l=[t,n,r];e.map.push(l),e.index.set(t,l)}function dP(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function pP(){return{flow:{null:{name:"table",tokenize:mP,resolveAll:gP}}}}function mP(e,t,n){const r=this;let i=0,l=0,o;return s;function s(b){let A=r.events.length-1;for(;A>-1;){const{type:se}=r.events[A][1];if(se==="lineEnding"||se==="linePrefix")A--;else break}const O=A>-1?r.events[A][1].type:null,J=O==="tableHead"||O==="tableRow"?E:u;return J===E&&r.parser.lazy[r.now().line]?n(b):J(b)}function u(b){return e.enter("tableHead"),e.enter("tableRow"),a(b)}function a(b){return b===124||(o=!0,l+=1),f(b)}function f(b){return b===null?n(b):$(b)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):n(b):W(b)?te(e,f,"whitespace")(b):(l+=1,o&&(o=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(b)))}function c(b){return b===null||b===124||oe(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?d:c)}function d(b){return b===92||b===124?(e.consume(b),c):c(b)}function h(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),o=!1,W(b)?te(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):g(b))}function g(b){return b===45||b===58?C(b):b===124?(o=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),v):T(b)}function v(b){return W(b)?te(e,C,"whitespace")(b):C(b)}function C(b){return b===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),p):b===45?(l+=1,p(b)):b===null||$(b)?P(b):T(b)}function p(b){return b===45?(e.enter("tableDelimiterFiller"),m(b)):T(b)}function m(b){return b===45?(e.consume(b),m):b===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(b))}function y(b){return W(b)?te(e,P,"whitespace")(b):P(b)}function P(b){return b===124?g(b):b===null||$(b)?!o||i!==l?T(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):T(b)}function T(b){return n(b)}function E(b){return e.enter("tableRow"),I(b)}function I(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),I):b===null||$(b)?(e.exit("tableRow"),t(b)):W(b)?te(e,I,"whitespace")(b):(e.enter("data"),j(b))}function j(b){return b===null||b===124||oe(b)?(e.exit("data"),I(b)):(e.consume(b),b===92?M:j)}function M(b){return b===92||b===124?(e.consume(b),j):j(b)}}function gP(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,a,f,c;const d=new fP;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(s=!1,u!==0&&(kd(d,t,u,a,f),f=void 0,u=0),a={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(n,0,[["enter",a,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=Jl(d,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=Jl(d,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):g.type==="tableHead"?(s=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,l[1]!==0?(o[0]=o[1],c=Jl(d,t,l,i,n,c)):o[1]!==0&&(c=Jl(d,t,o,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&kd(d,t,u,a,f),d.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=dP(t.events,n))}return e}function Jl(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},Pr(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const u=Pr(t.events,n[1]);if(l={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const a=Pr(t.events,n[2]),f=Pr(t.events,n[3]),c={type:s,start:Object.assign({},a),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const d=t.events[n[2]],h=t.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,v=n[3]-n[2]-1;e.add(g,v,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},Pr(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function kd(e,t,n,r,i){const l=[],o=Pr(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function Pr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const yP={name:"tasklistCheck",tokenize:kP};function vP(){return{text:{91:yP}}}function kP(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),l)}function l(u){return oe(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return $(u)?t(u):W(u)?e.check({tokenize:xP},t,n)(u):n(u)}}function xP(e,t,n){return te(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function wP(e){return Sg([qE(),nP(),cP(e),pP(),vP()])}const SP={};function CP(e){const t=this,n=e||SP,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(wP(n)),l.push($E()),o.push(HE(n))}function yy({text:e}){return x.jsx("div",{className:"markdown",children:x.jsx(lC,{remarkPlugins:[CP],components:{a:({href:t,children:n})=>x.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:n})},children:e})})}const EP=24,xd=e=>e.replace(/\.[^./]+$/,""),yo=e=>e.split("/").slice(-2).join("/");function PP(e){const t=new Set(e.filter(o=>o.mime==="text/markdown").map(o=>xd(o.name))),n=[],r=[],i=[],l=[];for(const o of e)o.mime.startsWith("image/")?/-raw\.png$/.test(o.name)||n.push(o):o.mime==="text/markdown"?r.push(o):/^game\/v\d+\/report\.json$/.test(o.name)?i.push(o):o.mime==="application/json"&&t.has(xd(o.name))||l.push(o);return{images:n,markdown:r,reports:i,other:l}}function vy({artifacts:e}){const[t,n]=K.useState(!1),{images:r,markdown:i,reports:l,other:o}=PP(e),s=t?r:r.slice(0,EP);return x.jsxs("div",{className:"artifacts",children:[l.map(u=>x.jsx(TP,{artifact:u},u.id)),r.length>0&&x.jsxs("div",{className:"image-grid",children:[s.map(u=>x.jsxs("a",{href:qt(u.id),target:"_blank",rel:"noopener",title:u.name,children:[x.jsx("img",{src:qt(u.id),alt:yo(u.name),loading:"lazy"}),x.jsx("span",{children:yo(u.name)})]},u.id)),r.length>s.length&&x.jsxs("button",{type:"button",className:"secondary",onClick:()=>n(!0),children:["Show all ",r.length]})]}),i.map(u=>x.jsx(bP,{artifact:u},u.id)),o.length>0&&x.jsx("p",{className:"files",children:o.map(u=>x.jsx("a",{href:qt(u.id),target:"_blank",rel:"noopener",download:u.mime==="application/json"||u.mime.startsWith("image/")?void 0:u.name.split("/").pop(),children:yo(u.name)},u.id))})]})}function bP({artifact:e}){const[t,n]=K.useState(!1),r=On({queryKey:["artifact-text",e.id],queryFn:async()=>(await fetch(qt(e.id))).text(),enabled:t,staleTime:1/0});return x.jsxs("details",{className:"doc",onToggle:i=>n(i.currentTarget.open),children:[x.jsx("summary",{children:yo(e.name)}),r.data?x.jsx(yy,{text:r.data}):x.jsx("p",{className:"muted",children:"Loading…"})]})}function TP({artifact:e}){var i,l;const n=On({queryKey:["artifact-json",e.id],queryFn:()=>gr(qt(e.id)),staleTime:1/0}).data;if(!n)return null;const r=(i=n.levels)==null?void 0:i.filter(o=>o.cleared).length;return x.jsxs("div",{className:"build-report",children:[x.jsxs("div",{className:"build-head",children:[x.jsxs("strong",{children:[n.title," · build v",n.version]}),x.jsx("span",{className:n.passed?"ok":"warn",children:n.passed?"all checks passed":"some checks failed"})]}),x.jsxs("p",{className:"muted",children:[n.levels&&`${r}/${n.levels.length} levels cleared by the bot`,((l=n.qa)==null?void 0:l.count)!==void 0&&` · QA ${n.qa.count-(n.qa.failed??0)}/${n.qa.count} pass`]}),n.play&&x.jsxs("p",{className:"play-links",children:[x.jsxs("a",{className:"button",href:n.play,target:"_blank",rel:"noopener",children:["▶ Play v",n.version]}),!!n.sounds&&x.jsx("a",{href:n.play.replace(/index\.html$/,"sounds.html"),target:"_blank",rel:"noopener",children:"Edit the sounds"})]}),n.levels&&x.jsx("ul",{className:"levels",children:n.levels.map(o=>x.jsxs("li",{children:[o.cleared?"✔":"✖"," Level ",o.n,": ",o.name," ",o.play&&x.jsx("a",{href:o.play,target:"_blank",rel:"noopener",children:"play"})]},o.n))})]})}const _P=new Set(["concept","assets","gameplay","design","menus","playtest","final"]),jP={pending:"Waiting for you",approved:"Approved",changes_requested:"Changes requested",aborted:"Stopped",superseded:"Replaced by a newer version"};function IP(e){var n,r;const t={};for(const[i,l]of Object.entries(ja(e))){const s=((r=(n=e.response)==null?void 0:n.form)==null?void 0:r[i])??l.default??(l.type==="boolean"?!1:"");t[i]=typeof s=="boolean"?s:String(s)}return t}function ja(e){return e.form_schema.title==="Feedback"?{}:e.form_schema.properties??{}}function NP({name:e,rule:t,value:n,disabled:r,onChange:i}){const l=t.title||e;let o;if(t.enum)o=x.jsx("select",{"aria-label":l,value:String(n),disabled:r,onChange:s=>i(s.target.value),children:t.enum.map(s=>x.jsx("option",{children:s},s))});else if(t.type==="boolean")o=x.jsx("input",{type:"checkbox","aria-label":l,checked:!!n,disabled:r,onChange:s=>i(s.target.checked)});else{const s=t.format==="color"?"color":["integer","number"].includes(t.type??"")?"number":"text";o=x.jsx("input",{type:s,"aria-label":l,value:String(n),disabled:r,onChange:u=>i(u.target.value)})}return x.jsxs("div",{className:"field",children:[x.jsxs("label",{children:[x.jsx("span",{children:l}),o]}),t.description&&x.jsx("p",{className:"hint",children:t.description}),t.suggestions&&t.format!=="color"&&!r&&x.jsx("div",{className:"chips",children:t.suggestions.map(s=>x.jsx("button",{type:"button",className:n===s?"chip on":"chip",onClick:()=>i(s),children:s},s))})]})}function zP(e){let t=0;for(let n=0;n<e.length-1;n++){const r=e[n];if(r==="(")t++;else if(r===")")t=Math.max(0,t-1);else if(t===0&&(r===":"||r===".")&&e[n+1]===" ")return[e.slice(0,n),e.slice(n+2)]}return[e,""]}function LP({runId:e,gate:t,artifacts:n,queued:r=[]}){var y;const i=un(),[l,o]=K.useState(()=>IP(t)),[s,u]=K.useState(((y=t.response)==null?void 0:y.text)??""),a=t.status==="pending",f=pi({mutationFn:P=>{const T={};for(const[E,I]of Object.entries(ja(t))){const j=l[E];T[E]=["integer","number"].includes(I.type??"")?Number(j):j}return Pl(`/api/runs/${e}/gates/${t.id}?wait=false`,{action:P,text:s,form:T})},onSuccess:()=>i.invalidateQueries({queryKey:["run",e]})}),c=t.empty_feedback_approves,d=t.stage==="confirm",h=t.kind!=="confirm_changes"&&_P.has(t.stage),g=f.isPending,[v,C]=zP(t.title),p=a&&h?r:[],m=p.length&&!s.trim()?`Build with ${p.length} change${p.length>1?"s":""}`:"Request changes";return x.jsxs("section",{className:`gate-card ${a?"open":""}`,"aria-label":v,children:[x.jsxs("header",{children:[x.jsx("h3",{children:v}),x.jsx("span",{className:`gate-status gate-${t.status}`,children:jP[t.status]})]}),C&&x.jsx("p",{className:"gate-text",children:C}),n.length>0&&x.jsx(vy,{artifacts:n}),x.jsxs("form",{onSubmit:P=>{P.preventDefault();const T=P.nativeEvent.submitter;f.mutate((T==null?void 0:T.value)??(c?"submit":"approve"))},children:[Object.entries(ja(t)).map(([P,T])=>x.jsx(NP,{name:P,rule:T,value:l[P],disabled:!a||g,onChange:E=>o(I=>({...I,[P]:E}))},P)),p.length>0&&x.jsxs("section",{className:"queued","aria-label":"Changes from the chats",children:[x.jsxs("p",{className:"hint",children:["From the agent chats, applied with ",m,":"]}),x.jsx("ul",{children:p.map(P=>x.jsxs("li",{children:[x.jsxs("strong",{children:[P.agent,":"]})," ",P.text]},P.id))})]}),(a||s)&&x.jsx("textarea",{"aria-label":"Feedback",placeholder:d?"Type what the Director got wrong, or leave empty to approve the plan":c?"Type what to change, or leave empty to approve":"Feedback (optional)",value:s,rows:2,disabled:!a||g,onChange:P=>u(P.target.value)}),a&&x.jsx("div",{className:"actions",children:c?x.jsxs(x.Fragment,{children:[p.length>0&&!s.trim()&&x.jsx("button",{type:"submit",value:"request_changes",className:"secondary",disabled:g,children:m}),x.jsx("button",{type:"submit",value:"submit",disabled:g,children:s.trim()?d?"Correct the plan":"Send feedback (new version)":d?"Approve the plan":"Approve"})]}):x.jsxs(x.Fragment,{children:[h&&x.jsx("button",{type:"submit",value:"request_changes",className:"secondary",disabled:g||!s.trim()&&!p.length,children:m}),x.jsx("button",{type:"submit",value:"approve",disabled:g,children:"Approve"})]})}),f.error&&x.jsx("p",{className:"error",children:f.error.message})]})]})}const AP={entry:"Plan · before I start",exit:"Report · after my work"};function FP({report:e}){return x.jsxs("section",{className:`report-card report-${e.stage}`,"aria-label":e.title,children:[x.jsxs("header",{children:[x.jsx("h3",{children:e.title}),x.jsx("span",{className:"report-kind",children:AP[e.stage]})]}),e.sections.map(t=>{const n=t.numbered?"ol":"ul";return x.jsxs("div",{className:"report-section",children:[x.jsx("h4",{children:t.title}),x.jsx(n,{children:t.points.map((r,i)=>x.jsx("li",{children:r},i))})]},t.title)})]})}function RP(e){const t=[];for(const n of e){const r=t[t.length-1];n.kind==="artifact"?(r==null?void 0:r.kind)==="artifacts"?r.artifacts.push(n.artifact):t.push({kind:"artifacts",id:n.id,artifacts:[n.artifact]}):t.push({kind:"item",item:n})}return t}const DP={"run.created":"Project started","run.completed":"Finished","run.retry_requested":"Retrying","game.built":"A build is ready"},OP={queued:"change request · queued",applied:"change request · applied",unplaced:"change request · not filed"};function MP({runId:e,item:t,queued:n}){switch(t.kind){case"chat":return x.jsxs("div",{className:`bubble ${t.role} ${t.error?"failed":""}`,children:[t.role==="agent"?x.jsx(yy,{text:t.text}):x.jsx("p",{children:t.text}),t.rewind&&x.jsx(Hk,{runId:e,card:t.rewind}),t.role==="user"&&t.intent&&t.intent!=="idea"&&x.jsx("span",{className:`intent ${t.status??""}`,children:t.intent==="change"?OP[t.status??""]??"change request":"question"})]});case"progress":return x.jsx("p",{className:"progress",children:t.text});case"report":return x.jsx(FP,{report:t.report});case"reference":return x.jsxs("div",{className:"bubble user reference",children:[x.jsx("a",{href:qt(t.reference.id),target:"_blank",rel:"noopener",children:x.jsx("img",{src:qt(t.reference.id),alt:t.reference.file})}),x.jsxs("p",{children:["Reference ",t.reference.everyone?"for every agent":`for the ${t.reference.agent}`,":"," ",t.reference.file]}),x.jsx("span",{className:"intent",children:og(t.reference.agent)})]});case"gate":return x.jsx(LP,{runId:e,gate:t.gate,artifacts:t.artifacts,queued:t.gate.status==="pending"?n:[]},`${t.gate.id}-${t.gate.status}`);case"gate_response":{const r=t.status==="approved"?"Approved":t.status==="changes_requested"?"Changes requested":t.status;return x.jsx("div",{className:"bubble user",children:x.jsx("p",{children:r+(t.text?`: ${t.text}`:"")+(t.chat?` (${t.chat} from the agent chats)`:"")})})}case"run":return x.jsx("p",{className:`milestone ${t.type==="run.failed"?"error":""}`,children:t.type==="run.failed"?`Stopped: ${t.message??"an error"}`:t.type==="round.rewound"||t.type==="run.paused"?t.message??"Went back":DP[t.type]??t.type});default:return null}}const BP="Check that ";function UP({runId:e,agent:t,working:n,queued:r}){var v;const i=un(),l=On({queryKey:["run",e,"thread",t],queryFn:()=>gr(`${Eh(e,t)}/thread`)}),[o,s]=K.useState(""),u=pi({mutationFn:C=>Pl(`${Eh(e,t)}/messages`,{text:C}),onSuccess:()=>i.invalidateQueries({queryKey:["run",e]})}),a=K.useRef(null),f=K.useRef(null),[c,d]=K.useState(null),h=((v=l.data)==null?void 0:v.items.length)??0;K.useEffect(()=>{var C;(C=a.current)==null||C.scrollIntoView({block:"end"})},[h,u.isPending,t]);const g=()=>{const C=o.trim();!C||u.isPending||(s(""),u.mutate(C))};return x.jsxs("section",{className:"chat","aria-label":`Chat with ${t}`,children:[x.jsxs("div",{className:"thread",children:[l.isPending&&x.jsx("p",{className:"muted",children:"Loading…"}),l.data&&h===0&&x.jsxs("p",{className:"muted",children:["The ",t," has not started yet. Anything you tell it is kept for when it does."]}),l.data&&RP(l.data.items).map(C=>C.kind==="artifacts"?x.jsx(vy,{artifacts:C.artifacts},`a${C.id}`):x.jsx(MP,{runId:e,item:C.item,queued:r},C.item.id)),u.isPending&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"bubble user",children:x.jsx("p",{children:u.variables})}),x.jsxs("p",{className:"progress typing",children:[t," is answering…"]})]}),n&&!u.isPending&&x.jsxs("p",{className:"progress typing",children:[t," is working…"]}),u.error&&x.jsx("p",{className:"error",children:u.error.message}),x.jsx("div",{ref:a})]}),c&&x.jsx("div",{className:"composer-tools",children:x.jsx(sg,{runId:e,agent:t,file:c,onDone:()=>d(null)})}),t==="QA Playtester"&&x.jsxs("div",{className:"composer-tools",children:[x.jsx("button",{type:"button",className:"chip",onClick:()=>{var C;o.trim()||s(BP),(C=f.current)==null||C.focus()},children:"+ Suggest a check"}),x.jsx("span",{className:"hint",children:"I write it as a test of the game and run it on every build from the next one."})]}),x.jsxs("form",{className:"composer",onSubmit:C=>{C.preventDefault(),g()},children:[x.jsxs("label",{className:"attach",title:"Add a reference image",children:[x.jsx("span",{"aria-hidden":"true",children:"📎"}),x.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp,image/gif","aria-label":`Attach a reference image for the ${t}`,onChange:C=>{var m;const p=(m=C.target.files)==null?void 0:m[0];p&&d(p),C.target.value=""}})]}),x.jsx("textarea",{ref:f,"aria-label":`Message ${t}`,placeholder:`Message ${t}…`,value:o,rows:2,onChange:C=>s(C.target.value),onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&!C.nativeEvent.isComposing&&(C.preventDefault(),g())}}),x.jsx("button",{type:"submit",disabled:!o.trim()||u.isPending,children:"Send"})]})]})}function $P(e,t){const n=un(),r=t!==void 0;K.useEffect(()=>{if(!r)return;let i;const l=()=>{window.clearTimeout(i),i=window.setTimeout(()=>{n.invalidateQueries({queryKey:["run",e]})},250)},o=new EventSource(`/api/runs/${e}/events?after=${t}`);return o.onmessage=l,o.addEventListener("done",()=>{l(),o.close()}),o.addEventListener("worker-error",()=>{l(),o.close()}),()=>{window.clearTimeout(i),o.close()}},[e,r,n])}const Zl=e=>`$${e.toFixed(2)}`;function HP({state:e,agent:t,mock:n}){const r=e.agents.reduce((l,o)=>({cost:l.cost+o.cost,calls:l.calls+o.calls,images:l.images+o.images}),{cost:0,calls:0,images:0}),i=e.agents.find(l=>l.name===t);return x.jsxs("section",{className:"panel","aria-label":"Cost",children:[x.jsx("h2",{children:"Cost"}),n&&x.jsx("p",{className:"muted",children:"Offline: stand-in models, nothing is charged. Costs are estimates."}),x.jsxs("dl",{children:[x.jsx("dt",{children:"Project"}),x.jsx("dd",{children:Zl(r.cost)}),x.jsx("dt",{children:"Model calls"}),x.jsx("dd",{children:r.calls}),x.jsx("dt",{children:"Images"}),x.jsx("dd",{children:r.images})]}),i&&x.jsxs(x.Fragment,{children:[x.jsx("h3",{children:t}),x.jsxs("dl",{children:[x.jsx("dt",{children:"Cost"}),x.jsx("dd",{children:Zl(i.cost)}),x.jsx("dt",{children:"Calls"}),x.jsx("dd",{children:i.calls}),x.jsx("dt",{children:"Files"}),x.jsx("dd",{children:i.artifacts})]}),e.agent_cap!=null&&x.jsxs("div",{className:"allowance",children:[x.jsxs("p",{children:[Zl(i.allowance)," of ",Zl(e.agent_cap)," since your last action"]}),x.jsx("meter",{min:0,max:e.agent_cap,value:i.allowance,"aria-label":"Allowance used"}),x.jsx("p",{className:"muted",children:"Its loops go on while they improve, until this allowance is used up."})]})]})]})}function QP({runId:e,agent:t}){var a,f,c,d,h;const n=On({queryKey:["run",e,"agents"],queryFn:()=>gr(`/api/runs/${e}/agents`),refetchInterval:g=>{var v;return(v=g.state.data)!=null&&v.busy?3e3:!1}}),r=On({queryKey:["run",e,"project"],queryFn:()=>gr(`/api/runs/${e}/project`)});$P(e,(a=n.data)==null?void 0:a.last_event);const i=un(),l=pi({mutationFn:()=>Pl(`/api/runs/${e}/resume`,{}),onSettled:()=>i.invalidateQueries({queryKey:["run",e]})}),o=n.data!==void 0&&["pending","running"].includes(n.data.status)&&!n.data.busy&&!n.data.gate;if(K.useEffect(()=>{o&&l.isIdle&&l.mutate()},[o,l]),n.error)return x.jsxs("main",{className:"home",children:[x.jsx("p",{className:"error",children:n.error.message}),x.jsx("a",{href:pl({}),onClick:Qo({}),children:"← All projects"})]});const s=n.data,u=s==null?void 0:s.agents.find(g=>g.name===t);return x.jsxs("div",{className:"studio",children:[x.jsxs("header",{className:"topbar",children:[x.jsx("a",{href:pl({}),onClick:Qo({}),className:"home-link",children:"← Projects"}),x.jsx("h1",{children:((f=r.data)==null?void 0:f.title)??"…"}),((c=r.data)==null?void 0:c.mock)&&x.jsx("span",{className:"tag",children:"offline"}),(s==null?void 0:s.play)&&x.jsxs("a",{className:"button",href:s.play.url,target:"_blank",rel:"noopener",children:["▶ Play v",s.play.version]})]}),s&&x.jsx(Uk,{runId:e,agents:s.agents,selected:t}),x.jsxs("main",{className:"center",children:[x.jsxs("header",{className:"chat-head",children:[x.jsx("h2",{children:t}),u&&x.jsx("span",{className:`state agent-${u.status}`,children:u.status.replace("_"," ")}),(s==null?void 0:s.error)&&x.jsx("span",{className:"error",children:s.error}),(s==null?void 0:s.status)==="failed"&&x.jsx("button",{type:"button",onClick:()=>l.mutate(),disabled:l.isPending,children:"Retry"}),(s==null?void 0:s.status)==="budget_exhausted"&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"note",children:"Paused: this step used up its allowance."}),x.jsx("button",{type:"button",onClick:()=>l.mutate(),disabled:l.isPending,children:"Continue"})]}),l.error&&x.jsx("span",{className:"error",children:l.error.message})]}),x.jsx(UP,{runId:e,agent:t,working:(u==null?void 0:u.status)==="working",queued:((d=n.data)==null?void 0:d.queued)??[]},t)]}),x.jsxs("aside",{className:"side",children:[x.jsx(Vk,{runId:e,agent:t}),s&&x.jsx(HP,{state:s,agent:t,mock:((h=r.data)==null?void 0:h.mock)??!1})]})]})}function VP(){const e=Lk();return e.project?x.jsx(QP,{runId:e.project,agent:e.agent}):x.jsx(Ok,{})}const qP=new cv({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});ig(document.getElementById("root")).render(x.jsx(K.StrictMode,{children:x.jsx(mv,{client:qP,children:x.jsx(VP,{})})}));
|